summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2018-06-13 09:54:12 +0200
committerLoïc Hoguin <[email protected]>2018-06-13 09:54:12 +0200
commit92b54aacc0de5446dd5497c39897b0bbff72e626 (patch)
treec3a98cfec636d1271f5804e5c19b35b208bba00d /docs
parent8b5c3dc972b99f174750123c9e4abc96259c34a9 (diff)
downloadninenines.eu-92b54aacc0de5446dd5497c39897b0bbff72e626.tar.gz
ninenines.eu-92b54aacc0de5446dd5497c39897b0bbff72e626.tar.bz2
ninenines.eu-92b54aacc0de5446dd5497c39897b0bbff72e626.zip
Rebuild using Asciideck
Diffstat (limited to 'docs')
-rw-r--r--docs/en/cowboy/2.0/guide/constraints/index.html175
-rw-r--r--docs/en/cowboy/2.0/guide/cookies/index.html171
-rw-r--r--docs/en/cowboy/2.0/guide/erlang_web/index.html218
-rw-r--r--docs/en/cowboy/2.0/guide/flow_diagram/index.html121
-rw-r--r--docs/en/cowboy/2.0/guide/getting_started/index.html181
-rw-r--r--docs/en/cowboy/2.0/guide/handlers/index.html106
-rw-r--r--docs/en/cowboy/2.0/guide/index.html196
-rw-r--r--docs/en/cowboy/2.0/guide/introduction/index.html77
-rw-r--r--docs/en/cowboy/2.0/guide/listeners/index.html128
-rw-r--r--docs/en/cowboy/2.0/guide/loop_handlers/index.html157
-rw-r--r--docs/en/cowboy/2.0/guide/middlewares/index.html100
-rw-r--r--docs/en/cowboy/2.0/guide/migrating_from_1.0/index.html468
-rw-r--r--docs/en/cowboy/2.0/guide/modern_web/index.html131
-rw-r--r--docs/en/cowboy/2.0/guide/multipart/index.html220
-rw-r--r--docs/en/cowboy/2.0/guide/req/index.html484
-rw-r--r--docs/en/cowboy/2.0/guide/req_body/index.html167
-rw-r--r--docs/en/cowboy/2.0/guide/resource_design/index.html245
-rw-r--r--docs/en/cowboy/2.0/guide/resp/index.html408
-rw-r--r--docs/en/cowboy/2.0/guide/rest_flowcharts/index.html284
-rw-r--r--docs/en/cowboy/2.0/guide/rest_handlers/index.html409
-rw-r--r--docs/en/cowboy/2.0/guide/rest_principles/index.html169
-rw-r--r--docs/en/cowboy/2.0/guide/routing/index.html304
-rw-r--r--docs/en/cowboy/2.0/guide/specs/index.html1144
-rw-r--r--docs/en/cowboy/2.0/guide/static_files/index.html194
-rw-r--r--docs/en/cowboy/2.0/guide/streams/index.html68
-rw-r--r--docs/en/cowboy/2.0/guide/ws_handlers/index.html338
-rw-r--r--docs/en/cowboy/2.0/guide/ws_protocol/index.html74
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy.set_env/index.html124
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy.start_clear/index.html159
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy.start_tls/index.html165
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy.stop_listener/index.html87
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy/index.html135
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy_app/index.html178
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy_constraints.int/index.html92
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy_constraints.nonempty/index.html90
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy_constraints/index.html85
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy_handler.terminate/index.html115
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy_handler/index.html108
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy_http/index.html272
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy_http2/index.html139
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy_loop/index.html140
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy_middleware/index.html123
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy_req.binding/index.html122
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy_req.bindings/index.html82
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy_req.body_length/index.html86
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy_req.delete_resp_header/index.html94
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy_req.has_body/index.html76
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy_req.has_resp_body/index.html83
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy_req.has_resp_header/index.html95
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy_req.header/index.html129
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy_req.headers/index.html87
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy_req.host/index.html88
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy_req.host_info/index.html84
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy_req.match_cookies/index.html134
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy_req.match_qs/index.html134
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy_req.method/index.html102
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy_req.parse_cookies/index.html94
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy_req.parse_header/index.html359
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy_req.parse_qs/index.html118
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy_req.path/index.html87
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy_req.path_info/index.html84
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy_req.peer/index.html95
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy_req.port/index.html88
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy_req.push/index.html161
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy_req.qs/index.html86
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy_req.read_body/index.html165
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy_req.read_part/index.html200
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy_req.read_part_body/index.html150
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy_req.read_urlencoded_body/index.html140
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy_req.reply/index.html189
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy_req.resp_header/index.html119
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy_req.resp_headers/index.html75
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy_req.scheme/index.html93
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy_req.set_resp_body/index.html151
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy_req.set_resp_cookie/index.html189
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy_req.set_resp_header/index.html129
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy_req.set_resp_headers/index.html116
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy_req.stream_body/index.html126
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy_req.stream_reply/index.html170
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy_req.uri/index.html199
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy_req.version/index.html85
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy_req/index.html519
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy_rest/index.html811
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy_router.compile/index.html93
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy_router/index.html117
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy_static/index.html221
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy_stream/index.html497
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy_websocket/index.html355
-rw-r--r--docs/en/cowboy/2.0/manual/http_status_codes/index.html267
-rw-r--r--docs/en/cowboy/2.0/manual/index.html178
-rw-r--r--docs/en/cowboy/2.1/guide/constraints/index.html175
-rw-r--r--docs/en/cowboy/2.1/guide/cookies/index.html171
-rw-r--r--docs/en/cowboy/2.1/guide/erlang_web/index.html218
-rw-r--r--docs/en/cowboy/2.1/guide/flow_diagram/index.html121
-rw-r--r--docs/en/cowboy/2.1/guide/getting_started/index.html181
-rw-r--r--docs/en/cowboy/2.1/guide/handlers/index.html106
-rw-r--r--docs/en/cowboy/2.1/guide/index.html201
-rw-r--r--docs/en/cowboy/2.1/guide/introduction/index.html77
-rw-r--r--docs/en/cowboy/2.1/guide/listeners/index.html128
-rw-r--r--docs/en/cowboy/2.1/guide/loop_handlers/index.html157
-rw-r--r--docs/en/cowboy/2.1/guide/middlewares/index.html100
-rw-r--r--docs/en/cowboy/2.1/guide/migrating_from_1.0/index.html480
-rw-r--r--docs/en/cowboy/2.1/guide/migrating_from_2.0/index.html185
-rw-r--r--docs/en/cowboy/2.1/guide/modern_web/index.html131
-rw-r--r--docs/en/cowboy/2.1/guide/multipart/index.html220
-rw-r--r--docs/en/cowboy/2.1/guide/req/index.html484
-rw-r--r--docs/en/cowboy/2.1/guide/req_body/index.html167
-rw-r--r--docs/en/cowboy/2.1/guide/resource_design/index.html245
-rw-r--r--docs/en/cowboy/2.1/guide/resp/index.html437
-rw-r--r--docs/en/cowboy/2.1/guide/rest_flowcharts/index.html284
-rw-r--r--docs/en/cowboy/2.1/guide/rest_handlers/index.html413
-rw-r--r--docs/en/cowboy/2.1/guide/rest_principles/index.html169
-rw-r--r--docs/en/cowboy/2.1/guide/routing/index.html304
-rw-r--r--docs/en/cowboy/2.1/guide/specs/index.html1144
-rw-r--r--docs/en/cowboy/2.1/guide/static_files/index.html194
-rw-r--r--docs/en/cowboy/2.1/guide/streams/index.html68
-rw-r--r--docs/en/cowboy/2.1/guide/ws_handlers/index.html340
-rw-r--r--docs/en/cowboy/2.1/guide/ws_protocol/index.html74
-rw-r--r--docs/en/cowboy/2.1/manual/cowboy.set_env/index.html124
-rw-r--r--docs/en/cowboy/2.1/manual/cowboy.start_clear/index.html159
-rw-r--r--docs/en/cowboy/2.1/manual/cowboy.start_tls/index.html165
-rw-r--r--docs/en/cowboy/2.1/manual/cowboy.stop_listener/index.html87
-rw-r--r--docs/en/cowboy/2.1/manual/cowboy/index.html135
-rw-r--r--docs/en/cowboy/2.1/manual/cowboy_app/index.html178
-rw-r--r--docs/en/cowboy/2.1/manual/cowboy_constraints.int/index.html92
-rw-r--r--docs/en/cowboy/2.1/manual/cowboy_constraints.nonempty/index.html90
-rw-r--r--docs/en/cowboy/2.1/manual/cowboy_constraints/index.html85
-rw-r--r--docs/en/cowboy/2.1/manual/cowboy_handler.terminate/index.html115
-rw-r--r--docs/en/cowboy/2.1/manual/cowboy_handler/index.html108
-rw-r--r--docs/en/cowboy/2.1/manual/cowboy_http/index.html272
-rw-r--r--docs/en/cowboy/2.1/manual/cowboy_http2/index.html139
-rw-r--r--docs/en/cowboy/2.1/manual/cowboy_loop/index.html140
-rw-r--r--docs/en/cowboy/2.1/manual/cowboy_middleware/index.html123
-rw-r--r--docs/en/cowboy/2.1/manual/cowboy_req.binding/index.html122
-rw-r--r--docs/en/cowboy/2.1/manual/cowboy_req.bindings/index.html82
-rw-r--r--docs/en/cowboy/2.1/manual/cowboy_req.body_length/index.html86
-rw-r--r--docs/en/cowboy/2.1/manual/cowboy_req.cert/index.html108
-rw-r--r--docs/en/cowboy/2.1/manual/cowboy_req.delete_resp_header/index.html94
-rw-r--r--docs/en/cowboy/2.1/manual/cowboy_req.has_body/index.html76
-rw-r--r--docs/en/cowboy/2.1/manual/cowboy_req.has_resp_body/index.html83
-rw-r--r--docs/en/cowboy/2.1/manual/cowboy_req.has_resp_header/index.html95
-rw-r--r--docs/en/cowboy/2.1/manual/cowboy_req.header/index.html129
-rw-r--r--docs/en/cowboy/2.1/manual/cowboy_req.headers/index.html87
-rw-r--r--docs/en/cowboy/2.1/manual/cowboy_req.host/index.html88
-rw-r--r--docs/en/cowboy/2.1/manual/cowboy_req.host_info/index.html84
-rw-r--r--docs/en/cowboy/2.1/manual/cowboy_req.inform/index.html139
-rw-r--r--docs/en/cowboy/2.1/manual/cowboy_req.match_cookies/index.html134
-rw-r--r--docs/en/cowboy/2.1/manual/cowboy_req.match_qs/index.html134
-rw-r--r--docs/en/cowboy/2.1/manual/cowboy_req.method/index.html102
-rw-r--r--docs/en/cowboy/2.1/manual/cowboy_req.parse_cookies/index.html94
-rw-r--r--docs/en/cowboy/2.1/manual/cowboy_req.parse_header/index.html359
-rw-r--r--docs/en/cowboy/2.1/manual/cowboy_req.parse_qs/index.html118
-rw-r--r--docs/en/cowboy/2.1/manual/cowboy_req.path/index.html87
-rw-r--r--docs/en/cowboy/2.1/manual/cowboy_req.path_info/index.html84
-rw-r--r--docs/en/cowboy/2.1/manual/cowboy_req.peer/index.html97
-rw-r--r--docs/en/cowboy/2.1/manual/cowboy_req.port/index.html88
-rw-r--r--docs/en/cowboy/2.1/manual/cowboy_req.push/index.html162
-rw-r--r--docs/en/cowboy/2.1/manual/cowboy_req.qs/index.html86
-rw-r--r--docs/en/cowboy/2.1/manual/cowboy_req.read_body/index.html165
-rw-r--r--docs/en/cowboy/2.1/manual/cowboy_req.read_part/index.html200
-rw-r--r--docs/en/cowboy/2.1/manual/cowboy_req.read_part_body/index.html150
-rw-r--r--docs/en/cowboy/2.1/manual/cowboy_req.read_urlencoded_body/index.html140
-rw-r--r--docs/en/cowboy/2.1/manual/cowboy_req.reply/index.html190
-rw-r--r--docs/en/cowboy/2.1/manual/cowboy_req.resp_header/index.html119
-rw-r--r--docs/en/cowboy/2.1/manual/cowboy_req.resp_headers/index.html75
-rw-r--r--docs/en/cowboy/2.1/manual/cowboy_req.scheme/index.html93
-rw-r--r--docs/en/cowboy/2.1/manual/cowboy_req.set_resp_body/index.html151
-rw-r--r--docs/en/cowboy/2.1/manual/cowboy_req.set_resp_cookie/index.html189
-rw-r--r--docs/en/cowboy/2.1/manual/cowboy_req.set_resp_header/index.html129
-rw-r--r--docs/en/cowboy/2.1/manual/cowboy_req.set_resp_headers/index.html116
-rw-r--r--docs/en/cowboy/2.1/manual/cowboy_req.sock/index.html83
-rw-r--r--docs/en/cowboy/2.1/manual/cowboy_req.stream_body/index.html126
-rw-r--r--docs/en/cowboy/2.1/manual/cowboy_req.stream_reply/index.html171
-rw-r--r--docs/en/cowboy/2.1/manual/cowboy_req.uri/index.html199
-rw-r--r--docs/en/cowboy/2.1/manual/cowboy_req.version/index.html85
-rw-r--r--docs/en/cowboy/2.1/manual/cowboy_req/index.html549
-rw-r--r--docs/en/cowboy/2.1/manual/cowboy_rest/index.html843
-rw-r--r--docs/en/cowboy/2.1/manual/cowboy_router.compile/index.html93
-rw-r--r--docs/en/cowboy/2.1/manual/cowboy_router/index.html117
-rw-r--r--docs/en/cowboy/2.1/manual/cowboy_static/index.html221
-rw-r--r--docs/en/cowboy/2.1/manual/cowboy_stream/index.html497
-rw-r--r--docs/en/cowboy/2.1/manual/cowboy_websocket/index.html355
-rw-r--r--docs/en/cowboy/2.1/manual/http_status_codes/index.html267
-rw-r--r--docs/en/cowboy/2.1/manual/index.html178
-rw-r--r--docs/en/cowboy/2.2/guide/constraints/index.html175
-rw-r--r--docs/en/cowboy/2.2/guide/cookies/index.html171
-rw-r--r--docs/en/cowboy/2.2/guide/erlang_web/index.html218
-rw-r--r--docs/en/cowboy/2.2/guide/flow_diagram/index.html121
-rw-r--r--docs/en/cowboy/2.2/guide/getting_started/index.html181
-rw-r--r--docs/en/cowboy/2.2/guide/handlers/index.html106
-rw-r--r--docs/en/cowboy/2.2/guide/index.html211
-rw-r--r--docs/en/cowboy/2.2/guide/introduction/index.html77
-rw-r--r--docs/en/cowboy/2.2/guide/listeners/index.html128
-rw-r--r--docs/en/cowboy/2.2/guide/loop_handlers/index.html157
-rw-r--r--docs/en/cowboy/2.2/guide/middlewares/index.html100
-rw-r--r--docs/en/cowboy/2.2/guide/migrating_from_1.0/index.html480
-rw-r--r--docs/en/cowboy/2.2/guide/migrating_from_2.0/index.html185
-rw-r--r--docs/en/cowboy/2.2/guide/migrating_from_2.1/index.html199
-rw-r--r--docs/en/cowboy/2.2/guide/migrating_from_2.2/index.html44
-rw-r--r--docs/en/cowboy/2.2/guide/modern_web/index.html131
-rw-r--r--docs/en/cowboy/2.2/guide/multipart/index.html220
-rw-r--r--docs/en/cowboy/2.2/guide/req/index.html484
-rw-r--r--docs/en/cowboy/2.2/guide/req_body/index.html167
-rw-r--r--docs/en/cowboy/2.2/guide/resource_design/index.html245
-rw-r--r--docs/en/cowboy/2.2/guide/resp/index.html478
-rw-r--r--docs/en/cowboy/2.2/guide/rest_flowcharts/index.html284
-rw-r--r--docs/en/cowboy/2.2/guide/rest_handlers/index.html413
-rw-r--r--docs/en/cowboy/2.2/guide/rest_principles/index.html169
-rw-r--r--docs/en/cowboy/2.2/guide/routing/index.html304
-rw-r--r--docs/en/cowboy/2.2/guide/specs/index.html1151
-rw-r--r--docs/en/cowboy/2.2/guide/static_files/index.html194
-rw-r--r--docs/en/cowboy/2.2/guide/streams/index.html68
-rw-r--r--docs/en/cowboy/2.2/guide/ws_handlers/index.html340
-rw-r--r--docs/en/cowboy/2.2/guide/ws_protocol/index.html74
-rw-r--r--docs/en/cowboy/2.2/manual/cowboy.set_env/index.html124
-rw-r--r--docs/en/cowboy/2.2/manual/cowboy.start_clear/index.html159
-rw-r--r--docs/en/cowboy/2.2/manual/cowboy.start_tls/index.html165
-rw-r--r--docs/en/cowboy/2.2/manual/cowboy.stop_listener/index.html87
-rw-r--r--docs/en/cowboy/2.2/manual/cowboy/index.html135
-rw-r--r--docs/en/cowboy/2.2/manual/cowboy_app/index.html178
-rw-r--r--docs/en/cowboy/2.2/manual/cowboy_constraints.int/index.html92
-rw-r--r--docs/en/cowboy/2.2/manual/cowboy_constraints.nonempty/index.html90
-rw-r--r--docs/en/cowboy/2.2/manual/cowboy_constraints/index.html85
-rw-r--r--docs/en/cowboy/2.2/manual/cowboy_handler.terminate/index.html115
-rw-r--r--docs/en/cowboy/2.2/manual/cowboy_handler/index.html108
-rw-r--r--docs/en/cowboy/2.2/manual/cowboy_http/index.html321
-rw-r--r--docs/en/cowboy/2.2/manual/cowboy_http2/index.html139
-rw-r--r--docs/en/cowboy/2.2/manual/cowboy_loop/index.html140
-rw-r--r--docs/en/cowboy/2.2/manual/cowboy_middleware/index.html123
-rw-r--r--docs/en/cowboy/2.2/manual/cowboy_req.binding/index.html122
-rw-r--r--docs/en/cowboy/2.2/manual/cowboy_req.bindings/index.html82
-rw-r--r--docs/en/cowboy/2.2/manual/cowboy_req.body_length/index.html86
-rw-r--r--docs/en/cowboy/2.2/manual/cowboy_req.cert/index.html108
-rw-r--r--docs/en/cowboy/2.2/manual/cowboy_req.delete_resp_header/index.html94
-rw-r--r--docs/en/cowboy/2.2/manual/cowboy_req.has_body/index.html76
-rw-r--r--docs/en/cowboy/2.2/manual/cowboy_req.has_resp_body/index.html83
-rw-r--r--docs/en/cowboy/2.2/manual/cowboy_req.has_resp_header/index.html95
-rw-r--r--docs/en/cowboy/2.2/manual/cowboy_req.header/index.html129
-rw-r--r--docs/en/cowboy/2.2/manual/cowboy_req.headers/index.html87
-rw-r--r--docs/en/cowboy/2.2/manual/cowboy_req.host/index.html88
-rw-r--r--docs/en/cowboy/2.2/manual/cowboy_req.host_info/index.html84
-rw-r--r--docs/en/cowboy/2.2/manual/cowboy_req.inform/index.html139
-rw-r--r--docs/en/cowboy/2.2/manual/cowboy_req.match_cookies/index.html134
-rw-r--r--docs/en/cowboy/2.2/manual/cowboy_req.match_qs/index.html134
-rw-r--r--docs/en/cowboy/2.2/manual/cowboy_req.method/index.html102
-rw-r--r--docs/en/cowboy/2.2/manual/cowboy_req.parse_cookies/index.html94
-rw-r--r--docs/en/cowboy/2.2/manual/cowboy_req.parse_header/index.html359
-rw-r--r--docs/en/cowboy/2.2/manual/cowboy_req.parse_qs/index.html118
-rw-r--r--docs/en/cowboy/2.2/manual/cowboy_req.path/index.html87
-rw-r--r--docs/en/cowboy/2.2/manual/cowboy_req.path_info/index.html84
-rw-r--r--docs/en/cowboy/2.2/manual/cowboy_req.peer/index.html97
-rw-r--r--docs/en/cowboy/2.2/manual/cowboy_req.port/index.html88
-rw-r--r--docs/en/cowboy/2.2/manual/cowboy_req.push/index.html162
-rw-r--r--docs/en/cowboy/2.2/manual/cowboy_req.qs/index.html86
-rw-r--r--docs/en/cowboy/2.2/manual/cowboy_req.read_body/index.html165
-rw-r--r--docs/en/cowboy/2.2/manual/cowboy_req.read_part/index.html200
-rw-r--r--docs/en/cowboy/2.2/manual/cowboy_req.read_part_body/index.html150
-rw-r--r--docs/en/cowboy/2.2/manual/cowboy_req.read_urlencoded_body/index.html140
-rw-r--r--docs/en/cowboy/2.2/manual/cowboy_req.reply/index.html190
-rw-r--r--docs/en/cowboy/2.2/manual/cowboy_req.resp_header/index.html119
-rw-r--r--docs/en/cowboy/2.2/manual/cowboy_req.resp_headers/index.html75
-rw-r--r--docs/en/cowboy/2.2/manual/cowboy_req.scheme/index.html93
-rw-r--r--docs/en/cowboy/2.2/manual/cowboy_req.set_resp_body/index.html151
-rw-r--r--docs/en/cowboy/2.2/manual/cowboy_req.set_resp_cookie/index.html189
-rw-r--r--docs/en/cowboy/2.2/manual/cowboy_req.set_resp_header/index.html129
-rw-r--r--docs/en/cowboy/2.2/manual/cowboy_req.set_resp_headers/index.html116
-rw-r--r--docs/en/cowboy/2.2/manual/cowboy_req.sock/index.html83
-rw-r--r--docs/en/cowboy/2.2/manual/cowboy_req.stream_body/index.html129
-rw-r--r--docs/en/cowboy/2.2/manual/cowboy_req.stream_reply/index.html174
-rw-r--r--docs/en/cowboy/2.2/manual/cowboy_req.stream_trailers/index.html118
-rw-r--r--docs/en/cowboy/2.2/manual/cowboy_req.uri/index.html199
-rw-r--r--docs/en/cowboy/2.2/manual/cowboy_req.version/index.html85
-rw-r--r--docs/en/cowboy/2.2/manual/cowboy_req/index.html556
-rw-r--r--docs/en/cowboy/2.2/manual/cowboy_rest/index.html845
-rw-r--r--docs/en/cowboy/2.2/manual/cowboy_router.compile/index.html93
-rw-r--r--docs/en/cowboy/2.2/manual/cowboy_router/index.html117
-rw-r--r--docs/en/cowboy/2.2/manual/cowboy_static/index.html221
-rw-r--r--docs/en/cowboy/2.2/manual/cowboy_stream/index.html541
-rw-r--r--docs/en/cowboy/2.2/manual/cowboy_websocket/index.html355
-rw-r--r--docs/en/cowboy/2.2/manual/http_status_codes/index.html267
-rw-r--r--docs/en/cowboy/2.2/manual/index.html178
-rw-r--r--docs/en/cowboy/2.3/guide/constraints/index.html175
-rw-r--r--docs/en/cowboy/2.3/guide/cookies/index.html171
-rw-r--r--docs/en/cowboy/2.3/guide/erlang_web/index.html218
-rw-r--r--docs/en/cowboy/2.3/guide/flow_diagram/index.html121
-rw-r--r--docs/en/cowboy/2.3/guide/getting_started/index.html181
-rw-r--r--docs/en/cowboy/2.3/guide/handlers/index.html106
-rw-r--r--docs/en/cowboy/2.3/guide/index.html211
-rw-r--r--docs/en/cowboy/2.3/guide/introduction/index.html77
-rw-r--r--docs/en/cowboy/2.3/guide/listeners/index.html128
-rw-r--r--docs/en/cowboy/2.3/guide/loop_handlers/index.html157
-rw-r--r--docs/en/cowboy/2.3/guide/middlewares/index.html100
-rw-r--r--docs/en/cowboy/2.3/guide/migrating_from_1.0/index.html480
-rw-r--r--docs/en/cowboy/2.3/guide/migrating_from_2.0/index.html185
-rw-r--r--docs/en/cowboy/2.3/guide/migrating_from_2.1/index.html199
-rw-r--r--docs/en/cowboy/2.3/guide/migrating_from_2.2/index.html104
-rw-r--r--docs/en/cowboy/2.3/guide/modern_web/index.html131
-rw-r--r--docs/en/cowboy/2.3/guide/multipart/index.html220
-rw-r--r--docs/en/cowboy/2.3/guide/req/index.html484
-rw-r--r--docs/en/cowboy/2.3/guide/req_body/index.html167
-rw-r--r--docs/en/cowboy/2.3/guide/resource_design/index.html245
-rw-r--r--docs/en/cowboy/2.3/guide/resp/index.html476
-rw-r--r--docs/en/cowboy/2.3/guide/rest_flowcharts/index.html284
-rw-r--r--docs/en/cowboy/2.3/guide/rest_handlers/index.html413
-rw-r--r--docs/en/cowboy/2.3/guide/rest_principles/index.html169
-rw-r--r--docs/en/cowboy/2.3/guide/routing/index.html304
-rw-r--r--docs/en/cowboy/2.3/guide/specs/index.html1172
-rw-r--r--docs/en/cowboy/2.3/guide/static_files/index.html194
-rw-r--r--docs/en/cowboy/2.3/guide/streams/index.html68
-rw-r--r--docs/en/cowboy/2.3/guide/ws_handlers/index.html371
-rw-r--r--docs/en/cowboy/2.3/guide/ws_protocol/index.html74
-rw-r--r--docs/en/cowboy/2.3/manual/cowboy.set_env/index.html124
-rw-r--r--docs/en/cowboy/2.3/manual/cowboy.start_clear/index.html159
-rw-r--r--docs/en/cowboy/2.3/manual/cowboy.start_tls/index.html165
-rw-r--r--docs/en/cowboy/2.3/manual/cowboy.stop_listener/index.html87
-rw-r--r--docs/en/cowboy/2.3/manual/cowboy/index.html135
-rw-r--r--docs/en/cowboy/2.3/manual/cowboy_app/index.html178
-rw-r--r--docs/en/cowboy/2.3/manual/cowboy_constraints.int/index.html92
-rw-r--r--docs/en/cowboy/2.3/manual/cowboy_constraints.nonempty/index.html90
-rw-r--r--docs/en/cowboy/2.3/manual/cowboy_constraints/index.html85
-rw-r--r--docs/en/cowboy/2.3/manual/cowboy_handler.terminate/index.html115
-rw-r--r--docs/en/cowboy/2.3/manual/cowboy_handler/index.html108
-rw-r--r--docs/en/cowboy/2.3/manual/cowboy_http/index.html321
-rw-r--r--docs/en/cowboy/2.3/manual/cowboy_http2/index.html139
-rw-r--r--docs/en/cowboy/2.3/manual/cowboy_loop/index.html140
-rw-r--r--docs/en/cowboy/2.3/manual/cowboy_middleware/index.html123
-rw-r--r--docs/en/cowboy/2.3/manual/cowboy_req.binding/index.html122
-rw-r--r--docs/en/cowboy/2.3/manual/cowboy_req.bindings/index.html82
-rw-r--r--docs/en/cowboy/2.3/manual/cowboy_req.body_length/index.html86
-rw-r--r--docs/en/cowboy/2.3/manual/cowboy_req.cert/index.html108
-rw-r--r--docs/en/cowboy/2.3/manual/cowboy_req.delete_resp_header/index.html94
-rw-r--r--docs/en/cowboy/2.3/manual/cowboy_req.has_body/index.html76
-rw-r--r--docs/en/cowboy/2.3/manual/cowboy_req.has_resp_body/index.html83
-rw-r--r--docs/en/cowboy/2.3/manual/cowboy_req.has_resp_header/index.html95
-rw-r--r--docs/en/cowboy/2.3/manual/cowboy_req.header/index.html129
-rw-r--r--docs/en/cowboy/2.3/manual/cowboy_req.headers/index.html87
-rw-r--r--docs/en/cowboy/2.3/manual/cowboy_req.host/index.html88
-rw-r--r--docs/en/cowboy/2.3/manual/cowboy_req.host_info/index.html84
-rw-r--r--docs/en/cowboy/2.3/manual/cowboy_req.inform/index.html139
-rw-r--r--docs/en/cowboy/2.3/manual/cowboy_req.match_cookies/index.html134
-rw-r--r--docs/en/cowboy/2.3/manual/cowboy_req.match_qs/index.html134
-rw-r--r--docs/en/cowboy/2.3/manual/cowboy_req.method/index.html102
-rw-r--r--docs/en/cowboy/2.3/manual/cowboy_req.parse_cookies/index.html94
-rw-r--r--docs/en/cowboy/2.3/manual/cowboy_req.parse_header/index.html359
-rw-r--r--docs/en/cowboy/2.3/manual/cowboy_req.parse_qs/index.html118
-rw-r--r--docs/en/cowboy/2.3/manual/cowboy_req.path/index.html87
-rw-r--r--docs/en/cowboy/2.3/manual/cowboy_req.path_info/index.html84
-rw-r--r--docs/en/cowboy/2.3/manual/cowboy_req.peer/index.html97
-rw-r--r--docs/en/cowboy/2.3/manual/cowboy_req.port/index.html88
-rw-r--r--docs/en/cowboy/2.3/manual/cowboy_req.push/index.html162
-rw-r--r--docs/en/cowboy/2.3/manual/cowboy_req.qs/index.html86
-rw-r--r--docs/en/cowboy/2.3/manual/cowboy_req.read_body/index.html165
-rw-r--r--docs/en/cowboy/2.3/manual/cowboy_req.read_part/index.html200
-rw-r--r--docs/en/cowboy/2.3/manual/cowboy_req.read_part_body/index.html150
-rw-r--r--docs/en/cowboy/2.3/manual/cowboy_req.read_urlencoded_body/index.html140
-rw-r--r--docs/en/cowboy/2.3/manual/cowboy_req.reply/index.html190
-rw-r--r--docs/en/cowboy/2.3/manual/cowboy_req.resp_header/index.html119
-rw-r--r--docs/en/cowboy/2.3/manual/cowboy_req.resp_headers/index.html75
-rw-r--r--docs/en/cowboy/2.3/manual/cowboy_req.scheme/index.html93
-rw-r--r--docs/en/cowboy/2.3/manual/cowboy_req.set_resp_body/index.html151
-rw-r--r--docs/en/cowboy/2.3/manual/cowboy_req.set_resp_cookie/index.html189
-rw-r--r--docs/en/cowboy/2.3/manual/cowboy_req.set_resp_header/index.html129
-rw-r--r--docs/en/cowboy/2.3/manual/cowboy_req.set_resp_headers/index.html116
-rw-r--r--docs/en/cowboy/2.3/manual/cowboy_req.sock/index.html83
-rw-r--r--docs/en/cowboy/2.3/manual/cowboy_req.stream_body/index.html129
-rw-r--r--docs/en/cowboy/2.3/manual/cowboy_req.stream_reply/index.html174
-rw-r--r--docs/en/cowboy/2.3/manual/cowboy_req.stream_trailers/index.html118
-rw-r--r--docs/en/cowboy/2.3/manual/cowboy_req.uri/index.html199
-rw-r--r--docs/en/cowboy/2.3/manual/cowboy_req.version/index.html85
-rw-r--r--docs/en/cowboy/2.3/manual/cowboy_req/index.html556
-rw-r--r--docs/en/cowboy/2.3/manual/cowboy_rest/index.html845
-rw-r--r--docs/en/cowboy/2.3/manual/cowboy_router.compile/index.html93
-rw-r--r--docs/en/cowboy/2.3/manual/cowboy_router/index.html117
-rw-r--r--docs/en/cowboy/2.3/manual/cowboy_static/index.html221
-rw-r--r--docs/en/cowboy/2.3/manual/cowboy_stream/index.html541
-rw-r--r--docs/en/cowboy/2.3/manual/cowboy_websocket/index.html370
-rw-r--r--docs/en/cowboy/2.3/manual/http_status_codes/index.html267
-rw-r--r--docs/en/cowboy/2.3/manual/index.html178
-rw-r--r--docs/en/cowboy/2.4/guide/constraints/index.html175
-rw-r--r--docs/en/cowboy/2.4/guide/cookies/index.html171
-rw-r--r--docs/en/cowboy/2.4/guide/erlang_web/index.html218
-rw-r--r--docs/en/cowboy/2.4/guide/flow_diagram/index.html121
-rw-r--r--docs/en/cowboy/2.4/guide/getting_started/index.html181
-rw-r--r--docs/en/cowboy/2.4/guide/handlers/index.html106
-rw-r--r--docs/en/cowboy/2.4/guide/index.html216
-rw-r--r--docs/en/cowboy/2.4/guide/introduction/index.html77
-rw-r--r--docs/en/cowboy/2.4/guide/listeners/index.html128
-rw-r--r--docs/en/cowboy/2.4/guide/loop_handlers/index.html157
-rw-r--r--docs/en/cowboy/2.4/guide/middlewares/index.html100
-rw-r--r--docs/en/cowboy/2.4/guide/migrating_from_1.0/index.html480
-rw-r--r--docs/en/cowboy/2.4/guide/migrating_from_2.0/index.html185
-rw-r--r--docs/en/cowboy/2.4/guide/migrating_from_2.1/index.html199
-rw-r--r--docs/en/cowboy/2.4/guide/migrating_from_2.2/index.html104
-rw-r--r--docs/en/cowboy/2.4/guide/migrating_from_2.3/index.html117
-rw-r--r--docs/en/cowboy/2.4/guide/modern_web/index.html131
-rw-r--r--docs/en/cowboy/2.4/guide/multipart/index.html220
-rw-r--r--docs/en/cowboy/2.4/guide/req/index.html483
-rw-r--r--docs/en/cowboy/2.4/guide/req_body/index.html167
-rw-r--r--docs/en/cowboy/2.4/guide/resource_design/index.html245
-rw-r--r--docs/en/cowboy/2.4/guide/resp/index.html476
-rw-r--r--docs/en/cowboy/2.4/guide/rest_flowcharts/index.html284
-rw-r--r--docs/en/cowboy/2.4/guide/rest_handlers/index.html413
-rw-r--r--docs/en/cowboy/2.4/guide/rest_principles/index.html169
-rw-r--r--docs/en/cowboy/2.4/guide/routing/index.html304
-rw-r--r--docs/en/cowboy/2.4/guide/specs/index.html1172
-rw-r--r--docs/en/cowboy/2.4/guide/static_files/index.html194
-rw-r--r--docs/en/cowboy/2.4/guide/streams/index.html68
-rw-r--r--docs/en/cowboy/2.4/guide/ws_handlers/index.html371
-rw-r--r--docs/en/cowboy/2.4/guide/ws_protocol/index.html74
-rw-r--r--docs/en/cowboy/2.4/manual/cowboy.set_env/index.html124
-rw-r--r--docs/en/cowboy/2.4/manual/cowboy.start_clear/index.html159
-rw-r--r--docs/en/cowboy/2.4/manual/cowboy.start_tls/index.html165
-rw-r--r--docs/en/cowboy/2.4/manual/cowboy.stop_listener/index.html87
-rw-r--r--docs/en/cowboy/2.4/manual/cowboy/index.html135
-rw-r--r--docs/en/cowboy/2.4/manual/cowboy_app/index.html178
-rw-r--r--docs/en/cowboy/2.4/manual/cowboy_constraints.int/index.html92
-rw-r--r--docs/en/cowboy/2.4/manual/cowboy_constraints.nonempty/index.html90
-rw-r--r--docs/en/cowboy/2.4/manual/cowboy_constraints/index.html85
-rw-r--r--docs/en/cowboy/2.4/manual/cowboy_handler.terminate/index.html115
-rw-r--r--docs/en/cowboy/2.4/manual/cowboy_handler/index.html108
-rw-r--r--docs/en/cowboy/2.4/manual/cowboy_http/index.html321
-rw-r--r--docs/en/cowboy/2.4/manual/cowboy_http2/index.html279
-rw-r--r--docs/en/cowboy/2.4/manual/cowboy_loop/index.html140
-rw-r--r--docs/en/cowboy/2.4/manual/cowboy_middleware/index.html123
-rw-r--r--docs/en/cowboy/2.4/manual/cowboy_req.binding/index.html122
-rw-r--r--docs/en/cowboy/2.4/manual/cowboy_req.bindings/index.html82
-rw-r--r--docs/en/cowboy/2.4/manual/cowboy_req.body_length/index.html86
-rw-r--r--docs/en/cowboy/2.4/manual/cowboy_req.cert/index.html108
-rw-r--r--docs/en/cowboy/2.4/manual/cowboy_req.delete_resp_header/index.html94
-rw-r--r--docs/en/cowboy/2.4/manual/cowboy_req.has_body/index.html76
-rw-r--r--docs/en/cowboy/2.4/manual/cowboy_req.has_resp_body/index.html83
-rw-r--r--docs/en/cowboy/2.4/manual/cowboy_req.has_resp_header/index.html95
-rw-r--r--docs/en/cowboy/2.4/manual/cowboy_req.header/index.html129
-rw-r--r--docs/en/cowboy/2.4/manual/cowboy_req.headers/index.html87
-rw-r--r--docs/en/cowboy/2.4/manual/cowboy_req.host/index.html88
-rw-r--r--docs/en/cowboy/2.4/manual/cowboy_req.host_info/index.html84
-rw-r--r--docs/en/cowboy/2.4/manual/cowboy_req.inform/index.html139
-rw-r--r--docs/en/cowboy/2.4/manual/cowboy_req.match_cookies/index.html134
-rw-r--r--docs/en/cowboy/2.4/manual/cowboy_req.match_qs/index.html134
-rw-r--r--docs/en/cowboy/2.4/manual/cowboy_req.method/index.html102
-rw-r--r--docs/en/cowboy/2.4/manual/cowboy_req.parse_cookies/index.html94
-rw-r--r--docs/en/cowboy/2.4/manual/cowboy_req.parse_header/index.html359
-rw-r--r--docs/en/cowboy/2.4/manual/cowboy_req.parse_qs/index.html118
-rw-r--r--docs/en/cowboy/2.4/manual/cowboy_req.path/index.html87
-rw-r--r--docs/en/cowboy/2.4/manual/cowboy_req.path_info/index.html84
-rw-r--r--docs/en/cowboy/2.4/manual/cowboy_req.peer/index.html97
-rw-r--r--docs/en/cowboy/2.4/manual/cowboy_req.port/index.html88
-rw-r--r--docs/en/cowboy/2.4/manual/cowboy_req.push/index.html162
-rw-r--r--docs/en/cowboy/2.4/manual/cowboy_req.qs/index.html86
-rw-r--r--docs/en/cowboy/2.4/manual/cowboy_req.read_body/index.html165
-rw-r--r--docs/en/cowboy/2.4/manual/cowboy_req.read_part/index.html200
-rw-r--r--docs/en/cowboy/2.4/manual/cowboy_req.read_part_body/index.html150
-rw-r--r--docs/en/cowboy/2.4/manual/cowboy_req.read_urlencoded_body/index.html140
-rw-r--r--docs/en/cowboy/2.4/manual/cowboy_req.reply/index.html190
-rw-r--r--docs/en/cowboy/2.4/manual/cowboy_req.resp_header/index.html119
-rw-r--r--docs/en/cowboy/2.4/manual/cowboy_req.resp_headers/index.html75
-rw-r--r--docs/en/cowboy/2.4/manual/cowboy_req.scheme/index.html93
-rw-r--r--docs/en/cowboy/2.4/manual/cowboy_req.set_resp_body/index.html151
-rw-r--r--docs/en/cowboy/2.4/manual/cowboy_req.set_resp_cookie/index.html189
-rw-r--r--docs/en/cowboy/2.4/manual/cowboy_req.set_resp_header/index.html129
-rw-r--r--docs/en/cowboy/2.4/manual/cowboy_req.set_resp_headers/index.html116
-rw-r--r--docs/en/cowboy/2.4/manual/cowboy_req.sock/index.html83
-rw-r--r--docs/en/cowboy/2.4/manual/cowboy_req.stream_body/index.html129
-rw-r--r--docs/en/cowboy/2.4/manual/cowboy_req.stream_reply/index.html174
-rw-r--r--docs/en/cowboy/2.4/manual/cowboy_req.stream_trailers/index.html118
-rw-r--r--docs/en/cowboy/2.4/manual/cowboy_req.uri/index.html199
-rw-r--r--docs/en/cowboy/2.4/manual/cowboy_req.version/index.html85
-rw-r--r--docs/en/cowboy/2.4/manual/cowboy_req/index.html556
-rw-r--r--docs/en/cowboy/2.4/manual/cowboy_rest/index.html845
-rw-r--r--docs/en/cowboy/2.4/manual/cowboy_router.compile/index.html93
-rw-r--r--docs/en/cowboy/2.4/manual/cowboy_router/index.html117
-rw-r--r--docs/en/cowboy/2.4/manual/cowboy_static/index.html221
-rw-r--r--docs/en/cowboy/2.4/manual/cowboy_stream/index.html540
-rw-r--r--docs/en/cowboy/2.4/manual/cowboy_websocket/index.html370
-rw-r--r--docs/en/cowboy/2.4/manual/http_status_codes/index.html267
-rw-r--r--docs/en/cowboy/2.4/manual/index.html178
-rw-r--r--docs/en/erlang.mk/1/guide/app/index.html752
-rw-r--r--docs/en/erlang.mk/1/guide/asciidoc/index.html107
-rw-r--r--docs/en/erlang.mk/1/guide/ci/index.html83
-rw-r--r--docs/en/erlang.mk/1/guide/common_test/index.html135
-rw-r--r--docs/en/erlang.mk/1/guide/compat/index.html97
-rw-r--r--docs/en/erlang.mk/1/guide/contributing/index.html150
-rw-r--r--docs/en/erlang.mk/1/guide/coverage/index.html4
-rw-r--r--docs/en/erlang.mk/1/guide/deps/index.html815
-rw-r--r--docs/en/erlang.mk/1/guide/dialyzer/index.html84
-rw-r--r--docs/en/erlang.mk/1/guide/edoc/index.html64
-rw-r--r--docs/en/erlang.mk/1/guide/escripts/index.html103
-rw-r--r--docs/en/erlang.mk/1/guide/eunit/index.html159
-rw-r--r--docs/en/erlang.mk/1/guide/external_plugins/index.html178
-rw-r--r--docs/en/erlang.mk/1/guide/external_plugins_list/index.html83
-rw-r--r--docs/en/erlang.mk/1/guide/getting_started/index.html422
-rw-r--r--docs/en/erlang.mk/1/guide/history/index.html69
-rw-r--r--docs/en/erlang.mk/1/guide/index.html184
-rw-r--r--docs/en/erlang.mk/1/guide/installation/index.html204
-rw-r--r--docs/en/erlang.mk/1/guide/kerl/index.html88
-rw-r--r--docs/en/erlang.mk/1/guide/limitations/index.html51
-rw-r--r--docs/en/erlang.mk/1/guide/overview/index.html102
-rw-r--r--docs/en/erlang.mk/1/guide/ports/index.html218
-rw-r--r--docs/en/erlang.mk/1/guide/releases/index.html242
-rw-r--r--docs/en/erlang.mk/1/guide/sfx/index.html63
-rw-r--r--docs/en/erlang.mk/1/guide/shell/index.html68
-rw-r--r--docs/en/erlang.mk/1/guide/sphinx/index.html147
-rw-r--r--docs/en/erlang.mk/1/guide/triq/index.html45
-rw-r--r--docs/en/erlang.mk/1/guide/updating/index.html107
-rw-r--r--docs/en/erlang.mk/1/guide/why/index.html92
-rw-r--r--docs/en/erlang.mk/1/guide/xref/index.html4
-rw-r--r--docs/en/gun/1.0/guide/connect/index.html189
-rw-r--r--docs/en/gun/1.0/guide/http/index.html514
-rw-r--r--docs/en/gun/1.0/guide/index.html34
-rw-r--r--docs/en/gun/1.0/guide/introduction/index.html54
-rw-r--r--docs/en/gun/1.0/guide/protocols/index.html362
-rw-r--r--docs/en/gun/1.0/guide/start/index.html55
-rw-r--r--docs/en/gun/1.0/guide/websocket/index.html142
-rw-r--r--docs/en/gun/1.0/manual/gun.await/index.html210
-rw-r--r--docs/en/gun/1.0/manual/gun.await_body/index.html156
-rw-r--r--docs/en/gun/1.0/manual/gun.await_up/index.html123
-rw-r--r--docs/en/gun/1.0/manual/gun.cancel/index.html107
-rw-r--r--docs/en/gun/1.0/manual/gun.close/index.html75
-rw-r--r--docs/en/gun/1.0/manual/gun.data/index.html130
-rw-r--r--docs/en/gun/1.0/manual/gun.delete/index.html144
-rw-r--r--docs/en/gun/1.0/manual/gun.flush/index.html99
-rw-r--r--docs/en/gun/1.0/manual/gun.get/index.html150
-rw-r--r--docs/en/gun/1.0/manual/gun.head/index.html157
-rw-r--r--docs/en/gun/1.0/manual/gun.info/index.html86
-rw-r--r--docs/en/gun/1.0/manual/gun.open/index.html123
-rw-r--r--docs/en/gun/1.0/manual/gun.open_unix/index.html100
-rw-r--r--docs/en/gun/1.0/manual/gun.options/index.html144
-rw-r--r--docs/en/gun/1.0/manual/gun.patch/index.html197
-rw-r--r--docs/en/gun/1.0/manual/gun.post/index.html193
-rw-r--r--docs/en/gun/1.0/manual/gun.put/index.html192
-rw-r--r--docs/en/gun/1.0/manual/gun.request/index.html179
-rw-r--r--docs/en/gun/1.0/manual/gun.ws_send/index.html107
-rw-r--r--docs/en/gun/1.0/manual/gun.ws_upgrade/index.html171
-rw-r--r--docs/en/gun/1.0/manual/gun/index.html517
-rw-r--r--docs/en/gun/1.0/manual/gun_app/index.html69
-rw-r--r--docs/en/gun/1.0/manual/gun_data/index.html130
-rw-r--r--docs/en/gun/1.0/manual/gun_down/index.html145
-rw-r--r--docs/en/gun/1.0/manual/gun_error/index.html118
-rw-r--r--docs/en/gun/1.0/manual/gun_inform/index.html123
-rw-r--r--docs/en/gun/1.0/manual/gun_push/index.html161
-rw-r--r--docs/en/gun/1.0/manual/gun_response/index.html134
-rw-r--r--docs/en/gun/1.0/manual/gun_trailers/index.html113
-rw-r--r--docs/en/gun/1.0/manual/gun_up/index.html101
-rw-r--r--docs/en/gun/1.0/manual/gun_upgrade/index.html125
-rw-r--r--docs/en/gun/1.0/manual/gun_ws/index.html110
-rw-r--r--docs/en/gun/1.0/manual/index.html69
-rw-r--r--docs/en/ranch/1.2/guide/embedded/index.html60
-rw-r--r--docs/en/ranch/1.2/guide/index.html46
-rw-r--r--docs/en/ranch/1.2/guide/internals/index.html105
-rw-r--r--docs/en/ranch/1.2/guide/introduction/index.html33
-rw-r--r--docs/en/ranch/1.2/guide/listeners/index.html347
-rw-r--r--docs/en/ranch/1.2/guide/parsers/index.html140
-rw-r--r--docs/en/ranch/1.2/guide/protocols/index.html183
-rw-r--r--docs/en/ranch/1.2/guide/ssl_auth/index.html188
-rw-r--r--docs/en/ranch/1.2/guide/transports/index.html229
-rw-r--r--docs/en/ranch/1.2/manual/index.html36
-rw-r--r--docs/en/ranch/1.2/manual/ranch/index.html570
-rw-r--r--docs/en/ranch/1.2/manual/ranch_app/index.html44
-rw-r--r--docs/en/ranch/1.2/manual/ranch_protocol/index.html90
-rw-r--r--docs/en/ranch/1.2/manual/ranch_ssl/index.html479
-rw-r--r--docs/en/ranch/1.2/manual/ranch_tcp/index.html323
-rw-r--r--docs/en/ranch/1.2/manual/ranch_transport/index.html672
-rw-r--r--docs/en/ranch/1.3/guide/embedded/index.html60
-rw-r--r--docs/en/ranch/1.3/guide/index.html46
-rw-r--r--docs/en/ranch/1.3/guide/internals/index.html105
-rw-r--r--docs/en/ranch/1.3/guide/introduction/index.html36
-rw-r--r--docs/en/ranch/1.3/guide/listeners/index.html416
-rw-r--r--docs/en/ranch/1.3/guide/parsers/index.html140
-rw-r--r--docs/en/ranch/1.3/guide/protocols/index.html140
-rw-r--r--docs/en/ranch/1.3/guide/ssl_auth/index.html188
-rw-r--r--docs/en/ranch/1.3/guide/transports/index.html218
-rw-r--r--docs/en/ranch/1.3/manual/index.html36
-rw-r--r--docs/en/ranch/1.3/manual/ranch/index.html758
-rw-r--r--docs/en/ranch/1.3/manual/ranch_app/index.html41
-rw-r--r--docs/en/ranch/1.3/manual/ranch_protocol/index.html90
-rw-r--r--docs/en/ranch/1.3/manual/ranch_ssl/index.html531
-rw-r--r--docs/en/ranch/1.3/manual/ranch_tcp/index.html334
-rw-r--r--docs/en/ranch/1.3/manual/ranch_transport/index.html672
-rw-r--r--docs/en/ranch/1.4/guide/embedded/index.html60
-rw-r--r--docs/en/ranch/1.4/guide/index.html46
-rw-r--r--docs/en/ranch/1.4/guide/internals/index.html105
-rw-r--r--docs/en/ranch/1.4/guide/introduction/index.html36
-rw-r--r--docs/en/ranch/1.4/guide/listeners/index.html442
-rw-r--r--docs/en/ranch/1.4/guide/parsers/index.html140
-rw-r--r--docs/en/ranch/1.4/guide/protocols/index.html140
-rw-r--r--docs/en/ranch/1.4/guide/ssl_auth/index.html188
-rw-r--r--docs/en/ranch/1.4/guide/transports/index.html218
-rw-r--r--docs/en/ranch/1.4/manual/index.html36
-rw-r--r--docs/en/ranch/1.4/manual/ranch/index.html771
-rw-r--r--docs/en/ranch/1.4/manual/ranch_app/index.html41
-rw-r--r--docs/en/ranch/1.4/manual/ranch_protocol/index.html90
-rw-r--r--docs/en/ranch/1.4/manual/ranch_ssl/index.html531
-rw-r--r--docs/en/ranch/1.4/manual/ranch_tcp/index.html334
-rw-r--r--docs/en/ranch/1.4/manual/ranch_transport/index.html672
-rw-r--r--docs/en/ranch/1.5/guide/embedded.asciidoc48
-rw-r--r--docs/en/ranch/1.5/guide/embedded/index.html184
-rw-r--r--docs/en/ranch/1.5/guide/index.html156
-rw-r--r--docs/en/ranch/1.5/guide/internals.asciidoc94
-rw-r--r--docs/en/ranch/1.5/guide/internals/index.html184
-rw-r--r--docs/en/ranch/1.5/guide/introduction.asciidoc28
-rw-r--r--docs/en/ranch/1.5/guide/introduction/index.html168
-rw-r--r--docs/en/ranch/1.5/guide/listeners.asciidoc320
-rw-r--r--docs/en/ranch/1.5/guide/listeners/index.html367
-rw-r--r--docs/en/ranch/1.5/guide/parsers.asciidoc92
-rw-r--r--docs/en/ranch/1.5/guide/parsers/index.html223
-rw-r--r--docs/en/ranch/1.5/guide/protocols.asciidoc99
-rw-r--r--docs/en/ranch/1.5/guide/protocols/index.html230
-rw-r--r--docs/en/ranch/1.5/guide/ssl_auth.asciidoc120
-rw-r--r--docs/en/ranch/1.5/guide/ssl_auth/index.html236
-rw-r--r--docs/en/ranch/1.5/guide/transports.asciidoc161
-rw-r--r--docs/en/ranch/1.5/guide/transports/index.html261
-rw-r--r--docs/en/ranch/1.5/manual/index.html152
-rw-r--r--docs/en/ranch/1.5/manual/ranch/index.html364
-rw-r--r--docs/en/ranch/1.5/manual/ranch_app/index.html150
-rw-r--r--docs/en/ranch/1.5/manual/ranch_protocol/index.html165
-rw-r--r--docs/en/ranch/1.5/manual/ranch_ssl/index.html306
-rw-r--r--docs/en/ranch/1.5/manual/ranch_tcp/index.html259
-rw-r--r--docs/en/ranch/1.5/manual/ranch_transport/index.html363
-rw-r--r--docs/index.html15
-rw-r--r--docs/index.xml3634
620 files changed, 39037 insertions, 79558 deletions
diff --git a/docs/en/cowboy/2.0/guide/constraints/index.html b/docs/en/cowboy/2.0/guide/constraints/index.html
index d89fe6a6..60c1ec6d 100644
--- a/docs/en/cowboy/2.0/guide/constraints/index.html
+++ b/docs/en/cowboy/2.0/guide/constraints/index.html
@@ -62,141 +62,86 @@
<h1 class="lined-header"><span>Constraints</span></h1>
-<div class="paragraph"><p>Constraints are validation and conversion functions applied
-to user input.</p></div>
-<div class="paragraph"><p>They are used in various places in Cowboy, including the
-router and the <code>cowboy_req</code> match functions.</p></div>
-<div class="sect1">
+<p>Constraints are validation and conversion functions applied to user input.</p>
+<p>They are used in various places in Cowboy, including the router and the <code>cowboy_req</code> match functions.</p>
<h2 id="_syntax">Syntax</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Constraints are provided as a list of fields. For each field
-in the list, specific constraints can be applied, as well as
-a default value if the field is missing.</p></div>
-<div class="paragraph"><p>A field can take the form of an atom <code>field</code>, a tuple with
-constraints <code>{field, Constraints}</code> or a tuple with constraints
-and a default value <code>{field, Constraints, Default}</code>.
-The <code>field</code> form indicates the field is mandatory.</p></div>
-<div class="paragraph"><p>Note that when used with the router, only the second form
-makes sense, as it does not use the default and the field
-is always defined.</p></div>
-<div class="paragraph"><p>Constraints for each field are provided as an ordered list
-of atoms or funs to apply. Built-in constraints are provided
-as atoms, while custom constraints are provided as funs.</p></div>
-<div class="paragraph"><p>When multiple constraints are provided, they are applied in
-the order given. If the value has been modified by a constraint
-then the next one receives the new value.</p></div>
-<div class="paragraph"><p>For example, the following constraints will first validate
-and convert the field <code>my_value</code> to an integer, and then
-check that the integer is positive:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Constraints are provided as a list of fields. For each field in the list, specific constraints can be applied, as well as a default value if the field is missing.</p>
+<p>A field can take the form of an atom <code>field</code>, a tuple with constraints <code>{field, Constraints}</code> or a tuple with constraints and a default value <code>{field, Constraints, Default}</code>. The <code>field</code> form indicates the field is mandatory.</p>
+<p>Note that when used with the router, only the second form makes sense, as it does not use the default and the field is always defined.</p>
+<p>Constraints for each field are provided as an ordered list of atoms or funs to apply. Built-in constraints are provided as atoms, while custom constraints are provided as funs.</p>
+<p>When multiple constraints are provided, they are applied in the order given. If the value has been modified by a constraint then the next one receives the new value.</p>
+<p>For example, the following constraints will first validate and convert the field <code>my_value</code> to an integer, and then check that the integer is positive:</p>
+<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">PositiveFun</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">fun</span></span>
- (<span style="color: #990000">_</span>, <span style="color: #009900">V</span>) <span style="font-weight: bold"><span style="color: #0000FF">when</span></span> <span style="color: #009900">V</span> <span style="color: #990000">&gt;</span> <span style="color: #993399">0</span> <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">V</span>};
- (<span style="color: #990000">_</span>, <span style="color: #990000">_</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">error</span>, <span style="color: #FF6600">not_positive</span>}
-<span style="font-weight: bold"><span style="color: #0000FF">end</span></span>,
-{<span style="color: #FF6600">my_value</span>, [<span style="color: #FF6600">int</span>, <span style="color: #009900">PositiveFun</span>]}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>We ignore the first fun argument in this snippet. We shouldn&#8217;t.
-We will simply learn what it is later in this chapter.</p></div>
-<div class="paragraph"><p>When there&#8217;s only one constraint, it can be provided directly
-without wrapping it into a list:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">PositiveFun</font> <font color="#990000">=</font> <b><font color="#0000FF">fun</font></b>
+ (<font color="#990000">_</font>, <font color="#009900">V</font>) <b><font color="#0000FF">when</font></b> <font color="#009900">V</font> <font color="#990000">&gt;</font> <font color="#993399">0</font> <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <font color="#009900">V</font>};
+ (<font color="#990000">_</font>, <font color="#990000">_</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">error</font>, <font color="#FF6600">not_positive</font>}
+<b><font color="#0000FF">end</font></b>,
+{<font color="#FF6600">my_value</font>, [<font color="#FF6600">int</font>, <font color="#009900">PositiveFun</font>]}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>We ignore the first fun argument in this snippet. We shouldn&apos;t. We will simply learn what it is later in this chapter.</p>
+<p>When there&apos;s only one constraint, it can be provided directly without wrapping it into a list:</p>
+<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">my_value</span>, <span style="color: #FF6600">int</span>}</tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#FF6600">my_value</font>, <font color="#FF6600">int</font>}</tt></pre>
+</div></div>
<h2 id="_built_in_constraints">Built-in constraints</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Built-in constraints are specified as an atom:</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"> Constraint </th>
-<th align="left" valign="top"> Description</th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td align="left" valign="top"><p class="table">int</p></td>
-<td align="left" valign="top"><p class="table">Converts binary value to integer.</p></td>
+<p>Built-in constraints are specified as an atom:</p>
+<table rules="all" width="100%" frame="border"
+ cellspacing="0" cellpadding="4">
+<thead><tr><th>Constraint</th>
+<th>Description</th>
+</tr></thead><tbody><tr><td>int</td>
+<td>Converts binary value to integer.</td>
</tr>
-<tr>
-<td align="left" valign="top"><p class="table">nonempty</p></td>
-<td align="left" valign="top"><p class="table">Ensures the binary value is non-empty.</p></td>
+<tr><td>nonempty</td>
+<td>Ensures the binary value is non-empty.</td>
</tr>
-</tbody>
-</table>
-</div>
-</div>
-</div>
-<div class="sect1">
+</tbody></table>
<h2 id="_custom_constraints">Custom constraints</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Custom constraints are specified as a fun. This fun takes
-two arguments. The first argument indicates the operation
-to be performed, and the second is the value. What the
-value is and what must be returned depends on the operation.</p></div>
-<div class="paragraph"><p>Cowboy currently defines three operations. The operation
-used for validating and converting user input is the <code>forward</code>
-operation.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Custom constraints are specified as a fun. This fun takes two arguments. The first argument indicates the operation to be performed, and the second is the value. What the value is and what must be returned depends on the operation.</p>
+<p>Cowboy currently defines three operations. The operation used for validating and converting user input is the <code>forward</code> operation.</p>
+<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">int</span></span>(<span style="color: #FF6600">forward</span>, <span style="color: #009900">Value</span>) <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #0000FF">try</span></span>
- {<span style="color: #FF6600">ok</span>, <span style="font-weight: bold"><span style="color: #000000">binary_to_integer</span></span>(<span style="color: #009900">Value</span>)}
- <span style="font-weight: bold"><span style="color: #0000FF">catch</span></span> <span style="color: #990000">_:_</span> <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">error</span>, <span style="color: #FF6600">not_an_integer</span>}
- <span style="font-weight: bold"><span style="color: #0000FF">end</span></span>;</tt></pre></div></div>
-<div class="paragraph"><p>The value must be returned even if it is not converted
-by the constraint.</p></div>
-<div class="paragraph"><p>The <code>reverse</code> operation does the opposite: it
-takes a converted value and changes it back to what the
-user input would have been.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">int</font></b>(<font color="#FF6600">forward</font>, <font color="#009900">Value</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">try</font></b>
+ {<font color="#FF6600">ok</font>, <b><font color="#000000">binary_to_integer</font></b>(<font color="#009900">Value</font>)}
+ <b><font color="#0000FF">catch</font></b> <font color="#990000">_:_</font> <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">error</font>, <font color="#FF6600">not_an_integer</font>}
+ <b><font color="#0000FF">end</font></b>;</tt></pre>
+</div></div>
+<p>The value must be returned even if it is not converted by the constraint.</p>
+<p>The <code>reverse</code> operation does the opposite: it takes a converted value and changes it back to what the user input would have been.</p>
+<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">int</span></span>(<span style="color: #FF6600">reverse</span>, <span style="color: #009900">Value</span>) <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #0000FF">try</span></span>
- {<span style="color: #FF6600">ok</span>, <span style="font-weight: bold"><span style="color: #000000">integer_to_binary</span></span>(<span style="color: #009900">Value</span>)}
- <span style="font-weight: bold"><span style="color: #0000FF">catch</span></span> <span style="color: #990000">_:_</span> <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">error</span>, <span style="color: #FF6600">not_an_integer</span>}
- <span style="font-weight: bold"><span style="color: #0000FF">end</span></span>;</tt></pre></div></div>
-<div class="paragraph"><p>Finally, the <code>format_error</code> operation takes an error
-returned by any other operation and returns a formatted
-human-readable error message.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">int</font></b>(<font color="#FF6600">reverse</font>, <font color="#009900">Value</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">try</font></b>
+ {<font color="#FF6600">ok</font>, <b><font color="#000000">integer_to_binary</font></b>(<font color="#009900">Value</font>)}
+ <b><font color="#0000FF">catch</font></b> <font color="#990000">_:_</font> <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">error</font>, <font color="#FF6600">not_an_integer</font>}
+ <b><font color="#0000FF">end</font></b>;</tt></pre>
+</div></div>
+<p>Finally, the <code>format_error</code> operation takes an error returned by any other operation and returns a formatted human-readable error message.</p>
+<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">int</span></span>(<span style="color: #FF6600">format_error</span>, {<span style="color: #FF6600">not_an_integer</span>, <span style="color: #009900">Value</span>}) <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #000000">io_lib:format</span></span>(<span style="color: #FF0000">"The value ~p is not an integer."</span>, [<span style="color: #009900">Value</span>])<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Notice that for this case you get both the error and
-the value that was given to the constraint that produced
-this error.</p></div>
-<div class="paragraph"><p>Cowboy will not catch exceptions coming from constraint
-functions. They should be written to not emit any exceptions.</p></div>
-</div>
-</div>
+<pre><tt><b><font color="#000000">int</font></b>(<font color="#FF6600">format_error</font>, {<font color="#FF6600">not_an_integer</font>, <font color="#009900">Value</font>}) <font color="#990000">-&gt;</font>
+ <b><font color="#000000">io_lib:format</font></b>(<font color="#FF0000">"The value ~p is not an integer."</font>, [<font color="#009900">Value</font>])<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Notice that for this case you get both the error and the value that was given to the constraint that produced this error.</p>
+<p>Cowboy will not catch exceptions coming from constraint functions. They should be written to not emit any exceptions.</p>
+
diff --git a/docs/en/cowboy/2.0/guide/cookies/index.html b/docs/en/cowboy/2.0/guide/cookies/index.html
index 646c79de..dd764e82 100644
--- a/docs/en/cowboy/2.0/guide/cookies/index.html
+++ b/docs/en/cowboy/2.0/guide/cookies/index.html
@@ -62,144 +62,103 @@
<h1 class="lined-header"><span>Using cookies</span></h1>
-<div class="paragraph"><p>Cookies are a mechanism allowing applications to maintain
-state on top of the stateless HTTP protocol.</p></div>
-<div class="paragraph"><p>Cookies are a name/value store where the names and values are
-stored in plain text. They expire either after a delay
-or when the browser closes. They can be configured on a
-specific domain name or path, and restricted to secure
-resources (sent or downloaded over HTTPS), or restricted
-to the server (disallowing access from client-side scripts).</p></div>
-<div class="paragraph"><p>Cookie names are de facto case sensitive.</p></div>
-<div class="paragraph"><p>Cookies are stored client-side and sent with every subsequent
-request that matches the domain and path for which they were
-stored, until they expire. This can create a non-negligible
-cost.</p></div>
-<div class="paragraph"><p>Cookies should not be considered secure. They are stored on
-the user&#8217;s computer in plain text, and can be read by any
-program. They can also be read by proxies when using clear
-connections. Always validate the value before using it,
-and never store any sensitive information inside it.</p></div>
-<div class="paragraph"><p>Cookies set by the server are only available in requests
-following the client reception of the response containing
-them.</p></div>
-<div class="paragraph"><p>Cookies may be sent repeatedly. This is often useful to
-update the expiration time and avoid losing a cookie.</p></div>
-<div class="sect1">
+<p>Cookies are a mechanism allowing applications to maintain state on top of the stateless HTTP protocol.</p>
+<p>Cookies are a name/value store where the names and values are stored in plain text. They expire either after a delay or when the browser closes. They can be configured on a specific domain name or path, and restricted to secure resources (sent or downloaded over HTTPS), or restricted to the server (disallowing access from client-side scripts).</p>
+<p>Cookie names are de facto case sensitive.</p>
+<p>Cookies are stored client-side and sent with every subsequent request that matches the domain and path for which they were stored, until they expire. This can create a non-negligible cost.</p>
+<p>Cookies should not be considered secure. They are stored on the user&apos;s computer in plain text, and can be read by any program. They can also be read by proxies when using clear connections. Always validate the value before using it, and never store any sensitive information inside it.</p>
+<p>Cookies set by the server are only available in requests following the client reception of the response containing them.</p>
+<p>Cookies may be sent repeatedly. This is often useful to update the expiration time and avoid losing a cookie.</p>
<h2 id="_setting_cookies">Setting cookies</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>By default cookies are defined for the duration of the session:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>By default cookies are defined for the duration of the session:</p>
+<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">SessionID</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">generate_session_id</span></span>(),
-<span style="color: #009900">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_cookie</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"sessionid"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">SessionID</span>, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>They can also be set for a duration in seconds:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">SessionID</font> <font color="#990000">=</font> <b><font color="#000000">generate_session_id</font></b>(),
+<font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_cookie</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"sessionid"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">SessionID</font>, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>They can also be set for a duration in seconds:</p>
+<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">SessionID</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">generate_session_id</span></span>(),
-<span style="color: #009900">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_cookie</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"sessionid"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">SessionID</span>, <span style="color: #009900">Req0</span>,
- #{<span style="color: #0000FF">max_age</span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">3600</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>To delete cookies, set <code>max_age</code> to 0:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">SessionID</font> <font color="#990000">=</font> <b><font color="#000000">generate_session_id</font></b>(),
+<font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_cookie</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"sessionid"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">SessionID</font>, <font color="#009900">Req0</font>,
+ #{<font color="#0000FF">max_age</font> <font color="#990000">=&gt;</font> <font color="#993399">3600</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>To delete cookies, set <code>max_age</code> to 0:</p>
+<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">SessionID</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">generate_session_id</span></span>(),
-<span style="color: #009900">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_cookie</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"sessionid"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">SessionID</span>, <span style="color: #009900">Req0</span>,
- #{<span style="color: #0000FF">max_age</span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">0</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>To restrict cookies to a specific domain and path, the options
-of the same name can be used:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">SessionID</font> <font color="#990000">=</font> <b><font color="#000000">generate_session_id</font></b>(),
+<font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_cookie</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"sessionid"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">SessionID</font>, <font color="#009900">Req0</font>,
+ #{<font color="#0000FF">max_age</font> <font color="#990000">=&gt;</font> <font color="#993399">0</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>To restrict cookies to a specific domain and path, the options of the same name can be used:</p>
+<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">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_cookie</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"inaccount"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"1"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req0</span>,
- #{<span style="color: #0000FF">domain</span> <span style="color: #990000">=&gt;</span> <span style="color: #FF0000">"my.example.org"</span>, <span style="color: #0000FF">path</span> <span style="color: #990000">=&gt;</span> <span style="color: #FF0000">"/account"</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Cookies will be sent with requests to this domain and all
-its subdomains, and to resources on this path or deeper
-in the path hierarchy.</p></div>
-<div class="paragraph"><p>To restrict cookies to secure channels (typically resources
-available over HTTPS):</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_cookie</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"inaccount"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"1"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req0</font>,
+ #{<font color="#0000FF">domain</font> <font color="#990000">=&gt;</font> <font color="#FF0000">"my.example.org"</font>, <font color="#0000FF">path</font> <font color="#990000">=&gt;</font> <font color="#FF0000">"/account"</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Cookies will be sent with requests to this domain and all its subdomains, and to resources on this path or deeper in the path hierarchy.</p>
+<p>To restrict cookies to secure channels (typically resources available over HTTPS):</p>
+<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">SessionID</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">generate_session_id</span></span>(),
-<span style="color: #009900">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_cookie</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"sessionid"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">SessionID</span>, <span style="color: #009900">Req0</span>,
- #{<span style="color: #0000FF">secure</span> <span style="color: #990000">=&gt;</span> <span style="color: #000080">true</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>To prevent client-side scripts from accessing a cookie:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">SessionID</font> <font color="#990000">=</font> <b><font color="#000000">generate_session_id</font></b>(),
+<font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_cookie</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"sessionid"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">SessionID</font>, <font color="#009900">Req0</font>,
+ #{<font color="#0000FF">secure</font> <font color="#990000">=&gt;</font> <font color="#000080">true</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>To prevent client-side scripts from accessing a cookie:</p>
+<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">SessionID</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">generate_session_id</span></span>(),
-<span style="color: #009900">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_cookie</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"sessionid"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">SessionID</span>, <span style="color: #009900">Req0</span>,
- #{<span style="color: #0000FF">http_only</span> <span style="color: #990000">=&gt;</span> <span style="color: #000080">true</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Cookies may also be set client-side, for example using
-Javascript.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">SessionID</font> <font color="#990000">=</font> <b><font color="#000000">generate_session_id</font></b>(),
+<font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_cookie</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"sessionid"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">SessionID</font>, <font color="#009900">Req0</font>,
+ #{<font color="#0000FF">http_only</font> <font color="#990000">=&gt;</font> <font color="#000080">true</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Cookies may also be set client-side, for example using Javascript.</p>
<h2 id="_reading_cookies">Reading cookies</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The client only ever sends back the cookie name and value.
-All other options that can be set are never sent back.</p></div>
-<div class="paragraph"><p>Cowboy provides two functions for reading cookies. Both
-involve parsing the cookie header(s) and so should not
-be called repeatedly.</p></div>
-<div class="paragraph"><p>You can get all cookies as a key/value list:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The client only ever sends back the cookie name and value. All other options that can be set are never sent back.</p>
+<p>Cowboy provides two functions for reading cookies. Both involve parsing the cookie header(s) and so should not be called repeatedly.</p>
+<p>You can get all cookies as a key/value list:</p>
+<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">Cookies</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:parse_cookies</span></span>(<span style="color: #009900">Req</span>),
-{<span style="color: #990000">_</span>, <span style="color: #009900">Lang</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">lists:keyfind</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"lang"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #993399">1</span>, <span style="color: #009900">Cookies</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Or you can perform a match against cookies and retrieve
-only the ones you need, while at the same time doing
-any required post processing using <a href="../constraints">constraints</a>.
-This function returns a map:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Cookies</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:parse_cookies</font></b>(<font color="#009900">Req</font>),
+{<font color="#990000">_</font>, <font color="#009900">Lang</font>} <font color="#990000">=</font> <b><font color="#000000">lists:keyfind</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"lang"</font><font color="#990000">&gt;&gt;</font>, <font color="#993399">1</font>, <font color="#009900">Cookies</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Or you can perform a match against cookies and retrieve only the ones you need, while at the same time doing any required post processing using <a href="../constraints">constraints</a>. This function returns a map:</p>
+<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">id</span> <span style="color: #990000">:=</span> <span style="color: #009900">ID</span>, <span style="color: #FF6600">lang</span> <span style="color: #990000">:=</span> <span style="color: #009900">Lang</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:match_cookies</span></span>([<span style="color: #FF6600">id</span>, <span style="color: #FF6600">lang</span>], <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>You can use constraints to validate the values while matching
-them. The following snippet will crash if the <code>id</code> cookie is
-not an integer number or if the <code>lang</code> cookie is empty. Additionally
-the <code>id</code> cookie value will be converted to an integer term:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>#{<font color="#FF6600">id</font> <font color="#990000">:=</font> <font color="#009900">ID</font>, <font color="#FF6600">lang</font> <font color="#990000">:=</font> <font color="#009900">Lang</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:match_cookies</font></b>([<font color="#FF6600">id</font>, <font color="#FF6600">lang</font>], <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>You can use constraints to validate the values while matching them. The following snippet will crash if the <code>id</code> cookie is not an integer number or if the <code>lang</code> cookie is empty. Additionally the <code>id</code> cookie value will be converted to an integer term:</p>
+<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">CookiesMap</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:match_cookies</span></span>([{<span style="color: #FF6600">id</span>, <span style="color: #FF6600">int</span>}, {<span style="color: #FF6600">lang</span>, <span style="color: #FF6600">nonempty</span>}], <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Note that if two cookies share the same name, then the map value
-will be a list of the two cookie values.</p></div>
-<div class="paragraph"><p>A default value can be provided. The default will be used
-if the <code>lang</code> cookie is not found. It will not be used if
-the cookie is found but has an empty value:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">CookiesMap</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:match_cookies</font></b>([{<font color="#FF6600">id</font>, <font color="#FF6600">int</font>}, {<font color="#FF6600">lang</font>, <font color="#FF6600">nonempty</font>}], <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Note that if two cookies share the same name, then the map value will be a list of the two cookie values.</p>
+<p>A default value can be provided. The default will be used if the <code>lang</code> cookie is not found. It will not be used if the cookie is found but has an empty value:</p>
+<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">lang</span> <span style="color: #990000">:=</span> <span style="color: #009900">Lang</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:match_cookies</span></span>([{<span style="color: #FF6600">lang</span>, [], <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"en-US"</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="paragraph"><p>If no default is provided and the value is missing, an
-exception is thrown.</p></div>
-</div>
-</div>
+<pre><tt>#{<font color="#FF6600">lang</font> <font color="#990000">:=</font> <font color="#009900">Lang</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:match_cookies</font></b>([{<font color="#FF6600">lang</font>, [], <font color="#990000">&lt;&lt;</font><font color="#FF0000">"en-US"</font><font color="#990000">&gt;&gt;</font>}], <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>If no default is provided and the value is missing, an exception is thrown.</p>
+
diff --git a/docs/en/cowboy/2.0/guide/erlang_web/index.html b/docs/en/cowboy/2.0/guide/erlang_web/index.html
index 9d5a0518..128647f7 100644
--- a/docs/en/cowboy/2.0/guide/erlang_web/index.html
+++ b/docs/en/cowboy/2.0/guide/erlang_web/index.html
@@ -62,194 +62,52 @@
<h1 class="lined-header"><span>Erlang and the Web</span></h1>
-<div class="paragraph"><p>Erlang is the ideal platform for writing Web applications.
-Its features are a perfect match for the requirements of
-modern Web applications.</p></div>
-<div class="sect1">
+<p>Erlang is the ideal platform for writing Web applications. Its features are a perfect match for the requirements of modern Web applications.</p>
<h2 id="_the_web_is_concurrent">The Web is concurrent</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>When you access a website there is little concurrency
-involved. A few connections are opened and requests
-are sent through these connections. Then the web page
-is displayed on your screen. Your browser will only
-open up to 4 or 8 connections to the server, depending
-on your settings. This isn&#8217;t much.</p></div>
-<div class="paragraph"><p>But think about it. You are not the only one accessing
-the server at the same time. There can be hundreds, if
-not thousands, if not millions of connections to the
-same server at the same time.</p></div>
-<div class="paragraph"><p>Even today a lot of systems used in production haven&#8217;t
-solved the C10K problem (ten thousand concurrent connections).
-And the ones who did are trying hard to get to the next
-step, C100K, and are pretty far from it.</p></div>
-<div class="paragraph"><p>Erlang meanwhile has no problem handling millions of
-connections. At the time of writing there are application
-servers written in Erlang that can handle more than two
-million connections on a single server in a real production
-application, with spare memory and CPU!</p></div>
-<div class="paragraph"><p>The Web is concurrent, and Erlang is a language designed
-for concurrency, so it is a perfect match.</p></div>
-<div class="paragraph"><p>Of course, various platforms need to scale beyond a few
-million connections. This is where Erlang&#8217;s built-in
-distribution mechanisms come in. If one server isn&#8217;t
-enough, add more! Erlang allows you to use the same code
-for talking to local processes or to processes in other
-parts of your cluster, which means you can scale very
-quickly if the need arises.</p></div>
-<div class="paragraph"><p>The Web has large userbases, and the Erlang platform was
-designed to work in a distributed setting, so it is a
-perfect match.</p></div>
-<div class="paragraph"><p>Or is it? Surely you can find solutions to handle that many
-concurrent connections with your favorite language&#8230; But all
-these solutions will break down in the next few years. Why?
-Firstly because servers don&#8217;t get any more powerful, they
-instead get a lot more cores and memory. This is only useful
-if your application can use them properly, and Erlang is
-light-years away from anything else in that area. Secondly,
-today your computer and your phone are online, tomorrow your
-watch, goggles, bike, car, fridge and tons of other devices
-will also connect to various applications on the Internet.</p></div>
-<div class="paragraph"><p>Only Erlang is prepared to deal with what&#8217;s coming.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>When you access a website there is little concurrency involved. A few connections are opened and requests are sent through these connections. Then the web page is displayed on your screen. Your browser will only open up to 4 or 8 connections to the server, depending on your settings. This isn&apos;t much.</p>
+<p>But think about it. You are not the only one accessing the server at the same time. There can be hundreds, if not thousands, if not millions of connections to the same server at the same time.</p>
+<p>Even today a lot of systems used in production haven&apos;t solved the C10K problem (ten thousand concurrent connections). And the ones who did are trying hard to get to the next step, C100K, and are pretty far from it.</p>
+<p>Erlang meanwhile has no problem handling millions of connections. At the time of writing there are application servers written in Erlang that can handle more than two million connections on a single server in a real production application, with spare memory and CPU!</p>
+<p>The Web is concurrent, and Erlang is a language designed for concurrency, so it is a perfect match.</p>
+<p>Of course, various platforms need to scale beyond a few million connections. This is where Erlang&apos;s built-in distribution mechanisms come in. If one server isn&apos;t enough, add more! Erlang allows you to use the same code for talking to local processes or to processes in other parts of your cluster, which means you can scale very quickly if the need arises.</p>
+<p>The Web has large userbases, and the Erlang platform was designed to work in a distributed setting, so it is a perfect match.</p>
+<p>Or is it? Surely you can find solutions to handle that many concurrent connections with your favorite language... But all these solutions will break down in the next few years. Why? Firstly because servers don&apos;t get any more powerful, they instead get a lot more cores and memory. This is only useful if your application can use them properly, and Erlang is light-years away from anything else in that area. Secondly, today your computer and your phone are online, tomorrow your watch, goggles, bike, car, fridge and tons of other devices will also connect to various applications on the Internet.</p>
+<p>Only Erlang is prepared to deal with what&apos;s coming.</p>
<h2 id="_the_web_is_soft_real_time">The Web is soft real time</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>What does soft real time mean, you ask? It means we want the
-operations done as quickly as possible, and in the case of
-web applications, it means we want the data propagated fast.</p></div>
-<div class="paragraph"><p>In comparison, hard real time has a similar meaning, but also
-has a hard time constraint, for example an operation needs to
-be done in under N milliseconds otherwise the system fails
-entirely.</p></div>
-<div class="paragraph"><p>Users aren&#8217;t that needy yet, they just want to get access
-to their content in a reasonable delay, and they want the
-actions they make to register at most a few seconds after
-they submitted them, otherwise they&#8217;ll start worrying about
-whether it successfully went through.</p></div>
-<div class="paragraph"><p>The Web is soft real time because taking longer to perform an
-operation would be seen as bad quality of service.</p></div>
-<div class="paragraph"><p>Erlang is a soft real time system. It will always run
-processes fairly, a little at a time, switching to another
-process after a while and preventing a single process to
-steal resources from all others. This means that Erlang
-can guarantee stable low latency of operations.</p></div>
-<div class="paragraph"><p>Erlang provides the guarantees that the soft real time Web
-requires.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>What does soft real time mean, you ask? It means we want the operations done as quickly as possible, and in the case of web applications, it means we want the data propagated fast.</p>
+<p>In comparison, hard real time has a similar meaning, but also has a hard time constraint, for example an operation needs to be done in under N milliseconds otherwise the system fails entirely.</p>
+<p>Users aren&apos;t that needy yet, they just want to get access to their content in a reasonable delay, and they want the actions they make to register at most a few seconds after they submitted them, otherwise they&apos;ll start worrying about whether it successfully went through.</p>
+<p>The Web is soft real time because taking longer to perform an operation would be seen as bad quality of service.</p>
+<p>Erlang is a soft real time system. It will always run processes fairly, a little at a time, switching to another process after a while and preventing a single process to steal resources from all others. This means that Erlang can guarantee stable low latency of operations.</p>
+<p>Erlang provides the guarantees that the soft real time Web requires.</p>
<h2 id="_the_web_is_asynchronous">The Web is asynchronous</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Long ago, the Web was synchronous because HTTP was synchronous.
-You fired a request, and then waited for a response. Not anymore.
-It all began when XmlHttpRequest started being used. It allowed
-the client to perform asynchronous calls to the server.</p></div>
-<div class="paragraph"><p>Then Websocket appeared and allowed both the server and the client
-to send data to the other endpoint completely asynchronously. The
-data is contained within frames and no response is necessary.</p></div>
-<div class="paragraph"><p>Erlang processes work the same. They send each other data contained
-within messages and then continue running without needing a response.
-They tend to spend most of their time inactive, waiting for a new
-message, and the Erlang VM happily activate them when one is received.</p></div>
-<div class="paragraph"><p>It is therefore quite easy to imagine Erlang being good at receiving
-Websocket frames, which may come in at unpredictable times, pass the
-data to the responsible processes which are always ready waiting for
-new messages, and perform the operations required by only activating
-the required parts of the system.</p></div>
-<div class="paragraph"><p>The more recent Web technologies, like Websocket of course, but also
-HTTP/2.0, are all fully asynchronous protocols. The concept
-of requests and responses is retained of course, but anything could
-be sent in between, by both the client or the browser, and the
-responses could also be received in a completely different order.</p></div>
-<div class="paragraph"><p>Erlang is by nature asynchronous and really good at it thanks to the
-great engineering that has been done in the VM over the years. It&#8217;s
-only natural that it&#8217;s so good at dealing with the asynchronous Web.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Long ago, the Web was synchronous because HTTP was synchronous. You fired a request, and then waited for a response. Not anymore. It all began when XmlHttpRequest started being used. It allowed the client to perform asynchronous calls to the server.</p>
+<p>Then Websocket appeared and allowed both the server and the client to send data to the other endpoint completely asynchronously. The data is contained within frames and no response is necessary.</p>
+<p>Erlang processes work the same. They send each other data contained within messages and then continue running without needing a response. They tend to spend most of their time inactive, waiting for a new message, and the Erlang VM happily activate them when one is received.</p>
+<p>It is therefore quite easy to imagine Erlang being good at receiving Websocket frames, which may come in at unpredictable times, pass the data to the responsible processes which are always ready waiting for new messages, and perform the operations required by only activating the required parts of the system.</p>
+<p>The more recent Web technologies, like Websocket of course, but also HTTP/2.0, are all fully asynchronous protocols. The concept of requests and responses is retained of course, but anything could be sent in between, by both the client or the browser, and the responses could also be received in a completely different order.</p>
+<p>Erlang is by nature asynchronous and really good at it thanks to the great engineering that has been done in the VM over the years. It&apos;s only natural that it&apos;s so good at dealing with the asynchronous Web.</p>
<h2 id="_the_web_is_omnipresent">The Web is omnipresent</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The Web has taken a very important part of our lives. We&#8217;re
-connected at all times, when we&#8217;re on our phone, using our computer,
-passing time using a tablet while in the bathroom&#8230; And this
-isn&#8217;t going to slow down, every single device at home or on us
-will be connected.</p></div>
-<div class="paragraph"><p>All these devices are always connected. And with the number of
-alternatives to give you access to the content you seek, users
-tend to not stick around when problems arise. Users today want
-their applications to be always available and if it&#8217;s having
-too many issues they just move on.</p></div>
-<div class="paragraph"><p>Despite this, when developers choose a product to use for building
-web applications, their only concern seems to be "Is it fast?",
-and they look around for synthetic benchmarks showing which one
-is the fastest at sending "Hello world" with only a handful
-concurrent connections. Web benchmarks haven&#8217;t been representative
-of reality in a long time, and are drifting further away as
-time goes on.</p></div>
-<div class="paragraph"><p>What developers should really ask themselves is "Can I service
-all my users with no interruption?" and they&#8217;d find that they have
-two choices. They can either hope for the best, or they can use
-Erlang.</p></div>
-<div class="paragraph"><p>Erlang is built for fault tolerance. When writing code in any other
-language, you have to check all the return values and act accordingly
-to avoid any unforeseen issues. If you&#8217;re lucky, you won&#8217;t miss
-anything important. When writing Erlang code, you can just check
-the success condition and ignore all errors. If an error happens,
-the Erlang process crashes and is then restarted by a special
-process called a supervisor.</p></div>
-<div class="paragraph"><p>Erlang developers thus have no need to fear unhandled
-errors, and can focus on handling only the errors that should
-give some feedback to the user and let the system take care of
-the rest. This also has the advantage of allowing them to write
-a lot less code, and let them sleep at night.</p></div>
-<div class="paragraph"><p>Erlang&#8217;s fault tolerance oriented design is the first piece of
-what makes it the best choice for the omnipresent, always available
-Web.</p></div>
-<div class="paragraph"><p>The second piece is Erlang&#8217;s built-in distribution. Distribution
-is a key part of building a fault tolerant system, because it
-allows you to handle bigger failures, like a whole server going
-down, or even a data center entirely.</p></div>
-<div class="paragraph"><p>Fault tolerance and distribution are important today, and will be
-vital in the future of the Web. Erlang is ready.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The Web has taken a very important part of our lives. We&apos;re connected at all times, when we&apos;re on our phone, using our computer, passing time using a tablet while in the bathroom... And this isn&apos;t going to slow down, every single device at home or on us will be connected.</p>
+<p>All these devices are always connected. And with the number of alternatives to give you access to the content you seek, users tend to not stick around when problems arise. Users today want their applications to be always available and if it&apos;s having too many issues they just move on.</p>
+<p>Despite this, when developers choose a product to use for building web applications, their only concern seems to be &quot;Is it fast?&quot;, and they look around for synthetic benchmarks showing which one is the fastest at sending &quot;Hello world&quot; with only a handful concurrent connections. Web benchmarks haven&apos;t been representative of reality in a long time, and are drifting further away as time goes on.</p>
+<p>What developers should really ask themselves is &quot;Can I service all my users with no interruption?&quot; and they&apos;d find that they have two choices. They can either hope for the best, or they can use Erlang.</p>
+<p>Erlang is built for fault tolerance. When writing code in any other language, you have to check all the return values and act accordingly to avoid any unforeseen issues. If you&apos;re lucky, you won&apos;t miss anything important. When writing Erlang code, you can just check the success condition and ignore all errors. If an error happens, the Erlang process crashes and is then restarted by a special process called a supervisor.</p>
+<p>Erlang developers thus have no need to fear unhandled errors, and can focus on handling only the errors that should give some feedback to the user and let the system take care of the rest. This also has the advantage of allowing them to write a lot less code, and let them sleep at night.</p>
+<p>Erlang&apos;s fault tolerance oriented design is the first piece of what makes it the best choice for the omnipresent, always available Web.</p>
+<p>The second piece is Erlang&apos;s built-in distribution. Distribution is a key part of building a fault tolerant system, because it allows you to handle bigger failures, like a whole server going down, or even a data center entirely.</p>
+<p>Fault tolerance and distribution are important today, and will be vital in the future of the Web. Erlang is ready.</p>
<h2 id="_learn_erlang">Learn Erlang</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>If you are new to Erlang, you may want to grab a book or
-two to get started. Those are my recommendations as the
-author of Cowboy.</p></div>
-<div class="sect3">
+<p>If you are new to Erlang, you may want to grab a book or two to get started. Those are my recommendations as the author of Cowboy.</p>
<h4 id="_the_erlanger_playbook">The Erlanger Playbook</h4>
-<div class="paragraph"><p>The Erlanger Playbook is an ebook I am currently writing,
-which covers a number of different topics from code to
-documentation to testing Erlang applications. It also has
-an Erlang section where it covers directly the building
-blocks and patterns, rather than details like the syntax.</p></div>
-<div class="paragraph"><p>You can most likely read it as a complete beginner, but
-you will need a companion book to make the most of it.
-Buy it from the <a href="https://ninenines.eu">Nine Nines website</a>.</p></div>
-</div>
-<div class="sect3">
+<p>The Erlanger Playbook is an ebook I am currently writing, which covers a number of different topics from code to documentation to testing Erlang applications. It also has an Erlang section where it covers directly the building blocks and patterns, rather than details like the syntax.</p>
+<p>You can most likely read it as a complete beginner, but you will need a companion book to make the most of it. Buy it from the <a href="https://ninenines.eu">Nine Nines website</a>.</p>
<h4 id="_programming_erlang">Programming Erlang</h4>
-<div class="paragraph"><p>This book is from one of the creator of Erlang, Joe
-Armstrong. It provides a very good explanation of what
-Erlang is and why it is so. It serves as a very good
-introduction to the language and platform.</p></div>
-<div class="paragraph"><p>The book is <a href="http://pragprog.com/book/jaerlang2/programming-erlang">Programming Erlang</a>,
-and it also features a chapter on Cowboy.</p></div>
-</div>
-<div class="sect3">
+<p>This book is from one of the creator of Erlang, Joe Armstrong. It provides a very good explanation of what Erlang is and why it is so. It serves as a very good introduction to the language and platform.</p>
+<p>The book is <a href="http://pragprog.com/book/jaerlang2/programming-erlang">Programming Erlang</a>, and it also features a chapter on Cowboy.</p>
<h4 id="_learn_you_some_erlang_for_great_good">Learn You Some Erlang for Great Good!</h4>
-<div class="paragraph"><p><a href="http://learnyousomeerlang.com">LYSE</a> is a much more complete
-book covering many aspects of Erlang, while also providing
-stories and humor. Be warned: it&#8217;s pretty verbose. It comes
-with a free online version and a more refined paper and
-ebook version.</p></div>
-</div>
-</div>
-</div>
+<p><a href="http://learnyousomeerlang.com">LYSE</a> is a much more complete book covering many aspects of Erlang, while also providing stories and humor. Be warned: it&apos;s pretty verbose. It comes with a free online version and a more refined paper and ebook version.</p>
+
diff --git a/docs/en/cowboy/2.0/guide/flow_diagram/index.html b/docs/en/cowboy/2.0/guide/flow_diagram/index.html
index 65fe9305..d518183a 100644
--- a/docs/en/cowboy/2.0/guide/flow_diagram/index.html
+++ b/docs/en/cowboy/2.0/guide/flow_diagram/index.html
@@ -62,113 +62,30 @@
<h1 class="lined-header"><span>Flow diagram</span></h1>
-<div class="paragraph"><p>Cowboy is a lightweight HTTP server with support for HTTP/1.1,
-HTTP/2 and Websocket.</p></div>
-<div class="paragraph"><p>It is built on top of Ranch. Please see the Ranch guide for more
-information about how the network connections are handled.</p></div>
-<div class="sect1">
+<p>Cowboy is a lightweight HTTP server with support for HTTP/1.1, HTTP/2 and Websocket.</p>
+<p>It is built on top of Ranch. Please see the Ranch guide for more information about how the network connections are handled.</p>
<h2 id="_overview">Overview</h2>
-<div class="sectionbody">
-<div class="imageblock">
-<div class="content">
-<img src="../http_req_resp.png" alt="HTTP request/response flowchart" />
-</div>
-</div>
-<div class="paragraph"><p>As you can see on the diagram, the client
-begins by connecting to the server. This step is handled
-by a Ranch acceptor, which is a process dedicated to
-accepting new connections.</p></div>
-<div class="paragraph"><p>After Ranch accepts a new connection, whether it is an
-HTTP/1.1 or HTTP/2 connection, Cowboy starts receiving
-requests and handling them.</p></div>
-<div class="paragraph"><p>In HTTP/1.1 all requests come sequentially. In HTTP/2
-the requests may arrive and be processed concurrently.</p></div>
-<div class="paragraph"><p>When a request comes in, Cowboy creates a stream, which
-is a set of request/response and all the events associated
-with them. The protocol code in Cowboy defers the handling
-of these streams to stream handler modules. When you
-configure Cowboy you may define one or more module that
-will receive all events associated with a stream, including
-the request, response, bodies, Erlang messages and more.</p></div>
-<div class="paragraph"><p>By default Cowboy comes configured with a stream handler
-called <code>cowboy_stream_h</code>. This stream handler will create
-a new process for every request coming in, and then
-communicate with this process to read the body or send
-a response back. The request process executes middlewares
-which, by default, including the router and then the
-execution of handlers. Like stream handlers, middlewares
-may also be customized.</p></div>
-<div class="paragraph"><p>A response may be sent at almost any point in this
-diagram. If the response must be sent before the stream
-is initialized (because an error occurred early, for
-example) then stream handlers receive a special event
-indicating this error.</p></div>
-</div>
-</div>
-<div class="sect1">
+<img src="../http_req_resp.png" alt="HTTP request/response flowchart"/><p>As you can see on the diagram, the client begins by connecting to the server. This step is handled by a Ranch acceptor, which is a process dedicated to accepting new connections.</p>
+<p>After Ranch accepts a new connection, whether it is an HTTP/1.1 or HTTP/2 connection, Cowboy starts receiving requests and handling them.</p>
+<p>In HTTP/1.1 all requests come sequentially. In HTTP/2 the requests may arrive and be processed concurrently.</p>
+<p>When a request comes in, Cowboy creates a stream, which is a set of request/response and all the events associated with them. The protocol code in Cowboy defers the handling of these streams to stream handler modules. When you configure Cowboy you may define one or more module that will receive all events associated with a stream, including the request, response, bodies, Erlang messages and more.</p>
+<p>By default Cowboy comes configured with a stream handler called <code>cowboy_stream_h</code>. This stream handler will create a new process for every request coming in, and then communicate with this process to read the body or send a response back. The request process executes middlewares which, by default, including the router and then the execution of handlers. Like stream handlers, middlewares may also be customized.</p>
+<p>A response may be sent at almost any point in this diagram. If the response must be sent before the stream is initialized (because an error occurred early, for example) then stream handlers receive a special event indicating this error.</p>
<h2 id="_protocol_specific_headers">Protocol-specific headers</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy takes care of protocol-specific headers and prevents
-you from sending them manually. For HTTP/1.1 this includes
-the <code>transfer-encoding</code> and <code>connection</code> headers. For HTTP/2
-this includes the colon headers like <code>:status</code>.</p></div>
-<div class="paragraph"><p>Cowboy will also remove protocol-specific headers from
-requests before passing them to stream handlers. Cowboy
-tries to hide the implementation details of all protocols
-as well as possible.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Cowboy takes care of protocol-specific headers and prevents you from sending them manually. For HTTP/1.1 this includes the <code>transfer-encoding</code> and <code>connection</code> headers. For HTTP/2 this includes the colon headers like <code>:status</code>.</p>
+<p>Cowboy will also remove protocol-specific headers from requests before passing them to stream handlers. Cowboy tries to hide the implementation details of all protocols as well as possible.</p>
<h2 id="_number_of_processes_per_connection">Number of processes per connection</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>By default, Cowboy will use one process per connection,
-plus one process per set of request/response (called a
-stream, internally).</p></div>
-<div class="paragraph"><p>The reason it creates a new process for every request is due
-to the requirements of HTTP/2 where requests are executed
-concurrently and independently from the connection. The
-frames from the different requests end up interleaved on
-the single TCP connection.</p></div>
-<div class="paragraph"><p>The request processes are never reused. There is therefore
-no need to perform any cleanup after the response has been
-sent. The process will terminate and Erlang/OTP will reclaim
-all memory at once.</p></div>
-<div class="paragraph"><p>Cowboy ultimately does not require more than one process
-per connection. It is possible to interact with the connection
-directly from a stream handler, a low level interface to Cowboy.
-They are executed from within the connection process, and can
-handle the incoming requests and send responses. This is however
-not recommended in normal circumstances, as a stream handler
-taking too long to execute could have a negative impact on
-concurrent requests or the state of the connection itself.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>By default, Cowboy will use one process per connection, plus one process per set of request/response (called a stream, internally).</p>
+<p>The reason it creates a new process for every request is due to the requirements of HTTP/2 where requests are executed concurrently and independently from the connection. The frames from the different requests end up interleaved on the single TCP connection.</p>
+<p>The request processes are never reused. There is therefore no need to perform any cleanup after the response has been sent. The process will terminate and Erlang/OTP will reclaim all memory at once.</p>
+<p>Cowboy ultimately does not require more than one process per connection. It is possible to interact with the connection directly from a stream handler, a low level interface to Cowboy. They are executed from within the connection process, and can handle the incoming requests and send responses. This is however not recommended in normal circumstances, as a stream handler taking too long to execute could have a negative impact on concurrent requests or the state of the connection itself.</p>
<h2 id="_date_header">Date header</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Because querying for the current date and time can be expensive,
-Cowboy generates one <em>Date</em> header value every second, shares it
-to all other processes, which then simply copy it in the response.
-This allows compliance with HTTP/1.1 with no actual performance loss.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Because querying for the current date and time can be expensive, Cowboy generates one <em>Date</em> header value every second, shares it to all other processes, which then simply copy it in the response. This allows compliance with HTTP/1.1 with no actual performance loss.</p>
<h2 id="_binaries">Binaries</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy makes extensive use of binaries.</p></div>
-<div class="paragraph"><p>Binaries are more efficient than lists for representing
-strings because they take less memory space. Processing
-performance can vary depending on the operation. Binaries
-are known for generally getting a great boost if the code
-is compiled natively. Please see the HiPE documentation
-for more details.</p></div>
-<div class="paragraph"><p>Binaries may end up being shared between processes. This
-can lead to some large memory usage when one process keeps
-the binary data around forever without freeing it. If you
-see some weird memory usage in your application, this might
-be the cause.</p></div>
-</div>
-</div>
+<p>Cowboy makes extensive use of binaries.</p>
+<p>Binaries are more efficient than lists for representing strings because they take less memory space. Processing performance can vary depending on the operation. Binaries are known for generally getting a great boost if the code is compiled natively. Please see the HiPE documentation for more details.</p>
+<p>Binaries may end up being shared between processes. This can lead to some large memory usage when one process keeps the binary data around forever without freeing it. If you see some weird memory usage in your application, this might be the cause.</p>
+
diff --git a/docs/en/cowboy/2.0/guide/getting_started/index.html b/docs/en/cowboy/2.0/guide/getting_started/index.html
index 4b6c7c33..6c156e4e 100644
--- a/docs/en/cowboy/2.0/guide/getting_started/index.html
+++ b/docs/en/cowboy/2.0/guide/getting_started/index.html
@@ -62,161 +62,104 @@
<h1 class="lined-header"><span>Getting started</span></h1>
-<div class="paragraph"><p>Erlang is more than a language, it is also an operating system
-for your applications. Erlang developers rarely write standalone
-modules, they write libraries or applications, and then bundle
-those into what is called a release. A release contains the
-Erlang VM plus all applications required to run the node, so
-it can be pushed to production directly.</p></div>
-<div class="paragraph"><p>This chapter walks you through all the steps of setting up
-Cowboy, writing your first application and generating your first
-release. At the end of this chapter you should know everything
-you need to push your first Cowboy application to production.</p></div>
-<div class="sect1">
+<p>Erlang is more than a language, it is also an operating system for your applications. Erlang developers rarely write standalone modules, they write libraries or applications, and then bundle those into what is called a release. A release contains the Erlang VM plus all applications required to run the node, so it can be pushed to production directly.</p>
+<p>This chapter walks you through all the steps of setting up Cowboy, writing your first application and generating your first release. At the end of this chapter you should know everything you need to push your first Cowboy application to production.</p>
<h2 id="_prerequisites">Prerequisites</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>We are going to use the <a href="https://github.com/ninenines/erlang.mk">Erlang.mk</a>
-build system. If you are using Windows, please check the
-<a href="http://erlang.mk/guide/installation.html">Installation instructions</a>
-to get your environment setup before you continue.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>We are going to use the <a href="https://github.com/ninenines/erlang.mk">Erlang.mk</a> build system. If you are using Windows, please check the <a href="http://erlang.mk/guide/installation.html">Installation instructions</a> to get your environment setup before you continue.</p>
<h2 id="_bootstrap">Bootstrap</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>First, let&#8217;s create the directory for our application.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>First, let&apos;s create the directory for our application.</p>
+<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 hello_erlang
-$ cd hello_erlang</tt></pre></div></div>
-<div class="paragraph"><p>Then we need to download Erlang.mk. Either use the following
-command or download it manually.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+$ cd hello_erlang</tt></pre>
+</div></div>
+<p>Then we need to download Erlang.mk. Either use the following command or download it manually.</p>
+<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>$ wget 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>We can now bootstrap our application. Since we are going to generate
-a release, we will also bootstrap it at the same time.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>$ wget https<font color="#990000">:</font>//erlang<font color="#990000">.</font>mk/erlang<font color="#990000">.</font>mk</tt></pre>
+</div></div>
+<p>We can now bootstrap our application. Since we are going to generate a release, we will also bootstrap it at the same time.</p>
+<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 -f erlang<span style="color: #990000">.</span>mk bootstrap bootstrap-rel</tt></pre></div></div>
-<div class="paragraph"><p>This creates a Makefile, a base application, and the release files
-necessary for creating the release. We can already build and start
-this release.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>$ make -f erlang<font color="#990000">.</font>mk bootstrap bootstrap-rel</tt></pre>
+</div></div>
+<p>This creates a Makefile, a base application, and the release files necessary for creating the release. We can already build and start this release.</p>
+<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 run
-<span style="color: #990000">...</span>
-<span style="color: #990000">(</span>hello_erlang@<span style="color: #993399">127.0</span><span style="color: #990000">.</span><span style="color: #993399">0.1</span><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>Entering the command <code>i().</code> will show the running processes, including
-one called <code>hello_erlang_sup</code>. This is the supervisor for our
-application.</p></div>
-<div class="paragraph"><p>The release currently does nothing. In the rest of this chapter we
-will add Cowboy as a dependency and write a simple "Hello world!"
-handler.</p></div>
-</div>
-</div>
-<div class="sect1">
+<font color="#990000">...</font>
+<font color="#990000">(</font>hello_erlang@<font color="#993399">127.0</font><font color="#990000">.</font><font color="#993399">0.1</font><font color="#990000">)</font><font color="#993399">1</font><font color="#990000">&gt;</font></tt></pre>
+</div></div>
+<p>Entering the command <code>i().</code> will show the running processes, including one called <code>hello_erlang_sup</code>. This is the supervisor for our application.</p>
+<p>The release currently does nothing. In the rest of this chapter we will add Cowboy as a dependency and write a simple &quot;Hello world!&quot; handler.</p>
<h2 id="_cowboy_setup">Cowboy setup</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>We will modify the <em>Makefile</em> to tell the build system it needs to
-fetch and compile Cowboy:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>We will modify the <em>Makefile</em> to tell the build system it needs to fetch and compile Cowboy:</p>
+<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">PROJECT =</span> hello_erlang
+<pre><tt><font color="#009900">PROJECT =</font> hello_erlang
-<span style="color: #009900">DEPS =</span> cowboy
-<span style="color: #009900">dep_cowboy_commit =</span> master
+<font color="#009900">DEPS =</font> cowboy
+<font color="#009900">dep_cowboy_commit =</font> master
-<span style="color: #009900">DEP_PLUGINS =</span> cowboy
+<font color="#009900">DEP_PLUGINS =</font> cowboy
-include erlang.mk</tt></pre></div></div>
-<div class="paragraph"><p>We also tell the build system to load the plugins Cowboy provides.
-These include predefined templates that we will use soon.</p></div>
-<div class="paragraph"><p>If you do <code>make run</code> now, Cowboy will be included in the release
-and started automatically. This is not enough however, as Cowboy
-doesn&#8217;t do anything by default. We still need to tell Cowboy to
-listen for connections.</p></div>
-</div>
-</div>
-<div class="sect1">
+include erlang.mk</tt></pre>
+</div></div>
+<p>We also tell the build system to load the plugins Cowboy provides. These include predefined templates that we will use soon.</p>
+<p>If you do <code>make run</code> now, Cowboy will be included in the release and started automatically. This is not enough however, as Cowboy doesn&apos;t do anything by default. We still need to tell Cowboy to listen for connections.</p>
<h2 id="_listening_for_connections">Listening for connections</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>First we define the routes that Cowboy will use to map requests
-to handler modules, and then we start the listener. This is best
-done at application startup.</p></div>
-<div class="paragraph"><p>Open the <em>src/hello_erlang_app.erl</em> file and add the necessary
-code to the <code>start/2</code> function to make it look like this:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>First we define the routes that Cowboy will use to map requests to handler modules, and then we start the listener. This is best done at application startup.</p>
+<p>Open the <em>src/hello_erlang_app.erl</em> file and add the necessary code to the <code>start/2</code> function to make it look like this:</p>
+<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">start</span></span>(<span style="color: #009900">_Type</span>, <span style="color: #009900">_Args</span>) <span style="color: #990000">-&gt;</span>
- <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: #FF6600">'_'</span>, [{<span style="color: #FF0000">"/"</span>, <span style="color: #FF6600">hello_handler</span>, []}]}
+<pre><tt><b><font color="#000000">start</font></b>(<font color="#009900">_Type</font>, <font color="#009900">_Args</font>) <font color="#990000">-&gt;</font>
+ <font color="#009900">Dispatch</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_router:compile</font></b>([
+ {<font color="#FF6600">'_'</font>, [{<font color="#FF0000">"/"</font>, <font color="#FF6600">hello_handler</font>, []}]}
]),
- {<span style="color: #FF6600">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:start_clear</span></span>(<span style="color: #FF6600">my_http_listener</span>,
- [{<span style="color: #FF6600">port</span>, <span style="color: #993399">8080</span>}],
- #{<span style="color: #0000FF">env</span> <span style="color: #990000">=&gt;</span> #{<span style="color: #0000FF">dispatch</span> <span style="color: #990000">=&gt;</span> <span style="color: #009900">Dispatch</span>}}
+ {<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy:start_clear</font></b>(<font color="#FF6600">my_http_listener</font>,
+ [{<font color="#FF6600">port</font>, <font color="#993399">8080</font>}],
+ #{<font color="#0000FF">env</font> <font color="#990000">=&gt;</font> #{<font color="#0000FF">dispatch</font> <font color="#990000">=&gt;</font> <font color="#009900">Dispatch</font>}}
),
- <span style="font-weight: bold"><span style="color: #000000">hello_erlang_sup:start_link</span></span>()<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Routes are explained in details in the <a href="../routing">Routing</a>
-chapter. For this tutorial we map the path <code>/</code> to the handler
-module <code>hello_handler</code>. This module doesn&#8217;t exist yet.</p></div>
-<div class="paragraph"><p>Build and start the release, then open <a href="http://localhost:8080">http://localhost:8080</a>
-in your browser. You will get a 500 error because the module is missing.
-Any other URL, like <a href="http://localhost:8080/test">http://localhost:8080/test</a>, will result in a
-404 error.</p></div>
-</div>
-</div>
-<div class="sect1">
+ <b><font color="#000000">hello_erlang_sup:start_link</font></b>()<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Routes are explained in details in the <a href="../routing">Routing</a> chapter. For this tutorial we map the path <code>/</code> to the handler module <code>hello_handler</code>. This module doesn&apos;t exist yet.</p>
+<p>Build and start the release, then open <a href="http://localhost:8080">http://localhost:8080</a> in your browser. You will get a 500 error because the module is missing. Any other URL, like <a href="http://localhost:8080/test">http://localhost:8080/test</a>, will result in a 404 error.</p>
<h2 id="_handling_requests">Handling requests</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy features different kinds of handlers, including REST
-and Websocket handlers. For this tutorial we will use a plain
-HTTP handler.</p></div>
-<div class="paragraph"><p>Generate a handler from a template:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Cowboy features different kinds of handlers, including REST and Websocket handlers. For this tutorial we will use a plain HTTP handler.</p>
+<p>Generate a handler from a template:</p>
+<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 new <span style="color: #009900">t</span><span style="color: #990000">=</span>cowboy<span style="color: #990000">.</span>http <span style="color: #009900">n</span><span style="color: #990000">=</span>hello_handler</tt></pre></div></div>
-<div class="paragraph"><p>Then, open the <em>src/hello_handler.erl</em> file and modify
-the <code>init/2</code> function like this to send a reply.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>$ make new <font color="#009900">t</font><font color="#990000">=</font>cowboy<font color="#990000">.</font>http <font color="#009900">n</font><font color="#990000">=</font>hello_handler</tt></pre>
+</div></div>
+<p>Then, open the <em>src/hello_handler.erl</em> file and modify the <code>init/2</code> function like this to send a reply.</p>
+<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">init</span></span>(<span style="color: #009900">Req0</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">200</span>,
- #{<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/plain"</span><span style="color: #990000">&gt;&gt;</span>},
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Hello Erlang!"</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="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>What the above code does is send a 200 OK reply, with the
-Content-type header set to <code>text/plain</code> and the response
-body set to <code>Hello Erlang!</code>.</p></div>
-<div class="paragraph"><p>If you run the release and open <a href="http://localhost:8080">http://localhost:8080</a>
-in your browser, you should get a nice <code>Hello Erlang!</code> displayed!</p></div>
-</div>
-</div>
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req0</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ <font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:reply</font></b>(<font color="#993399">200</font>,
+ #{<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/plain"</font><font color="#990000">&gt;&gt;</font>},
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"Hello Erlang!"</font><font color="#990000">&gt;&gt;</font>,
+ <font color="#009900">Req0</font>),
+ {<font color="#FF6600">ok</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>What the above code does is send a 200 OK reply, with the Content-type header set to <code>text/plain</code> and the response body set to <code>Hello Erlang!</code>.</p>
+<p>If you run the release and open <a href="http://localhost:8080">http://localhost:8080</a> in your browser, you should get a nice <code>Hello Erlang!</code> displayed!</p>
+
diff --git a/docs/en/cowboy/2.0/guide/handlers/index.html b/docs/en/cowboy/2.0/guide/handlers/index.html
index 28a6c5ec..dccd2faf 100644
--- a/docs/en/cowboy/2.0/guide/handlers/index.html
+++ b/docs/en/cowboy/2.0/guide/handlers/index.html
@@ -62,91 +62,57 @@
<h1 class="lined-header"><span>Handlers</span></h1>
-<div class="paragraph"><p>Handlers are Erlang modules that handle HTTP requests.</p></div>
-<div class="sect1">
+<p>Handlers are Erlang modules that handle HTTP requests.</p>
<h2 id="_plain_http_handlers">Plain HTTP handlers</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The most basic handler in Cowboy implements the mandatory
-<code>init/2</code> callback, manipulates the request, optionally
-sends a response and then returns.</p></div>
-<div class="paragraph"><p>This callback receives the <a href="../req">Req object</a> and the initial
-state defined in the <a href="../routing">router configuration</a>.</p></div>
-<div class="paragraph"><p>A handler that does nothing would look like this:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The most basic handler in Cowboy implements the mandatory <code>init/2</code> callback, manipulates the request, optionally sends a response and then returns.</p>
+<p>This callback receives the <a href="../req">Req object</a> and the initial state defined in the <a href="../routing">router configuration</a>.</p>
+<p>A handler that does nothing would look like this:</p>
+<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">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">ok</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Despite sending no reply, a <code>204 No Content</code> response will be
-sent to the client, as Cowboy makes sure that a response is
-sent for every request.</p></div>
-<div class="paragraph"><p>We need to use the Req object to reply.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Despite sending no reply, a <code>204 No Content</code> response will be sent to the client, as Cowboy makes sure that a response is sent for every request.</p>
+<p>We need to use the Req object to reply.</p>
+<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">init</span></span>(<span style="color: #009900">Req0</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">200</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/plain"</span><span style="color: #990000">&gt;&gt;</span>
- }, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Hello World!"</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="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Cowboy will immediately send a response when <code>cowboy:reply/4</code>
-is called.</p></div>
-<div class="paragraph"><p>We then return a 3-tuple. <code>ok</code> means that the handler ran
-successfully. We also give the modified Req back to Cowboy.</p></div>
-<div class="paragraph"><p>The last value of the tuple is a state that will be used
-in every subsequent callbacks to this handler. Plain HTTP
-handlers only have one additional callback, the optional
-and rarely used <code>terminate/3</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req0</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ <font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:reply</font></b>(<font color="#993399">200</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/plain"</font><font color="#990000">&gt;&gt;</font>
+ }, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"Hello World!"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req0</font>),
+ {<font color="#FF6600">ok</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Cowboy will immediately send a response when <code>cowboy:reply/4</code> is called.</p>
+<p>We then return a 3-tuple. <code>ok</code> means that the handler ran successfully. We also give the modified Req back to Cowboy.</p>
+<p>The last value of the tuple is a state that will be used in every subsequent callbacks to this handler. Plain HTTP handlers only have one additional callback, the optional and rarely used <code>terminate/3</code>.</p>
<h2 id="_other_handlers">Other handlers</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <code>init/2</code> callback can also be used to inform Cowboy
-that this is a different kind of handler and that Cowboy
-should switch to it. To do this you simply need to return
-the module name of the handler type you want to switch to.</p></div>
-<div class="paragraph"><p>Cowboy comes with three handler types you can switch to:
-<a href="../rest_handlers">cowboy_rest</a>, <a href="#ws_handlers">cowboy_websocket</a>
-and <a href="../loop_handlers">cowboy_loop</a>. In addition to those you
-can define your own handler types.</p></div>
-<div class="paragraph"><p>Switching is simple. Instead of returning <code>ok</code>, you simply
-return the name of the handler type you want to use. The
-following snippet switches to a Websocket handler:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The <code>init/2</code> callback can also be used to inform Cowboy that this is a different kind of handler and that Cowboy should switch to it. To do this you simply need to return the module name of the handler type you want to switch to.</p>
+<p>Cowboy comes with three handler types you can switch to: <a href="../rest_handlers">cowboy_rest</a>, <a href="../ws_handlers">cowboy_websocket</a> and <a href="../loop_handlers">cowboy_loop</a>. In addition to those you can define your own handler types.</p>
+<p>Switching is simple. Instead of returning <code>ok</code>, you simply return the name of the handler type you want to use. The following snippet switches to a Websocket handler:</p>
+<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">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_websocket</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">
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">cowboy_websocket</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_cleaning_up">Cleaning up</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>All handler types provide the optional <code>terminate/3</code> callback.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>All handler types provide the optional <code>terminate/3</code> callback.</p>
+<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">terminate</span></span>(<span style="color: #009900">_Reason</span>, <span style="color: #009900">_Req</span>, <span style="color: #009900">_State</span>) <span style="color: #990000">-&gt;</span>
- <span style="color: #FF6600">ok</span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>This callback is strictly reserved for any required cleanup.
-You cannot send a response from this function. There is no
-other return value.</p></div>
-<div class="paragraph"><p>This callback is optional because it is rarely necessary.
-Cleanup should be done in separate processes directly (by
-monitoring the handler process to detect when it exits).</p></div>
-<div class="paragraph"><p>Cowboy does not reuse processes for different requests. The
-process will terminate soon after this call returns.</p></div>
-</div>
-</div>
+<pre><tt><b><font color="#000000">terminate</font></b>(<font color="#009900">_Reason</font>, <font color="#009900">_Req</font>, <font color="#009900">_State</font>) <font color="#990000">-&gt;</font>
+ <font color="#FF6600">ok</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>This callback is strictly reserved for any required cleanup. You cannot send a response from this function. There is no other return value.</p>
+<p>This callback is optional because it is rarely necessary. Cleanup should be done in separate processes directly (by monitoring the handler process to detect when it exits).</p>
+<p>Cowboy does not reuse processes for different requests. The process will terminate soon after this call returns.</p>
+
diff --git a/docs/en/cowboy/2.0/guide/index.html b/docs/en/cowboy/2.0/guide/index.html
index 7bbe1815..2fe39e6b 100644
--- a/docs/en/cowboy/2.0/guide/index.html
+++ b/docs/en/cowboy/2.0/guide/index.html
@@ -62,199 +62,79 @@
<h1 class="lined-header"><span>Cowboy User Guide</span></h1>
-<div class="sect1">
+<!-- REST: where should i handle bindings? init, probably. qs? in media type functions-->
+<!-- REST: explain how a module per media type is good; module may be shared between client/server-->
<h2 id="_rationale">Rationale</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="modern_web/">The modern Web</a>
-</p>
+<ul><li><a href="modern_web/">The modern Web</a>
</li>
-<li>
-<p>
-<a href="erlang_web/">Erlang and the Web</a>
-</p>
+<li><a href="erlang_web/">Erlang and the Web</a>
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_introduction">Introduction</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="introduction/">Introduction</a>
-</p>
+<ul><li><a href="introduction/">Introduction</a>
</li>
-<li>
-<p>
-<a href="getting_started/">Getting started</a>
-</p>
+<li><a href="getting_started/">Getting started</a>
</li>
-<li>
-<p>
-<a href="flow_diagram/">Flow diagram</a>
-</p>
+<li><a href="flow_diagram/">Flow diagram</a>
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_configuration">Configuration</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="listeners/">Listeners</a>
-</p>
+<ul><li><a href="listeners/">Listeners</a>
</li>
-<li>
-<p>
-<a href="routing/">Routing</a>
-</p>
+<li><a href="routing/">Routing</a>
</li>
-<li>
-<p>
-<a href="constraints/">Constraints</a>
-</p>
+<li><a href="constraints/">Constraints</a>
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_handlers">Handlers</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="handlers/">Handlers</a>
-</p>
+<ul><li><a href="handlers/">Handlers</a>
</li>
-<li>
-<p>
-<a href="loop_handlers/">Loop handlers</a>
-</p>
+<li><a href="loop_handlers/">Loop handlers</a>
</li>
-<li>
-<p>
-<a href="static_files/">Static files</a>
-</p>
+<li><a href="static_files/">Static files</a>
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_request_and_response">Request and response</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="req/">Request details</a>
-</p>
+<ul><li><a href="req/">Request details</a>
</li>
-<li>
-<p>
-<a href="req_body/">Reading the request body</a>
-</p>
+<li><a href="req_body/">Reading the request body</a>
</li>
-<li>
-<p>
-<a href="resp/">Sending a response</a>
-</p>
+<li><a href="resp/">Sending a response</a>
</li>
-<li>
-<p>
-<a href="cookies/">Using cookies</a>
-</p>
+<li><a href="cookies/">Using cookies</a>
</li>
-<li>
-<p>
-<a href="multipart/">Multipart</a>
-</p>
+<li><a href="multipart/">Multipart</a>
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_rest">REST</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="rest_principles/">REST principles</a>
-</p>
+<ul><li><a href="rest_principles/">REST principles</a>
</li>
-<li>
-<p>
-<a href="rest_handlers/">Handling REST requests</a>
-</p>
+<li><a href="rest_handlers/">Handling REST requests</a>
</li>
-<li>
-<p>
-<a href="rest_flowcharts/">REST flowcharts</a>
-</p>
+<li><a href="rest_flowcharts/">REST flowcharts</a>
</li>
-<li>
-<p>
-<a href="resource_design/">Designing a resource handler</a>
-</p>
+<li><a href="resource_design/">Designing a resource handler</a>
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_websocket">Websocket</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="ws_protocol/">The Websocket protocol</a>
-</p>
+<ul><li><a href="ws_protocol/">The Websocket protocol</a>
</li>
-<li>
-<p>
-<a href="ws_handlers/">Websocket handlers</a>
-</p>
+<li><a href="ws_handlers/">Websocket handlers</a>
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_advanced">Advanced</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="streams/">Streams</a>
-</p>
+<ul><li><a href="streams/">Streams</a>
</li>
-<li>
-<p>
-<a href="middlewares/">Middlewares</a>
-</p>
+<li><a href="middlewares/">Middlewares</a>
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_additional_information">Additional information</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="migrating_from_1.0/">Migrating from Cowboy 1.0 to 2.0</a>
-</p>
+<ul><li><a href="migrating_from_1.0/">Migrating from Cowboy 1.0 to 2.0</a>
</li>
-<li>
-<p>
-<a href="specs/">HTTP and other specifications</a>
-</p>
+<li><a href="specs/">HTTP and other specifications</a>
</li>
-</ul></div>
-</div>
-</div>
+</ul>
+
diff --git a/docs/en/cowboy/2.0/guide/introduction/index.html b/docs/en/cowboy/2.0/guide/introduction/index.html
index 0b8a47e4..6c0d681e 100644
--- a/docs/en/cowboy/2.0/guide/introduction/index.html
+++ b/docs/en/cowboy/2.0/guide/introduction/index.html
@@ -62,79 +62,40 @@
<h1 class="lined-header"><span>Introduction</span></h1>
-<div class="paragraph"><p>Cowboy is a small, fast and modern HTTP server for Erlang/OTP.</p></div>
-<div class="paragraph"><p>Cowboy aims to provide a complete <a href="../modern_web">modern Web stack</a>.
-This includes HTTP/1.1, HTTP/2, Websocket, Server-Sent Events and
-Webmachine-based REST.</p></div>
-<div class="paragraph"><p>Cowboy comes with functions for introspection and tracing, enabling
-developers to know precisely what is happening at any time. Its modular
-design also easily enable developers to add instrumentation.</p></div>
-<div class="paragraph"><p>Cowboy is a high quality project. It has a small code base, is very
-efficient (both in latency and memory use) and can easily be embedded
-in another application.</p></div>
-<div class="paragraph"><p>Cowboy is clean Erlang code. It includes hundreds of tests and its code
-is fully compliant with the Dialyzer. It is also well documented and
-features a Function Reference, a User Guide and numerous Tutorials.</p></div>
-<div class="sect1">
+<p>Cowboy is a small, fast and modern HTTP server for Erlang/OTP.</p>
+<p>Cowboy aims to provide a complete <a href="../modern_web">modern Web stack</a>. This includes HTTP/1.1, HTTP/2, Websocket, Server-Sent Events and Webmachine-based REST.</p>
+<p>Cowboy comes with functions for introspection and tracing, enabling developers to know precisely what is happening at any time. Its modular design also easily enable developers to add instrumentation.</p>
+<p>Cowboy is a high quality project. It has a small code base, is very efficient (both in latency and memory use) and can easily be embedded in another application.</p>
+<p>Cowboy is clean Erlang code. It includes hundreds of tests and its code is fully compliant with the Dialyzer. It is also well documented and features a Function Reference, a User Guide and numerous Tutorials.</p>
<h2 id="_prerequisites">Prerequisites</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Beginner Erlang knowledge is recommended for reading this guide.</p></div>
-<div class="paragraph"><p>Knowledge of the HTTP protocol is recommended but not required, as it
-will be detailed throughout the guide.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Beginner Erlang knowledge is recommended for reading this guide.</p>
+<p>Knowledge of the HTTP protocol is recommended but not required, as it will be detailed throughout the guide.</p>
<h2 id="_supported_platforms">Supported platforms</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy is tested and supported on Linux, FreeBSD, Windows and OSX.</p></div>
-<div class="paragraph"><p>Cowboy has been reported to work on other platforms, but we make no
-guarantee that the experience will be safe and smooth. You are advised
-to perform the necessary testing and security audits prior to deploying
-on other platforms.</p></div>
-<div class="paragraph"><p>Cowboy is developed for Erlang/OTP 19.0 and newer.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Cowboy is tested and supported on Linux, FreeBSD, Windows and OSX.</p>
+<p>Cowboy has been reported to work on other platforms, but we make no guarantee that the experience will be safe and smooth. You are advised to perform the necessary testing and security audits prior to deploying on other platforms.</p>
+<p>Cowboy is developed for Erlang/OTP 19.0 and newer.</p>
<h2 id="_license">License</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy uses the ISC License.</p></div>
-<div class="listingblock">
-<div class="content">
-<pre><code>Copyright (c) 2011-2017, Loïc Hoguin &lt;[email protected]&gt;
+<p>Cowboy uses the ISC License.</p>
+<div class="listingblock"><div class="content"><pre>Copyright (c) 2011-2017, Loïc Hoguin &lt;[email protected]&gt;
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+THE SOFTWARE IS PROVIDED &quot;AS IS&quot; AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.</code></pre>
-</div></div>
-</div>
-</div>
-<div class="sect1">
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.</pre></div></div>
<h2 id="_versioning">Versioning</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy uses <a href="http://semver.org/">Semantic Versioning 2.0.0</a>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Cowboy uses <a href="http://semver.org/">Semantic Versioning 2.0.0</a>.</p>
<h2 id="_conventions">Conventions</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>In the HTTP protocol, the method name is case sensitive. All standard
-method names are uppercase.</p></div>
-<div class="paragraph"><p>Header names are case insensitive. When using HTTP/1.1, Cowboy converts
-all the request header names to lowercase. HTTP/2 requires clients to
-send them as lowercase. Any other header name is expected to be provided
-lowercased, including when querying information about the request or
-when sending responses.</p></div>
-<div class="paragraph"><p>The same applies to any other case insensitive value.</p></div>
-</div>
-</div>
+<p>In the HTTP protocol, the method name is case sensitive. All standard method names are uppercase.</p>
+<p>Header names are case insensitive. When using HTTP/1.1, Cowboy converts all the request header names to lowercase. HTTP/2 requires clients to send them as lowercase. Any other header name is expected to be provided lowercased, including when querying information about the request or when sending responses.</p>
+<p>The same applies to any other case insensitive value.</p>
+
diff --git a/docs/en/cowboy/2.0/guide/listeners/index.html b/docs/en/cowboy/2.0/guide/listeners/index.html
index bd477809..920cbdc7 100644
--- a/docs/en/cowboy/2.0/guide/listeners/index.html
+++ b/docs/en/cowboy/2.0/guide/listeners/index.html
@@ -62,109 +62,61 @@
<h1 class="lined-header"><span>Listeners</span></h1>
-<div class="paragraph"><p>A listener is a set of processes that listens on a port for
-new connections. Incoming connections get handled by Cowboy.
-Depending on the connection handshake, one or another protocol
-may be used.</p></div>
-<div class="paragraph"><p>This chapter is specific to Cowboy. Please refer to the
-<a href="https://ninenines.eu/docs/en/ranch/1.3/guide/listeners/">Ranch User Guide</a>
-for more information about listeners.</p></div>
-<div class="paragraph"><p>Cowboy provides two types of listeners: one listening for
-clear TCP connections, and one listening for secure TLS
-connections. Both of them support the HTTP/1.1 and HTTP/2
-protocols.</p></div>
-<div class="sect1">
+<p>A listener is a set of processes that listens on a port for new connections. Incoming connections get handled by Cowboy. Depending on the connection handshake, one or another protocol may be used.</p>
+<p>This chapter is specific to Cowboy. Please refer to the <a href="https://ninenines.eu/docs/en/ranch/1.3/guide/listeners/">Ranch User Guide</a> for more information about listeners.</p>
+<p>Cowboy provides two types of listeners: one listening for clear TCP connections, and one listening for secure TLS connections. Both of them support the HTTP/1.1 and HTTP/2 protocols.</p>
<h2 id="_clear_tcp_listener">Clear TCP listener</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The clear TCP listener will accept connections on the
-given port. A typical HTTP server would listen on port 80.
-Port 80 requires special permissions on most platforms
-however so a common alternative is port 8080.</p></div>
-<div class="paragraph"><p>The following snippet starts listening for connections
-on port 8080:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The clear TCP listener will accept connections on the given port. A typical HTTP server would listen on port 80. Port 80 requires special permissions on most platforms however so a common alternative is port 8080.</p>
+<p>The following snippet starts listening for connections on port 8080:</p>
+<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">start</span></span>(<span style="color: #009900">_Type</span>, <span style="color: #009900">_Args</span>) <span style="color: #990000">-&gt;</span>
- <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: #FF6600">'_'</span>, [{<span style="color: #FF0000">"/"</span>, <span style="color: #FF6600">hello_handler</span>, []}]}
+<pre><tt><b><font color="#000000">start</font></b>(<font color="#009900">_Type</font>, <font color="#009900">_Args</font>) <font color="#990000">-&gt;</font>
+ <font color="#009900">Dispatch</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_router:compile</font></b>([
+ {<font color="#FF6600">'_'</font>, [{<font color="#FF0000">"/"</font>, <font color="#FF6600">hello_handler</font>, []}]}
]),
- {<span style="color: #FF6600">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:start_clear</span></span>(<span style="color: #FF6600">my_http_listener</span>,
- [{<span style="color: #FF6600">port</span>, <span style="color: #993399">8080</span>}],
- #{<span style="color: #0000FF">env</span> <span style="color: #990000">=&gt;</span> #{<span style="color: #0000FF">dispatch</span> <span style="color: #990000">=&gt;</span> <span style="color: #009900">Dispatch</span>}}
+ {<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy:start_clear</font></b>(<font color="#FF6600">my_http_listener</font>,
+ [{<font color="#FF6600">port</font>, <font color="#993399">8080</font>}],
+ #{<font color="#0000FF">env</font> <font color="#990000">=&gt;</font> #{<font color="#0000FF">dispatch</font> <font color="#990000">=&gt;</font> <font color="#009900">Dispatch</font>}}
),
- <span style="font-weight: bold"><span style="color: #000000">hello_erlang_sup:start_link</span></span>()<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>The <a href="../getting_started">Getting Started</a> chapter uses a
-clear TCP listener.</p></div>
-<div class="paragraph"><p>Clients connecting to Cowboy on the clear listener port are
-expected to use either HTTP/1.1 or HTTP/2.</p></div>
-<div class="paragraph"><p>Cowboy supports both methods of initiating a clear
-HTTP/2 connection: through the Upgrade mechanism
-(<a href="https://tools.ietf.org/html/rfc7540#section-3.2">RFC 7540 3.2</a>)
-or by sending the preface directly
-(<a href="https://tools.ietf.org/html/rfc7540#section-3.4">RFC 7540 3.4</a>).</p></div>
-<div class="paragraph"><p>Compatibility with HTTP/1.0 is provided by Cowboy&#8217;s HTTP/1.1
-implementation.</p></div>
-</div>
-</div>
-<div class="sect1">
+ <b><font color="#000000">hello_erlang_sup:start_link</font></b>()<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>The <a href="../getting_started">Getting Started</a> chapter uses a clear TCP listener.</p>
+<p>Clients connecting to Cowboy on the clear listener port are expected to use either HTTP/1.1 or HTTP/2.</p>
+<p>Cowboy supports both methods of initiating a clear HTTP/2 connection: through the Upgrade mechanism (<a href="https://tools.ietf.org/html/rfc7540#section-3.2">RFC 7540 3.2</a>) or by sending the preface directly (<a href="https://tools.ietf.org/html/rfc7540#section-3.4">RFC 7540 3.4</a>).</p>
+<p>Compatibility with HTTP/1.0 is provided by Cowboy&apos;s HTTP/1.1 implementation.</p>
<h2 id="_secure_tls_listener">Secure TLS listener</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The secure TLS listener will accept connections on the
-given port. A typical HTTPS server would listen on port 443.
-Port 443 requires special permissions on most platforms
-however so a common alternative is port 8443.</p></div>
-<div class="paragraph"><p>The function provided by Cowboy will ensure that the TLS
-options given are following the HTTP/2 RFC with regards
-to security. For example some TLS extensions or ciphers
-may be disabled. This also applies to HTTP/1.1 connections
-on this listener. If this is not desirable, Ranch can be
-used directly to setup a custom listener.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The secure TLS listener will accept connections on the given port. A typical HTTPS server would listen on port 443. Port 443 requires special permissions on most platforms however so a common alternative is port 8443.</p>
+<!-- @todo Make a complete list of restrictions.-->
+<p>The function provided by Cowboy will ensure that the TLS options given are following the HTTP/2 RFC with regards to security. For example some TLS extensions or ciphers may be disabled. This also applies to HTTP/1.1 connections on this listener. If this is not desirable, Ranch can be used directly to setup a custom listener.</p>
+<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">start</span></span>(<span style="color: #009900">_Type</span>, <span style="color: #009900">_Args</span>) <span style="color: #990000">-&gt;</span>
- <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: #FF6600">'_'</span>, [{<span style="color: #FF0000">"/"</span>, <span style="color: #FF6600">hello_handler</span>, []}]}
+<pre><tt><b><font color="#000000">start</font></b>(<font color="#009900">_Type</font>, <font color="#009900">_Args</font>) <font color="#990000">-&gt;</font>
+ <font color="#009900">Dispatch</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_router:compile</font></b>([
+ {<font color="#FF6600">'_'</font>, [{<font color="#FF0000">"/"</font>, <font color="#FF6600">hello_handler</font>, []}]}
]),
- {<span style="color: #FF6600">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:start_tls</span></span>(<span style="color: #FF6600">my_http_listener</span>,
+ {<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy:start_tls</font></b>(<font color="#FF6600">my_http_listener</font>,
[
- {<span style="color: #FF6600">port</span>, <span style="color: #993399">8443</span>},
- {<span style="color: #FF6600">certfile</span>, <span style="color: #FF0000">"/path/to/certfile"</span>},
- {<span style="color: #FF6600">keyfile</span>, <span style="color: #FF0000">"/path/to/keyfile"</span>}
+ {<font color="#FF6600">port</font>, <font color="#993399">8443</font>},
+ {<font color="#FF6600">certfile</font>, <font color="#FF0000">"/path/to/certfile"</font>},
+ {<font color="#FF6600">keyfile</font>, <font color="#FF0000">"/path/to/keyfile"</font>}
],
- #{<span style="color: #0000FF">env</span> <span style="color: #990000">=&gt;</span> #{<span style="color: #0000FF">dispatch</span> <span style="color: #990000">=&gt;</span> <span style="color: #009900">Dispatch</span>}}
+ #{<font color="#0000FF">env</font> <font color="#990000">=&gt;</font> #{<font color="#0000FF">dispatch</font> <font color="#990000">=&gt;</font> <font color="#009900">Dispatch</font>}}
),
- <span style="font-weight: bold"><span style="color: #000000">hello_erlang_sup:start_link</span></span>()<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Clients connecting to Cowboy on the secure listener are
-expected to use the ALPN TLS extension to indicate what
-protocols they understand. Cowboy always prefers HTTP/2
-over HTTP/1.1 when both are supported. When neither are
-supported by the client, or when the ALPN extension was
-missing, Cowboy expects HTTP/1.1 to be used.</p></div>
-<div class="paragraph"><p>Cowboy also advertises HTTP/2 support through the older
-NPN TLS extension for compatibility. Note however that
-this support will likely not be enabled by default when
-Cowboy 2.0 gets released.</p></div>
-<div class="paragraph"><p>Compatibility with HTTP/1.0 is provided by Cowboy&#8217;s HTTP/1.1
-implementation.</p></div>
-</div>
-</div>
-<div class="sect1">
+ <b><font color="#000000">hello_erlang_sup:start_link</font></b>()<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Clients connecting to Cowboy on the secure listener are expected to use the ALPN TLS extension to indicate what protocols they understand. Cowboy always prefers HTTP/2 over HTTP/1.1 when both are supported. When neither are supported by the client, or when the ALPN extension was missing, Cowboy expects HTTP/1.1 to be used.</p>
+<p>Cowboy also advertises HTTP/2 support through the older NPN TLS extension for compatibility. Note however that this support will likely not be enabled by default when Cowboy 2.0 gets released.</p>
+<p>Compatibility with HTTP/1.0 is provided by Cowboy&apos;s HTTP/1.1 implementation.</p>
<h2 id="_protocol_configuration">Protocol configuration</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The HTTP/1.1 and HTTP/2 protocols share the same semantics;
-only their framing differs. The first is a text protocol and
-the second a binary protocol.</p></div>
-<div class="paragraph"><p>Cowboy doesn&#8217;t separate the configuration for HTTP/1.1 and
-HTTP/2. Everything goes into the same map. Many options are
-shared.</p></div>
-</div>
-</div>
+<p>The HTTP/1.1 and HTTP/2 protocols share the same semantics; only their framing differs. The first is a text protocol and the second a binary protocol.</p>
+<p>Cowboy doesn&apos;t separate the configuration for HTTP/1.1 and HTTP/2. Everything goes into the same map. Many options are shared.</p>
+<!-- @todo Describe good to know options for both protocols?-->
+<!-- Maybe do that in separate chapters?-->
+
diff --git a/docs/en/cowboy/2.0/guide/loop_handlers/index.html b/docs/en/cowboy/2.0/guide/loop_handlers/index.html
index a5507761..02ff7a4b 100644
--- a/docs/en/cowboy/2.0/guide/loop_handlers/index.html
+++ b/docs/en/cowboy/2.0/guide/loop_handlers/index.html
@@ -62,131 +62,72 @@
<h1 class="lined-header"><span>Loop handlers</span></h1>
-<div class="paragraph"><p>Loop handlers are a special kind of HTTP handlers used when the
-response can not be sent right away. The handler enters instead
-a receive loop waiting for the right message before it can send
-a response.</p></div>
-<div class="paragraph"><p>Loop handlers are used for requests where a response might not
-be immediately available, but where you would like to keep the
-connection open for a while in case the response arrives. The
-most known example of such practice is known as long polling.</p></div>
-<div class="paragraph"><p>Loop handlers can also be used for requests where a response is
-partially available and you need to stream the response body
-while the connection is open. The most known example of such
-practice is server-sent events.</p></div>
-<div class="paragraph"><p>While the same can be accomplished using plain HTTP handlers,
-it is recommended to use loop handlers because they are well-tested
-and allow using built-in features like hibernation and timeouts.</p></div>
-<div class="paragraph"><p>Loop handlers essentially wait for one or more Erlang messages
-and feed these messages to the <code>info/3</code> callback. It also features
-the <code>init/2</code> and <code>terminate/3</code> callbacks which work the same as
-for plain HTTP handlers.</p></div>
-<div class="sect1">
+<p>Loop handlers are a special kind of HTTP handlers used when the response can not be sent right away. The handler enters instead a receive loop waiting for the right message before it can send a response.</p>
+<p>Loop handlers are used for requests where a response might not be immediately available, but where you would like to keep the connection open for a while in case the response arrives. The most known example of such practice is known as long polling.</p>
+<p>Loop handlers can also be used for requests where a response is partially available and you need to stream the response body while the connection is open. The most known example of such practice is server-sent events.</p>
+<p>While the same can be accomplished using plain HTTP handlers, it is recommended to use loop handlers because they are well-tested and allow using built-in features like hibernation and timeouts.</p>
+<p>Loop handlers essentially wait for one or more Erlang messages and feed these messages to the <code>info/3</code> callback. It also features the <code>init/2</code> and <code>terminate/3</code> callbacks which work the same as for plain HTTP handlers.</p>
<h2 id="_initialization">Initialization</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <code>init/2</code> function must return a <code>cowboy_loop</code> tuple to enable
-loop handler behavior. This tuple may optionally contain
-a timeout value and/or the atom <code>hibernate</code> to make the
-process enter hibernation until a message is received.</p></div>
-<div class="paragraph"><p>This snippet enables the loop handler:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The <code>init/2</code> function must return a <code>cowboy_loop</code> tuple to enable loop handler behavior. This tuple may optionally contain a timeout value and/or the atom <code>hibernate</code> to make the process enter hibernation until a message is received.</p>
+<p>This snippet enables the loop handler:</p>
+<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">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_loop</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>This also makes the process hibernate:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">cowboy_loop</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>This also makes the process hibernate:</p>
+<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">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_loop</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>, <span style="color: #FF6600">hibernate</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">cowboy_loop</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>, <font color="#FF6600">hibernate</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_receive_loop">Receive loop</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Once initialized, Cowboy will wait for messages to arrive
-in the process' mailbox. When a message arrives, Cowboy
-calls the <code>info/3</code> function with the message, the Req object
-and the handler&#8217;s state.</p></div>
-<div class="paragraph"><p>The following snippet sends a reply when it receives a
-<code>reply</code> message from another process, or waits for another
-message otherwise.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Once initialized, Cowboy will wait for messages to arrive in the process&apos; mailbox. When a message arrives, Cowboy calls the <code>info/3</code> function with the message, the Req object and the handler&apos;s state.</p>
+<p>The following snippet sends a reply when it receives a <code>reply</code> message from another process, or waits for another message otherwise.</p>
+<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">info</span></span>({<span style="color: #FF6600">reply</span>, <span style="color: #009900">Body</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: #000000">cowboy_req:reply</span></span>(<span style="color: #993399">200</span>, #{}, <span style="color: #009900">Body</span>, <span style="color: #009900">Req</span>),
- {<span style="color: #FF6600">stop</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>};
-<span style="font-weight: bold"><span style="color: #000000">info</span></span>(<span style="color: #009900">_Msg</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>, <span style="color: #FF6600">hibernate</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Do note that the <code>reply</code> tuple here may be any message
-and is simply an example.</p></div>
-<div class="paragraph"><p>This callback may perform any necessary operation including
-sending all or parts of a reply, and will subsequently
-return a tuple indicating if more messages are to be expected.</p></div>
-<div class="paragraph"><p>The callback may also choose to do nothing at all and just
-skip the message received.</p></div>
-<div class="paragraph"><p>If a reply is sent, then the <code>stop</code> tuple should be returned.
-This will instruct Cowboy to end the request.</p></div>
-<div class="paragraph"><p>Otherwise an <code>ok</code> tuple should be returned.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">info</font></b>({<font color="#FF6600">reply</font>, <font color="#009900">Body</font>}, <font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#000000">cowboy_req:reply</font></b>(<font color="#993399">200</font>, #{}, <font color="#009900">Body</font>, <font color="#009900">Req</font>),
+ {<font color="#FF6600">stop</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>};
+<b><font color="#000000">info</font></b>(<font color="#009900">_Msg</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>, <font color="#FF6600">hibernate</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Do note that the <code>reply</code> tuple here may be any message and is simply an example.</p>
+<p>This callback may perform any necessary operation including sending all or parts of a reply, and will subsequently return a tuple indicating if more messages are to be expected.</p>
+<p>The callback may also choose to do nothing at all and just skip the message received.</p>
+<p>If a reply is sent, then the <code>stop</code> tuple should be returned. This will instruct Cowboy to end the request.</p>
+<p>Otherwise an <code>ok</code> tuple should be returned.</p>
<h2 id="_streaming_loop">Streaming loop</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Another common case well suited for loop handlers is
-streaming data received in the form of Erlang messages.
-This can be done by initiating a chunked reply in the
-<code>init/2</code> callback and then using <code>cowboy_req:chunk/2</code>
-every time a message is received.</p></div>
-<div class="paragraph"><p>The following snippet does exactly that. As you can see
-a chunk is sent every time an <code>event</code> message is received,
-and the loop is stopped by sending an <code>eof</code> message.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Another common case well suited for loop handlers is streaming data received in the form of Erlang messages. This can be done by initiating a chunked reply in the <code>init/2</code> callback and then using <code>cowboy_req:chunk/2</code> every time a message is received.</p>
+<p>The following snippet does exactly that. As you can see a chunk is sent every time an <code>event</code> message is received, and the loop is stopped by sending an <code>eof</code> message.</p>
+<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">init</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- <span style="color: #009900">Req2</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_reply</span></span>(<span style="color: #993399">200</span>, <span style="color: #009900">Req</span>),
- {<span style="color: #FF6600">cowboy_loop</span>, <span style="color: #009900">Req2</span>, <span style="color: #009900">State</span>}<span style="color: #990000">.</span>
-
-<span style="font-weight: bold"><span style="color: #000000">info</span></span>(<span style="color: #FF6600">eof</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">stop</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>};
-<span style="font-weight: bold"><span style="color: #000000">info</span></span>({<span style="color: #FF6600">event</span>, <span style="color: #009900">Data</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: #000000">cowboy_req:stream_body</span></span>(<span style="color: #009900">Data</span>, <span style="color: #FF6600">nofin</span>, <span style="color: #009900">Req</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">info</span></span>(<span style="color: #009900">_Msg</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">ok</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">
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ <font color="#009900">Req2</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:stream_reply</font></b>(<font color="#993399">200</font>, <font color="#009900">Req</font>),
+ {<font color="#FF6600">cowboy_loop</font>, <font color="#009900">Req2</font>, <font color="#009900">State</font>}<font color="#990000">.</font>
+
+<b><font color="#000000">info</font></b>(<font color="#FF6600">eof</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">stop</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>};
+<b><font color="#000000">info</font></b>({<font color="#FF6600">event</font>, <font color="#009900">Data</font>}, <font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#000000">cowboy_req:stream_body</font></b>(<font color="#009900">Data</font>, <font color="#FF6600">nofin</font>, <font color="#009900">Req</font>),
+ {<font color="#FF6600">ok</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>};
+<b><font color="#000000">info</font></b>(<font color="#009900">_Msg</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_cleaning_up">Cleaning up</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>It is recommended that you set the connection header to
-<code>close</code> when replying, as this process may be reused for
-a subsequent request.</p></div>
-<div class="paragraph"><p>Please refer to the <a href="../handlers">Handlers chapter</a>
-for general instructions about cleaning up.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>It is recommended that you set the connection header to <code>close</code> when replying, as this process may be reused for a subsequent request.</p>
+<p>Please refer to the <a href="../handlers">Handlers chapter</a> for general instructions about cleaning up.</p>
<h2 id="_hibernate">Hibernate</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>To save memory, you may hibernate the process in between
-messages received. This is done by returning the atom
-<code>hibernate</code> as part of the <code>loop</code> tuple callbacks normally
-return. Just add the atom at the end and Cowboy will hibernate
-accordingly.</p></div>
-</div>
-</div>
+<p>To save memory, you may hibernate the process in between messages received. This is done by returning the atom <code>hibernate</code> as part of the <code>loop</code> tuple callbacks normally return. Just add the atom at the end and Cowboy will hibernate accordingly.</p>
+
diff --git a/docs/en/cowboy/2.0/guide/middlewares/index.html b/docs/en/cowboy/2.0/guide/middlewares/index.html
index 518bf7c3..35a3bbcc 100644
--- a/docs/en/cowboy/2.0/guide/middlewares/index.html
+++ b/docs/en/cowboy/2.0/guide/middlewares/index.html
@@ -62,92 +62,38 @@
<h1 class="lined-header"><span>Middlewares</span></h1>
-<div class="paragraph"><p>Cowboy delegates the request processing to middleware components.
-By default, two middlewares are defined, for the routing and handling
-of the request, as is detailed in most of this guide.</p></div>
-<div class="paragraph"><p>Middlewares give you complete control over how requests are to be
-processed. You can add your own middlewares to the mix or completely
-change the chain of middlewares as needed.</p></div>
-<div class="paragraph"><p>Cowboy will execute all middlewares in the given order, unless one
-of them decides to stop processing.</p></div>
-<div class="sect1">
+<p>Cowboy delegates the request processing to middleware components. By default, two middlewares are defined, for the routing and handling of the request, as is detailed in most of this guide.</p>
+<p>Middlewares give you complete control over how requests are to be processed. You can add your own middlewares to the mix or completely change the chain of middlewares as needed.</p>
+<p>Cowboy will execute all middlewares in the given order, unless one of them decides to stop processing.</p>
<h2 id="_usage">Usage</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Middlewares only need to implement a single callback: <code>execute/2</code>.
-It is defined in the <code>cowboy_middleware</code> behavior.</p></div>
-<div class="paragraph"><p>This callback has two arguments. The first is the <code>Req</code> object.
-The second is the environment.</p></div>
-<div class="paragraph"><p>Middlewares can return one of three different values:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<code>{ok, Req, Env}</code> to continue the request processing
-</p>
+<p>Middlewares only need to implement a single callback: <code>execute/2</code>. It is defined in the <code>cowboy_middleware</code> behavior.</p>
+<p>This callback has two arguments. The first is the <code>Req</code> object. The second is the environment.</p>
+<p>Middlewares can return one of three different values:</p>
+<ul><li><code>{ok, Req, Env}</code> to continue the request processing
</li>
-<li>
-<p>
-<code>{suspend, Module, Function, Args}</code> to hibernate
-</p>
+<li><code>{suspend, Module, Function, Args}</code> to hibernate
</li>
-<li>
-<p>
-<code>{stop, Req}</code> to stop processing and move on to the next request
-</p>
+<li><code>{stop, Req}</code> to stop processing and move on to the next request
</li>
-</ul></div>
-<div class="paragraph"><p>Of note is that when hibernating, processing will resume on the given
-MFA, discarding all previous stacktrace. Make sure you keep the <code>Req</code>
-and <code>Env</code> in the arguments of this MFA for later use.</p></div>
-<div class="paragraph"><p>If an error happens during middleware processing, Cowboy will not try
-to send an error back to the socket, the process will just crash. It
-is up to the middleware to make sure that a reply is sent if something
-goes wrong.</p></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
+<p>Of note is that when hibernating, processing will resume on the given MFA, discarding all previous stacktrace. Make sure you keep the <code>Req</code> and <code>Env</code> in the arguments of this MFA for later use.</p>
+<p>If an error happens during middleware processing, Cowboy will not try to send an error back to the socket, the process will just crash. It is up to the middleware to make sure that a reply is sent if something goes wrong.</p>
<h2 id="_configuration">Configuration</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The middleware environment is defined as the <code>env</code> protocol option.
-In the previous chapters we saw it briefly when we needed to pass
-the routing information. It is a list of tuples with the first
-element being an atom and the second any Erlang term.</p></div>
-<div class="paragraph"><p>Two values in the environment are reserved:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<code>listener</code> contains the name of the listener
-</p>
+<p>The middleware environment is defined as the <code>env</code> protocol option. In the previous chapters we saw it briefly when we needed to pass the routing information. It is a list of tuples with the first element being an atom and the second any Erlang term.</p>
+<p>Two values in the environment are reserved:</p>
+<ul><li><code>listener</code> contains the name of the listener
</li>
-<li>
-<p>
-<code>result</code> contains the result of the processing
-</p>
+<li><code>result</code> contains the result of the processing
</li>
-</ul></div>
-<div class="paragraph"><p>The <code>listener</code> value is always defined. The <code>result</code> value can be
-set by any middleware. If set to anything other than <code>ok</code>, Cowboy
-will not process any subsequent requests on this connection.</p></div>
-<div class="paragraph"><p>The middlewares that come with Cowboy may define or require other
-environment values to perform.</p></div>
-<div class="paragraph"><p>You can update the environment by calling the <code>cowboy:set_env/3</code>
-convenience function, adding or replacing a value in the environment.</p></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
+<p>The <code>listener</code> value is always defined. The <code>result</code> value can be set by any middleware. If set to anything other than <code>ok</code>, Cowboy will not process any subsequent requests on this connection.</p>
+<p>The middlewares that come with Cowboy may define or require other environment values to perform.</p>
+<p>You can update the environment by calling the <code>cowboy:set_env/3</code> convenience function, adding or replacing a value in the environment.</p>
<h2 id="_routing_middleware">Routing middleware</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The routing middleware requires the <code>dispatch</code> value. If routing
-succeeds, it will put the handler name and options in the <code>handler</code>
-and <code>handler_opts</code> values of the environment, respectively.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The routing middleware requires the <code>dispatch</code> value. If routing succeeds, it will put the handler name and options in the <code>handler</code> and <code>handler_opts</code> values of the environment, respectively.</p>
<h2 id="_handler_middleware">Handler middleware</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The handler middleware requires the <code>handler</code> and <code>handler_opts</code>
-values. It puts the result of the request handling into <code>result</code>.</p></div>
-</div>
-</div>
+<p>The handler middleware requires the <code>handler</code> and <code>handler_opts</code> values. It puts the result of the request handling into <code>result</code>.</p>
+
diff --git a/docs/en/cowboy/2.0/guide/migrating_from_1.0/index.html b/docs/en/cowboy/2.0/guide/migrating_from_1.0/index.html
index 96402bf8..924ef215 100644
--- a/docs/en/cowboy/2.0/guide/migrating_from_1.0/index.html
+++ b/docs/en/cowboy/2.0/guide/migrating_from_1.0/index.html
@@ -62,378 +62,118 @@
<h1 class="lined-header"><span>Migrating from Cowboy 1.0 to 2.0</span></h1>
-<div class="paragraph"><p>A lot has changed between Cowboy 1.0 and 2.0. The <code>cowboy_req</code>
-interface in particular has seen a massive revamp. Hooks are
-gone, their functionality can now be achieved via stream
-handlers.</p></div>
-<div class="paragraph"><p>The documentation has seen great work, in particular the
-manual. Each module and each function now has its own dedicated
-manual page with full details and examples.</p></div>
-<div class="sect1">
+<p>A lot has changed between Cowboy 1.0 and 2.0. The <code>cowboy_req</code> interface in particular has seen a massive revamp. Hooks are gone, their functionality can now be achieved via stream handlers.</p>
+<p>The documentation has seen great work, in particular the manual. Each module and each function now has its own dedicated manual page with full details and examples.</p>
<h2 id="_compatibility">Compatibility</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Compatibility with Erlang/OTP R16, 17 and 18 has been dropped.
-Erlang/OTP 19.0 or above is required. It is non-trivial to
-make Cowboy 2.0 work with older Erlang/OTP versions.</p></div>
-<div class="paragraph"><p>Cowboy 2.0 is not compatible with Cowlib versions older than
-2.0. It should be compatible with Ranch 1.0 or above, however
-it has not been tested with Ranch versions older than 1.4.</p></div>
-<div class="paragraph"><p>Cowboy 2.0 is tested on Arch Linux, Ubuntu, FreeBSD, Windows
-and OSX. It is tested with every point release (latest patch
-release) and also with HiPE on the most recent release.</p></div>
-<div class="paragraph"><p>Cowboy 2.0 now comes with Erlang.mk templates.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Compatibility with Erlang/OTP R16, 17 and 18 has been dropped. Erlang/OTP 19.0 or above is required. It is non-trivial to make Cowboy 2.0 work with older Erlang/OTP versions.</p>
+<p>Cowboy 2.0 is not compatible with Cowlib versions older than 2.0. It should be compatible with Ranch 1.0 or above, however it has not been tested with Ranch versions older than 1.4.</p>
+<p>Cowboy 2.0 is tested on Arch Linux, Ubuntu, FreeBSD, Windows and OSX. It is tested with every point release (latest patch release) and also with HiPE on the most recent release.</p>
+<p>Cowboy 2.0 now comes with Erlang.mk templates.</p>
<h2 id="_features_added">Features added</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-The HTTP/2 protocol is now supported.
-</p>
-</li>
-<li>
-<p>
-Cowboy no longer uses only one process per connection.
- It now uses one process per connection plus one process
- per request by default. This is necessary for HTTP/2.
- There might be a slight drop in performance for HTTP/1.1
- connections due to this change.
-</p>
-</li>
-<li>
-<p>
-Cowboy internals have largely been reworked in order to
- support HTTP/2. This opened the way to stream handlers,
- which are a chain of modules that are called whenever
- something happens relating to a request/response.
-</p>
-</li>
-<li>
-<p>
-The <code>cowboy_stream_h</code> stream handler has been added.
- It provides most of Cowboy&#8217;s default behavior.
-</p>
-</li>
-<li>
-<p>
-The <code>cowboy_compress_h</code> stream handler has been added.
- It compresses responses when possible. It&#8217;s worth noting
- that it compresses in more cases than Cowboy 1.0 ever did.
-</p>
-</li>
-<li>
-<p>
-Because of the many changes in the internals of Cowboy,
- many options have been added or modified. Of note is that
- the Websocket options are now given per handler rather
- than for the entire listener.
-</p>
-</li>
-<li>
-<p>
-Websocket permessage-deflate compression is now supported
- via the <code>compress</code> option.
-</p>
-</li>
-<li>
-<p>
-Static file handlers will now correctly find files found
- in <em>.ez</em> archives.
-</p>
-</li>
-<li>
-<p>
-Constraints have been generalized and are now used not only
- in the router but also in some <code>cowboy_req</code> functions. Their
- interface has also been modified to allow for reverse
- operations and formatting of errors.
-</p>
-</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+<ul><li>The HTTP/2 protocol is now supported.
+</li>
+<li>Cowboy no longer uses only one process per connection. It now uses one process per connection plus one process per request by default. This is necessary for HTTP/2. There might be a slight drop in performance for HTTP/1.1 connections due to this change.
+</li>
+<li>Cowboy internals have largely been reworked in order to support HTTP/2. This opened the way to stream handlers, which are a chain of modules that are called whenever something happens relating to a request/response.
+</li>
+<li>The <code>cowboy_stream_h</code> stream handler has been added. It provides most of Cowboy&apos;s default behavior.
+</li>
+<li>The <code>cowboy_compress_h</code> stream handler has been added. It compresses responses when possible. It&apos;s worth noting that it compresses in more cases than Cowboy 1.0 ever did.
+</li>
+<li>Because of the many changes in the internals of Cowboy, many options have been added or modified. Of note is that the Websocket options are now given per handler rather than for the entire listener.
+</li>
+<li>Websocket permessage-deflate compression is now supported via the <code>compress</code> option.
+</li>
+<li>Static file handlers will now correctly find files found in <em>.ez</em> archives.
+</li>
+<li>Constraints have been generalized and are now used not only in the router but also in some <code>cowboy_req</code> functions. Their interface has also been modified to allow for reverse operations and formatting of errors.
+</li>
+</ul>
<h2 id="_features_removed">Features removed</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-SPDY support has been removed. Use HTTP/2 instead.
-</p>
-</li>
-<li>
-<p>
-Hooks have been removed. Use <a href="../streams">stream handlers</a> instead.
-</p>
-</li>
-<li>
-<p>
-The undocumented <code>waiting_stream</code> hack has been removed.
- It allowed disabling chunked transfer-encoding for HTTP/1.1.
- It has no equivalent in Cowboy 2.0. Open a ticket if necessary.
-</p>
-</li>
-<li>
-<p>
-Sub protocols still exist, but their interface has largely changed
- and they are no longer documented for the time being.
-</p>
-</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+<ul><li>SPDY support has been removed. Use HTTP/2 instead.
+</li>
+<li>Hooks have been removed. Use <a href="../streams">stream handlers</a> instead.
+</li>
+<li>The undocumented <code>waiting_stream</code> hack has been removed. It allowed disabling chunked transfer-encoding for HTTP/1.1. It has no equivalent in Cowboy 2.0. Open a ticket if necessary.
+</li>
+<li>Sub protocols still exist, but their interface has largely changed and they are no longer documented for the time being.
+</li>
+</ul>
<h2 id="_changed_behaviors">Changed behaviors</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-The handler behaviors have been renamed and are now <code>cowboy_handler</code>,
- <code>cowboy_loop</code>, <code>cowboy_rest</code> and <code>cowboy_websocket</code>.
-</p>
-</li>
-<li>
-<p>
-Plain HTTP, loop, REST and Websocket handlers have had their
- init and terminate callbacks unified. They now all use the
- <code>init/2</code> and <code>terminate/3</code> callbacks. The latter is now optional.
- The terminate reason has now been documented for all handlers.
-</p>
-</li>
-<li>
-<p>
-The tuple returned to switch to a different handler type has
- changed. It now takes the form <code>{Module, Req, State}</code> or
- <code>{Module, Req, State, Opts}</code>, where <code>Opts</code> is a map of options
- to configure the handler. The timeout and hibernate options
- must now be specified using this map, where applicable.
-</p>
-</li>
-<li>
-<p>
-All behaviors that used to accept <code>halt</code> or <code>shutdown</code> tuples
- as a return value no longer do so. The return value is now
- a <code>stop</code> tuple, consistent across Cowboy.
-</p>
-</li>
-<li>
-<p>
-Middlewares can no longer return an <code>error</code> tuple. They have
- to send the response and return a <code>stop</code> tuple instead.
-</p>
-</li>
-<li>
-<p>
-The <code>known_content_type</code> REST handler callback has been removed
- as it was found unnecessary.
-</p>
-</li>
-<li>
-<p>
-Websocket handlers have both the normal <code>init/2</code> and
- an optional <code>websocket_init/1</code> function. The reason for
- that exception is that the <code>websocket_*</code> callbacks execute
- in a separate process from the <code>init/2</code> callback, and it
- was therefore not obvious how timers or monitors should
- be setup properly. They are effectively initializing the
- handler before and after the HTTP/1.1 upgrade.
-</p>
-</li>
-<li>
-<p>
-Websocket handlers can now send frames directly from
- <code>websocket_init/1</code>. The frames will be sent immediately
- after the handshake.
-</p>
-</li>
-<li>
-<p>
-Websocket handler callbacks no longer receive the Req
- argument. The <code>init/2</code> callback still receives it and
- can be used to extract relevant information. The <code>terminate/3</code>
- callback, if implemented, may still receive the Req
- (see next bullet point).
-</p>
-</li>
-<li>
-<p>
-Websocket handlers have a new <code>req_filter</code> option that
- can be used to customize how much information should be
- discarded from the Req object after the handshake. Note
- that the Req object is only available in <code>terminate/3</code>
- past that point.
-</p>
-</li>
-<li>
-<p>
-Websocket handlers have their timeout default changed
- from infinity to 60 seconds.
-</p>
-</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+<ul><li>The handler behaviors have been renamed and are now <code>cowboy_handler</code>, <code>cowboy_loop</code>, <code>cowboy_rest</code> and <code>cowboy_websocket</code>.
+</li>
+<li>Plain HTTP, loop, REST and Websocket handlers have had their init and terminate callbacks unified. They now all use the <code>init/2</code> and <code>terminate/3</code> callbacks. The latter is now optional. The terminate reason has now been documented for all handlers.
+</li>
+<li>The tuple returned to switch to a different handler type has changed. It now takes the form <code>{Module, Req, State}</code> or <code>{Module, Req, State, Opts}</code>, where <code>Opts</code> is a map of options to configure the handler. The timeout and hibernate options must now be specified using this map, where applicable.
+</li>
+<li>All behaviors that used to accept <code>halt</code> or <code>shutdown</code> tuples as a return value no longer do so. The return value is now a <code>stop</code> tuple, consistent across Cowboy.
+</li>
+<li>Middlewares can no longer return an <code>error</code> tuple. They have to send the response and return a <code>stop</code> tuple instead.
+</li>
+<li>The <code>known_content_type</code> REST handler callback has been removed as it was found unnecessary.
+</li>
+<li>Websocket handlers have both the normal <code>init/2</code> and an optional <code>websocket_init/1</code> function. The reason for that exception is that the <code>websocket_*</code> callbacks execute in a separate process from the <code>init/2</code> callback, and it was therefore not obvious how timers or monitors should be setup properly. They are effectively initializing the handler before and after the HTTP/1.1 upgrade.
+</li>
+<li>Websocket handlers can now send frames directly from <code>websocket_init/1</code>. The frames will be sent immediately after the handshake.
+</li>
+<li>Websocket handler callbacks no longer receive the Req argument. The <code>init/2</code> callback still receives it and can be used to extract relevant information. The <code>terminate/3</code> callback, if implemented, may still receive the Req (see next bullet point).
+</li>
+<li>Websocket handlers have a new <code>req_filter</code> option that can be used to customize how much information should be discarded from the Req object after the handshake. Note that the Req object is only available in <code>terminate/3</code> past that point.
+</li>
+<li>Websocket handlers have their timeout default changed from infinity to 60 seconds.
+</li>
+</ul>
<h2 id="_new_functions">New functions</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-The <code>cowboy_req:scheme/1</code> function has been added.
-</p>
-</li>
-<li>
-<p>
-The <code>cowboy_req:uri/1,2</code> function has been added, replacing the
- less powerful functions <code>cowboy_req:url/1</code> and <code>cowboy_req:host_url/1</code>.
-</p>
-</li>
-<li>
-<p>
-The functions <code>cowboy_req:match_qs/2</code> and <code>cowboy_req:match_cookies/2</code>
- allow matching query string and cookies against constraints.
-</p>
-</li>
-<li>
-<p>
-The function <code>cowboy_req:set_resp_cookie/3</code> has been added to
- complement <code>cowboy_req:set_resp_cookie/4</code>.
-</p>
-</li>
-<li>
-<p>
-The functions <code>cowboy_req:resp_header/2,3</code> and <code>cowboy_req:resp_headers/1</code>
- have been added. They can be used to retrieve response headers
- that were previously set.
-</p>
-</li>
-<li>
-<p>
-The function <code>cowboy_req:set_resp_headers/2</code> has been added. It
- allows setting many response headers at once.
-</p>
-</li>
-<li>
-<p>
-The functions <code>cowboy_req:push/3,4</code> can be used to push resources
- for protocols that support it (by default only HTTP/2).
-</p>
-</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+<ul><li>The <code>cowboy_req:scheme/1</code> function has been added.
+</li>
+<li>The <code>cowboy_req:uri/1,2</code> function has been added, replacing the less powerful functions <code>cowboy_req:url/1</code> and <code>cowboy_req:host_url/1</code>.
+</li>
+<li>The functions <code>cowboy_req:match_qs/2</code> and <code>cowboy_req:match_cookies/2</code> allow matching query string and cookies against constraints.
+</li>
+<li>The function <code>cowboy_req:set_resp_cookie/3</code> has been added to complement <code>cowboy_req:set_resp_cookie/4</code>.
+</li>
+<li>The functions <code>cowboy_req:resp_header/2,3</code> and <code>cowboy_req:resp_headers/1</code> have been added. They can be used to retrieve response headers that were previously set.
+</li>
+<li>The function <code>cowboy_req:set_resp_headers/2</code> has been added. It allows setting many response headers at once.
+</li>
+<li>The functions <code>cowboy_req:push/3,4</code> can be used to push resources for protocols that support it (by default only HTTP/2).
+</li>
+</ul>
<h2 id="_changed_functions">Changed functions</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-The <code>cowboy:start_http/4</code> function was renamed to <code>cowboy:start_clear/3</code>.
-</p>
-</li>
-<li>
-<p>
-The <code>cowboy:start_https/4</code> function was renamed to <code>cowboy:start_tls/3</code>.
-</p>
-</li>
-<li>
-<p>
-Most, if not all, functions in the <code>cowboy_req</code> module have been modified.
- Please consult the changelog of each individual functions. The changes
- are mainly about simplifying and clarifying the interface. The Req is no
- longer returned when not necessary, maps are used wherever possible,
- and some functions have been renamed.
-</p>
-</li>
-<li>
-<p>
-The position of the <code>Opts</code> argument for <code>cowboy_req:set_resp_cookie/4</code>
- has changed to improve consistency. It is now the last argument.
-</p>
-</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+<ul><li>The <code>cowboy:start_http/4</code> function was renamed to <code>cowboy:start_clear/3</code>.
+</li>
+<li>The <code>cowboy:start_https/4</code> function was renamed to <code>cowboy:start_tls/3</code>.
+</li>
+<li>Most, if not all, functions in the <code>cowboy_req</code> module have been modified. Please consult the changelog of each individual functions. The changes are mainly about simplifying and clarifying the interface. The Req is no longer returned when not necessary, maps are used wherever possible, and some functions have been renamed.
+</li>
+<li>The position of the <code>Opts</code> argument for <code>cowboy_req:set_resp_cookie/4</code> has changed to improve consistency. It is now the last argument.
+</li>
+</ul>
<h2 id="_removed_functions">Removed functions</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-The functions <code>cowboy_req:url/1</code> and <code>cowboy_req:host_url/1</code> have been
- removed in favor of the new function <code>cowboy_req:uri/1,2</code>.
-</p>
-</li>
-<li>
-<p>
-The functions <code>cowboy_req:meta/2,3</code> and <code>cowboy_req:set_meta/3</code> have
- been removed. The Req object is now a public map, therefore they became
- unnecessary.
-</p>
-</li>
-<li>
-<p>
-The functions <code>cowboy_req:set_resp_body_fun/2,3</code> have been removed.
- For sending files, the function <code>cowboy_req:set_resp_body/2</code> can now
- take a sendfile tuple.
-</p>
-</li>
-<li>
-<p>
-Remove many undocumented functions from <code>cowboy_req</code>, including the
- functions <code>cowboy_req:get/2</code> and <code>cowboy_req:set/3</code>.
-</p>
-</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+<ul><li>The functions <code>cowboy_req:url/1</code> and <code>cowboy_req:host_url/1</code> have been removed in favor of the new function <code>cowboy_req:uri/1,2</code>.
+</li>
+<li>The functions <code>cowboy_req:meta/2,3</code> and <code>cowboy_req:set_meta/3</code> have been removed. The Req object is now a public map, therefore they became unnecessary.
+</li>
+<li>The functions <code>cowboy_req:set_resp_body_fun/2,3</code> have been removed. For sending files, the function <code>cowboy_req:set_resp_body/2</code> can now take a sendfile tuple.
+</li>
+<li>Remove many undocumented functions from <code>cowboy_req</code>, including the functions <code>cowboy_req:get/2</code> and <code>cowboy_req:set/3</code>.
+</li>
+</ul>
<h2 id="_other_changes">Other changes</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-The correct percent-decoding algorithm is now used for path elements
- during routing. It will no longer decode <code>+</code> characters.
-</p>
-</li>
-<li>
-<p>
-The router will now properly handle path segments <code>.</code> and <code>..</code>.
-</p>
-</li>
-<li>
-<p>
-Routing behavior has changed for URIs containing latin1 characters.
- They are no longer allowed. URIs are expected to be in UTF-8 once
- they are percent-decoded.
-</p>
-</li>
-<li>
-<p>
-Etag comparison in REST handlers has been fixed. Some requests may
- now fail when they succeeded in the past.
-</p>
-</li>
-<li>
-<p>
-The <code>If-*-Since</code> headers are now ignored in REST handlers if
- the corresponding <code>If*-Match</code> header exist. The former is
- largely a backward compatible header and this shouldn&#8217;t create
- any issue. The new behavior follows the current RFCs more closely.
-</p>
-</li>
-<li>
-<p>
-The static file handler has been improved to handle more special
- characters on systems that accept them.
-</p>
-</li>
-</ul></div>
-</div>
-</div>
+<ul><li>The correct percent-decoding algorithm is now used for path elements during routing. It will no longer decode <code>+</code> characters.
+</li>
+<li>The router will now properly handle path segments <code>.</code> and <code>..</code>.
+</li>
+<li>Routing behavior has changed for URIs containing latin1 characters. They are no longer allowed. URIs are expected to be in UTF-8 once they are percent-decoded.
+</li>
+<li>Etag comparison in REST handlers has been fixed. Some requests may now fail when they succeeded in the past.
+</li>
+<li>The <code>If-*-Since</code> headers are now ignored in REST handlers if the corresponding <code>If*-Match</code> header exist. The former is largely a backward compatible header and this shouldn&apos;t create any issue. The new behavior follows the current RFCs more closely.
+</li>
+<li>The static file handler has been improved to handle more special characters on systems that accept them.
+</li>
+</ul>
+
diff --git a/docs/en/cowboy/2.0/guide/modern_web/index.html b/docs/en/cowboy/2.0/guide/modern_web/index.html
index 6614a734..df02e1b5 100644
--- a/docs/en/cowboy/2.0/guide/modern_web/index.html
+++ b/docs/en/cowboy/2.0/guide/modern_web/index.html
@@ -62,115 +62,38 @@
<h1 class="lined-header"><span>The modern Web</span></h1>
-<div class="paragraph"><p>Cowboy is a server for the modern Web. This chapter explains
-what it means and details all the standards involved.</p></div>
-<div class="paragraph"><p>Cowboy supports all the standards listed in this document.</p></div>
-<div class="sect1">
+<p>Cowboy is a server for the modern Web. This chapter explains what it means and details all the standards involved.</p>
+<p>Cowboy supports all the standards listed in this document.</p>
<h2 id="_http_2">HTTP/2</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>HTTP/2 is the most efficient protocol for consuming Web
-services. It enables clients to keep a connection open
-for long periods of time; to send requests concurrently;
-to reduce the size of requests through HTTP headers
-compression; and more. The protocol is binary, greatly
-reducing the resources needed to parse it.</p></div>
-<div class="paragraph"><p>HTTP/2 also enables the server to push messages to the
-client. This can be used for various purposes, including
-the sending of related resources before the client requests
-them, in an effort to reduce latency. This can also be used
-to enable bidirectional communication.</p></div>
-<div class="paragraph"><p>Cowboy provides transparent support for HTTP/2. Clients
-that know it can use it; others fall back to HTTP/1.1
-automatically.</p></div>
-<div class="paragraph"><p>HTTP/2 is compatible with the HTTP/1.1 semantics.</p></div>
-<div class="paragraph"><p>HTTP/2 is defined by RFC 7540 and RFC 7541.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>HTTP/2 is the most efficient protocol for consuming Web services. It enables clients to keep a connection open for long periods of time; to send requests concurrently; to reduce the size of requests through HTTP headers compression; and more. The protocol is binary, greatly reducing the resources needed to parse it.</p>
+<p>HTTP/2 also enables the server to push messages to the client. This can be used for various purposes, including the sending of related resources before the client requests them, in an effort to reduce latency. This can also be used to enable bidirectional communication.</p>
+<p>Cowboy provides transparent support for HTTP/2. Clients that know it can use it; others fall back to HTTP/1.1 automatically.</p>
+<p>HTTP/2 is compatible with the HTTP/1.1 semantics.</p>
+<p>HTTP/2 is defined by RFC 7540 and RFC 7541.</p>
<h2 id="_http_1_1">HTTP/1.1</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>HTTP/1.1 is the previous version of the HTTP protocol.
-The protocol itself is text-based and suffers from numerous
-issues and limitations. In particular it is not possible
-to execute requests concurrently (though pipelining is
-sometimes possible), and it&#8217;s also sometimes difficult
-to detect that a client disconnected.</p></div>
-<div class="paragraph"><p>HTTP/1.1 does provide very good semantics for interacting
-with Web services. It defines the standard methods, headers
-and status codes used by HTTP/1.1 and HTTP/2 clients and
-servers.</p></div>
-<div class="paragraph"><p>HTTP/1.1 also defines compatibility with an older version
-of the protocol, HTTP/1.0, which was never really standardized
-across implementations.</p></div>
-<div class="paragraph"><p>The core of HTTP/1.1 is defined by RFC 7230, RFC 7231,
-RFC 7232, RFC 7233, RFC 7234 and RFC 7235. Numerous RFCs
-and other specifications exist defining additional HTTP
-methods, status codes, headers or semantics.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>HTTP/1.1 is the previous version of the HTTP protocol. The protocol itself is text-based and suffers from numerous issues and limitations. In particular it is not possible to execute requests concurrently (though pipelining is sometimes possible), and it&apos;s also sometimes difficult to detect that a client disconnected.</p>
+<p>HTTP/1.1 does provide very good semantics for interacting with Web services. It defines the standard methods, headers and status codes used by HTTP/1.1 and HTTP/2 clients and servers.</p>
+<p>HTTP/1.1 also defines compatibility with an older version of the protocol, HTTP/1.0, which was never really standardized across implementations.</p>
+<p>The core of HTTP/1.1 is defined by RFC 7230, RFC 7231, RFC 7232, RFC 7233, RFC 7234 and RFC 7235. Numerous RFCs and other specifications exist defining additional HTTP methods, status codes, headers or semantics.</p>
<h2 id="_websocket">Websocket</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../ws_protocol">Websocket</a> is a protocol built on top of HTTP/1.1
-that provides a two-ways communication channel between the client and
-the server. Communication is asynchronous and can occur concurrently.</p></div>
-<div class="paragraph"><p>It consists of a Javascript object allowing setting up a
-Websocket connection to the server, and a binary based
-protocol for sending data to the server or the client.</p></div>
-<div class="paragraph"><p>Websocket connections can transfer either UTF-8 encoded text
-data or binary data. The protocol also includes support for
-implementing a ping/pong mechanism, allowing the server and
-the client to have more confidence that the connection is still
-alive.</p></div>
-<div class="paragraph"><p>A Websocket connection can be used to transfer any kind of data,
-small or big, text or binary. Because of this Websocket is
-sometimes used for communication between systems.</p></div>
-<div class="paragraph"><p>Websocket messages have no semantics on their own. Websocket
-is closer to TCP in that aspect, and requires you to design
-and implement your own protocol on top of it; or adapt an
-existing protocol to Websocket.</p></div>
-<div class="paragraph"><p>Cowboy provides an interface known as <a href="../ws_handlers">Websocket handlers</a>
-that gives complete control over a Websocket connection.</p></div>
-<div class="paragraph"><p>The Websocket protocol is defined by RFC 6455.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p><a href="../ws_protocol">Websocket</a> is a protocol built on top of HTTP/1.1 that provides a two-ways communication channel between the client and the server. Communication is asynchronous and can occur concurrently.</p>
+<p>It consists of a Javascript object allowing setting up a Websocket connection to the server, and a binary based protocol for sending data to the server or the client.</p>
+<p>Websocket connections can transfer either UTF-8 encoded text data or binary data. The protocol also includes support for implementing a ping/pong mechanism, allowing the server and the client to have more confidence that the connection is still alive.</p>
+<p>A Websocket connection can be used to transfer any kind of data, small or big, text or binary. Because of this Websocket is sometimes used for communication between systems.</p>
+<p>Websocket messages have no semantics on their own. Websocket is closer to TCP in that aspect, and requires you to design and implement your own protocol on top of it; or adapt an existing protocol to Websocket.</p>
+<p>Cowboy provides an interface known as <a href="../ws_handlers">Websocket handlers</a> that gives complete control over a Websocket connection.</p>
+<p>The Websocket protocol is defined by RFC 6455.</p>
<h2 id="_long_lived_requests">Long-lived requests</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy provides an interface that can be used to support
-long-polling or to stream large amounts of data reliably,
-including using Server-Sent Events.</p></div>
-<div class="paragraph"><p>Long-polling is a mechanism in which the client performs
-a request which may not be immediately answered by the
-server. It allows clients to request resources that may
-not currently exist, but are expected to be created soon,
-and which will be returned as soon as they are.</p></div>
-<div class="paragraph"><p>Long-polling is essentially a hack, but it is widely used
-to overcome limitations on older clients and servers.</p></div>
-<div class="paragraph"><p>Server-Sent Events is a small protocol defined as a media
-type, <code>text/event-stream</code>, along with a new HTTP header,
-<code>Last-Event-ID</code>. It is defined in the EventSource W3C
-specification.</p></div>
-<div class="paragraph"><p>Cowboy provides an interface known as <a href="../loop_handlers">loop handlers</a>
-that facilitates the implementation of long-polling or stream
-mechanisms. It works regardless of the underlying protocol.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Cowboy provides an interface that can be used to support long-polling or to stream large amounts of data reliably, including using Server-Sent Events.</p>
+<p>Long-polling is a mechanism in which the client performs a request which may not be immediately answered by the server. It allows clients to request resources that may not currently exist, but are expected to be created soon, and which will be returned as soon as they are.</p>
+<p>Long-polling is essentially a hack, but it is widely used to overcome limitations on older clients and servers.</p>
+<p>Server-Sent Events is a small protocol defined as a media type, <code>text/event-stream</code>, along with a new HTTP header, <code>Last-Event-ID</code>. It is defined in the EventSource W3C specification.</p>
+<p>Cowboy provides an interface known as <a href="../loop_handlers">loop handlers</a> that facilitates the implementation of long-polling or stream mechanisms. It works regardless of the underlying protocol.</p>
<h2 id="_rest">REST</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../rest_principles">REST, or REpresentational State Transfer</a>,
-is a style of architecture for loosely connected distributed
-systems. It can easily be implemented on top of HTTP.</p></div>
-<div class="paragraph"><p>REST is essentially a set of constraints to be followed.
-Many of these constraints are purely architectural and
-solved by simply using HTTP. Some constraints must be
-explicitly followed by the developer.</p></div>
-<div class="paragraph"><p>Cowboy provides an interface known as <a href="../rest_handlers">REST handlers</a>
-that simplifies the implementation of a REST API on top of
-the HTTP protocol.</p></div>
-</div>
-</div>
+<p><a href="../rest_principles">REST, or REpresentational State Transfer</a>, is a style of architecture for loosely connected distributed systems. It can easily be implemented on top of HTTP.</p>
+<p>REST is essentially a set of constraints to be followed. Many of these constraints are purely architectural and solved by simply using HTTP. Some constraints must be explicitly followed by the developer.</p>
+<p>Cowboy provides an interface known as <a href="../rest_handlers">REST handlers</a> that simplifies the implementation of a REST API on top of the HTTP protocol.</p>
+
diff --git a/docs/en/cowboy/2.0/guide/multipart/index.html b/docs/en/cowboy/2.0/guide/multipart/index.html
index 73525df2..7157eab1 100644
--- a/docs/en/cowboy/2.0/guide/multipart/index.html
+++ b/docs/en/cowboy/2.0/guide/multipart/index.html
@@ -62,169 +62,107 @@
<h1 class="lined-header"><span>Multipart requests</span></h1>
-<div class="paragraph"><p>Multipart originates from MIME, an Internet standard that
-extends the format of emails.</p></div>
-<div class="paragraph"><p>A multipart message is a list of parts. A part contains
-headers and a body. The body of the parts may be
-of any media type, and contain text or binary data.
-It is possible for parts to contain a multipart media
-type.</p></div>
-<div class="paragraph"><p>In the context of HTTP, multipart is most often used
-with the <code>multipart/form-data</code> media type. It is what
-browsers use to upload files through HTML forms.</p></div>
-<div class="paragraph"><p>The <code>multipart/byteranges</code> is also common. It is the
-media type used to send arbitrary bytes from a resource,
-enabling clients to resume downloads.</p></div>
-<div class="sect1">
+<p>Multipart originates from MIME, an Internet standard that extends the format of emails.</p>
+<p>A multipart message is a list of parts. A part contains headers and a body. The body of the parts may be of any media type, and contain text or binary data. It is possible for parts to contain a multipart media type.</p>
+<p>In the context of HTTP, multipart is most often used with the <code>multipart/form-data</code> media type. It is what browsers use to upload files through HTML forms.</p>
+<p>The <code>multipart/byteranges</code> is also common. It is the media type used to send arbitrary bytes from a resource, enabling clients to resume downloads.</p>
<h2 id="_form_data">Form-data</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>In the normal case, when a form is submitted, the
-browser will use the <code>application/x-www-form-urlencoded</code>
-content-type. This type is just a list of keys and
-values and is therefore not fit for uploading files.</p></div>
-<div class="paragraph"><p>That&#8217;s where the <code>multipart/form-data</code> content-type
-comes in. When the form is configured to use this
-content-type, the browser will create a multipart
-message where each part corresponds to a field on
-the form. For files, it also adds some metadata in
-the part headers, like the file name.</p></div>
-<div class="paragraph"><p>A form with a text input, a file input and a select
-choice box will result in a multipart message with
-three parts, one for each field.</p></div>
-<div class="paragraph"><p>The browser does its best to determine the media type
-of the files it sends this way, but you should not
-rely on it for determining the contents of the file.
-Proper investigation of the contents is recommended.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>In the normal case, when a form is submitted, the browser will use the <code>application/x-www-form-urlencoded</code> content-type. This type is just a list of keys and values and is therefore not fit for uploading files.</p>
+<p>That&apos;s where the <code>multipart/form-data</code> content-type comes in. When the form is configured to use this content-type, the browser will create a multipart message where each part corresponds to a field on the form. For files, it also adds some metadata in the part headers, like the file name.</p>
+<p>A form with a text input, a file input and a select choice box will result in a multipart message with three parts, one for each field.</p>
+<p>The browser does its best to determine the media type of the files it sends this way, but you should not rely on it for determining the contents of the file. Proper investigation of the contents is recommended.</p>
<h2 id="_checking_for_multipart_messages">Checking for multipart messages</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The content-type header indicates the presence of
-a multipart message:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The content-type header indicates the presence of a multipart message:</p>
+<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">&lt;&lt;</span><span style="color: #FF0000">"multipart"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"form-data"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">_</span>}
- <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:parse_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#990000">&lt;&lt;</font><font color="#FF0000">"multipart"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"form-data"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">_</font>}
+ <font color="#990000">=</font> <b><font color="#000000">cowboy_req:parse_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_reading_a_multipart_message">Reading a multipart message</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy provides two sets of functions for reading
-request bodies as multipart messages.</p></div>
-<div class="paragraph"><p>The <code>cowboy_req:read_part/1,2</code> functions return the
-next part&#8217;s headers, if any.</p></div>
-<div class="paragraph"><p>The <code>cowboy_req:read_part_body/1,2</code> functions return
-the current part&#8217;s body. For large bodies you may
-need to call the function multiple times.</p></div>
-<div class="paragraph"><p>To read a multipart message you need to iterate over
-all its parts:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Cowboy provides two sets of functions for reading request bodies as multipart messages.</p>
+<p>The <code>cowboy_req:read_part/1,2</code> functions return the next part&apos;s headers, if any.</p>
+<p>The <code>cowboy_req:read_part_body/1,2</code> functions return the current part&apos;s body. For large bodies you may need to call the function multiple times.</p>
+<p>To read a multipart message you need to iterate over all its parts:</p>
+<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">multipart</span></span>(<span style="color: #009900">Req0</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">cowboy_req:read_part</span></span>(<span style="color: #009900">Req0</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">_Headers</span>, <span style="color: #009900">Req1</span>} <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">_Body</span>, <span style="color: #009900">Req</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="font-weight: bold"><span style="color: #000000">multipart</span></span>(<span style="color: #009900">Req</span>);
- {<span style="color: #FF6600">done</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">-&gt;</span>
- <span style="color: #009900">Req</span>
- <span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>When part bodies are too large, Cowboy will return
-a <code>more</code> tuple, and allow you to loop until the part
-body has been fully read.</p></div>
-<div class="paragraph"><p>The function <code>cow_multipart:form_data/1</code> can be used
-to quickly obtain information about a part from a
-<code>multipart/form-data</code> message. The function returns
-a <code>data</code> or a <code>file</code> tuple depending on whether this
-is a normal field or a file being uploaded.</p></div>
-<div class="paragraph"><p>The following snippet will use this function and
-use different strategies depending on whether the
-part is a file:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">multipart</font></b>(<font color="#009900">Req0</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">case</font></b> <b><font color="#000000">cowboy_req:read_part</font></b>(<font color="#009900">Req0</font>) <b><font color="#0000FF">of</font></b>
+ {<font color="#FF6600">ok</font>, <font color="#009900">_Headers</font>, <font color="#009900">Req1</font>} <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <font color="#009900">_Body</font>, <font color="#009900">Req</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:read_part_body</font></b>(<font color="#009900">Req1</font>),
+ <b><font color="#000000">multipart</font></b>(<font color="#009900">Req</font>);
+ {<font color="#FF6600">done</font>, <font color="#009900">Req</font>} <font color="#990000">-&gt;</font>
+ <font color="#009900">Req</font>
+ <b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>When part bodies are too large, Cowboy will return a <code>more</code> tuple, and allow you to loop until the part body has been fully read.</p>
+<p>The function <code>cow_multipart:form_data/1</code> can be used to quickly obtain information about a part from a <code>multipart/form-data</code> message. The function returns a <code>data</code> or a <code>file</code> tuple depending on whether this is a normal field or a file being uploaded.</p>
+<p>The following snippet will use this function and use different strategies depending on whether the part is a file:</p>
+<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">multipart</span></span>(<span style="color: #009900">Req0</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">cowboy_req:read_part</span></span>(<span style="color: #009900">Req0</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Headers</span>, <span style="color: #009900">Req1</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: #0000FF">case</span></span> <span style="font-weight: bold"><span style="color: #000000">cow_multipart:form_data</span></span>(<span style="color: #009900">Headers</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
- {<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: #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>);
- {<span style="color: #FF6600">done</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">-&gt;</span>
- <span style="color: #009900">Req</span>
- <span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span>
-
-<span style="font-weight: bold"><span style="color: #000000">stream_file</span></span>(<span style="color: #009900">Req0</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">cowboy_req:read_part_body</span></span>(<span style="color: #009900">Req0</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">_LastBodyChunk</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">-&gt;</span>
- <span style="color: #009900">Req</span>;
- {<span style="color: #FF6600">more</span>, <span style="color: #009900">_BodyChunk</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #000000">stream_file</span></span>(<span style="color: #009900">Req</span>)
- <span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Both the part header and body reading functions can take
-options that will be given to the request body reading
-functions. By default, <code>cowboy_req:read_part/1</code> reads
-up to 64KB for up to 5 seconds. <code>cowboy_req:read_part_body/1</code>
-has the same defaults as <code>cowboy_req:read_body/1</code>.</p></div>
-<div class="paragraph"><p>To change the defaults for part headers:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">multipart</font></b>(<font color="#009900">Req0</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">case</font></b> <b><font color="#000000">cowboy_req:read_part</font></b>(<font color="#009900">Req0</font>) <b><font color="#0000FF">of</font></b>
+ {<font color="#FF6600">ok</font>, <font color="#009900">Headers</font>, <font color="#009900">Req1</font>} <font color="#990000">-&gt;</font>
+ <font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#0000FF">case</font></b> <b><font color="#000000">cow_multipart:form_data</font></b>(<font color="#009900">Headers</font>) <b><font color="#0000FF">of</font></b>
+ {<font color="#FF6600">data</font>, <font color="#009900">_FieldName</font>} <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <font color="#009900">_Body</font>, <font color="#009900">Req2</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:read_part_body</font></b>(<font color="#009900">Req1</font>),
+ <font color="#009900">Req2</font>;
+ {<font color="#FF6600">file</font>, <font color="#009900">_FieldName</font>, <font color="#009900">_Filename</font>, <font color="#009900">_CType</font>} <font color="#990000">-&gt;</font>
+ <b><font color="#000000">stream_file</font></b>(<font color="#009900">Req1</font>)
+ <b><font color="#0000FF">end</font></b>,
+ <b><font color="#000000">multipart</font></b>(<font color="#009900">Req</font>);
+ {<font color="#FF6600">done</font>, <font color="#009900">Req</font>} <font color="#990000">-&gt;</font>
+ <font color="#009900">Req</font>
+ <b><font color="#0000FF">end</font></b><font color="#990000">.</font>
+
+<b><font color="#000000">stream_file</font></b>(<font color="#009900">Req0</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">case</font></b> <b><font color="#000000">cowboy_req:read_part_body</font></b>(<font color="#009900">Req0</font>) <b><font color="#0000FF">of</font></b>
+ {<font color="#FF6600">ok</font>, <font color="#009900">_LastBodyChunk</font>, <font color="#009900">Req</font>} <font color="#990000">-&gt;</font>
+ <font color="#009900">Req</font>;
+ {<font color="#FF6600">more</font>, <font color="#009900">_BodyChunk</font>, <font color="#009900">Req</font>} <font color="#990000">-&gt;</font>
+ <b><font color="#000000">stream_file</font></b>(<font color="#009900">Req</font>)
+ <b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Both the part header and body reading functions can take options that will be given to the request body reading functions. By default, <code>cowboy_req:read_part/1</code> reads up to 64KB for up to 5 seconds. <code>cowboy_req:read_part_body/1</code> has the same defaults as <code>cowboy_req:read_body/1</code>.</p>
+<p>To change the defaults for part headers:</p>
+<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">cowboy_req:read_part</span></span>(<span style="color: #009900">Req</span>, #{<span style="font-weight: bold"><span style="color: #000080">length</span></span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">128000</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>And for part bodies:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">cowboy_req:read_part</font></b>(<font color="#009900">Req</font>, #{<b><font color="#000080">length</font></b> <font color="#990000">=&gt;</font> <font color="#993399">128000</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>And for part bodies:</p>
+<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">cowboy_req:read_part_body</span></span>(<span style="color: #009900">Req</span>, #{<span style="font-weight: bold"><span style="color: #000080">length</span></span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">1000000</span>, <span style="color: #0000FF">period</span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">7000</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">cowboy_req:read_part_body</font></b>(<font color="#009900">Req</font>, #{<b><font color="#000080">length</font></b> <font color="#990000">=&gt;</font> <font color="#993399">1000000</font>, <font color="#0000FF">period</font> <font color="#990000">=&gt;</font> <font color="#993399">7000</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_skipping_unwanted_parts">Skipping unwanted parts</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Part bodies do not have to be read. Cowboy will automatically
-skip it when you request the next part&#8217;s body.</p></div>
-<div class="paragraph"><p>The following snippet reads all part headers and skips
-all bodies:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Part bodies do not have to be read. Cowboy will automatically skip it when you request the next part&apos;s body.</p>
+<p>The following snippet reads all part headers and skips all bodies:</p>
+<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">multipart</span></span>(<span style="color: #009900">Req0</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">cowboy_req:read_part</span></span>(<span style="color: #009900">Req0</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">_Headers</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #000000">multipart</span></span>(<span style="color: #009900">Req</span>);
- {<span style="color: #FF6600">done</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">-&gt;</span>
- <span style="color: #009900">Req</span>
- <span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Similarly, if you start reading the body and it ends up
-being too big, you can simply continue with the next part.
-Cowboy will automatically skip what remains.</p></div>
-<div class="paragraph"><p>While Cowboy can skip part bodies automatically, the read
-rate is not configurable. Depending on your application
-you may want to skip manually, in particular if you observe
-poor performance while skipping.</p></div>
-<div class="paragraph"><p>You do not have to read all parts either. You can stop
-reading as soon as you find the data you need.</p></div>
-</div>
-</div>
+<pre><tt><b><font color="#000000">multipart</font></b>(<font color="#009900">Req0</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">case</font></b> <b><font color="#000000">cowboy_req:read_part</font></b>(<font color="#009900">Req0</font>) <b><font color="#0000FF">of</font></b>
+ {<font color="#FF6600">ok</font>, <font color="#009900">_Headers</font>, <font color="#009900">Req</font>} <font color="#990000">-&gt;</font>
+ <b><font color="#000000">multipart</font></b>(<font color="#009900">Req</font>);
+ {<font color="#FF6600">done</font>, <font color="#009900">Req</font>} <font color="#990000">-&gt;</font>
+ <font color="#009900">Req</font>
+ <b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Similarly, if you start reading the body and it ends up being too big, you can simply continue with the next part. Cowboy will automatically skip what remains.</p>
+<p>While Cowboy can skip part bodies automatically, the read rate is not configurable. Depending on your application you may want to skip manually, in particular if you observe poor performance while skipping.</p>
+<p>You do not have to read all parts either. You can stop reading as soon as you find the data you need.</p>
+<!-- @todo Cover the building of multipart messages.-->
+
diff --git a/docs/en/cowboy/2.0/guide/req/index.html b/docs/en/cowboy/2.0/guide/req/index.html
index baf17ce4..938c3e01 100644
--- a/docs/en/cowboy/2.0/guide/req/index.html
+++ b/docs/en/cowboy/2.0/guide/req/index.html
@@ -62,407 +62,283 @@
<h1 class="lined-header"><span>The Req object</span></h1>
-<div class="paragraph"><p>The Req object is a variable used for obtaining information
-about a request, read its body or send a response.</p></div>
-<div class="paragraph"><p>It is not really an object in the object-oriented sense.
-It is a simple map that can be directly accessed or
-used when calling functions from the <code>cowboy_req</code> module.</p></div>
-<div class="paragraph"><p>The Req object is the subject of a few different chapters.
-In this chapter we will learn about the Req object and
-look at how to retrieve information about the request.</p></div>
-<div class="sect1">
+<p>The Req object is a variable used for obtaining information about a request, read its body or send a response.</p>
+<p>It is not really an object in the object-oriented sense. It is a simple map that can be directly accessed or used when calling functions from the <code>cowboy_req</code> module.</p>
+<p>The Req object is the subject of a few different chapters. In this chapter we will learn about the Req object and look at how to retrieve information about the request.</p>
<h2 id="_direct_access">Direct access</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The Req map contains a number of fields which are documented
-and can be accessed directly. They are the fields that have
-a direct mapping to HTTP: the request <code>method</code>; the HTTP
-<code>version</code> used; the effective URI components <code>scheme</code>,
-<code>host</code>, <code>port</code>, <code>path</code> and <code>qs</code>; the request <code>headers</code>;
-and the connection <code>peer</code> address and port.</p></div>
-<div class="paragraph"><p>Note that the <code>version</code> field can be used to determine
-whether a connection is using HTTP/2.</p></div>
-<div class="paragraph"><p>To access a field, you can simply match in the function
-head. The following example sends a simple "Hello world!"
-response when the <code>method</code> is GET, and a 405 error
-otherwise.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The Req map contains a number of fields which are documented and can be accessed directly. They are the fields that have a direct mapping to HTTP: the request <code>method</code>; the HTTP <code>version</code> used; the effective URI components <code>scheme</code>, <code>host</code>, <code>port</code>, <code>path</code> and <code>qs</code>; the request <code>headers</code>; and the connection <code>peer</code> address and port.</p>
+<p>Note that the <code>version</code> field can be used to determine whether a connection is using HTTP/2.</p>
+<p>To access a field, you can simply match in the function head. The following example sends a simple &quot;Hello world!&quot; response when the <code>method</code> is GET, and a 405 error otherwise.</p>
+<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">init</span></span>(<span style="color: #009900">Req0</span><span style="color: #990000">=</span>#{<span style="color: #FF6600">method</span> <span style="color: #990000">:=</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"GET"</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">200</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/plain"</span><span style="color: #990000">&gt;&gt;</span>
- }, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Hello world!"</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">Req0</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">405</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"allow"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"GET"</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="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Any other field is internal and should not be accessed.
-They may change in future releases, including maintenance
-releases, without notice.</p></div>
-<div class="paragraph"><p>Modifying the Req object, while allowed, is not recommended
-unless strictly necessary. If adding new fields, make sure
-to namespace the field names so that no conflict can occur
-with future Cowboy updates or third party projects.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req0</font><font color="#990000">=</font>#{<font color="#FF6600">method</font> <font color="#990000">:=</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"GET"</font><font color="#990000">&gt;&gt;</font>}, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ <font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:reply</font></b>(<font color="#993399">200</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/plain"</font><font color="#990000">&gt;&gt;</font>
+ }, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"Hello world!"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req0</font>),
+ {<font color="#FF6600">ok</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>};
+<b><font color="#000000">init</font></b>(<font color="#009900">Req0</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ <font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:reply</font></b>(<font color="#993399">405</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"allow"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"GET"</font><font color="#990000">&gt;&gt;</font>
+ }, <font color="#009900">Req0</font>),
+ {<font color="#FF6600">ok</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Any other field is internal and should not be accessed. They may change in future releases, including maintenance releases, without notice.</p>
+<p>Modifying the Req object, while allowed, is not recommended unless strictly necessary. If adding new fields, make sure to namespace the field names so that no conflict can occur with future Cowboy updates or third party projects.</p>
+<!-- @todo There are currently no tests for direct access.-->
<h2 id="_introduction_to_the_cowboy_req_interface">Introduction to the cowboy_req interface</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Functions in the <code>cowboy_req</code> module provide access to
-the request information but also various operations that
-are common when dealing with HTTP requests.</p></div>
-<div class="paragraph"><p>All the functions that begin with a verb indicate an action.
-Other functions simply return the corresponding value
-(sometimes that value does need to be built, but the
-cost of the operation is equivalent to retrieving a value).</p></div>
-<div class="paragraph"><p>Some of the <code>cowboy_req</code> functions return an updated Req
-object. They are the read, reply, set and delete functions.
-While ignoring the returned Req will not cause incorrect
-behavior for some of them, it is highly recommended to
-always keep and use the last returned Req object. The
-manual for <code>cowboy_req</code> details these functions and what
-modifications are done to the Req object.</p></div>
-<div class="paragraph"><p>Some of the calls to <code>cowboy_req</code> have side effects. This
-is the case of the read and reply functions. Cowboy reads
-the request body or replies immediately when the function
-is called.</p></div>
-<div class="paragraph"><p>All functions will crash if something goes wrong. There
-is usually no need to catch these errors, Cowboy will
-send the appropriate 4xx or 5xx response depending on
-where the crash occurred.</p></div>
-</div>
-</div>
-<div class="sect1">
+<!-- @todo Link to cowboy_req manual-->
+<p>Functions in the <code>cowboy_req</code> module provide access to the request information but also various operations that are common when dealing with HTTP requests.</p>
+<p>All the functions that begin with a verb indicate an action. Other functions simply return the corresponding value (sometimes that value does need to be built, but the cost of the operation is equivalent to retrieving a value).</p>
+<p>Some of the <code>cowboy_req</code> functions return an updated Req object. They are the read, reply, set and delete functions. While ignoring the returned Req will not cause incorrect behavior for some of them, it is highly recommended to always keep and use the last returned Req object. The manual for <code>cowboy_req</code> details these functions and what modifications are done to the Req object.</p>
+<p>Some of the calls to <code>cowboy_req</code> have side effects. This is the case of the read and reply functions. Cowboy reads the request body or replies immediately when the function is called.</p>
+<p>All functions will crash if something goes wrong. There is usually no need to catch these errors, Cowboy will send the appropriate 4xx or 5xx response depending on where the crash occurred.</p>
<h2 id="_request_method">Request method</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The request method can be retrieved directly:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The request method can be retrieved directly:</p>
+<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 class="paragraph"><p>Or using a function:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>#{<font color="#FF6600">method</font> <font color="#990000">:=</font> <font color="#009900">Method</font>} <font color="#990000">=</font> <font color="#009900">Req</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Or using a function:</p>
+<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">Method</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="paragraph"><p>The method is a case sensitive binary string. Standard
-methods include GET, HEAD, OPTIONS, PATCH, POST, PUT
-or DELETE.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Method</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:method</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>The method is a case sensitive binary string. Standard methods include GET, HEAD, OPTIONS, PATCH, POST, PUT or DELETE.</p>
<h2 id="_http_version">HTTP version</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The HTTP version is informational. It does not indicate that
-the client implements the protocol well or fully.</p></div>
-<div class="paragraph"><p>There is typically no need to change behavior based on the
-HTTP version: Cowboy already does it for you.</p></div>
-<div class="paragraph"><p>It can be useful in some cases, though. For example, one may
-want to redirect HTTP/1.1 clients to use Websocket, while HTTP/2
-clients keep using HTTP/2.</p></div>
-<div class="paragraph"><p>The HTTP version can be retrieved directly:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The HTTP version is informational. It does not indicate that the client implements the protocol well or fully.</p>
+<p>There is typically no need to change behavior based on the HTTP version: Cowboy already does it for you.</p>
+<p>It can be useful in some cases, though. For example, one may want to redirect HTTP/1.1 clients to use Websocket, while HTTP/2 clients keep using HTTP/2.</p>
+<p>The HTTP version can be retrieved directly:</p>
+<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 class="paragraph"><p>Or using a function:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>#{<font color="#FF6600">version</font> <font color="#990000">:=</font> <font color="#009900">Version</font>} <font color="#990000">=</font> <font color="#009900">Req</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Or using a function:</p>
+<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">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 class="paragraph"><p>Cowboy defines the <code>'HTTP/1.0'</code>, <code>'HTTP/1.1'</code> and <code>'HTTP/2'</code>
-versions. Custom protocols can define their own values as
-atoms.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Version</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:version</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Cowboy defines the <code>&apos;HTTP/1.0&apos;</code>, <code>&apos;HTTP/1.1&apos;</code> and <code>&apos;HTTP/2&apos;</code> versions. Custom protocols can define their own values as atoms.</p>
<h2 id="_effective_request_uri">Effective request URI</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The scheme, host, port, path and query string components
-of the effective request URI can all be retrieved directly:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The scheme, host, port, path and query string components of the effective request URI can all be retrieved directly:</p>
+<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: #FF6600">host</span> <span style="color: #990000">:=</span> <span style="color: #009900">Host</span>,
- <span style="color: #FF6600">port</span> <span style="color: #990000">:=</span> <span style="color: #009900">Port</span>,
- <span style="color: #FF6600">path</span> <span style="color: #990000">:=</span> <span style="color: #009900">Path</span>,
- <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 class="paragraph"><p>Or using the related functions:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+ <font color="#FF6600">scheme</font> <font color="#990000">:=</font> <font color="#009900">Scheme</font>,
+ <font color="#FF6600">host</font> <font color="#990000">:=</font> <font color="#009900">Host</font>,
+ <font color="#FF6600">port</font> <font color="#990000">:=</font> <font color="#009900">Port</font>,
+ <font color="#FF6600">path</font> <font color="#990000">:=</font> <font color="#009900">Path</font>,
+ <font color="#FF6600">qs</font> <font color="#990000">:=</font> <font color="#009900">Qs</font>
+} <font color="#990000">=</font> <font color="#009900">Req</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Or using the related functions:</p>
+<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">Scheme</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:scheme</span></span>(<span style="color: #009900">Req</span>),
-<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: #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: #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>
-<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 class="paragraph"><p>The scheme and host are lowercased case insensitive binary
-strings. The port is an integer representing the port number.
-The path and query string are case sensitive binary strings.</p></div>
-<div class="paragraph"><p>Cowboy defines only the <code>&lt;&lt;"http"&gt;&gt;</code> and <code>&lt;&lt;"https"&gt;&gt;</code> schemes.
-They are chosen so that the scheme will only be <code>&lt;&lt;"https"&gt;&gt;</code>
-for requests on secure HTTP/1.1 or HTTP/2 connections.</p></div>
-<div class="paragraph"><p>The effective request URI itself can be reconstructed with
-the <code>cowboy_req:uri/1,2</code> function. By default, an absolute
-URI is returned:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Scheme</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:scheme</font></b>(<font color="#009900">Req</font>),
+<font color="#009900">Host</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:host</font></b>(<font color="#009900">Req</font>),
+<font color="#009900">Port</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:port</font></b>(<font color="#009900">Req</font>),
+<font color="#009900">Path</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:path</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font>
+<font color="#009900">Qs</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:qs</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>The scheme and host are lowercased case insensitive binary strings. The port is an integer representing the port number. The path and query string are case sensitive binary strings.</p>
+<p>Cowboy defines only the <code>&lt;&lt;&quot;http&quot;&gt;&gt;</code> and <code>&lt;&lt;&quot;https&quot;&gt;&gt;</code> schemes. They are chosen so that the scheme will only be <code>&lt;&lt;&quot;https&quot;&gt;&gt;</code> for requests on secure HTTP/1.1 or HTTP/2 connections.</p>
+<!-- @todo Is that tested well?-->
+<p>The effective request URI itself can be reconstructed with the <code>cowboy_req:uri/1,2</code> function. By default, an absolute URI is returned:</p>
+<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-style: italic"><span style="color: #9A1900">%% </span></span><span style="text-decoration: underline"><span style="color: #0000FF">scheme://host</span></span><span style="font-style: italic"><span style="color: #9A1900">[:port]/path[?qs]</span></span>
-<span style="color: #009900">URI</span> <span style="color: #990000">=</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 class="paragraph"><p>Options are available to either disable or replace some
-or all of the components. Various URIs or URI formats can
-be generated this way, including the origin form:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><i><font color="#9A1900">%% </font></i><u><font color="#0000FF">scheme://host</font></u><i><font color="#9A1900">[:port]/path[?qs]</font></i>
+<font color="#009900">URI</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:uri</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Options are available to either disable or replace some or all of the components. Various URIs or URI formats can be generated this way, including the origin form:</p>
+<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-style: italic"><span style="color: #9A1900">%% /path[?qs]</span></span>
-<span style="color: #009900">URI</span> <span style="color: #990000">=</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="paragraph"><p>The protocol relative form:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><i><font color="#9A1900">%% /path[?qs]</font></i>
+<font color="#009900">URI</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:uri</font></b>(<font color="#009900">Req</font>, #{<font color="#0000FF">host</font> <font color="#990000">=&gt;</font> <font color="#000080">undefined</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>The protocol relative form:</p>
+<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-style: italic"><span style="color: #9A1900">%% //host[:port]/path[?qs]</span></span>
-<span style="color: #009900">URI</span> <span style="color: #990000">=</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="paragraph"><p>The absolute URI without a query string:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><i><font color="#9A1900">%% //host[:port]/path[?qs]</font></i>
+<font color="#009900">URI</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:uri</font></b>(<font color="#009900">Req</font>, #{<font color="#0000FF">scheme</font> <font color="#990000">=&gt;</font> <font color="#000080">undefined</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>The absolute URI without a query string:</p>
+<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">URI</span> <span style="color: #990000">=</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">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="paragraph"><p>A different host:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">URI</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:uri</font></b>(<font color="#009900">Req</font>, #{<font color="#0000FF">qs</font> <font color="#990000">=&gt;</font> <font color="#000080">undefined</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>A different host:</p>
+<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">URI</span> <span style="color: #990000">=</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: #990000">&lt;&lt;</span><span style="color: #FF0000">"example.org"</span><span style="color: #990000">&gt;&gt;</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>And any other combination.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">URI</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:uri</font></b>(<font color="#009900">Req</font>, #{<font color="#0000FF">host</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"example.org"</font><font color="#990000">&gt;&gt;</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>And any other combination.</p>
<h2 id="_bindings">Bindings</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Bindings are the host and path components that you chose
-to extract when defining the routes of your application.
-They are only available after the routing.</p></div>
-<div class="paragraph"><p>Cowboy provides functions to retrieve one or all bindings.</p></div>
-<div class="paragraph"><p>To retrieve a single value:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Bindings are the host and path components that you chose to extract when defining the routes of your application. They are only available after the routing.</p>
+<p>Cowboy provides functions to retrieve one or all bindings.</p>
+<p>To retrieve a single value:</p>
+<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">Value</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:binding</span></span>(<span style="color: #FF6600">userid</span>, <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>When attempting to retrieve a value that was not bound,
-<code>undefined</code> will be returned. A different default value
-can be provided:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Value</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:binding</font></b>(<font color="#FF6600">userid</font>, <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>When attempting to retrieve a value that was not bound, <code>undefined</code> will be returned. A different default value can be provided:</p>
+<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">Value</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:binding</span></span>(<span style="color: #FF6600">userid</span>, <span style="color: #009900">Req</span>, <span style="color: #993399">42</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>To retrieve everything that was bound:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Value</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:binding</font></b>(<font color="#FF6600">userid</font>, <font color="#009900">Req</font>, <font color="#993399">42</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>To retrieve everything that was bound:</p>
+<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">Bindings</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:bindings</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>They are returned as a map, with keys being atoms.</p></div>
-<div class="paragraph"><p>The Cowboy router also allows you to capture many host
-or path segments at once using the <code>...</code> qualifier.</p></div>
-<div class="paragraph"><p>To retrieve the segments captured from the host name:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Bindings</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:bindings</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>They are returned as a map, with keys being atoms.</p>
+<p>The Cowboy router also allows you to capture many host or path segments at once using the <code>...</code> qualifier.</p>
+<p>To retrieve the segments captured from the host name:</p>
+<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">HostInfo</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:host_info</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>And the path segments:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">HostInfo</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:host_info</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>And the path segments:</p>
+<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">PathInfo</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:path_info</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Cowboy will return <code>undefined</code> if <code>...</code> was not used
-in the route.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">PathInfo</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:path_info</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Cowboy will return <code>undefined</code> if <code>...</code> was not used in the route.</p>
<h2 id="_query_parameters">Query parameters</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy provides two functions to access query parameters.
-You can use the first to get the entire list of parameters.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Cowboy provides two functions to access query parameters. You can use the first to get the entire list of parameters.</p>
+<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">QsVals</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:parse_qs</span></span>(<span style="color: #009900">Req</span>),
-{<span style="color: #990000">_</span>, <span style="color: #009900">Lang</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">lists:keyfind</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"lang"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #993399">1</span>, <span style="color: #009900">QsVals</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Cowboy will only parse the query string, and not do any
-transformation. This function may therefore return duplicates,
-or parameter names without an associated value. The order of
-the list returned is undefined.</p></div>
-<div class="paragraph"><p>When a query string is <code>key=1&amp;key=2</code>, the list returned will
-contain two parameters of name <code>key</code>.</p></div>
-<div class="paragraph"><p>The same is true when trying to use the PHP-style suffix <code>[]</code>.
-When a query string is <code>key[]=1&amp;key[]=2</code>, the list returned will
-contain two parameters of name <code>key[]</code>.</p></div>
-<div class="paragraph"><p>When a query string is simply <code>key</code>, Cowboy will return the
-list <code>[{&lt;&lt;"key"&gt;&gt;, true}]</code>, using <code>true</code> to indicate that the
-parameter <code>key</code> was defined, but with no value.</p></div>
-<div class="paragraph"><p>The second function Cowboy provides allows you to match out
-only the parameters you are interested in, and at the same
-time do any post processing you require using <a href="../constraints">constraints</a>.
-This function returns a map.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">QsVals</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:parse_qs</font></b>(<font color="#009900">Req</font>),
+{<font color="#990000">_</font>, <font color="#009900">Lang</font>} <font color="#990000">=</font> <b><font color="#000000">lists:keyfind</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"lang"</font><font color="#990000">&gt;&gt;</font>, <font color="#993399">1</font>, <font color="#009900">QsVals</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Cowboy will only parse the query string, and not do any transformation. This function may therefore return duplicates, or parameter names without an associated value. The order of the list returned is undefined.</p>
+<p>When a query string is <code>key=1&amp;key=2</code>, the list returned will contain two parameters of name <code>key</code>.</p>
+<p>The same is true when trying to use the PHP-style suffix <code>[]</code>. When a query string is <code>key[]=1&amp;key[]=2</code>, the list returned will contain two parameters of name <code>key[]</code>.</p>
+<p>When a query string is simply <code>key</code>, Cowboy will return the list <code>[{&lt;&lt;&quot;key&quot;&gt;&gt;, true}]</code>, using <code>true</code> to indicate that the parameter <code>key</code> was defined, but with no value.</p>
+<p>The second function Cowboy provides allows you to match out only the parameters you are interested in, and at the same time do any post processing you require using <a href="../constraints">constraints</a>. This function returns a map.</p>
+<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">id</span> <span style="color: #990000">:=</span> <span style="color: #009900">ID</span>, <span style="color: #FF6600">lang</span> <span style="color: #990000">:=</span> <span style="color: #009900">Lang</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:match_qs</span></span>([<span style="color: #FF6600">id</span>, <span style="color: #FF6600">lang</span>], <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Constraints can be applied automatically. The following
-snippet will crash when the <code>id</code> parameter is not an integer,
-or when the <code>lang</code> parameter is empty. At the same time, the
-value for <code>id</code> will be converted to an integer term:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>#{<font color="#FF6600">id</font> <font color="#990000">:=</font> <font color="#009900">ID</font>, <font color="#FF6600">lang</font> <font color="#990000">:=</font> <font color="#009900">Lang</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:match_qs</font></b>([<font color="#FF6600">id</font>, <font color="#FF6600">lang</font>], <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Constraints can be applied automatically. The following snippet will crash when the <code>id</code> parameter is not an integer, or when the <code>lang</code> parameter is empty. At the same time, the value for <code>id</code> will be converted to an integer term:</p>
+<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">QsMap</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:match_qs</span></span>([{<span style="color: #FF6600">id</span>, <span style="color: #FF6600">int</span>}, {<span style="color: #FF6600">lang</span>, <span style="color: #FF6600">nonempty</span>}], <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>A default value may also be provided. The default will be used
-if the <code>lang</code> key is not found. It will not be used if
-the key is found but has an empty value.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">QsMap</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:match_qs</font></b>([{<font color="#FF6600">id</font>, <font color="#FF6600">int</font>}, {<font color="#FF6600">lang</font>, <font color="#FF6600">nonempty</font>}], <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>A default value may also be provided. The default will be used if the <code>lang</code> key is not found. It will not be used if the key is found but has an empty value.</p>
+<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">lang</span> <span style="color: #990000">:=</span> <span style="color: #009900">Lang</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:match_qs</span></span>([{<span style="color: #FF6600">lang</span>, [], <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"en-US"</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="paragraph"><p>If no default is provided and the value is missing, the
-query string is deemed invalid and the process will crash.</p></div>
-<div class="paragraph"><p>When the query string is <code>key=1&amp;key=2</code>, the value for <code>key</code>
-will be the list <code>[1, 2]</code>. Parameter names do not need to
-include the PHP-style suffix. Constraints may be used to
-ensure that only one value was passed through.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>#{<font color="#FF6600">lang</font> <font color="#990000">:=</font> <font color="#009900">Lang</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:match_qs</font></b>([{<font color="#FF6600">lang</font>, [], <font color="#990000">&lt;&lt;</font><font color="#FF0000">"en-US"</font><font color="#990000">&gt;&gt;</font>}], <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>If no default is provided and the value is missing, the query string is deemed invalid and the process will crash.</p>
+<p>When the query string is <code>key=1&amp;key=2</code>, the value for <code>key</code> will be the list <code>[1, 2]</code>. Parameter names do not need to include the PHP-style suffix. Constraints may be used to ensure that only one value was passed through.</p>
<h2 id="_headers">Headers</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Header values can be retrieved either as a binary string
-or parsed into a more meaningful representation.</p></div>
-<div class="paragraph"><p>The get the raw value:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Header values can be retrieved either as a binary string or parsed into a more meaningful representation.</p>
+<p>The get the raw value:</p>
+<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">HeaderVal</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-type"</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="paragraph"><p>Cowboy expects all header names to be provided as lowercase
-binary strings. This is true for both requests and responses,
-regardless of the underlying protocol.</p></div>
-<div class="paragraph"><p>When the header is missing from the request, <code>undefined</code>
-will be returned. A different default can be provided:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">HeaderVal</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Cowboy expects all header names to be provided as lowercase binary strings. This is true for both requests and responses, regardless of the underlying protocol.</p>
+<p>When the header is missing from the request, <code>undefined</code> will be returned. A different default can be provided:</p>
+<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">HeaderVal</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-type"</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">"text/plain"</span><span style="color: #990000">&gt;&gt;</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>All headers can be retrieved at once, either directly:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">HeaderVal</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/plain"</font><font color="#990000">&gt;&gt;</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>All headers can be retrieved at once, either directly:</p>
+<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">AllHeaders</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>Or using a function:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>#{<font color="#FF6600">headers</font> <font color="#990000">:=</font> <font color="#009900">AllHeaders</font>} <font color="#990000">=</font> <font color="#009900">Req</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Or using a function:</p>
+<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">AllHeaders</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 class="paragraph"><p>Cowboy provides equivalent functions to parse individual
-headers. There is no function to parse all headers at once.</p></div>
-<div class="paragraph"><p>To parse a specific header:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">AllHeaders</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:headers</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Cowboy provides equivalent functions to parse individual headers. There is no function to parse all headers at once.</p>
+<p>To parse a specific header:</p>
+<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">ParsedVal</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:parse_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</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="paragraph"><p>An exception will be thrown if it doesn&#8217;t know how to parse the
-given header, or if the value is invalid. The list of known headers
-and default values can be found in the manual.</p></div>
-<div class="paragraph"><p>When the header is missing, <code>undefined</code> is returned. You can
-change the default value. Note that it should be the parsed value
-directly:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">ParsedVal</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:parse_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>An exception will be thrown if it doesn&apos;t know how to parse the given header, or if the value is invalid. The list of known headers and default values can be found in the manual.</p>
+<p>When the header is missing, <code>undefined</code> is returned. You can change the default value. Note that it should be the parsed value directly:</p>
+<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">ParsedVal</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:parse_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</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">"text"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"plain"</span><span style="color: #990000">&gt;&gt;</span>, []})<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">ParsedVal</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:parse_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>,
+ {<font color="#990000">&lt;&lt;</font><font color="#FF0000">"text"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"plain"</font><font color="#990000">&gt;&gt;</font>, []})<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_peer">Peer</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The peer address and port number for the connection can be
-retrieved either directly or using a function.</p></div>
-<div class="paragraph"><p>To retrieve the peer directly:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The peer address and port number for the connection can be retrieved either directly or using a function.</p>
+<p>To retrieve the peer directly:</p>
+<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 class="paragraph"><p>And using a function:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>#{<font color="#FF6600">peer</font> <font color="#990000">:=</font> {<font color="#009900">IP</font>, <font color="#009900">Port</font>}} <font color="#990000">=</font> <font color="#009900">Req</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>And using a function:</p>
+<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">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 class="paragraph"><p>Note that the peer corresponds to the remote end of the
-connection to the server, which may or may not be the
-client itself. It may also be a proxy or a gateway.</p></div>
-</div>
-</div>
+<pre><tt>{<font color="#009900">IP</font>, <font color="#009900">Port</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:peer</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Note that the peer corresponds to the remote end of the connection to the server, which may or may not be the client itself. It may also be a proxy or a gateway.</p>
+
diff --git a/docs/en/cowboy/2.0/guide/req_body/index.html b/docs/en/cowboy/2.0/guide/req_body/index.html
index dd3143c6..ace18a44 100644
--- a/docs/en/cowboy/2.0/guide/req_body/index.html
+++ b/docs/en/cowboy/2.0/guide/req_body/index.html
@@ -62,144 +62,93 @@
<h1 class="lined-header"><span>Reading the request body</span></h1>
-<div class="paragraph"><p>The request body can be read using the Req object.</p></div>
-<div class="paragraph"><p>Cowboy will not attempt to read the body until requested.
-You need to call the body reading functions in order to
-retrieve it.</p></div>
-<div class="paragraph"><p>Cowboy will not cache the body, it is therefore only
-possible to read it once.</p></div>
-<div class="paragraph"><p>You are not required to read it, however. If a body is
-present and was not read, Cowboy will either cancel or
-skip its download, depending on the protocol.</p></div>
-<div class="paragraph"><p>Cowboy provides functions for reading the body raw,
-and read and parse form urlencoded or <a href="../multipart">multipart bodies</a>.
-The latter is covered in its own chapter.</p></div>
-<div class="sect1">
+<p>The request body can be read using the Req object.</p>
+<p>Cowboy will not attempt to read the body until requested. You need to call the body reading functions in order to retrieve it.</p>
+<p>Cowboy will not cache the body, it is therefore only possible to read it once.</p>
+<p>You are not required to read it, however. If a body is present and was not read, Cowboy will either cancel or skip its download, depending on the protocol.</p>
+<p>Cowboy provides functions for reading the body raw, and read and parse form urlencoded or <a href="../multipart">multipart bodies</a>. The latter is covered in its own chapter.</p>
<h2 id="_request_body_presence">Request body presence</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Not all requests come with a body. You can check for
-the presence of a request body with this function:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Not all requests come with a body. You can check for the presence of a request body with this function:</p>
+<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">cowboy_req:has_body</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>It returns <code>true</code> if there is a body; <code>false</code> otherwise.</p></div>
-<div class="paragraph"><p>In practice, this function is rarely used. When the
-method is <code>POST</code>, <code>PUT</code> or <code>PATCH</code>, the request body
-is often required by the application, which should
-just attempt to read it directly.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">cowboy_req:has_body</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>It returns <code>true</code> if there is a body; <code>false</code> otherwise.</p>
+<p>In practice, this function is rarely used. When the method is <code>POST</code>, <code>PUT</code> or <code>PATCH</code>, the request body is often required by the application, which should just attempt to read it directly.</p>
<h2 id="_request_body_length">Request body length</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>You can obtain the length of the body:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>You can obtain the length of the body:</p>
+<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">Length</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:body_length</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Note that the length may not be known in advance. In
-that case <code>undefined</code> will be returned. This can happen
-with HTTP/1.1&#8217;s chunked transfer-encoding, or HTTP/2
-when no content-length was provided.</p></div>
-<div class="paragraph"><p>Cowboy will update the body length in the Req object
-once the body has been read completely. A length will
-always be returned when attempting to call this function
-after reading the body completely.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Length</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:body_length</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Note that the length may not be known in advance. In that case <code>undefined</code> will be returned. This can happen with HTTP/1.1&apos;s chunked transfer-encoding, or HTTP/2 when no content-length was provided.</p>
+<p>Cowboy will update the body length in the Req object once the body has been read completely. A length will always be returned when attempting to call this function after reading the body completely.</p>
<h2 id="_reading_the_body">Reading the body</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>You can read the entire body with one function call:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>You can read the entire body with one function call:</p>
+<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">ok</span>, <span style="color: #009900">Data</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:read_body</span></span>(<span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Cowboy returns an <code>ok</code> tuple when the body has been
-read fully.</p></div>
-<div class="paragraph"><p>By default, Cowboy will attempt to read up to 8MB
-of data, for up to 15 seconds. The call will return
-once Cowboy has read at least 8MB of data, or at
-the end of the 15 seconds period.</p></div>
-<div class="paragraph"><p>These values can be customized. For example, to read
-only up to 1MB for up to 5 seconds:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#009900">Data</font>, <font color="#009900">Req</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:read_body</font></b>(<font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Cowboy returns an <code>ok</code> tuple when the body has been read fully.</p>
+<p>By default, Cowboy will attempt to read up to 8MB of data, for up to 15 seconds. The call will return once Cowboy has read at least 8MB of data, or at the end of the 15 seconds period.</p>
+<p>These values can be customized. For example, to read only up to 1MB for up to 5 seconds:</p>
+<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">ok</span>, <span style="color: #009900">Data</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:read_body</span></span>(<span style="color: #009900">Req0</span>,
- #{<span style="font-weight: bold"><span style="color: #000080">length</span></span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">1000000</span>, <span style="color: #0000FF">period</span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">5000</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>You may also disable the length limit:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#009900">Data</font>, <font color="#009900">Req</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:read_body</font></b>(<font color="#009900">Req0</font>,
+ #{<b><font color="#000080">length</font></b> <font color="#990000">=&gt;</font> <font color="#993399">1000000</font>, <font color="#0000FF">period</font> <font color="#990000">=&gt;</font> <font color="#993399">5000</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>You may also disable the length limit:</p>
+<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">ok</span>, <span style="color: #009900">Data</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:read_body</span></span>(<span style="color: #009900">Req0</span>, #{<span style="font-weight: bold"><span style="color: #000080">length</span></span> <span style="color: #990000">=&gt;</span> <span style="color: #FF6600">infinity</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>This makes the function wait 15 seconds and return with
-whatever arrived during that period. This is not
-recommended for public facing applications.</p></div>
-<div class="paragraph"><p>These two options can effectively be used to control
-the rate of transmission of the request body.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#009900">Data</font>, <font color="#009900">Req</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:read_body</font></b>(<font color="#009900">Req0</font>, #{<b><font color="#000080">length</font></b> <font color="#990000">=&gt;</font> <font color="#FF6600">infinity</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>This makes the function wait 15 seconds and return with whatever arrived during that period. This is not recommended for public facing applications.</p>
+<p>These two options can effectively be used to control the rate of transmission of the request body.</p>
<h2 id="_streaming_the_body">Streaming the body</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>When the body is too large, the first call will return
-a <code>more</code> tuple instead of <code>ok</code>. You can call the
-function again to read more of the body, reading
-it one chunk at a time.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>When the body is too large, the first call will return a <code>more</code> tuple instead of <code>ok</code>. You can call the function again to read more of the body, reading it one chunk at a time.</p>
+<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_to_console</span></span>(<span style="color: #009900">Req0</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">cowboy_req:read_body</span></span>(<span style="color: #009900">Req0</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Data</span>, <span style="color: #009900">Req</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"</span>, [<span style="color: #009900">Data</span>]),
- <span style="color: #009900">Req</span>;
- {<span style="color: #FF6600">more</span>, <span style="color: #009900">Data</span>, <span style="color: #009900">Req</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"</span>, [<span style="color: #009900">Data</span>]),
- <span style="font-weight: bold"><span style="color: #000000">read_body_to_console</span></span>(<span style="color: #009900">Req</span>)
- <span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>The <code>length</code> and <code>period</code> options can also be used.
-They need to be passed for every call.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">read_body_to_console</font></b>(<font color="#009900">Req0</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">case</font></b> <b><font color="#000000">cowboy_req:read_body</font></b>(<font color="#009900">Req0</font>) <b><font color="#0000FF">of</font></b>
+ {<font color="#FF6600">ok</font>, <font color="#009900">Data</font>, <font color="#009900">Req</font>} <font color="#990000">-&gt;</font>
+ <b><font color="#000000">io:format</font></b>(<font color="#FF0000">"~s"</font>, [<font color="#009900">Data</font>]),
+ <font color="#009900">Req</font>;
+ {<font color="#FF6600">more</font>, <font color="#009900">Data</font>, <font color="#009900">Req</font>} <font color="#990000">-&gt;</font>
+ <b><font color="#000000">io:format</font></b>(<font color="#FF0000">"~s"</font>, [<font color="#009900">Data</font>]),
+ <b><font color="#000000">read_body_to_console</font></b>(<font color="#009900">Req</font>)
+ <b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>The <code>length</code> and <code>period</code> options can also be used. They need to be passed for every call.</p>
<h2 id="_reading_a_form_urlencoded_body">Reading a form urlencoded body</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy provides a convenient function for reading and
-parsing bodies sent as application/x-www-form-urlencoded.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Cowboy provides a convenient function for reading and parsing bodies sent as application/x-www-form-urlencoded.</p>
+<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">ok</span>, <span style="color: #009900">KeyValues</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:read_urlencoded_body</span></span>(<span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>This function returns a list of key/values, exactly like
-the function <code>cowboy_req:parse_qs/1</code>.</p></div>
-<div class="paragraph"><p>The defaults for this function are different. Cowboy will
-read for up to 64KB and up to 5 seconds. They can be modified:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#009900">KeyValues</font>, <font color="#009900">Req</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:read_urlencoded_body</font></b>(<font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>This function returns a list of key/values, exactly like the function <code>cowboy_req:parse_qs/1</code>.</p>
+<p>The defaults for this function are different. Cowboy will read for up to 64KB and up to 5 seconds. They can be modified:</p>
+<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">ok</span>, <span style="color: #009900">KeyValues</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:read_urlencoded_body</span></span>(<span style="color: #009900">Req0</span>,
- #{<span style="font-weight: bold"><span style="color: #000080">length</span></span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">4096</span>, <span style="color: #0000FF">period</span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">3000</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#009900">KeyValues</font>, <font color="#009900">Req</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:read_urlencoded_body</font></b>(<font color="#009900">Req0</font>,
+ #{<b><font color="#000080">length</font></b> <font color="#990000">=&gt;</font> <font color="#993399">4096</font>, <font color="#0000FF">period</font> <font color="#990000">=&gt;</font> <font color="#993399">3000</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+
diff --git a/docs/en/cowboy/2.0/guide/resource_design/index.html b/docs/en/cowboy/2.0/guide/resource_design/index.html
index 31c9286a..dec626fa 100644
--- a/docs/en/cowboy/2.0/guide/resource_design/index.html
+++ b/docs/en/cowboy/2.0/guide/resource_design/index.html
@@ -62,213 +62,66 @@
<h1 class="lined-header"><span>Designing a resource handler</span></h1>
-<div class="paragraph"><p>This chapter aims to provide you with a list of questions
-you must answer in order to write a good resource handler.
-It is meant to be usable as a step by step guide.</p></div>
-<div class="sect1">
+<p>This chapter aims to provide you with a list of questions you must answer in order to write a good resource handler. It is meant to be usable as a step by step guide.</p>
<h2 id="_the_service">The service</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Can the service become unavailable, and when it does, can
-we detect it? For example, database connectivity problems
-may be detected early. We may also have planned outages
-of all or parts of the system. Implement the
-<code>service_available</code> callback.</p></div>
-<div class="paragraph"><p>What HTTP methods does the service implement? Do we need
-more than the standard OPTIONS, HEAD, GET, PUT, POST,
-PATCH and DELETE? Are we not using one of those at all?
-Implement the <code>known_methods</code> callback.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Can the service become unavailable, and when it does, can we detect it? For example, database connectivity problems may be detected early. We may also have planned outages of all or parts of the system. Implement the <code>service_available</code> callback.</p>
+<p>What HTTP methods does the service implement? Do we need more than the standard OPTIONS, HEAD, GET, PUT, POST, PATCH and DELETE? Are we not using one of those at all? Implement the <code>known_methods</code> callback.</p>
<h2 id="_type_of_resource_handler">Type of resource handler</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Am I writing a handler for a collection of resources,
-or for a single resource?</p></div>
-<div class="paragraph"><p>The semantics for each of these are quite different.
-You should not mix collection and single resource in
-the same handler.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Am I writing a handler for a collection of resources, or for a single resource?</p>
+<p>The semantics for each of these are quite different. You should not mix collection and single resource in the same handler.</p>
<h2 id="_collection_handler">Collection handler</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Skip this section if you are not doing a collection.</p></div>
-<div class="paragraph"><p>Is the collection hardcoded or dynamic? For example,
-if you use the route <code>/users</code> for the collection of
-users then the collection is hardcoded; if you use
-<code>/forums/:category</code> for the collection of threads
-then it isn&#8217;t. When the collection is hardcoded you
-can safely assume the resource always exists.</p></div>
-<div class="paragraph"><p>What methods should I implement?</p></div>
-<div class="paragraph"><p>OPTIONS is used to get some information about the
-collection. It is recommended to allow it even if you
-do not implement it, as Cowboy has a default
-implementation built-in.</p></div>
-<div class="paragraph"><p>HEAD and GET are used to retrieve the collection.
-If you allow GET, also allow HEAD as there&#8217;s no extra
-work required to make it work.</p></div>
-<div class="paragraph"><p>POST is used to create a new resource inside the
-collection. Creating a resource by using POST on
-the collection is useful when resources may be
-created before knowing their URI, usually because
-parts of it are generated dynamically. A common
-case is some kind of auto incremented integer
-identifier.</p></div>
-<div class="paragraph"><p>The next methods are more rarely allowed.</p></div>
-<div class="paragraph"><p>PUT is used to create a new collection (when
-the collection isn&#8217;t hardcoded), or replace
-the entire collection.</p></div>
-<div class="paragraph"><p>DELETE is used to delete the entire collection.</p></div>
-<div class="paragraph"><p>PATCH is used to modify the collection using
-instructions given in the request body. A PATCH
-operation is atomic. The PATCH operation may
-be used for such things as reordering; adding,
-modifying or deleting parts of the collection.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Skip this section if you are not doing a collection.</p>
+<p>Is the collection hardcoded or dynamic? For example, if you use the route <code>/users</code> for the collection of users then the collection is hardcoded; if you use <code>/forums/:category</code> for the collection of threads then it isn&apos;t. When the collection is hardcoded you can safely assume the resource always exists.</p>
+<p>What methods should I implement?</p>
+<p>OPTIONS is used to get some information about the collection. It is recommended to allow it even if you do not implement it, as Cowboy has a default implementation built-in.</p>
+<p>HEAD and GET are used to retrieve the collection. If you allow GET, also allow HEAD as there&apos;s no extra work required to make it work.</p>
+<p>POST is used to create a new resource inside the collection. Creating a resource by using POST on the collection is useful when resources may be created before knowing their URI, usually because parts of it are generated dynamically. A common case is some kind of auto incremented integer identifier.</p>
+<p>The next methods are more rarely allowed.</p>
+<p>PUT is used to create a new collection (when the collection isn&apos;t hardcoded), or replace the entire collection.</p>
+<p>DELETE is used to delete the entire collection.</p>
+<p>PATCH is used to modify the collection using instructions given in the request body. A PATCH operation is atomic. The PATCH operation may be used for such things as reordering; adding, modifying or deleting parts of the collection.</p>
<h2 id="_single_resource_handler">Single resource handler</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Skip this section if you are doing a collection.</p></div>
-<div class="paragraph"><p>What methods should I implement?</p></div>
-<div class="paragraph"><p>OPTIONS is used to get some information about the
-resource. It is recommended to allow it even if you
-do not implement it, as Cowboy has a default
-implementation built-in.</p></div>
-<div class="paragraph"><p>HEAD and GET are used to retrieve the resource.
-If you allow GET, also allow HEAD as there&#8217;s no extra
-work required to make it work.</p></div>
-<div class="paragraph"><p>POST is used to update the resource.</p></div>
-<div class="paragraph"><p>PUT is used to create a new resource (when it doesn&#8217;t
-already exist) or replace the resource.</p></div>
-<div class="paragraph"><p>DELETE is used to delete the resource.</p></div>
-<div class="paragraph"><p>PATCH is used to modify the resource using
-instructions given in the request body. A PATCH
-operation is atomic. The PATCH operation may
-be used for adding, removing or modifying specific
-values in the resource.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Skip this section if you are doing a collection.</p>
+<p>What methods should I implement?</p>
+<p>OPTIONS is used to get some information about the resource. It is recommended to allow it even if you do not implement it, as Cowboy has a default implementation built-in.</p>
+<p>HEAD and GET are used to retrieve the resource. If you allow GET, also allow HEAD as there&apos;s no extra work required to make it work.</p>
+<p>POST is used to update the resource.</p>
+<p>PUT is used to create a new resource (when it doesn&apos;t already exist) or replace the resource.</p>
+<p>DELETE is used to delete the resource.</p>
+<p>PATCH is used to modify the resource using instructions given in the request body. A PATCH operation is atomic. The PATCH operation may be used for adding, removing or modifying specific values in the resource.</p>
<h2 id="_the_resource">The resource</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Following the above discussion, implement the
-<code>allowed_methods</code> callback.</p></div>
-<div class="paragraph"><p>Does the resource always exist? If it may not, implement
-the <code>resource_exists</code> callback.</p></div>
-<div class="paragraph"><p>Do I need to authenticate the client before they can
-access the resource? What authentication mechanisms
-should I provide? This may include form-based, token-based
-(in the URL or a cookie), HTTP basic, HTTP digest,
-SSL certificate or any other form of authentication.
-Implement the <code>is_authorized</code> callback.</p></div>
-<div class="paragraph"><p>Do I need fine-grained access control? How do I determine
-that they are authorized access? Handle that in your
-<code>is_authorized</code> callback.</p></div>
-<div class="paragraph"><p>Can access to a resource be forbidden regardless of access
-being authorized? A simple example of that is censorship
-of a resource. Implement the <code>forbidden</code> callback.</p></div>
-<div class="paragraph"><p>Are there any constraints on the length of the resource URI?
-For example, the URI may be used as a key in storage and may
-have a limit in length. Implement <code>uri_too_long</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Following the above discussion, implement the <code>allowed_methods</code> callback.</p>
+<p>Does the resource always exist? If it may not, implement the <code>resource_exists</code> callback.</p>
+<p>Do I need to authenticate the client before they can access the resource? What authentication mechanisms should I provide? This may include form-based, token-based (in the URL or a cookie), HTTP basic, HTTP digest, SSL certificate or any other form of authentication. Implement the <code>is_authorized</code> callback.</p>
+<p>Do I need fine-grained access control? How do I determine that they are authorized access? Handle that in your <code>is_authorized</code> callback.</p>
+<p>Can access to a resource be forbidden regardless of access being authorized? A simple example of that is censorship of a resource. Implement the <code>forbidden</code> callback.</p>
+<p>Are there any constraints on the length of the resource URI? For example, the URI may be used as a key in storage and may have a limit in length. Implement <code>uri_too_long</code>.</p>
<h2 id="_representations">Representations</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>What media types do I provide? If text based, what charsets
-are provided? What languages do I provide?</p></div>
-<div class="paragraph"><p>Implement the mandatory <code>content_types_provided</code>. Prefix
-the callbacks with <code>to_</code> for clarity. For example, <code>to_html</code>
-or <code>to_text</code>.</p></div>
-<div class="paragraph"><p>Implement the <code>languages_provided</code> or <code>charsets_provided</code>
-callbacks if applicable.</p></div>
-<div class="paragraph"><p>Is there any other header that may make the representation
-of the resource vary? Implement the <code>variances</code> callback.</p></div>
-<div class="paragraph"><p>Depending on your choices for caching content, you may
-want to implement one or more of the <code>generate_etag</code>,
-<code>last_modified</code> and <code>expires</code> callbacks.</p></div>
-<div class="paragraph"><p>Do I want the user or user agent to actively choose a
-representation available? Send a list of available
-representations in the response body and implement
-the <code>multiple_choices</code> callback.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>What media types do I provide? If text based, what charsets are provided? What languages do I provide?</p>
+<p>Implement the mandatory <code>content_types_provided</code>. Prefix the callbacks with <code>to_</code> for clarity. For example, <code>to_html</code> or <code>to_text</code>.</p>
+<p>Implement the <code>languages_provided</code> or <code>charsets_provided</code> callbacks if applicable.</p>
+<p>Is there any other header that may make the representation of the resource vary? Implement the <code>variances</code> callback.</p>
+<p>Depending on your choices for caching content, you may want to implement one or more of the <code>generate_etag</code>, <code>last_modified</code> and <code>expires</code> callbacks.</p>
+<p>Do I want the user or user agent to actively choose a representation available? Send a list of available representations in the response body and implement the <code>multiple_choices</code> callback.</p>
<h2 id="_redirections">Redirections</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Do I need to keep track of what resources were deleted?
-For example, you may have a mechanism where moving a
-resource leaves a redirect link to its new location.
-Implement the <code>previously_existed</code> callback.</p></div>
-<div class="paragraph"><p>Was the resource moved, and is the move temporary? If
-it is explicitly temporary, for example due to maintenance,
-implement the <code>moved_temporarily</code> callback. Otherwise,
-implement the <code>moved_permanently</code> callback.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Do I need to keep track of what resources were deleted? For example, you may have a mechanism where moving a resource leaves a redirect link to its new location. Implement the <code>previously_existed</code> callback.</p>
+<p>Was the resource moved, and is the move temporary? If it is explicitly temporary, for example due to maintenance, implement the <code>moved_temporarily</code> callback. Otherwise, implement the <code>moved_permanently</code> callback.</p>
<h2 id="_the_request">The request</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Do you need to read the query string? Individual headers?
-Implement <code>malformed_request</code> and do all the parsing and
-validation in this function. Note that the body should not
-be read at this point.</p></div>
-<div class="paragraph"><p>May there be a request body? Will I know its size?
-What&#8217;s the maximum size of the request body I&#8217;m willing
-to accept? Implement <code>valid_entity_length</code>.</p></div>
-<div class="paragraph"><p>Finally, take a look at the sections corresponding to the
-methods you are implementing.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Do you need to read the query string? Individual headers? Implement <code>malformed_request</code> and do all the parsing and validation in this function. Note that the body should not be read at this point.</p>
+<p>May there be a request body? Will I know its size? What&apos;s the maximum size of the request body I&apos;m willing to accept? Implement <code>valid_entity_length</code>.</p>
+<p>Finally, take a look at the sections corresponding to the methods you are implementing.</p>
<h2 id="_options_method">OPTIONS method</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy by default will send back a list of allowed methods.
-Do I need to add more information to the response? Implement
-the <code>options</code> method.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Cowboy by default will send back a list of allowed methods. Do I need to add more information to the response? Implement the <code>options</code> method.</p>
<h2 id="_get_and_head_methods">GET and HEAD methods</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>If you implement the methods GET and/or HEAD, you must
-implement one <code>ProvideResource</code> callback for each
-content-type returned by the <code>content_types_provided</code>
-callback.</p></div>
-</div>
-</div>
-<div class="sect1">
-<h2 id="_put_post_and_patch_methods">PUT, POST and PATCH methods</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>If you implement the methods PUT, POST and/or PATCH,
-you must implement the <code>content_types_accepted</code> callback,
-and one <code>AcceptResource</code> callback for each content-type
-it returns. Prefix the <code>AcceptResource</code> callback names
-with <code>from_</code> for clarity. For example, <code>from_html</code> or
-<code>from_json</code>.</p></div>
-<div class="paragraph"><p>Do we want to allow the POST method to create individual
-resources directly through their URI (like PUT)? Implement
-the <code>allow_missing_post</code> callback. It is recommended to
-explicitly use PUT in these cases instead.</p></div>
-<div class="paragraph"><p>May there be conflicts when using PUT to create or replace
-a resource? Do we want to make sure that two updates around
-the same time are not cancelling one another? Implement the
-<code>is_conflict</code> callback.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>If you implement the methods GET and/or HEAD, you must implement one <code>ProvideResource</code> callback for each content-type returned by the <code>content_types_provided</code> callback.</p>
+<h2 id="_put__post_and_patch_methods">PUT, POST and PATCH methods</h2>
+<p>If you implement the methods PUT, POST and/or PATCH, you must implement the <code>content_types_accepted</code> callback, and one <code>AcceptResource</code> callback for each content-type it returns. Prefix the <code>AcceptResource</code> callback names with <code>from_</code> for clarity. For example, <code>from_html</code> or <code>from_json</code>.</p>
+<p>Do we want to allow the POST method to create individual resources directly through their URI (like PUT)? Implement the <code>allow_missing_post</code> callback. It is recommended to explicitly use PUT in these cases instead.</p>
+<p>May there be conflicts when using PUT to create or replace a resource? Do we want to make sure that two updates around the same time are not cancelling one another? Implement the <code>is_conflict</code> callback.</p>
<h2 id="_delete_methods">DELETE methods</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>If you implement the method DELETE, you must implement
-the <code>delete_resource</code> callback.</p></div>
-<div class="paragraph"><p>When <code>delete_resource</code> returns, is the resource completely
-removed from the server, including from any caching service?
-If not, and/or if the deletion is asynchronous and we have
-no way of knowing it has been completed yet, implement the
-<code>delete_completed</code> callback.</p></div>
-</div>
-</div>
+<p>If you implement the method DELETE, you must implement the <code>delete_resource</code> callback.</p>
+<p>When <code>delete_resource</code> returns, is the resource completely removed from the server, including from any caching service? If not, and/or if the deletion is asynchronous and we have no way of knowing it has been completed yet, implement the <code>delete_completed</code> callback.</p>
+
diff --git a/docs/en/cowboy/2.0/guide/resp/index.html b/docs/en/cowboy/2.0/guide/resp/index.html
index 97aff988..20a6f487 100644
--- a/docs/en/cowboy/2.0/guide/resp/index.html
+++ b/docs/en/cowboy/2.0/guide/resp/index.html
@@ -62,322 +62,218 @@
<h1 class="lined-header"><span>Sending a response</span></h1>
-<div class="paragraph"><p>The response must be sent using the Req object.</p></div>
-<div class="paragraph"><p>Cowboy provides two different ways of sending responses:
-either directly or by streaming the body. Response headers
-and body may be set in advance. The response is sent as
-soon as one of the reply or stream reply function is
-called.</p></div>
-<div class="paragraph"><p>Cowboy also provides a simplified interface for sending
-files. It can also send only specific parts of a file.</p></div>
-<div class="paragraph"><p>While only one response is allowed for every request,
-HTTP/2 introduced a mechanism that allows the server
-to push additional resources related to the response.
-This chapter also describes how this feature works in
-Cowboy.</p></div>
-<div class="sect1">
+<p>The response must be sent using the Req object.</p>
+<p>Cowboy provides two different ways of sending responses: either directly or by streaming the body. Response headers and body may be set in advance. The response is sent as soon as one of the reply or stream reply function is called.</p>
+<p>Cowboy also provides a simplified interface for sending files. It can also send only specific parts of a file.</p>
+<p>While only one response is allowed for every request, HTTP/2 introduced a mechanism that allows the server to push additional resources related to the response. This chapter also describes how this feature works in Cowboy.</p>
<h2 id="_reply">Reply</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy provides three functions for sending the entire reply,
-depending on whether you need to set headers and body. In all
-cases, Cowboy will add any headers required by the protocol
-(for example the date header will always be sent).</p></div>
-<div class="paragraph"><p>When you need to set only the status code,
-use <code>cowboy_req:reply/2</code>:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Cowboy provides three functions for sending the entire reply, depending on whether you need to set headers and body. In all cases, Cowboy will add any headers required by the protocol (for example the date header will always be sent).</p>
+<p>When you need to set only the status code, use <code>cowboy_req:reply/2</code>:</p>
+<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">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">200</span>, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>When you need to set response headers at the same time,
-use <code>cowboy_req:reply/3</code>:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:reply</font></b>(<font color="#993399">200</font>, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>When you need to set response headers at the same time, use <code>cowboy_req:reply/3</code>:</p>
+<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">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">303</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="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"https://ninenines.eu"</span><span style="color: #990000">&gt;&gt;</span>
-}, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Note that the header name must always be a lowercase
-binary.</p></div>
-<div class="paragraph"><p>When you also need to set the response body,
-use <code>cowboy_req:reply/4</code>:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:reply</font></b>(<font color="#993399">303</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"location"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"https://ninenines.eu"</font><font color="#990000">&gt;&gt;</font>
+}, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Note that the header name must always be a lowercase binary.</p>
+<p>When you also need to set the response body, use <code>cowboy_req:reply/4</code>:</p>
+<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">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">200</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/plain"</span><span style="color: #990000">&gt;&gt;</span>
-}, <span style="color: #FF0000">"Hello world!"</span>, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>You should always set the content-type header when the
-response has a body. There is however no need to set
-the content-length header; Cowboy does it automatically.</p></div>
-<div class="paragraph"><p>The response body and the header values must be either
-a binary or an iolist. An iolist is a list containing
-binaries, characters, strings or other iolists. This
-allows you to build a response from different parts
-without having to do any concatenation:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:reply</font></b>(<font color="#993399">200</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/plain"</font><font color="#990000">&gt;&gt;</font>
+}, <font color="#FF0000">"Hello world!"</font>, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>You should always set the content-type header when the response has a body. There is however no need to set the content-length header; Cowboy does it automatically.</p>
+<p>The response body and the header values must be either a binary or an iolist. An iolist is a list containing binaries, characters, strings or other iolists. This allows you to build a response from different parts without having to do any concatenation:</p>
+<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">Title</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"Hello world!"</span>,
-<span style="color: #009900">Body</span> <span style="color: #990000">=</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Hats off!"</span><span style="color: #990000">&gt;&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">200</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/html"</span><span style="color: #990000">&gt;&gt;</span>
-}, [<span style="color: #FF0000">"&lt;html&gt;&lt;head&gt;&lt;title&gt;"</span>, <span style="color: #009900">Title</span>, <span style="color: #FF0000">"&lt;/title&gt;&lt;/head&gt;"</span>,
- <span style="color: #FF0000">"&lt;body&gt;&lt;p&gt;"</span>, <span style="color: #009900">Body</span>, <span style="color: #FF0000">"&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;"</span>], <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>This method of building responses is more efficient than
-concatenating. Behind the scenes, each element of the list
-is simply a pointer, and those pointers are used directly
-when writing to the socket.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Title</font> <font color="#990000">=</font> <font color="#FF0000">"Hello world!"</font>,
+<font color="#009900">Body</font> <font color="#990000">=</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"Hats off!"</font><font color="#990000">&gt;&gt;</font>,
+<font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:reply</font></b>(<font color="#993399">200</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/html"</font><font color="#990000">&gt;&gt;</font>
+}, [<font color="#FF0000">"&lt;html&gt;&lt;head&gt;&lt;title&gt;"</font>, <font color="#009900">Title</font>, <font color="#FF0000">"&lt;/title&gt;&lt;/head&gt;"</font>,
+ <font color="#FF0000">"&lt;body&gt;&lt;p&gt;"</font>, <font color="#009900">Body</font>, <font color="#FF0000">"&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;"</font>], <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>This method of building responses is more efficient than concatenating. Behind the scenes, each element of the list is simply a pointer, and those pointers are used directly when writing to the socket.</p>
<h2 id="_stream_reply">Stream reply</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy provides two functions for initiating a response,
-and an additional function for streaming the response body.
-Cowboy will add any required headers to the response.</p></div>
-<div class="paragraph"><p>When you need to set only the status code,
-use <code>cowboy_req:stream_reply/2</code>:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Cowboy provides two functions for initiating a response, and an additional function for streaming the response body. Cowboy will add any required headers to the response.</p>
+<!-- @todo For HTTP/1.1 Cowboy should probably not use chunked transfer-encoding if the content-length is set.-->
+<p>When you need to set only the status code, use <code>cowboy_req:stream_reply/2</code>:</p>
+<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">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_reply</span></span>(<span style="color: #993399">200</span>, <span style="color: #009900">Req0</span>),
-
-<span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_body</span></span>(<span style="color: #FF0000">"Hello..."</span>, <span style="color: #FF6600">nofin</span>, <span style="color: #009900">Req</span>),
-<span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_body</span></span>(<span style="color: #FF0000">"chunked..."</span>, <span style="color: #FF6600">nofin</span>, <span style="color: #009900">Req</span>),
-<span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_body</span></span>(<span style="color: #FF0000">"world!!"</span>, <span style="color: #FF6600">fin</span>, <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>The second argument to <code>cowboy_req:stream_body/3</code> indicates
-whether this data terminates the body. Use <code>fin</code> for the
-final flag, and <code>nofin</code> otherwise.</p></div>
-<div class="paragraph"><p>This snippet does not set a content-type header. This is
-not recommended. All responses with a body should have
-a content-type. The header can be set beforehand, or
-using the <code>cowboy_req:stream_reply/3</code>:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:stream_reply</font></b>(<font color="#993399">200</font>, <font color="#009900">Req0</font>),
+
+<b><font color="#000000">cowboy_req:stream_body</font></b>(<font color="#FF0000">"Hello..."</font>, <font color="#FF6600">nofin</font>, <font color="#009900">Req</font>),
+<b><font color="#000000">cowboy_req:stream_body</font></b>(<font color="#FF0000">"chunked..."</font>, <font color="#FF6600">nofin</font>, <font color="#009900">Req</font>),
+<b><font color="#000000">cowboy_req:stream_body</font></b>(<font color="#FF0000">"world!!"</font>, <font color="#FF6600">fin</font>, <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>The second argument to <code>cowboy_req:stream_body/3</code> indicates whether this data terminates the body. Use <code>fin</code> for the final flag, and <code>nofin</code> otherwise.</p>
+<p>This snippet does not set a content-type header. This is not recommended. All responses with a body should have a content-type. The header can be set beforehand, or using the <code>cowboy_req:stream_reply/3</code>:</p>
+<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">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_reply</span></span>(<span style="color: #993399">200</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/html"</span><span style="color: #990000">&gt;&gt;</span>
-}, <span style="color: #009900">Req0</span>),
-
-<span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_body</span></span>(<span style="color: #FF0000">"&lt;html&gt;&lt;head&gt;Hello world!&lt;/head&gt;"</span>, <span style="color: #FF6600">nofin</span>, <span style="color: #009900">Req</span>),
-<span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_body</span></span>(<span style="color: #FF0000">"&lt;body&gt;&lt;p&gt;Hats off!&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;"</span>, <span style="color: #FF6600">fin</span>, <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>HTTP provides a few different ways to stream response bodies.
-Cowboy will select the most appropriate one based on the HTTP
-version and the request and response headers.</p></div>
-<div class="paragraph"><p>While not required by any means, it is recommended that you
-set the content-length header in the response if you know it
-in advance. This will ensure that the best response method
-is selected and help clients understand when the response
-is fully received.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:stream_reply</font></b>(<font color="#993399">200</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/html"</font><font color="#990000">&gt;&gt;</font>
+}, <font color="#009900">Req0</font>),
+
+<b><font color="#000000">cowboy_req:stream_body</font></b>(<font color="#FF0000">"&lt;html&gt;&lt;head&gt;Hello world!&lt;/head&gt;"</font>, <font color="#FF6600">nofin</font>, <font color="#009900">Req</font>),
+<b><font color="#000000">cowboy_req:stream_body</font></b>(<font color="#FF0000">"&lt;body&gt;&lt;p&gt;Hats off!&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;"</font>, <font color="#FF6600">fin</font>, <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>HTTP provides a few different ways to stream response bodies. Cowboy will select the most appropriate one based on the HTTP version and the request and response headers.</p>
+<p>While not required by any means, it is recommended that you set the content-length header in the response if you know it in advance. This will ensure that the best response method is selected and help clients understand when the response is fully received.</p>
+<!-- @todo Document trailers here.-->
<h2 id="_preset_response_headers">Preset response headers</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy provides functions to set response headers without
-immediately sending them. They are stored in the Req object
-and sent as part of the response when a reply function is
-called.</p></div>
-<div class="paragraph"><p>To set response headers:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Cowboy provides functions to set response headers without immediately sending them. They are stored in the Req object and sent as part of the response when a reply function is called.</p>
+<p>To set response headers:</p>
+<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">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"allow"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #FF0000">"GET"</span>, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Header names must be a lowercase binary.</p></div>
-<div class="paragraph"><p>Do not use this function for setting cookies. Refer to
-the <a href="../cookies">Cookies</a> chapter for more information.</p></div>
-<div class="paragraph"><p>To check if a response header has already been set:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"allow"</font><font color="#990000">&gt;&gt;</font>, <font color="#FF0000">"GET"</font>, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Header names must be a lowercase binary.</p>
+<p>Do not use this function for setting cookies. Refer to the <a href="../cookies">Cookies</a> chapter for more information.</p>
+<p>To check if a response header has already been set:</p>
+<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">cowboy_req:has_resp_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"allow"</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="paragraph"><p>It returns <code>true</code> if the header was set, <code>false</code> otherwise.</p></div>
-<div class="paragraph"><p>To delete a response header that was set previously:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">cowboy_req:has_resp_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"allow"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>It returns <code>true</code> if the header was set, <code>false</code> otherwise.</p>
+<p>To delete a response header that was set previously:</p>
+<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">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:delete_resp_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"allow"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:delete_resp_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"allow"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_overriding_headers">Overriding headers</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>As Cowboy provides different ways of setting response
-headers and body, clashes may occur, so it&#8217;s important
-to understand what happens when a header is set twice.</p></div>
-<div class="paragraph"><p>Headers come from five different origins:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-Protocol-specific headers (for example HTTP/1.1&#8217;s connection header)
-</p>
+<p>As Cowboy provides different ways of setting response headers and body, clashes may occur, so it&apos;s important to understand what happens when a header is set twice.</p>
+<p>Headers come from five different origins:</p>
+<ul><li>Protocol-specific headers (for example HTTP/1.1&apos;s connection header)
</li>
-<li>
-<p>
-Other required headers (for example the date header)
-</p>
+<li>Other required headers (for example the date header)
</li>
-<li>
-<p>
-Preset headers
-</p>
+<li>Preset headers
</li>
-<li>
-<p>
-Headers given to the reply function
-</p>
+<li>Headers given to the reply function
</li>
-<li>
-<p>
-Set-cookie headers
-</p>
+<li>Set-cookie headers
</li>
-</ul></div>
-<div class="paragraph"><p>Cowboy does not allow overriding protocol-specific headers.</p></div>
-<div class="paragraph"><p>Set-cookie headers will always be appended at the end of
-the list of headers before sending the response.</p></div>
-<div class="paragraph"><p>Headers given to the reply function will always override
-preset headers and required headers. If a header is found
-in two or three of these, then the one in the reply function
-is picked and the others are dropped.</p></div>
-<div class="paragraph"><p>Similarly, preset headers will always override required
-headers.</p></div>
-<div class="paragraph"><p>To illustrate, look at the following snippet. Cowboy by
-default sends the server header with the value "Cowboy".
-We can override it:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+</ul>
+<p>Cowboy does not allow overriding protocol-specific headers.</p>
+<p>Set-cookie headers will always be appended at the end of the list of headers before sending the response.</p>
+<p>Headers given to the reply function will always override preset headers and required headers. If a header is found in two or three of these, then the one in the reply function is picked and the others are dropped.</p>
+<p>Similarly, preset headers will always override required headers.</p>
+<p>To illustrate, look at the following snippet. Cowboy by default sends the server header with the value &quot;Cowboy&quot;. We can override it:</p>
+<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">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">200</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"server"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"yaws"</span><span style="color: #990000">&gt;&gt;</span>
-}, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:reply</font></b>(<font color="#993399">200</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"server"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"yaws"</font><font color="#990000">&gt;&gt;</font>
+}, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_preset_response_body">Preset response body</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy provides functions to set the response body without
-immediately sending it. It is stored in the Req object and
-sent when the reply function is called.</p></div>
-<div class="paragraph"><p>To set the response body:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Cowboy provides functions to set the response body without immediately sending it. It is stored in the Req object and sent when the reply function is called.</p>
+<p>To set the response body:</p>
+<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">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_body</span></span>(<span style="color: #FF0000">"Hello world!"</span>, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>To check if a response body has already been set:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_body</font></b>(<font color="#FF0000">"Hello world!"</font>, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<!-- @todo Yeah we probably should add that function that-->
+<!-- also sets the content-type at the same time...-->
+<p>To check if a response body has already been set:</p>
+<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">cowboy_req:has_resp_body</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>It returns <code>true</code> if the body was set and is non-empty,
-<code>false</code> otherwise.</p></div>
-<div class="paragraph"><p>The preset response body is only sent if the reply function
-used is <code>cowboy_req:reply/2</code> or <code>cowboy_req:reply/3</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">cowboy_req:has_resp_body</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>It returns <code>true</code> if the body was set and is non-empty, <code>false</code> otherwise.</p>
+<!-- @todo We probably should also have a function that-->
+<!-- properly removes the response body, including any-->
+<!-- content-* headers.-->
+<p>The preset response body is only sent if the reply function used is <code>cowboy_req:reply/2</code> or <code>cowboy_req:reply/3</code>.</p>
<h2 id="_sending_files">Sending files</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy provides a shortcut for sending files. When
-using <code>cowboy_req:reply/4</code>, or when presetting the
-response header, you can give a <code>sendfile</code> tuple to
-Cowboy:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Cowboy provides a shortcut for sending files. When using <code>cowboy_req:reply/4</code>, or when presetting the response header, you can give a <code>sendfile</code> tuple to Cowboy:</p>
+<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">sendfile</span>, <span style="color: #009900">Offset</span>, <span style="color: #009900">Length</span>, <span style="color: #009900">Filename</span>}</tt></pre></div></div>
-<div class="paragraph"><p>Depending on the values for <code>Offset</code> or <code>Length</code>, the
-entire file may be sent, or just a part of it.</p></div>
-<div class="paragraph"><p>The length is required even for sending the entire file.
-Cowboy sends it in the content-length header.</p></div>
-<div class="paragraph"><p>To send a file while replying:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>{<font color="#FF6600">sendfile</font>, <font color="#009900">Offset</font>, <font color="#009900">Length</font>, <font color="#009900">Filename</font>}</tt></pre>
+</div></div>
+<p>Depending on the values for <code>Offset</code> or <code>Length</code>, the entire file may be sent, or just a part of it.</p>
+<p>The length is required even for sending the entire file. Cowboy sends it in the content-length header.</p>
+<p>To send a file while replying:</p>
+<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">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">200</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #FF0000">"image/png"</span>
-}, {<span style="color: #FF6600">sendfile</span>, <span style="color: #993399">0</span>, <span style="color: #993399">12345</span>, <span style="color: #FF0000">"path/to/logo.png"</span>}, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:reply</font></b>(<font color="#993399">200</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#FF0000">"image/png"</font>
+}, {<font color="#FF6600">sendfile</font>, <font color="#993399">0</font>, <font color="#993399">12345</font>, <font color="#FF0000">"path/to/logo.png"</font>}, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<!-- @todo An example of presetting a file would be useful,-->
+<!-- but let&apos;s wait for the function that can set the-->
+<!-- content-type at the same time.-->
+<!-- @todo What about streaming many files? For example-->
+<!-- it should be possible to build a tar file on the fly-->
+<!-- while still using sendfile. Another example could be-->
+<!-- proper support for multipart byte ranges. Yet another-->
+<!-- example would be automatic concatenation of CSS or JS-->
+<!-- files.-->
<h2 id="_push">Push</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The HTTP/2 protocol introduced the ability to push resources
-related to the one sent in the response. Cowboy provides two
-functions for that purpose: <code>cowboy_req:push/3,4</code>.</p></div>
-<div class="paragraph"><p>Push is only available for HTTP/2. Cowboy will automatically
-ignore push requests if the protocol doesn&#8217;t support it.</p></div>
-<div class="paragraph"><p>The push function must be called before any of the reply
-functions. Doing otherwise will result in a crash.</p></div>
-<div class="paragraph"><p>To push a resource, you need to provide the same information
-as a client performing a request would. This includes the
-HTTP method, the URI and any necessary request headers.</p></div>
-<div class="paragraph"><p>Cowboy by default only requires you to give the path to
-the resource and the request headers. The rest of the URI
-is taken from the current request (excluding the query
-string, set to empty) and the method is GET by default.</p></div>
-<div class="paragraph"><p>The following snippet pushes a CSS file that is linked to
-in the response:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The HTTP/2 protocol introduced the ability to push resources related to the one sent in the response. Cowboy provides two functions for that purpose: <code>cowboy_req:push/3,4</code>.</p>
+<p>Push is only available for HTTP/2. Cowboy will automatically ignore push requests if the protocol doesn&apos;t support it.</p>
+<p>The push function must be called before any of the reply functions. Doing otherwise will result in a crash.</p>
+<p>To push a resource, you need to provide the same information as a client performing a request would. This includes the HTTP method, the URI and any necessary request headers.</p>
+<p>Cowboy by default only requires you to give the path to the resource and the request headers. The rest of the URI is taken from the current request (excluding the query string, set to empty) and the method is GET by default.</p>
+<p>The following snippet pushes a CSS file that is linked to in the response:</p>
+<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">cowboy_req:push</span></span>(<span style="color: #FF0000">"/static/style.css"</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"accept"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/css"</span><span style="color: #990000">&gt;&gt;</span>
-}, <span style="color: #009900">Req0</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">200</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/html"</span><span style="color: #990000">&gt;&gt;</span>
-}, [<span style="color: #FF0000">"&lt;html&gt;&lt;head&gt;&lt;title&gt;My web page&lt;/title&gt;"</span>,
- <span style="color: #FF0000">"&lt;link rel='stylesheet' type='text/css' href='/static/style.css'&gt;"</span>,
- <span style="color: #FF0000">"&lt;body&gt;&lt;p&gt;Welcome to Erlang!&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;"</span>], <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>To override the method, scheme, host, port or query string,
-simply pass in a fourth argument. The following snippet
-uses a different host name:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">cowboy_req:push</font></b>(<font color="#FF0000">"/static/style.css"</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"accept"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/css"</font><font color="#990000">&gt;&gt;</font>
+}, <font color="#009900">Req0</font>),
+<font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:reply</font></b>(<font color="#993399">200</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/html"</font><font color="#990000">&gt;&gt;</font>
+}, [<font color="#FF0000">"&lt;html&gt;&lt;head&gt;&lt;title&gt;My web page&lt;/title&gt;"</font>,
+ <font color="#FF0000">"&lt;link rel='stylesheet' type='text/css' href='/static/style.css'&gt;"</font>,
+ <font color="#FF0000">"&lt;body&gt;&lt;p&gt;Welcome to Erlang!&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;"</font>], <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>To override the method, scheme, host, port or query string, simply pass in a fourth argument. The following snippet uses a different host name:</p>
+<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">cowboy_req:push</span></span>(<span style="color: #FF0000">"/static/style.css"</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"accept"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/css"</span><span style="color: #990000">&gt;&gt;</span>
-}, #{<span style="color: #0000FF">host</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"cdn.example.org"</span><span style="color: #990000">&gt;&gt;</span>}, <span style="color: #009900">Req</span>),</tt></pre></div></div>
-<div class="paragraph"><p>Pushed resources don&#8217;t have to be files. As long as the push
-request is cacheable, safe and does not include a body, the
-resource can be pushed.</p></div>
-<div class="paragraph"><p>Under the hood, Cowboy handles pushed requests the same as
-normal requests: a different process is created which will
-ultimately send a response to the client.</p></div>
-</div>
-</div>
+<pre><tt><b><font color="#000000">cowboy_req:push</font></b>(<font color="#FF0000">"/static/style.css"</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"accept"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/css"</font><font color="#990000">&gt;&gt;</font>
+}, #{<font color="#0000FF">host</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"cdn.example.org"</font><font color="#990000">&gt;&gt;</font>}, <font color="#009900">Req</font>),</tt></pre>
+</div></div>
+<p>Pushed resources don&apos;t have to be files. As long as the push request is cacheable, safe and does not include a body, the resource can be pushed.</p>
+<p>Under the hood, Cowboy handles pushed requests the same as normal requests: a different process is created which will ultimately send a response to the client.</p>
+
diff --git a/docs/en/cowboy/2.0/guide/rest_flowcharts/index.html b/docs/en/cowboy/2.0/guide/rest_flowcharts/index.html
index 2bed5190..01817463 100644
--- a/docs/en/cowboy/2.0/guide/rest_flowcharts/index.html
+++ b/docs/en/cowboy/2.0/guide/rest_flowcharts/index.html
@@ -62,244 +62,64 @@
<h1 class="lined-header"><span>REST flowcharts</span></h1>
-<div class="paragraph"><p>This chapter will explain the REST handler state machine through
-a number of different diagrams.</p></div>
-<div class="paragraph"><p>There are four main paths that requests may follow. One for the
-method OPTIONS; one for the methods GET and HEAD; one for the
-methods PUT, POST and PATCH; and one for the method DELETE.</p></div>
-<div class="paragraph"><p>All paths start with the "Start" diagram, and all paths excluding
-the OPTIONS path go through the "Content negotiation" diagram
-and optionally the "Conditional requests" diagram if the resource
-exists.</p></div>
-<div class="paragraph"><p>The red squares refer to another diagram. The light green squares
-indicate a response. Other squares may be either a callback or a
-question answered by Cowboy itself. Green arrows tend to indicate
-the default behavior if the callback is undefined.</p></div>
-<div class="sect1">
+<p>This chapter will explain the REST handler state machine through a number of different diagrams.</p>
+<p>There are four main paths that requests may follow. One for the method OPTIONS; one for the methods GET and HEAD; one for the methods PUT, POST and PATCH; and one for the method DELETE.</p>
+<p>All paths start with the &quot;Start&quot; diagram, and all paths excluding the OPTIONS path go through the &quot;Content negotiation&quot; diagram and optionally the &quot;Conditional requests&quot; diagram if the resource exists.</p>
+<p>The red squares refer to another diagram. The light green squares indicate a response. Other squares may be either a callback or a question answered by Cowboy itself. Green arrows tend to indicate the default behavior if the callback is undefined.</p>
<h2 id="_start">Start</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>All requests start from here.</p></div>
-<div class="imageblock">
-<div class="content">
-<img src="../rest_start.png" alt="REST starting flowchart" />
-</div>
-</div>
-<div class="paragraph"><p>A series of callbacks are called in succession to perform
-a general checkup of the service, the request line and
-request headers.</p></div>
-<div class="paragraph"><p>The request body, if any, is not expected to have been
-received for any of these steps. It is only processed
-at the end of the "PUT, POST and PATCH methods" diagram,
-when all conditions have been met.</p></div>
-<div class="paragraph"><p>The <code>known_methods</code> and <code>allowed_methods</code> callbacks
-return a list of methods. Cowboy then checks if the request
-method is in the list, and stops otherwise.</p></div>
-<div class="paragraph"><p>The <code>is_authorized</code> callback may be used to check that
-access to the resource is authorized. Authentication
-may also be performed as needed. When authorization is
-denied, the return value from the callback must include
-a challenge applicable to the requested resource, which
-will be sent back to the client in the www-authenticate
-header.</p></div>
-<div class="paragraph"><p>This diagram is immediately followed by either the
-"OPTIONS method" diagram when the request method is
-OPTIONS, or the "Content negotiation" diagram otherwise.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>All requests start from here.</p>
+<img src="../rest_start.png" alt="REST starting flowchart"/><p>A series of callbacks are called in succession to perform a general checkup of the service, the request line and request headers.</p>
+<p>The request body, if any, is not expected to have been received for any of these steps. It is only processed at the end of the &quot;PUT, POST and PATCH methods&quot; diagram, when all conditions have been met.</p>
+<p>The <code>known_methods</code> and <code>allowed_methods</code> callbacks return a list of methods. Cowboy then checks if the request method is in the list, and stops otherwise.</p>
+<p>The <code>is_authorized</code> callback may be used to check that access to the resource is authorized. Authentication may also be performed as needed. When authorization is denied, the return value from the callback must include a challenge applicable to the requested resource, which will be sent back to the client in the www-authenticate header.</p>
+<p>This diagram is immediately followed by either the &quot;OPTIONS method&quot; diagram when the request method is OPTIONS, or the &quot;Content negotiation&quot; diagram otherwise.</p>
<h2 id="_options_method">OPTIONS method</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This diagram only applies to OPTIONS requests.</p></div>
-<div class="imageblock">
-<div class="content">
-<img src="../rest_options.png" alt="REST OPTIONS method flowchart" />
-</div>
-</div>
-<div class="paragraph"><p>The <code>options</code> callback may be used to add information
-about the resource, such as media types or languages
-provided; allowed methods; any extra information. A
-response body may also be set, although clients should
-not be expected to read it.</p></div>
-<div class="paragraph"><p>If the <code>options</code> callback is not defined, Cowboy will
-send a response containing the list of allowed methods
-by default.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This diagram only applies to OPTIONS requests.</p>
+<img src="../rest_options.png" alt="REST OPTIONS method flowchart"/><p>The <code>options</code> callback may be used to add information about the resource, such as media types or languages provided; allowed methods; any extra information. A response body may also be set, although clients should not be expected to read it.</p>
+<p>If the <code>options</code> callback is not defined, Cowboy will send a response containing the list of allowed methods by default.</p>
<h2 id="_content_negotiation">Content negotiation</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This diagram applies to all request methods other than
-OPTIONS. It is executed right after the "Start" diagram
-is completed.</p></div>
-<div class="imageblock">
-<div class="content">
-<img src="../rest_conneg.png" alt="REST content negotiation flowchart" />
-</div>
-</div>
-<div class="paragraph"><p>The purpose of these steps is to determine an appropriate
-representation to be sent back to the client.</p></div>
-<div class="paragraph"><p>The request may contain any of the accept header; the
-accept-language header; or the accept-charset header.
-When present, Cowboy will parse the headers and then
-call the corresponding callback to obtain the list
-of provided content-type, language or charset for this
-resource. It then automatically select the best match
-based on the request.</p></div>
-<div class="paragraph"><p>If a callback is not defined, Cowboy will select the
-content-type, language or charset that the client
-prefers.</p></div>
-<div class="paragraph"><p>The <code>content_types_provided</code> also returns the name of
-a callback for every content-type it accepts. This
-callback will only be called at the end of the
-"GET and HEAD methods" diagram, when all conditions
-have been met.</p></div>
-<div class="paragraph"><p>The selected content-type, language and charset are
-saved as meta values in the Req object. You <strong>should</strong>
-use the appropriate representation if you set a
-response body manually (alongside an error code,
-for example).</p></div>
-<div class="paragraph"><p>This diagram is immediately followed by
-the "GET and HEAD methods" diagram,
-the "PUT, POST and PATCH methods" diagram,
-or the "DELETE method" diagram, depending on the
-method.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This diagram applies to all request methods other than OPTIONS. It is executed right after the &quot;Start&quot; diagram is completed.</p>
+<img src="../rest_conneg.png" alt="REST content negotiation flowchart"/><p>The purpose of these steps is to determine an appropriate representation to be sent back to the client.</p>
+<p>The request may contain any of the accept header; the accept-language header; or the accept-charset header. When present, Cowboy will parse the headers and then call the corresponding callback to obtain the list of provided content-type, language or charset for this resource. It then automatically select the best match based on the request.</p>
+<p>If a callback is not defined, Cowboy will select the content-type, language or charset that the client prefers.</p>
+<p>The <code>content_types_provided</code> also returns the name of a callback for every content-type it accepts. This callback will only be called at the end of the &quot;GET and HEAD methods&quot; diagram, when all conditions have been met.</p>
+<p>The selected content-type, language and charset are saved as meta values in the Req object. You <strong>should</strong> use the appropriate representation if you set a response body manually (alongside an error code, for example).</p>
+<p>This diagram is immediately followed by the &quot;GET and HEAD methods&quot; diagram, the &quot;PUT, POST and PATCH methods&quot; diagram, or the &quot;DELETE method&quot; diagram, depending on the method.</p>
<h2 id="_get_and_head_methods">GET and HEAD methods</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This diagram only applies to GET and HEAD requests.</p></div>
-<div class="paragraph"><p>For a description of the <code>cond</code> step, please see
-the "Conditional requests" diagram.</p></div>
-<div class="imageblock">
-<div class="content">
-<img src="../rest_get_head.png" alt="REST GET/HEAD methods flowchart" />
-</div>
-</div>
-<div class="paragraph"><p>When the resource exists, and the conditional steps
-succeed, the resource can be retrieved.</p></div>
-<div class="paragraph"><p>Cowboy prepares the response by first retrieving
-metadata about the representation, then by calling
-the <code>ProvideResource</code> callback. This is the callback
-you defined for each content-types you returned from
-<code>content_types_provided</code>. This callback returns the body
-that will be sent back to the client, or a fun if the
-body must be streamed.</p></div>
-<div class="paragraph"><p>When the resource does not exist, Cowboy will figure out
-whether the resource existed previously, and if so whether
-it was moved elsewhere in order to redirect the client to
-the new URI.</p></div>
-<div class="paragraph"><p>The <code>moved_permanently</code> and <code>moved_temporarily</code> callbacks
-must return the new location of the resource if it was in
-fact moved.</p></div>
-</div>
-</div>
-<div class="sect1">
-<h2 id="_put_post_and_patch_methods">PUT, POST and PATCH methods</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This diagram only applies to PUT, POST and PATCH requests.</p></div>
-<div class="paragraph"><p>For a description of the <code>cond</code> step, please see
-the "Conditional requests" diagram.</p></div>
-<div class="imageblock">
-<div class="content">
-<img src="../rest_put_post_patch.png" alt="REST PUT/POST/PATCH methods flowchart" />
-</div>
-</div>
-<div class="paragraph"><p>When the resource exists, first the conditional steps
-are executed. When that succeeds, and the method is PUT,
-Cowboy will call the <code>is_conflict</code> callback. This function
-can be used to prevent potential race conditions, by locking
-the resource for example.</p></div>
-<div class="paragraph"><p>Then all three methods reach the <code>content_types_accepted</code>
-step that we will describe in a few paragraphs.</p></div>
-<div class="paragraph"><p>When the resource does not exist, and the method is PUT,
-Cowboy will check for conflicts and then move on to the
-<code>content_types_accepted</code> step. For other methods, Cowboy
-will figure out whether the resource existed previously,
-and if so whether it was moved elsewhere. If the resource
-is truly non-existent, the method is POST and the call
-for <code>allow_missing_post</code> returns <code>true</code>, then Cowboy will
-move on to the <code>content_types_accepted</code> step. Otherwise
-the request processing ends there.</p></div>
-<div class="paragraph"><p>The <code>moved_permanently</code> and <code>moved_temporarily</code> callbacks
-must return the new location of the resource if it was in
-fact moved.</p></div>
-<div class="paragraph"><p>The <code>content_types_accepted</code> returns a list of
-content-types it accepts, but also the name of a callback
-for each of them. Cowboy will select the appropriate
-callback for processing the request body and call it.</p></div>
-<div class="paragraph"><p>This callback may return one of three different return
-values.</p></div>
-<div class="paragraph"><p>If an error occurred while processing the request body,
-it must return <code>false</code> and Cowboy will send an
-appropriate error response.</p></div>
-<div class="paragraph"><p>If the method is POST, then you may return <code>true</code> with
-an URI of where the resource has been created. This is
-especially useful for writing handlers for collections.</p></div>
-<div class="paragraph"><p>Otherwise, return <code>true</code> to indicate success. Cowboy
-will select the appropriate response to be sent depending
-on whether a resource has been created, rather than
-modified, and on the availability of a location header
-or a body in the response.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This diagram only applies to GET and HEAD requests.</p>
+<p>For a description of the <code>cond</code> step, please see the &quot;Conditional requests&quot; diagram.</p>
+<img src="../rest_get_head.png" alt="REST GET/HEAD methods flowchart"/><p>When the resource exists, and the conditional steps succeed, the resource can be retrieved.</p>
+<p>Cowboy prepares the response by first retrieving metadata about the representation, then by calling the <code>ProvideResource</code> callback. This is the callback you defined for each content-types you returned from <code>content_types_provided</code>. This callback returns the body that will be sent back to the client, or a fun if the body must be streamed.</p>
+<p>When the resource does not exist, Cowboy will figure out whether the resource existed previously, and if so whether it was moved elsewhere in order to redirect the client to the new URI.</p>
+<p>The <code>moved_permanently</code> and <code>moved_temporarily</code> callbacks must return the new location of the resource if it was in fact moved.</p>
+<h2 id="_put__post_and_patch_methods">PUT, POST and PATCH methods</h2>
+<p>This diagram only applies to PUT, POST and PATCH requests.</p>
+<p>For a description of the <code>cond</code> step, please see the &quot;Conditional requests&quot; diagram.</p>
+<img src="../rest_put_post_patch.png" alt="REST PUT/POST/PATCH methods flowchart"/><p>When the resource exists, first the conditional steps are executed. When that succeeds, and the method is PUT, Cowboy will call the <code>is_conflict</code> callback. This function can be used to prevent potential race conditions, by locking the resource for example.</p>
+<p>Then all three methods reach the <code>content_types_accepted</code> step that we will describe in a few paragraphs.</p>
+<p>When the resource does not exist, and the method is PUT, Cowboy will check for conflicts and then move on to the <code>content_types_accepted</code> step. For other methods, Cowboy will figure out whether the resource existed previously, and if so whether it was moved elsewhere. If the resource is truly non-existent, the method is POST and the call for <code>allow_missing_post</code> returns <code>true</code>, then Cowboy will move on to the <code>content_types_accepted</code> step. Otherwise the request processing ends there.</p>
+<p>The <code>moved_permanently</code> and <code>moved_temporarily</code> callbacks must return the new location of the resource if it was in fact moved.</p>
+<p>The <code>content_types_accepted</code> returns a list of content-types it accepts, but also the name of a callback for each of them. Cowboy will select the appropriate callback for processing the request body and call it.</p>
+<p>This callback may return one of three different return values.</p>
+<p>If an error occurred while processing the request body, it must return <code>false</code> and Cowboy will send an appropriate error response.</p>
+<p>If the method is POST, then you may return <code>true</code> with an URI of where the resource has been created. This is especially useful for writing handlers for collections.</p>
+<p>Otherwise, return <code>true</code> to indicate success. Cowboy will select the appropriate response to be sent depending on whether a resource has been created, rather than modified, and on the availability of a location header or a body in the response.</p>
<h2 id="_delete_method">DELETE method</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This diagram only applies to DELETE requests.</p></div>
-<div class="paragraph"><p>For a description of the <code>cond</code> step, please see
-the "Conditional requests" diagram.</p></div>
-<div class="imageblock">
-<div class="content">
-<img src="../rest_delete.png" alt="REST DELETE method flowchart" />
-</div>
-</div>
-<div class="paragraph"><p>When the resource exists, and the conditional steps
-succeed, the resource can be deleted.</p></div>
-<div class="paragraph"><p>Deleting the resource is a two steps process. First
-the callback <code>delete_resource</code> is executed. Use this
-callback to delete the resource.</p></div>
-<div class="paragraph"><p>Because the resource may be cached, you must also
-delete all cached representations of this resource
-in the system. This operation may take a while though,
-so you may return before it finished.</p></div>
-<div class="paragraph"><p>Cowboy will then call the <code>delete_completed</code> callback.
-If you know that the resource has been completely
-deleted from your system, including from caches, then
-you can return <code>true</code>. If any doubts persist, return
-<code>false</code>. Cowboy will assume <code>true</code> by default.</p></div>
-<div class="paragraph"><p>To finish, Cowboy checks if you set a response body,
-and depending on that, sends the appropriate response.</p></div>
-<div class="paragraph"><p>When the resource does not exist, Cowboy will figure out
-whether the resource existed previously, and if so whether
-it was moved elsewhere in order to redirect the client to
-the new URI.</p></div>
-<div class="paragraph"><p>The <code>moved_permanently</code> and <code>moved_temporarily</code> callbacks
-must return the new location of the resource if it was in
-fact moved.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This diagram only applies to DELETE requests.</p>
+<p>For a description of the <code>cond</code> step, please see the &quot;Conditional requests&quot; diagram.</p>
+<img src="../rest_delete.png" alt="REST DELETE method flowchart"/><p>When the resource exists, and the conditional steps succeed, the resource can be deleted.</p>
+<p>Deleting the resource is a two steps process. First the callback <code>delete_resource</code> is executed. Use this callback to delete the resource.</p>
+<p>Because the resource may be cached, you must also delete all cached representations of this resource in the system. This operation may take a while though, so you may return before it finished.</p>
+<p>Cowboy will then call the <code>delete_completed</code> callback. If you know that the resource has been completely deleted from your system, including from caches, then you can return <code>true</code>. If any doubts persist, return <code>false</code>. Cowboy will assume <code>true</code> by default.</p>
+<p>To finish, Cowboy checks if you set a response body, and depending on that, sends the appropriate response.</p>
+<p>When the resource does not exist, Cowboy will figure out whether the resource existed previously, and if so whether it was moved elsewhere in order to redirect the client to the new URI.</p>
+<p>The <code>moved_permanently</code> and <code>moved_temporarily</code> callbacks must return the new location of the resource if it was in fact moved.</p>
<h2 id="_conditional_requests">Conditional requests</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This diagram applies to all request methods other than
-OPTIONS. It is executed right after the <code>resource_exists</code>
-callback, when the resource exists.</p></div>
-<div class="imageblock">
-<div class="content">
-<img src="../rest_cond.png" alt="REST conditional requests flowchart" />
-</div>
-</div>
-<div class="paragraph"><p>A request becomes conditional when it includes either of
-the if-match header; the if-unmodified-since header; the
-if-none-match header; or the if-modified-since header.</p></div>
-<div class="paragraph"><p>If the condition fails, the request ends immediately
-without any retrieval or modification of the resource.</p></div>
-<div class="paragraph"><p>The <code>generate_etag</code> and <code>last_modified</code> are called as
-needed. Cowboy will only call them once and then cache
-the results for subsequent use.</p></div>
-</div>
-</div>
+<p>This diagram applies to all request methods other than OPTIONS. It is executed right after the <code>resource_exists</code> callback, when the resource exists.</p>
+<img src="../rest_cond.png" alt="REST conditional requests flowchart"/><p>A request becomes conditional when it includes either of the if-match header; the if-unmodified-since header; the if-none-match header; or the if-modified-since header.</p>
+<p>If the condition fails, the request ends immediately without any retrieval or modification of the resource.</p>
+<p>The <code>generate_etag</code> and <code>last_modified</code> are called as needed. Cowboy will only call them once and then cache the results for subsequent use.</p>
+
diff --git a/docs/en/cowboy/2.0/guide/rest_handlers/index.html b/docs/en/cowboy/2.0/guide/rest_handlers/index.html
index 7edacfa9..99d3b986 100644
--- a/docs/en/cowboy/2.0/guide/rest_handlers/index.html
+++ b/docs/en/cowboy/2.0/guide/rest_handlers/index.html
@@ -62,283 +62,162 @@
<h1 class="lined-header"><span>REST handlers</span></h1>
-<div class="paragraph"><p>REST is implemented in Cowboy as a sub protocol. The request
-is handled as a state machine with many optional callbacks
-describing the resource and modifying the machine&#8217;s behavior.</p></div>
-<div class="paragraph"><p>The REST handler is the recommended way to handle HTTP requests.</p></div>
-<div class="sect1">
+<p>REST is implemented in Cowboy as a sub protocol. The request is handled as a state machine with many optional callbacks describing the resource and modifying the machine&apos;s behavior.</p>
+<p>The REST handler is the recommended way to handle HTTP requests.</p>
<h2 id="_initialization">Initialization</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>First, the <code>init/2</code> callback is called. This callback is common
-to all handlers. To use REST for the current request, this function
-must return a <code>cowboy_rest</code> tuple.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>First, the <code>init/2</code> callback is called. This callback is common to all handlers. To use REST for the current request, this function must return a <code>cowboy_rest</code> tuple.</p>
+<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">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 class="paragraph"><p>Cowboy will then switch to the REST protocol and start executing
-the state machine.</p></div>
-<div class="paragraph"><p>After reaching the end of the flowchart, the <code>terminate/3</code> callback
-will be called if it is defined.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">cowboy_rest</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Cowboy will then switch to the REST protocol and start executing the state machine.</p>
+<p>After reaching the end of the flowchart, the <code>terminate/3</code> callback will be called if it is defined.</p>
<h2 id="_methods">Methods</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The REST component has code for handling the following HTTP methods:
-HEAD, GET, POST, PATCH, PUT, DELETE and OPTIONS.</p></div>
-<div class="paragraph"><p>Other methods can be accepted, however they have no specific callback
-defined for them at this time.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The REST component has code for handling the following HTTP methods: HEAD, GET, POST, PATCH, PUT, DELETE and OPTIONS.</p>
+<p>Other methods can be accepted, however they have no specific callback defined for them at this time.</p>
<h2 id="_callbacks">Callbacks</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>All callbacks are optional. Some may become mandatory depending
-on what other defined callbacks return. The various flowcharts
-in the next chapter should be a useful to determine which callbacks
-you need.</p></div>
-<div class="paragraph"><p>All callbacks take two arguments, the Req object and the State,
-and return a three-element tuple of the form <code>{Value, Req, State}</code>.</p></div>
-<div class="paragraph"><p>All callbacks can also return <code>{stop, Req, State}</code> to stop execution
-of the request.</p></div>
-<div class="paragraph"><p>The following table summarizes the callbacks and their default values.
-If the callback isn&#8217;t defined, then the default value will be used.
-Please look at the flowcharts to find out the result of each return
-value.</p></div>
-<div class="paragraph"><p>In the following table, "skip" means the callback is entirely skipped
-if it is undefined, moving directly to the next step. Similarly,
-"none" means there is no default value for this callback.</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"> Callback name </th>
-<th align="center" valign="top"> Default value</th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td align="left" valign="top"><p class="table">allowed_methods</p></td>
-<td align="center" valign="top"><p class="table"><code>[&lt;&lt;"GET"&gt;&gt;, &lt;&lt;"HEAD"&gt;&gt;, &lt;&lt;"OPTIONS"&gt;&gt;]</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">allow_missing_post</p></td>
-<td align="center" valign="top"><p class="table"><code>true</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">charsets_provided</p></td>
-<td align="center" valign="top"><p class="table">skip</p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">content_types_accepted</p></td>
-<td align="center" valign="top"><p class="table">none</p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">content_types_provided</p></td>
-<td align="center" valign="top"><p class="table"><code>[{{ &lt;&lt;"text"&gt;&gt;, &lt;&lt;"html"&gt;&gt;, '*'}, to_html}]</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">delete_completed</p></td>
-<td align="center" valign="top"><p class="table"><code>true</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">delete_resource</p></td>
-<td align="center" valign="top"><p class="table"><code>false</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">expires</p></td>
-<td align="center" valign="top"><p class="table"><code>undefined</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">forbidden</p></td>
-<td align="center" valign="top"><p class="table"><code>false</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">generate_etag</p></td>
-<td align="center" valign="top"><p class="table"><code>undefined</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">is_authorized</p></td>
-<td align="center" valign="top"><p class="table"><code>true</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">is_conflict</p></td>
-<td align="center" valign="top"><p class="table"><code>false</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">known_methods</p></td>
-<td align="center" valign="top"><p class="table"><code>[&lt;&lt;"GET"&gt;&gt;, &lt;&lt;"HEAD"&gt;&gt;, &lt;&lt;"POST"&gt;&gt;, &lt;&lt;"PUT"&gt;&gt;, &lt;&lt;"PATCH"&gt;&gt;, &lt;&lt;"DELETE"&gt;&gt;, &lt;&lt;"OPTIONS"&gt;&gt;]</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">languages_provided</p></td>
-<td align="center" valign="top"><p class="table">skip</p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">last_modified</p></td>
-<td align="center" valign="top"><p class="table"><code>undefined</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">malformed_request</p></td>
-<td align="center" valign="top"><p class="table"><code>false</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">moved_permanently</p></td>
-<td align="center" valign="top"><p class="table"><code>false</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">moved_temporarily</p></td>
-<td align="center" valign="top"><p class="table"><code>false</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">multiple_choices</p></td>
-<td align="center" valign="top"><p class="table"><code>false</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">options</p></td>
-<td align="center" valign="top"><p class="table"><code>ok</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">previously_existed</p></td>
-<td align="center" valign="top"><p class="table"><code>false</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">resource_exists</p></td>
-<td align="center" valign="top"><p class="table"><code>true</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">service_available</p></td>
-<td align="center" valign="top"><p class="table"><code>true</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">uri_too_long</p></td>
-<td align="center" valign="top"><p class="table"><code>false</code></p></td>
+<p>All callbacks are optional. Some may become mandatory depending on what other defined callbacks return. The various flowcharts in the next chapter should be a useful to determine which callbacks you need.</p>
+<p>All callbacks take two arguments, the Req object and the State, and return a three-element tuple of the form <code>{Value, Req, State}</code>.</p>
+<p>All callbacks can also return <code>{stop, Req, State}</code> to stop execution of the request.</p>
+<p>The following table summarizes the callbacks and their default values. If the callback isn&apos;t defined, then the default value will be used. Please look at the flowcharts to find out the result of each return value.</p>
+<p>In the following table, &quot;skip&quot; means the callback is entirely skipped if it is undefined, moving directly to the next step. Similarly, &quot;none&quot; means there is no default value for this callback.</p>
+<table rules="all" width="100%" frame="border"
+ cellspacing="0" cellpadding="4">
+<thead><tr><th>Callback name</th>
+<th>Default value</th>
+</tr></thead><tbody><tr><td>allowed_methods</td>
+<td><code>[&lt;&lt;&quot;GET&quot;&gt;&gt;, &lt;&lt;&quot;HEAD&quot;&gt;&gt;, &lt;&lt;&quot;OPTIONS&quot;&gt;&gt;]</code></td>
</tr>
-<tr>
-<td align="left" valign="top"><p class="table">valid_content_headers</p></td>
-<td align="center" valign="top"><p class="table"><code>true</code></p></td>
+<tr><td>allow_missing_post</td>
+<td><code>true</code></td>
</tr>
-<tr>
-<td align="left" valign="top"><p class="table">valid_entity_length</p></td>
-<td align="center" valign="top"><p class="table"><code>true</code></p></td>
+<tr><td>charsets_provided</td>
+<td>skip</td>
</tr>
-<tr>
-<td align="left" valign="top"><p class="table">variances</p></td>
-<td align="center" valign="top"><p class="table"><code>[]</code></p></td>
+<tr><td>content_types_accepted</td>
+<td>none</td>
</tr>
-</tbody>
-</table>
-</div>
-<div class="paragraph"><p>As you can see, Cowboy tries to move on with the request whenever
-possible by using well thought out default values.</p></div>
-<div class="paragraph"><p>In addition to these, there can be any number of user-defined
-callbacks that are specified through <code>content_types_accepted/2</code>
-and <code>content_types_provided/2</code>. They can take any name, however
-it is recommended to use a separate prefix for the callbacks of
-each function. For example, <code>from_html</code> and <code>to_html</code> indicate
-in the first case that we&#8217;re accepting a resource given as HTML,
-and in the second case that we send one as HTML.</p></div>
-</div>
-</div>
-<div class="sect1">
+<tr><td>content_types_provided</td>
+<td><code>[{{ &lt;&lt;&quot;text&quot;&gt;&gt;, &lt;&lt;&quot;html&quot;&gt;&gt;, &apos;*&apos;}, to_html}]</code></td>
+</tr>
+<tr><td>delete_completed</td>
+<td><code>true</code></td>
+</tr>
+<tr><td>delete_resource</td>
+<td><code>false</code></td>
+</tr>
+<tr><td>expires</td>
+<td><code>undefined</code></td>
+</tr>
+<tr><td>forbidden</td>
+<td><code>false</code></td>
+</tr>
+<tr><td>generate_etag</td>
+<td><code>undefined</code></td>
+</tr>
+<tr><td>is_authorized</td>
+<td><code>true</code></td>
+</tr>
+<tr><td>is_conflict</td>
+<td><code>false</code></td>
+</tr>
+<tr><td>known_methods</td>
+<td><code>[&lt;&lt;&quot;GET&quot;&gt;&gt;, &lt;&lt;&quot;HEAD&quot;&gt;&gt;, &lt;&lt;&quot;POST&quot;&gt;&gt;, &lt;&lt;&quot;PUT&quot;&gt;&gt;, &lt;&lt;&quot;PATCH&quot;&gt;&gt;, &lt;&lt;&quot;DELETE&quot;&gt;&gt;, &lt;&lt;&quot;OPTIONS&quot;&gt;&gt;]</code></td>
+</tr>
+<tr><td>languages_provided</td>
+<td>skip</td>
+</tr>
+<tr><td>last_modified</td>
+<td><code>undefined</code></td>
+</tr>
+<tr><td>malformed_request</td>
+<td><code>false</code></td>
+</tr>
+<tr><td>moved_permanently</td>
+<td><code>false</code></td>
+</tr>
+<tr><td>moved_temporarily</td>
+<td><code>false</code></td>
+</tr>
+<tr><td>multiple_choices</td>
+<td><code>false</code></td>
+</tr>
+<tr><td>options</td>
+<td><code>ok</code></td>
+</tr>
+<tr><td>previously_existed</td>
+<td><code>false</code></td>
+</tr>
+<tr><td>resource_exists</td>
+<td><code>true</code></td>
+</tr>
+<tr><td>service_available</td>
+<td><code>true</code></td>
+</tr>
+<tr><td>uri_too_long</td>
+<td><code>false</code></td>
+</tr>
+<tr><td>valid_content_headers</td>
+<td><code>true</code></td>
+</tr>
+<tr><td>valid_entity_length</td>
+<td><code>true</code></td>
+</tr>
+<tr><td>variances</td>
+<td><code>[]</code></td>
+</tr>
+</tbody></table>
+<p>As you can see, Cowboy tries to move on with the request whenever possible by using well thought out default values.</p>
+<p>In addition to these, there can be any number of user-defined callbacks that are specified through <code>content_types_accepted/2</code> and <code>content_types_provided/2</code>. They can take any name, however it is recommended to use a separate prefix for the callbacks of each function. For example, <code>from_html</code> and <code>to_html</code> indicate in the first case that we&apos;re accepting a resource given as HTML, and in the second case that we send one as HTML.</p>
<h2 id="_meta_data">Meta data</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy will set informative values to the Req object at various
-points of the execution. You can retrieve them by matching the
-Req object directly. The values are defined in the following table:</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"> Key </th>
-<th align="left" valign="top"> Details</th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td align="left" valign="top"><p class="table">media_type</p></td>
-<td align="left" valign="top"><p class="table">The content-type negotiated for the response entity.</p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">language</p></td>
-<td align="left" valign="top"><p class="table">The language negotiated for the response entity.</p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">charset</p></td>
-<td align="left" valign="top"><p class="table">The charset negotiated for the response entity.</p></td>
-</tr>
-</tbody>
-</table>
-</div>
-<div class="paragraph"><p>They can be used to send a proper body with the response to a
-request that used a method other than HEAD or GET.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Cowboy will set informative values to the Req object at various points of the execution. You can retrieve them by matching the Req object directly. The values are defined in the following table:</p>
+<table rules="all" width="100%" frame="border"
+ cellspacing="0" cellpadding="4">
+<thead><tr><th>Key</th>
+<th>Details</th>
+</tr></thead><tbody><tr><td>media_type</td>
+<td>The content-type negotiated for the response entity.</td>
+</tr>
+<tr><td>language</td>
+<td>The language negotiated for the response entity.</td>
+</tr>
+<tr><td>charset</td>
+<td>The charset negotiated for the response entity.</td>
+</tr>
+</tbody></table>
+<p>They can be used to send a proper body with the response to a request that used a method other than HEAD or GET.</p>
<h2 id="_response_headers">Response headers</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy will set response headers automatically over the execution
-of the REST code. They are listed in the following table.</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="left" valign="top"> Details</th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td align="left" valign="top"><p class="table">content-language</p></td>
-<td align="left" valign="top"><p class="table">Language used in the response body</p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">content-type</p></td>
-<td align="left" valign="top"><p class="table">Media type and charset of the response body</p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">etag</p></td>
-<td align="left" valign="top"><p class="table">Etag of the resource</p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">expires</p></td>
-<td align="left" valign="top"><p class="table">Expiration date of the resource</p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">last-modified</p></td>
-<td align="left" valign="top"><p class="table">Last modification date for the resource</p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">location</p></td>
-<td align="left" valign="top"><p class="table">Relative or absolute URI to the requested resource</p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">vary</p></td>
-<td align="left" valign="top"><p class="table">List of headers that may change the representation of the resource</p></td>
-</tr>
-</tbody>
-</table>
-</div>
-</div>
-</div>
+<p>Cowboy will set response headers automatically over the execution of the REST code. They are listed in the following table.</p>
+<table rules="all" width="100%" frame="border"
+ cellspacing="0" cellpadding="4">
+<thead><tr><th>Header name</th>
+<th>Details</th>
+</tr></thead><tbody><tr><td>content-language</td>
+<td>Language used in the response body</td>
+</tr>
+<tr><td>content-type</td>
+<td>Media type and charset of the response body</td>
+</tr>
+<tr><td>etag</td>
+<td>Etag of the resource</td>
+</tr>
+<tr><td>expires</td>
+<td>Expiration date of the resource</td>
+</tr>
+<tr><td>last-modified</td>
+<td>Last modification date for the resource</td>
+</tr>
+<tr><td>location</td>
+<td>Relative or absolute URI to the requested resource</td>
+</tr>
+<tr><td>vary</td>
+<td>List of headers that may change the representation of the resource</td>
+</tr>
+</tbody></table>
+
diff --git a/docs/en/cowboy/2.0/guide/rest_principles/index.html b/docs/en/cowboy/2.0/guide/rest_principles/index.html
index 8a5450f7..01246ac8 100644
--- a/docs/en/cowboy/2.0/guide/rest_principles/index.html
+++ b/docs/en/cowboy/2.0/guide/rest_principles/index.html
@@ -62,153 +62,38 @@
<h1 class="lined-header"><span>REST principles</span></h1>
-<div class="paragraph"><p>This chapter will attempt to define the concepts behind REST
-and explain what makes a service RESTful.</p></div>
-<div class="paragraph"><p>REST is often confused with performing a distinct operation
-depending on the HTTP method, while using more than the GET
-and POST methods. That&#8217;s highly misguided at best.</p></div>
-<div class="paragraph"><p>We will first attempt to define REST and will look at what
-it means in the context of HTTP and the Web.
-For a more in-depth explanation of REST, you can read
-<a href="http://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm">Roy T. Fielding&#8217;s dissertation</a>
-as it does a great job explaining where it comes from and
-what it achieves.</p></div>
-<div class="sect1">
+<p>This chapter will attempt to define the concepts behind REST and explain what makes a service RESTful.</p>
+<p>REST is often confused with performing a distinct operation depending on the HTTP method, while using more than the GET and POST methods. That&apos;s highly misguided at best.</p>
+<p>We will first attempt to define REST and will look at what it means in the context of HTTP and the Web. For a more in-depth explanation of REST, you can read <a href="http://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm">Roy T. Fielding&apos;s dissertation</a> as it does a great job explaining where it comes from and what it achieves.</p>
<h2 id="_rest_architecture">REST architecture</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>REST is a <strong>client-server</strong> architecture. The client and the server
-both have a different set of concerns. The server stores and/or
-manipulates information and makes it available to the user in
-an efficient manner. The client takes that information and
-displays it to the user and/or uses it to perform subsequent
-requests for information. This separation of concerns allows both
-the client and the server to evolve independently as it only
-requires that the interface stays the same.</p></div>
-<div class="paragraph"><p>REST is <strong>stateless</strong>. That means the communication between the
-client and the server always contains all the information needed
-to perform the request. There is no session state in the server,
-it is kept entirely on the client&#8217;s side. If access to a resource
-requires authentication, then the client needs to authenticate
-itself with every request.</p></div>
-<div class="paragraph"><p>REST is <strong>cacheable</strong>. The client, the server and any intermediary
-components can all cache resources in order to improve performance.</p></div>
-<div class="paragraph"><p>REST provides a <strong>uniform interface</strong> between components. This
-simplifies the architecture, as all components follow the same
-rules to speak to one another. It also makes it easier to understand
-the interactions between the different components of the system.
-A number of constraints are required to achieve this. They are
-covered in the rest of the chapter.</p></div>
-<div class="paragraph"><p>REST is a <strong>layered system</strong>. Individual components cannot see
-beyond the immediate layer with which they are interacting. This
-means that a client connecting to an intermediate component, like
-a proxy, has no knowledge of what lies beyond. This allows
-components to be independent and thus easily replaceable or
-extendable.</p></div>
-<div class="paragraph"><p>REST optionally provides <strong>code on demand</strong>. Code may be downloaded
-to extend client functionality. This is optional however because
-the client may not be able to download or run this code, and so
-a REST component cannot rely on it being executed.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>REST is a <strong>client-server</strong> architecture. The client and the server both have a different set of concerns. The server stores and/or manipulates information and makes it available to the user in an efficient manner. The client takes that information and displays it to the user and/or uses it to perform subsequent requests for information. This separation of concerns allows both the client and the server to evolve independently as it only requires that the interface stays the same.</p>
+<p>REST is <strong>stateless</strong>. That means the communication between the client and the server always contains all the information needed to perform the request. There is no session state in the server, it is kept entirely on the client&apos;s side. If access to a resource requires authentication, then the client needs to authenticate itself with every request.</p>
+<p>REST is <strong>cacheable</strong>. The client, the server and any intermediary components can all cache resources in order to improve performance.</p>
+<p>REST provides a <strong>uniform interface</strong> between components. This simplifies the architecture, as all components follow the same rules to speak to one another. It also makes it easier to understand the interactions between the different components of the system. A number of constraints are required to achieve this. They are covered in the rest of the chapter.</p>
+<p>REST is a <strong>layered system</strong>. Individual components cannot see beyond the immediate layer with which they are interacting. This means that a client connecting to an intermediate component, like a proxy, has no knowledge of what lies beyond. This allows components to be independent and thus easily replaceable or extendable.</p>
+<p>REST optionally provides <strong>code on demand</strong>. Code may be downloaded to extend client functionality. This is optional however because the client may not be able to download or run this code, and so a REST component cannot rely on it being executed.</p>
<h2 id="_resources_and_resource_identifiers">Resources and resource identifiers</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A resource is an abstract concept. In a REST system, any information
-that can be named may be a resource. This includes documents, images,
-a collection of resources and any other information. Any information
-that can be the target of an hypertext link can be a resource.</p></div>
-<div class="paragraph"><p>A resource is a conceptual mapping to a set of entities. The set of
-entities evolves over time; a resource doesn&#8217;t. For example, a resource
-can map to "users who have logged in this past month" and another
-to "all users". At some point in time they may map to the same set of
-entities, because all users logged in this past month. But they are
-still different resources. Similarly, if nobody logged in recently,
-then the first resource may map to the empty set. This resource exists
-regardless of the information it maps to.</p></div>
-<div class="paragraph"><p>Resources are identified by uniform resource identifiers, also known
-as URIs. Sometimes internationalized resource identifiers, or IRIs,
-may also be used, but these can be directly translated into a URI.</p></div>
-<div class="paragraph"><p>In practice we will identify two kinds of resources. Individual
-resources map to a set of one element, for example "user Joe".
-Collection of resources map to a set of 0 to N elements,
-for example "all users".</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>A resource is an abstract concept. In a REST system, any information that can be named may be a resource. This includes documents, images, a collection of resources and any other information. Any information that can be the target of an hypertext link can be a resource.</p>
+<p>A resource is a conceptual mapping to a set of entities. The set of entities evolves over time; a resource doesn&apos;t. For example, a resource can map to &quot;users who have logged in this past month&quot; and another to &quot;all users&quot;. At some point in time they may map to the same set of entities, because all users logged in this past month. But they are still different resources. Similarly, if nobody logged in recently, then the first resource may map to the empty set. This resource exists regardless of the information it maps to.</p>
+<p>Resources are identified by uniform resource identifiers, also known as URIs. Sometimes internationalized resource identifiers, or IRIs, may also be used, but these can be directly translated into a URI.</p>
+<p>In practice we will identify two kinds of resources. Individual resources map to a set of one element, for example &quot;user Joe&quot;. Collection of resources map to a set of 0 to N elements, for example &quot;all users&quot;.</p>
<h2 id="_resource_representations">Resource representations</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The representation of a resource is a sequence of bytes associated
-with metadata.</p></div>
-<div class="paragraph"><p>The metadata comes as a list of key-value pairs, where the name
-corresponds to a standard that defines the value&#8217;s structure and
-semantics. With HTTP, the metadata comes in the form of request
-or response headers. The headers' structure and semantics are well
-defined in the HTTP standard. Metadata includes representation
-metadata, resource metadata and control data.</p></div>
-<div class="paragraph"><p>The representation metadata gives information about the
-representation, such as its media type, the date of last
-modification, or even a checksum.</p></div>
-<div class="paragraph"><p>Resource metadata could be link to related resources or
-information about additional representations of the resource.</p></div>
-<div class="paragraph"><p>Control data allows parameterizing the request or response.
-For example, we may only want the representation returned if
-it is more recent than the one we have in cache. Similarly,
-we may want to instruct the client about how it should cache
-the representation. This isn&#8217;t restricted to caching. We may,
-for example, want to store a new representation of a resource
-only if it wasn&#8217;t modified since we first retrieved it.</p></div>
-<div class="paragraph"><p>The data format of a representation is also known as the media
-type. Some media types are intended for direct rendering to the
-user, while others are intended for automated processing. The
-media type is a key component of the REST architecture.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The representation of a resource is a sequence of bytes associated with metadata.</p>
+<p>The metadata comes as a list of key-value pairs, where the name corresponds to a standard that defines the value&apos;s structure and semantics. With HTTP, the metadata comes in the form of request or response headers. The headers&apos; structure and semantics are well defined in the HTTP standard. Metadata includes representation metadata, resource metadata and control data.</p>
+<p>The representation metadata gives information about the representation, such as its media type, the date of last modification, or even a checksum.</p>
+<p>Resource metadata could be link to related resources or information about additional representations of the resource.</p>
+<p>Control data allows parameterizing the request or response. For example, we may only want the representation returned if it is more recent than the one we have in cache. Similarly, we may want to instruct the client about how it should cache the representation. This isn&apos;t restricted to caching. We may, for example, want to store a new representation of a resource only if it wasn&apos;t modified since we first retrieved it.</p>
+<p>The data format of a representation is also known as the media type. Some media types are intended for direct rendering to the user, while others are intended for automated processing. The media type is a key component of the REST architecture.</p>
<h2 id="_self_descriptive_messages">Self-descriptive messages</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Messages must be self-descriptive. That means that the data
-format of a representation must always come with its media
-type (and similarly requesting a resource involves choosing
-the media type of the representation returned). If you are
-sending HTML, then you must say it is HTML by sending the
-media type with the representation. In HTTP this is done
-using the content-type header.</p></div>
-<div class="paragraph"><p>The media type is often an IANA registered media type, like
-<code>text/html</code> or <code>image/png</code>, but does not need to be. Exactly
-two things are important for respecting this constraint: that
-the media type is well specified, and that the sender and
-recipient agree about what the media type refers to.</p></div>
-<div class="paragraph"><p>This means that you can create your own media types, like
-<code>application/x-mine</code>, and that as long as you write the
-specifications for it and that both endpoints agree about
-it then the constraint is respected.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Messages must be self-descriptive. That means that the data format of a representation must always come with its media type (and similarly requesting a resource involves choosing the media type of the representation returned). If you are sending HTML, then you must say it is HTML by sending the media type with the representation. In HTTP this is done using the content-type header.</p>
+<p>The media type is often an IANA registered media type, like <code>text/html</code> or <code>image/png</code>, but does not need to be. Exactly two things are important for respecting this constraint: that the media type is well specified, and that the sender and recipient agree about what the media type refers to.</p>
+<p>This means that you can create your own media types, like <code>application/x-mine</code>, and that as long as you write the specifications for it and that both endpoints agree about it then the constraint is respected.</p>
<h2 id="_hypermedia_as_the_engine_of_application_state">Hypermedia as the engine of application state</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The last constraint is generally where services that claim
-to be RESTful fail. Interactions with a server must be
-entirely driven by hypermedia. The client does not need
-any prior knowledge of the service in order to use it,
-other than an entry point and of course basic understanding
-of the media type of the representations, at the very least
-enough to find and identify hyperlinks and link relations.</p></div>
-<div class="paragraph"><p>To give a simple example, if your service only works with
-the <code>application/json</code> media type then this constraint
-cannot be respected (as there are no concept of links in
-JSON) and thus your service isn&#8217;t RESTful. This is the case
-for the majority of self-proclaimed REST services.</p></div>
-<div class="paragraph"><p>On the other hand if you create a JSON based media type
-that has a concept of links and link relations, then
-your service might be RESTful.</p></div>
-<div class="paragraph"><p>Respecting this constraint means that the entirety of the
-service becomes self-discoverable, not only the resources
-in it, but also the operations you can perform on it. This
-makes clients very thin as there is no need to implement
-anything specific to the service to operate on it.</p></div>
-</div>
-</div>
+<p>The last constraint is generally where services that claim to be RESTful fail. Interactions with a server must be entirely driven by hypermedia. The client does not need any prior knowledge of the service in order to use it, other than an entry point and of course basic understanding of the media type of the representations, at the very least enough to find and identify hyperlinks and link relations.</p>
+<p>To give a simple example, if your service only works with the <code>application/json</code> media type then this constraint cannot be respected (as there are no concept of links in JSON) and thus your service isn&apos;t RESTful. This is the case for the majority of self-proclaimed REST services.</p>
+<p>On the other hand if you create a JSON based media type that has a concept of links and link relations, then your service might be RESTful.</p>
+<p>Respecting this constraint means that the entirety of the service becomes self-discoverable, not only the resources in it, but also the operations you can perform on it. This makes clients very thin as there is no need to implement anything specific to the service to operate on it.</p>
+
diff --git a/docs/en/cowboy/2.0/guide/routing/index.html b/docs/en/cowboy/2.0/guide/routing/index.html
index 03031391..14b205ad 100644
--- a/docs/en/cowboy/2.0/guide/routing/index.html
+++ b/docs/en/cowboy/2.0/guide/routing/index.html
@@ -62,261 +62,181 @@
<h1 class="lined-header"><span>Routing</span></h1>
-<div class="paragraph"><p>Cowboy does nothing by default.</p></div>
-<div class="paragraph"><p>To make Cowboy useful, you need to map URIs to Erlang modules that will
-handle the requests. This is called routing.</p></div>
-<div class="paragraph"><p>When Cowboy receives a request, it tries to match the requested host and
-path to the configured routes. When there&#8217;s a match, the route&#8217;s
-associated handler is executed.</p></div>
-<div class="paragraph"><p>Routes need to be compiled before they can be used by Cowboy.
-The result of the compilation is the dispatch rules.</p></div>
-<div class="sect1">
+<p>Cowboy does nothing by default.</p>
+<p>To make Cowboy useful, you need to map URIs to Erlang modules that will handle the requests. This is called routing.</p>
+<p>When Cowboy receives a request, it tries to match the requested host and path to the configured routes. When there&apos;s a match, the route&apos;s associated handler is executed.</p>
+<p>Routes need to be compiled before they can be used by Cowboy. The result of the compilation is the dispatch rules.</p>
<h2 id="_syntax">Syntax</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The general structure for the routes is defined as follow.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The general structure for the routes is defined as follow.</p>
+<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">Routes</span> <span style="color: #990000">=</span> [<span style="color: #009900">Host1</span>, <span style="color: #009900">Host2</span>, <span style="color: #990000">...</span> <span style="color: #009900">HostN</span>]<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Each host contains matching rules for the host along with optional
-constraints, and a list of routes for the path component.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Routes</font> <font color="#990000">=</font> [<font color="#009900">Host1</font>, <font color="#009900">Host2</font>, <font color="#990000">...</font> <font color="#009900">HostN</font>]<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Each host contains matching rules for the host along with optional constraints, and a list of routes for the path component.</p>
+<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">Host1</span> <span style="color: #990000">=</span> {<span style="color: #009900">HostMatch</span>, <span style="color: #009900">PathsList</span>}<span style="color: #990000">.</span>
-<span style="color: #009900">Host2</span> <span style="color: #990000">=</span> {<span style="color: #009900">HostMatch</span>, <span style="color: #009900">Constraints</span>, <span style="color: #009900">PathsList</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>The list of routes for the path component is defined similar to the
-list of hosts.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Host1</font> <font color="#990000">=</font> {<font color="#009900">HostMatch</font>, <font color="#009900">PathsList</font>}<font color="#990000">.</font>
+<font color="#009900">Host2</font> <font color="#990000">=</font> {<font color="#009900">HostMatch</font>, <font color="#009900">Constraints</font>, <font color="#009900">PathsList</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>The list of routes for the path component is defined similar to the list of hosts.</p>
+<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">PathsList</span> <span style="color: #990000">=</span> [<span style="color: #009900">Path1</span>, <span style="color: #009900">Path2</span>, <span style="color: #990000">...</span> <span style="color: #009900">PathN</span>]<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Finally, each path contains matching rules for the path along with
-optional constraints, and gives us the handler module to be used
-along with its initial state.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">PathsList</font> <font color="#990000">=</font> [<font color="#009900">Path1</font>, <font color="#009900">Path2</font>, <font color="#990000">...</font> <font color="#009900">PathN</font>]<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Finally, each path contains matching rules for the path along with optional constraints, and gives us the handler module to be used along with its initial state.</p>
+<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">Path1</span> <span style="color: #990000">=</span> {<span style="color: #009900">PathMatch</span>, <span style="color: #009900">Handler</span>, <span style="color: #009900">InitialState</span>}<span style="color: #990000">.</span>
-<span style="color: #009900">Path2</span> <span style="color: #990000">=</span> {<span style="color: #009900">PathMatch</span>, <span style="color: #009900">Constraints</span>, <span style="color: #009900">Handler</span>, <span style="color: #009900">InitialState</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Continue reading to learn more about the match syntax and the optional
-constraints.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Path1</font> <font color="#990000">=</font> {<font color="#009900">PathMatch</font>, <font color="#009900">Handler</font>, <font color="#009900">InitialState</font>}<font color="#990000">.</font>
+<font color="#009900">Path2</font> <font color="#990000">=</font> {<font color="#009900">PathMatch</font>, <font color="#009900">Constraints</font>, <font color="#009900">Handler</font>, <font color="#009900">InitialState</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Continue reading to learn more about the match syntax and the optional constraints.</p>
<h2 id="_match_syntax">Match syntax</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The match syntax is used to associate host names and paths with their
-respective handlers.</p></div>
-<div class="paragraph"><p>The match syntax is the same for host and path with a few subtleties.
-Indeed, the segments separator is different, and the host is matched
-starting from the last segment going to the first. All examples will
-feature both host and path match rules and explain the differences
-when encountered.</p></div>
-<div class="paragraph"><p>Excluding special values that we will explain at the end of this section,
-the simplest match value is a host or a path. It can be given as either
-a <code>string()</code> or a <code>binary()</code>.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The match syntax is used to associate host names and paths with their respective handlers.</p>
+<p>The match syntax is the same for host and path with a few subtleties. Indeed, the segments separator is different, and the host is matched starting from the last segment going to the first. All examples will feature both host and path match rules and explain the differences when encountered.</p>
+<p>Excluding special values that we will explain at the end of this section, the simplest match value is a host or a path. It can be given as either a <code>string()</code> or a <code>binary()</code>.</p>
+<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">PathMatch1</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"/"</span><span style="color: #990000">.</span>
-<span style="color: #009900">PathMatch2</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"/path/to/resource"</span><span style="color: #990000">.</span>
-
-<span style="color: #009900">HostMatch1</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"cowboy.example.org"</span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>As you can see, all paths defined this way must start with a slash
-character. Note that these two paths are identical as far as routing
-is concerned.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">PathMatch1</font> <font color="#990000">=</font> <font color="#FF0000">"/"</font><font color="#990000">.</font>
+<font color="#009900">PathMatch2</font> <font color="#990000">=</font> <font color="#FF0000">"/path/to/resource"</font><font color="#990000">.</font>
+
+<font color="#009900">HostMatch1</font> <font color="#990000">=</font> <font color="#FF0000">"cowboy.example.org"</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>As you can see, all paths defined this way must start with a slash character. Note that these two paths are identical as far as routing is concerned.</p>
+<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">PathMatch2</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"/path/to/resource"</span><span style="color: #990000">.</span>
-<span style="color: #009900">PathMatch3</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"/path/to/resource/"</span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Hosts with and without a trailing dot are equivalent for routing.
-Similarly, hosts with and without a leading dot are also equivalent.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">PathMatch2</font> <font color="#990000">=</font> <font color="#FF0000">"/path/to/resource"</font><font color="#990000">.</font>
+<font color="#009900">PathMatch3</font> <font color="#990000">=</font> <font color="#FF0000">"/path/to/resource/"</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Hosts with and without a trailing dot are equivalent for routing. Similarly, hosts with and without a leading dot are also equivalent.</p>
+<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">HostMatch1</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"cowboy.example.org"</span><span style="color: #990000">.</span>
-<span style="color: #009900">HostMatch2</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"cowboy.example.org."</span><span style="color: #990000">.</span>
-<span style="color: #009900">HostMatch3</span> <span style="color: #990000">=</span> <span style="color: #FF0000">".cowboy.example.org"</span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>It is possible to extract segments of the host and path and to store
-the values in the <code>Req</code> object for later use. We call these kind of
-values bindings.</p></div>
-<div class="paragraph"><p>The syntax for bindings is very simple. A segment that begins with
-the <code>:</code> character means that what follows until the end of the segment
-is the name of the binding in which the segment value will be stored.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">HostMatch1</font> <font color="#990000">=</font> <font color="#FF0000">"cowboy.example.org"</font><font color="#990000">.</font>
+<font color="#009900">HostMatch2</font> <font color="#990000">=</font> <font color="#FF0000">"cowboy.example.org."</font><font color="#990000">.</font>
+<font color="#009900">HostMatch3</font> <font color="#990000">=</font> <font color="#FF0000">".cowboy.example.org"</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>It is possible to extract segments of the host and path and to store the values in the <code>Req</code> object for later use. We call these kind of values bindings.</p>
+<p>The syntax for bindings is very simple. A segment that begins with the <code>:</code> character means that what follows until the end of the segment is the name of the binding in which the segment value will be stored.</p>
+<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">PathMatch</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"/hats/:name/prices"</span><span style="color: #990000">.</span>
-<span style="color: #009900">HostMatch</span> <span style="color: #990000">=</span> <span style="color: #FF0000">":subdomain.example.org"</span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>If these two end up matching when routing, you will end up with two
-bindings defined, <code>subdomain</code> and <code>name</code>, each containing the
-segment value where they were defined. For example, the URL
-<code>http://test.example.org/hats/wild_cowboy_legendary/prices</code> will
-result in having the value <code>test</code> bound to the name <code>subdomain</code>
-and the value <code>wild_cowboy_legendary</code> bound to the name <code>name</code>.
-They can later be retrieved using <code>cowboy_req:binding/{2,3}</code>. The
-binding name must be given as an atom.</p></div>
-<div class="paragraph"><p>There is a special binding name you can use to mimic the underscore
-variable in Erlang. Any match against the <code>_</code> binding will succeed
-but the data will be discarded. This is especially useful for
-matching against many domain names in one go.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">PathMatch</font> <font color="#990000">=</font> <font color="#FF0000">"/hats/:name/prices"</font><font color="#990000">.</font>
+<font color="#009900">HostMatch</font> <font color="#990000">=</font> <font color="#FF0000">":subdomain.example.org"</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>If these two end up matching when routing, you will end up with two bindings defined, <code>subdomain</code> and <code>name</code>, each containing the segment value where they were defined. For example, the URL <code>http://test.example.org/hats/wild_cowboy_legendary/prices</code> will result in having the value <code>test</code> bound to the name <code>subdomain</code> and the value <code>wild_cowboy_legendary</code> bound to the name <code>name</code>. They can later be retrieved using <code>cowboy_req:binding/{2,3}</code>. The binding name must be given as an atom.</p>
+<p>There is a special binding name you can use to mimic the underscore variable in Erlang. Any match against the <code>_</code> binding will succeed but the data will be discarded. This is especially useful for matching against many domain names in one go.</p>
+<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">HostMatch</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"ninenines.:_"</span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Similarly, it is possible to have optional segments. Anything
-between brackets is optional.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">HostMatch</font> <font color="#990000">=</font> <font color="#FF0000">"ninenines.:_"</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Similarly, it is possible to have optional segments. Anything between brackets is optional.</p>
+<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">PathMatch</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"/hats/[page/:number]"</span><span style="color: #990000">.</span>
-<span style="color: #009900">HostMatch</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"[www.]ninenines.eu"</span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>You can also have imbricated optional segments.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">PathMatch</font> <font color="#990000">=</font> <font color="#FF0000">"/hats/[page/:number]"</font><font color="#990000">.</font>
+<font color="#009900">HostMatch</font> <font color="#990000">=</font> <font color="#FF0000">"[www.]ninenines.eu"</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>You can also have imbricated optional segments.</p>
+<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">PathMatch</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"/hats/[page/[:number]]"</span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>You can retrieve the rest of the host or path using <code>[...]</code>.
-In the case of hosts it will match anything before, in the case
-of paths anything after the previously matched segments. It is
-a special case of optional segments, in that it can have
-zero, one or many segments. You can then find the segments using
-<code>cowboy_req:host_info/1</code> and <code>cowboy_req:path_info/1</code> respectively.
-They will be represented as a list of segments.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">PathMatch</font> <font color="#990000">=</font> <font color="#FF0000">"/hats/[page/[:number]]"</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>You can retrieve the rest of the host or path using <code>[...]</code>. In the case of hosts it will match anything before, in the case of paths anything after the previously matched segments. It is a special case of optional segments, in that it can have zero, one or many segments. You can then find the segments using <code>cowboy_req:host_info/1</code> and <code>cowboy_req:path_info/1</code> respectively. They will be represented as a list of segments.</p>
+<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">PathMatch</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"/hats/[...]"</span><span style="color: #990000">.</span>
-<span style="color: #009900">HostMatch</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"[...]ninenines.eu"</span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>If a binding appears twice in the routing rules, then the match
-will succeed only if they share the same value. This copies the
-Erlang pattern matching behavior.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">PathMatch</font> <font color="#990000">=</font> <font color="#FF0000">"/hats/[...]"</font><font color="#990000">.</font>
+<font color="#009900">HostMatch</font> <font color="#990000">=</font> <font color="#FF0000">"[...]ninenines.eu"</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>If a binding appears twice in the routing rules, then the match will succeed only if they share the same value. This copies the Erlang pattern matching behavior.</p>
+<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">PathMatch</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"/hats/:name/:name"</span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>This is also true when an optional segment is present. In this
-case the two values must be identical only if the segment is
-available.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">PathMatch</font> <font color="#990000">=</font> <font color="#FF0000">"/hats/:name/:name"</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>This is also true when an optional segment is present. In this case the two values must be identical only if the segment is available.</p>
+<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">PathMatch</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"/hats/:name/[:name]"</span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>If a binding is defined in both the host and path, then they must
-also share the same value.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">PathMatch</font> <font color="#990000">=</font> <font color="#FF0000">"/hats/:name/[:name]"</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>If a binding is defined in both the host and path, then they must also share the same value.</p>
+<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">PathMatch</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"/:user/[...]"</span><span style="color: #990000">.</span>
-<span style="color: #009900">HostMatch</span> <span style="color: #990000">=</span> <span style="color: #FF0000">":user.github.com"</span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Finally, there are two special match values that can be used. The
-first is the atom <code>'_'</code> which will match any host or path.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">PathMatch</font> <font color="#990000">=</font> <font color="#FF0000">"/:user/[...]"</font><font color="#990000">.</font>
+<font color="#009900">HostMatch</font> <font color="#990000">=</font> <font color="#FF0000">":user.github.com"</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Finally, there are two special match values that can be used. The first is the atom <code>&apos;_&apos;</code> which will match any host or path.</p>
+<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">PathMatch</span> <span style="color: #990000">=</span> <span style="color: #FF6600">'_'</span><span style="color: #990000">.</span>
-<span style="color: #009900">HostMatch</span> <span style="color: #990000">=</span> <span style="color: #FF6600">'_'</span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>The second is the special host match <code>"*"</code> which will match the
-wildcard path, generally used alongside the <code>OPTIONS</code> method.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">PathMatch</font> <font color="#990000">=</font> <font color="#FF6600">'_'</font><font color="#990000">.</font>
+<font color="#009900">HostMatch</font> <font color="#990000">=</font> <font color="#FF6600">'_'</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>The second is the special host match <code>&quot;*&quot;</code> which will match the wildcard path, generally used alongside the <code>OPTIONS</code> method.</p>
+<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">HostMatch</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"*"</span><span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">HostMatch</font> <font color="#990000">=</font> <font color="#FF0000">"*"</font><font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_constraints">Constraints</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>After the matching has completed, the resulting bindings can be tested
-against a set of constraints. Constraints are only tested when the
-binding is defined. They run in the order you defined them. The match
-will succeed only if they all succeed. If the match fails, then Cowboy
-tries the next route in the list.</p></div>
-<div class="paragraph"><p>The format used for constraints is the same as match functions in
-<code>cowboy_req</code>: they are provided as a list of fields which may have
-one or more constraints. While the router accepts the same format,
-it will skip fields with no constraints and will also ignore default
-values, if any.</p></div>
-<div class="paragraph"><p>Read more about <a href="../constraints">constraints</a>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>After the matching has completed, the resulting bindings can be tested against a set of constraints. Constraints are only tested when the binding is defined. They run in the order you defined them. The match will succeed only if they all succeed. If the match fails, then Cowboy tries the next route in the list.</p>
+<p>The format used for constraints is the same as match functions in <code>cowboy_req</code>: they are provided as a list of fields which may have one or more constraints. While the router accepts the same format, it will skip fields with no constraints and will also ignore default values, if any.</p>
+<p>Read more about <a href="../constraints">constraints</a>.</p>
<h2 id="_compilation">Compilation</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The routes must be compiled before Cowboy can use them. The compilation
-step normalizes the routes to simplify the code and speed up the
-execution, but the routes are still looked up one by one in the end.
-Faster compilation strategies could be to compile the routes directly
-to Erlang code, but would require heavier dependencies.</p></div>
-<div class="paragraph"><p>To compile routes, just call the appropriate function:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The routes must be compiled before Cowboy can use them. The compilation step normalizes the routes to simplify the code and speed up the execution, but the routes are still looked up one by one in the end. Faster compilation strategies could be to compile the routes directly to Erlang code, but would require heavier dependencies.</p>
+<p>To compile routes, just call the appropriate function:</p>
+<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">Dispatch</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_router:compile</span></span>([
- <span style="font-style: italic"><span style="color: #9A1900">%% {HostMatch, list({PathMatch, Handler, InitialState})}</span></span>
- {<span style="color: #FF6600">'_'</span>, [{<span style="color: #FF6600">'_'</span>, <span style="color: #FF6600">my_handler</span>, #{}}]}
+<pre><tt><font color="#009900">Dispatch</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_router:compile</font></b>([
+ <i><font color="#9A1900">%% {HostMatch, list({PathMatch, Handler, InitialState})}</font></i>
+ {<font color="#FF6600">'_'</font>, [{<font color="#FF6600">'_'</font>, <font color="#FF6600">my_handler</font>, #{}}]}
]),
-<span style="font-style: italic"><span style="color: #9A1900">%% Name, NbAcceptors, TransOpts, ProtoOpts</span></span>
-<span style="font-weight: bold"><span style="color: #000000">cowboy:start_clear</span></span>(<span style="color: #FF6600">my_http_listener</span>,
- [{<span style="color: #FF6600">port</span>, <span style="color: #993399">8080</span>}],
- #{<span style="color: #0000FF">env</span> <span style="color: #990000">=&gt;</span> #{<span style="color: #0000FF">dispatch</span> <span style="color: #990000">=&gt;</span> <span style="color: #009900">Dispatch</span>}}
-)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<i><font color="#9A1900">%% Name, NbAcceptors, TransOpts, ProtoOpts</font></i>
+<b><font color="#000000">cowboy:start_clear</font></b>(<font color="#FF6600">my_http_listener</font>,
+ [{<font color="#FF6600">port</font>, <font color="#993399">8080</font>}],
+ #{<font color="#0000FF">env</font> <font color="#990000">=&gt;</font> #{<font color="#0000FF">dispatch</font> <font color="#990000">=&gt;</font> <font color="#009900">Dispatch</font>}}
+)<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_live_update">Live update</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>You can use the <code>cowboy:set_env/3</code> function for updating the dispatch
-list used by routing. This will apply to all new connections accepted
-by the listener:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>You can use the <code>cowboy:set_env/3</code> function for updating the dispatch list used by routing. This will apply to all new connections accepted by the listener:</p>
+<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">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>
+<pre><tt><font color="#009900">Dispatch</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_router:compile</font></b>(<font color="#009900">Routes</font>),
+<b><font color="#000000">cowboy:set_env</font></b>(<font color="#FF6600">my_http_listener</font>, <font color="#FF6600">dispatch</font>, <font color="#009900">Dispatch</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Note that you need to compile the routes again before updating.</p>
+
diff --git a/docs/en/cowboy/2.0/guide/specs/index.html b/docs/en/cowboy/2.0/guide/specs/index.html
index 621c9a26..e0ad7ea3 100644
--- a/docs/en/cowboy/2.0/guide/specs/index.html
+++ b/docs/en/cowboy/2.0/guide/specs/index.html
@@ -62,839 +62,337 @@
<h1 class="lined-header"><span>HTTP and other specifications</span></h1>
-<div class="paragraph"><p>This chapter intends to list all the specification documents
-for or related to HTTP.</p></div>
-<div class="sect1">
+<p>This chapter intends to list all the specification documents for or related to HTTP.</p>
<h2 id="_http">HTTP</h2>
-<div class="sectionbody">
-<div class="sect3">
<h4 id="_iana_registries">IANA Registries</h4>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="https://www.iana.org/assignments/http-methods/http-methods.xhtml">HTTP Method Registry</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml">HTTP Status Code Registry</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.iana.org/assignments/message-headers/message-headers.xhtml">Message Headers</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.iana.org/assignments/http-parameters/http-parameters.xhtml">HTTP Parameters</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.iana.org/assignments/http-alt-svc-parameters/http-alt-svc-parameters.xhtml">HTTP Alt-Svc Parameter Registry</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.iana.org/assignments/http-authschemes/http-authschemes.xhtml">HTTP Authentication Scheme Registry</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.iana.org/assignments/http-cache-directives/http-cache-directives.xhtml">HTTP Cache Directive Registry</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.iana.org/assignments/http-dig-alg/http-dig-alg.xhtml">HTTP Digest Algorithm Values</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.iana.org/assignments/hoba-device-identifiers/hoba-device-identifiers.xhtml">HTTP Origin-Bound Authentication Device Identifier Types</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.iana.org/assignments/http-upgrade-tokens/http-upgrade-tokens.xhtml">HTTP Upgrade Token Registry</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.iana.org/assignments/http-warn-codes/http-warn-codes.xhtml">HTTP Warn Codes</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.iana.org/assignments/http2-parameters/http2-parameters.xhtml">HTTP/2 Parameters</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.ietf.org/assignments/websocket/websocket.xml">WebSocket Protocol Registries</a>
-</p>
-</li>
-</ul></div>
-</div>
-<div class="sect3">
+<ul><li><a href="https://www.iana.org/assignments/http-methods/http-methods.xhtml">HTTP Method Registry</a>
+</li>
+<li><a href="https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml">HTTP Status Code Registry</a>
+</li>
+<li><a href="https://www.iana.org/assignments/message-headers/message-headers.xhtml">Message Headers</a>
+</li>
+<li><a href="https://www.iana.org/assignments/http-parameters/http-parameters.xhtml">HTTP Parameters</a>
+</li>
+<li><a href="https://www.iana.org/assignments/http-alt-svc-parameters/http-alt-svc-parameters.xhtml">HTTP Alt-Svc Parameter Registry</a>
+</li>
+<li><a href="https://www.iana.org/assignments/http-authschemes/http-authschemes.xhtml">HTTP Authentication Scheme Registry</a>
+</li>
+<li><a href="https://www.iana.org/assignments/http-cache-directives/http-cache-directives.xhtml">HTTP Cache Directive Registry</a>
+</li>
+<li><a href="https://www.iana.org/assignments/http-dig-alg/http-dig-alg.xhtml">HTTP Digest Algorithm Values</a>
+</li>
+<li><a href="https://www.iana.org/assignments/hoba-device-identifiers/hoba-device-identifiers.xhtml">HTTP Origin-Bound Authentication Device Identifier Types</a>
+</li>
+<li><a href="https://www.iana.org/assignments/http-upgrade-tokens/http-upgrade-tokens.xhtml">HTTP Upgrade Token Registry</a>
+</li>
+<li><a href="https://www.iana.org/assignments/http-warn-codes/http-warn-codes.xhtml">HTTP Warn Codes</a>
+</li>
+<li><a href="https://www.iana.org/assignments/http2-parameters/http2-parameters.xhtml">HTTP/2 Parameters</a>
+</li>
+<li><a href="https://www.ietf.org/assignments/websocket/websocket.xml">WebSocket Protocol Registries</a>
+</li>
+</ul>
<h4 id="_current">Current</h4>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="http://www.w3.org/TR/cors/">CORS</a>: Cross-Origin Resource Sharing
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/CSP2/">CSP2</a>: Content Security Policy Level 2
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/tracking-dnt/">DNT</a>: Tracking Preference Expression (DNT)
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/eventsource/">eventsource</a>: Server-Sent Events
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.w3.org/TR/html4/interact/forms.html#h-17.13.4">Form content types</a>: Form content types
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.w3.org/TR/preload/">Preload</a>: Preload
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm">REST</a>: Fielding&#8217;s Dissertation
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc1945">RFC 1945</a>: HTTP/1.0
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc1951">RFC 1951</a>: DEFLATE Compressed Data Format Specification version 1.3
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc1952">RFC 1952</a>: GZIP file format specification version 4.3
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc2046#section-5.1">RFC 2046</a>: Multipart media type (in MIME Part Two: Media Types)
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc2295">RFC 2295</a>: Transparent Content Negotiation in HTTP
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc2296">RFC 2296</a>: HTTP Remote Variant Selection Algorithm: RVSA/1.0
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc2817">RFC 2817</a>: Upgrading to TLS Within HTTP/1.1
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc2818">RFC 2818</a>: HTTP Over TLS
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc3230">RFC 3230</a>: Instance Digests in HTTP
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc4559">RFC 4559</a>: SPNEGO-based Kerberos and NTLM HTTP Authentication in Microsoft Windows
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc5789">RFC 5789</a>: PATCH Method for HTTP
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc5843">RFC 5843</a>: Additional Hash Algorithms for HTTP Instance Digests
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc5861">RFC 5861</a>: HTTP Cache-Control Extensions for Stale Content
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc5988">RFC 5988</a>: Web Linking
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6265">RFC 6265</a>: HTTP State Management Mechanism
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6266">RFC 6266</a>: Use of the Content-Disposition Header Field
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6454">RFC 6454</a>: The Web Origin Concept
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6455">RFC 6455</a>: The WebSocket Protocol
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6585">RFC 6585</a>: Additional HTTP Status Codes
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6750">RFC 6750</a>: The OAuth 2.0 Authorization Framework: Bearer Token Usage
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6797">RFC 6797</a>: HTTP Strict Transport Security (HSTS)
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6903">RFC 6903</a>: Additional Link Relation Types
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7034">RFC 7034</a>: HTTP Header Field X-Frame-Options
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7089">RFC 7089</a>: Time-Based Access to Resource States: Memento
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7230">RFC 7230</a>: HTTP/1.1 Message Syntax and Routing
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7231">RFC 7231</a>: HTTP/1.1 Semantics and Content
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>: HTTP/1.1 Conditional Requests
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7233">RFC 7233</a>: HTTP/1.1 Range Requests
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7234">RFC 7234</a>: HTTP/1.1 Caching
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7235">RFC 7235</a>: HTTP/1.1 Authentication
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7239">RFC 7239</a>: Forwarded HTTP Extension
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7240">RFC 7240</a>: Prefer Header for HTTP
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7469">RFC 7469</a>: Public Key Pinning Extension for HTTP
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7486">RFC 7486</a>: HTTP Origin-Bound Authentication (HOBA)
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7538">RFC 7538</a>: HTTP Status Code 308 (Permanent Redirect)
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7540">RFC 7540</a>: Hypertext Transfer Protocol Version 2 (HTTP/2)
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7541">RFC 7541</a>: HPACK: Header Compression for HTTP/2
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7578">RFC 7578</a>: Returning Values from Forms: multipart/form-data
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7615">RFC 7615</a>: HTTP Authentication-Info and Proxy-Authentication-Info Response Header Fields
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7616">RFC 7616</a>: HTTP Digest Access Authentication
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7617">RFC 7617</a>: The <em>Basic</em> HTTP Authentication Scheme
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7639">RFC 7639</a>: The ALPN HTTP Header Field
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7692">RFC 7692</a>: Compression Extensions for WebSocket
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7694">RFC 7694</a>: HTTP Client-Initiated Content-Encoding
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7725">RFC 7725</a>: An HTTP Status Code to Report Legal Obstacles
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7804">RFC 7804</a>: Salted Challenge Response HTTP Authentication Mechanism
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7838">RFC 7838</a>: HTTP Alternative Services
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7932">RFC 7932</a>: Brotli Compressed Data Format
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7936">RFC 7936</a>: Clarifying Registry Procedures for the WebSocket Subprotocol Name Registry
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc8053">RFC 8053</a>: HTTP Authentication Extensions for Interactive Clients
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc8164">RFC 8164</a>: Opportunistic Security for HTTP/2
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc8187">RFC 8187</a>: Indicating Character Encoding and Language for HTTP Header Field Parameters
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc8188">RFC 8188</a>: Encrypted Content-Encoding for HTTP
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc8246">RFC 8246</a>: HTTP Immutable Responses
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.w3.org/TR/webmention/">Webmention</a>: Webmention
-</p>
-</li>
-</ul></div>
-</div>
-<div class="sect3">
+<ul><li><a href="http://www.w3.org/TR/cors/">CORS</a>: Cross-Origin Resource Sharing
+</li>
+<li><a href="http://www.w3.org/TR/CSP2/">CSP2</a>: Content Security Policy Level 2
+</li>
+<li><a href="http://www.w3.org/TR/tracking-dnt/">DNT</a>: Tracking Preference Expression (DNT)
+</li>
+<li><a href="http://www.w3.org/TR/eventsource/">eventsource</a>: Server-Sent Events
+</li>
+<li><a href="https://www.w3.org/TR/html4/interact/forms.html#h-17.13.4">Form content types</a>: Form content types
+</li>
+<li><a href="https://www.w3.org/TR/preload/">Preload</a>: Preload
+</li>
+<li><a href="http://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm">REST</a>: Fielding&apos;s Dissertation
+</li>
+<li><a href="https://tools.ietf.org/html/rfc1945">RFC 1945</a>: HTTP/1.0
+</li>
+<li><a href="https://tools.ietf.org/html/rfc1951">RFC 1951</a>: DEFLATE Compressed Data Format Specification version 1.3
+</li>
+<li><a href="https://tools.ietf.org/html/rfc1952">RFC 1952</a>: GZIP file format specification version 4.3
+</li>
+<li><a href="https://tools.ietf.org/html/rfc2046#section-5.1">RFC 2046</a>: Multipart media type (in MIME Part Two: Media Types)
+</li>
+<li><a href="https://tools.ietf.org/html/rfc2295">RFC 2295</a>: Transparent Content Negotiation in HTTP
+</li>
+<li><a href="https://tools.ietf.org/html/rfc2296">RFC 2296</a>: HTTP Remote Variant Selection Algorithm: RVSA/1.0
+</li>
+<li><a href="https://tools.ietf.org/html/rfc2817">RFC 2817</a>: Upgrading to TLS Within HTTP/1.1
+</li>
+<li><a href="https://tools.ietf.org/html/rfc2818">RFC 2818</a>: HTTP Over TLS
+</li>
+<li><a href="https://tools.ietf.org/html/rfc3230">RFC 3230</a>: Instance Digests in HTTP
+</li>
+<li><a href="https://tools.ietf.org/html/rfc4559">RFC 4559</a>: SPNEGO-based Kerberos and NTLM HTTP Authentication in Microsoft Windows
+</li>
+<li><a href="https://tools.ietf.org/html/rfc5789">RFC 5789</a>: PATCH Method for HTTP
+</li>
+<li><a href="https://tools.ietf.org/html/rfc5843">RFC 5843</a>: Additional Hash Algorithms for HTTP Instance Digests
+</li>
+<li><a href="https://tools.ietf.org/html/rfc5861">RFC 5861</a>: HTTP Cache-Control Extensions for Stale Content
+</li>
+<li><a href="https://tools.ietf.org/html/rfc5988">RFC 5988</a>: Web Linking
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6265">RFC 6265</a>: HTTP State Management Mechanism
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6266">RFC 6266</a>: Use of the Content-Disposition Header Field
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6454">RFC 6454</a>: The Web Origin Concept
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6455">RFC 6455</a>: The WebSocket Protocol
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6585">RFC 6585</a>: Additional HTTP Status Codes
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6750">RFC 6750</a>: The OAuth 2.0 Authorization Framework: Bearer Token Usage
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6797">RFC 6797</a>: HTTP Strict Transport Security (HSTS)
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6903">RFC 6903</a>: Additional Link Relation Types
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7034">RFC 7034</a>: HTTP Header Field X-Frame-Options
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7089">RFC 7089</a>: Time-Based Access to Resource States: Memento
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7230">RFC 7230</a>: HTTP/1.1 Message Syntax and Routing
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7231">RFC 7231</a>: HTTP/1.1 Semantics and Content
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>: HTTP/1.1 Conditional Requests
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7233">RFC 7233</a>: HTTP/1.1 Range Requests
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7234">RFC 7234</a>: HTTP/1.1 Caching
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7235">RFC 7235</a>: HTTP/1.1 Authentication
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7239">RFC 7239</a>: Forwarded HTTP Extension
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7240">RFC 7240</a>: Prefer Header for HTTP
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7469">RFC 7469</a>: Public Key Pinning Extension for HTTP
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7486">RFC 7486</a>: HTTP Origin-Bound Authentication (HOBA)
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7538">RFC 7538</a>: HTTP Status Code 308 (Permanent Redirect)
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7540">RFC 7540</a>: Hypertext Transfer Protocol Version 2 (HTTP/2)
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7541">RFC 7541</a>: HPACK: Header Compression for HTTP/2
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7578">RFC 7578</a>: Returning Values from Forms: multipart/form-data
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7615">RFC 7615</a>: HTTP Authentication-Info and Proxy-Authentication-Info Response Header Fields
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7616">RFC 7616</a>: HTTP Digest Access Authentication
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7617">RFC 7617</a>: The <em>Basic</em> HTTP Authentication Scheme
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7639">RFC 7639</a>: The ALPN HTTP Header Field
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7692">RFC 7692</a>: Compression Extensions for WebSocket
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7694">RFC 7694</a>: HTTP Client-Initiated Content-Encoding
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7725">RFC 7725</a>: An HTTP Status Code to Report Legal Obstacles
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7804">RFC 7804</a>: Salted Challenge Response HTTP Authentication Mechanism
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7838">RFC 7838</a>: HTTP Alternative Services
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7932">RFC 7932</a>: Brotli Compressed Data Format
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7936">RFC 7936</a>: Clarifying Registry Procedures for the WebSocket Subprotocol Name Registry
+</li>
+<li><a href="https://tools.ietf.org/html/rfc8053">RFC 8053</a>: HTTP Authentication Extensions for Interactive Clients
+</li>
+<li><a href="https://tools.ietf.org/html/rfc8164">RFC 8164</a>: Opportunistic Security for HTTP/2
+</li>
+<li><a href="https://tools.ietf.org/html/rfc8187">RFC 8187</a>: Indicating Character Encoding and Language for HTTP Header Field Parameters
+</li>
+<li><a href="https://tools.ietf.org/html/rfc8188">RFC 8188</a>: Encrypted Content-Encoding for HTTP
+</li>
+<li><a href="https://tools.ietf.org/html/rfc8246">RFC 8246</a>: HTTP Immutable Responses
+</li>
+<li><a href="https://www.w3.org/TR/webmention/">Webmention</a>: Webmention
+</li>
+</ul>
<h4 id="_upcoming">Upcoming</h4>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="https://www.w3.org/TR/csp-cookies/">Content Security Policy: Cookie Controls</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.w3.org/TR/csp-embedded-enforcement/">Content Security Policy: Embedded Enforcement</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.w3.org/TR/CSP3/">Content Security Policy Level 3</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.w3.org/TR/csp-pinning/">Content Security Policy Pinning</a>
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/referrer-policy/">Referrer Policy</a>
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/UISecurity/">User Interface Security Directives for Content Security Policy</a>
-</p>
-</li>
-</ul></div>
-</div>
-<div class="sect3">
+<ul><li><a href="https://www.w3.org/TR/csp-cookies/">Content Security Policy: Cookie Controls</a>
+</li>
+<li><a href="https://www.w3.org/TR/csp-embedded-enforcement/">Content Security Policy: Embedded Enforcement</a>
+</li>
+<li><a href="https://www.w3.org/TR/CSP3/">Content Security Policy Level 3</a>
+</li>
+<li><a href="https://www.w3.org/TR/csp-pinning/">Content Security Policy Pinning</a>
+</li>
+<li><a href="http://www.w3.org/TR/referrer-policy/">Referrer Policy</a>
+</li>
+<li><a href="http://www.w3.org/TR/UISecurity/">User Interface Security Directives for Content Security Policy</a>
+</li>
+</ul>
<h4 id="_informative">Informative</h4>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="http://www.w3.org/TR/webarch/">Architecture of the World Wide Web</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc2936">RFC 2936</a>: HTTP MIME Type Handler Detection
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc2964">RFC 2964</a>: Use of HTTP State Management
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc3143">RFC 3143</a>: Known HTTP Proxy/Caching Problems
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6202">RFC 6202</a>: Known Issues and Best Practices for the Use of Long Polling and Streaming in Bidirectional HTTP
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6838">RFC 6838</a>: Media Type Specifications and Registration Procedures
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7478">RFC 7478</a>: Web Real-Time Communication Use Cases and Requirements
-</p>
-</li>
-</ul></div>
-</div>
-<div class="sect3">
+<ul><li><a href="http://www.w3.org/TR/webarch/">Architecture of the World Wide Web</a>
+</li>
+<li><a href="https://tools.ietf.org/html/rfc2936">RFC 2936</a>: HTTP MIME Type Handler Detection
+</li>
+<li><a href="https://tools.ietf.org/html/rfc2964">RFC 2964</a>: Use of HTTP State Management
+</li>
+<li><a href="https://tools.ietf.org/html/rfc3143">RFC 3143</a>: Known HTTP Proxy/Caching Problems
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6202">RFC 6202</a>: Known Issues and Best Practices for the Use of Long Polling and Streaming in Bidirectional HTTP
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6838">RFC 6838</a>: Media Type Specifications and Registration Procedures
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7478">RFC 7478</a>: Web Real-Time Communication Use Cases and Requirements
+</li>
+</ul>
<h4 id="_related">Related</h4>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="http://www.w3.org/TR/app-uri/">app: URL Scheme</a>
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/beacon/">Beacon</a>
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/FileAPI/">File API</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc8030">Generic Event Delivery Using HTTP Push</a>
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/capability-urls/">Good Practices for Capability URLs</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://html.spec.whatwg.org/multipage/">HTML Living Standard</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://developers.whatwg.org/">HTML Living Standard for Web developers</a>
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/html401/">HTML4.01</a>
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/html5/">HTML5</a>
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/html51/">HTML5.1</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.w3.org/TR/html52/">HTML5.2</a>
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/media-frags/">Media Fragments URI 1.0</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6690">RFC 6690</a>: Constrained RESTful Environments (CoRE) Link Format
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7807">RFC 7807</a>: Problem Details for HTTP APIs
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6906">RFC 6906</a>: The <em>profile</em> Link Relation Type
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/SRI/">Subresource Integrity</a>
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/tracking-compliance/">Tracking Compliance and Scope</a>
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/media-frags-reqs/">Use cases and requirements for Media Fragments</a>
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/webrtc/">WebRTC 1.0: Real-time Communication Between Browsers</a>
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/websockets/">Websocket API</a>
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/XMLHttpRequest/">XMLHttpRequest Level 1</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://xhr.spec.whatwg.org/">XMLHttpRequest Living Standard</a>
-</p>
-</li>
-</ul></div>
-</div>
-<div class="sect3">
+<ul><li><a href="http://www.w3.org/TR/app-uri/">app: URL Scheme</a>
+</li>
+<li><a href="http://www.w3.org/TR/beacon/">Beacon</a>
+</li>
+<li><a href="http://www.w3.org/TR/FileAPI/">File API</a>
+</li>
+<li><a href="https://tools.ietf.org/html/rfc8030">Generic Event Delivery Using HTTP Push</a>
+</li>
+<li><a href="http://www.w3.org/TR/capability-urls/">Good Practices for Capability URLs</a>
+</li>
+<li><a href="https://html.spec.whatwg.org/multipage/">HTML Living Standard</a>
+</li>
+<li><a href="https://developers.whatwg.org/">HTML Living Standard for Web developers</a>
+</li>
+<li><a href="http://www.w3.org/TR/html401/">HTML4.01</a>
+</li>
+<li><a href="http://www.w3.org/TR/html5/">HTML5</a>
+</li>
+<li><a href="http://www.w3.org/TR/html51/">HTML5.1</a>
+</li>
+<li><a href="https://www.w3.org/TR/html52/">HTML5.2</a>
+</li>
+<li><a href="http://www.w3.org/TR/media-frags/">Media Fragments URI 1.0</a>
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6690">RFC 6690</a>: Constrained RESTful Environments (CoRE) Link Format
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7807">RFC 7807</a>: Problem Details for HTTP APIs
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6906">RFC 6906</a>: The <em>profile</em> Link Relation Type
+</li>
+<li><a href="http://www.w3.org/TR/SRI/">Subresource Integrity</a>
+</li>
+<li><a href="http://www.w3.org/TR/tracking-compliance/">Tracking Compliance and Scope</a>
+</li>
+<li><a href="http://www.w3.org/TR/media-frags-reqs/">Use cases and requirements for Media Fragments</a>
+</li>
+<li><a href="http://www.w3.org/TR/webrtc/">WebRTC 1.0: Real-time Communication Between Browsers</a>
+</li>
+<li><a href="http://www.w3.org/TR/websockets/">Websocket API</a>
+</li>
+<li><a href="http://www.w3.org/TR/XMLHttpRequest/">XMLHttpRequest Level 1</a>
+</li>
+<li><a href="https://xhr.spec.whatwg.org/">XMLHttpRequest Living Standard</a>
+</li>
+</ul>
<h4 id="_seemingly_obsolete">Seemingly obsolete</h4>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc2227">RFC 2227</a>: Simple Hit-Metering and Usage-Limiting for HTTP
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc2310">RFC 2310</a>: The Safe Response Header Field
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc2324">RFC 2324</a>: Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0)
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc2660">RFC 2660</a>: The Secure HyperText Transfer Protocol
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc2774">RFC 2774</a>: An HTTP Extension Framework
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc2965">RFC 2965</a>: HTTP State Management Mechanism (Cookie2)
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc3229">RFC 3229</a>: Delta encoding in HTTP
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7168">RFC 7168</a>: The Hyper Text Coffee Pot Control Protocol for Tea Efflux Appliances (HTCPCP-TEA)
-</p>
-</li>
-<li>
-<p>
-<a href="http://dev.chromium.org/spdy/spdy-protocol">SPDY</a>: SPDY Protocol
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/draft-tyoshino-hybi-websocket-perframe-deflate-06">x-webkit-deflate-frame</a>: Deprecated Websocket compression
-</p>
-</li>
-</ul></div>
-</div>
-</div>
-</div>
-<div class="sect1">
+<ul><li><a href="https://tools.ietf.org/html/rfc2227">RFC 2227</a>: Simple Hit-Metering and Usage-Limiting for HTTP
+</li>
+<li><a href="https://tools.ietf.org/html/rfc2310">RFC 2310</a>: The Safe Response Header Field
+</li>
+<li><a href="https://tools.ietf.org/html/rfc2324">RFC 2324</a>: Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0)
+</li>
+<li><a href="https://tools.ietf.org/html/rfc2660">RFC 2660</a>: The Secure HyperText Transfer Protocol
+</li>
+<li><a href="https://tools.ietf.org/html/rfc2774">RFC 2774</a>: An HTTP Extension Framework
+</li>
+<li><a href="https://tools.ietf.org/html/rfc2965">RFC 2965</a>: HTTP State Management Mechanism (Cookie2)
+</li>
+<li><a href="https://tools.ietf.org/html/rfc3229">RFC 3229</a>: Delta encoding in HTTP
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7168">RFC 7168</a>: The Hyper Text Coffee Pot Control Protocol for Tea Efflux Appliances (HTCPCP-TEA)
+</li>
+<li><a href="http://dev.chromium.org/spdy/spdy-protocol">SPDY</a>: SPDY Protocol
+</li>
+<li><a href="https://tools.ietf.org/html/draft-tyoshino-hybi-websocket-perframe-deflate-06">x-webkit-deflate-frame</a>: Deprecated Websocket compression
+</li>
+</ul>
<h2 id="_url">URL</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc3986">RFC 3986</a>: URI Generic Syntax
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6570">RFC 6570</a>: URI Template
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6874">RFC 6874</a>: Representing IPv6 Zone Identifiers in Address Literals and URIs
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7320">RFC 7320</a>: URI Design and Ownership
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/url-1/">URL</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://url.spec.whatwg.org/">URL Living Standard</a>
-</p>
-</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+<ul><li><a href="https://tools.ietf.org/html/rfc3986">RFC 3986</a>: URI Generic Syntax
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6570">RFC 6570</a>: URI Template
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6874">RFC 6874</a>: Representing IPv6 Zone Identifiers in Address Literals and URIs
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7320">RFC 7320</a>: URI Design and Ownership
+</li>
+<li><a href="http://www.w3.org/TR/url-1/">URL</a>
+</li>
+<li><a href="https://url.spec.whatwg.org/">URL Living Standard</a>
+</li>
+</ul>
<h2 id="_webdav">WebDAV</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc3253">RFC 3253</a>: Versioning Extensions to WebDAV
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc3648">RFC 3648</a>: WebDAV Ordered Collections Protocol
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc3744">RFC 3744</a>: WebDAV Access Control Protocol
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc4316">RFC 4316</a>: Datatypes for WebDAV Properties
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc4331">RFC 4331</a>: Quota and Size Properties for DAV Collections
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc4437">RFC 4437</a>: WebDAV Redirect Reference Resources
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc4709">RFC 4709</a>: Mounting WebDAV Servers
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc4791">RFC 4791</a>: Calendaring Extensions to WebDAV (CalDAV)
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc4918">RFC 4918</a>: HTTP Extensions for WebDAV
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc5323">RFC 5323</a>: WebDAV SEARCH
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc5397">RFC 5397</a>: WebDAV Current Principal Extension
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc5689">RFC 5689</a>: Extended MKCOL for WebDAV
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc5842">RFC 5842</a>: Binding Extensions to WebDAV
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc5995">RFC 5995</a>: Using POST to Add Members to WebDAV Collections
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6352">RFC 6352</a>: CardDAV: vCard Extensions to WebDAV
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6578">RFC 6578</a>: Collection Synchronization for WebDAV
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6638">RFC 6638</a>: Scheduling Extensions to CalDAV
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6764">RFC 6764</a>: Locating Services for Calendaring Extensions to WebDAV (CalDAV) and vCard Extensions to WebDAV (CardDAV)
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7809">RFC 7809</a>: Calendaring Extensions to WebDAV (CalDAV): Time Zones by Reference
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7953">RFC 7953</a>: Calendar Availability
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc8144">RFC 8144</a>: Use of the Prefer Header Field in WebDAV
-</p>
-</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+<ul><li><a href="https://tools.ietf.org/html/rfc3253">RFC 3253</a>: Versioning Extensions to WebDAV
+</li>
+<li><a href="https://tools.ietf.org/html/rfc3648">RFC 3648</a>: WebDAV Ordered Collections Protocol
+</li>
+<li><a href="https://tools.ietf.org/html/rfc3744">RFC 3744</a>: WebDAV Access Control Protocol
+</li>
+<li><a href="https://tools.ietf.org/html/rfc4316">RFC 4316</a>: Datatypes for WebDAV Properties
+</li>
+<li><a href="https://tools.ietf.org/html/rfc4331">RFC 4331</a>: Quota and Size Properties for DAV Collections
+</li>
+<li><a href="https://tools.ietf.org/html/rfc4437">RFC 4437</a>: WebDAV Redirect Reference Resources
+</li>
+<li><a href="https://tools.ietf.org/html/rfc4709">RFC 4709</a>: Mounting WebDAV Servers
+</li>
+<li><a href="https://tools.ietf.org/html/rfc4791">RFC 4791</a>: Calendaring Extensions to WebDAV (CalDAV)
+</li>
+<li><a href="https://tools.ietf.org/html/rfc4918">RFC 4918</a>: HTTP Extensions for WebDAV
+</li>
+<li><a href="https://tools.ietf.org/html/rfc5323">RFC 5323</a>: WebDAV SEARCH
+</li>
+<li><a href="https://tools.ietf.org/html/rfc5397">RFC 5397</a>: WebDAV Current Principal Extension
+</li>
+<li><a href="https://tools.ietf.org/html/rfc5689">RFC 5689</a>: Extended MKCOL for WebDAV
+</li>
+<li><a href="https://tools.ietf.org/html/rfc5842">RFC 5842</a>: Binding Extensions to WebDAV
+</li>
+<li><a href="https://tools.ietf.org/html/rfc5995">RFC 5995</a>: Using POST to Add Members to WebDAV Collections
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6352">RFC 6352</a>: CardDAV: vCard Extensions to WebDAV
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6578">RFC 6578</a>: Collection Synchronization for WebDAV
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6638">RFC 6638</a>: Scheduling Extensions to CalDAV
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6764">RFC 6764</a>: Locating Services for Calendaring Extensions to WebDAV (CalDAV) and vCard Extensions to WebDAV (CardDAV)
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7809">RFC 7809</a>: Calendaring Extensions to WebDAV (CalDAV): Time Zones by Reference
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7953">RFC 7953</a>: Calendar Availability
+</li>
+<li><a href="https://tools.ietf.org/html/rfc8144">RFC 8144</a>: Use of the Prefer Header Field in WebDAV
+</li>
+</ul>
<h2 id="_coap">CoAP</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7252">RFC 7252</a>: The Constrained Application Protocol (CoAP)
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7390">RFC 7390</a>: Group Communication for CoAP
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7641">RFC 7641</a>: Observing Resources in CoAP
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7650">RFC 7650</a>: A CoAP Usage for REsource LOcation And Discovery (RELOAD)
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7959">RFC 7959</a>: Block-Wise Transfers in CoAP
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7967">RFC 7967</a>: CoAP Option for No Server Response
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc8075">RFC 8075</a>: Guidelines for Mapping Implementations: HTTP to CoAP
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc8132">RFC 8132</a>: PATCH and FETCH Methods for CoAP
-</p>
-</li>
-</ul></div>
-</div>
-</div>
+<ul><li><a href="https://tools.ietf.org/html/rfc7252">RFC 7252</a>: The Constrained Application Protocol (CoAP)
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7390">RFC 7390</a>: Group Communication for CoAP
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7641">RFC 7641</a>: Observing Resources in CoAP
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7650">RFC 7650</a>: A CoAP Usage for REsource LOcation And Discovery (RELOAD)
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7959">RFC 7959</a>: Block-Wise Transfers in CoAP
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7967">RFC 7967</a>: CoAP Option for No Server Response
+</li>
+<li><a href="https://tools.ietf.org/html/rfc8075">RFC 8075</a>: Guidelines for Mapping Implementations: HTTP to CoAP
+</li>
+<li><a href="https://tools.ietf.org/html/rfc8132">RFC 8132</a>: PATCH and FETCH Methods for CoAP
+</li>
+</ul>
+
diff --git a/docs/en/cowboy/2.0/guide/static_files/index.html b/docs/en/cowboy/2.0/guide/static_files/index.html
index 4d5d248f..26549aa5 100644
--- a/docs/en/cowboy/2.0/guide/static_files/index.html
+++ b/docs/en/cowboy/2.0/guide/static_files/index.html
@@ -62,173 +62,101 @@
<h1 class="lined-header"><span>Static files</span></h1>
-<div class="paragraph"><p>Cowboy comes with a ready to use handler for serving static
-files. It is provided as a convenience for serving files
-during development.</p></div>
-<div class="paragraph"><p>For systems in production, consider using one of the many
-Content Distribution Network (CDN) available on the market,
-as they are the best solution for serving files.</p></div>
-<div class="paragraph"><p>The static handler can serve either one file or all files
-from a given directory. The etag generation and mime types
-can be configured.</p></div>
-<div class="sect1">
+<p>Cowboy comes with a ready to use handler for serving static files. It is provided as a convenience for serving files during development.</p>
+<p>For systems in production, consider using one of the many Content Distribution Network (CDN) available on the market, as they are the best solution for serving files.</p>
+<p>The static handler can serve either one file or all files from a given directory. The etag generation and mime types can be configured.</p>
<h2 id="_serve_one_file">Serve one file</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>You can use the static handler to serve one specific file
-from an application&#8217;s private directory. This is particularly
-useful to serve an <em>index.html</em> file when the client requests
-the <code>/</code> path, for example. The path configured is relative
-to the given application&#8217;s private directory.</p></div>
-<div class="paragraph"><p>The following rule will serve the file <em>static/index.html</em>
-from the application <code>my_app</code>'s priv directory whenever the
-path <code>/</code> is accessed:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>You can use the static handler to serve one specific file from an application&apos;s private directory. This is particularly useful to serve an <em>index.html</em> file when the client requests the <code>/</code> path, for example. The path configured is relative to the given application&apos;s private directory.</p>
+<p>The following rule will serve the file <em>static/index.html</em> from the application <code>my_app</code>&apos;s priv directory whenever the path <code>/</code> is accessed:</p>
+<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: #FF0000">"/"</span>, <span style="color: #FF6600">cowboy_static</span>, {<span style="color: #FF6600">priv_file</span>, <span style="color: #FF6600">my_app</span>, <span style="color: #FF0000">"static/index.html"</span>}}</tt></pre></div></div>
-<div class="paragraph"><p>You can also specify the absolute path to a file, or the
-path to the file relative to the current directory:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>{<font color="#FF0000">"/"</font>, <font color="#FF6600">cowboy_static</font>, {<font color="#FF6600">priv_file</font>, <font color="#FF6600">my_app</font>, <font color="#FF0000">"static/index.html"</font>}}</tt></pre>
+</div></div>
+<p>You can also specify the absolute path to a file, or the path to the file relative to the current directory:</p>
+<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: #FF0000">"/"</span>, <span style="color: #FF6600">cowboy_static</span>, {<span style="color: #FF6600">file</span>, <span style="color: #FF0000">"/var/www/index.html"</span>}}</tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#FF0000">"/"</font>, <font color="#FF6600">cowboy_static</font>, {<font color="#FF6600">file</font>, <font color="#FF0000">"/var/www/index.html"</font>}}</tt></pre>
+</div></div>
<h2 id="_serve_all_files_from_a_directory">Serve all files from a directory</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>You can also use the static handler to serve all files that
-can be found in the configured directory. The handler will
-use the <code>path_info</code> information to resolve the file location,
-which means that your route must end with a <code>[...]</code> pattern
-for it to work. All files are served, including the ones that
-may be found in subfolders.</p></div>
-<div class="paragraph"><p>You can specify the directory relative to an application&#8217;s
-private directory.</p></div>
-<div class="paragraph"><p>The following rule will serve any file found in the application
-<code>my_app</code>'s priv directory inside the <code>static/assets</code> folder
-whenever the requested path begins with <code>/assets/</code>:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>You can also use the static handler to serve all files that can be found in the configured directory. The handler will use the <code>path_info</code> information to resolve the file location, which means that your route must end with a <code>[...]</code> pattern for it to work. All files are served, including the ones that may be found in subfolders.</p>
+<p>You can specify the directory relative to an application&apos;s private directory.</p>
+<p>The following rule will serve any file found in the application <code>my_app</code>&apos;s priv directory inside the <code>static/assets</code> folder whenever the requested path begins with <code>/assets/</code>:</p>
+<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: #FF0000">"/assets/[...]"</span>, <span style="color: #FF6600">cowboy_static</span>, {<span style="color: #FF6600">priv_dir</span>, <span style="color: #FF6600">my_app</span>, <span style="color: #FF0000">"static/assets"</span>}}</tt></pre></div></div>
-<div class="paragraph"><p>You can also specify the absolute path to the directory or
-set it relative to the current directory:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>{<font color="#FF0000">"/assets/[...]"</font>, <font color="#FF6600">cowboy_static</font>, {<font color="#FF6600">priv_dir</font>, <font color="#FF6600">my_app</font>, <font color="#FF0000">"static/assets"</font>}}</tt></pre>
+</div></div>
+<p>You can also specify the absolute path to the directory or set it relative to the current directory:</p>
+<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: #FF0000">"/assets/[...]"</span>, <span style="color: #FF6600">cowboy_static</span>, {<span style="color: #FF6600">dir</span>, <span style="color: #FF0000">"/var/www/assets"</span>}}</tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#FF0000">"/assets/[...]"</font>, <font color="#FF6600">cowboy_static</font>, {<font color="#FF6600">dir</font>, <font color="#FF0000">"/var/www/assets"</font>}}</tt></pre>
+</div></div>
<h2 id="_customize_the_mimetype_detection">Customize the mimetype detection</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>By default, Cowboy will attempt to recognize the mimetype
-of your static files by looking at the extension.</p></div>
-<div class="paragraph"><p>You can override the function that figures out the mimetype
-of the static files. It can be useful when Cowboy is missing
-a mimetype you need to handle, or when you want to reduce
-the list to make lookups faster. You can also give a
-hard-coded mimetype that will be used unconditionally.</p></div>
-<div class="paragraph"><p>Cowboy comes with two functions built-in. The default
-function only handles common file types used when building
-Web applications. The other function is an extensive list
-of hundreds of mimetypes that should cover almost any need
-you may have. You can of course create your own function.</p></div>
-<div class="paragraph"><p>To use the default function, you should not have to configure
-anything, as it is the default. If you insist, though, the
-following will do the job:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>By default, Cowboy will attempt to recognize the mimetype of your static files by looking at the extension.</p>
+<p>You can override the function that figures out the mimetype of the static files. It can be useful when Cowboy is missing a mimetype you need to handle, or when you want to reduce the list to make lookups faster. You can also give a hard-coded mimetype that will be used unconditionally.</p>
+<p>Cowboy comes with two functions built-in. The default function only handles common file types used when building Web applications. The other function is an extensive list of hundreds of mimetypes that should cover almost any need you may have. You can of course create your own function.</p>
+<p>To use the default function, you should not have to configure anything, as it is the default. If you insist, though, the following will do the job:</p>
+<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: #FF0000">"/assets/[...]"</span>, <span style="color: #FF6600">cowboy_static</span>, {<span style="color: #FF6600">priv_dir</span>, <span style="color: #FF6600">my_app</span>, <span style="color: #FF0000">"static/assets"</span>,
- [{<span style="color: #FF6600">mimetypes</span>, <span style="color: #FF6600">cow_mimetypes</span>, <span style="color: #FF6600">web</span>}]}}</tt></pre></div></div>
-<div class="paragraph"><p>As you can see, there is an optional field that may contain
-a list of less used options, like mimetypes or etag. All option
-types have this optional field.</p></div>
-<div class="paragraph"><p>To use the function that will detect almost any mimetype,
-the following configuration will do:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>{<font color="#FF0000">"/assets/[...]"</font>, <font color="#FF6600">cowboy_static</font>, {<font color="#FF6600">priv_dir</font>, <font color="#FF6600">my_app</font>, <font color="#FF0000">"static/assets"</font>,
+ [{<font color="#FF6600">mimetypes</font>, <font color="#FF6600">cow_mimetypes</font>, <font color="#FF6600">web</font>}]}}</tt></pre>
+</div></div>
+<p>As you can see, there is an optional field that may contain a list of less used options, like mimetypes or etag. All option types have this optional field.</p>
+<p>To use the function that will detect almost any mimetype, the following configuration will do:</p>
+<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: #FF0000">"/assets/[...]"</span>, <span style="color: #FF6600">cowboy_static</span>, {<span style="color: #FF6600">priv_dir</span>, <span style="color: #FF6600">my_app</span>, <span style="color: #FF0000">"static/assets"</span>,
- [{<span style="color: #FF6600">mimetypes</span>, <span style="color: #FF6600">cow_mimetypes</span>, <span style="color: #FF6600">all</span>}]}}</tt></pre></div></div>
-<div class="paragraph"><p>You probably noticed the pattern by now. The configuration
-expects a module and a function name, so you can use any
-of your own functions instead:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>{<font color="#FF0000">"/assets/[...]"</font>, <font color="#FF6600">cowboy_static</font>, {<font color="#FF6600">priv_dir</font>, <font color="#FF6600">my_app</font>, <font color="#FF0000">"static/assets"</font>,
+ [{<font color="#FF6600">mimetypes</font>, <font color="#FF6600">cow_mimetypes</font>, <font color="#FF6600">all</font>}]}}</tt></pre>
+</div></div>
+<p>You probably noticed the pattern by now. The configuration expects a module and a function name, so you can use any of your own functions instead:</p>
+<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: #FF0000">"/assets/[...]"</span>, <span style="color: #FF6600">cowboy_static</span>, {<span style="color: #FF6600">priv_dir</span>, <span style="color: #FF6600">my_app</span>, <span style="color: #FF0000">"static/assets"</span>,
- [{<span style="color: #FF6600">mimetypes</span>, <span style="color: #009900">Module</span>, <span style="color: #009900">Function</span>}]}}</tt></pre></div></div>
-<div class="paragraph"><p>The function that performs the mimetype detection receives
-a single argument that is the path to the file on disk. It
-is recommended to return the mimetype in tuple form, although
-a binary string is also allowed (but will require extra
-processing). If the function can&#8217;t figure out the mimetype,
-then it should return <code>{&lt;&lt;"application"&gt;&gt;, &lt;&lt;"octet-stream"&gt;&gt;, []}</code>.</p></div>
-<div class="paragraph"><p>When the static handler fails to find the extension,
-it will send the file as <code>application/octet-stream</code>.
-A browser receiving such file will attempt to download it
-directly to disk.</p></div>
-<div class="paragraph"><p>Finally, the mimetype can be hard-coded for all files.
-This is especially useful in combination with the <code>file</code>
-and <code>priv_file</code> options as it avoids needless computation:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>{<font color="#FF0000">"/assets/[...]"</font>, <font color="#FF6600">cowboy_static</font>, {<font color="#FF6600">priv_dir</font>, <font color="#FF6600">my_app</font>, <font color="#FF0000">"static/assets"</font>,
+ [{<font color="#FF6600">mimetypes</font>, <font color="#009900">Module</font>, <font color="#009900">Function</font>}]}}</tt></pre>
+</div></div>
+<p>The function that performs the mimetype detection receives a single argument that is the path to the file on disk. It is recommended to return the mimetype in tuple form, although a binary string is also allowed (but will require extra processing). If the function can&apos;t figure out the mimetype, then it should return <code>{&lt;&lt;&quot;application&quot;&gt;&gt;, &lt;&lt;&quot;octet-stream&quot;&gt;&gt;, []}</code>.</p>
+<p>When the static handler fails to find the extension, it will send the file as <code>application/octet-stream</code>. A browser receiving such file will attempt to download it directly to disk.</p>
+<p>Finally, the mimetype can be hard-coded for all files. This is especially useful in combination with the <code>file</code> and <code>priv_file</code> options as it avoids needless computation:</p>
+<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: #FF0000">"/"</span>, <span style="color: #FF6600">cowboy_static</span>, {<span style="color: #FF6600">priv_file</span>, <span style="color: #FF6600">my_app</span>, <span style="color: #FF0000">"static/index.html"</span>,
- [{<span style="color: #FF6600">mimetypes</span>, {<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"html"</span><span style="color: #990000">&gt;&gt;</span>, []}}]}}</tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#FF0000">"/"</font>, <font color="#FF6600">cowboy_static</font>, {<font color="#FF6600">priv_file</font>, <font color="#FF6600">my_app</font>, <font color="#FF0000">"static/index.html"</font>,
+ [{<font color="#FF6600">mimetypes</font>, {<font color="#990000">&lt;&lt;</font><font color="#FF0000">"text"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"html"</font><font color="#990000">&gt;&gt;</font>, []}}]}}</tt></pre>
+</div></div>
<h2 id="_generate_an_etag">Generate an etag</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>By default, the static handler will generate an etag header
-value based on the size and modified time. This solution
-can not be applied to all systems though. It would perform
-rather poorly over a cluster of nodes, for example, as the
-file metadata will vary from server to server, giving a
-different etag on each server.</p></div>
-<div class="paragraph"><p>You can however change the way the etag is calculated:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>By default, the static handler will generate an etag header value based on the size and modified time. This solution can not be applied to all systems though. It would perform rather poorly over a cluster of nodes, for example, as the file metadata will vary from server to server, giving a different etag on each server.</p>
+<p>You can however change the way the etag is calculated:</p>
+<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: #FF0000">"/assets/[...]"</span>, <span style="color: #FF6600">cowboy_static</span>, {<span style="color: #FF6600">priv_dir</span>, <span style="color: #FF6600">my_app</span>, <span style="color: #FF0000">"static/assets"</span>,
- [{<span style="color: #FF6600">etag</span>, <span style="color: #009900">Module</span>, <span style="color: #009900">Function</span>}]}}</tt></pre></div></div>
-<div class="paragraph"><p>This function will receive three arguments: the path to the
-file on disk, the size of the file and the last modification
-time. In a distributed setup, you would typically use the
-file path to retrieve an etag value that is identical across
-all your servers.</p></div>
-<div class="paragraph"><p>You can also completely disable etag handling:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>{<font color="#FF0000">"/assets/[...]"</font>, <font color="#FF6600">cowboy_static</font>, {<font color="#FF6600">priv_dir</font>, <font color="#FF6600">my_app</font>, <font color="#FF0000">"static/assets"</font>,
+ [{<font color="#FF6600">etag</font>, <font color="#009900">Module</font>, <font color="#009900">Function</font>}]}}</tt></pre>
+</div></div>
+<p>This function will receive three arguments: the path to the file on disk, the size of the file and the last modification time. In a distributed setup, you would typically use the file path to retrieve an etag value that is identical across all your servers.</p>
+<p>You can also completely disable etag handling:</p>
+<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: #FF0000">"/assets/[...]"</span>, <span style="color: #FF6600">cowboy_static</span>, {<span style="color: #FF6600">priv_dir</span>, <span style="color: #FF6600">my_app</span>, <span style="color: #FF0000">"static/assets"</span>,
- [{<span style="color: #FF6600">etag</span>, <span style="color: #000080">false</span>}]}}</tt></pre></div></div>
-</div>
-</div>
+<pre><tt>{<font color="#FF0000">"/assets/[...]"</font>, <font color="#FF6600">cowboy_static</font>, {<font color="#FF6600">priv_dir</font>, <font color="#FF6600">my_app</font>, <font color="#FF0000">"static/assets"</font>,
+ [{<font color="#FF6600">etag</font>, <font color="#000080">false</font>}]}}</tt></pre>
+</div></div>
+
diff --git a/docs/en/cowboy/2.0/guide/streams/index.html b/docs/en/cowboy/2.0/guide/streams/index.html
index 3f217b1a..3b6dcdde 100644
--- a/docs/en/cowboy/2.0/guide/streams/index.html
+++ b/docs/en/cowboy/2.0/guide/streams/index.html
@@ -62,61 +62,23 @@
<h1 class="lined-header"><span>Streams</span></h1>
-<div class="paragraph"><p>A stream is the set of messages that form an HTTP
-request/response pair.</p></div>
-<div class="paragraph"><p>The term stream comes from HTTP/2. In Cowboy, it is
-also used when talking about HTTP/1.1 or HTTP/1.0.
-It should not be confused with streaming the request
-or response body.</p></div>
-<div class="paragraph"><p>All versions of HTTP allow clients to initiate
-streams. HTTP/2 is the only one also allowing servers,
-through its server push feature. Both client and
-server-initiated streams go through the same process
-in Cowboy.</p></div>
-<div class="sect1">
+<p>A stream is the set of messages that form an HTTP request/response pair.</p>
+<p>The term stream comes from HTTP/2. In Cowboy, it is also used when talking about HTTP/1.1 or HTTP/1.0. It should not be confused with streaming the request or response body.</p>
+<p>All versions of HTTP allow clients to initiate streams. HTTP/2 is the only one also allowing servers, through its server push feature. Both client and server-initiated streams go through the same process in Cowboy.</p>
<h2 id="_stream_handlers">Stream handlers</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Stream handlers must implement five different callbacks.
-Four of them are directly related; one is special.</p></div>
-<div class="paragraph"><p>All callbacks receives the stream ID as first argument.</p></div>
-<div class="paragraph"><p>Most of them can return a list of commands to be executed
-by Cowboy. When callbacks are chained, it is possible to
-intercept and modify these commands. This can be useful
-for modifying responses for example.</p></div>
-<div class="paragraph"><p>The <code>init/3</code> callback is invoked when a new request
-comes in. It receives the Req object and the protocol options
-for this listener.</p></div>
-<div class="paragraph"><p>The <code>data/4</code> callback is invoked when data from the request
-body is received. It receives both this data and a flag
-indicating whether more is to be expected.</p></div>
-<div class="paragraph"><p>The <code>info/3</code> callback is invoked when an Erlang message is
-received for this stream. They will typically be messages
-sent by the request process.</p></div>
-<div class="paragraph"><p>Finally the <code>terminate/3</code> callback is invoked with the
-terminate reason for the stream. The return value is ignored.
-Note that as with all terminate callbacks in Erlang, there
-is no strong guarantee that it will be called.</p></div>
-<div class="paragraph"><p>The special callback <code>early_error/5</code> is called when an error
-occurs before the request headers were fully received and
-Cowboy is sending a response. It receives the partial Req
-object, the error reason, the protocol options and the response
-Cowboy will send. This response must be returned, possibly
-modified.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Stream handlers must implement five different callbacks. Four of them are directly related; one is special.</p>
+<p>All callbacks receives the stream ID as first argument.</p>
+<p>Most of them can return a list of commands to be executed by Cowboy. When callbacks are chained, it is possible to intercept and modify these commands. This can be useful for modifying responses for example.</p>
+<p>The <code>init/3</code> callback is invoked when a new request comes in. It receives the Req object and the protocol options for this listener.</p>
+<p>The <code>data/4</code> callback is invoked when data from the request body is received. It receives both this data and a flag indicating whether more is to be expected.</p>
+<p>The <code>info/3</code> callback is invoked when an Erlang message is received for this stream. They will typically be messages sent by the request process.</p>
+<p>Finally the <code>terminate/3</code> callback is invoked with the terminate reason for the stream. The return value is ignored. Note that as with all terminate callbacks in Erlang, there is no strong guarantee that it will be called.</p>
+<p>The special callback <code>early_error/5</code> is called when an error occurs before the request headers were fully received and Cowboy is sending a response. It receives the partial Req object, the error reason, the protocol options and the response Cowboy will send. This response must be returned, possibly modified.</p>
<h2 id="_built_in_handlers">Built-in handlers</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy comes with two handlers.</p></div>
-<div class="paragraph"><p><code>cowboy_stream_h</code> is the default stream handler.
-It is the core of much of the functionality of Cowboy.
-All chains of stream handlers should call it last.</p></div>
-<div class="paragraph"><p><code>cowboy_compress_h</code> will automatically compress
-responses when possible. It is not enabled by default.
-It is a good example for writing your own handlers
-that will modify responses.</p></div>
-</div>
-</div>
+<p>Cowboy comes with two handlers.</p>
+<p><code>cowboy_stream_h</code> is the default stream handler. It is the core of much of the functionality of Cowboy. All chains of stream handlers should call it last.</p>
+<p><code>cowboy_compress_h</code> will automatically compress responses when possible. It is not enabled by default. It is a good example for writing your own handlers that will modify responses.</p>
+
diff --git a/docs/en/cowboy/2.0/guide/ws_handlers/index.html b/docs/en/cowboy/2.0/guide/ws_handlers/index.html
index 2aa5ffd0..711a5411 100644
--- a/docs/en/cowboy/2.0/guide/ws_handlers/index.html
+++ b/docs/en/cowboy/2.0/guide/ws_handlers/index.html
@@ -62,270 +62,170 @@
<h1 class="lined-header"><span>Websocket handlers</span></h1>
-<div class="paragraph"><p>Websocket handlers provide an interface for upgrading HTTP/1.1
-connections to Websocket and sending or receiving frames on
-the Websocket connection.</p></div>
-<div class="paragraph"><p>As Websocket connections are established through the HTTP/1.1
-upgrade mechanism, Websocket handlers need to be able to first
-receive the HTTP request for the upgrade, before switching to
-Websocket and taking over the connection. They can then receive
-or send Websocket frames, handle incoming Erlang messages or
-close the connection.</p></div>
-<div class="sect1">
+<p>Websocket handlers provide an interface for upgrading HTTP/1.1 connections to Websocket and sending or receiving frames on the Websocket connection.</p>
+<p>As Websocket connections are established through the HTTP/1.1 upgrade mechanism, Websocket handlers need to be able to first receive the HTTP request for the upgrade, before switching to Websocket and taking over the connection. They can then receive or send Websocket frames, handle incoming Erlang messages or close the connection.</p>
<h2 id="_upgrade">Upgrade</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <code>init/2</code> callback is called when the request is received.
-To establish a Websocket connection, you must switch to the
-<code>cowboy_websocket</code> module:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The <code>init/2</code> callback is called when the request is received. To establish a Websocket connection, you must switch to the <code>cowboy_websocket</code> module:</p>
+<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">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_websocket</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Cowboy will perform the Websocket handshake immediately. Note
-that the handshake will fail if the client did not request an
-upgrade to Websocket.</p></div>
-<div class="paragraph"><p>The Req object becomes unavailable after this function returns.
-Any information required for proper execution of the Websocket
-handler must be saved in the state.</p></div>
-</div>
-</div>
-<div class="sect1">
-<h2 id="_subprotocol">Subprotocol</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The client may provide a list of Websocket subprotocols it
-supports in the sec-websocket-protocol header. The server <strong>must</strong>
-select one of them and send it back to the client or the
-handshake will fail.</p></div>
-<div class="paragraph"><p>For example, a client could understand both STOMP and MQTT over
-Websocket, and provide the header:</p></div>
-<div class="listingblock">
-<div class="content">
-<pre><code>sec-websocket-protocol: v12.stomp, mqtt</code></pre>
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">cowboy_websocket</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
</div></div>
-<div class="paragraph"><p>If the server only understands MQTT it can return:</p></div>
-<div class="listingblock">
-<div class="content">
-<pre><code>sec-websocket-protocol: mqtt</code></pre>
-</div></div>
-<div class="paragraph"><p>This selection must be done in <code>init/2</code>. An example usage could
-be:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Cowboy will perform the Websocket handshake immediately. Note that the handshake will fail if the client did not request an upgrade to Websocket.</p>
+<p>The Req object becomes unavailable after this function returns. Any information required for proper execution of the Websocket handler must be saved in the state.</p>
+<h2 id="_subprotocol">Subprotocol</h2>
+<p>The client may provide a list of Websocket subprotocols it supports in the sec-websocket-protocol header. The server <strong>must</strong> select one of them and send it back to the client or the handshake will fail.</p>
+<p>For example, a client could understand both STOMP and MQTT over Websocket, and provide the header:</p>
+<div class="listingblock"><div class="content"><pre>sec-websocket-protocol: v12.stomp, mqtt</pre></div></div>
+<p>If the server only understands MQTT it can return:</p>
+<div class="listingblock"><div class="content"><pre>sec-websocket-protocol: mqtt</pre></div></div>
+<p>This selection must be done in <code>init/2</code>. An example usage could be:</p>
+<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">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">cowboy_req:parse_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"sec-websocket-protocol"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
- <span style="color: #000080">undefined</span> <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">cowboy_websocket</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>};
- <span style="color: #009900">Subprotocols</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:keymember</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"mqtt"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #993399">1</span>, <span style="color: #009900">Subprotocols</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="color: #009900">Req2</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"sec-websocket-protocol"</span><span style="color: #990000">&gt;&gt;</span>,
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"mqtt"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req</span>),
- {<span style="color: #FF6600">cowboy_websocket</span>, <span style="color: #009900">Req2</span>, <span style="color: #009900">State</span>};
- <span style="color: #000080">false</span> <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">stop</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="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">case</font></b> <b><font color="#000000">cowboy_req:parse_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"sec-websocket-protocol"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>) <b><font color="#0000FF">of</font></b>
+ <font color="#000080">undefined</font> <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">cowboy_websocket</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>};
+ <font color="#009900">Subprotocols</font> <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">case</font></b> <b><font color="#000000">lists:keymember</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"mqtt"</font><font color="#990000">&gt;&gt;</font>, <font color="#993399">1</font>, <font color="#009900">Subprotocols</font>) <b><font color="#0000FF">of</font></b>
+ <font color="#000080">true</font> <font color="#990000">-&gt;</font>
+ <font color="#009900">Req2</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"sec-websocket-protocol"</font><font color="#990000">&gt;&gt;</font>,
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"mqtt"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>),
+ {<font color="#FF6600">cowboy_websocket</font>, <font color="#009900">Req2</font>, <font color="#009900">State</font>};
+ <font color="#000080">false</font> <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">stop</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
+ <b><font color="#0000FF">end</font></b>
+ <b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_post_upgrade_initialization">Post-upgrade initialization</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy has separate processes for handling the connection
-and requests. Because Websocket takes over the connection,
-the Websocket protocol handling occurs in a different
-process than the request handling.</p></div>
-<div class="paragraph"><p>This is reflected in the different callbacks Websocket
-handlers have. The <code>init/2</code> callback is called from the
-temporary request process and the <code>websocket_</code> callbacks
-from the connection process.</p></div>
-<div class="paragraph"><p>This means that some initialization cannot be done from
-<code>init/2</code>. Anything that would require the current pid,
-or be tied to the current pid, will not work as intended.
-The optional <code>websocket_init/1</code> can be used instead:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Cowboy has separate processes for handling the connection and requests. Because Websocket takes over the connection, the Websocket protocol handling occurs in a different process than the request handling.</p>
+<p>This is reflected in the different callbacks Websocket handlers have. The <code>init/2</code> callback is called from the temporary request process and the <code>websocket_</code> callbacks from the connection process.</p>
+<p>This means that some initialization cannot be done from <code>init/2</code>. Anything that would require the current pid, or be tied to the current pid, will not work as intended. The optional <code>websocket_init/1</code> can be used instead:</p>
+<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">websocket_init</span></span>(<span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #000000">erlang:start_timer</span></span>(<span style="color: #993399">1000</span>, <span style="font-weight: bold"><span style="color: #000080">self</span></span>(), <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Hello!"</span><span style="color: #990000">&gt;&gt;</span>),
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">State</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>All Websocket callbacks share the same return values. This
-means that we can send frames to the client right after
-the upgrade:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">websocket_init</font></b>(<font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#000000">erlang:start_timer</font></b>(<font color="#993399">1000</font>, <b><font color="#000080">self</font></b>(), <font color="#990000">&lt;&lt;</font><font color="#FF0000">"Hello!"</font><font color="#990000">&gt;&gt;</font>),
+ {<font color="#FF6600">ok</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>All Websocket callbacks share the same return values. This means that we can send frames to the client right after the upgrade:</p>
+<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">websocket_init</span></span>(<span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">reply</span>, {<span style="color: #FF6600">text</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Hello!"</span><span style="color: #990000">&gt;&gt;</span>}, <span style="color: #009900">State</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">websocket_init</font></b>(<font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">reply</font>, {<font color="#FF6600">text</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"Hello!"</font><font color="#990000">&gt;&gt;</font>}, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_receiving_frames">Receiving frames</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy will call <code>websocket_handle/2</code> whenever a text, binary,
-ping or pong frame arrives from the client.</p></div>
-<div class="paragraph"><p>The handler can handle or ignore the frames. It can also
-send frames back to the client or stop the connection.</p></div>
-<div class="paragraph"><p>The following snippet echoes back any text frame received and
-ignores all others:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Cowboy will call <code>websocket_handle/2</code> whenever a text, binary, ping or pong frame arrives from the client.</p>
+<p>The handler can handle or ignore the frames. It can also send frames back to the client or stop the connection.</p>
+<p>The following snippet echoes back any text frame received and ignores all others:</p>
+<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">websocket_handle</span></span>(<span style="color: #009900">Frame</span> <span style="color: #990000">=</span> {<span style="color: #FF6600">text</span>, <span style="color: #990000">_</span>}, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">reply</span>, <span style="color: #009900">Frame</span>, <span style="color: #009900">State</span>};
-<span style="font-weight: bold"><span style="color: #000000">websocket_handle</span></span>(<span style="color: #009900">_Frame</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">State</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Note that ping and pong frames require no action from the
-handler as Cowboy will automatically reply to ping frames.
-They are provided for informative purposes only.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">websocket_handle</font></b>(<font color="#009900">Frame</font> <font color="#990000">=</font> {<font color="#FF6600">text</font>, <font color="#990000">_</font>}, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">reply</font>, <font color="#009900">Frame</font>, <font color="#009900">State</font>};
+<b><font color="#000000">websocket_handle</font></b>(<font color="#009900">_Frame</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Note that ping and pong frames require no action from the handler as Cowboy will automatically reply to ping frames. They are provided for informative purposes only.</p>
<h2 id="_receiving_erlang_messages">Receiving Erlang messages</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy will call <code>websocket_info/2</code> whenever an Erlang message
-arrives.</p></div>
-<div class="paragraph"><p>The handler can handle or ignore the messages. It can also
-send frames to the client or stop the connection.</p></div>
-<div class="paragraph"><p>The following snippet forwards log messages to the client
-and ignores all others:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Cowboy will call <code>websocket_info/2</code> whenever an Erlang message arrives.</p>
+<p>The handler can handle or ignore the messages. It can also send frames to the client or stop the connection.</p>
+<p>The following snippet forwards log messages to the client and ignores all others:</p>
+<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">websocket_info</span></span>({<span style="font-weight: bold"><span style="color: #000080">log</span></span>, <span style="color: #009900">Text</span>}, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">reply</span>, {<span style="color: #FF6600">text</span>, <span style="color: #009900">Text</span>}, <span style="color: #009900">State</span>};
-<span style="font-weight: bold"><span style="color: #000000">websocket_info</span></span>(<span style="color: #009900">_Info</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">State</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">websocket_info</font></b>({<b><font color="#000080">log</font></b>, <font color="#009900">Text</font>}, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">reply</font>, {<font color="#FF6600">text</font>, <font color="#009900">Text</font>}, <font color="#009900">State</font>};
+<b><font color="#000000">websocket_info</font></b>(<font color="#009900">_Info</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_sending_frames">Sending frames</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>All <code>websocket_</code> callbacks share return values. They may
-send zero, one or many frames to the client.</p></div>
-<div class="paragraph"><p>To send nothing, just return an ok tuple:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<!-- @todo This will be deprecated and eventually replaced with a-->
+<!-- {Commands, State} interface that allows providing more-->
+<!-- functionality easily.-->
+<p>All <code>websocket_</code> callbacks share return values. They may send zero, one or many frames to the client.</p>
+<p>To send nothing, just return an ok tuple:</p>
+<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">websocket_info</span></span>(<span style="color: #009900">_Info</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">State</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>To send one frame, return a reply tuple with the frame to send:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">websocket_info</font></b>(<font color="#009900">_Info</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>To send one frame, return a reply tuple with the frame to send:</p>
+<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">websocket_info</span></span>(<span style="color: #009900">_Info</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">reply</span>, {<span style="color: #FF6600">text</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Hello!"</span><span style="color: #990000">&gt;&gt;</span>}, <span style="color: #009900">State</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>You can send frames of any type: text, binary, ping, pong
-or close frames.</p></div>
-<div class="paragraph"><p>To send many frames at once, return a reply tuple with the
-list of frames to send:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">websocket_info</font></b>(<font color="#009900">_Info</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">reply</font>, {<font color="#FF6600">text</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"Hello!"</font><font color="#990000">&gt;&gt;</font>}, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>You can send frames of any type: text, binary, ping, pong or close frames.</p>
+<p>To send many frames at once, return a reply tuple with the list of frames to send:</p>
+<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">websocket_info</span></span>(<span style="color: #009900">_Info</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">reply</span>, [
- {<span style="color: #FF6600">text</span>, <span style="color: #FF0000">"Hello"</span>},
- {<span style="color: #FF6600">text</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"world!"</span><span style="color: #990000">&gt;&gt;</span>},
- {<span style="font-weight: bold"><span style="color: #000080">binary</span></span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #993399">0</span><span style="color: #990000">:</span><span style="color: #993399">8000</span><span style="color: #990000">&gt;&gt;</span>}
- ], <span style="color: #009900">State</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>They are sent in the given order.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">websocket_info</font></b>(<font color="#009900">_Info</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">reply</font>, [
+ {<font color="#FF6600">text</font>, <font color="#FF0000">"Hello"</font>},
+ {<font color="#FF6600">text</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"world!"</font><font color="#990000">&gt;&gt;</font>},
+ {<b><font color="#000080">binary</font></b>, <font color="#990000">&lt;&lt;</font><font color="#993399">0</font><font color="#990000">:</font><font color="#993399">8000</font><font color="#990000">&gt;&gt;</font>}
+ ], <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>They are sent in the given order.</p>
<h2 id="_keeping_the_connection_alive">Keeping the connection alive</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy will automatically respond to ping frames sent by
-the client. They are still forwarded to the handler for
-informative purposes, but no further action is required.</p></div>
-<div class="paragraph"><p>Cowboy does not send ping frames itself. The handler can
-do it if required. A better solution in most cases is to
-let the client handle pings. Doing it from the handler
-would imply having an additional timer per connection and
-this can be a considerable cost for servers that need to
-handle large numbers of connections.</p></div>
-<div class="paragraph"><p>Cowboy can be configured to close idle connections
-automatically. It is highly recommended to configure
-a timeout here, to avoid having processes linger longer
-than needed.</p></div>
-<div class="paragraph"><p>The <code>init/2</code> callback can set the timeout to be used
-for the connection. For example, this would make Cowboy
-close connections idle for more than 30 seconds:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Cowboy will automatically respond to ping frames sent by the client. They are still forwarded to the handler for informative purposes, but no further action is required.</p>
+<p>Cowboy does not send ping frames itself. The handler can do it if required. A better solution in most cases is to let the client handle pings. Doing it from the handler would imply having an additional timer per connection and this can be a considerable cost for servers that need to handle large numbers of connections.</p>
+<p>Cowboy can be configured to close idle connections automatically. It is highly recommended to configure a timeout here, to avoid having processes linger longer than needed.</p>
+<p>The <code>init/2</code> callback can set the timeout to be used for the connection. For example, this would make Cowboy close connections idle for more than 30 seconds:</p>
+<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">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_websocket</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>, #{
- <span style="color: #0000FF">idle_timeout</span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">30000</span>}}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>This value cannot be changed once it is set. It defaults to
-<code>60000</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">cowboy_websocket</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>, #{
+ <font color="#0000FF">idle_timeout</font> <font color="#990000">=&gt;</font> <font color="#993399">30000</font>}}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>This value cannot be changed once it is set. It defaults to <code>60000</code>.</p>
<h2 id="_saving_memory">Saving memory</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The Websocket connection process can be set to hibernate
-after the callback returns.</p></div>
-<div class="paragraph"><p>Simply add an <code>hibernate</code> field to the ok or reply tuples:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The Websocket connection process can be set to hibernate after the callback returns.</p>
+<p>Simply add an <code>hibernate</code> field to the ok or reply tuples:</p>
+<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">websocket_init</span></span>(<span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">State</span>, <span style="color: #FF6600">hibernate</span>}<span style="color: #990000">.</span>
-
-<span style="font-weight: bold"><span style="color: #000000">websocket_handle</span></span>(<span style="color: #009900">_Frame</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">State</span>, <span style="color: #FF6600">hibernate</span>}<span style="color: #990000">.</span>
-
-<span style="font-weight: bold"><span style="color: #000000">websocket_info</span></span>(<span style="color: #009900">_Info</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">reply</span>, {<span style="color: #FF6600">text</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Hello!"</span><span style="color: #990000">&gt;&gt;</span>}, <span style="color: #009900">State</span>, <span style="color: #FF6600">hibernate</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>It is highly recommended to write your handlers with
-hibernate enabled, as this allows to greatly reduce the
-memory usage. Do note however that an increase in the
-CPU usage or latency can be observed instead, in particular
-for the more busy connections.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">websocket_init</font></b>(<font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <font color="#009900">State</font>, <font color="#FF6600">hibernate</font>}<font color="#990000">.</font>
+
+<b><font color="#000000">websocket_handle</font></b>(<font color="#009900">_Frame</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <font color="#009900">State</font>, <font color="#FF6600">hibernate</font>}<font color="#990000">.</font>
+
+<b><font color="#000000">websocket_info</font></b>(<font color="#009900">_Info</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">reply</font>, {<font color="#FF6600">text</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"Hello!"</font><font color="#990000">&gt;&gt;</font>}, <font color="#009900">State</font>, <font color="#FF6600">hibernate</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>It is highly recommended to write your handlers with hibernate enabled, as this allows to greatly reduce the memory usage. Do note however that an increase in the CPU usage or latency can be observed instead, in particular for the more busy connections.</p>
<h2 id="_closing_the_connection">Closing the connection</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The connection can be closed at any time, either by telling
-Cowboy to stop it or by sending a close frame.</p></div>
-<div class="paragraph"><p>To tell Cowboy to close the connection, use a stop tuple:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The connection can be closed at any time, either by telling Cowboy to stop it or by sending a close frame.</p>
+<p>To tell Cowboy to close the connection, use a stop tuple:</p>
+<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">websocket_info</span></span>(<span style="color: #009900">_Info</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">stop</span>, <span style="color: #009900">State</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Sending a <code>close</code> frame will immediately initiate the closing
-of the Websocket connection. Note that when sending a list of
-frames that include a close frame, any frame found after the
-close frame will not be sent.</p></div>
-</div>
-</div>
+<pre><tt><b><font color="#000000">websocket_info</font></b>(<font color="#009900">_Info</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">stop</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Sending a <code>close</code> frame will immediately initiate the closing of the Websocket connection. Note that when sending a list of frames that include a close frame, any frame found after the close frame will not be sent.</p>
+
diff --git a/docs/en/cowboy/2.0/guide/ws_protocol/index.html b/docs/en/cowboy/2.0/guide/ws_protocol/index.html
index 2df74448..aac99f8b 100644
--- a/docs/en/cowboy/2.0/guide/ws_protocol/index.html
+++ b/docs/en/cowboy/2.0/guide/ws_protocol/index.html
@@ -62,70 +62,22 @@
<h1 class="lined-header"><span>The Websocket protocol</span></h1>
-<div class="paragraph"><p>This chapter explains what Websocket is and why it is
-a vital component of soft realtime Web applications.</p></div>
-<div class="sect1">
+<p>This chapter explains what Websocket is and why it is a vital component of soft realtime Web applications.</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Websocket is an extension to HTTP that emulates plain TCP
-connections between the client, typically a Web browser,
-and the server. It uses the HTTP Upgrade mechanism to
-establish the connection.</p></div>
-<div class="paragraph"><p>Websocket connections are fully asynchronous, unlike
-HTTP/1.1 (synchronous) and HTTP/2 (asynchronous, but the
-server can only initiate streams in response to requests).
-With Websocket, the client and the server can both send
-frames at any time without any restriction. It is closer
-to TCP than any of the HTTP protocols.</p></div>
-<div class="paragraph"><p>Websocket is an IETF standard. Cowboy supports the standard
-and all drafts that were previously implemented by browsers,
-excluding the initial flawed draft sometimes known as
-"version 0".</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Websocket is an extension to HTTP that emulates plain TCP connections between the client, typically a Web browser, and the server. It uses the HTTP Upgrade mechanism to establish the connection.</p>
+<p>Websocket connections are fully asynchronous, unlike HTTP/1.1 (synchronous) and HTTP/2 (asynchronous, but the server can only initiate streams in response to requests). With Websocket, the client and the server can both send frames at any time without any restriction. It is closer to TCP than any of the HTTP protocols.</p>
+<p>Websocket is an IETF standard. Cowboy supports the standard and all drafts that were previously implemented by browsers, excluding the initial flawed draft sometimes known as &quot;version 0&quot;.</p>
<h2 id="_websocket_vs_http_2">Websocket vs HTTP/2</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>For a few years Websocket was the only way to have a
-bidirectional asynchronous connection with the server.
-This changed when HTTP/2 was introduced. While HTTP/2
-requires the client to first perform a request before
-the server can push data, this is only a minor restriction
-as the client can do so just as it connects.</p></div>
-<div class="paragraph"><p>Websocket was designed as a kind-of-TCP channel to a
-server. It only defines the framing and connection
-management and lets the developer implement a protocol
-on top of it. For example you could implement IRC over
-Websocket and use a Javascript IRC client to speak to
-the server.</p></div>
-<div class="paragraph"><p>HTTP/2 on the other hand is just an improvement over
-the HTTP/1.1 connection and request/response mechanism.
-It has the same semantics as HTTP/1.1.</p></div>
-<div class="paragraph"><p>If all you need is to access an HTTP API, then HTTP/2
-should be your first choice. On the other hand, if what
-you need is a different protocol, then you can use
-Websocket to implement it.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>For a few years Websocket was the only way to have a bidirectional asynchronous connection with the server. This changed when HTTP/2 was introduced. While HTTP/2 requires the client to first perform a request before the server can push data, this is only a minor restriction as the client can do so just as it connects.</p>
+<p>Websocket was designed as a kind-of-TCP channel to a server. It only defines the framing and connection management and lets the developer implement a protocol on top of it. For example you could implement IRC over Websocket and use a Javascript IRC client to speak to the server.</p>
+<p>HTTP/2 on the other hand is just an improvement over the HTTP/1.1 connection and request/response mechanism. It has the same semantics as HTTP/1.1.</p>
+<p>If all you need is to access an HTTP API, then HTTP/2 should be your first choice. On the other hand, if what you need is a different protocol, then you can use Websocket to implement it.</p>
<h2 id="_implementation">Implementation</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy implements Websocket as a protocol upgrade. Once the
-upgrade is performed from the <code>init/2</code> callback, Cowboy
-switches to Websocket. Please consult the next chapter for
-more information on initiating and handling Websocket
-connections.</p></div>
-<div class="paragraph"><p>The implementation of Websocket in Cowboy is validated using
-the Autobahn test suite, which is an extensive suite of tests
-covering all aspects of the protocol. Cowboy passes the
-suite with 100% success, including all optional tests.</p></div>
-<div class="paragraph"><p>Cowboy&#8217;s Websocket implementation also includes the
-permessage-deflate and x-webkit-deflate-frame compression
-extensions.</p></div>
-<div class="paragraph"><p>Cowboy will automatically use compression when the
-<code>compress</code> option is returned from the <code>init/2</code> function.</p></div>
-</div>
-</div>
+<p>Cowboy implements Websocket as a protocol upgrade. Once the upgrade is performed from the <code>init/2</code> callback, Cowboy switches to Websocket. Please consult the next chapter for more information on initiating and handling Websocket connections.</p>
+<p>The implementation of Websocket in Cowboy is validated using the Autobahn test suite, which is an extensive suite of tests covering all aspects of the protocol. Cowboy passes the suite with 100% success, including all optional tests.</p>
+<p>Cowboy&apos;s Websocket implementation also includes the permessage-deflate and x-webkit-deflate-frame compression extensions.</p>
+<p>Cowboy will automatically use compression when the <code>compress</code> option is returned from the <code>init/2</code> function.</p>
+
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 1852ba03..13b12f32 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
@@ -62,117 +62,59 @@
<h1 class="lined-header"><span>cowboy:set_env(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy:set_env - Update a listener&#8217;s environment value</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy:set_env - Update a listener&apos;s environment value</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">set_env</span></span>(<span style="color: #009900">Name</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">ranch:ref</span></span>(),
- <span style="color: #009900">Key</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">atom</span></span>(),
- <span style="color: #009900">Value</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>())
- <span style="color: #990000">-&gt;</span> <span style="color: #FF6600">ok</span></tt></pre></div></div>
-<div class="paragraph"><p>Set or update an environment value for a previously started
-listener.</p></div>
-<div class="paragraph"><p>This is most useful for updating the routes dynamically,
-without having to restart the listener.</p></div>
-<div class="paragraph"><p>The new value will only be available to new connections.
-Pre-existing connections will still use the old value.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">set_env</font></b>(<font color="#009900">Name</font> <font color="#990000">::</font> <b><font color="#000000">ranch:ref</font></b>(),
+ <font color="#009900">Key</font> <font color="#990000">::</font> <b><font color="#000080">atom</font></b>(),
+ <font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>())
+ <font color="#990000">-&gt;</font> <font color="#FF6600">ok</font></tt></pre>
+</div></div>
+<p>Set or update an environment value for a previously started listener.</p>
+<p>This is most useful for updating the routes dynamically, without having to restart the listener.</p>
+<p>The new value will only be available to new connections. Pre-existing connections will still use the old value.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Name
-</dt>
-<dd>
-<p>
-The name of the listener to update.
-</p>
-<div class="paragraph"><p>The name of the listener is the first argument given to the
-<a href="../cowboy.start_clear">cowboy:start_clear(3)</a>,
-<a href="../cowboy.start_tls">cowboy:start_tls(3)</a> or
-<a href="../ranch.start_listener">ranch:start_listener(3)</a> function.</p></div>
+<dl><dt>Name</dt>
+<dd><p>The name of the listener to update.</p>
+<p>The name of the listener is the first argument given to the <a href="../cowboy.start_clear">cowboy:start_clear(3)</a>, <a href="../cowboy.start_tls">cowboy:start_tls(3)</a> or <a href="../ranch.start_listener">ranch:start_listener(3)</a> function.</p>
</dd>
-<dt class="hdlist1">
-Key
-</dt>
-<dd>
-<p>
-The key in the environment map. Common keys include <code>dispatch</code>
-and <code>middlewares</code>.
-</p>
+<dt>Key</dt>
+<dd><p>The key in the environment map. Common keys include <code>dispatch</code> and <code>middlewares</code>.</p>
</dd>
-<dt class="hdlist1">
-Value
-</dt>
-<dd>
-<p>
-The new value.
-</p>
-<div class="paragraph"><p>The type of the value differs depending on the key.</p></div>
+<dt>Value</dt>
+<dd><p>The new value.</p>
+<p>The type of the value differs depending on the key.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The atom <code>ok</code> is returned on success.</p></div>
-<div class="paragraph"><p>An <code>exit:badarg</code> exception is thrown when the listener does
-not exist.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The atom <code>ok</code> is returned on success.</p>
+<p>An <code>exit:badarg</code> exception is thrown when the listener does not exist.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<ul><li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Update a listener&#8217;s routes</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Update a listener&apos;s routes</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">Dispatch</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_router:compile</span></span>([
- {<span style="color: #FF6600">'_'</span>, [
- {<span style="color: #FF0000">"/"</span>, <span style="color: #FF6600">toppage_h</span>, []},
- {<span style="color: #FF0000">"/ws"</span>, <span style="color: #FF6600">websocket_h</span>, []}
+<pre><tt><font color="#009900">Dispatch</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_router:compile</font></b>([
+ {<font color="#FF6600">'_'</font>, [
+ {<font color="#FF0000">"/"</font>, <font color="#FF6600">toppage_h</font>, []},
+ {<font color="#FF0000">"/ws"</font>, <font color="#FF6600">websocket_h</font>, []}
]}
]),
-<span style="font-weight: bold"><span style="color: #000000">cowboy:set_env</span></span>(<span style="color: #FF6600">example</span>, <span style="color: #FF6600">dispatch</span>, <span style="color: #009900">Dispatch</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<b><font color="#000000">cowboy:set_env</font></b>(<font color="#FF6600">example</font>, <font color="#FF6600">dispatch</font>, <font color="#009900">Dispatch</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../cowboy">cowboy(3)</a>,
-<a href="../cowboy.start_clear">cowboy:start_clear(3)</a>,
-<a href="../cowboy.start_tls">cowboy:start_tls(3)</a>,
-<a href="../ranch.set_protocol_options">ranch:set_protocol_options(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy">cowboy(3)</a>, <a href="../cowboy.start_clear">cowboy:start_clear(3)</a>, <a href="../cowboy.start_tls">cowboy:start_tls(3)</a>, <a href="../ranch.set_protocol_options">ranch:set_protocol_options(3)</a></p>
+
diff --git a/docs/en/cowboy/2.0/manual/cowboy.start_clear/index.html b/docs/en/cowboy/2.0/manual/cowboy.start_clear/index.html
index a4fad211..f1eb6c53 100644
--- a/docs/en/cowboy/2.0/manual/cowboy.start_clear/index.html
+++ b/docs/en/cowboy/2.0/manual/cowboy.start_clear/index.html
@@ -62,148 +62,77 @@
<h1 class="lined-header"><span>cowboy:start_clear(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy:start_clear - Listen for connections using plain TCP</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy:start_clear - Listen for connections using plain TCP</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">start_clear</span></span>(<span style="color: #009900">Name</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">ranch:ref</span></span>(),
- <span style="color: #009900">TransportOpts</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">ranch_tcp:opts</span></span>(),
- <span style="color: #009900">ProtocolOpts</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">opts</span></span>())
- <span style="color: #990000">-&gt;</span> {<span style="color: #FF6600">ok</span>, <span style="color: #009900">ListenerPid</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">pid</span></span>()}
- | {<span style="color: #FF6600">error</span>, <span style="font-weight: bold"><span style="color: #000000">any</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>Start listening for connections over a clear TCP channel.</p></div>
-<div class="paragraph"><p>Both HTTP/1.1 and HTTP/2 are supported on this listener.
-HTTP/2 has two methods of establishing a connection over
-a clear TCP channel. Both the upgrade and the prior knowledge
-methods are supported.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">start_clear</font></b>(<font color="#009900">Name</font> <font color="#990000">::</font> <b><font color="#000000">ranch:ref</font></b>(),
+ <font color="#009900">TransportOpts</font> <font color="#990000">::</font> <b><font color="#000000">ranch_tcp:opts</font></b>(),
+ <font color="#009900">ProtocolOpts</font> <font color="#990000">::</font> <b><font color="#000000">opts</font></b>())
+ <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <font color="#009900">ListenerPid</font> <font color="#990000">::</font> <b><font color="#000080">pid</font></b>()}
+ | {<font color="#FF6600">error</font>, <b><font color="#000000">any</font></b>()}</tt></pre>
+</div></div>
+<p>Start listening for connections over a clear TCP channel.</p>
+<p>Both HTTP/1.1 and HTTP/2 are supported on this listener. HTTP/2 has two methods of establishing a connection over a clear TCP channel. Both the upgrade and the prior knowledge methods are supported.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Name
-</dt>
-<dd>
-<p>
-The listener name is used to refer to this listener in
-future calls, for example when stopping it or when
-updating the routes defined.
-</p>
-<div class="paragraph"><p>It can be any Erlang term. An atom is generally good enough,
-for example <code>api</code>, <code>my_app_clear</code> or <code>my_app_tls</code>.</p></div>
+<dl><dt>Name</dt>
+<dd><p>The listener name is used to refer to this listener in future calls, for example when stopping it or when updating the routes defined.</p>
+<p>It can be any Erlang term. An atom is generally good enough, for example <code>api</code>, <code>my_app_clear</code> or <code>my_app_tls</code>.</p>
</dd>
-<dt class="hdlist1">
-TransportOpts
-</dt>
-<dd>
-<p>
-The transport options are where the TCP options, including
-the listener&#8217;s port number, are defined. Transport options
-are provided as a list of keys and values, for example
-<code>[{port, 8080}]</code>.
-</p>
-<div class="paragraph"><p>The available options are documented in the
-<a href="../ranch_tcp">ranch_tcp(3)</a> manual.</p></div>
+<dt>TransportOpts</dt>
+<dd><p>The transport options are where the TCP options, including the listener&apos;s port number, are defined. Transport options are provided as a list of keys and values, for example <code>[{port, 8080}]</code>.</p>
+<p>The available options are documented in the <a href="../ranch_tcp">ranch_tcp(3)</a> manual.</p>
</dd>
-<dt class="hdlist1">
-ProtocolOpts
-</dt>
-<dd>
-<p>
-The protocol options are in a map containing all the options for
-the different protocols that may be involved when connecting
-to the listener, including HTTP/1.1 and HTTP/2.
-</p>
-<div class="paragraph"><p>The HTTP/1.1 options are documented in the
-<a href="../cowboy_http">cowboy_http(3)</a> manual;
-and the HTTP/2 options in
-<a href="../cowboy_http2">cowboy_http2(3)</a>.</p></div>
+<dt>ProtocolOpts</dt>
+<dd><p>The protocol options are in a map containing all the options for the different protocols that may be involved when connecting to the listener, including HTTP/1.1 and HTTP/2.</p>
+<p>The HTTP/1.1 options are documented in the <a href="../cowboy_http">cowboy_http(3)</a> manual; and the HTTP/2 options in <a href="../cowboy_http2">cowboy_http2(3)</a>.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>An ok tuple is returned on success. It contains the pid of
-the top-level supervisor for the listener.</p></div>
-<div class="paragraph"><p>An error tuple is returned on error. The error reason may
-be any Erlang term.</p></div>
-<div class="paragraph"><p>A common error is <code>eaddrinuse</code>. It indicates that the port
-configured for Cowboy is already in use.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>An ok tuple is returned on success. It contains the pid of the top-level supervisor for the listener.</p>
+<p>An error tuple is returned on error. The error reason may be any Erlang term.</p>
+<p>A common error is <code>eaddrinuse</code>. It indicates that the port configured for Cowboy is already in use.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: HTTP/2 support added.
-</p>
+<ul><li><strong>2.0</strong>: HTTP/2 support added.
</li>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced. Replaces <code>cowboy:start_http/4</code>.
-</p>
+<li><strong>2.0</strong>: Function introduced. Replaces <code>cowboy:start_http/4</code>.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Start a listener</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Start a listener</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">Dispatch</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_router:compile</span></span>([
- {<span style="color: #FF6600">'_'</span>, [
- {<span style="color: #FF0000">"/"</span>, <span style="color: #FF6600">toppage_h</span>, []}
+<pre><tt><font color="#009900">Dispatch</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_router:compile</font></b>([
+ {<font color="#FF6600">'_'</font>, [
+ {<font color="#FF0000">"/"</font>, <font color="#FF6600">toppage_h</font>, []}
]}
]),
-{<span style="color: #FF6600">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:start_clear</span></span>(<span style="color: #FF6600">example</span>, [{<span style="color: #FF6600">port</span>, <span style="color: #993399">8080</span>}], #{
- <span style="color: #0000FF">env</span> <span style="color: #990000">=&gt;</span> #{<span style="color: #0000FF">dispatch</span> <span style="color: #990000">=&gt;</span> <span style="color: #009900">Dispatch</span>}
-})<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Start a listener on a random port</div>
-<div class="content"><!-- Generator: GNU source-highlight
+{<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy:start_clear</font></b>(<font color="#FF6600">example</font>, [{<font color="#FF6600">port</font>, <font color="#993399">8080</font>}], #{
+ <font color="#0000FF">env</font> <font color="#990000">=&gt;</font> #{<font color="#0000FF">dispatch</font> <font color="#990000">=&gt;</font> <font color="#009900">Dispatch</font>}
+})<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Start a listener on a random port</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">Name</span> <span style="color: #990000">=</span> <span style="color: #FF6600">example</span>,
+<pre><tt><font color="#009900">Name</font> <font color="#990000">=</font> <font color="#FF6600">example</font>,
-{<span style="color: #FF6600">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:start_clear</span></span>(<span style="color: #009900">Name</span>, [], #{
- <span style="color: #0000FF">env</span> <span style="color: #990000">=&gt;</span> #{<span style="color: #0000FF">dispatch</span> <span style="color: #990000">=&gt;</span> <span style="color: #009900">Dispatch</span>}
+{<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy:start_clear</font></b>(<font color="#009900">Name</font>, [], #{
+ <font color="#0000FF">env</font> <font color="#990000">=&gt;</font> #{<font color="#0000FF">dispatch</font> <font color="#990000">=&gt;</font> <font color="#009900">Dispatch</font>}
}),
-<span style="color: #009900">Port</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">ranch:get_port</span></span>(<span style="color: #009900">Name</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<font color="#009900">Port</font> <font color="#990000">=</font> <b><font color="#000000">ranch:get_port</font></b>(<font color="#009900">Name</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../cowboy">cowboy(3)</a>,
-<a href="../cowboy.start_tls">cowboy:start_tls(3)</a>,
-<a href="../cowboy.stop_listener">cowboy:stop_listener(3)</a>,
-<a href="../ranch">ranch(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy">cowboy(3)</a>, <a href="../cowboy.start_tls">cowboy:start_tls(3)</a>, <a href="../cowboy.stop_listener">cowboy:stop_listener(3)</a>, <a href="../ranch">ranch(3)</a></p>
+
diff --git a/docs/en/cowboy/2.0/manual/cowboy.start_tls/index.html b/docs/en/cowboy/2.0/manual/cowboy.start_tls/index.html
index 808766d9..e38e5521 100644
--- a/docs/en/cowboy/2.0/manual/cowboy.start_tls/index.html
+++ b/docs/en/cowboy/2.0/manual/cowboy.start_tls/index.html
@@ -62,153 +62,82 @@
<h1 class="lined-header"><span>cowboy:start_tls(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy:start_tls - Listen for connections using TLS</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy:start_tls - Listen for connections using TLS</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">start_tls</span></span>(<span style="color: #009900">Name</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">ranch:ref</span></span>(),
- <span style="color: #009900">TransportOpts</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">ranch_ssl:opts</span></span>(),
- <span style="color: #009900">ProtocolOpts</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">opts</span></span>())
- <span style="color: #990000">-&gt;</span> {<span style="color: #FF6600">ok</span>, <span style="color: #009900">ListenerPid</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">pid</span></span>()}
- | {<span style="color: #FF6600">error</span>, <span style="font-weight: bold"><span style="color: #000000">any</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>Start listening for connections over a secure TLS channel.</p></div>
-<div class="paragraph"><p>Both HTTP/1.1 and HTTP/2 are supported on this listener.
-The ALPN TLS extension must be used to initiate an HTTP/2
-connection.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">start_tls</font></b>(<font color="#009900">Name</font> <font color="#990000">::</font> <b><font color="#000000">ranch:ref</font></b>(),
+ <font color="#009900">TransportOpts</font> <font color="#990000">::</font> <b><font color="#000000">ranch_ssl:opts</font></b>(),
+ <font color="#009900">ProtocolOpts</font> <font color="#990000">::</font> <b><font color="#000000">opts</font></b>())
+ <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <font color="#009900">ListenerPid</font> <font color="#990000">::</font> <b><font color="#000080">pid</font></b>()}
+ | {<font color="#FF6600">error</font>, <b><font color="#000000">any</font></b>()}</tt></pre>
+</div></div>
+<p>Start listening for connections over a secure TLS channel.</p>
+<p>Both HTTP/1.1 and HTTP/2 are supported on this listener. The ALPN TLS extension must be used to initiate an HTTP/2 connection.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Name
-</dt>
-<dd>
-<p>
-The listener name is used to refer to this listener in
-future calls, for example when stopping it or when
-updating the routes defined.
-</p>
-<div class="paragraph"><p>It can be any Erlang term. An atom is generally good enough,
-for example <code>api</code>, <code>my_app_clear</code> or <code>my_app_tls</code>.</p></div>
+<dl><dt>Name</dt>
+<dd><p>The listener name is used to refer to this listener in future calls, for example when stopping it or when updating the routes defined.</p>
+<p>It can be any Erlang term. An atom is generally good enough, for example <code>api</code>, <code>my_app_clear</code> or <code>my_app_tls</code>.</p>
</dd>
-<dt class="hdlist1">
-TransportOpts
-</dt>
-<dd>
-<p>
-The transport options are where the TCP options, including
-the listener&#8217;s port number, are defined. They also contain
-the TLS options, like the server&#8217;s certificate. Transport options
-are provided as a list of keys and values, for example
-<code>[{port, 8443}, {certfile, "path/to/cert.pem"}]</code>.
-</p>
-<div class="paragraph"><p>The available options are documented in the
-<a href="../ranch_ssl">ranch_ssl(3)</a> manual.</p></div>
+<dt>TransportOpts</dt>
+<dd><p>The transport options are where the TCP options, including the listener&apos;s port number, are defined. They also contain the TLS options, like the server&apos;s certificate. Transport options are provided as a list of keys and values, for example <code>[{port, 8443}, {certfile, &quot;path/to/cert.pem&quot;}]</code>.</p>
+<p>The available options are documented in the <a href="../ranch_ssl">ranch_ssl(3)</a> manual.</p>
</dd>
-<dt class="hdlist1">
-ProtocolOpts
-</dt>
-<dd>
-<p>
-The protocol options are in a map containing all the options for
-the different protocols that may be involved when connecting
-to the listener, including HTTP/1.1 and HTTP/2.
-</p>
-<div class="paragraph"><p>The HTTP/1.1 options are documented in the
-<a href="../cowboy_http">cowboy_http(3)</a> manual;
-and the HTTP/2 options in
-<a href="../cowboy_http2">cowboy_http2(3)</a>.</p></div>
+<dt>ProtocolOpts</dt>
+<dd><p>The protocol options are in a map containing all the options for the different protocols that may be involved when connecting to the listener, including HTTP/1.1 and HTTP/2.</p>
+<p>The HTTP/1.1 options are documented in the <a href="../cowboy_http">cowboy_http(3)</a> manual; and the HTTP/2 options in <a href="../cowboy_http2">cowboy_http2(3)</a>.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>An ok tuple is returned on success. It contains the pid of
-the top-level supervisor for the listener.</p></div>
-<div class="paragraph"><p>An error tuple is returned on error. The error reason may
-be any Erlang term.</p></div>
-<div class="paragraph"><p>A common error is <code>eaddrinuse</code>. It indicates that the port
-configured for Cowboy is already in use.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>An ok tuple is returned on success. It contains the pid of the top-level supervisor for the listener.</p>
+<p>An error tuple is returned on error. The error reason may be any Erlang term.</p>
+<p>A common error is <code>eaddrinuse</code>. It indicates that the port configured for Cowboy is already in use.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: HTTP/2 support added.
-</p>
+<ul><li><strong>2.0</strong>: HTTP/2 support added.
</li>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced. Replaces <code>cowboy:start_https/4</code>.
-</p>
+<li><strong>2.0</strong>: Function introduced. Replaces <code>cowboy:start_https/4</code>.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Start a listener</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Start a listener</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">Dispatch</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_router:compile</span></span>([
- {<span style="color: #FF6600">'_'</span>, [
- {<span style="color: #FF0000">"/"</span>, <span style="color: #FF6600">toppage_h</span>, []}
+<pre><tt><font color="#009900">Dispatch</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_router:compile</font></b>([
+ {<font color="#FF6600">'_'</font>, [
+ {<font color="#FF0000">"/"</font>, <font color="#FF6600">toppage_h</font>, []}
]}
]),
-{<span style="color: #FF6600">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:start_tls</span></span>(<span style="color: #FF6600">example</span>, [
- {<span style="color: #FF6600">port</span>, <span style="color: #993399">8443</span>},
- {<span style="color: #FF6600">cert</span>, <span style="color: #FF0000">"path/to/cert.pem"</span>}
+{<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy:start_tls</font></b>(<font color="#FF6600">example</font>, [
+ {<font color="#FF6600">port</font>, <font color="#993399">8443</font>},
+ {<font color="#FF6600">cert</font>, <font color="#FF0000">"path/to/cert.pem"</font>}
], #{
- <span style="color: #0000FF">env</span> <span style="color: #990000">=&gt;</span> #{<span style="color: #0000FF">dispatch</span> <span style="color: #990000">=&gt;</span> <span style="color: #009900">Dispatch</span>}
-})<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Start a listener on a random port</div>
-<div class="content"><!-- Generator: GNU source-highlight
+ <font color="#0000FF">env</font> <font color="#990000">=&gt;</font> #{<font color="#0000FF">dispatch</font> <font color="#990000">=&gt;</font> <font color="#009900">Dispatch</font>}
+})<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Start a listener on a random port</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">Name</span> <span style="color: #990000">=</span> <span style="color: #FF6600">example</span>,
+<pre><tt><font color="#009900">Name</font> <font color="#990000">=</font> <font color="#FF6600">example</font>,
-{<span style="color: #FF6600">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:start_tls</span></span>(<span style="color: #009900">Name</span>, [
- {<span style="color: #FF6600">cert</span>, <span style="color: #FF0000">"path/to/cert.pem"</span>}
+{<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy:start_tls</font></b>(<font color="#009900">Name</font>, [
+ {<font color="#FF6600">cert</font>, <font color="#FF0000">"path/to/cert.pem"</font>}
], #{
- <span style="color: #0000FF">env</span> <span style="color: #990000">=&gt;</span> #{<span style="color: #0000FF">dispatch</span> <span style="color: #990000">=&gt;</span> <span style="color: #009900">Dispatch</span>}
+ <font color="#0000FF">env</font> <font color="#990000">=&gt;</font> #{<font color="#0000FF">dispatch</font> <font color="#990000">=&gt;</font> <font color="#009900">Dispatch</font>}
}),
-<span style="color: #009900">Port</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">ranch:get_port</span></span>(<span style="color: #009900">Name</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<font color="#009900">Port</font> <font color="#990000">=</font> <b><font color="#000000">ranch:get_port</font></b>(<font color="#009900">Name</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../cowboy">cowboy(3)</a>,
-<a href="../cowboy.start_clear">cowboy:start_clear(3)</a>,
-<a href="../cowboy.stop_listener">cowboy:stop_listener(3)</a>,
-<a href="../ranch">ranch(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy">cowboy(3)</a>, <a href="../cowboy.start_clear">cowboy:start_clear(3)</a>, <a href="../cowboy.stop_listener">cowboy:stop_listener(3)</a>, <a href="../ranch">ranch(3)</a></p>
+
diff --git a/docs/en/cowboy/2.0/manual/cowboy.stop_listener/index.html b/docs/en/cowboy/2.0/manual/cowboy.stop_listener/index.html
index 3d5146b1..5647846f 100644
--- a/docs/en/cowboy/2.0/manual/cowboy.stop_listener/index.html
+++ b/docs/en/cowboy/2.0/manual/cowboy.stop_listener/index.html
@@ -62,87 +62,42 @@
<h1 class="lined-header"><span>cowboy:stop_listener(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy:stop_listener - Stop the given listener</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy:stop_listener - Stop the given listener</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">stop_listener</span></span>(<span style="color: #009900">Name</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">ranch:ref</span></span>())
- <span style="color: #990000">-&gt;</span> <span style="color: #FF6600">ok</span> | {<span style="color: #FF6600">error</span>, <span style="color: #FF6600">not_found</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Stop a previously started listener.</p></div>
-<div class="paragraph"><p>Alias of <a href="../ranch.stop_listener">ranch:stop_listener(3)</a>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">stop_listener</font></b>(<font color="#009900">Name</font> <font color="#990000">::</font> <b><font color="#000000">ranch:ref</font></b>())
+ <font color="#990000">-&gt;</font> <font color="#FF6600">ok</font> | {<font color="#FF6600">error</font>, <font color="#FF6600">not_found</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Stop a previously started listener.</p>
+<p>Alias of <a href="../ranch.stop_listener">ranch:stop_listener(3)</a>.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Name
-</dt>
-<dd>
-<p>
-The name of the listener to be stopped.
-</p>
-<div class="paragraph"><p>The name of the listener is the first argument given to the
-<a href="../cowboy.start_clear">cowboy:start_clear(3)</a>,
-<a href="../cowboy.start_tls">cowboy:start_tls(3)</a> or
-<a href="../ranch.start_listener">ranch:start_listener(3)</a> function.</p></div>
+<dl><dt>Name</dt>
+<dd><p>The name of the listener to be stopped.</p>
+<p>The name of the listener is the first argument given to the <a href="../cowboy.start_clear">cowboy:start_clear(3)</a>, <a href="../cowboy.start_tls">cowboy:start_tls(3)</a> or <a href="../ranch.start_listener">ranch:start_listener(3)</a> function.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The atom <code>ok</code> is returned on success.</p></div>
-<div class="paragraph"><p>The <code>{error, not_found}</code> tuple is returned when the listener
-does not exist.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The atom <code>ok</code> is returned on success.</p>
+<p>The <code>{error, not_found}</code> tuple is returned when the listener does not exist.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<ul><li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Stop a listener</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Stop a listener</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: #0000FF">ok</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:stop_listener</span></span>(<span style="color: #FF6600">example</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#0000FF">ok</font> <font color="#990000">=</font> <b><font color="#000000">cowboy:stop_listener</font></b>(<font color="#FF6600">example</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../cowboy">cowboy(3)</a>,
-<a href="../cowboy.start_clear">cowboy:start_clear(3)</a>,
-<a href="../cowboy.start_tls">cowboy:start_tls(3)</a>,
-<a href="../ranch">ranch(3)</a>,
-<a href="../ranch.start_listener">ranch:start_listener(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy">cowboy(3)</a>, <a href="../cowboy.start_clear">cowboy:start_clear(3)</a>, <a href="../cowboy.start_tls">cowboy:start_tls(3)</a>, <a href="../ranch">ranch(3)</a>, <a href="../ranch.start_listener">ranch:start_listener(3)</a></p>
+
diff --git a/docs/en/cowboy/2.0/manual/cowboy/index.html b/docs/en/cowboy/2.0/manual/cowboy/index.html
index b21eb2be..b9efb2c0 100644
--- a/docs/en/cowboy/2.0/manual/cowboy/index.html
+++ b/docs/en/cowboy/2.0/manual/cowboy/index.html
@@ -62,129 +62,76 @@
<h1 class="lined-header"><span>cowboy(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy - HTTP server</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy - HTTP server</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The module <code>cowboy</code> provides convenience functions for
-manipulating Ranch listeners.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The module <code>cowboy</code> provides convenience functions for manipulating Ranch listeners.</p>
<h2 id="_exports">Exports</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../cowboy.start_clear">cowboy:start_clear(3)</a> - Listen for connections using plain TCP
-</p>
+<ul><li><a href="../cowboy.start_clear">cowboy:start_clear(3)</a> - Listen for connections using plain TCP
</li>
-<li>
-<p>
-<a href="../cowboy.start_tls">cowboy:start_tls(3)</a> - Listen for connections using TLS
-</p>
+<li><a href="../cowboy.start_tls">cowboy:start_tls(3)</a> - Listen for connections using TLS
</li>
-<li>
-<p>
-<a href="../cowboy.stop_listener">cowboy:stop_listener(3)</a> - Stop the given listener
-</p>
+<li><a href="../cowboy.stop_listener">cowboy:stop_listener(3)</a> - Stop the given listener
</li>
-<li>
-<p>
-<a href="../cowboy.set_env">cowboy:set_env(3)</a> - Update a listener&#8217;s environment value
-</p>
+<li><a href="../cowboy.set_env">cowboy:set_env(3)</a> - Update a listener&apos;s environment value
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_types">Types</h2>
-<div class="sectionbody">
-<div class="sect2">
<h3 id="_fields">fields()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">fields</span></span>() <span style="color: #990000">::</span> [<span style="color: #009900">Name</span>
- | {<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">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>
-<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
-<a href="../cowboy_req">cowboy_req(3)</a>.</p></div>
-</div>
-<div class="sect2">
+<pre><tt><b><font color="#000000">fields</font></b>() <font color="#990000">::</font> [<font color="#009900">Name</font>
+ | {<font color="#009900">Name</font>, <font color="#009900">Constraints</font>}
+ | {<font color="#009900">Name</font>, <font color="#009900">Constraints</font>, <font color="#009900">Default</font>}]
+
+<font color="#009900">Name</font> <font color="#990000">::</font> <b><font color="#000080">atom</font></b>()
+<font color="#009900">Constraints</font> <font color="#990000">::</font> <font color="#009900">Constraint</font> | [<font color="#009900">Constraint</font>]
+<font color="#009900">Constraint</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_constraints:constraint</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()</tt></pre>
+</div></div>
+<p>Fields description for match operations.</p>
+<p>This type is used in <a href="../cowboy_router">cowboy_router(3)</a> for matching bindings and in the match functions found in <a href="../cowboy_req">cowboy_req(3)</a>.</p>
<h3 id="_http_headers">http_headers()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">http_headers</span></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: #000000">iodata</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>HTTP headers.</p></div>
-</div>
-<div class="sect2">
+<pre><tt><b><font color="#000000">http_headers</font></b>() <font color="#990000">::</font> #{<b><font color="#000080">binary</font></b>() <font color="#990000">=&gt;</font> <b><font color="#000000">iodata</font></b>()}</tt></pre>
+</div></div>
+<p>HTTP headers.</p>
<h3 id="_http_status">http_status()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">http_status</span></span>() <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>() | <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>HTTP response status.</p></div>
-<div class="paragraph"><p>A binary status can be used to set a reason phrase. Note
-however that HTTP/2 only sends the status code and drops
-the reason phrase entirely.</p></div>
-</div>
-<div class="sect2">
+<pre><tt><b><font color="#000000">http_status</font></b>() <font color="#990000">::</font> <b><font color="#000000">non_neg_integer</font></b>() | <b><font color="#000080">binary</font></b>()</tt></pre>
+</div></div>
+<p>HTTP response status.</p>
+<p>A binary status can be used to set a reason phrase. Note however that HTTP/2 only sends the status code and drops the reason phrase entirely.</p>
<h3 id="_http_version">http_version()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">http_version</span></span>() <span style="color: #990000">::</span> <span style="color: #FF6600">'HTTP/2'</span> | <span style="color: #FF6600">'HTTP/1.1'</span> | <span style="color: #FF6600">'HTTP/1.0'</span></tt></pre></div></div>
-<div class="paragraph"><p>HTTP version.</p></div>
-<div class="paragraph"><p>Note that semantically, HTTP/1.1 and HTTP/2 are equivalent.</p></div>
-</div>
-<div class="sect2">
+<pre><tt><b><font color="#000000">http_version</font></b>() <font color="#990000">::</font> <font color="#FF6600">'HTTP/2'</font> | <font color="#FF6600">'HTTP/1.1'</font> | <font color="#FF6600">'HTTP/1.0'</font></tt></pre>
+</div></div>
+<p>HTTP version.</p>
+<p>Note that semantically, HTTP/1.1 and HTTP/2 are equivalent.</p>
<h3 id="_opts">opts()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">opts</span></span>() <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">map</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Options for the HTTP/1.1, HTTP/2 and Websocket protocols.</p></div>
-<div class="paragraph"><p>The protocol options are in a map containing all the options for
-the different protocols that may be involved when connecting
-to the listener, including HTTP/1.1 and HTTP/2.</p></div>
-<div class="paragraph"><p>The HTTP/1.1 options are documented in the
-<a href="../cowboy_http">cowboy_http(3)</a> manual
-and the HTTP/2 options in
-<a href="../cowboy_http2">cowboy_http2(3)</a>.</p></div>
-</div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">opts</font></b>() <font color="#990000">::</font> <b><font color="#000000">map</font></b>()</tt></pre>
+</div></div>
+<p>Options for the HTTP/1.1, HTTP/2 and Websocket protocols.</p>
+<p>The protocol options are in a map containing all the options for the different protocols that may be involved when connecting to the listener, including HTTP/1.1 and HTTP/2.</p>
+<p>The HTTP/1.1 options are documented in the <a href="../cowboy_http">cowboy_http(3)</a> manual and the HTTP/2 options in <a href="../cowboy_http2">cowboy_http2(3)</a>.</p>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="..">cowboy(7)</a>,
-<a href="../ranch">ranch(3)</a></p></div>
-</div>
-</div>
+<p><a href="..">cowboy(7)</a>, <a href="../ranch">ranch(3)</a></p>
+
diff --git a/docs/en/cowboy/2.0/manual/cowboy_app/index.html b/docs/en/cowboy/2.0/manual/cowboy_app/index.html
index 35f2b325..f0de0290 100644
--- a/docs/en/cowboy/2.0/manual/cowboy_app/index.html
+++ b/docs/en/cowboy/2.0/manual/cowboy_app/index.html
@@ -62,171 +62,77 @@
<h1 class="lined-header"><span>cowboy(7)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy - Small, fast, modern HTTP server for Erlang/OTP</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy - Small, fast, modern HTTP server for Erlang/OTP</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy is an HTTP server for Erlang/OTP with support for the
-HTTP/1.1, HTTP/2 and Websocket protocols.</p></div>
-<div class="paragraph"><p>Cowboy aims to provide a complete HTTP stack. This includes
-the implementation of the HTTP RFCs but also any directly
-related standards, like Websocket or Server-Sent Events.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Cowboy is an HTTP server for Erlang/OTP with support for the HTTP/1.1, HTTP/2 and Websocket protocols.</p>
+<p>Cowboy aims to provide a complete HTTP stack. This includes the implementation of the HTTP RFCs but also any directly related standards, like Websocket or Server-Sent Events.</p>
<h2 id="_modules">Modules</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Functions:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../cowboy">cowboy(3)</a> - Listener management
-</p>
+<p>Functions:</p>
+<ul><li><a href="../cowboy">cowboy(3)</a> - Listener management
</li>
-<li>
-<p>
-<a href="../cowboy_req">cowboy_req(3)</a> - Request and response
-</p>
+<li><a href="../cowboy_req">cowboy_req(3)</a> - Request and response
</li>
-<li>
-<p>
-<a href="../cowboy_router">cowboy_router(3)</a> - Router
-</p>
+<li><a href="../cowboy_router">cowboy_router(3)</a> - Router
</li>
-<li>
-<p>
-<a href="../cowboy_constraints">cowboy_constraints(3)</a> - Constraints
-</p>
+<li><a href="../cowboy_constraints">cowboy_constraints(3)</a> - Constraints
</li>
-</ul></div>
-<div class="paragraph"><p>Protocols:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../cowboy_http">cowboy_http(3)</a> - HTTP/1.1
-</p>
+</ul>
+<p>Protocols:</p>
+<ul><li><a href="../cowboy_http">cowboy_http(3)</a> - HTTP/1.1
</li>
-<li>
-<p>
-<a href="../cowboy_http2">cowboy_http2(3)</a> - HTTP/2
-</p>
+<li><a href="../cowboy_http2">cowboy_http2(3)</a> - HTTP/2
</li>
-<li>
-<p>
-<a href="../cowboy_websocket">cowboy_websocket(3)</a> - Websocket
-</p>
+<li><a href="../cowboy_websocket">cowboy_websocket(3)</a> - Websocket
</li>
-</ul></div>
-<div class="paragraph"><p>Handlers:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../cowboy_static">cowboy_static(3)</a> - Static file handler
-</p>
+</ul>
+<p>Handlers:</p>
+<ul><li><a href="../cowboy_static">cowboy_static(3)</a> - Static file handler
</li>
-</ul></div>
-<div class="paragraph"><p>Behaviors:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../cowboy_handler">cowboy_handler(3)</a> - Plain HTTP handlers
-</p>
+</ul>
+<p>Behaviors:</p>
+<ul><li><a href="../cowboy_handler">cowboy_handler(3)</a> - Plain HTTP handlers
</li>
-<li>
-<p>
-<a href="../cowboy_loop">cowboy_loop(3)</a> - Loop handlers
-</p>
+<li><a href="../cowboy_loop">cowboy_loop(3)</a> - Loop handlers
</li>
-<li>
-<p>
-<a href="../cowboy_middleware">cowboy_middleware(3)</a> - Middlewares
-</p>
+<li><a href="../cowboy_middleware">cowboy_middleware(3)</a> - Middlewares
</li>
-<li>
-<p>
-<a href="../cowboy_rest">cowboy_rest(3)</a> - REST handlers
-</p>
+<li><a href="../cowboy_rest">cowboy_rest(3)</a> - REST handlers
</li>
-<li>
-<p>
-<a href="../cowboy_stream">cowboy_stream(3)</a> - Stream handlers
-</p>
+<li><a href="../cowboy_stream">cowboy_stream(3)</a> - Stream handlers
</li>
-<li>
-<p>
-<a href="../cowboy_websocket">cowboy_websocket(3)</a> - Websocket handlers
-</p>
+<li><a href="../cowboy_websocket">cowboy_websocket(3)</a> - Websocket handlers
</li>
-</ul></div>
-<div class="paragraph"><p>Middlewares:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../cowboy_router">cowboy_router(3)</a> - Router middleware
-</p>
+</ul>
+<p>Middlewares:</p>
+<ul><li><a href="../cowboy_router">cowboy_router(3)</a> - Router middleware
</li>
-<li>
-<p>
-<a href="../cowboy_handler">cowboy_handler(3)</a> - Handler middleware
-</p>
+<li><a href="../cowboy_handler">cowboy_handler(3)</a> - Handler middleware
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
+<!-- @todo http_status_codes is not linked to; what to do with it?-->
<h2 id="_dependencies">Dependencies</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../ranch">ranch(7)</a> - Socket acceptor pool for TCP protocols
-</p>
+<ul><li><a href="../ranch">ranch(7)</a> - Socket acceptor pool for TCP protocols
</li>
-<li>
-<p>
-<a href="../cowlib">cowlib(7)</a> - Support library for manipulating Web protocols
-</p>
+<li><a href="../cowlib">cowlib(7)</a> - Support library for manipulating Web protocols
</li>
-<li>
-<p>
-ssl - Secure communication over sockets
-</p>
+<li>ssl - Secure communication over sockets
</li>
-<li>
-<p>
-crypto - Crypto functions
-</p>
+<li>crypto - Crypto functions
</li>
-</ul></div>
-<div class="paragraph"><p>All these applications must be started before the <code>cowboy</code>
-application. To start Cowboy and all dependencies at once:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+</ul>
+<p>All these applications must be started before the <code>cowboy</code> application. To start Cowboy and all dependencies at once:</p>
+<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">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">application:ensure_all_started</span></span>(<span style="color: #FF6600">cowboy</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">application:ensure_all_started</font></b>(<font color="#FF6600">cowboy</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_environment">Environment</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <code>cowboy</code> application does not define any application
-environment configuration parameters.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The <code>cowboy</code> application does not define any application environment configuration parameters.</p>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../ranch">ranch(7)</a>,
-<a href="../cowlib">cowlib(7)</a></p></div>
-</div>
-</div>
+<p><a href="../ranch">ranch(7)</a>, <a href="../cowlib">cowlib(7)</a></p>
+
diff --git a/docs/en/cowboy/2.0/manual/cowboy_constraints.int/index.html b/docs/en/cowboy/2.0/manual/cowboy_constraints.int/index.html
index cbd43283..f230531b 100644
--- a/docs/en/cowboy/2.0/manual/cowboy_constraints.int/index.html
+++ b/docs/en/cowboy/2.0/manual/cowboy_constraints.int/index.html
@@ -62,92 +62,52 @@
<h1 class="lined-header"><span>cowboy_constraints:int(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_constraints:int - Integer constraint</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_constraints:int - Integer constraint</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Constraint functions implement a number of different operations.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Constraint functions implement a number of different operations.</p>
+<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">int</span></span>(<span style="color: #FF6600">forward</span>, <span style="color: #009900">Bin</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Int</span>} | {<span style="color: #FF6600">error</span>, <span style="color: #FF6600">not_an_integer</span>}
+<pre><tt><b><font color="#000000">int</font></b>(<font color="#FF6600">forward</font>, <font color="#009900">Bin</font>) <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <font color="#009900">Int</font>} | {<font color="#FF6600">error</font>, <font color="#FF6600">not_an_integer</font>}
-<span style="color: #009900">Bin</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()
-<span style="color: #009900">Int</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">integer</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Validate and convert the text representation of an integer.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<font color="#009900">Bin</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()
+<font color="#009900">Int</font> <font color="#990000">::</font> <b><font color="#000080">integer</font></b>()</tt></pre>
+</div></div>
+<p>Validate and convert the text representation of an integer.</p>
+<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">int</span></span>(<span style="color: #FF6600">reverse</span>, <span style="color: #009900">Int</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Bin</span>} | {<span style="color: #FF6600">error</span>, <span style="color: #FF6600">not_an_integer</span>}</tt></pre></div></div>
-<div class="paragraph"><p>Convert an integer back to its text representation.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">int</font></b>(<font color="#FF6600">reverse</font>, <font color="#009900">Int</font>) <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <font color="#009900">Bin</font>} | {<font color="#FF6600">error</font>, <font color="#FF6600">not_an_integer</font>}</tt></pre>
+</div></div>
+<p>Convert an integer back to its text representation.</p>
+<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">int</span></span>(<span style="color: #FF6600">format_error</span>, <span style="color: #009900">Error</span>) <span style="color: #990000">-&gt;</span> <span style="color: #009900">HumanReadable</span>
+<pre><tt><b><font color="#000000">int</font></b>(<font color="#FF6600">format_error</font>, <font color="#009900">Error</font>) <font color="#990000">-&gt;</font> <font color="#009900">HumanReadable</font>
-<span style="color: #009900">Error</span> <span style="color: #990000">::</span> {<span style="color: #FF6600">not_an_integer</span>, <span style="color: #009900">Bin</span> | <span style="color: #009900">Int</span>}
-<span style="color: #009900">HumanReadable</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">iolist</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Generate a human-readable error message.</p></div>
-</div>
-</div>
-<div class="sect1">
+<font color="#009900">Error</font> <font color="#990000">::</font> {<font color="#FF6600">not_an_integer</font>, <font color="#009900">Bin</font> | <font color="#009900">Int</font>}
+<font color="#009900">HumanReadable</font> <font color="#990000">::</font> <b><font color="#000000">iolist</font></b>()</tt></pre>
+</div></div>
+<p>Generate a human-readable error message.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Arguments vary depending on the operation. Constraint
-functions always take the operation type as first argument,
-and the value as second argument.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Arguments vary depending on the operation. Constraint functions always take the operation type as first argument, and the value as second argument.</p>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The return value varies depending on the operation.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The return value varies depending on the operation.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Interface modified to allow for a variety of operations.
-</p>
+<ul><li><strong>2.0</strong>: Interface modified to allow for a variety of operations.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Constraint introduced.
-</p>
+<li><strong>1.0</strong>: Constraint introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This function is not meant to be called directly.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This function is not meant to be called directly.</p>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../cowboy_constraints">cowboy_constraints(3)</a>,
-<a href="../cowboy_constraints.nonempty">cowboy_constraints:nonempty(3)</a>,
-<a href="../cowboy_router">cowboy_router(3)</a>,
-<a href="../cowboy_req.match_cookies">cowboy_req:match_cookies(3)</a>,
-<a href="../cowboy_req.match_qs">cowboy_req:match_qs(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_constraints">cowboy_constraints(3)</a>, <a href="../cowboy_constraints.nonempty">cowboy_constraints:nonempty(3)</a>, <a href="../cowboy_router">cowboy_router(3)</a>, <a href="../cowboy_req.match_cookies">cowboy_req:match_cookies(3)</a>, <a href="../cowboy_req.match_qs">cowboy_req:match_qs(3)</a></p>
+
diff --git a/docs/en/cowboy/2.0/manual/cowboy_constraints.nonempty/index.html b/docs/en/cowboy/2.0/manual/cowboy_constraints.nonempty/index.html
index 15f1e5fe..55cb37f4 100644
--- a/docs/en/cowboy/2.0/manual/cowboy_constraints.nonempty/index.html
+++ b/docs/en/cowboy/2.0/manual/cowboy_constraints.nonempty/index.html
@@ -62,91 +62,51 @@
<h1 class="lined-header"><span>cowboy_constraints:nonempty(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_constraints:nonempty - Non-empty constraint</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_constraints:nonempty - Non-empty constraint</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Constraint functions implement a number of different operations.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Constraint functions implement a number of different operations.</p>
+<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">nonempty</span></span>(<span style="color: #FF6600">forward</span> | <span style="color: #FF6600">reverse</span>, <span style="color: #990000">&lt;&lt;&gt;&gt;</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #FF6600">error</span>, <span style="color: #FF6600">empty</span>}</tt></pre></div></div>
-<div class="paragraph"><p>Reject empty values.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">nonempty</font></b>(<font color="#FF6600">forward</font> | <font color="#FF6600">reverse</font>, <font color="#990000">&lt;&lt;&gt;&gt;</font>) <font color="#990000">-&gt;</font> {<font color="#FF6600">error</font>, <font color="#FF6600">empty</font>}</tt></pre>
+</div></div>
+<p>Reject empty values.</p>
+<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">nonempty</span></span>(<span style="color: #FF6600">forward</span> | <span style="color: #FF6600">reverse</span>, <span style="color: #009900">Bin</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Bin</span>}
+<pre><tt><b><font color="#000000">nonempty</font></b>(<font color="#FF6600">forward</font> | <font color="#FF6600">reverse</font>, <font color="#009900">Bin</font>) <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <font color="#009900">Bin</font>}
-<span style="color: #009900">Bin</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>Accept any other binary values.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<font color="#009900">Bin</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()</tt></pre>
+</div></div>
+<p>Accept any other binary values.</p>
+<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">nonempty</span></span>(<span style="color: #FF6600">format_error</span>, <span style="color: #009900">Error</span>) <span style="color: #990000">-&gt;</span> <span style="color: #009900">HumanReadable</span>
+<pre><tt><b><font color="#000000">nonempty</font></b>(<font color="#FF6600">format_error</font>, <font color="#009900">Error</font>) <font color="#990000">-&gt;</font> <font color="#009900">HumanReadable</font>
-<span style="color: #009900">Error</span> <span style="color: #990000">::</span> {<span style="color: #FF6600">empty</span>, <span style="color: #009900">Bin</span>}
-<span style="color: #009900">HumanReadable</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">iolist</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Generate a human-readable error message.</p></div>
-</div>
-</div>
-<div class="sect1">
+<font color="#009900">Error</font> <font color="#990000">::</font> {<font color="#FF6600">empty</font>, <font color="#009900">Bin</font>}
+<font color="#009900">HumanReadable</font> <font color="#990000">::</font> <b><font color="#000000">iolist</font></b>()</tt></pre>
+</div></div>
+<p>Generate a human-readable error message.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Arguments vary depending on the operation. Constraint
-functions always take the operation type as first argument,
-and the value as second argument.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Arguments vary depending on the operation. Constraint functions always take the operation type as first argument, and the value as second argument.</p>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The return value varies depending on the operation.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The return value varies depending on the operation.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Interface modified to allow for a variety of operations.
-</p>
+<ul><li><strong>2.0</strong>: Interface modified to allow for a variety of operations.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Constraint introduced.
-</p>
+<li><strong>1.0</strong>: Constraint introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This function is not meant to be called directly.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This function is not meant to be called directly.</p>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../cowboy_constraints">cowboy_constraints(3)</a>,
-<a href="../cowboy_constraints.int">cowboy_constraints:int(3)</a>,
-<a href="../cowboy_router">cowboy_router(3)</a>,
-<a href="../cowboy_req.match_cookies">cowboy_req:match_cookies(3)</a>,
-<a href="../cowboy_req.match_qs">cowboy_req:match_qs(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_constraints">cowboy_constraints(3)</a>, <a href="../cowboy_constraints.int">cowboy_constraints:int(3)</a>, <a href="../cowboy_router">cowboy_router(3)</a>, <a href="../cowboy_req.match_cookies">cowboy_req:match_cookies(3)</a>, <a href="../cowboy_req.match_qs">cowboy_req:match_qs(3)</a></p>
+
diff --git a/docs/en/cowboy/2.0/manual/cowboy_constraints/index.html b/docs/en/cowboy/2.0/manual/cowboy_constraints/index.html
index 68e79529..d911c464 100644
--- a/docs/en/cowboy/2.0/manual/cowboy_constraints/index.html
+++ b/docs/en/cowboy/2.0/manual/cowboy_constraints/index.html
@@ -62,84 +62,43 @@
<h1 class="lined-header"><span>cowboy_constraints(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_constraints - Constraints</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_constraints - Constraints</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The module <code>cowboy_constraints</code> defines the built-in
-constraints in Cowboy and provides an interface for
-manipulating these constraints.</p></div>
-<div class="paragraph"><p>Constraints are functions that define what type of
-input is allowed. They are used throughout Cowboy,
-from the router to query strings to cookies.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The module <code>cowboy_constraints</code> defines the built-in constraints in Cowboy and provides an interface for manipulating these constraints.</p>
+<p>Constraints are functions that define what type of input is allowed. They are used throughout Cowboy, from the router to query strings to cookies.</p>
<h2 id="_exports">Exports</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Built-in constraints:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../cowboy_constraints.int">cowboy_constraints:int(3)</a> - Integer constraint
-</p>
+<p>Built-in constraints:</p>
+<ul><li><a href="../cowboy_constraints.int">cowboy_constraints:int(3)</a> - Integer constraint
</li>
-<li>
-<p>
-<a href="../cowboy_constraints.nonempty">cowboy_constraints:nonempty(3)</a> - Non-empty constraint
-</p>
+<li><a href="../cowboy_constraints.nonempty">cowboy_constraints:nonempty(3)</a> - Non-empty constraint
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_types">Types</h2>
-<div class="sectionbody">
-<div class="sect2">
<h3 id="_constraint">constraint()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">constraint</span></span>() <span style="color: #990000">::</span> <span style="color: #FF6600">int</span> | <span style="color: #FF6600">nonempty</span> | <span style="font-weight: bold"><span style="color: #0000FF">fun</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>A constraint function.</p></div>
-<div class="paragraph"><p>The atom constraints are built-in, see the corresponding
-function in the exports list above.</p></div>
-</div>
-<div class="sect2">
+<pre><tt><b><font color="#000000">constraint</font></b>() <font color="#990000">::</font> <font color="#FF6600">int</font> | <font color="#FF6600">nonempty</font> | <b><font color="#0000FF">fun</font></b>()</tt></pre>
+</div></div>
+<p>A constraint function.</p>
+<p>The atom constraints are built-in, see the corresponding function in the exports list above.</p>
<h3 id="_reason">reason()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">reason</span></span>() <span style="color: #990000">::</span> {<span style="font-weight: bold"><span style="color: #000000">constraint</span></span>(), <span style="color: #009900">Reason</span>, <span style="color: #009900">Value</span>}
-
-<span style="color: #009900">Reason</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()
-<span style="color: #009900">Value</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>Reason for the constraint failure.</p></div>
-<div class="paragraph"><p>It includes the constraint function in question,
-a machine-readable error reason and the value that
-made the constraint fail.</p></div>
-</div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">reason</font></b>() <font color="#990000">::</font> {<b><font color="#000000">constraint</font></b>(), <font color="#009900">Reason</font>, <font color="#009900">Value</font>}
+
+<font color="#009900">Reason</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()
+<font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()</tt></pre>
+</div></div>
+<p>Reason for the constraint failure.</p>
+<p>It includes the constraint function in question, a machine-readable error reason and the value that made the constraint fail.</p>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="..">cowboy(7)</a>,
-<a href="../cowboy">cowboy(3)</a>,
-<a href="../cowboy_router">cowboy_router(3)</a>,
-<a href="../cowboy_req.match_cookies">cowboy_req:match_cookies(3)</a>,
-<a href="../cowboy_req.match_qs">cowboy_req:match_qs(3)</a></p></div>
-</div>
-</div>
+<p><a href="..">cowboy(7)</a>, <a href="../cowboy">cowboy(3)</a>, <a href="../cowboy_router">cowboy_router(3)</a>, <a href="../cowboy_req.match_cookies">cowboy_req:match_cookies(3)</a>, <a href="../cowboy_req.match_qs">cowboy_req:match_qs(3)</a></p>
+
diff --git a/docs/en/cowboy/2.0/manual/cowboy_handler.terminate/index.html b/docs/en/cowboy/2.0/manual/cowboy_handler.terminate/index.html
index 5c4315c0..16a2bd69 100644
--- a/docs/en/cowboy/2.0/manual/cowboy_handler.terminate/index.html
+++ b/docs/en/cowboy/2.0/manual/cowboy_handler.terminate/index.html
@@ -62,109 +62,54 @@
<h1 class="lined-header"><span>cowboy_handler:terminate(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_handler:terminate - Terminate the handler</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_handler:terminate - Terminate the handler</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">terminate</span></span>(<span style="color: #009900">Reason</span>, <span style="color: #009900">PartialReq</span>, <span style="color: #009900">State</span>, <span style="color: #009900">Handler</span>) <span style="color: #990000">-&gt;</span> <span style="color: #FF6600">ok</span>
-
-<span style="color: #009900">Reason</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()
-<span style="color: #009900">PartialReq</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">map</span></span>()
-<span style="color: #009900">State</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()
-<span style="color: #009900">Handler</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">module</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Call the optional terminate callback if it is defined.</p></div>
-<div class="paragraph"><p>Make sure to use this function at the end of the execution
-of modules that implement custom handler behaviors.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">terminate</font></b>(<font color="#009900">Reason</font>, <font color="#009900">PartialReq</font>, <font color="#009900">State</font>, <font color="#009900">Handler</font>) <font color="#990000">-&gt;</font> <font color="#FF6600">ok</font>
+
+<font color="#009900">Reason</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()
+<font color="#009900">PartialReq</font> <font color="#990000">::</font> <b><font color="#000000">map</font></b>()
+<font color="#009900">State</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()
+<font color="#009900">Handler</font> <font color="#990000">::</font> <b><font color="#000000">module</font></b>()</tt></pre>
+</div></div>
+<p>Call the optional terminate callback if it is defined.</p>
+<p>Make sure to use this function at the end of the execution of modules that implement custom handler behaviors.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Reason
-</dt>
-<dd>
-<p>
-Reason for termination.
-</p>
+<dl><dt>Reason</dt>
+<dd><p>Reason for termination.</p>
</dd>
-<dt class="hdlist1">
-PartialReq
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
-<div class="paragraph"><p>It is possible to remove fields from the Req object to save memory
-when the handler has no concept of requests/responses. The only
-requirement is that a map is provided.</p></div>
+<dt>PartialReq</dt>
+<dd><p>The Req object.</p>
+<p>It is possible to remove fields from the Req object to save memory when the handler has no concept of requests/responses. The only requirement is that a map is provided.</p>
</dd>
-<dt class="hdlist1">
-State
-</dt>
-<dd>
-<p>
-Handler state.
-</p>
+<dt>State</dt>
+<dd><p>Handler state.</p>
</dd>
-<dt class="hdlist1">
-Handler
-</dt>
-<dd>
-<p>
-Handler module.
-</p>
+<dt>Handler</dt>
+<dd><p>Handler module.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The atom <code>ok</code> is always returned. It can be safely ignored.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The atom <code>ok</code> is always returned. It can be safely ignored.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced.
-</p>
+<ul><li><strong>2.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Terminate a handler normally</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Terminate a handler normally</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">cowboy_handler:terminate</span></span>(<span style="font-weight: bold"><span style="color: #000080">normal</span></span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>, <span style="color: #009900">Handler</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">cowboy_handler:terminate</font></b>(<b><font color="#000080">normal</font></b>, <font color="#009900">Req</font>, <font color="#009900">State</font>, <font color="#009900">Handler</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../cowboy_handler">cowboy_handler(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_handler">cowboy_handler(3)</a></p>
+
diff --git a/docs/en/cowboy/2.0/manual/cowboy_handler/index.html b/docs/en/cowboy/2.0/manual/cowboy_handler/index.html
index bb7d2df7..ae108976 100644
--- a/docs/en/cowboy/2.0/manual/cowboy_handler/index.html
+++ b/docs/en/cowboy/2.0/manual/cowboy_handler/index.html
@@ -62,96 +62,46 @@
<h1 class="lined-header"><span>cowboy_handler(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_handler - Plain HTTP handlers</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_handler - Plain HTTP handlers</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <code>cowboy_handler</code> middleware executes the handler selected
-by the router or any other preceding middleware.</p></div>
-<div class="paragraph"><p>This middleware takes the handler module and initial state
-from the <code>handler</code> and <code>handler_opts</code> environment values,
-respectively. On completion, it adds a <code>result</code> value to
-the middleware environment, containing the return value
-of the <code>terminate/3</code> callback (if defined) and <code>ok</code> otherwise.</p></div>
-<div class="paragraph"><p>This module also defines a callback interface for handling
-HTTP requests.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The <code>cowboy_handler</code> middleware executes the handler selected by the router or any other preceding middleware.</p>
+<p>This middleware takes the handler module and initial state from the <code>handler</code> and <code>handler_opts</code> environment values, respectively. On completion, it adds a <code>result</code> value to the middleware environment, containing the return value of the <code>terminate/3</code> callback (if defined) and <code>ok</code> otherwise.</p>
+<p>This module also defines a callback interface for handling HTTP requests.</p>
<h2 id="_callbacks">Callbacks</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Plain HTTP handlers implement the following interface:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Plain HTTP handlers implement the following interface:</p>
+<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">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">ok</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
-
-<span style="font-weight: bold"><span style="color: #000000">terminate</span></span>(<span style="color: #009900">Reason</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> <span style="color: #FF6600">ok</span> <span style="font-style: italic"><span style="color: #9A1900">%% optional</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">State</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()
-<span style="color: #009900">Reason</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">normal</span></span>
- | {<span style="color: #FF6600">crash</span>, <span style="color: #FF6600">error</span> | <span style="font-weight: bold"><span style="color: #000080">exit</span></span> | <span style="font-weight: bold"><span style="color: #000080">throw</span></span>, <span style="font-weight: bold"><span style="color: #000000">any</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>These two callbacks are common to all handlers.</p></div>
-<div class="paragraph"><p>Plain HTTP handlers do all their work in the <code>init/2</code>
-callback. Returning <code>ok</code> terminates the handler. If no
-response is sent, Cowboy will send a <code>204 No Content</code>.</p></div>
-<div class="paragraph"><p>The optional <code>terminate/3</code> callback will ultimately be called
-with the reason for the termination of the handler.
-Cowboy will terminate the process right after this. There
-is no need to perform any cleanup in this callback.</p></div>
-<div class="paragraph"><p>The following terminate reasons are defined for plain HTTP
-handlers:</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-normal
-</dt>
-<dd>
-<p>
- The connection was closed normally.
-</p>
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
+
+<b><font color="#000000">terminate</font></b>(<font color="#009900">Reason</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> <font color="#FF6600">ok</font> <i><font color="#9A1900">%% optional</font></i>
+
+<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()
+<font color="#009900">State</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()
+<font color="#009900">Reason</font> <font color="#990000">::</font> <b><font color="#000080">normal</font></b>
+ | {<font color="#FF6600">crash</font>, <font color="#FF6600">error</font> | <b><font color="#000080">exit</font></b> | <b><font color="#000080">throw</font></b>, <b><font color="#000000">any</font></b>()}</tt></pre>
+</div></div>
+<p>These two callbacks are common to all handlers.</p>
+<p>Plain HTTP handlers do all their work in the <code>init/2</code> callback. Returning <code>ok</code> terminates the handler. If no response is sent, Cowboy will send a <code>204 No Content</code>.</p>
+<p>The optional <code>terminate/3</code> callback will ultimately be called with the reason for the termination of the handler. Cowboy will terminate the process right after this. There is no need to perform any cleanup in this callback.</p>
+<p>The following terminate reasons are defined for plain HTTP handlers:</p>
+<dl><dt>normal</dt>
+<dd><p>The connection was closed normally.</p>
</dd>
-<dt class="hdlist1">
-{crash, Class, Reason}
-</dt>
-<dd>
-<p>
- A crash occurred in the handler. <code>Class</code> and <code>Reason</code> can be
- used to obtain more information about the crash. The function
- <code>erlang:get_stacktrace/0</code> can also be called to obtain the
- stacktrace of the process when the crash occurred.
-</p>
+<dt>{crash, Class, Reason}</dt>
+<dd><p>A crash occurred in the handler. <code>Class</code> and <code>Reason</code> can be used to obtain more information about the crash. The function <code>erlang:get_stacktrace/0</code> can also be called to obtain the stacktrace of the process when the crash occurred.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_exports">Exports</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The following function should be called by modules implementing
-custom handlers to execute the optional terminate callback:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../cowboy_handler.terminate">cowboy_handler:terminate(3)</a> - Terminate the handler
-</p>
+<p>The following function should be called by modules implementing custom handlers to execute the optional terminate callback:</p>
+<ul><li><a href="../cowboy_handler.terminate">cowboy_handler:terminate(3)</a> - Terminate the handler
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="..">cowboy(7)</a></p></div>
-</div>
-</div>
+<p><a href="..">cowboy(7)</a></p>
+
diff --git a/docs/en/cowboy/2.0/manual/cowboy_http/index.html b/docs/en/cowboy/2.0/manual/cowboy_http/index.html
index 50f6d20f..8a635726 100644
--- a/docs/en/cowboy/2.0/manual/cowboy_http/index.html
+++ b/docs/en/cowboy/2.0/manual/cowboy_http/index.html
@@ -62,240 +62,110 @@
<h1 class="lined-header"><span>cowboy_http(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_http - HTTP/1.1</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_http - HTTP/1.1</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The module <code>cowboy_http</code> implements HTTP/1.1 and HTTP/1.0
-as a Ranch protocol.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The module <code>cowboy_http</code> implements HTTP/1.1 and HTTP/1.0 as a Ranch protocol.</p>
<h2 id="_options">Options</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<!-- @todo Might be worth moving cowboy_clear/tls/stream_h options-->
+<!-- to their respective manual, when they are added.-->
+<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">opts</span></span>() <span style="color: #990000">::</span> #{
- <span style="color: #0000FF">connection_type</span> <span style="color: #990000">=&gt;</span> <span style="color: #FF6600">worker</span> | <span style="color: #FF6600">supervisor</span>,
- <span style="color: #0000FF">env</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_middleware:env</span></span>(),
- <span style="color: #0000FF">idle_timeout</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">timeout</span></span>(),
- <span style="color: #0000FF">inactivity_timeout</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">timeout</span></span>(),
- <span style="color: #0000FF">max_empty_lines</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">max_header_name_length</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">max_header_value_length</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">max_headers</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">max_keepalive</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">max_method_length</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">max_request_line_length</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">middlewares</span> <span style="color: #990000">=&gt;</span> [<span style="font-weight: bold"><span style="color: #000000">module</span></span>()],
- <span style="color: #0000FF">request_timeout</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">timeout</span></span>(),
- <span style="color: #000080">shutdown</span><span style="color: #009900">_timeout</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">timeout</span></span>(),
- <span style="color: #0000FF">stream_handlers</span> <span style="color: #990000">=&gt;</span> [<span style="font-weight: bold"><span style="color: #000000">module</span></span>()]
-}</tt></pre></div></div>
-<div class="paragraph"><p>Configuration for the HTTP/1.1 protocol.</p></div>
-<div class="paragraph"><p>This configuration is passed to Cowboy when starting listeners
-using <code>cowboy:start_clear/3</code> or <code>cowboy:start_tls/3</code> functions.</p></div>
-<div class="paragraph"><p>It can be updated without restarting listeners using the
-Ranch functions <code>ranch:get_protocol_options/1</code> and
-<code>ranch:set_protocol_options/2</code>.</p></div>
-<div class="paragraph"><p>The default value is given next to the option name:</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-connection_type (supervisor)
-</dt>
-<dd>
-<p>
- Whether the connection process also acts as a supervisor.
-</p>
+<pre><tt><b><font color="#000000">opts</font></b>() <font color="#990000">::</font> #{
+ <font color="#0000FF">connection_type</font> <font color="#990000">=&gt;</font> <font color="#FF6600">worker</font> | <font color="#FF6600">supervisor</font>,
+ <font color="#0000FF">env</font> <font color="#990000">=&gt;</font> <b><font color="#000000">cowboy_middleware:env</font></b>(),
+ <font color="#0000FF">idle_timeout</font> <font color="#990000">=&gt;</font> <b><font color="#000000">timeout</font></b>(),
+ <font color="#0000FF">inactivity_timeout</font> <font color="#990000">=&gt;</font> <b><font color="#000000">timeout</font></b>(),
+ <font color="#0000FF">max_empty_lines</font> <font color="#990000">=&gt;</font> <b><font color="#000000">non_neg_integer</font></b>(),
+ <font color="#0000FF">max_header_name_length</font> <font color="#990000">=&gt;</font> <b><font color="#000000">non_neg_integer</font></b>(),
+ <font color="#0000FF">max_header_value_length</font> <font color="#990000">=&gt;</font> <b><font color="#000000">non_neg_integer</font></b>(),
+ <font color="#0000FF">max_headers</font> <font color="#990000">=&gt;</font> <b><font color="#000000">non_neg_integer</font></b>(),
+ <font color="#0000FF">max_keepalive</font> <font color="#990000">=&gt;</font> <b><font color="#000000">non_neg_integer</font></b>(),
+ <font color="#0000FF">max_method_length</font> <font color="#990000">=&gt;</font> <b><font color="#000000">non_neg_integer</font></b>(),
+ <font color="#0000FF">max_request_line_length</font> <font color="#990000">=&gt;</font> <b><font color="#000000">non_neg_integer</font></b>(),
+ <font color="#0000FF">middlewares</font> <font color="#990000">=&gt;</font> [<b><font color="#000000">module</font></b>()],
+ <font color="#0000FF">request_timeout</font> <font color="#990000">=&gt;</font> <b><font color="#000000">timeout</font></b>(),
+ <font color="#000080">shutdown</font><font color="#009900">_timeout</font> <font color="#990000">=&gt;</font> <b><font color="#000000">timeout</font></b>(),
+ <font color="#0000FF">stream_handlers</font> <font color="#990000">=&gt;</font> [<b><font color="#000000">module</font></b>()]
+}</tt></pre>
+</div></div>
+<p>Configuration for the HTTP/1.1 protocol.</p>
+<p>This configuration is passed to Cowboy when starting listeners using <code>cowboy:start_clear/3</code> or <code>cowboy:start_tls/3</code> functions.</p>
+<p>It can be updated without restarting listeners using the Ranch functions <code>ranch:get_protocol_options/1</code> and <code>ranch:set_protocol_options/2</code>.</p>
+<p>The default value is given next to the option name:</p>
+<dl><dt>connection_type (supervisor)</dt>
+<dd><p>Whether the connection process also acts as a supervisor.</p>
</dd>
-<dt class="hdlist1">
-env (#{})
-</dt>
-<dd>
-<p>
- Middleware environment.
-</p>
+<dt>env (#{})</dt>
+<dd><p>Middleware environment.</p>
</dd>
-<dt class="hdlist1">
-idle_timeout (60000)
-</dt>
-<dd>
-<p>
- Time in ms with no data received before Cowboy closes the connection.
-</p>
+<dt>idle_timeout (60000)</dt>
+<dd><p>Time in ms with no data received before Cowboy closes the connection.</p>
</dd>
-<dt class="hdlist1">
-inactivity_timeout (300000)
-</dt>
-<dd>
-<p>
- Time in ms with nothing received at all before Cowboy closes the connection.
-</p>
+<dt>inactivity_timeout (300000)</dt>
+<dd><p>Time in ms with nothing received at all before Cowboy closes the connection.</p>
</dd>
-<dt class="hdlist1">
-max_empty_lines (5)
-</dt>
-<dd>
-<p>
- Maximum number of empty lines before a request.
-</p>
+<dt>max_empty_lines (5)</dt>
+<dd><p>Maximum number of empty lines before a request.</p>
</dd>
-<dt class="hdlist1">
-max_header_name_length (64)
-</dt>
-<dd>
-<p>
- Maximum length of header names.
-</p>
+<dt>max_header_name_length (64)</dt>
+<dd><p>Maximum length of header names.</p>
</dd>
-<dt class="hdlist1">
-max_header_value_length (4096)
-</dt>
-<dd>
-<p>
- Maximum length of header values.
-</p>
+<dt>max_header_value_length (4096)</dt>
+<dd><p>Maximum length of header values.</p>
</dd>
-<dt class="hdlist1">
-max_headers (100)
-</dt>
-<dd>
-<p>
- Maximum number of headers allowed per request.
-</p>
+<dt>max_headers (100)</dt>
+<dd><p>Maximum number of headers allowed per request.</p>
</dd>
-<dt class="hdlist1">
-max_keepalive (100)
-</dt>
-<dd>
-<p>
- Maximum number of requests allowed per connection.
-</p>
+<dt>max_keepalive (100)</dt>
+<dd><p>Maximum number of requests allowed per connection.</p>
</dd>
-<dt class="hdlist1">
-max_method_length (32)
-</dt>
-<dd>
-<p>
- Maximum length of the method.
-</p>
+<dt>max_method_length (32)</dt>
+<dd><p>Maximum length of the method.</p>
</dd>
-<dt class="hdlist1">
-max_request_line_length (8000)
-</dt>
-<dd>
-<p>
- Maximum length of the request line.
-</p>
+<dt>max_request_line_length (8000)</dt>
+<dd><p>Maximum length of the request line.</p>
</dd>
-<dt class="hdlist1">
-middlewares ([cowboy_router, cowboy_handler])
-</dt>
-<dd>
-<p>
- Middlewares to run for every request.
-</p>
+<dt>middlewares ([cowboy_router, cowboy_handler])</dt>
+<dd><p>Middlewares to run for every request.</p>
</dd>
-<dt class="hdlist1">
-request_timeout (5000)
-</dt>
-<dd>
-<p>
- Time in ms with no requests before Cowboy closes the connection.
-</p>
+<dt>request_timeout (5000)</dt>
+<dd><p>Time in ms with no requests before Cowboy closes the connection.</p>
</dd>
-<dt class="hdlist1">
-shutdown_timeout (5000)
-</dt>
-<dd>
-<p>
- Time in ms Cowboy will wait for child processes to shut down before killing them.
-</p>
+<dt>shutdown_timeout (5000)</dt>
+<dd><p>Time in ms Cowboy will wait for child processes to shut down before killing them.</p>
</dd>
-<dt class="hdlist1">
-stream_handlers ([cowboy_stream_h])
-</dt>
-<dd>
-<p>
- Ordered list of stream handlers that will handle all stream events.
-</p>
+<dt>stream_handlers ([cowboy_stream_h])</dt>
+<dd><p>Ordered list of stream handlers that will handle all stream events.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: The <code>timeout</code> option was renamed <code>request_timeout</code>.
-</p>
+<ul><li><strong>2.0</strong>: The <code>timeout</code> option was renamed <code>request_timeout</code>.
</li>
-<li>
-<p>
-<strong>2.0</strong>: The <code>idle_timeout</code>, <code>inactivity_timeout</code> and <code>shutdown_timeout</code> options were added.
-</p>
+<li><strong>2.0</strong>: The <code>idle_timeout</code>, <code>inactivity_timeout</code> and <code>shutdown_timeout</code> options were added.
</li>
-<li>
-<p>
-<strong>2.0</strong>: The <code>max_method_length</code> option was added.
-</p>
+<li><strong>2.0</strong>: The <code>max_method_length</code> option was added.
</li>
-<li>
-<p>
-<strong>2.0</strong>: The <code>max_request_line_length</code> default was increased from 4096 to 8000.
-</p>
+<li><strong>2.0</strong>: The <code>max_request_line_length</code> default was increased from 4096 to 8000.
</li>
-<li>
-<p>
-<strong>2.0</strong>: The <code>connection_type</code> option was added.
-</p>
+<li><strong>2.0</strong>: The <code>connection_type</code> option was added.
</li>
-<li>
-<p>
-<strong>2.0</strong>: The <code>env</code> option is now a map instead of a proplist.
-</p>
+<li><strong>2.0</strong>: The <code>env</code> option is now a map instead of a proplist.
</li>
-<li>
-<p>
-<strong>2.0</strong>: The <code>stream_handlers</code> option was added.
-</p>
+<li><strong>2.0</strong>: The <code>stream_handlers</code> option was added.
</li>
-<li>
-<p>
-<strong>2.0</strong>: The <code>compress</code> option was removed in favor of the <code>cowboy_compress_h</code> stream handler.
-</p>
+<li><strong>2.0</strong>: The <code>compress</code> option was removed in favor of the <code>cowboy_compress_h</code> stream handler.
</li>
-<li>
-<p>
-<strong>2.0</strong>: Options are now a map instead of a proplist.
-</p>
+<li><strong>2.0</strong>: Options are now a map instead of a proplist.
</li>
-<li>
-<p>
-<strong>2.0</strong>: Protocol introduced. Replaces <code>cowboy_protocol</code>.
-</p>
+<li><strong>2.0</strong>: Protocol introduced. Replaces <code>cowboy_protocol</code>.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="..">cowboy(7)</a>,
-<a href="../cowboy_http2">cowboy_http2(3)</a>,
-<a href="../cowboy_websocket">cowboy_websocket(3)</a></p></div>
-</div>
-</div>
+<p><a href="..">cowboy(7)</a>, <a href="../cowboy_http2">cowboy_http2(3)</a>, <a href="../cowboy_websocket">cowboy_websocket(3)</a></p>
+
diff --git a/docs/en/cowboy/2.0/manual/cowboy_http2/index.html b/docs/en/cowboy/2.0/manual/cowboy_http2/index.html
index 89262ad6..041074f5 100644
--- a/docs/en/cowboy/2.0/manual/cowboy_http2/index.html
+++ b/docs/en/cowboy/2.0/manual/cowboy_http2/index.html
@@ -62,123 +62,60 @@
<h1 class="lined-header"><span>cowboy_http2(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_http2 - HTTP/2</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_http2 - HTTP/2</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The module <code>cowboy_http2</code> implements HTTP/2
-as a Ranch protocol.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The module <code>cowboy_http2</code> implements HTTP/2 as a Ranch protocol.</p>
<h2 id="_options">Options</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<!-- @todo Might be worth moving cowboy_clear/tls/stream_h options-->
+<!-- to their respective manual, when they are added.-->
+<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">opts</span></span>() <span style="color: #990000">::</span> #{
- <span style="color: #0000FF">connection_type</span> <span style="color: #990000">=&gt;</span> <span style="color: #FF6600">worker</span> | <span style="color: #FF6600">supervisor</span>,
- <span style="color: #0000FF">env</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_middleware:env</span></span>(),
- <span style="color: #0000FF">inactivity_timeout</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">timeout</span></span>(),
- <span style="color: #0000FF">middlewares</span> <span style="color: #990000">=&gt;</span> [<span style="font-weight: bold"><span style="color: #000000">module</span></span>()],
- <span style="color: #0000FF">preface_timeout</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">timeout</span></span>(),
- <span style="color: #000080">shutdown</span><span style="color: #009900">_timeout</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">timeout</span></span>(),
- <span style="color: #0000FF">stream_handlers</span> <span style="color: #990000">=&gt;</span> [<span style="font-weight: bold"><span style="color: #000000">module</span></span>()]
-}</tt></pre></div></div>
-<div class="paragraph"><p>Configuration for the HTTP/2 protocol.</p></div>
-<div class="paragraph"><p>This configuration is passed to Cowboy when starting listeners
-using <code>cowboy:start_clear/3</code> or <code>cowboy:start_tls/3</code> functions.</p></div>
-<div class="paragraph"><p>It can be updated without restarting listeners using the
-Ranch functions <code>ranch:get_protocol_options/1</code> and
-<code>ranch:set_protocol_options/2</code>.</p></div>
-<div class="paragraph"><p>The default value is given next to the option name:</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-connection_type (supervisor)
-</dt>
-<dd>
-<p>
- Whether the connection process also acts as a supervisor.
-</p>
+<pre><tt><b><font color="#000000">opts</font></b>() <font color="#990000">::</font> #{
+ <font color="#0000FF">connection_type</font> <font color="#990000">=&gt;</font> <font color="#FF6600">worker</font> | <font color="#FF6600">supervisor</font>,
+ <font color="#0000FF">env</font> <font color="#990000">=&gt;</font> <b><font color="#000000">cowboy_middleware:env</font></b>(),
+ <font color="#0000FF">inactivity_timeout</font> <font color="#990000">=&gt;</font> <b><font color="#000000">timeout</font></b>(),
+ <font color="#0000FF">middlewares</font> <font color="#990000">=&gt;</font> [<b><font color="#000000">module</font></b>()],
+ <font color="#0000FF">preface_timeout</font> <font color="#990000">=&gt;</font> <b><font color="#000000">timeout</font></b>(),
+ <font color="#000080">shutdown</font><font color="#009900">_timeout</font> <font color="#990000">=&gt;</font> <b><font color="#000000">timeout</font></b>(),
+ <font color="#0000FF">stream_handlers</font> <font color="#990000">=&gt;</font> [<b><font color="#000000">module</font></b>()]
+}</tt></pre>
+</div></div>
+<p>Configuration for the HTTP/2 protocol.</p>
+<p>This configuration is passed to Cowboy when starting listeners using <code>cowboy:start_clear/3</code> or <code>cowboy:start_tls/3</code> functions.</p>
+<p>It can be updated without restarting listeners using the Ranch functions <code>ranch:get_protocol_options/1</code> and <code>ranch:set_protocol_options/2</code>.</p>
+<p>The default value is given next to the option name:</p>
+<dl><dt>connection_type (supervisor)</dt>
+<dd><p>Whether the connection process also acts as a supervisor.</p>
</dd>
-<dt class="hdlist1">
-env (#{})
-</dt>
-<dd>
-<p>
- Middleware environment.
-</p>
+<dt>env (#{})</dt>
+<dd><p>Middleware environment.</p>
</dd>
-<dt class="hdlist1">
-inactivity_timeout (300000)
-</dt>
-<dd>
-<p>
- Time in ms with nothing received at all before Cowboy closes the connection.
-</p>
+<dt>inactivity_timeout (300000)</dt>
+<dd><p>Time in ms with nothing received at all before Cowboy closes the connection.</p>
</dd>
-<dt class="hdlist1">
-middlewares ([cowboy_router, cowboy_handler])
-</dt>
-<dd>
-<p>
- Middlewares to run for every request.
-</p>
+<dt>middlewares ([cowboy_router, cowboy_handler])</dt>
+<dd><p>Middlewares to run for every request.</p>
</dd>
-<dt class="hdlist1">
-preface_timeout (5000)
-</dt>
-<dd>
-<p>
- Time in ms Cowboy is willing to wait for the connection preface.
-</p>
+<dt>preface_timeout (5000)</dt>
+<dd><p>Time in ms Cowboy is willing to wait for the connection preface.</p>
</dd>
-<dt class="hdlist1">
-shutdown_timeout (5000)
-</dt>
-<dd>
-<p>
- Time in ms Cowboy will wait for child processes to shut down before killing them.
-</p>
+<dt>shutdown_timeout (5000)</dt>
+<dd><p>Time in ms Cowboy will wait for child processes to shut down before killing them.</p>
</dd>
-<dt class="hdlist1">
-stream_handlers ([cowboy_stream_h])
-</dt>
-<dd>
-<p>
- Ordered list of stream handlers that will handle all stream events.
-</p>
+<dt>stream_handlers ([cowboy_stream_h])</dt>
+<dd><p>Ordered list of stream handlers that will handle all stream events.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Protocol introduced.
-</p>
+<ul><li><strong>2.0</strong>: Protocol introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="..">cowboy(7)</a>,
-<a href="../cowboy_http">cowboy_http(3)</a>,
-<a href="../cowboy_websocket">cowboy_websocket(3)</a></p></div>
-</div>
-</div>
+<p><a href="..">cowboy(7)</a>, <a href="../cowboy_http">cowboy_http(3)</a>, <a href="../cowboy_websocket">cowboy_websocket(3)</a></p>
+
diff --git a/docs/en/cowboy/2.0/manual/cowboy_loop/index.html b/docs/en/cowboy/2.0/manual/cowboy_loop/index.html
index 3bf8477c..c9f639be 100644
--- a/docs/en/cowboy/2.0/manual/cowboy_loop/index.html
+++ b/docs/en/cowboy/2.0/manual/cowboy_loop/index.html
@@ -62,120 +62,60 @@
<h1 class="lined-header"><span>cowboy_loop(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_loop - Loop handlers</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_loop - Loop handlers</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The module <code>cowboy_loop</code> defines a callback interface for
-long running HTTP connections.</p></div>
-<div class="paragraph"><p>You should switch to this behavior for long polling,
-server-sent events and similar long-running requests.</p></div>
-<div class="paragraph"><p>There are generally two usage patterns:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-Loop until receiving a specific message, then send
- a response and stop execution (for example long polling);
-</p>
+<p>The module <code>cowboy_loop</code> defines a callback interface for long running HTTP connections.</p>
+<p>You should switch to this behavior for long polling, server-sent events and similar long-running requests.</p>
+<p>There are generally two usage patterns:</p>
+<ul><li>Loop until receiving a specific message, then send a response and stop execution (for example long polling);
</li>
-<li>
-<p>
-Or initiate a response in <code>init/2</code> and stream the
- body in <code>info/3</code> as necessary (for example server-sent events).
-</p>
+<li>Or initiate a response in <code>init/2</code> and stream the body in <code>info/3</code> as necessary (for example server-sent events).
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_callbacks">Callbacks</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Loop handlers implement the following interface:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Loop handlers implement the following interface:</p>
+<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">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_loop</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
- | {<span style="color: #FF6600">cowboy_loop</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>, <span style="color: #FF6600">hibernate</span>}
-
-<span style="font-weight: bold"><span style="color: #000000">info</span></span>(<span style="color: #009900">Info</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>)
- <span style="color: #990000">-&gt;</span> {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
- | {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>, <span style="color: #FF6600">hibernate</span>}
- | {<span style="color: #FF6600">stop</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
-
-<span style="font-weight: bold"><span style="color: #000000">terminate</span></span>(<span style="color: #009900">Reason</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> <span style="color: #FF6600">ok</span> <span style="font-style: italic"><span style="color: #9A1900">%% optional</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">State</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()
-<span style="color: #009900">Info</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()
-<span style="color: #009900">Reason</span> <span style="color: #990000">::</span> <span style="color: #FF6600">stop</span>
- | {<span style="color: #FF6600">crash</span>, <span style="color: #FF6600">error</span> | <span style="font-weight: bold"><span style="color: #000080">exit</span></span> | <span style="font-weight: bold"><span style="color: #000080">throw</span></span>, <span style="font-weight: bold"><span style="color: #000000">any</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>The <code>init/2</code> callback is common to all handlers. To switch
-to the loop behavior, it must return <code>cowboy_loop</code> as the
-first element of the tuple.</p></div>
-<div class="paragraph"><p>The <code>info/3</code> callback will be called for every Erlang message
-received. It may choose to continue the receive loop or stop
-it.</p></div>
-<div class="paragraph"><p>The optional <code>terminate/3</code> callback will ultimately be called
-with the reason for the termination of the handler.
-Cowboy will terminate the process right after this. There
-is no need to perform any cleanup in this callback.</p></div>
-<div class="paragraph"><p>The following terminate reasons are defined for loop handlers:</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-stop
-</dt>
-<dd>
-<p>
- The handler requested to close the connection by returning
- a <code>stop</code> tuple.
-</p>
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>)
+ <font color="#990000">-&gt;</font> {<font color="#FF6600">cowboy_loop</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
+ | {<font color="#FF6600">cowboy_loop</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>, <font color="#FF6600">hibernate</font>}
+
+<b><font color="#000000">info</font></b>(<font color="#009900">Info</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>)
+ <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
+ | {<font color="#FF6600">ok</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>, <font color="#FF6600">hibernate</font>}
+ | {<font color="#FF6600">stop</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
+
+<b><font color="#000000">terminate</font></b>(<font color="#009900">Reason</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> <font color="#FF6600">ok</font> <i><font color="#9A1900">%% optional</font></i>
+
+<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()
+<font color="#009900">State</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()
+<font color="#009900">Info</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()
+<font color="#009900">Reason</font> <font color="#990000">::</font> <font color="#FF6600">stop</font>
+ | {<font color="#FF6600">crash</font>, <font color="#FF6600">error</font> | <b><font color="#000080">exit</font></b> | <b><font color="#000080">throw</font></b>, <b><font color="#000000">any</font></b>()}</tt></pre>
+</div></div>
+<p>The <code>init/2</code> callback is common to all handlers. To switch to the loop behavior, it must return <code>cowboy_loop</code> as the first element of the tuple.</p>
+<p>The <code>info/3</code> callback will be called for every Erlang message received. It may choose to continue the receive loop or stop it.</p>
+<p>The optional <code>terminate/3</code> callback will ultimately be called with the reason for the termination of the handler. Cowboy will terminate the process right after this. There is no need to perform any cleanup in this callback.</p>
+<p>The following terminate reasons are defined for loop handlers:</p>
+<dl><dt>stop</dt>
+<dd><p>The handler requested to close the connection by returning a <code>stop</code> tuple.</p>
</dd>
-<dt class="hdlist1">
-{crash, Class, Reason}
-</dt>
-<dd>
-<p>
- A crash occurred in the handler. <code>Class</code> and <code>Reason</code> can be
- used to obtain more information about the crash. The function
- <code>erlang:get_stacktrace/0</code> can also be called to obtain the
- stacktrace of the process when the crash occurred.
-</p>
+<dt>{crash, Class, Reason}</dt>
+<dd><p>A crash occurred in the handler. <code>Class</code> and <code>Reason</code> can be used to obtain more information about the crash. The function <code>erlang:get_stacktrace/0</code> can also be called to obtain the stacktrace of the process when the crash occurred.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Loop handlers no longer need to handle overflow/timeouts.
-</p>
+<ul><li><strong>2.0</strong>: Loop handlers no longer need to handle overflow/timeouts.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Behavior introduced.
-</p>
+<li><strong>1.0</strong>: Behavior introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="..">cowboy(7)</a>,
-<a href="../cowboy_handler">cowboy_handler(3)</a></p></div>
-</div>
-</div>
+<p><a href="..">cowboy(7)</a>, <a href="../cowboy_handler">cowboy_handler(3)</a></p>
+
diff --git a/docs/en/cowboy/2.0/manual/cowboy_middleware/index.html b/docs/en/cowboy/2.0/manual/cowboy_middleware/index.html
index aa7ffb0f..256644be 100644
--- a/docs/en/cowboy/2.0/manual/cowboy_middleware/index.html
+++ b/docs/en/cowboy/2.0/manual/cowboy_middleware/index.html
@@ -62,115 +62,56 @@
<h1 class="lined-header"><span>cowboy_middleware(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_middleware - Middlewares</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_middleware - Middlewares</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The module <code>cowboy_middleware</code> defines a callback interface for
-Cowboy middlewares.</p></div>
-<div class="paragraph"><p>Middlewares process the request sequentially in the order they
-are configured.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The module <code>cowboy_middleware</code> defines a callback interface for Cowboy middlewares.</p>
+<p>Middlewares process the request sequentially in the order they are configured.</p>
<h2 id="_callbacks">Callbacks</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Middlewares implement the following interface:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Middlewares implement the following interface:</p>
+<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">execute</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">Env</span>)
- <span style="color: #990000">-&gt;</span> {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">Env</span>}
- | {<span style="color: #FF6600">suspend</span>, <span style="font-weight: bold"><span style="color: #000000">module</span></span>(), <span style="font-weight: bold"><span style="color: #000080">atom</span></span>(), [<span style="font-weight: bold"><span style="color: #000000">any</span></span>()]}
- | {<span style="color: #FF6600">stop</span>, <span style="color: #009900">Req</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">Env</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_middleware:env</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>The <code>execute/2</code> is the only callback that needs to be
-implemented. It must execute the middleware and return
-with instructions for Cowboy.</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-ok
-</dt>
-<dd>
-<p>
-Cowboy should continue processing the request using the
-returned Req object and environment.
-</p>
+<pre><tt><b><font color="#000000">execute</font></b>(<font color="#009900">Req</font>, <font color="#009900">Env</font>)
+ <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <font color="#009900">Req</font>, <font color="#009900">Env</font>}
+ | {<font color="#FF6600">suspend</font>, <b><font color="#000000">module</font></b>(), <b><font color="#000080">atom</font></b>(), [<b><font color="#000000">any</font></b>()]}
+ | {<font color="#FF6600">stop</font>, <font color="#009900">Req</font>}
+
+<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()
+<font color="#009900">Env</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_middleware:env</font></b>()</tt></pre>
+</div></div>
+<p>The <code>execute/2</code> is the only callback that needs to be implemented. It must execute the middleware and return with instructions for Cowboy.</p>
+<dl><dt>ok</dt>
+<dd><p>Cowboy should continue processing the request using the returned Req object and environment.</p>
</dd>
-<dt class="hdlist1">
-suspend
-</dt>
-<dd>
-<p>
-Cowboy will hibernate the process. When resuming, Cowboy
-will apply the returned module, function and arguments.
-</p>
+<dt>suspend</dt>
+<dd><p>Cowboy will hibernate the process. When resuming, Cowboy will apply the returned module, function and arguments.</p>
</dd>
-<dt class="hdlist1">
-stop
-</dt>
-<dd>
-<p>
-Cowboy will stop middleware execution. No other middleware
-will be executed. This effectively ends the processing of
-the request.
-</p>
+<dt>stop</dt>
+<dd><p>Cowboy will stop middleware execution. No other middleware will be executed. This effectively ends the processing of the request.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_types">Types</h2>
-<div class="sectionbody">
-<div class="sect2">
<h3 id="_env">env()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">env</span></span>() <span style="color: #990000">::</span> #{<span style="font-weight: bold"><span style="color: #000080">atom</span></span>() <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>Middleware environment.</p></div>
-<div class="paragraph"><p>A new environment is created for every request. The initial
-environment contained the user configured environment values
-(like <code>dispatch</code> for example) plus the <code>listener</code> value which
-contains the name of the listener for this connection.</p></div>
-<div class="paragraph"><p>Middlewares may modify the environment as necessary.</p></div>
-</div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">env</font></b>() <font color="#990000">::</font> #{<b><font color="#000080">atom</font></b>() <font color="#990000">=&gt;</font> <b><font color="#000000">any</font></b>()}</tt></pre>
+</div></div>
+<p>Middleware environment.</p>
+<p>A new environment is created for every request. The initial environment contained the user configured environment values (like <code>dispatch</code> for example) plus the <code>listener</code> value which contains the name of the listener for this connection.</p>
+<p>Middlewares may modify the environment as necessary.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: The <code>env</code> type is now a map instead of a proplist.
-</p>
+<ul><li><strong>2.0</strong>: The <code>env</code> type is now a map instead of a proplist.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Behavior introduced.
-</p>
+<li><strong>1.0</strong>: Behavior introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="..">cowboy(7)</a></p></div>
-</div>
-</div>
+<p><a href="..">cowboy(7)</a></p>
+
diff --git a/docs/en/cowboy/2.0/manual/cowboy_req.binding/index.html b/docs/en/cowboy/2.0/manual/cowboy_req.binding/index.html
index ae3d37dc..d5a4b18e 100644
--- a/docs/en/cowboy/2.0/manual/cowboy_req.binding/index.html
+++ b/docs/en/cowboy/2.0/manual/cowboy_req.binding/index.html
@@ -62,116 +62,60 @@
<h1 class="lined-header"><span>cowboy_req:binding(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:binding - Access a value bound from the route</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:binding - Access a value bound from the route</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">binding</span></span>(<span style="color: #009900">Name</span>, <span style="color: #009900">Req</span>) <span style="color: #990000">-&gt;</span> <span style="font-weight: bold"><span style="color: #000000">binding</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">binding</span></span>(<span style="color: #009900">Name</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: #000000">any</span></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">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">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>Return the value for the given binding.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">binding</font></b>(<font color="#009900">Name</font>, <font color="#009900">Req</font>) <font color="#990000">-&gt;</font> <b><font color="#000000">binding</font></b>(<font color="#009900">Name</font>, <font color="#009900">Req</font>, <font color="#000080">undefined</font>)
+<b><font color="#000000">binding</font></b>(<font color="#009900">Name</font>, <font color="#009900">Req</font>, <font color="#009900">Default</font>) <font color="#990000">-&gt;</font> <b><font color="#000000">any</font></b>() | <font color="#009900">Default</font>
+
+<font color="#009900">Name</font> <font color="#990000">::</font> <b><font color="#000080">atom</font></b>()
+<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()</tt></pre>
+</div></div>
+<p>Return the value for the given binding.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Name
-</dt>
-<dd>
-<p>
-Desired binding name as an atom.
-</p>
+<dl><dt>Name</dt>
+<dd><p>Desired binding name as an atom.</p>
</dd>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-<dt class="hdlist1">
-Default
-</dt>
-<dd>
-<p>
-Default value returned when the binding is missing.
-</p>
+<dt>Default</dt>
+<dd><p>Default value returned when the binding is missing.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>By default the value is a case sensitive binary string, however
-constraints may change the type of this value (for example
-automatically converting numbers to integer).</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>By default the value is a case sensitive binary string, however constraints may change the type of this value (for example automatically converting numbers to integer).</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Only the value is returned, it is no longer wrapped in a tuple.
-</p>
+<ul><li><strong>2.0</strong>: Only the value is returned, it is no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Get the username from the path</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Get the username from the 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="font-style: italic"><span style="color: #9A1900">%% Route is "/users/:user"</span></span>
-<span style="color: #009900">Username</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:binding</span></span>(<span style="color: #FF6600">user</span>, <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Get the branch name, with a default</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><i><font color="#9A1900">%% Route is "/users/:user"</font></i>
+<font color="#009900">Username</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:binding</font></b>(<font color="#FF6600">user</font>, <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Get the branch name, with a default</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">%% Route is "/log[/:branch]"</span></span>
-<span style="color: #009900">Branch</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:binding</span></span>(<span style="color: #FF6600">branch</span>, <span style="color: #009900">Req</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"master"</span><span style="color: #990000">&gt;&gt;</span>)</tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><i><font color="#9A1900">%% Route is "/log[/:branch]"</font></i>
+<font color="#009900">Branch</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:binding</font></b>(<font color="#FF6600">branch</font>, <font color="#009900">Req</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"master"</font><font color="#990000">&gt;&gt;</font>)</tt></pre>
+</div></div>
<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.bindings">cowboy_req:bindings(3)</a>,
-<a href="../cowboy_req.host_info">cowboy_req:host_info(3)</a>,
-<a href="../cowboy_req.path_info">cowboy_req:path_info(3)</a>,
-<a href="../cowboy_router">cowboy_router(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.bindings">cowboy_req:bindings(3)</a>, <a href="../cowboy_req.host_info">cowboy_req:host_info(3)</a>, <a href="../cowboy_req.path_info">cowboy_req:path_info(3)</a>, <a href="../cowboy_router">cowboy_router(3)</a></p>
+
diff --git a/docs/en/cowboy/2.0/manual/cowboy_req.bindings/index.html b/docs/en/cowboy/2.0/manual/cowboy_req.bindings/index.html
index 314ddd5c..f1c68012 100644
--- a/docs/en/cowboy/2.0/manual/cowboy_req.bindings/index.html
+++ b/docs/en/cowboy/2.0/manual/cowboy_req.bindings/index.html
@@ -62,86 +62,40 @@
<h1 class="lined-header"><span>cowboy_req:bindings(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:bindings - Access all values bound from the route</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:bindings - Access all values bound from the route</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">bindings</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_router:bindings</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Return a map containing all bindings.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">bindings</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <b><font color="#000000">cowboy_router:bindings</font></b>()</tt></pre>
+</div></div>
+<p>Return a map containing all bindings.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>By default values are case sensitive binary strings, however
-constraints may change the type of this value (for example
-automatically converting numbers to integer).</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>By default values are case sensitive binary strings, however constraints may change the type of this value (for example automatically converting numbers to integer).</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Only the values are returned, they are no longer wrapped in a tuple.
-</p>
+<ul><li><strong>2.0</strong>: Only the values are returned, they are no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Get all bindings</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Get all bindings</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">Bindings</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:bindings</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Bindings</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:bindings</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.host_info">cowboy_req:host_info(3)</a>,
-<a href="../cowboy_req.path_info">cowboy_req:path_info(3)</a>,
-<a href="../cowboy_router">cowboy_router(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.binding">cowboy_req:binding(3)</a>, <a href="../cowboy_req.host_info">cowboy_req:host_info(3)</a>, <a href="../cowboy_req.path_info">cowboy_req:path_info(3)</a>, <a href="../cowboy_router">cowboy_router(3)</a></p>
+
diff --git a/docs/en/cowboy/2.0/manual/cowboy_req.body_length/index.html b/docs/en/cowboy/2.0/manual/cowboy_req.body_length/index.html
index a882ba8f..348b51dd 100644
--- a/docs/en/cowboy/2.0/manual/cowboy_req.body_length/index.html
+++ b/docs/en/cowboy/2.0/manual/cowboy_req.body_length/index.html
@@ -62,89 +62,41 @@
<h1 class="lined-header"><span>cowboy_req:body_length(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:body_length - Body length</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:body_length - Body length</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">body_length</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: #000080">undefined</span> | <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Return the length of the request body.</p></div>
-<div class="paragraph"><p>The length is not always known before reading the body.
-In those cases Cowboy will return <code>undefined</code>. The body
-length is available after the body has been fully read.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">body_length</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <font color="#000080">undefined</font> | <b><font color="#000000">non_neg_integer</font></b>()</tt></pre>
+</div></div>
+<p>Return the length of the request body.</p>
+<p>The length is not always known before reading the body. In those cases Cowboy will return <code>undefined</code>. The body length is available after the body has been fully read.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The length of the request body, or <code>undefined</code> if it is
-not known.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The length of the request body, or <code>undefined</code> if it is not known.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Only the length is returned, it is no longer wrapped in a tuple.
-</p>
+<ul><li><strong>2.0</strong>: Only the length is returned, it is no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Get the body length</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Get the body length</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:body_length</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Length</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:body_length</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.has_body">cowboy_req:has_body(3)</a>,
-<a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a>,
-<a href="../cowboy_req.read_urlencoded_body">cowboy_req:read_urlencoded_body(3)</a>,
-<a href="../cowboy_req.read_part">cowboy_req:read_part(3)</a>,
-<a href="../cowboy_req.read_part_body">cowboy_req:read_part_body(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.has_body">cowboy_req:has_body(3)</a>, <a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a>, <a href="../cowboy_req.read_urlencoded_body">cowboy_req:read_urlencoded_body(3)</a>, <a href="../cowboy_req.read_part">cowboy_req:read_part(3)</a>, <a href="../cowboy_req.read_part_body">cowboy_req:read_part_body(3)</a></p>
+
diff --git a/docs/en/cowboy/2.0/manual/cowboy_req.delete_resp_header/index.html b/docs/en/cowboy/2.0/manual/cowboy_req.delete_resp_header/index.html
index 370e66b9..75fe7479 100644
--- a/docs/en/cowboy/2.0/manual/cowboy_req.delete_resp_header/index.html
+++ b/docs/en/cowboy/2.0/manual/cowboy_req.delete_resp_header/index.html
@@ -62,95 +62,45 @@
<h1 class="lined-header"><span>cowboy_req:delete_resp_header(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:delete_resp_header - Delete a response header</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:delete_resp_header - Delete a response header</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">delete_resp_header</span></span>(<span style="color: #009900">Name</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">Req</span>
+<pre><tt><b><font color="#000000">delete_resp_header</font></b>(<font color="#009900">Name</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <font color="#009900">Req</font>
-<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="font-style: italic"><span style="color: #9A1900">%% lowercase; case insensitive</span></span></tt></pre></div></div>
-<div class="paragraph"><p>Delete the given response 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>
-</div>
-<div class="sect1">
+<font color="#009900">Name</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% lowercase; case insensitive</font></i></tt></pre>
+</div></div>
+<p>Delete the given response header.</p>
+<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>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Name
-</dt>
-<dd>
-<p>
-Header name as a lowercase binary string.
-</p>
+<dl><dt>Name</dt>
+<dd><p>Header name as a lowercase binary string.</p>
</dd>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A new Req object is returned.</p></div>
-<div class="paragraph"><p>The returned Req object must be used from that point onward,
-otherwise the header will still be sent in the response.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>A new Req object is returned.</p>
+<p>The returned Req object must be used from that point onward, otherwise the header will still be sent in the response.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<ul><li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Remove the content-type header from the response</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Remove the content-type header from the response</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: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:delete_resp_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req0</span>),</tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:delete_resp_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req0</font>),</tt></pre>
+</div></div>
<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.set_resp_header">cowboy_req:set_resp_header(3)</a>,
-<a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a>,
-<a href="../cowboy_req.has_resp_header">cowboy_req:has_resp_header(3)</a>,
-<a href="../cowboy_req.resp_header">cowboy_req:resp_header(3)</a>,
-<a href="../cowboy_req.resp_headers">cowboy_req:resp_headers(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a>, <a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a>, <a href="../cowboy_req.has_resp_header">cowboy_req:has_resp_header(3)</a>, <a href="../cowboy_req.resp_header">cowboy_req:resp_header(3)</a>, <a href="../cowboy_req.resp_headers">cowboy_req:resp_headers(3)</a></p>
+
diff --git a/docs/en/cowboy/2.0/manual/cowboy_req.has_body/index.html b/docs/en/cowboy/2.0/manual/cowboy_req.has_body/index.html
index 31d28cd7..a8b0cf73 100644
--- a/docs/en/cowboy/2.0/manual/cowboy_req.has_body/index.html
+++ b/docs/en/cowboy/2.0/manual/cowboy_req.has_body/index.html
@@ -62,80 +62,38 @@
<h1 class="lined-header"><span>cowboy_req:has_body(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:has_body - Is there a request body?</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:has_body - Is there a request body?</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">has_body</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">boolean</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Return whether the request has a body.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">has_body</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <b><font color="#000000">boolean</font></b>()</tt></pre>
+</div></div>
+<p>Return whether the request has a body.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A boolean indicating whether the request has a body.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>A boolean indicating whether the request has a body.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<ul><li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Ensure the request has a body</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Ensure the request has a body</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: #000080">true</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:has_body</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#000080">true</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:has_body</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.body_length">cowboy_req:body_length(3)</a>,
-<a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a>,
-<a href="../cowboy_req.read_urlencoded_body">cowboy_req:read_urlencoded_body(3)</a>,
-<a href="../cowboy_req.read_part">cowboy_req:read_part(3)</a>,
-<a href="../cowboy_req.read_part_body">cowboy_req:read_part_body(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.body_length">cowboy_req:body_length(3)</a>, <a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a>, <a href="../cowboy_req.read_urlencoded_body">cowboy_req:read_urlencoded_body(3)</a>, <a href="../cowboy_req.read_part">cowboy_req:read_part(3)</a>, <a href="../cowboy_req.read_part_body">cowboy_req:read_part_body(3)</a></p>
+
diff --git a/docs/en/cowboy/2.0/manual/cowboy_req.has_resp_body/index.html b/docs/en/cowboy/2.0/manual/cowboy_req.has_resp_body/index.html
index 4629681d..361094ad 100644
--- a/docs/en/cowboy/2.0/manual/cowboy_req.has_resp_body/index.html
+++ b/docs/en/cowboy/2.0/manual/cowboy_req.has_resp_body/index.html
@@ -62,82 +62,43 @@
<h1 class="lined-header"><span>cowboy_req:has_resp_body(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:has_resp_body - Is there a response body?</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:has_resp_body - Is there a response body?</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">has_resp_body</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">boolean</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Return whether a response body has been set.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">has_resp_body</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <b><font color="#000000">boolean</font></b>()</tt></pre>
+</div></div>
+<p>Return whether a response body has been set.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A boolean indicating whether a response body has been set.</p></div>
-<div class="paragraph"><p>This function will return <code>false</code> when an empty response
-body has been set.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>A boolean indicating whether a response body has been set.</p>
+<p>This function will return <code>false</code> when an empty response body has been set.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<ul><li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Check whether a body has been set</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Check whether a body has been set</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: #000080">false</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:has_resp_body</span></span>(<span style="color: #009900">Req0</span>),
-<span style="color: #009900">Req1</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_body</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Hello!"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req0</span>),
-<span style="color: #000080">true</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:has_resp_body</span></span>(<span style="color: #009900">Req1</span>),
-<span style="color: #009900">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_body</span></span>(<span style="color: #990000">&lt;&lt;&gt;&gt;</span>, <span style="color: #009900">Req1</span>),
-<span style="color: #000080">false</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:has_resp_body</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#000080">false</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:has_resp_body</font></b>(<font color="#009900">Req0</font>),
+<font color="#009900">Req1</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_body</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"Hello!"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req0</font>),
+<font color="#000080">true</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:has_resp_body</font></b>(<font color="#009900">Req1</font>),
+<font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_body</font></b>(<font color="#990000">&lt;&lt;&gt;&gt;</font>, <font color="#009900">Req1</font>),
+<font color="#000080">false</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:has_resp_body</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.set_resp_body">cowboy_req:set_resp_body(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.set_resp_body">cowboy_req:set_resp_body(3)</a></p>
+
diff --git a/docs/en/cowboy/2.0/manual/cowboy_req.has_resp_header/index.html b/docs/en/cowboy/2.0/manual/cowboy_req.has_resp_header/index.html
index a060df4b..fb1176db 100644
--- a/docs/en/cowboy/2.0/manual/cowboy_req.has_resp_header/index.html
+++ b/docs/en/cowboy/2.0/manual/cowboy_req.has_resp_header/index.html
@@ -62,95 +62,46 @@
<h1 class="lined-header"><span>cowboy_req:has_resp_header(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:has_resp_header - Is the given response header set?</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:has_resp_header - Is the given response header set?</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">has_resp_header</span></span>(<span style="color: #009900">Name</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">boolean</span></span>()
+<pre><tt><b><font color="#000000">has_resp_header</font></b>(<font color="#009900">Name</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <b><font color="#000000">boolean</font></b>()
-<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="font-style: italic"><span style="color: #9A1900">%% lowercase; case insensitive</span></span></tt></pre></div></div>
-<div class="paragraph"><p>Return whether the given response header has been set.</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>
-</div>
-<div class="sect1">
+<font color="#009900">Name</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% lowercase; case insensitive</font></i></tt></pre>
+</div></div>
+<p>Return whether the given response header has been set.</p>
+<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>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Name
-</dt>
-<dd>
-<p>
-Header name as a lowercase binary string.
-</p>
+<dl><dt>Name</dt>
+<dd><p>Header name as a lowercase binary string.</p>
</dd>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A boolean indicating whether the given response header has been set.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>A boolean indicating whether the given response header has been set.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<ul><li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Check whether the content-type header has been set</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Check whether the content-type header has been set</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: #000080">false</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:has_resp_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req0</span>),
-<span style="color: #009900">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/html"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req0</span>),
-<span style="color: #000080">true</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:has_resp_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#000080">false</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:has_resp_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req0</font>),
+<font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/html"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req0</font>),
+<font color="#000080">true</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:has_resp_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.set_resp_header">cowboy_req:set_resp_header(3)</a>,
-<a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a>,
-<a href="../cowboy_req.resp_header">cowboy_req:resp_header(3)</a>,
-<a href="../cowboy_req.resp_headers">cowboy_req:resp_headers(3)</a>,
-<a href="../cowboy_req.delete_resp_header">cowboy_req:delete_resp_header(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a>, <a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a>, <a href="../cowboy_req.resp_header">cowboy_req:resp_header(3)</a>, <a href="../cowboy_req.resp_headers">cowboy_req:resp_headers(3)</a>, <a href="../cowboy_req.delete_resp_header">cowboy_req:delete_resp_header(3)</a></p>
+
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
index 3ebbe928..52baf836 100644
--- a/docs/en/cowboy/2.0/manual/cowboy_req.header/index.html
+++ b/docs/en/cowboy/2.0/manual/cowboy_req.header/index.html
@@ -62,122 +62,67 @@
<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">
+<p>cowboy_req:header - HTTP header</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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: #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: #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">Name</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: #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">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>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
+<pre><tt><b><font color="#000000">header</font></b>(<font color="#009900">Name</font>, <font color="#009900">Req</font>) <font color="#990000">-&gt;</font> <b><font color="#000000">header</font></b>(<font color="#009900">Name</font>, <font color="#009900">Req</font>, <font color="#000080">undefined</font>)
+<b><font color="#000000">header</font></b>(<font color="#009900">Name</font>, <font color="#009900">Req</font>, <font color="#009900">Default</font>) <font color="#990000">-&gt;</font> <b><font color="#000080">binary</font></b>() | <font color="#009900">Default</font>
+
+<font color="#009900">Name</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% lowercase; case insensitive</font></i>
+<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()</tt></pre>
+</div></div>
+<p>Return the value for the given HTTP header.</p>
+<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>
+<p>Headers can also be obtained using pattern matching:</p>
+<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">
+<pre><tt>#{<font color="#FF6600">headers</font> <font color="#990000">:=</font> #{<font color="#009900">Name</font> <font color="#990000">:=</font> <font color="#009900">Value</font>}} <font color="#990000">=</font> <font color="#009900">Req</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Note that this snippet will crash if the header is missing.</p>
<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 lowercase binary string.
-</p>
+<dl><dt>Name</dt>
+<dd><p>Desired HTTP header name as a lowercase binary string.</p>
</dd>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dt>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>
+<dt>Default</dt>
+<dd><p>Default value returned when the header is missing.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<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">
+<p>The header value is returned as a binary string. When the header is missing, the default argument is returned.</p>
<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>
+<ul><li><strong>2.0</strong>: Only the header value is returned, it is no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<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
+<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
+<pre><tt><font color="#009900">Accept</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"accept"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>)<font color="#990000">.</font></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">
+<pre><tt><font color="#009900">Length</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-length"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"0"</font><font color="#990000">&gt;&gt;</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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>
+<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>
+
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
index 869cc9c5..2dc6f2ab 100644
--- a/docs/en/cowboy/2.0/manual/cowboy_req.headers/index.html
+++ b/docs/en/cowboy/2.0/manual/cowboy_req.headers/index.html
@@ -62,90 +62,47 @@
<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">
+<p>cowboy_req:headers - HTTP headers</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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
+<pre><tt><b><font color="#000000">headers</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <b><font color="#000000">cowboy:http_headers</font></b>()</tt></pre>
+</div></div>
+<p>Return all request headers.</p>
+<p>Request headers can also be obtained using pattern matching:</p>
+<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">
+<pre><tt>#{<font color="#FF6600">headers</font> <font color="#990000">:=</font> <font color="#009900">Headers</font>} <font color="#990000">=</font> <font color="#009900">Req</font><font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<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">
+<p>Headers are returned as a map with keys being lowercase binary strings, and values as binary strings.</p>
<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>
+<ul><li><strong>2.0</strong>: Only the headers are returned, they are no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<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
+<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">
+<pre><tt><font color="#009900">Headers</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:headers</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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>
+<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>
+
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
index 2696c2fe..e7eea78c 100644
--- a/docs/en/cowboy/2.0/manual/cowboy_req.host/index.html
+++ b/docs/en/cowboy/2.0/manual/cowboy_req.host/index.html
@@ -62,91 +62,47 @@
<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">
+<p>cowboy_req:host - URI host name</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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
+<pre><tt><b><font color="#000000">host</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <font color="#009900">Host</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()</tt></pre>
+</div></div>
+<p>Return the host name of the effective request URI.</p>
+<p>The host name can also be obtained using pattern matching:</p>
+<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">
+<pre><tt>#{<font color="#FF6600">host</font> <font color="#990000">:=</font> <font color="#009900">Host</font>} <font color="#990000">=</font> <font color="#009900">Req</font><font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<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">
+<p>The host name is returned as a lowercase binary string. It is case insensitive.</p>
<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>
+<ul><li><strong>2.0</strong>: Only the host name is returned, it is no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<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
+<div class="listingblock"><div class="title">Get the effective request URI&apos;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">
+<pre><tt><font color="#009900">Host</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:host</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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>
+<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>
+
diff --git a/docs/en/cowboy/2.0/manual/cowboy_req.host_info/index.html b/docs/en/cowboy/2.0/manual/cowboy_req.host_info/index.html
index 91c20d52..7f02b1fe 100644
--- a/docs/en/cowboy/2.0/manual/cowboy_req.host_info/index.html
+++ b/docs/en/cowboy/2.0/manual/cowboy_req.host_info/index.html
@@ -62,87 +62,41 @@
<h1 class="lined-header"><span>cowboy_req:host_info(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:host_info - Access the route&#8217;s heading host segments</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:host_info - Access the route&apos;s heading host segments</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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_info</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_router:tokens</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Return the tokens for the heading host segments.</p></div>
-<div class="paragraph"><p>This is the part of the host name that was matched using
-the <code>...</code> notation.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">host_info</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <b><font color="#000000">cowboy_router:tokens</font></b>()</tt></pre>
+</div></div>
+<p>Return the tokens for the heading host segments.</p>
+<p>This is the part of the host name that was matched using the <code>...</code> notation.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The tokens are returned as a list of case insensitive
-binary strings.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The tokens are returned as a list of case insensitive binary strings.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Only the tokens are returned, they are no longer wrapped in a tuple.
-</p>
+<ul><li><strong>2.0</strong>: Only the tokens are returned, they are no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Get the host_info tokens</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Get the host_info tokens</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">HostInfo</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:host_info</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">HostInfo</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:host_info</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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>,
-<a href="../cowboy_router">cowboy_router(3)</a></p></div>
-</div>
-</div>
+<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>, <a href="../cowboy_router">cowboy_router(3)</a></p>
+
diff --git a/docs/en/cowboy/2.0/manual/cowboy_req.match_cookies/index.html b/docs/en/cowboy/2.0/manual/cowboy_req.match_cookies/index.html
index 607ee5d3..1f523bc2 100644
--- a/docs/en/cowboy/2.0/manual/cowboy_req.match_cookies/index.html
+++ b/docs/en/cowboy/2.0/manual/cowboy_req.match_cookies/index.html
@@ -62,123 +62,67 @@
<h1 class="lined-header"><span>cowboy_req:match_cookies(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:match_cookies - Match cookies against constraints</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:match_cookies - Match cookies against constraints</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">match_cookies</span></span>(<span style="color: #009900">Fields</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:fields</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: #000080">atom</span></span>() <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>Parse the cookies and match specific values against
-constraints.</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>
-<div class="sect1">
+<pre><tt><b><font color="#000000">match_cookies</font></b>(<font color="#009900">Fields</font> <font color="#990000">::</font> <b><font color="#000000">cowboy:fields</font></b>(), <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> #{<b><font color="#000080">atom</font></b>() <font color="#990000">=&gt;</font> <b><font color="#000000">any</font></b>()}</tt></pre>
+</div></div>
+<p>Parse the cookies and match specific values against constraints.</p>
+<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>
+<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>
+<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>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Fields
-</dt>
-<dd>
-<p>
-Cookies to retrieve.
-</p>
-<div class="paragraph"><p>See <a href="../cowboy">cowboy(3)</a> for a complete description.</p></div>
+<dl><dt>Fields</dt>
+<dd><p>Cookies to retrieve.</p>
+<p>See <a href="../cowboy">cowboy(3)</a> for a complete description.</p>
</dd>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Desired values are returned as a map. The key is the atom
-that was given in the list of fields, and the value is the
-optionally converted value after applying constraints.</p></div>
-<div class="paragraph"><p>The map contains the same keys that were given in the fields.</p></div>
-<div class="paragraph"><p>An exception is triggered when the match fails.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Desired values are returned as a map. The key is the atom that was given in the list of fields, and the value is the optionally converted value after applying constraints.</p>
+<p>The map contains the same keys that were given in the fields.</p>
+<p>An exception is triggered when the match fails.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced.
-</p>
+<ul><li><strong>2.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Match fields</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Match fields</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">%% ID and Lang are binaries.</span></span>
-#{<span style="color: #FF6600">id</span> <span style="color: #990000">:=</span> <span style="color: #009900">ID</span>, <span style="color: #FF6600">lang</span> <span style="color: #990000">:=</span> <span style="color: #009900">Lang</span>}
- <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:match_cookies</span></span>([<span style="color: #FF6600">id</span>, <span style="color: #FF6600">lang</span>], <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Match fields and apply constraints</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><i><font color="#9A1900">%% ID and Lang are binaries.</font></i>
+#{<font color="#FF6600">id</font> <font color="#990000">:=</font> <font color="#009900">ID</font>, <font color="#FF6600">lang</font> <font color="#990000">:=</font> <font color="#009900">Lang</font>}
+ <font color="#990000">=</font> <b><font color="#000000">cowboy_req:match_cookies</font></b>([<font color="#FF6600">id</font>, <font color="#FF6600">lang</font>], <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Match fields and apply constraints</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">%% ID is an integer and Lang a non-empty binary.</span></span>
-#{<span style="color: #FF6600">id</span> <span style="color: #990000">:=</span> <span style="color: #009900">ID</span>, <span style="color: #FF6600">lang</span> <span style="color: #990000">:=</span> <span style="color: #009900">Lang</span>}
- <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:match_cookies</span></span>([{<span style="color: #FF6600">id</span>, <span style="color: #FF6600">int</span>}, {<span style="color: #FF6600">lang</span>, <span style="color: #FF6600">nonempty</span>}], <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Match fields with default values</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><i><font color="#9A1900">%% ID is an integer and Lang a non-empty binary.</font></i>
+#{<font color="#FF6600">id</font> <font color="#990000">:=</font> <font color="#009900">ID</font>, <font color="#FF6600">lang</font> <font color="#990000">:=</font> <font color="#009900">Lang</font>}
+ <font color="#990000">=</font> <b><font color="#000000">cowboy_req:match_cookies</font></b>([{<font color="#FF6600">id</font>, <font color="#FF6600">int</font>}, {<font color="#FF6600">lang</font>, <font color="#FF6600">nonempty</font>}], <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Match fields with default values</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: #FF6600">lang</span> <span style="color: #990000">:=</span> <span style="color: #009900">Lang</span>}
- <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:match_cookies</span></span>([{<span style="color: #FF6600">lang</span>, [], <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"en-US"</span><span style="color: #990000">&gt;&gt;</span>}], <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>#{<font color="#FF6600">lang</font> <font color="#990000">:=</font> <font color="#009900">Lang</font>}
+ <font color="#990000">=</font> <b><font color="#000000">cowboy_req:match_cookies</font></b>([{<font color="#FF6600">lang</font>, [], <font color="#990000">&lt;&lt;</font><font color="#FF0000">"en-US"</font><font color="#990000">&gt;&gt;</font>}], <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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_cookies">cowboy_req:parse_cookies(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.parse_cookies">cowboy_req:parse_cookies(3)</a></p>
+
diff --git a/docs/en/cowboy/2.0/manual/cowboy_req.match_qs/index.html b/docs/en/cowboy/2.0/manual/cowboy_req.match_qs/index.html
index 6cb40e3a..97140d61 100644
--- a/docs/en/cowboy/2.0/manual/cowboy_req.match_qs/index.html
+++ b/docs/en/cowboy/2.0/manual/cowboy_req.match_qs/index.html
@@ -62,123 +62,67 @@
<h1 class="lined-header"><span>cowboy_req:match_qs(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:match_qs - Match the query string against constraints</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:match_qs - Match the query string against constraints</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">match_qs</span></span>(<span style="color: #009900">Fields</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:fields</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: #000080">atom</span></span>() <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>Parse the query string and match specific values against
-constraints.</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>
-<div class="sect1">
+<pre><tt><b><font color="#000000">match_qs</font></b>(<font color="#009900">Fields</font> <font color="#990000">::</font> <b><font color="#000000">cowboy:fields</font></b>(), <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> #{<b><font color="#000080">atom</font></b>() <font color="#990000">=&gt;</font> <b><font color="#000000">any</font></b>()}</tt></pre>
+</div></div>
+<p>Parse the query string and match specific values against constraints.</p>
+<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>
+<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>
+<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>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Fields
-</dt>
-<dd>
-<p>
-Fields to retrieve from the query string.
-</p>
-<div class="paragraph"><p>See <a href="../cowboy">cowboy(3)</a> for a complete description.</p></div>
+<dl><dt>Fields</dt>
+<dd><p>Fields to retrieve from the query string.</p>
+<p>See <a href="../cowboy">cowboy(3)</a> for a complete description.</p>
</dd>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Desired values are returned as a map. The key is the atom
-that was given in the list of fields, and the value is the
-optionally converted value after applying constraints.</p></div>
-<div class="paragraph"><p>The map contains the same keys that were given in the fields.</p></div>
-<div class="paragraph"><p>An exception is triggered when the match fails.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Desired values are returned as a map. The key is the atom that was given in the list of fields, and the value is the optionally converted value after applying constraints.</p>
+<p>The map contains the same keys that were given in the fields.</p>
+<p>An exception is triggered when the match fails.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced.
-</p>
+<ul><li><strong>2.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Match fields</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Match fields</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">%% ID and Lang are binaries.</span></span>
-#{<span style="color: #FF6600">id</span> <span style="color: #990000">:=</span> <span style="color: #009900">ID</span>, <span style="color: #FF6600">lang</span> <span style="color: #990000">:=</span> <span style="color: #009900">Lang</span>}
- <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:match_qs</span></span>([<span style="color: #FF6600">id</span>, <span style="color: #FF6600">lang</span>], <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Match fields and apply constraints</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><i><font color="#9A1900">%% ID and Lang are binaries.</font></i>
+#{<font color="#FF6600">id</font> <font color="#990000">:=</font> <font color="#009900">ID</font>, <font color="#FF6600">lang</font> <font color="#990000">:=</font> <font color="#009900">Lang</font>}
+ <font color="#990000">=</font> <b><font color="#000000">cowboy_req:match_qs</font></b>([<font color="#FF6600">id</font>, <font color="#FF6600">lang</font>], <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Match fields and apply constraints</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">%% ID is an integer and Lang a non-empty binary.</span></span>
-#{<span style="color: #FF6600">id</span> <span style="color: #990000">:=</span> <span style="color: #009900">ID</span>, <span style="color: #FF6600">lang</span> <span style="color: #990000">:=</span> <span style="color: #009900">Lang</span>}
- <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:match_qs</span></span>([{<span style="color: #FF6600">id</span>, <span style="color: #FF6600">int</span>}, {<span style="color: #FF6600">lang</span>, <span style="color: #FF6600">nonempty</span>}], <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Match fields with default values</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><i><font color="#9A1900">%% ID is an integer and Lang a non-empty binary.</font></i>
+#{<font color="#FF6600">id</font> <font color="#990000">:=</font> <font color="#009900">ID</font>, <font color="#FF6600">lang</font> <font color="#990000">:=</font> <font color="#009900">Lang</font>}
+ <font color="#990000">=</font> <b><font color="#000000">cowboy_req:match_qs</font></b>([{<font color="#FF6600">id</font>, <font color="#FF6600">int</font>}, {<font color="#FF6600">lang</font>, <font color="#FF6600">nonempty</font>}], <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Match fields with default values</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: #FF6600">lang</span> <span style="color: #990000">:=</span> <span style="color: #009900">Lang</span>}
- <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:match_qs</span></span>([{<span style="color: #FF6600">lang</span>, [], <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"en-US"</span><span style="color: #990000">&gt;&gt;</span>}], <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>#{<font color="#FF6600">lang</font> <font color="#990000">:=</font> <font color="#009900">Lang</font>}
+ <font color="#990000">=</font> <b><font color="#000000">cowboy_req:match_qs</font></b>([{<font color="#FF6600">lang</font>, [], <font color="#990000">&lt;&lt;</font><font color="#FF0000">"en-US"</font><font color="#990000">&gt;&gt;</font>}], <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.qs">cowboy_req:qs(3)</a>,
-<a href="../cowboy_req.parse_qs">cowboy_req:parse_qs(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.qs">cowboy_req:qs(3)</a>, <a href="../cowboy_req.parse_qs">cowboy_req:parse_qs(3)</a></p>
+
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
index b7533c7d..c41b9d1e 100644
--- a/docs/en/cowboy/2.0/manual/cowboy_req.method/index.html
+++ b/docs/en/cowboy/2.0/manual/cowboy_req.method/index.html
@@ -62,100 +62,58 @@
<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">
+<p>cowboy_req:method - HTTP method</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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
+<pre><tt><b><font color="#000000">method</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <font color="#009900">Method</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()</tt></pre>
+</div></div>
+<p>Return the request&apos;s HTTP method.</p>
+<p>The method can also be obtained using pattern matching:</p>
+<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">
+<pre><tt>#{<font color="#FF6600">method</font> <font color="#990000">:=</font> <font color="#009900">Method</font>} <font color="#990000">=</font> <font color="#009900">Req</font><font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<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">
+<p>The request&apos;s HTTP method is returned as a binary string. While methods are case sensitive, standard methods are always uppercase.</p>
<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>
+<ul><li><strong>2.0</strong>: Only the method is returned, it is no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<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
+<div class="listingblock"><div class="title">Ensure the request&apos;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
+<pre><tt><font color="#990000">&lt;&lt;</font><font color="#FF0000">"GET"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:method</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></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">
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">case</font></b> <b><font color="#000000">lists:member</font></b>(<b><font color="#000000">cowboy_req:method</font></b>(<font color="#009900">Req</font>), [<font color="#990000">&lt;&lt;</font><font color="#FF0000">"GET"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"POST"</font><font color="#990000">&gt;&gt;</font>]) <b><font color="#0000FF">of</font></b>
+ <font color="#000080">true</font> <font color="#990000">-&gt;</font> <b><font color="#000000">handle</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>);
+ <font color="#000080">false</font> <font color="#990000">-&gt;</font> <b><font color="#000000">method_not_allowed</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>)
+ <b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
<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>
+<p><a href="../cowboy_req">cowboy_req(3)</a></p>
+
diff --git a/docs/en/cowboy/2.0/manual/cowboy_req.parse_cookies/index.html b/docs/en/cowboy/2.0/manual/cowboy_req.parse_cookies/index.html
index 3120c899..3276a59c 100644
--- a/docs/en/cowboy/2.0/manual/cowboy_req.parse_cookies/index.html
+++ b/docs/en/cowboy/2.0/manual/cowboy_req.parse_cookies/index.html
@@ -62,91 +62,47 @@
<h1 class="lined-header"><span>cowboy_req:parse_cookies(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:parse_cookies - Parse cookie headers</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:parse_cookies - Parse cookie headers</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">parse_cookies</span></span>(<span style="color: #009900">Req</span>) <span style="color: #990000">-&gt;</span> [{<span style="color: #009900">Name</span>, <span style="color: #009900">Value</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="font-style: italic"><span style="color: #9A1900">%% case sensitive</span></span>
-<span style="color: #009900">Value</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></tt></pre></div></div>
-<div class="paragraph"><p>Parse cookie headers.</p></div>
-<div class="paragraph"><p>Alias for <a href="../cowboy_req.parse_header">cowboy_req:parse_header(<a href="#cookie">[cookie]</a>, Req)</a>.</p></div>
-<div class="paragraph"><p>When the cookie header is missing, <code>[]</code> is returned.</p></div>
-<div class="paragraph"><p>While an empty cookie header is not valid, some clients do
-send it. Cowboy will in this case also return <code>[]</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">parse_cookies</font></b>(<font color="#009900">Req</font>) <font color="#990000">-&gt;</font> [{<font color="#009900">Name</font>, <font color="#009900">Value</font>}]
+
+<font color="#009900">Name</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case sensitive</font></i>
+<font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case sensitive</font></i></tt></pre>
+</div></div>
+<p>Parse cookie headers.</p>
+<p>Alias for <a href="../cowboy_req.parse_header">cowboy_req:parse_header(&lt;&lt;&quot;cookie&quot;&gt;&gt;, Req)</a>.</p>
+<p>When the cookie header is missing, <code>[]</code> is returned.</p>
+<p>While an empty cookie header is not valid, some clients do send it. Cowboy will in this case also return <code>[]</code>.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The cookies are returned as a list of key/values. Keys and
-values are case sensitive binary strings.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The cookies are returned as a list of key/values. Keys and values are case sensitive binary strings.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Only the parsed header value is returned, it is no longer wrapped in a tuple.
-</p>
+<ul><li><strong>2.0</strong>: Only the parsed header value is returned, it is no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced. Replaces <code>cookie/2,3</code> and <code>cookies/1</code>.
-</p>
+<li><strong>2.0</strong>: Function introduced. Replaces <code>cookie/2,3</code> and <code>cookies/1</code>.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Look for a specific cookie</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Look for a specific cookie</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">Cookies</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:parse_cookies</span></span>(<span style="color: #009900">Req</span>),
-{<span style="color: #990000">_</span>, <span style="color: #009900">Token</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">lists:keyfind</span></span>(<span style="color: #FF6600">token</span>, <span style="color: #993399">1</span>, <span style="color: #009900">Cookies</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Cookies</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:parse_cookies</font></b>(<font color="#009900">Req</font>),
+{<font color="#990000">_</font>, <font color="#009900">Token</font>} <font color="#990000">=</font> <b><font color="#000000">lists:keyfind</font></b>(<font color="#FF6600">token</font>, <font color="#993399">1</font>, <font color="#009900">Cookies</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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_header">cowboy_req:parse_header(3)</a>,
-<a href="../cowboy_req.match_cookies">cowboy_req:match_cookies(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.parse_header">cowboy_req:parse_header(3)</a>, <a href="../cowboy_req.match_cookies">cowboy_req:match_cookies(3)</a></p>
+
diff --git a/docs/en/cowboy/2.0/manual/cowboy_req.parse_header/index.html b/docs/en/cowboy/2.0/manual/cowboy_req.parse_header/index.html
index 351b4f30..3a0b691a 100644
--- a/docs/en/cowboy/2.0/manual/cowboy_req.parse_header/index.html
+++ b/docs/en/cowboy/2.0/manual/cowboy_req.parse_header/index.html
@@ -62,283 +62,218 @@
<h1 class="lined-header"><span>cowboy_req:parse_header(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:parse_header - Parse the given HTTP header</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:parse_header - Parse the given HTTP header</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">parse_header</span></span>(<span style="color: #009900">Name</span>, <span style="color: #009900">Req</span>) <span style="color: #990000">-&gt;</span> <span style="color: #009900">ParsedValue</span> | <span style="color: #009900">Default</span>
-<span style="font-weight: bold"><span style="color: #000000">parse_header</span></span>(<span style="color: #009900">Name</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">Default</span>) <span style="color: #990000">-&gt;</span> <span style="color: #009900">ParsedValue</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">binary</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">ParsedValue</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">any</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>Parse 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>The type of the parsed value varies depending on
-the header. Similarly, the default value when calling
-<code>cowboy_req:parse_header/2</code> differs depending on the
-header.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">parse_header</font></b>(<font color="#009900">Name</font>, <font color="#009900">Req</font>) <font color="#990000">-&gt;</font> <font color="#009900">ParsedValue</font> | <font color="#009900">Default</font>
+<b><font color="#000000">parse_header</font></b>(<font color="#009900">Name</font>, <font color="#009900">Req</font>, <font color="#009900">Default</font>) <font color="#990000">-&gt;</font> <font color="#009900">ParsedValue</font> | <font color="#009900">Default</font>
+
+<font color="#009900">Name</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()
+<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()
+<font color="#009900">ParsedValue</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()</tt></pre>
+</div></div>
+<p>Parse the given HTTP header.</p>
+<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>
+<p>The type of the parsed value varies depending on the header. Similarly, the default value when calling <code>cowboy_req:parse_header/2</code> differs depending on the header.</p>
<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 lowercase binary string.
-</p>
+<dl><dt>Name</dt>
+<dd><p>Desired HTTP header name as a lowercase binary string.</p>
</dd>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dt>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>
+<dt>Default</dt>
+<dd><p>Default value returned when the header is missing.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The parsed header value varies depending on the header.
-When the header is missing, the default argument is returned.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The parsed header value varies depending on the header. When the header is missing, the default argument is returned.</p>
<h2 id="_headers">Headers</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The following snippets detail the types returned by the
-different headers. Unless mentioned otherwise, the
-default value when the header is missing will be <code>undefined</code>:</p></div>
-<div class="listingblock">
-<div class="title">accept</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The following snippets detail the types returned by the different headers. Unless mentioned otherwise, the default value when the header is missing will be <code>undefined</code>:</p>
+<div class="listingblock"><div class="title">accept</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">parse_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">-&gt;</span> [{{<span style="color: #009900">Type</span>, <span style="color: #009900">SubType</span>, <span style="color: #009900">Params</span>}, <span style="color: #009900">Quality</span>, <span style="color: #009900">AcceptExt</span>}]
-
-<span style="color: #009900">Type</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 insensitive</span></span>
-<span style="color: #009900">SubType</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 insensitive</span></span>
-<span style="color: #009900">Params</span> <span style="color: #990000">::</span> [{<span style="color: #009900">Key</span>, <span style="color: #009900">Value</span>}]
-<span style="color: #009900">Quality</span> <span style="color: #990000">::</span> <span style="color: #993399">0</span><span style="color: #990000">..</span><span style="color: #993399">1000</span>
-<span style="color: #009900">AcceptExt</span> <span style="color: #990000">::</span> [<span style="color: #009900">Key</span> | {<span style="color: #009900">Key</span>, <span style="color: #009900">Value</span>}]
-<span style="color: #009900">Key</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 insensitive</span></span>
-<span style="color: #009900">Value</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></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">accept-charset, accept-encoding and accept-language</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">parse_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"accept"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>)
+ <font color="#990000">-&gt;</font> [{{<font color="#009900">Type</font>, <font color="#009900">SubType</font>, <font color="#009900">Params</font>}, <font color="#009900">Quality</font>, <font color="#009900">AcceptExt</font>}]
+
+<font color="#009900">Type</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case insensitive</font></i>
+<font color="#009900">SubType</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case insensitive</font></i>
+<font color="#009900">Params</font> <font color="#990000">::</font> [{<font color="#009900">Key</font>, <font color="#009900">Value</font>}]
+<font color="#009900">Quality</font> <font color="#990000">::</font> <font color="#993399">0</font><font color="#990000">..</font><font color="#993399">1000</font>
+<font color="#009900">AcceptExt</font> <font color="#990000">::</font> [<font color="#009900">Key</font> | {<font color="#009900">Key</font>, <font color="#009900">Value</font>}]
+<font color="#009900">Key</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case insensitive</font></i>
+<font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case sensitive</font></i></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">accept-charset, accept-encoding and accept-language</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">parse_header</span></span>(<span style="color: #009900">Name</span>, <span style="color: #009900">Req</span>) <span style="color: #990000">-&gt;</span> [{<span style="color: #009900">Value</span>, <span style="color: #009900">Quality</span>}]
-
-<span style="color: #009900">Name</span> <span style="color: #990000">::</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"accept-charset"</span><span style="color: #990000">&gt;&gt;</span>
- | <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"accept-encoding"</span><span style="color: #990000">&gt;&gt;</span>
- | <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"accept-language"</span><span style="color: #990000">&gt;&gt;</span>
-<span style="color: #009900">Value</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 insensitive</span></span>
-<span style="color: #009900">Quality</span> <span style="color: #990000">::</span> <span style="color: #993399">0</span><span style="color: #990000">..</span><span style="color: #993399">1000</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">authorization</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">parse_header</font></b>(<font color="#009900">Name</font>, <font color="#009900">Req</font>) <font color="#990000">-&gt;</font> [{<font color="#009900">Value</font>, <font color="#009900">Quality</font>}]
+
+<font color="#009900">Name</font> <font color="#990000">::</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"accept-charset"</font><font color="#990000">&gt;&gt;</font>
+ | <font color="#990000">&lt;&lt;</font><font color="#FF0000">"accept-encoding"</font><font color="#990000">&gt;&gt;</font>
+ | <font color="#990000">&lt;&lt;</font><font color="#FF0000">"accept-language"</font><font color="#990000">&gt;&gt;</font>
+<font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case insensitive</font></i>
+<font color="#009900">Quality</font> <font color="#990000">::</font> <font color="#993399">0</font><font color="#990000">..</font><font color="#993399">1000</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">authorization</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">parse_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"authorization"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req</span>)
- <span style="color: #990000">-&gt;</span> {<span style="color: #FF6600">basic</span>, <span style="color: #009900">Username</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="color: #009900">Password</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()}
- | {<span style="color: #FF6600">bearer</span>, <span style="color: #009900">Token</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()}
- | {<span style="color: #FF6600">digest</span>, [{<span style="color: #009900">Key</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="color: #009900">Value</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()}]}</tt></pre></div></div>
-<div class="listingblock">
-<div class="title">content-length</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">parse_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"authorization"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>)
+ <font color="#990000">-&gt;</font> {<font color="#FF6600">basic</font>, <font color="#009900">Username</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">Password</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()}
+ | {<font color="#FF6600">bearer</font>, <font color="#009900">Token</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()}
+ | {<font color="#FF6600">digest</font>, [{<font color="#009900">Key</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()}]}</tt></pre>
+</div></div>
+<!-- @todo Currently also parses connection. Do we want this? Should it be documented? Use case?-->
+<div class="listingblock"><div class="title">content-length</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">parse_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">-&gt;</span> <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>When the content-length header is missing, <code>0</code> is returned.</p></div>
-<div class="listingblock">
-<div class="title">content-type</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">parse_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-length"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>) <font color="#990000">-&gt;</font> <b><font color="#000000">non_neg_integer</font></b>()</tt></pre>
+</div></div>
+<p>When the content-length header is missing, <code>0</code> is returned.</p>
+<div class="listingblock"><div class="title">content-type</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">parse_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req</span>)
- <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Type</span>, <span style="color: #009900">SubType</span>, <span style="color: #009900">Params</span>}
-
-<span style="color: #009900">Type</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 insensitive</span></span>
-<span style="color: #009900">SubType</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 insensitive</span></span>
-<span style="color: #009900">Params</span> <span style="color: #990000">::</span> [{<span style="color: #009900">Key</span>, <span style="color: #009900">Value</span>}]
-<span style="color: #009900">Key</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 insensitive</span></span>
-<span style="color: #009900">Value</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></tt></pre></div></div>
-<div class="paragraph"><p>Note that the value for the charset parameter is case insensitive
-and returned as a lowercase binary string.</p></div>
-<div class="listingblock">
-<div class="title">cookie</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">parse_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>)
+ <font color="#990000">-&gt;</font> {<font color="#009900">Type</font>, <font color="#009900">SubType</font>, <font color="#009900">Params</font>}
+
+<font color="#009900">Type</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case insensitive</font></i>
+<font color="#009900">SubType</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case insensitive</font></i>
+<font color="#009900">Params</font> <font color="#990000">::</font> [{<font color="#009900">Key</font>, <font color="#009900">Value</font>}]
+<font color="#009900">Key</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case insensitive</font></i>
+<font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case sensitive;</font></i></tt></pre>
+</div></div>
+<p>Note that the value for the charset parameter is case insensitive and returned as a lowercase binary string.</p>
+<div class="listingblock"><div class="title">cookie</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">parse_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"cookie"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req</span>) <span style="color: #990000">-&gt;</span> [{<span style="color: #009900">Name</span>, <span style="color: #009900">Value</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="font-style: italic"><span style="color: #9A1900">%% case sensitive</span></span>
-<span style="color: #009900">Value</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></tt></pre></div></div>
-<div class="paragraph"><p>When the cookie header is missing, <code>[]</code> is returned.</p></div>
-<div class="paragraph"><p>While an empty cookie header is not valid, some clients do
-send it. Cowboy will in this case also return <code>[]</code>.</p></div>
-<div class="listingblock">
-<div class="title">expect</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">parse_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"cookie"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>) <font color="#990000">-&gt;</font> [{<font color="#009900">Name</font>, <font color="#009900">Value</font>}]
+
+<font color="#009900">Name</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case sensitive</font></i>
+<font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case sensitive</font></i></tt></pre>
+</div></div>
+<p>When the cookie header is missing, <code>[]</code> is returned.</p>
+<p>While an empty cookie header is not valid, some clients do send it. Cowboy will in this case also return <code>[]</code>.</p>
+<div class="listingblock"><div class="title">expect</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">parse_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"expect"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req</span>) <span style="color: #990000">-&gt;</span> <span style="color: #FF6600">continue</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">if-match and if-none-match</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">parse_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"expect"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>) <font color="#990000">-&gt;</font> <font color="#FF6600">continue</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">if-match and if-none-match</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">parse_header</span></span>(<span style="color: #009900">Name</span>, <span style="color: #009900">Req</span>)
- <span style="color: #990000">-&gt;</span> <span style="color: #FF6600">'*'</span> | [{<span style="color: #FF6600">weak</span> | <span style="color: #FF6600">strong</span>, <span style="color: #009900">OpaqueTag</span>}]
-
-<span style="color: #009900">Name</span> <span style="color: #990000">::</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"if-match"</span><span style="color: #990000">&gt;&gt;</span>
- | <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"if-none-match"</span><span style="color: #990000">&gt;&gt;</span>
-<span style="color: #009900">OpaqueTag</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></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">if-modified-since and if-unmodified-since</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">parse_header</font></b>(<font color="#009900">Name</font>, <font color="#009900">Req</font>)
+ <font color="#990000">-&gt;</font> <font color="#FF6600">'*'</font> | [{<font color="#FF6600">weak</font> | <font color="#FF6600">strong</font>, <font color="#009900">OpaqueTag</font>}]
+
+<font color="#009900">Name</font> <font color="#990000">::</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"if-match"</font><font color="#990000">&gt;&gt;</font>
+ | <font color="#990000">&lt;&lt;</font><font color="#FF0000">"if-none-match"</font><font color="#990000">&gt;&gt;</font>
+<font color="#009900">OpaqueTag</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case sensitive</font></i></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">if-modified-since and if-unmodified-since</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">parse_header</span></span>(<span style="color: #009900">Name</span>, <span style="color: #009900">Req</span>) <span style="color: #990000">-&gt;</span> <span style="font-weight: bold"><span style="color: #000000">calendar:datetime</span></span>()</tt></pre></div></div>
-<div class="listingblock">
-<div class="title">range</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">parse_header</font></b>(<font color="#009900">Name</font>, <font color="#009900">Req</font>) <font color="#990000">-&gt;</font> <b><font color="#000000">calendar:datetime</font></b>()</tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">range</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">parse_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"range"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">From</span>, <span style="color: #009900">To</span>} | <span style="color: #009900">Final</span>
-
-<span style="color: #009900">From</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>()
-<span style="color: #009900">To</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>() | <span style="color: #FF6600">infinity</span>
-<span style="color: #009900">Final</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">neg_integer</span></span>()</tt></pre></div></div>
-<div class="listingblock">
-<div class="title">sec-websocket-extensions</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">parse_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"range"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>) <font color="#990000">-&gt;</font> {<font color="#009900">From</font>, <font color="#009900">To</font>} | <font color="#009900">Final</font>
+
+<font color="#009900">From</font> <font color="#990000">::</font> <b><font color="#000000">non_neg_integer</font></b>()
+<font color="#009900">To</font> <font color="#990000">::</font> <b><font color="#000000">non_neg_integer</font></b>() | <font color="#FF6600">infinity</font>
+<font color="#009900">Final</font> <font color="#990000">::</font> <b><font color="#000000">neg_integer</font></b>()</tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">sec-websocket-extensions</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">parse_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"sec-websocket-extensions"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req</span>)
- <span style="color: #990000">-&gt;</span> [{<span style="color: #009900">Extension</span>, <span style="color: #009900">Params</span>}]
-
-<span style="color: #009900">Extension</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: #009900">Params</span> <span style="color: #990000">::</span> [<span style="color: #009900">Key</span> | {<span style="color: #009900">Key</span>, <span style="color: #009900">Value</span>}]
-<span style="color: #009900">Key</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: #009900">Value</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></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">sec-websocket-protocol and upgrade</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">parse_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"sec-websocket-extensions"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>)
+ <font color="#990000">-&gt;</font> [{<font color="#009900">Extension</font>, <font color="#009900">Params</font>}]
+
+<font color="#009900">Extension</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case sensitive</font></i>
+<font color="#009900">Params</font> <font color="#990000">::</font> [<font color="#009900">Key</font> | {<font color="#009900">Key</font>, <font color="#009900">Value</font>}]
+<font color="#009900">Key</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case sensitive</font></i>
+<font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case sensitive</font></i></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">sec-websocket-protocol and upgrade</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">parse_header</span></span>(<span style="color: #009900">Name</span>, <span style="color: #009900">Req</span>) <span style="color: #990000">-&gt;</span> [<span style="color: #009900">Token</span>]
-
-<span style="color: #009900">Name</span> <span style="color: #990000">::</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"sec-websocket-protocol"</span><span style="color: #990000">&gt;&gt;</span>
- | <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"upgrade"</span><span style="color: #990000">&gt;&gt;</span>
-<span style="color: #009900">Token</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 insensitive</span></span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">x-forwarded-for</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">parse_header</font></b>(<font color="#009900">Name</font>, <font color="#009900">Req</font>) <font color="#990000">-&gt;</font> [<font color="#009900">Token</font>]
+
+<font color="#009900">Name</font> <font color="#990000">::</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"sec-websocket-protocol"</font><font color="#990000">&gt;&gt;</font>
+ | <font color="#990000">&lt;&lt;</font><font color="#FF0000">"upgrade"</font><font color="#990000">&gt;&gt;</font>
+<font color="#009900">Token</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case insensitive</font></i></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">x-forwarded-for</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">parse_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"x-forwarded-for"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req</span>) <span style="color: #990000">-&gt;</span> [<span style="color: #009900">Token</span>]
+<pre><tt><b><font color="#000000">parse_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"x-forwarded-for"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>) <font color="#990000">-&gt;</font> [<font color="#009900">Token</font>]
-<span style="color: #009900">Token</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></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Unknown headers</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<font color="#009900">Token</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case sensitive</font></i></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Unknown 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="font-weight: bold"><span style="color: #000000">parse_header</span></span>(<span style="color: #990000">_</span>, <span style="color: #009900">Req</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #000080">undefined</span>, <span style="color: #009900">RawValue</span>}</tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">parse_header</font></b>(<font color="#990000">_</font>, <font color="#009900">Req</font>) <font color="#990000">-&gt;</font> {<font color="#000080">undefined</font>, <font color="#009900">RawValue</font>}</tt></pre>
+</div></div>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Only the parsed header value is returned, it is no longer wrapped in a tuple.
-</p>
+<ul><li><strong>2.0</strong>: Only the parsed header value is returned, it is no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Parse the accept header with a custom default value</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Parse the accept header with a custom 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="font-style: italic"><span style="color: #9A1900">%% Accept everything when header is missing.</span></span>
-<span style="color: #009900">Accept</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:parse_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">&lt;&lt;</span><span style="color: #FF0000">"*"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"*"</span><span style="color: #990000">&gt;&gt;</span>, []}, <span style="color: #993399">1000</span>, []}])<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Parse the content-length header</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><i><font color="#9A1900">%% Accept everything when header is missing.</font></i>
+<font color="#009900">Accept</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:parse_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"accept"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>,
+ [{{ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"*"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"*"</font><font color="#990000">&gt;&gt;</font>, []}, <font color="#993399">1000</font>, []}])<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Parse the content-length 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">%% Default content-length is 0.</span></span>
-<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">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><i><font color="#9A1900">%% Default content-length is 0.</font></i>
+<font color="#009900">Length</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-length"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.headers">cowboy_req:headers(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.header">cowboy_req:header(3)</a>, <a href="../cowboy_req.headers">cowboy_req:headers(3)</a></p>
+
diff --git a/docs/en/cowboy/2.0/manual/cowboy_req.parse_qs/index.html b/docs/en/cowboy/2.0/manual/cowboy_req.parse_qs/index.html
index 75ac6ea8..68cfb8ae 100644
--- a/docs/en/cowboy/2.0/manual/cowboy_req.parse_qs/index.html
+++ b/docs/en/cowboy/2.0/manual/cowboy_req.parse_qs/index.html
@@ -62,117 +62,55 @@
<h1 class="lined-header"><span>cowboy_req:parse_qs(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:parse_qs - Parse the query string</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:parse_qs - Parse the query string</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">parse_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">Key</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="color: #009900">Value</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>() | <span style="color: #000080">true</span>}]</tt></pre></div></div>
-<div class="paragraph"><p>Parse the query string as a list of key/value pairs.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">parse_qs</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> [{<font color="#009900">Key</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() | <font color="#000080">true</font>}]</tt></pre>
+</div></div>
+<p>Parse the query string as a list of key/value pairs.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The parsed query string is returned as a list of key/value pairs.
-The key is a binary string. The value is either a binary string,
-or the atom <code>true</code>. Both key and value are case sensitive.</p></div>
-<div class="paragraph"><p>The atom <code>true</code> is returned when a key is present in the query
-string without a value. For example, in the following URIs
-the key <code>&lt;&lt;"edit"&gt;&gt;</code> will always have the value <code>true</code>:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<code>/posts/42?edit</code>
-</p>
+<p>The parsed query string is returned as a list of key/value pairs. The key is a binary string. The value is either a binary string, or the atom <code>true</code>. Both key and value are case sensitive.</p>
+<p>The atom <code>true</code> is returned when a key is present in the query string without a value. For example, in the following URIs the key <code>&lt;&lt;&quot;edit&quot;&gt;&gt;</code> will always have the value <code>true</code>:</p>
+<ul><li><code>/posts/42?edit</code>
</li>
-<li>
-<p>
-<code>/posts/42?edit&amp;exclusive=1</code>
-</p>
+<li><code>/posts/42?edit&amp;exclusive=1</code>
</li>
-<li>
-<p>
-<code>/posts/42?exclusive=1&amp;edit</code>
-</p>
+<li><code>/posts/42?exclusive=1&amp;edit</code>
</li>
-<li>
-<p>
-<code>/posts/42?exclusive=1&amp;edit&amp;from=web</code>
-</p>
+<li><code>/posts/42?exclusive=1&amp;edit&amp;from=web</code>
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: The parsed value is not longer cached in the Req object.
-</p>
+<ul><li><strong>2.0</strong>: The parsed value is not longer cached in the Req object.
</li>
-<li>
-<p>
-<strong>2.0</strong>: Only the parsed query string is returned, it is no longer wrapped in a tuple.
-</p>
+<li><strong>2.0</strong>: Only the parsed query string is returned, it is no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced. Replaces <code>qs_val/1</code> and <code>qs_vals/1</code>.
-</p>
+<li><strong>2.0</strong>: Function introduced. Replaces <code>qs_val/1</code> and <code>qs_vals/1</code>.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Parse the query string and convert the keys to atoms</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Parse the query string and convert the keys to atoms</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">ParsedQs</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:parse_qs</span></span>(<span style="color: #009900">Req</span>),
-<span style="color: #009900">AtomsQs</span> <span style="color: #990000">=</span> [{<span style="font-weight: bold"><span style="color: #000000">binary_to_existing_atom</span></span>(<span style="color: #009900">K</span>, <span style="color: #FF6600">latin1</span>), <span style="color: #009900">V</span>}
- || {<span style="color: #009900">K</span>, <span style="color: #009900">V</span>} <span style="color: #990000">&lt;-</span> <span style="color: #009900">ParsedQs</span>]<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">ParsedQs</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:parse_qs</font></b>(<font color="#009900">Req</font>),
+<font color="#009900">AtomsQs</font> <font color="#990000">=</font> [{<b><font color="#000000">binary_to_existing_atom</font></b>(<font color="#009900">K</font>, <font color="#FF6600">latin1</font>), <font color="#009900">V</font>}
+ || {<font color="#009900">K</font>, <font color="#009900">V</font>} <font color="#990000">&lt;-</font> <font color="#009900">ParsedQs</font>]<font color="#990000">.</font></tt></pre>
+</div></div>
<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.qs">cowboy_req:qs(3)</a>,
-<a href="../cowboy_req.match_qs">cowboy_req:match_qs(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.qs">cowboy_req:qs(3)</a>, <a href="../cowboy_req.match_qs">cowboy_req:match_qs(3)</a></p>
+
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
index df803617..1095bd2e 100644
--- a/docs/en/cowboy/2.0/manual/cowboy_req.path/index.html
+++ b/docs/en/cowboy/2.0/manual/cowboy_req.path/index.html
@@ -62,90 +62,47 @@
<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">
+<p>cowboy_req:path - URI path</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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
+<pre><tt><b><font color="#000000">path</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <font color="#009900">Path</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()</tt></pre>
+</div></div>
+<p>Return the path of the effective request URI.</p>
+<p>The path can also be obtained using pattern matching:</p>
+<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">
+<pre><tt>#{<font color="#FF6600">path</font> <font color="#990000">:=</font> <font color="#009900">Path</font>} <font color="#990000">=</font> <font color="#009900">Req</font><font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<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">
+<p>The path is returned as a binary string. It is case sensitive.</p>
<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>
+<ul><li><strong>2.0</strong>: Only the path is returned, it is no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<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
+<div class="listingblock"><div class="title">Get the effective request URI&apos;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">
+<pre><tt><font color="#009900">Path</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:path</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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>
+<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>
+
diff --git a/docs/en/cowboy/2.0/manual/cowboy_req.path_info/index.html b/docs/en/cowboy/2.0/manual/cowboy_req.path_info/index.html
index 702e5c1e..ab05a94a 100644
--- a/docs/en/cowboy/2.0/manual/cowboy_req.path_info/index.html
+++ b/docs/en/cowboy/2.0/manual/cowboy_req.path_info/index.html
@@ -62,87 +62,41 @@
<h1 class="lined-header"><span>cowboy_req:path_info(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:path_info - Access the route&#8217;s trailing path segments</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:path_info - Access the route&apos;s trailing path segments</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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_info</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_router:tokens</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Return the tokens for the trailing path segments.</p></div>
-<div class="paragraph"><p>This is the part of the host name that was matched using
-the <code>...</code> notation.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">path_info</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <b><font color="#000000">cowboy_router:tokens</font></b>()</tt></pre>
+</div></div>
+<p>Return the tokens for the trailing path segments.</p>
+<p>This is the part of the host name that was matched using the <code>...</code> notation.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The tokens are returned as a list of case sensitive
-binary strings.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The tokens are returned as a list of case sensitive binary strings.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Only the tokens are returned, they are no longer wrapped in a tuple.
-</p>
+<ul><li><strong>2.0</strong>: Only the tokens are returned, they are no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Get the path_info tokens</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Get the path_info tokens</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">PathInfo</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:path_info</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">PathInfo</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:path_info</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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>,
-<a href="../cowboy_router">cowboy_router(3)</a></p></div>
-</div>
-</div>
+<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>, <a href="../cowboy_router">cowboy_router(3)</a></p>
+
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
index 40433281..010c02f5 100644
--- a/docs/en/cowboy/2.0/manual/cowboy_req.peer/index.html
+++ b/docs/en/cowboy/2.0/manual/cowboy_req.peer/index.html
@@ -62,96 +62,51 @@
<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">
+<p>cowboy_req:peer - Peer address and port</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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>
+<pre><tt><b><font color="#000000">peer</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <font color="#009900">Peer</font>
-<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
+<font color="#009900">Peer</font> <font color="#990000">::</font> {<b><font color="#000000">inet:ip_address</font></b>(), <b><font color="#000000">inet:port_number</font></b>()}</tt></pre>
+</div></div>
+<p>Return the peer&apos;s IP address and port number.</p>
+<p>The peer can also be obtained using pattern matching:</p>
+<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">
+<pre><tt>#{<font color="#FF6600">peer</font> <font color="#990000">:=</font> {<font color="#009900">IP</font>, <font color="#009900">Port</font>}} <font color="#990000">=</font> <font color="#009900">Req</font><font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<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">
+<p>The peer&apos;s IP address and port number.</p>
+<p>The peer is not necessarily the client&apos;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>
+<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>
<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>
+<ul><li><strong>2.0</strong>: Only the peer is returned, it is no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<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
+<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">
+<pre><tt>{<font color="#009900">IP</font>, <font color="#009900">Port</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:peer</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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>
+<p><a href="../cowboy_req">cowboy_req(3)</a></p>
+
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
index ed23e541..7e0e174b 100644
--- a/docs/en/cowboy/2.0/manual/cowboy_req.port/index.html
+++ b/docs/en/cowboy/2.0/manual/cowboy_req.port/index.html
@@ -62,90 +62,48 @@
<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">
+<p>cowboy_req:port - URI port number</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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
+<pre><tt><b><font color="#000000">port</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <font color="#009900">Port</font> <font color="#990000">::</font> <b><font color="#000000">inet:port_number</font></b>()</tt></pre>
+</div></div>
+<p>Return the port number of the effective request URI.</p>
+<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>
+<p>The port number can also be obtained using pattern matching:</p>
+<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">
+<pre><tt>#{<font color="#FF6600">port</font> <font color="#990000">:=</font> <font color="#009900">Port</font>} <font color="#990000">=</font> <font color="#009900">Req</font><font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<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">
+<p>The port number is returned as an integer.</p>
<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>
+<ul><li><strong>2.0</strong>: Only the port number is returned, it is no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<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
+<div class="listingblock"><div class="title">Get the effective request URI&apos;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">
+<pre><tt><font color="#009900">Port</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:port</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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>
+<p><a href="../cowboy_req">cowboy_req(3)</a></p>
+
diff --git a/docs/en/cowboy/2.0/manual/cowboy_req.push/index.html b/docs/en/cowboy/2.0/manual/cowboy_req.push/index.html
index 9a83b56b..25d13ca7 100644
--- a/docs/en/cowboy/2.0/manual/cowboy_req.push/index.html
+++ b/docs/en/cowboy/2.0/manual/cowboy_req.push/index.html
@@ -62,141 +62,74 @@
<h1 class="lined-header"><span>cowboy_req:push(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:push - Push a resource to the client</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:push - Push a resource to the client</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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</span></span>(<span style="color: #009900">Path</span>, <span style="color: #009900">Headers</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">push</span></span>(<span style="color: #009900">Path</span>, <span style="color: #009900">Headers</span>, <span style="color: #009900">Req</span>, #{})
-
-<span style="font-weight: bold"><span style="color: #000000">push</span></span>(<span style="color: #009900">Path</span>, <span style="color: #009900">Headers</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: #FF6600">ok</span>
-
-<span style="color: #009900">Path</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>() <span style="font-style: italic"><span style="color: #9A1900">%% case sensitive</span></span>
-<span style="color: #009900">Headers</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:http_headers</span></span>()
-<span style="color: #009900">Opts</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:push_opts</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Push a resource to the client.</p></div>
-<div class="paragraph"><p>Cowboy handles push requests the same way as if they came
-from the client, including the creation of a request handling
-process, routing and middlewares and so on.</p></div>
-<div class="paragraph"><p>This function does nothing when the HTTP/1.1 protocol is
-used. You may call it safely without first checking whether
-the connection uses HTTP/2.</p></div>
-<div class="paragraph"><p>The header names must be given as lowercase binary strings.
-While header names are case insensitive, Cowboy requires them
-to be given as lowercase to function properly.</p></div>
-<div class="paragraph"><p>Note that the headers must be the headers the client is expected
-to send if it were to perform the request. They are therefore
-request headers, and not response headers.</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. You can override them by passing options.</p></div>
-<div class="paragraph"><p>It is not possible to push resources after sending a response.
-Any attempt will result in an error.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">push</font></b>(<font color="#009900">Path</font>, <font color="#009900">Headers</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> <b><font color="#000000">push</font></b>(<font color="#009900">Path</font>, <font color="#009900">Headers</font>, <font color="#009900">Req</font>, #{})
+
+<b><font color="#000000">push</font></b>(<font color="#009900">Path</font>, <font color="#009900">Headers</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>(), <font color="#009900">Opts</font>)
+ <font color="#990000">-&gt;</font> <font color="#FF6600">ok</font>
+
+<font color="#009900">Path</font> <font color="#990000">::</font> <b><font color="#000000">iodata</font></b>() <i><font color="#9A1900">%% case sensitive</font></i>
+<font color="#009900">Headers</font> <font color="#990000">::</font> <b><font color="#000000">cowboy:http_headers</font></b>()
+<font color="#009900">Opts</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:push_opts</font></b>()</tt></pre>
+</div></div>
+<p>Push a resource to the client.</p>
+<p>Cowboy handles push requests the same way as if they came from the client, including the creation of a request handling process, routing and middlewares and so on.</p>
+<p>This function does nothing when the HTTP/1.1 protocol is used. You may call it safely without first checking whether the connection uses HTTP/2.</p>
+<p>The header names must be given as lowercase binary strings. While header names are case insensitive, Cowboy requires them to be given as lowercase to function properly.</p>
+<p>Note that the headers must be the headers the client is expected to send if it were to perform the request. They are therefore request headers, and not response headers.</p>
+<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&apos;s URI. You can override them by passing options.</p>
+<p>It is not possible to push resources after sending a response. Any attempt will result in an error.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Path
-</dt>
-<dd>
-<p>
-The status code for the response.
-</p>
+<dl><dt>Path</dt>
+<dd><p>The status code for the response.</p>
</dd>
-<dt class="hdlist1">
-Headers
-</dt>
-<dd>
-<p>
-The response headers.
-</p>
+<dt>Headers</dt>
+<dd><p>The response headers.</p>
</dd>
-</dl></div>
-<div class="paragraph"><p>Header names must be given as lowercase binary strings.</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+</dl>
+<p>Header names must be given as lowercase binary strings.</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-<dt class="hdlist1">
-Opts
-</dt>
-<dd>
-<p>
-Customize the HTTP method or the URI scheme, host, port
-or query string.
-</p>
+<dt>Opts</dt>
+<dd><p>Customize the HTTP method or the URI scheme, host, port or query string.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The atom <code>ok</code> is always returned. It can be safely ignored.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The atom <code>ok</code> is always returned. It can be safely ignored.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced.
-</p>
+<ul><li><strong>2.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Push a resource</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Push a resource</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">cowboy_req:push</span></span>(<span style="color: #FF0000">"/static/style.css"</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"accept"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/css"</span><span style="color: #990000">&gt;&gt;</span>
-}, <span style="color: #009900">Req</span>),</tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Push a resource with a custom host</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">cowboy_req:push</font></b>(<font color="#FF0000">"/static/style.css"</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"accept"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/css"</font><font color="#990000">&gt;&gt;</font>
+}, <font color="#009900">Req</font>),</tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Push a resource with a custom host</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">cowboy_req:push</span></span>(<span style="color: #FF0000">"/static/style.css"</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"accept"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/css"</span><span style="color: #990000">&gt;&gt;</span>
-}, #{<span style="color: #0000FF">host</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"cdn.example.org"</span><span style="color: #990000">&gt;&gt;</span>}, <span style="color: #009900">Req</span>),</tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">cowboy_req:push</font></b>(<font color="#FF0000">"/static/style.css"</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"accept"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/css"</font><font color="#990000">&gt;&gt;</font>
+}, #{<font color="#0000FF">host</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"cdn.example.org"</font><font color="#990000">&gt;&gt;</font>}, <font color="#009900">Req</font>),</tt></pre>
+</div></div>
<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.reply">cowboy_req:reply(3)</a>,
-<a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.reply">cowboy_req:reply(3)</a>, <a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a></p>
+
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
index b23ec812..7fd3b24c 100644
--- a/docs/en/cowboy/2.0/manual/cowboy_req.qs/index.html
+++ b/docs/en/cowboy/2.0/manual/cowboy_req.qs/index.html
@@ -62,89 +62,47 @@
<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">
+<p>cowboy_req:qs - URI query string</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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
+<pre><tt><b><font color="#000000">qs</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <font color="#009900">Qs</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()</tt></pre>
+</div></div>
+<p>Return the query string of the effective request URI.</p>
+<p>The query string can also be obtained using pattern matching:</p>
+<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">
+<pre><tt>#{<font color="#FF6600">qs</font> <font color="#990000">:=</font> <font color="#009900">Qs</font>} <font color="#990000">=</font> <font color="#009900">Req</font><font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<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">
+<p>The query string is returned as a binary string. It is case sensitive.</p>
<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>
+<ul><li><strong>2.0</strong>: Only the query string is returned, it is no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<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
+<div class="listingblock"><div class="title">Get the effective request URI&apos;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">
+<pre><tt><font color="#009900">Qs</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:qs</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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>
+<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>
+
diff --git a/docs/en/cowboy/2.0/manual/cowboy_req.read_body/index.html b/docs/en/cowboy/2.0/manual/cowboy_req.read_body/index.html
index 30224c06..7d3e6194 100644
--- a/docs/en/cowboy/2.0/manual/cowboy_req.read_body/index.html
+++ b/docs/en/cowboy/2.0/manual/cowboy_req.read_body/index.html
@@ -62,143 +62,72 @@
<h1 class="lined-header"><span>cowboy_req:read_body(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:read_body - Read the request body</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:read_body - Read the request body</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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</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">read_body</span></span>(<span style="color: #009900">Req</span>, #{})
-
-<span style="font-weight: bold"><span style="color: #000000">read_body</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: #FF6600">ok</span>, <span style="color: #009900">Data</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: #FF6600">more</span>, <span style="color: #009900">Data</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">Opts</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:read_body_opts</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Read the request body.</p></div>
-<div class="paragraph"><p>This function reads a chunk of the request body. A <code>more</code> tuple
-is returned when more data remains to be read. Call the function
-repeatedly until an <code>ok</code> tuple is returned to read the entire body.</p></div>
-<div class="paragraph"><p>An <code>ok</code> tuple with empty data is returned when the request has no body,
-or when calling this function again after the body has already
-been read. It is therefore safe to call this function directly.
-Note that the body can only be read once.</p></div>
-<div class="paragraph"><p>This function reads the request body from the connection process.
-The connection process is responsible for reading from the socket.
-The exact behavior varies depending on the protocol.</p></div>
-<div class="paragraph"><p>The options therefore are only related to the communication
-between the request process and the connection process.</p></div>
-<div class="paragraph"><p>Cowboy will automatically handle protocol details including
-the expect header, chunked transfer-encoding and others.</p></div>
-<div class="paragraph"><p>Once the body has been read fully, Cowboy sets the content-length
-header if it was not previously provided.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">read_body</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> <b><font color="#000000">read_body</font></b>(<font color="#009900">Req</font>, #{})
+
+<b><font color="#000000">read_body</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>(), <font color="#009900">Opts</font>)
+ <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <font color="#009900">Data</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">Req</font>}
+ | {<font color="#FF6600">more</font>, <font color="#009900">Data</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">Req</font>}
+
+<font color="#009900">Opts</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:read_body_opts</font></b>()</tt></pre>
+</div></div>
+<p>Read the request body.</p>
+<p>This function reads a chunk of the request body. A <code>more</code> tuple is returned when more data remains to be read. Call the function repeatedly until an <code>ok</code> tuple is returned to read the entire body.</p>
+<p>An <code>ok</code> tuple with empty data is returned when the request has no body, or when calling this function again after the body has already been read. It is therefore safe to call this function directly. Note that the body can only be read once.</p>
+<p>This function reads the request body from the connection process. The connection process is responsible for reading from the socket. The exact behavior varies depending on the protocol.</p>
+<p>The options therefore are only related to the communication between the request process and the connection process.</p>
+<p>Cowboy will automatically handle protocol details including the expect header, chunked transfer-encoding and others.</p>
+<p>Once the body has been read fully, Cowboy sets the content-length header if it was not previously provided.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-<dt class="hdlist1">
-Opts
-</dt>
-<dd>
-<p>
-A map of body reading options.
-</p>
-<div class="paragraph"><p>The <code>length</code> option can be used to request smaller or bigger
-chunks of data to be sent. It is a best effort approach, Cowboy
-may send more data than configured on occasions. It defaults
-to 8MB.</p></div>
-<div class="paragraph"><p>The <code>period</code> indicates how long the connection process will wait
-before it provides us with the data it received. It defaults
-to 15 seconds.</p></div>
-<div class="paragraph"><p>The connection process sends data to the request process when
-either the <code>length</code> of data or the <code>period</code> of time is reached.</p></div>
-<div class="paragraph"><p>The <code>timeout</code> option is a safeguard in case the connection
-process becomes unresponsive. The function will crash if no
-message was received in that interval. The timeout should be
-larger than the period. It defaults to the period + 1 second.</p></div>
+<dt>Opts</dt>
+<dd><p>A map of body reading options.</p>
+<p>The <code>length</code> option can be used to request smaller or bigger chunks of data to be sent. It is a best effort approach, Cowboy may send more data than configured on occasions. It defaults to 8MB.</p>
+<p>The <code>period</code> indicates how long the connection process will wait before it provides us with the data it received. It defaults to 15 seconds.</p>
+<p>The connection process sends data to the request process when either the <code>length</code> of data or the <code>period</code> of time is reached.</p>
+<p>The <code>timeout</code> option is a safeguard in case the connection process becomes unresponsive. The function will crash if no message was received in that interval. The timeout should be larger than the period. It defaults to the period<br/> 1 second.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A <code>more</code> tuple is returned when there are more data to be read.</p></div>
-<div class="paragraph"><p>An <code>ok</code> tuple is returned when there are no more data to be read,
-either because this is the last chunk of data, the body has already
-been read, or there was no body to begin with.</p></div>
-<div class="paragraph"><p>The data is always returned as a binary.</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.
-For example it may have an added content-length header once the
-body has been read.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>A <code>more</code> tuple is returned when there are more data to be read.</p>
+<p>An <code>ok</code> tuple is returned when there are no more data to be read, either because this is the last chunk of data, the body has already been read, or there was no body to begin with.</p>
+<p>The data is always returned as a binary.</p>
+<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. For example it may have an added content-length header once the body has been read.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced. Replaces <code>body/1,2</code>.
-</p>
+<ul><li><strong>2.0</strong>: Function introduced. Replaces <code>body/1,2</code>.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Read the entire body</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Read the entire body</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">read_body</span></span>(<span style="color: #009900">Req0</span>, <span style="color: #009900">Acc</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">cowboy_req:read_body</span></span>(<span style="color: #009900">Req0</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Data</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">-&gt;</span> {<span style="color: #FF6600">ok</span>, <span style="color: #990000">&lt;&lt;</span> <span style="color: #009900">Acc</span><span style="color: #990000">/</span><span style="font-weight: bold"><span style="color: #000080">binary</span></span>, <span style="color: #009900">Data</span><span style="color: #990000">/</span><span style="font-weight: bold"><span style="color: #000080">binary</span></span> <span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req</span>};
- {<span style="color: #FF6600">more</span>, <span style="color: #009900">Data</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">-&gt;</span> <span style="font-weight: bold"><span style="color: #000000">read_body</span></span>(<span style="color: #009900">Req</span>, <span style="color: #990000">&lt;&lt;</span> <span style="color: #009900">Acc</span><span style="color: #990000">/</span><span style="font-weight: bold"><span style="color: #000080">binary</span></span>, <span style="color: #009900">Data</span><span style="color: #990000">/</span><span style="font-weight: bold"><span style="color: #000080">binary</span></span> <span style="color: #990000">&gt;&gt;</span>)
- <span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Read the body in small chunks</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">read_body</font></b>(<font color="#009900">Req0</font>, <font color="#009900">Acc</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">case</font></b> <b><font color="#000000">cowboy_req:read_body</font></b>(<font color="#009900">Req0</font>) <b><font color="#0000FF">of</font></b>
+ {<font color="#FF6600">ok</font>, <font color="#009900">Data</font>, <font color="#009900">Req</font>} <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <font color="#990000">&lt;&lt;</font> <font color="#009900">Acc</font><font color="#990000">/</font><b><font color="#000080">binary</font></b>, <font color="#009900">Data</font><font color="#990000">/</font><b><font color="#000080">binary</font></b> <font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>};
+ {<font color="#FF6600">more</font>, <font color="#009900">Data</font>, <font color="#009900">Req</font>} <font color="#990000">-&gt;</font> <b><font color="#000000">read_body</font></b>(<font color="#009900">Req</font>, <font color="#990000">&lt;&lt;</font> <font color="#009900">Acc</font><font color="#990000">/</font><b><font color="#000080">binary</font></b>, <font color="#009900">Data</font><font color="#990000">/</font><b><font color="#000080">binary</font></b> <font color="#990000">&gt;&gt;</font>)
+ <b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Read the body in small chunks</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">cowboy_req:read_body</span></span>(<span style="color: #009900">Req</span>, #{<span style="font-weight: bold"><span style="color: #000080">length</span></span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">64000</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">cowboy_req:read_body</font></b>(<font color="#009900">Req</font>, #{<b><font color="#000080">length</font></b> <font color="#990000">=&gt;</font> <font color="#993399">64000</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
<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.has_body">cowboy_req:has_body(3)</a>,
-<a href="../cowboy_req.body_length">cowboy_req:body_length(3)</a>,
-<a href="../cowboy_req.read_urlencoded_body">cowboy_req:read_urlencoded_body(3)</a>,
-<a href="../cowboy_req.read_part">cowboy_req:read_part(3)</a>,
-<a href="../cowboy_req.read_part_body">cowboy_req:read_part_body(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.has_body">cowboy_req:has_body(3)</a>, <a href="../cowboy_req.body_length">cowboy_req:body_length(3)</a>, <a href="../cowboy_req.read_urlencoded_body">cowboy_req:read_urlencoded_body(3)</a>, <a href="../cowboy_req.read_part">cowboy_req:read_part(3)</a>, <a href="../cowboy_req.read_part_body">cowboy_req:read_part_body(3)</a></p>
+
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 cddb626c..79bec5ad 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
@@ -62,162 +62,94 @@
<h1 class="lined-header"><span>cowboy_req:read_part(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:read_part - Read the next multipart headers</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:read_part - Read the next multipart headers</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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_part</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">read_part</span></span>(<span style="color: #009900">Req</span>, #{})
-
-<span style="font-weight: bold"><span style="color: #000000">read_part</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: #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: #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
-their own headers and body. This function parses and returns
-headers. Examples of multipart media types are
-<code>multipart/form-data</code> and <code>multipart/byteranges</code>.</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>Cowboy will read the body before parsing in chunks of size
-up to 64KB, with a period of 5 seconds. This is tailored for
-reading part headers and might not be the most efficient for
-skipping the previous part&#8217;s body.</p></div>
-<div class="paragraph"><p>The headers returned are MIME headers, <strong>NOT</strong> 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 extract information from <code>multipart/form-data</code>
-representations.</p></div>
-<div class="paragraph"><p>Once a part has been read, it can not be read again.</p></div>
-<div class="paragraph"><p>Once the body has been read, Cowboy sets the content-length
-header if it was not previously provided.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">read_part</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> <b><font color="#000000">read_part</font></b>(<font color="#009900">Req</font>, #{})
+
+<b><font color="#000000">read_part</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>(), <font color="#009900">Opts</font>)
+ <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <font color="#009900">Headers</font>, <font color="#009900">Req</font>} | {<font color="#FF6600">done</font>, <font color="#009900">Req</font>}
+
+<font color="#009900">Opts</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:read_body_opts</font></b>()
+<font color="#009900">Headers</font> <font color="#990000">::</font> #{<b><font color="#000080">binary</font></b>() <font color="#990000">=&gt;</font> <b><font color="#000080">binary</font></b>()}</tt></pre>
+</div></div>
+<p>Read the next part of a multipart body.</p>
+<p>This function reads the request body and parses it as multipart. Each parts of a multipart representation have their own headers and body. This function parses and returns headers. Examples of multipart media types are <code>multipart/form-data</code> and <code>multipart/byteranges</code>.</p>
+<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&apos;t been read. Both are skipped automatically when calling this function.</p>
+<p>Cowboy will read the body before parsing in chunks of size up to 64KB, with a period of 5 seconds. This is tailored for reading part headers and might not be the most efficient for skipping the previous part&apos;s body.</p>
+<p>The headers returned are MIME headers, <strong>NOT</strong> 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 extract information from <code>multipart/form-data</code> representations.</p>
+<!-- @todo Proper link to cow_multipart:form_data.-->
+<p>Once a part has been read, it can not be read again.</p>
+<p>Once the body has been read, Cowboy sets the content-length header if it was not previously provided.</p>
+<!-- @todo Limit the maximum size of multipart headers.-->
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-<dt class="hdlist1">
-Opts
-</dt>
-<dd>
-<p>
-A map of body reading options. Please refer to
-<a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a>
-for details about each option.
-</p>
-<div class="paragraph"><p>This function defaults the <code>length</code> to 64KB and the <code>period</code>
-to 5 seconds.</p></div>
+<dt>Opts</dt>
+<dd><p>A map of body reading options. Please refer to <a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a> for details about each option.</p>
+<p>This function defaults the <code>length</code> to 64KB and the <code>period</code> to 5 seconds.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<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 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.
-For example it may have an added content-length header once the
-body has been read.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>An <code>ok</code> tuple is returned containing the next part&apos;s headers as a map.</p>
+<p>A <code>done</code> tuple is returned if there are no more parts to read.</p>
+<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. For example it may have an added content-length header once the body has been read.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced. Replaces <code>part/1,2</code>.
-</p>
+<ul><li><strong>2.0</strong>: Function introduced. Replaces <code>part/1,2</code>.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Read all parts</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Read all parts</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">acc_multipart</span></span>(<span style="color: #009900">Req0</span>, <span style="color: #009900">Acc</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">cowboy_req:read_part</span></span>(<span style="color: #009900">Req0</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Headers</span>, <span style="color: #009900">Req1</span>} <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Body</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">stream_body</span></span>(<span style="color: #009900">Req1</span>, <span style="color: #990000">&lt;&lt;&gt;&gt;</span>),
- <span style="font-weight: bold"><span style="color: #000000">acc_multipart</span></span>(<span style="color: #009900">Req</span>, [{<span style="color: #009900">Headers</span>, <span style="color: #009900">Body</span>}|<span style="color: #009900">Acc</span>]);
- {<span style="color: #FF6600">done</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">-&gt;</span>
- {<span style="font-weight: bold"><span style="color: #000000">lists:reverse</span></span>(<span style="color: #009900">Acc</span>), <span style="color: #009900">Req</span>}
- <span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span>
-
-<span style="font-weight: bold"><span style="color: #000000">stream_body</span></span>(<span style="color: #009900">Req0</span>, <span style="color: #009900">Acc</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">cowboy_req:read_part_body</span></span>(<span style="color: #009900">Req0</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
- {<span style="color: #FF6600">more</span>, <span style="color: #009900">Data</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #000000">stream_body</span></span>(<span style="color: #009900">Req</span>, <span style="color: #990000">&lt;&lt;</span> <span style="color: #009900">Acc</span><span style="color: #990000">/</span><span style="font-weight: bold"><span style="color: #000080">binary</span></span>, <span style="color: #009900">Data</span><span style="color: #990000">/</span><span style="font-weight: bold"><span style="color: #000080">binary</span></span> <span style="color: #990000">&gt;&gt;</span>);
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Data</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #990000">&lt;&lt;</span> <span style="color: #009900">Acc</span><span style="color: #990000">/</span><span style="font-weight: bold"><span style="color: #000080">binary</span></span>, <span style="color: #009900">Data</span><span style="color: #990000">/</span><span style="font-weight: bold"><span style="color: #000080">binary</span></span> <span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req</span>}
- <span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Read all part headers, skipping bodies</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">acc_multipart</font></b>(<font color="#009900">Req0</font>, <font color="#009900">Acc</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">case</font></b> <b><font color="#000000">cowboy_req:read_part</font></b>(<font color="#009900">Req0</font>) <b><font color="#0000FF">of</font></b>
+ {<font color="#FF6600">ok</font>, <font color="#009900">Headers</font>, <font color="#009900">Req1</font>} <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <font color="#009900">Body</font>, <font color="#009900">Req</font>} <font color="#990000">=</font> <b><font color="#000000">stream_body</font></b>(<font color="#009900">Req1</font>, <font color="#990000">&lt;&lt;&gt;&gt;</font>),
+ <b><font color="#000000">acc_multipart</font></b>(<font color="#009900">Req</font>, [{<font color="#009900">Headers</font>, <font color="#009900">Body</font>}|<font color="#009900">Acc</font>]);
+ {<font color="#FF6600">done</font>, <font color="#009900">Req</font>} <font color="#990000">-&gt;</font>
+ {<b><font color="#000000">lists:reverse</font></b>(<font color="#009900">Acc</font>), <font color="#009900">Req</font>}
+ <b><font color="#0000FF">end</font></b><font color="#990000">.</font>
+
+<b><font color="#000000">stream_body</font></b>(<font color="#009900">Req0</font>, <font color="#009900">Acc</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">case</font></b> <b><font color="#000000">cowboy_req:read_part_body</font></b>(<font color="#009900">Req0</font>) <b><font color="#0000FF">of</font></b>
+ {<font color="#FF6600">more</font>, <font color="#009900">Data</font>, <font color="#009900">Req</font>} <font color="#990000">-&gt;</font>
+ <b><font color="#000000">stream_body</font></b>(<font color="#009900">Req</font>, <font color="#990000">&lt;&lt;</font> <font color="#009900">Acc</font><font color="#990000">/</font><b><font color="#000080">binary</font></b>, <font color="#009900">Data</font><font color="#990000">/</font><b><font color="#000080">binary</font></b> <font color="#990000">&gt;&gt;</font>);
+ {<font color="#FF6600">ok</font>, <font color="#009900">Data</font>, <font color="#009900">Req</font>} <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <font color="#990000">&lt;&lt;</font> <font color="#009900">Acc</font><font color="#990000">/</font><b><font color="#000080">binary</font></b>, <font color="#009900">Data</font><font color="#990000">/</font><b><font color="#000080">binary</font></b> <font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>}
+ <b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Read all part headers, skipping bodies</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">skip_body_multipart</span></span>(<span style="color: #009900">Req0</span>, <span style="color: #009900">Acc</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">cowboy_req:read_part</span></span>(<span style="color: #009900">Req0</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Headers</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #000000">skip_body_multipart</span></span>(<span style="color: #009900">Req</span>, [<span style="color: #009900">Headers</span>|<span style="color: #009900">Acc</span>]);
- {<span style="color: #FF6600">done</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">-&gt;</span>
- {<span style="font-weight: bold"><span style="color: #000000">lists:reverse</span></span>(<span style="color: #009900">Acc</span>), <span style="color: #009900">Req</span>}
- <span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Read a part header in larger chunks</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">skip_body_multipart</font></b>(<font color="#009900">Req0</font>, <font color="#009900">Acc</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">case</font></b> <b><font color="#000000">cowboy_req:read_part</font></b>(<font color="#009900">Req0</font>) <b><font color="#0000FF">of</font></b>
+ {<font color="#FF6600">ok</font>, <font color="#009900">Headers</font>, <font color="#009900">Req</font>} <font color="#990000">-&gt;</font>
+ <b><font color="#000000">skip_body_multipart</font></b>(<font color="#009900">Req</font>, [<font color="#009900">Headers</font>|<font color="#009900">Acc</font>]);
+ {<font color="#FF6600">done</font>, <font color="#009900">Req</font>} <font color="#990000">-&gt;</font>
+ {<b><font color="#000000">lists:reverse</font></b>(<font color="#009900">Acc</font>), <font color="#009900">Req</font>}
+ <b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Read a part header in larger chunks</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: #FF6600">ok</span>, <span style="color: #009900">Headers</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:read_part</span></span>(<span style="color: #009900">Req0</span>, #{<span style="font-weight: bold"><span style="color: #000080">length</span></span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">1000000</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#009900">Headers</font>, <font color="#009900">Req</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:read_part</font></b>(<font color="#009900">Req0</font>, #{<b><font color="#000080">length</font></b> <font color="#990000">=&gt;</font> <font color="#993399">1000000</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
<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.has_body">cowboy_req:has_body(3)</a>,
-<a href="../cowboy_req.body_length">cowboy_req:body_length(3)</a>,
-<a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a>,
-<a href="../cowboy_req.read_urlencoded_body">cowboy_req:read_urlencoded_body(3)</a>,
-<a href="../cowboy_req.read_part_body">cowboy_req:read_part_body(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.has_body">cowboy_req:has_body(3)</a>, <a href="../cowboy_req.body_length">cowboy_req:body_length(3)</a>, <a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a>, <a href="../cowboy_req.read_urlencoded_body">cowboy_req:read_urlencoded_body(3)</a>, <a href="../cowboy_req.read_part_body">cowboy_req:read_part_body(3)</a></p>
+
diff --git a/docs/en/cowboy/2.0/manual/cowboy_req.read_part_body/index.html b/docs/en/cowboy/2.0/manual/cowboy_req.read_part_body/index.html
index 774965b0..71e7fd83 100644
--- a/docs/en/cowboy/2.0/manual/cowboy_req.read_part_body/index.html
+++ b/docs/en/cowboy/2.0/manual/cowboy_req.read_part_body/index.html
@@ -62,130 +62,70 @@
<h1 class="lined-header"><span>cowboy_req:read_part_body(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:read_part_body - Read the current part&#8217;s body</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:read_part_body - Read the current part&apos;s body</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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_part_body</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">read_part_body</span></span>(<span style="color: #009900">Req</span>, #{})
-
-<span style="font-weight: bold"><span style="color: #000000">read_part_body</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: #FF6600">ok</span>, <span style="color: #009900">Data</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: #FF6600">more</span>, <span style="color: #009900">Data</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">Opts</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:read_body_opts</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Read the body of the current part of the multipart message.</p></div>
-<div class="paragraph"><p>This function reads the request body and parses it as
-multipart. Each parts of a multipart representation have
-their own headers and body. This function returns the
-body of the current part. Examples of multipart media types
-are <code>multipart/form-data</code> and <code>multipart/byteranges</code>.</p></div>
-<div class="paragraph"><p>This function reads a chunk of the part&#8217;s body. A <code>more</code> tuple
-is returned when more data remains to be read. Call the function
-repeatedly until an <code>ok</code> tuple is returned to read the entire body.</p></div>
-<div class="paragraph"><p>Once a part has been read, it can not be read again.</p></div>
-<div class="paragraph"><p>Once the body has been read, Cowboy sets the content-length
-header if it was not previously provided.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">read_part_body</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> <b><font color="#000000">read_part_body</font></b>(<font color="#009900">Req</font>, #{})
+
+<b><font color="#000000">read_part_body</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>(), <font color="#009900">Opts</font>)
+ <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <font color="#009900">Data</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">Req</font>}
+ | {<font color="#FF6600">more</font>, <font color="#009900">Data</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">Req</font>}
+
+<font color="#009900">Opts</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:read_body_opts</font></b>()</tt></pre>
+</div></div>
+<p>Read the body of the current part of the multipart message.</p>
+<p>This function reads the request body and parses it as multipart. Each parts of a multipart representation have their own headers and body. This function returns the body of the current part. Examples of multipart media types are <code>multipart/form-data</code> and <code>multipart/byteranges</code>.</p>
+<p>This function reads a chunk of the part&apos;s body. A <code>more</code> tuple is returned when more data remains to be read. Call the function repeatedly until an <code>ok</code> tuple is returned to read the entire body.</p>
+<p>Once a part has been read, it can not be read again.</p>
+<p>Once the body has been read, Cowboy sets the content-length header if it was not previously provided.</p>
+<!-- @todo Limit the maximum size of multipart headers.-->
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-<dt class="hdlist1">
-Opts
-</dt>
-<dd>
-<p>
-A map of body reading options. Please refer to
-<a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a>
-for details about each option.
-</p>
-<div class="paragraph"><p>This function uses the same default options as the
-<a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a>
-function.</p></div>
+<dt>Opts</dt>
+<dd><p>A map of body reading options. Please refer to <a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a> for details about each option.</p>
+<p>This function uses the same default options as the <a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a> function.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A <code>more</code> tuple is returned when there are more data to be read.</p></div>
-<div class="paragraph"><p>An <code>ok</code> tuple is returned when there are no more data to be read.</p></div>
-<div class="paragraph"><p>The data is always returned as a binary.</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.
-For example it may have an added content-length header once the
-body has been read.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>A <code>more</code> tuple is returned when there are more data to be read.</p>
+<p>An <code>ok</code> tuple is returned when there are no more data to be read.</p>
+<p>The data is always returned as a binary.</p>
+<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. For example it may have an added content-length header once the body has been read.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced. Replaces <code>part_body/1,2</code>.
-</p>
+<ul><li><strong>2.0</strong>: Function introduced. Replaces <code>part_body/1,2</code>.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Read a full part&#8217;s body</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Read a full part&apos;s body</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">stream_body</span></span>(<span style="color: #009900">Req0</span>, <span style="color: #009900">Acc</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">cowboy_req:read_part_body</span></span>(<span style="color: #009900">Req0</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
- {<span style="color: #FF6600">more</span>, <span style="color: #009900">Data</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #000000">stream_body</span></span>(<span style="color: #009900">Req</span>, <span style="color: #990000">&lt;&lt;</span> <span style="color: #009900">Acc</span><span style="color: #990000">/</span><span style="font-weight: bold"><span style="color: #000080">binary</span></span>, <span style="color: #009900">Data</span><span style="color: #990000">/</span><span style="font-weight: bold"><span style="color: #000080">binary</span></span> <span style="color: #990000">&gt;&gt;</span>);
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Data</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #990000">&lt;&lt;</span> <span style="color: #009900">Acc</span><span style="color: #990000">/</span><span style="font-weight: bold"><span style="color: #000080">binary</span></span>, <span style="color: #009900">Data</span><span style="color: #990000">/</span><span style="font-weight: bold"><span style="color: #000080">binary</span></span> <span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req</span>}
- <span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Ensure a part&#8217;s body is smaller than 64KB</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">stream_body</font></b>(<font color="#009900">Req0</font>, <font color="#009900">Acc</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">case</font></b> <b><font color="#000000">cowboy_req:read_part_body</font></b>(<font color="#009900">Req0</font>) <b><font color="#0000FF">of</font></b>
+ {<font color="#FF6600">more</font>, <font color="#009900">Data</font>, <font color="#009900">Req</font>} <font color="#990000">-&gt;</font>
+ <b><font color="#000000">stream_body</font></b>(<font color="#009900">Req</font>, <font color="#990000">&lt;&lt;</font> <font color="#009900">Acc</font><font color="#990000">/</font><b><font color="#000080">binary</font></b>, <font color="#009900">Data</font><font color="#990000">/</font><b><font color="#000080">binary</font></b> <font color="#990000">&gt;&gt;</font>);
+ {<font color="#FF6600">ok</font>, <font color="#009900">Data</font>, <font color="#009900">Req</font>} <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <font color="#990000">&lt;&lt;</font> <font color="#009900">Acc</font><font color="#990000">/</font><b><font color="#000080">binary</font></b>, <font color="#009900">Data</font><font color="#990000">/</font><b><font color="#000080">binary</font></b> <font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>}
+ <b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Ensure a part&apos;s body is smaller than 64KB</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: #FF6600">ok</span>, <span style="color: #009900">Body</span>, <span style="color: #009900">Req</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">Req0</span>, #{<span style="font-weight: bold"><span style="color: #000080">length</span></span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">64000</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#009900">Body</font>, <font color="#009900">Req</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:read_part_body</font></b>(<font color="#009900">Req0</font>, #{<b><font color="#000080">length</font></b> <font color="#990000">=&gt;</font> <font color="#993399">64000</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
<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.has_body">cowboy_req:has_body(3)</a>,
-<a href="../cowboy_req.body_length">cowboy_req:body_length(3)</a>,
-<a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a>,
-<a href="../cowboy_req.read_urlencoded_body">cowboy_req:read_urlencoded_body(3)</a>,
-<a href="../cowboy_req.read_part">cowboy_req:read_part(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.has_body">cowboy_req:has_body(3)</a>, <a href="../cowboy_req.body_length">cowboy_req:body_length(3)</a>, <a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a>, <a href="../cowboy_req.read_urlencoded_body">cowboy_req:read_urlencoded_body(3)</a>, <a href="../cowboy_req.read_part">cowboy_req:read_part(3)</a></p>
+
diff --git a/docs/en/cowboy/2.0/manual/cowboy_req.read_urlencoded_body/index.html b/docs/en/cowboy/2.0/manual/cowboy_req.read_urlencoded_body/index.html
index a0b5790f..18322249 100644
--- a/docs/en/cowboy/2.0/manual/cowboy_req.read_urlencoded_body/index.html
+++ b/docs/en/cowboy/2.0/manual/cowboy_req.read_urlencoded_body/index.html
@@ -62,126 +62,64 @@
<h1 class="lined-header"><span>cowboy_req:read_urlencoded_body(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:read_urlencoded_body - Read and parse a urlencoded request body</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:read_urlencoded_body - Read and parse a urlencoded request body</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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_urlencoded_body</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">read_urlencoded_body</span></span>(<span style="color: #009900">Req</span>, #{})
-
-<span style="font-weight: bold"><span style="color: #000000">read_urlencoded_body</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: #FF6600">ok</span>, <span style="color: #009900">Body</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">Body</span> <span style="color: #990000">::</span> [{<span style="color: #009900">Key</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="color: #009900">Value</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>() | <span style="color: #000080">true</span>}]</tt></pre></div></div>
-<div class="paragraph"><p>Read and parse a urlencoded request body.</p></div>
-<div class="paragraph"><p>This function reads the request body and parses it as
-<code>application/x-www-form-urlencoded</code>. It returns a list
-of key/values.</p></div>
-<div class="paragraph"><p>The urlencoded media type is used by Web browsers when
-submitting HTML forms using the POST method.</p></div>
-<div class="paragraph"><p>Cowboy needs to read the full body before parsing. By default
-it will read bodies of size up to 64KB. It is possible to
-provide options to read larger bodies if required.</p></div>
-<div class="paragraph"><p>Cowboy will automatically handle protocol details including
-the expect header, chunked transfer-encoding and others.</p></div>
-<div class="paragraph"><p>Once the body has been read, Cowboy sets the content-length
-header if it was not previously provided.</p></div>
-<div class="paragraph"><p>This function can only be called once. Calling it again will
-result in undefined behavior.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">read_urlencoded_body</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> <b><font color="#000000">read_urlencoded_body</font></b>(<font color="#009900">Req</font>, #{})
+
+<b><font color="#000000">read_urlencoded_body</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>(), <font color="#009900">Opts</font>)
+ <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <font color="#009900">Body</font>, <font color="#009900">Req</font>}
+
+<font color="#009900">Opts</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:read_body_opts</font></b>()
+<font color="#009900">Body</font> <font color="#990000">::</font> [{<font color="#009900">Key</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() | <font color="#000080">true</font>}]</tt></pre>
+</div></div>
+<p>Read and parse a urlencoded request body.</p>
+<p>This function reads the request body and parses it as <code>application/x-www-form-urlencoded</code>. It returns a list of key/values.</p>
+<p>The urlencoded media type is used by Web browsers when submitting HTML forms using the POST method.</p>
+<p>Cowboy needs to read the full body before parsing. By default it will read bodies of size up to 64KB. It is possible to provide options to read larger bodies if required.</p>
+<p>Cowboy will automatically handle protocol details including the expect header, chunked transfer-encoding and others.</p>
+<p>Once the body has been read, Cowboy sets the content-length header if it was not previously provided.</p>
+<p>This function can only be called once. Calling it again will result in undefined behavior.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-<dt class="hdlist1">
-Opts
-</dt>
-<dd>
-<p>
-A map of body reading options. Please refer to
-<a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a>
-for details about each option.
-</p>
-<div class="paragraph"><p>This function defaults the <code>length</code> to 64KB and the <code>period</code>
-to 5 seconds.</p></div>
+<dt>Opts</dt>
+<dd><p>A map of body reading options. Please refer to <a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a> for details about each option.</p>
+<p>This function defaults the <code>length</code> to 64KB and the <code>period</code> to 5 seconds.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>An <code>ok</code> tuple is returned containing a list of key/values found
-in the body.</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.
-For example it may have an added content-length header once the
-body has been read.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>An <code>ok</code> tuple is returned containing a list of key/values found in the body.</p>
+<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. For example it may have an added content-length header once the body has been read.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced. Replaces <code>body_qs/1,2</code>.
-</p>
+<ul><li><strong>2.0</strong>: Function introduced. Replaces <code>body_qs/1,2</code>.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Read a urlencoded body</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Read a urlencoded body</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: #FF6600">ok</span>, <span style="color: #009900">Body</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:read_urlencoded_body</span></span>(<span style="color: #009900">Req0</span>),
-{<span style="color: #990000">_</span>, <span style="color: #009900">Lang</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">lists:keyfind</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"lang"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #993399">1</span>, <span style="color: #009900">Body</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Allow large urlencoded bodies</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#009900">Body</font>, <font color="#009900">Req</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:read_urlencoded_body</font></b>(<font color="#009900">Req0</font>),
+{<font color="#990000">_</font>, <font color="#009900">Lang</font>} <font color="#990000">=</font> <b><font color="#000000">lists:keyfind</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"lang"</font><font color="#990000">&gt;&gt;</font>, <font color="#993399">1</font>, <font color="#009900">Body</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Allow large urlencoded bodies</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: #FF6600">ok</span>, <span style="color: #009900">Body</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:read_urlencoded_body</span></span>(<span style="color: #009900">Req0</span>, #{<span style="font-weight: bold"><span style="color: #000080">length</span></span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">1000000</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#009900">Body</font>, <font color="#009900">Req</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:read_urlencoded_body</font></b>(<font color="#009900">Req0</font>, #{<b><font color="#000080">length</font></b> <font color="#990000">=&gt;</font> <font color="#993399">1000000</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
<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.has_body">cowboy_req:has_body(3)</a>,
-<a href="../cowboy_req.body_length">cowboy_req:body_length(3)</a>,
-<a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a>,
-<a href="../cowboy_req.read_part">cowboy_req:read_part(3)</a>,
-<a href="../cowboy_req.read_part_body">cowboy_req:read_part_body(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.has_body">cowboy_req:has_body(3)</a>, <a href="../cowboy_req.body_length">cowboy_req:body_length(3)</a>, <a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a>, <a href="../cowboy_req.read_part">cowboy_req:read_part(3)</a>, <a href="../cowboy_req.read_part_body">cowboy_req:read_part_body(3)</a></p>
+
diff --git a/docs/en/cowboy/2.0/manual/cowboy_req.reply/index.html b/docs/en/cowboy/2.0/manual/cowboy_req.reply/index.html
index 61ba113e..36d4c9f9 100644
--- a/docs/en/cowboy/2.0/manual/cowboy_req.reply/index.html
+++ b/docs/en/cowboy/2.0/manual/cowboy_req.reply/index.html
@@ -62,164 +62,87 @@
<h1 class="lined-header"><span>cowboy_req:reply(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:reply - Send the response</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:reply - Send the response</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">reply</span></span>(<span style="color: #009900">Status</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">reply</span></span>(<span style="color: #009900">StatusCode</span>, #{}, <span style="color: #009900">Req</span>)
-
-<span style="font-weight: bold"><span style="color: #000000">reply</span></span>(<span style="color: #009900">Status</span>, <span style="color: #009900">Headers</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">Req</span>
-
-<span style="font-weight: bold"><span style="color: #000000">reply</span></span>(<span style="color: #009900">Status</span>, <span style="color: #009900">Headers</span>, <span style="color: #009900">Body</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">Req</span>
-
-<span style="color: #009900">Status</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:http_status</span></span>()
-<span style="color: #009900">Headers</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:http_headers</span></span>()
-<span style="color: #009900">Body</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:resp_body</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Send the response.</p></div>
-<div class="paragraph"><p>The header names must be given as lowercase binary strings.
-While header names are case insensitive, Cowboy requires them
-to be given as lowercase to function properly.</p></div>
-<div class="paragraph"><p>Cowboy does not allow duplicate header names. Headers set
-by this function may overwrite those set by <code>set_resp_header/3</code>
-and <code>set_resp_headers/2</code>.</p></div>
-<div class="paragraph"><p>Use <a href="../cowboy_req.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a>
-instead of this function to set cookies.</p></div>
-<div class="paragraph"><p>The <code>reply/2,3</code> functions will send the body set previously,
-if any. The <code>reply/4</code> function always sends the given body,
-overriding any previously set.</p></div>
-<div class="paragraph"><p>You do not need to set the content-length header when
-sending a response body. Cowboy takes care of it automatically.
-You should however provide a content-type header.</p></div>
-<div class="paragraph"><p>No further data can be transmitted after this function
-returns. This includes the push mechanism. Attempting to
-send two replies, or to push resources after a reply has
-been sent, will result in an error.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">reply</font></b>(<font color="#009900">Status</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> <b><font color="#000000">reply</font></b>(<font color="#009900">StatusCode</font>, #{}, <font color="#009900">Req</font>)
+
+<b><font color="#000000">reply</font></b>(<font color="#009900">Status</font>, <font color="#009900">Headers</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> <font color="#009900">Req</font>
+
+<b><font color="#000000">reply</font></b>(<font color="#009900">Status</font>, <font color="#009900">Headers</font>, <font color="#009900">Body</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> <font color="#009900">Req</font>
+
+<font color="#009900">Status</font> <font color="#990000">::</font> <b><font color="#000000">cowboy:http_status</font></b>()
+<font color="#009900">Headers</font> <font color="#990000">::</font> <b><font color="#000000">cowboy:http_headers</font></b>()
+<font color="#009900">Body</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:resp_body</font></b>()</tt></pre>
+</div></div>
+<p>Send the response.</p>
+<p>The header names must be given as lowercase binary strings. While header names are case insensitive, Cowboy requires them to be given as lowercase to function properly.</p>
+<p>Cowboy does not allow duplicate header names. Headers set by this function may overwrite those set by <code>set_resp_header/3</code> and <code>set_resp_headers/2</code>.</p>
+<p>Use <a href="../cowboy_req.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a> instead of this function to set cookies.</p>
+<p>The <code>reply/2,3</code> functions will send the body set previously, if any. The <code>reply/4</code> function always sends the given body, overriding any previously set.</p>
+<p>You do not need to set the content-length header when sending a response body. Cowboy takes care of it automatically. You should however provide a content-type header.</p>
+<p>No further data can be transmitted after this function returns. This includes the push mechanism. Attempting to send two replies, or to push resources after a reply has been sent, will result in an error.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Status
-</dt>
-<dd>
-<p>
-The status code for the response.
-</p>
+<dl><dt>Status</dt>
+<dd><p>The status code for the response.</p>
</dd>
-<dt class="hdlist1">
-Headers
-</dt>
-<dd>
-<p>
-The response headers.
-</p>
+<dt>Headers</dt>
+<dd><p>The response headers.</p>
</dd>
-</dl></div>
-<div class="paragraph"><p>Header names must be given as lowercase binary strings.</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Body
-</dt>
-<dd>
-<p>
-The body can be either a binary value, an iolist or a
-<code>sendfile</code> tuple telling Cowboy to send the contents of
-a file.
-</p>
+</dl>
+<p>Header names must be given as lowercase binary strings.</p>
+<dl><dt>Body</dt>
+<dd><p>The body can be either a binary value, an iolist or a <code>sendfile</code> tuple telling Cowboy to send the contents of a file.</p>
</dd>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A new Req object is returned.</p></div>
-<div class="paragraph"><p>The returned Req object should be used from that point onward
-as it contains updated information about the state of the request.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>A new Req object is returned.</p>
+<p>The returned Req object should be used from that point onward as it contains updated information about the state of the request.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Only the Req is returned, it is no longer wrapped in a tuple.
-</p>
+<ul><li><strong>2.0</strong>: Only the Req is returned, it is no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Reply</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Reply</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: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:reply</span></span>(<span style="color: #993399">404</span>, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Reply with custom headers</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:reply</font></b>(<font color="#993399">404</font>, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Reply with custom 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">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">401</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"www-authenticate"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Basic realm=\"erlang.org\""</span><span style="color: #990000">&gt;&gt;</span>
-}, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Reply with custom headers and a body</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:reply</font></b>(<font color="#993399">401</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"www-authenticate"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"Basic realm=\"erlang.org\""</font><font color="#990000">&gt;&gt;</font>
+}, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Reply with custom headers and a body</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: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:reply</span></span>(<span style="color: #993399">200</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/plain"</span><span style="color: #990000">&gt;&gt;</span>
-}, <span style="color: #FF0000">"Hello world!"</span>, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:reply</font></b>(<font color="#993399">200</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/plain"</font><font color="#990000">&gt;&gt;</font>
+}, <font color="#FF0000">"Hello world!"</font>, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a>,
-<a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a>,
-<a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a>,
-<a href="../cowboy_req.set_resp_body">cowboy_req:set_resp_body(3)</a>,
-<a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a>,
-<a href="../cowboy_req.push">cowboy_req:push(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a>, <a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a>, <a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a>, <a href="../cowboy_req.set_resp_body">cowboy_req:set_resp_body(3)</a>, <a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a>, <a href="../cowboy_req.push">cowboy_req:push(3)</a></p>
+
diff --git a/docs/en/cowboy/2.0/manual/cowboy_req.resp_header/index.html b/docs/en/cowboy/2.0/manual/cowboy_req.resp_header/index.html
index d8fa99c9..f3538cdf 100644
--- a/docs/en/cowboy/2.0/manual/cowboy_req.resp_header/index.html
+++ b/docs/en/cowboy/2.0/manual/cowboy_req.resp_header/index.html
@@ -62,113 +62,58 @@
<h1 class="lined-header"><span>cowboy_req:resp_header(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:resp_header - Response header</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:resp_header - Response header</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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_header</span></span>(<span style="color: #009900">Name</span>, <span style="color: #009900">Req</span>) <span style="color: #990000">-&gt;</span> <span style="font-weight: bold"><span style="color: #000000">resp_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">resp_header</span></span>(<span style="color: #009900">Name</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">Name</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: #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">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>Return the value for the given response header.</p></div>
-<div class="paragraph"><p>The response header must have been set previously using
-<a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a> or
-<a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a>.</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>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">resp_header</font></b>(<font color="#009900">Name</font>, <font color="#009900">Req</font>) <font color="#990000">-&gt;</font> <b><font color="#000000">resp_header</font></b>(<font color="#009900">Name</font>, <font color="#009900">Req</font>, <font color="#000080">undefined</font>)
+<b><font color="#000000">resp_header</font></b>(<font color="#009900">Name</font>, <font color="#009900">Req</font>, <font color="#009900">Default</font>) <font color="#990000">-&gt;</font> <b><font color="#000080">binary</font></b>() | <font color="#009900">Default</font>
+
+<font color="#009900">Name</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% lowercase; case insensitive</font></i>
+<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()</tt></pre>
+</div></div>
+<p>Return the value for the given response header.</p>
+<p>The response header must have been set previously using <a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a> or <a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a>.</p>
+<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>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Name
-</dt>
-<dd>
-<p>
-Desired response header name as a lowercase binary string.
-</p>
+<dl><dt>Name</dt>
+<dd><p>Desired response header name as a lowercase binary string.</p>
</dd>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dt>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>
+<dt>Default</dt>
+<dd><p>Default value returned when the header is missing.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<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">
+<p>The header value is returned as a binary string. When the header is missing, the default argument is returned.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced.
-</p>
+<ul><li><strong>2.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Get the content-type response header</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Get the content-type response 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">Type</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:resp_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</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-type response header with a default value</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Type</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:resp_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Get the content-type response 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">Type</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:resp_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</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">"text/html"</span><span style="color: #990000">&gt;&gt;</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Type</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:resp_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/html"</font><font color="#990000">&gt;&gt;</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.resp_headers">cowboy_req:resp_headers(3)</a>,
-<a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a>,
-<a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.resp_headers">cowboy_req:resp_headers(3)</a>, <a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a>, <a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a></p>
+
diff --git a/docs/en/cowboy/2.0/manual/cowboy_req.resp_headers/index.html b/docs/en/cowboy/2.0/manual/cowboy_req.resp_headers/index.html
index bb771112..1d44e3bd 100644
--- a/docs/en/cowboy/2.0/manual/cowboy_req.resp_headers/index.html
+++ b/docs/en/cowboy/2.0/manual/cowboy_req.resp_headers/index.html
@@ -62,79 +62,38 @@
<h1 class="lined-header"><span>cowboy_req:resp_headers(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:resp_headers - Response headers</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:resp_headers - Response headers</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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_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 response headers.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">resp_headers</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <b><font color="#000000">cowboy:http_headers</font></b>()</tt></pre>
+</div></div>
+<p>Return all response headers.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<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">
+<p>Headers are returned as a map with keys being lowercase binary strings, and values as binary strings.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced.
-</p>
+<ul><li><strong>2.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Get all response headers</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Get all response 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:resp_headers</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Headers</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:resp_headers</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.resp_header">cowboy_req:resp_header(3)</a>,
-<a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a>,
-<a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.resp_header">cowboy_req:resp_header(3)</a>, <a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a>, <a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a></p>
+
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
index 31e71352..f5a450eb 100644
--- a/docs/en/cowboy/2.0/manual/cowboy_req.scheme/index.html
+++ b/docs/en/cowboy/2.0/manual/cowboy_req.scheme/index.html
@@ -62,89 +62,52 @@
<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">
+<p>cowboy_req:scheme - URI scheme</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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
+<pre><tt><b><font color="#000000">scheme</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <font color="#009900">Scheme</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()</tt></pre>
+</div></div>
+<p>Return the scheme of the effective request URI.</p>
+<p>The scheme can also be obtained using pattern matching:</p>
+<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">
+<pre><tt>#{<font color="#FF6600">scheme</font> <font color="#990000">:=</font> <font color="#009900">Scheme</font>} <font color="#990000">=</font> <font color="#009900">Req</font><font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<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">
+<p>The scheme is returned as a binary. It is case insensitive.</p>
+<p>Cowboy will only set the scheme to <code>&lt;&lt;&quot;http&quot;&gt;&gt;</code> or <code>&lt;&lt;&quot;https&quot;&gt;&gt;</code>.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced.
-</p>
+<ul><li><strong>2.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<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
+<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">
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req0</font><font color="#990000">=</font>#{<font color="#FF6600">scheme</font> <font color="#990000">:=</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"http"</font><font color="#990000">&gt;&gt;</font>}, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ <font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:reply</font></b>(<font color="#993399">302</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"location"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <b><font color="#000000">cowboy_req:uri</font></b>(<font color="#009900">Req</font>, #{<font color="#0000FF">scheme</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"https"</font><font color="#990000">&gt;&gt;</font>})
+ }, <font color="#009900">Req0</font>),
+ {<font color="#FF6600">ok</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>};
+<b><font color="#000000">init</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">cowboy_rest</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
<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>
+<p><a href="../cowboy_req">cowboy_req(3)</a></p>
+
diff --git a/docs/en/cowboy/2.0/manual/cowboy_req.set_resp_body/index.html b/docs/en/cowboy/2.0/manual/cowboy_req.set_resp_body/index.html
index c82a6aa6..d3fda72f 100644
--- a/docs/en/cowboy/2.0/manual/cowboy_req.set_resp_body/index.html
+++ b/docs/en/cowboy/2.0/manual/cowboy_req.set_resp_body/index.html
@@ -62,138 +62,79 @@
<h1 class="lined-header"><span>cowboy_req:set_resp_body(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:set_resp_body - Set the response body</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:set_resp_body - Set the response body</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">set_resp_body</span></span>(<span style="color: #009900">Body</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">Req</span>
-
-<span style="color: #009900">Body</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:resp_body</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Set the response body.</p></div>
-<div class="paragraph"><p>The response body will be sent when a reply is initiated.
-Note that the functions <code>stream_reply/2,3</code> and <code>reply/4</code>
-will override the body set by this function.</p></div>
-<div class="paragraph"><p>This function can also be used to remove a response body
-that was set previously. To do so, simply call this function
-with an empty body.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">set_resp_body</font></b>(<font color="#009900">Body</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> <font color="#009900">Req</font>
+
+<font color="#009900">Body</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:resp_body</font></b>()</tt></pre>
+</div></div>
+<p>Set the response body.</p>
+<p>The response body will be sent when a reply is initiated. Note that the functions <code>stream_reply/2,3</code> and <code>reply/4</code> will override the body set by this function.</p>
+<p>This function can also be used to remove a response body that was set previously. To do so, simply call this function with an empty body.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Body
-</dt>
-<dd>
-<p>
-The body can be either a binary value, an iolist or a
-<code>sendfile</code> tuple telling Cowboy to send the contents of
-a file.
-</p>
+<dl><dt>Body</dt>
+<dd><p>The body can be either a binary value, an iolist or a <code>sendfile</code> tuple telling Cowboy to send the contents of a file.</p>
</dd>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A new Req object is returned.</p></div>
-<div class="paragraph"><p>The returned Req object must be used from that point onward,
-otherwise the body will not be sent in the response.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>A new Req object is returned.</p>
+<p>The returned Req object must be used from that point onward, otherwise the body will not be sent in the response.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: The function now accepts a <code>sendfile</code> tuple.
-</p>
+<ul><li><strong>2.0</strong>: The function now accepts a <code>sendfile</code> tuple.
</li>
-<li>
-<p>
-<strong>2.0</strong>: The <code>set_resp_body_fun/2,3</code> functions were removed.
-</p>
+<li><strong>2.0</strong>: The <code>set_resp_body_fun/2,3</code> functions were removed.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Set the response body</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Set the response body</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: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_body</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Hello world!"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Set the response body as an iolist</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_body</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"Hello world!"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Set the response body as an iolist</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: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_body</span></span>([
- <span style="color: #FF0000">"&lt;html&gt;&lt;head&gt;&lt;title&gt;"</span>,
- <span style="font-weight: bold"><span style="color: #000000">page_title</span></span>(),
- <span style="color: #FF0000">"&lt;/title&gt;&lt;/head&gt;&lt;body&gt;"</span>,
- <span style="font-weight: bold"><span style="color: #000000">page_body</span></span>(),
- <span style="color: #FF0000">"&lt;/body&gt;&lt;/html&gt;"</span>
-], <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Tell Cowboy to send data from a file</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_body</font></b>([
+ <font color="#FF0000">"&lt;html&gt;&lt;head&gt;&lt;title&gt;"</font>,
+ <b><font color="#000000">page_title</font></b>(),
+ <font color="#FF0000">"&lt;/title&gt;&lt;/head&gt;&lt;body&gt;"</font>,
+ <b><font color="#000000">page_body</font></b>(),
+ <font color="#FF0000">"&lt;/body&gt;&lt;/html&gt;"</font>
+], <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Tell Cowboy to send data from a file</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: #FF6600">ok</span>, <span style="color: #008080">#file_info</span>{<span style="font-weight: bold"><span style="color: #000080">size</span></span><span style="color: #990000">=</span><span style="color: #009900">Size</span>}} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">file:read_file_info</span></span>(<span style="color: #009900">Filename</span>),
-<span style="color: #009900">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_body</span></span>({<span style="color: #FF6600">sendfile</span>, <span style="color: #993399">0</span>, <span style="color: #009900">Size</span>, <span style="color: #009900">Filename</span>}, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Clear any previously set response body</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#008080">#file_info</font>{<b><font color="#000080">size</font></b><font color="#990000">=</font><font color="#009900">Size</font>}} <font color="#990000">=</font> <b><font color="#000000">file:read_file_info</font></b>(<font color="#009900">Filename</font>),
+<font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_body</font></b>({<font color="#FF6600">sendfile</font>, <font color="#993399">0</font>, <font color="#009900">Size</font>, <font color="#009900">Filename</font>}, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Clear any previously set response body</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: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_body</span></span>(<span style="color: #990000">&lt;&lt;&gt;&gt;</span>, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_body</font></b>(<font color="#990000">&lt;&lt;&gt;&gt;</font>, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.set_resp_header">cowboy_req:set_resp_header(3)</a>,
-<a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a>,
-<a href="../cowboy_req.reply">cowboy_req:reply(3)</a>,
-<a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a>, <a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a>, <a href="../cowboy_req.reply">cowboy_req:reply(3)</a>, <a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a></p>
+
diff --git a/docs/en/cowboy/2.0/manual/cowboy_req.set_resp_cookie/index.html b/docs/en/cowboy/2.0/manual/cowboy_req.set_resp_cookie/index.html
index bd1c7358..2d420826 100644
--- a/docs/en/cowboy/2.0/manual/cowboy_req.set_resp_cookie/index.html
+++ b/docs/en/cowboy/2.0/manual/cowboy_req.set_resp_cookie/index.html
@@ -62,167 +62,104 @@
<h1 class="lined-header"><span>cowboy_req:set_resp_cookie(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:set_resp_cookie - Set a cookie</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:set_resp_cookie - Set a cookie</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">set_resp_cookie</span></span>(<span style="color: #009900">Name</span>, <span style="color: #009900">Value</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">set_resp_cookie</span></span>(<span style="color: #009900">Name</span>, <span style="color: #009900">Value</span>, [], <span style="color: #009900">Req</span>)
-
-<span style="font-weight: bold"><span style="color: #000000">set_resp_cookie</span></span>(<span style="color: #009900">Name</span>, <span style="color: #009900">Value</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">Req</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="font-style: italic"><span style="color: #9A1900">%% case sensitive</span></span>
-<span style="color: #009900">Value</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>() <span style="font-style: italic"><span style="color: #9A1900">%% case sensitive</span></span>
-<span style="color: #009900">Opts</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cow_cookie:cookie_opts</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Set a cookie to be sent with the response.</p></div>
-<div class="paragraph"><p>Note that cookie names are case sensitive.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">set_resp_cookie</font></b>(<font color="#009900">Name</font>, <font color="#009900">Value</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> <b><font color="#000000">set_resp_cookie</font></b>(<font color="#009900">Name</font>, <font color="#009900">Value</font>, [], <font color="#009900">Req</font>)
+
+<b><font color="#000000">set_resp_cookie</font></b>(<font color="#009900">Name</font>, <font color="#009900">Value</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>(), <font color="#009900">Opts</font>)
+ <font color="#990000">-&gt;</font> <font color="#009900">Req</font>
+
+<font color="#009900">Name</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case sensitive</font></i>
+<font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000000">iodata</font></b>() <i><font color="#9A1900">%% case sensitive</font></i>
+<font color="#009900">Opts</font> <font color="#990000">::</font> <b><font color="#000000">cow_cookie:cookie_opts</font></b>()</tt></pre>
+</div></div>
+<p>Set a cookie to be sent with the response.</p>
+<p>Note that cookie names are case sensitive.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Name
-</dt>
-<dd>
-<p>
-Cookie name.
-</p>
+<dl><dt>Name</dt>
+<dd><p>Cookie name.</p>
</dd>
-<dt class="hdlist1">
-Value
-</dt>
-<dd>
-<p>
-Cookie value.
-</p>
+<dt>Value</dt>
+<dd><p>Cookie value.</p>
</dd>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-<dt class="hdlist1">
-Opts
-</dt>
-<dd>
-<p>
-Cookie options.
-</p>
+<dt>Opts</dt>
+<dd><p>Cookie options.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A new Req object is returned.</p></div>
-<div class="paragraph"><p>The returned Req object must be used from that point onward,
-otherwise the cookie will not be sent in the response.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>A new Req object is returned.</p>
+<p>The returned Req object must be used from that point onward, otherwise the cookie will not be sent in the response.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: <code>set_resp_cookie/3</code> introduced as an alias to <code>set_resp_cookie/4</code> with no options.
-</p>
+<ul><li><strong>2.0</strong>: <code>set_resp_cookie/3</code> introduced as an alias to <code>set_resp_cookie/4</code> with no options.
</li>
-<li>
-<p>
-<strong>2.0</strong>: The first argument type is now <code>binary()</code> instead of <code>iodata()</code>.
-</p>
+<li><strong>2.0</strong>: The first argument type is now <code>binary()</code> instead of <code>iodata()</code>.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Set a session cookie</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Set a session cookie</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">SessionID</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">base64:encode</span></span>(<span style="font-weight: bold"><span style="color: #000000">crypto:strong_rand_bytes</span></span>(<span style="color: #993399">32</span>)),
-<span style="color: #009900">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_cookie</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"sessionid"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">SessionID</span>, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Set a cookie with an expiration time</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">SessionID</font> <font color="#990000">=</font> <b><font color="#000000">base64:encode</font></b>(<b><font color="#000000">crypto:strong_rand_bytes</font></b>(<font color="#993399">32</font>)),
+<font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_cookie</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"sessionid"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">SessionID</font>, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Set a cookie with an expiration time</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: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_cookie</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"lang"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"fr-FR"</span><span style="color: #990000">&gt;&gt;</span>,
- <span style="color: #009900">Req0</span>, #{<span style="color: #0000FF">max_age</span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">3600</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Delete a cookie</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_cookie</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"lang"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"fr-FR"</font><font color="#990000">&gt;&gt;</font>,
+ <font color="#009900">Req0</font>, #{<font color="#0000FF">max_age</font> <font color="#990000">=&gt;</font> <font color="#993399">3600</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Delete a cookie</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: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_cookie</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"sessionid"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;&gt;&gt;</span>,
- <span style="color: #009900">Req0</span>, #{<span style="color: #0000FF">max_age</span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">0</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Set a cookie for a specific domain and path</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_cookie</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"sessionid"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;&gt;&gt;</font>,
+ <font color="#009900">Req0</font>, #{<font color="#0000FF">max_age</font> <font color="#990000">=&gt;</font> <font color="#993399">0</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Set a cookie for a specific domain and 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">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_cookie</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"inaccount"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"1"</span><span style="color: #990000">&gt;&gt;</span>,
- <span style="color: #009900">Req0</span>, #{<span style="color: #0000FF">domain</span> <span style="color: #990000">=&gt;</span> <span style="color: #FF0000">"my.example.org"</span>, <span style="color: #0000FF">path</span> <span style="color: #990000">=&gt;</span> <span style="color: #FF0000">"/account"</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Restrict a cookie to HTTPS</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_cookie</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"inaccount"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"1"</font><font color="#990000">&gt;&gt;</font>,
+ <font color="#009900">Req0</font>, #{<font color="#0000FF">domain</font> <font color="#990000">=&gt;</font> <font color="#FF0000">"my.example.org"</font>, <font color="#0000FF">path</font> <font color="#990000">=&gt;</font> <font color="#FF0000">"/account"</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Restrict a cookie 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="color: #009900">SessionID</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">base64:encode</span></span>(<span style="font-weight: bold"><span style="color: #000000">crypto:strong_rand_bytes</span></span>(<span style="color: #993399">32</span>)),
-<span style="color: #009900">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_cookie</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"sessionid"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">SessionID</span>,
- <span style="color: #009900">Req0</span>, #{<span style="color: #0000FF">secure</span> <span style="color: #990000">=&gt;</span> <span style="color: #000080">true</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Restrict a cookie to HTTP</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">SessionID</font> <font color="#990000">=</font> <b><font color="#000000">base64:encode</font></b>(<b><font color="#000000">crypto:strong_rand_bytes</font></b>(<font color="#993399">32</font>)),
+<font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_cookie</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"sessionid"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">SessionID</font>,
+ <font color="#009900">Req0</font>, #{<font color="#0000FF">secure</font> <font color="#990000">=&gt;</font> <font color="#000080">true</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Restrict a cookie to HTTP</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">SessionID</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">base64:encode</span></span>(<span style="font-weight: bold"><span style="color: #000000">crypto:strong_rand_bytes</span></span>(<span style="color: #993399">32</span>)),
-<span style="color: #009900">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_cookie</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"sessionid"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">SessionID</span>,
- <span style="color: #009900">Req0</span>, #{<span style="color: #0000FF">http_only</span> <span style="color: #990000">=&gt;</span> <span style="color: #000080">true</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">SessionID</font> <font color="#990000">=</font> <b><font color="#000000">base64:encode</font></b>(<b><font color="#000000">crypto:strong_rand_bytes</font></b>(<font color="#993399">32</font>)),
+<font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_cookie</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"sessionid"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">SessionID</font>,
+ <font color="#009900">Req0</font>, #{<font color="#0000FF">http_only</font> <font color="#990000">=&gt;</font> <font color="#000080">true</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
<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.set_resp_header">cowboy_req:set_resp_header(3)</a>,
-<a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a>,
-<a href="../cowboy_req.reply">cowboy_req:reply(3)</a>,
-<a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a>, <a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a>, <a href="../cowboy_req.reply">cowboy_req:reply(3)</a>, <a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a></p>
+
diff --git a/docs/en/cowboy/2.0/manual/cowboy_req.set_resp_header/index.html b/docs/en/cowboy/2.0/manual/cowboy_req.set_resp_header/index.html
index 0e29b2c6..bd957907 100644
--- a/docs/en/cowboy/2.0/manual/cowboy_req.set_resp_header/index.html
+++ b/docs/en/cowboy/2.0/manual/cowboy_req.set_resp_header/index.html
@@ -62,121 +62,60 @@
<h1 class="lined-header"><span>cowboy_req:set_resp_header(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:set_resp_header - Set a response header</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:set_resp_header - Set a response header</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">set_resp_header</span></span>(<span style="color: #009900">Name</span>, <span style="color: #009900">Value</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">Req</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="font-style: italic"><span style="color: #9A1900">%% lowercase; case insensitive</span></span>
-<span style="color: #009900">Value</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>() <span style="font-style: italic"><span style="color: #9A1900">%% case depends on header</span></span></tt></pre></div></div>
-<div class="paragraph"><p>Set a header to be sent with the response.</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>Cowboy does not allow duplicate header names. Headers set
-by this function may be overwritten by those set from the
-reply functions.</p></div>
-<div class="paragraph"><p>Use <a href="../cowboy_req.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a>
-instead of this function to set cookies.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">set_resp_header</font></b>(<font color="#009900">Name</font>, <font color="#009900">Value</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> <font color="#009900">Req</font>
+
+<font color="#009900">Name</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% lowercase; case insensitive</font></i>
+<font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000000">iodata</font></b>() <i><font color="#9A1900">%% case depends on header</font></i></tt></pre>
+</div></div>
+<p>Set a header to be sent with the response.</p>
+<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>
+<p>Cowboy does not allow duplicate header names. Headers set by this function may be overwritten by those set from the reply functions.</p>
+<p>Use <a href="../cowboy_req.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a> instead of this function to set cookies.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Name
-</dt>
-<dd>
-<p>
-Header name as a lowercase binary string.
-</p>
+<dl><dt>Name</dt>
+<dd><p>Header name as a lowercase binary string.</p>
</dd>
-<dt class="hdlist1">
-Value
-</dt>
-<dd>
-<p>
-Header value.
-</p>
+<dt>Value</dt>
+<dd><p>Header value.</p>
</dd>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A new Req object is returned.</p></div>
-<div class="paragraph"><p>The returned Req object must be used from that point onward,
-otherwise the header will not be sent in the response.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>A new Req object is returned.</p>
+<p>The returned Req object must be used from that point onward, otherwise the header will not be sent in the response.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<ul><li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Set a header in the response</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Set a header in the response</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: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"allow"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #FF0000">"GET"</span>, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Construct a header using iolists</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"allow"</font><font color="#990000">&gt;&gt;</font>, <font color="#FF0000">"GET"</font>, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Construct a header using iolists</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: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"allow"</span><span style="color: #990000">&gt;&gt;</span>,
- [<span style="font-weight: bold"><span style="color: #000000">allowed_methods</span></span>(), <span style="color: #FF0000">", OPTIONS"</span>], <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"allow"</font><font color="#990000">&gt;&gt;</font>,
+ [<b><font color="#000000">allowed_methods</font></b>(), <font color="#FF0000">", OPTIONS"</font>], <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a>,
-<a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a>,
-<a href="../cowboy_req.has_resp_header">cowboy_req:has_resp_header(3)</a>,
-<a href="../cowboy_req.resp_header">cowboy_req:resp_header(3)</a>,
-<a href="../cowboy_req.resp_headers">cowboy_req:resp_headers(3)</a>,
-<a href="../cowboy_req.delete_resp_header">cowboy_req:delete_resp_header(3)</a>,
-<a href="../cowboy_req.reply">cowboy_req:reply(3)</a>,
-<a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a>, <a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a>, <a href="../cowboy_req.has_resp_header">cowboy_req:has_resp_header(3)</a>, <a href="../cowboy_req.resp_header">cowboy_req:resp_header(3)</a>, <a href="../cowboy_req.resp_headers">cowboy_req:resp_headers(3)</a>, <a href="../cowboy_req.delete_resp_header">cowboy_req:delete_resp_header(3)</a>, <a href="../cowboy_req.reply">cowboy_req:reply(3)</a>, <a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a></p>
+
diff --git a/docs/en/cowboy/2.0/manual/cowboy_req.set_resp_headers/index.html b/docs/en/cowboy/2.0/manual/cowboy_req.set_resp_headers/index.html
index 8168794d..5a8e6469 100644
--- a/docs/en/cowboy/2.0/manual/cowboy_req.set_resp_headers/index.html
+++ b/docs/en/cowboy/2.0/manual/cowboy_req.set_resp_headers/index.html
@@ -62,109 +62,51 @@
<h1 class="lined-header"><span>cowboy_req:set_resp_headers(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:set_resp_headers - Set several response headers</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:set_resp_headers - Set several response headers</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">set_resp_headers</span></span>(<span style="color: #009900">Headers</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">Req</span>
-
-<span style="color: #009900">Headers</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:http_headers</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Set several headers to be sent with the response.</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>Cowboy does not allow duplicate header names. Headers set
-by this function may be overwritten by those set from the
-reply functions. Likewise, headers set by this function may
-overwrite headers that were set previously.</p></div>
-<div class="paragraph"><p>Use <a href="../cowboy_req.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a>
-instead of this function to set cookies.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">set_resp_headers</font></b>(<font color="#009900">Headers</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> <font color="#009900">Req</font>
+
+<font color="#009900">Headers</font> <font color="#990000">::</font> <b><font color="#000000">cowboy:http_headers</font></b>()</tt></pre>
+</div></div>
+<p>Set several headers to be sent with the response.</p>
+<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>
+<p>Cowboy does not allow duplicate header names. Headers set by this function may be overwritten by those set from the reply functions. Likewise, headers set by this function may overwrite headers that were set previously.</p>
+<p>Use <a href="../cowboy_req.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a> instead of this function to set cookies.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Headers
-</dt>
-<dd>
-<p>
-Headers as a map with keys being lowercase binary strings,
-and values as binary strings.
-</p>
+<dl><dt>Headers</dt>
+<dd><p>Headers as a map with keys being lowercase binary strings, and values as binary strings.</p>
</dd>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A new Req object is returned.</p></div>
-<div class="paragraph"><p>The returned Req object must be used from that point onward,
-otherwise the headers will not be sent in the response.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>A new Req object is returned.</p>
+<p>The returned Req object must be used from that point onward, otherwise the headers will not be sent in the response.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced.
-</p>
+<ul><li><strong>2.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Set several response headers</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Set several response 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">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_headers</span></span>(#{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/html"</span><span style="color: #990000">&gt;&gt;</span>,
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-encoding"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"gzip"</span><span style="color: #990000">&gt;&gt;</span>
-}, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_headers</font></b>(#{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/html"</font><font color="#990000">&gt;&gt;</font>,
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-encoding"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"gzip"</font><font color="#990000">&gt;&gt;</font>
+}, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a>,
-<a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a>,
-<a href="../cowboy_req.has_resp_header">cowboy_req:has_resp_header(3)</a>,
-<a href="../cowboy_req.resp_header">cowboy_req:resp_header(3)</a>,
-<a href="../cowboy_req.resp_headers">cowboy_req:resp_headers(3)</a>,
-<a href="../cowboy_req.delete_resp_header">cowboy_req:delete_resp_header(3)</a>,
-<a href="../cowboy_req.reply">cowboy_req:reply(3)</a>,
-<a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a>, <a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a>, <a href="../cowboy_req.has_resp_header">cowboy_req:has_resp_header(3)</a>, <a href="../cowboy_req.resp_header">cowboy_req:resp_header(3)</a>, <a href="../cowboy_req.resp_headers">cowboy_req:resp_headers(3)</a>, <a href="../cowboy_req.delete_resp_header">cowboy_req:delete_resp_header(3)</a>, <a href="../cowboy_req.reply">cowboy_req:reply(3)</a>, <a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a></p>
+
diff --git a/docs/en/cowboy/2.0/manual/cowboy_req.stream_body/index.html b/docs/en/cowboy/2.0/manual/cowboy_req.stream_body/index.html
index fbd8a6e4..c46178af 100644
--- a/docs/en/cowboy/2.0/manual/cowboy_req.stream_body/index.html
+++ b/docs/en/cowboy/2.0/manual/cowboy_req.stream_body/index.html
@@ -62,116 +62,56 @@
<h1 class="lined-header"><span>cowboy_req:stream_body(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:stream_body - Stream the response body</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:stream_body - Stream the response body</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">stream_body</span></span>(<span style="color: #009900">Data</span>, <span style="color: #009900">IsFin</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: #FF6600">ok</span>
-
-<span style="color: #009900">Data</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>()
-<span style="color: #009900">IsFin</span> <span style="color: #990000">::</span> <span style="color: #FF6600">fin</span> | <span style="color: #FF6600">nofin</span></tt></pre></div></div>
-<div class="paragraph"><p>Stream the response body.</p></div>
-<div class="paragraph"><p>This function may be called as many times as needed after
-initiating a response using the
-<a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a>
-function.</p></div>
-<div class="paragraph"><p>The second argument indicates if this call is the final
-call. Use the <code>nofin</code> value until you know no more data
-will be sent. The final call should use <code>fin</code> (possibly
-with an empty data value).</p></div>
-<div class="paragraph"><p>Note that not using <code>fin</code> for the final call is not an
-error; Cowboy will take care of it when the request
-handler terminates if needed. Depending on the resource
-it may however be more efficient to do it as early as
-possible.</p></div>
-<div class="paragraph"><p>You do not need to handle HEAD requests specifically as
-Cowboy will ensure no data is sent when you call this function.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">stream_body</font></b>(<font color="#009900">Data</font>, <font color="#009900">IsFin</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <font color="#FF6600">ok</font>
+
+<font color="#009900">Data</font> <font color="#990000">::</font> <b><font color="#000000">iodata</font></b>()
+<font color="#009900">IsFin</font> <font color="#990000">::</font> <font color="#FF6600">fin</font> | <font color="#FF6600">nofin</font></tt></pre>
+</div></div>
+<p>Stream the response body.</p>
+<p>This function may be called as many times as needed after initiating a response using the <a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a> function.</p>
+<p>The second argument indicates if this call is the final call. Use the <code>nofin</code> value until you know no more data will be sent. The final call should use <code>fin</code> (possibly with an empty data value).</p>
+<p>Note that not using <code>fin</code> for the final call is not an error; Cowboy will take care of it when the request handler terminates if needed. Depending on the resource it may however be more efficient to do it as early as possible.</p>
+<p>You do not need to handle HEAD requests specifically as Cowboy will ensure no data is sent when you call this function.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Data
-</dt>
-<dd>
-<p>
-The data to be sent.
-</p>
+<dl><dt>Data</dt>
+<dd><p>The data to be sent.</p>
</dd>
-<dt class="hdlist1">
-IsFin
-</dt>
-<dd>
-<p>
-A flag indicating whether this is the final piece of data
-to be sent.
-</p>
+<dt>IsFin</dt>
+<dd><p>A flag indicating whether this is the final piece of data to be sent.</p>
</dd>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The atom <code>ok</code> is always returned. It can be safely ignored.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The atom <code>ok</code> is always returned. It can be safely ignored.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced. Replaces <code>chunk/2</code>.
-</p>
+<ul><li><strong>2.0</strong>: Function introduced. Replaces <code>chunk/2</code>.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Stream the response body</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Stream the response body</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: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_reply</span></span>(<span style="color: #993399">200</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/plain"</span><span style="color: #990000">&gt;&gt;</span>
-}, <span style="color: #009900">Req0</span>),
-<span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_body</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Hello\n"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #FF6600">nofin</span>, <span style="color: #009900">Req</span>),
-<span style="font-weight: bold"><span style="color: #000000">timer:sleep</span></span>(<span style="color: #993399">1000</span>),
-<span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_body</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"World!\n"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #FF6600">fin</span>, <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:stream_reply</font></b>(<font color="#993399">200</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/plain"</font><font color="#990000">&gt;&gt;</font>
+}, <font color="#009900">Req0</font>),
+<b><font color="#000000">cowboy_req:stream_body</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"Hello\n"</font><font color="#990000">&gt;&gt;</font>, <font color="#FF6600">nofin</font>, <font color="#009900">Req</font>),
+<b><font color="#000000">timer:sleep</font></b>(<font color="#993399">1000</font>),
+<b><font color="#000000">cowboy_req:stream_body</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"World!\n"</font><font color="#990000">&gt;&gt;</font>, <font color="#FF6600">fin</font>, <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.stream_reply">cowboy_req:stream_reply(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a></p>
+
diff --git a/docs/en/cowboy/2.0/manual/cowboy_req.stream_reply/index.html b/docs/en/cowboy/2.0/manual/cowboy_req.stream_reply/index.html
index fd1fe5fe..26220717 100644
--- a/docs/en/cowboy/2.0/manual/cowboy_req.stream_reply/index.html
+++ b/docs/en/cowboy/2.0/manual/cowboy_req.stream_reply/index.html
@@ -62,148 +62,76 @@
<h1 class="lined-header"><span>cowboy_req:stream_reply(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:stream_reply - Send the response headers</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:stream_reply - Send the response headers</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">stream_reply</span></span>(<span style="color: #009900">Status</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">stream_reply</span></span>(<span style="color: #009900">StatusCode</span>, #{}, <span style="color: #009900">Req</span>)
-
-<span style="font-weight: bold"><span style="color: #000000">stream_reply</span></span>(<span style="color: #009900">Status</span>, <span style="color: #009900">Headers</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">Req</span>
-
-<span style="color: #009900">Status</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:http_status</span></span>()
-<span style="color: #009900">Headers</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:http_headers</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Send the response headers.</p></div>
-<div class="paragraph"><p>The header names must be given as lowercase binary strings.
-While header names are case insensitive, Cowboy requires them
-to be given as lowercase to function properly.</p></div>
-<div class="paragraph"><p>Cowboy does not allow duplicate header names. Headers set
-by this function may overwrite those set by <code>set_resp_header/3</code>.</p></div>
-<div class="paragraph"><p>Use <a href="../cowboy_req.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a>
-instead of this function to set cookies.</p></div>
-<div class="paragraph"><p>If a response body was set before calling this function,
-it will not be sent.</p></div>
-<div class="paragraph"><p>Use <a href="../cowboy_req.stream_body">cowboy_req:stream_body(3)</a>
-to stream the response body.</p></div>
-<div class="paragraph"><p>You may want to set the content-length header when using
-this function, if it is known in advance. This will allow
-clients using HTTP/2 and HTTP/1.0 to process the response
-more efficiently.</p></div>
-<div class="paragraph"><p>The streaming method varies depending on the protocol being
-used. HTTP/2 will use the usual DATA frames. HTTP/1.1 will
-use chunked transfer-encoding. HTTP/1.0 will send the body
-unmodified and close the connection at the end if no
-content-length was set.</p></div>
-<div class="paragraph"><p>It is not possible to push resources after this function
-returns. Any attempt will result in an error.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">stream_reply</font></b>(<font color="#009900">Status</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> <b><font color="#000000">stream_reply</font></b>(<font color="#009900">StatusCode</font>, #{}, <font color="#009900">Req</font>)
+
+<b><font color="#000000">stream_reply</font></b>(<font color="#009900">Status</font>, <font color="#009900">Headers</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> <font color="#009900">Req</font>
+
+<font color="#009900">Status</font> <font color="#990000">::</font> <b><font color="#000000">cowboy:http_status</font></b>()
+<font color="#009900">Headers</font> <font color="#990000">::</font> <b><font color="#000000">cowboy:http_headers</font></b>()</tt></pre>
+</div></div>
+<p>Send the response headers.</p>
+<p>The header names must be given as lowercase binary strings. While header names are case insensitive, Cowboy requires them to be given as lowercase to function properly.</p>
+<p>Cowboy does not allow duplicate header names. Headers set by this function may overwrite those set by <code>set_resp_header/3</code>.</p>
+<p>Use <a href="../cowboy_req.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a> instead of this function to set cookies.</p>
+<p>If a response body was set before calling this function, it will not be sent.</p>
+<p>Use <a href="../cowboy_req.stream_body">cowboy_req:stream_body(3)</a> to stream the response body.</p>
+<p>You may want to set the content-length header when using this function, if it is known in advance. This will allow clients using HTTP/2 and HTTP/1.0 to process the response more efficiently.</p>
+<p>The streaming method varies depending on the protocol being used. HTTP/2 will use the usual DATA frames. HTTP/1.1 will use chunked transfer-encoding. HTTP/1.0 will send the body unmodified and close the connection at the end if no content-length was set.</p>
+<p>It is not possible to push resources after this function returns. Any attempt will result in an error.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Status
-</dt>
-<dd>
-<p>
-The status code for the response.
-</p>
+<dl><dt>Status</dt>
+<dd><p>The status code for the response.</p>
</dd>
-<dt class="hdlist1">
-Headers
-</dt>
-<dd>
-<p>
-The response headers.
-</p>
+<dt>Headers</dt>
+<dd><p>The response headers.</p>
</dd>
-</dl></div>
-<div class="paragraph"><p>Header names must be given as lowercase binary strings.</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+</dl>
+<p>Header names must be given as lowercase binary strings.</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A new Req object is returned.</p></div>
-<div class="paragraph"><p>The returned Req object must be used from that point onward
-in order to be able to stream the response body.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>A new Req object is returned.</p>
+<p>The returned Req object must be used from that point onward in order to be able to stream the response body.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Only the Req is returned, it is no longer wrapped in a tuple.
-</p>
+<ul><li><strong>2.0</strong>: Only the Req is returned, it is no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced. Replaces <code>chunked_reply/1,2</code>.
-</p>
+<li><strong>2.0</strong>: Function introduced. Replaces <code>chunked_reply/1,2</code>.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Initiate the response</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Initiate the response</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: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_reply</span></span>(<span style="color: #993399">200</span>, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Stream the response with custom headers</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:stream_reply</font></b>(<font color="#993399">200</font>, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Stream the response with custom 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">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_reply</span></span>(<span style="color: #993399">200</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/plain"</span><span style="color: #990000">&gt;&gt;</span>
-}, <span style="color: #009900">Req0</span>),
-<span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_body</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Hello\n"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #FF6600">nofin</span>, <span style="color: #009900">Req</span>),
-<span style="font-weight: bold"><span style="color: #000000">timer:sleep</span></span>(<span style="color: #993399">1000</span>),
-<span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_body</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"World!\n"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #FF6600">fin</span>, <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:stream_reply</font></b>(<font color="#993399">200</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/plain"</font><font color="#990000">&gt;&gt;</font>
+}, <font color="#009900">Req0</font>),
+<b><font color="#000000">cowboy_req:stream_body</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"Hello\n"</font><font color="#990000">&gt;&gt;</font>, <font color="#FF6600">nofin</font>, <font color="#009900">Req</font>),
+<b><font color="#000000">timer:sleep</font></b>(<font color="#993399">1000</font>),
+<b><font color="#000000">cowboy_req:stream_body</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"World!\n"</font><font color="#990000">&gt;&gt;</font>, <font color="#FF6600">fin</font>, <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a>,
-<a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a>,
-<a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a>,
-<a href="../cowboy_req.reply">cowboy_req:reply(3)</a>,
-<a href="../cowboy_req.stream_body">cowboy_req:stream_body(3)</a>,
-<a href="../cowboy_req.push">cowboy_req:push(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a>, <a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a>, <a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a>, <a href="../cowboy_req.reply">cowboy_req:reply(3)</a>, <a href="../cowboy_req.stream_body">cowboy_req:stream_body(3)</a>, <a href="../cowboy_req.push">cowboy_req:push(3)</a></p>
+
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
index 8ba3971c..eb2f347d 100644
--- a/docs/en/cowboy/2.0/manual/cowboy_req.uri/index.html
+++ b/docs/en/cowboy/2.0/manual/cowboy_req.uri/index.html
@@ -62,177 +62,106 @@
<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">
+<p>cowboy_req:uri - Reconstructed URI</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">
+<pre><tt><b><font color="#000000">uri</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <b><font color="#000000">uri</font></b>(<font color="#009900">Req</font>, #{})
+<b><font color="#000000">uri</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>(), <font color="#009900">Opts</font>) <font color="#990000">-&gt;</font> <font color="#009900">URI</font> <font color="#990000">::</font> <b><font color="#000000">iodata</font></b>()
+
+<font color="#009900">Opts</font> <font color="#990000">::</font> #{
+ <font color="#0000FF">scheme</font> <font color="#990000">=&gt;</font> <b><font color="#000000">iodata</font></b>() | <font color="#000080">undefined</font>,
+ <font color="#0000FF">host</font> <font color="#990000">=&gt;</font> <b><font color="#000000">iodata</font></b>() | <font color="#000080">undefined</font>,
+ <font color="#0000FF">port</font> <font color="#990000">=&gt;</font> <b><font color="#000000">inet:port_number</font></b>() | <font color="#000080">undefined</font>,
+ <font color="#0000FF">path</font> <font color="#990000">=&gt;</font> <b><font color="#000000">iodata</font></b>() | <font color="#000080">undefined</font>,
+ <font color="#0000FF">qs</font> <font color="#990000">=&gt;</font> <b><font color="#000000">iodata</font></b>() | <font color="#000080">undefined</font>,
+ <font color="#0000FF">fragment</font> <font color="#990000">=&gt;</font> <b><font color="#000000">iodata</font></b>() | <font color="#000080">undefined</font>
+}</tt></pre>
+</div></div>
+<p>Reconstruct the effective request URI, optionally modifying components.</p>
+<p>By default Cowboy will build a URI using the components found in the request. Options allow disabling or replacing individual components.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>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>
+<dt>Opts</dt>
+<dd><p>Map for overriding individual components.</p>
+<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>
+<p>As this function always returns a valid URI, there are some things to note:</p>
+<ul><li>Disabling the host also disables the scheme and port.
</li>
-<li>
-<p>
-There is no fragment component by default as these are
- not sent with the request.
-</p>
+<li>There is no fragment component by default as these are not sent with the request.
</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>The port number may not appear in the resulting URI if it is the default port for the given scheme (http: 80; https: 443).
</li>
-</ul></div>
+</ul>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<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">
+<p>The reconstructed URI is returned as an iolist or a binary string.</p>
<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>
+<ul><li><strong>2.0</strong>: Individual components can be replaced or disabled.
</li>
-<li>
-<p>
-<strong>2.0</strong>: Only the URI is returned, it is no longer wrapped in a tuple.
-</p>
+<li><strong>2.0</strong>: Only the URI is returned, it is no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced. Replaces <code>host_url/1</code> and <code>url/1</code>.
-</p>
+<li><strong>2.0</strong>: Function introduced. Replaces <code>host_url/1</code> and <code>url/1</code>.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<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
+<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 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
+<pre><tt><i><font color="#9A1900">%% //example.org/path/to/res?edit=1</font></i>
+<b><font color="#000000">cowboy_req:uri</font></b>(<font color="#009900">Req</font>, #{<font color="#0000FF">scheme</font> <font color="#990000">=&gt;</font> <font color="#000080">undefined</font>})<font color="#990000">.</font></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
+<pre><tt><i><font color="#9A1900">%% </font></i><u><font color="#0000FF">http://example.org</font></u>
+<b><font color="#000000">cowboy_req:uri</font></b>(<font color="#009900">Req</font>, #{<font color="#0000FF">path</font> <font color="#990000">=&gt;</font> <font color="#000080">undefined</font>, <font color="#0000FF">qs</font> <font color="#990000">=&gt;</font> <font color="#000080">undefined</font>})<font color="#990000">.</font></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
+<pre><tt><i><font color="#9A1900">%% /path/to/res?edit=1</font></i>
+<b><font color="#000000">cowboy_req:uri</font></b>(<font color="#009900">Req</font>, #{<font color="#0000FF">host</font> <font color="#990000">=&gt;</font> <font color="#000080">undefined</font>})<font color="#990000">.</font></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
+<pre><tt><i><font color="#9A1900">%% </font></i><u><font color="#0000FF">http://example.org/path/to/res</font></u><i><font color="#9A1900">?edit=1#errors</font></i>
+<b><font color="#000000">cowboy_req:uri</font></b>(<font color="#009900">Req</font>, #{<font color="#0000FF">fragment</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"errors"</font><font color="#990000">&gt;&gt;</font>})<font color="#990000">.</font></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
+<pre><tt><i><font color="#9A1900">%% </font></i><u><font color="#0000FF">https://example.org/path/to/res</font></u><i><font color="#9A1900">?edit=1</font></i>
+<b><font color="#000000">cowboy_req:uri</font></b>(<font color="#009900">Req</font>, #{<font color="#0000FF">scheme</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"https"</font><font color="#990000">&gt;&gt;</font>})<font color="#990000">.</font></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">
+<pre><tt><b><font color="#000000">iolist_to_binary</font></b>(<b><font color="#000000">cowboy_req:uri</font></b>(<font color="#009900">Req</font>))<font color="#990000">.</font></tt></pre>
+</div></div>
<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>
+<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>
+
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
index d78d9796..840d85cd 100644
--- a/docs/en/cowboy/2.0/manual/cowboy_req.version/index.html
+++ b/docs/en/cowboy/2.0/manual/cowboy_req.version/index.html
@@ -62,88 +62,47 @@
<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">
+<p>cowboy_req:version - HTTP version</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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
+<pre><tt><b><font color="#000000">version</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <font color="#009900">Version</font> <font color="#990000">::</font> <b><font color="#000000">cowboy:http_version</font></b>()</tt></pre>
+</div></div>
+<p>Return the HTTP version used for the request.</p>
+<p>The version can also be obtained using pattern matching:</p>
+<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">
+<pre><tt>#{<font color="#FF6600">version</font> <font color="#990000">:=</font> <font color="#009900">Version</font>} <font color="#990000">=</font> <font color="#009900">Req</font><font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<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">
+<p>The HTTP version used for the request is returned as an atom. It is provided for informative purposes only.</p>
<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>
+<ul><li><strong>2.0</strong>: Only the version is returned, it is no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<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
+<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">
+<pre><tt><font color="#009900">Version</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:version</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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>
+<p><a href="../cowboy_req">cowboy_req(3)</a></p>
+
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 df055476..27d28cd0 100644
--- a/docs/en/cowboy/2.0/manual/cowboy_req/index.html
+++ b/docs/en/cowboy/2.0/manual/cowboy_req/index.html
@@ -62,389 +62,206 @@
<h1 class="lined-header"><span>cowboy_req(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req - HTTP request and response</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req - HTTP request and response</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<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>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="33%" />
-<col width="33%" />
-<col width="33%" />
-<thead>
-<tr>
-<th align="left" valign="top"> Type </th>
-<th align="left" valign="top"> Name pattern </th>
-<th align="left" valign="top"> Return type</th>
+<p>The module <code>cowboy_req</code> provides functions to access, manipulate and respond to requests.</p>
+<p>There are four types of functions in this module. They can be differentiated by their name and their return type:</p>
+<table rules="all" width="100%" frame="border"
+ cellspacing="0" cellpadding="4">
+<thead><tr><th>Type</th>
+<th>Name pattern</th>
+<th>Return type</th>
+</tr></thead><tbody><tr><td>access</td>
+<td>no verb, parse_*, match_*</td>
+<td><code>Value</code></td>
</tr>
-</thead>
-<tbody>
-<tr>
-<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><td>question</td>
+<td>has_*</td>
+<td><code>boolean()</code></td>
</tr>
-<tr>
-<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><td>modification</td>
+<td>set_*</td>
+<td><code>Req</code></td>
</tr>
-<tr>
-<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><td>action</td>
+<td>any other verb</td>
+<td><code>ok | {Result, Value, Req}</code></td>
</tr>
-<tr>
-<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>
-<div class="sect1">
+</tbody></table>
+<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&apos;s only possible to send one response, and to read the body once.</p>
<h2 id="_exports">Exports</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Raw request:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../cowboy_req.method">cowboy_req:method(3)</a> - HTTP method
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.version">cowboy_req:version(3)</a> - HTTP version
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.scheme">cowboy_req:scheme(3)</a> - URI scheme
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.host">cowboy_req:host(3)</a> - URI host name
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.port">cowboy_req:port(3)</a> - URI port number
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.path">cowboy_req:path(3)</a> - URI path
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.qs">cowboy_req:qs(3)</a> - URI query string
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.uri">cowboy_req:uri(3)</a> - Reconstructed URI
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.header">cowboy_req:header(3)</a> - HTTP header
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.headers">cowboy_req:headers(3)</a> - HTTP headers
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.peer">cowboy_req:peer(3)</a> - Peer address and port
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>Processed request:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../cowboy_req.parse_qs">cowboy_req:parse_qs(3)</a> - Parse the query string
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.match_qs">cowboy_req:match_qs(3)</a> - Match the query string against constraints
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.parse_header">cowboy_req:parse_header(3)</a> - Parse the given HTTP header
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.parse_cookies">cowboy_req:parse_cookies(3)</a> - Parse cookie headers
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.match_cookies">cowboy_req:match_cookies(3)</a> - Match cookies against constraints
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.binding">cowboy_req:binding(3)</a> - Access a value bound from the route
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.bindings">cowboy_req:bindings(3)</a> - Access all values bound from the route
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.host_info">cowboy_req:host_info(3)</a> - Access the route&#8217;s heading host segments
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.path_info">cowboy_req:path_info(3)</a> - Access the route&#8217;s trailing path segments
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>Request body:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../cowboy_req.has_body">cowboy_req:has_body(3)</a> - Is there a request body?
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.body_length">cowboy_req:body_length(3)</a> - Body length
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a> - Read the request body
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.read_urlencoded_body">cowboy_req:read_urlencoded_body(3)</a> - Read and parse a urlencoded request body
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.read_part">cowboy_req:read_part(3)</a> - Read the next multipart headers
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.read_part_body">cowboy_req:read_part_body(3)</a> - Read the current part&#8217;s body
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>Response:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../cowboy_req.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a> - Set a cookie
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a> - Set a response header
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a> - Set several response headers
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.has_resp_header">cowboy_req:has_resp_header(3)</a> - Is the given response header set?
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.resp_header">cowboy_req:resp_header(3)</a> - Response header
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.resp_headers">cowboy_req:resp_headers(3)</a> - Response headers
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.delete_resp_header">cowboy_req:delete_resp_header(3)</a> - Delete a response header
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.set_resp_body">cowboy_req:set_resp_body(3)</a> - Set the response body
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.has_resp_body">cowboy_req:has_resp_body(3)</a> - Is there a response body?
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.reply">cowboy_req:reply(3)</a> - Send the response
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a> - Send the response headers
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.stream_body">cowboy_req:stream_body(3)</a> - Stream the response body
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.push">cowboy_req:push(3)</a> - Push a resource to the client
-</p>
-</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+<p>Raw request:</p>
+<ul><li><a href="../cowboy_req.method">cowboy_req:method(3)</a> - HTTP method
+</li>
+<li><a href="../cowboy_req.version">cowboy_req:version(3)</a> - HTTP version
+</li>
+<li><a href="../cowboy_req.scheme">cowboy_req:scheme(3)</a> - URI scheme
+</li>
+<li><a href="../cowboy_req.host">cowboy_req:host(3)</a> - URI host name
+</li>
+<li><a href="../cowboy_req.port">cowboy_req:port(3)</a> - URI port number
+</li>
+<li><a href="../cowboy_req.path">cowboy_req:path(3)</a> - URI path
+</li>
+<li><a href="../cowboy_req.qs">cowboy_req:qs(3)</a> - URI query string
+</li>
+<li><a href="../cowboy_req.uri">cowboy_req:uri(3)</a> - Reconstructed URI
+</li>
+<li><a href="../cowboy_req.header">cowboy_req:header(3)</a> - HTTP header
+</li>
+<li><a href="../cowboy_req.headers">cowboy_req:headers(3)</a> - HTTP headers
+</li>
+<li><a href="../cowboy_req.peer">cowboy_req:peer(3)</a> - Peer address and port
+</li>
+</ul>
+<p>Processed request:</p>
+<ul><li><a href="../cowboy_req.parse_qs">cowboy_req:parse_qs(3)</a> - Parse the query string
+</li>
+<li><a href="../cowboy_req.match_qs">cowboy_req:match_qs(3)</a> - Match the query string against constraints
+</li>
+<li><a href="../cowboy_req.parse_header">cowboy_req:parse_header(3)</a> - Parse the given HTTP header
+</li>
+<li><a href="../cowboy_req.parse_cookies">cowboy_req:parse_cookies(3)</a> - Parse cookie headers
+</li>
+<li><a href="../cowboy_req.match_cookies">cowboy_req:match_cookies(3)</a> - Match cookies against constraints
+</li>
+<li><a href="../cowboy_req.binding">cowboy_req:binding(3)</a> - Access a value bound from the route
+</li>
+<li><a href="../cowboy_req.bindings">cowboy_req:bindings(3)</a> - Access all values bound from the route
+</li>
+<li><a href="../cowboy_req.host_info">cowboy_req:host_info(3)</a> - Access the route&apos;s heading host segments
+</li>
+<li><a href="../cowboy_req.path_info">cowboy_req:path_info(3)</a> - Access the route&apos;s trailing path segments
+</li>
+</ul>
+<p>Request body:</p>
+<ul><li><a href="../cowboy_req.has_body">cowboy_req:has_body(3)</a> - Is there a request body?
+</li>
+<li><a href="../cowboy_req.body_length">cowboy_req:body_length(3)</a> - Body length
+</li>
+<li><a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a> - Read the request body
+</li>
+<li><a href="../cowboy_req.read_urlencoded_body">cowboy_req:read_urlencoded_body(3)</a> - Read and parse a urlencoded request body
+</li>
+<li><a href="../cowboy_req.read_part">cowboy_req:read_part(3)</a> - Read the next multipart headers
+</li>
+<li><a href="../cowboy_req.read_part_body">cowboy_req:read_part_body(3)</a> - Read the current part&apos;s body
+</li>
+</ul>
+<p>Response:</p>
+<ul><li><a href="../cowboy_req.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a> - Set a cookie
+</li>
+<li><a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a> - Set a response header
+</li>
+<li><a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a> - Set several response headers
+</li>
+<li><a href="../cowboy_req.has_resp_header">cowboy_req:has_resp_header(3)</a> - Is the given response header set?
+</li>
+<li><a href="../cowboy_req.resp_header">cowboy_req:resp_header(3)</a> - Response header
+</li>
+<li><a href="../cowboy_req.resp_headers">cowboy_req:resp_headers(3)</a> - Response headers
+</li>
+<li><a href="../cowboy_req.delete_resp_header">cowboy_req:delete_resp_header(3)</a> - Delete a response header
+</li>
+<li><a href="../cowboy_req.set_resp_body">cowboy_req:set_resp_body(3)</a> - Set the response body
+</li>
+<li><a href="../cowboy_req.has_resp_body">cowboy_req:has_resp_body(3)</a> - Is there a response body?
+</li>
+<li><a href="../cowboy_req.reply">cowboy_req:reply(3)</a> - Send the response
+</li>
+<li><a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a> - Send the response headers
+</li>
+<li><a href="../cowboy_req.stream_body">cowboy_req:stream_body(3)</a> - Stream the response body
+</li>
+<li><a href="../cowboy_req.push">cowboy_req:push(3)</a> - Push a resource to the client
+</li>
+</ul>
<h2 id="_types">Types</h2>
-<div class="sectionbody">
-<div class="sect2">
<h3 id="_push_opts">push_opts()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">
+<pre><tt><b><font color="#000000">push_opts</font></b>() <font color="#990000">::</font> #{
+ <font color="#0000FF">method</font> <font color="#990000">=&gt;</font> <b><font color="#000080">binary</font></b>(), <i><font color="#9A1900">%% case sensitive</font></i>
+ <font color="#0000FF">scheme</font> <font color="#990000">=&gt;</font> <b><font color="#000080">binary</font></b>(), <i><font color="#9A1900">%% lowercase; case insensitive</font></i>
+ <font color="#0000FF">host</font> <font color="#990000">=&gt;</font> <b><font color="#000080">binary</font></b>(), <i><font color="#9A1900">%% lowercase; case insensitive</font></i>
+ <font color="#0000FF">port</font> <font color="#990000">=&gt;</font> <b><font color="#000000">inet:port_number</font></b>(),
+ <font color="#0000FF">qs</font> <font color="#990000">=&gt;</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case sensitive</font></i>
+}</tt></pre>
+</div></div>
+<p>Push options.</p>
+<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&apos;s URI.</p>
<h3 id="_read_body_opts">read_body_opts()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">
+<pre><tt><b><font color="#000000">read_body_opts</font></b>() <font color="#990000">::</font> #{
+ <b><font color="#000080">length</font></b> <font color="#990000">=&gt;</font> <b><font color="#000000">non_neg_integer</font></b>(),
+ <font color="#0000FF">period</font> <font color="#990000">=&gt;</font> <b><font color="#000000">non_neg_integer</font></b>(),
+ <font color="#0000FF">timeout</font> <font color="#990000">=&gt;</font> <b><font color="#000000">timeout</font></b>()
+}</tt></pre>
+</div></div>
+<p>Body reading options.</p>
+<p>The defaults are function-specific.</p>
<h3 id="_req">req()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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
+<pre><tt><b><font color="#000000">req</font></b>() <font color="#990000">::</font> #{
+ <font color="#FF6600">method</font> <font color="#990000">:=</font> <b><font color="#000080">binary</font></b>(), <i><font color="#9A1900">%% case sensitive</font></i>
+ <font color="#FF6600">version</font> <font color="#990000">:=</font> <b><font color="#000000">cowboy:http_version</font></b>() | <b><font color="#000080">atom</font></b>(),
+ <font color="#FF6600">scheme</font> <font color="#990000">:=</font> <b><font color="#000080">binary</font></b>(), <i><font color="#9A1900">%% lowercase; case insensitive</font></i>
+ <font color="#FF6600">host</font> <font color="#990000">:=</font> <b><font color="#000080">binary</font></b>(), <i><font color="#9A1900">%% lowercase; case insensitive</font></i>
+ <font color="#FF6600">port</font> <font color="#990000">:=</font> <b><font color="#000000">inet:port_number</font></b>(),
+ <font color="#FF6600">path</font> <font color="#990000">:=</font> <b><font color="#000080">binary</font></b>(), <i><font color="#9A1900">%% case sensitive</font></i>
+ <font color="#FF6600">qs</font> <font color="#990000">:=</font> <b><font color="#000080">binary</font></b>(), <i><font color="#9A1900">%% case sensitive</font></i>
+ <font color="#FF6600">headers</font> <font color="#990000">:=</font> <b><font color="#000000">cowboy:http_headers</font></b>(),
+ <font color="#FF6600">peer</font> <font color="#990000">:=</font> {<b><font color="#000000">inet:ip_address</font></b>(), <b><font color="#000000">inet:port_number</font></b>()}
+}</tt></pre>
+</div></div>
+<p>The Req object.</p>
+<p>Contains information about the request and response. While some fields are publicly documented, others aren&apos;t and shouldn&apos;t be used.</p>
+<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 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">
+<pre><tt><font color="#009900">Req</font>#{<font color="#009900">_myapp_auth_method</font> <font color="#990000">=&gt;</font> <font color="#FF6600">pubkey</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
<h3 id="_resp_body">resp_body()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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>}
+<pre><tt><b><font color="#000000">resp_body</font></b>() <font color="#990000">::</font> <b><font color="#000000">iodata</font></b>()
+ | {<font color="#FF6600">sendfile</font>, <font color="#009900">Offset</font>, <font color="#009900">Length</font>, <font color="#009900">Filename</font>}
-<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">non_neg_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
+<font color="#009900">Offset</font> <font color="#990000">::</font> <b><font color="#000000">non_neg_integer</font></b>()
+<font color="#009900">Length</font> <font color="#990000">::</font> <b><font color="#000000">non_neg_integer</font></b>()
+<font color="#009900">Filename</font> <font color="#990000">::</font> <b><font color="#000000">file:name_all</font></b>()</tt></pre>
+</div></div>
+<p>Response body.</p>
+<p>It can take two forms: the actual data to be sent or a tuple indicating which file to send.</p>
+<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 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>Note that the length must be greater than zero for any data
-to be sent. Cowboy will send an empty body when the length
-is zero.</p></div>
-</div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#993399">1</font><font color="#990000">&gt;</font> <font color="#009900">RespBody</font> <font color="#990000">=</font> [<font color="#FF0000">"Hello "</font>, [<font color="#990000">&lt;&lt;</font><font color="#FF0000">"world"</font><font color="#990000">&gt;&gt;</font>, <font color="#FF0000">$!</font>]]<font color="#990000">.</font>
+[<font color="#FF0000">"Hello "</font>,[<font color="#990000">&lt;&lt;</font><font color="#FF0000">"world"</font><font color="#990000">&gt;&gt;</font>,<font color="#993399">33</font>]]
+<font color="#993399">2</font><font color="#990000">&gt;</font> <b><font color="#000000">io:format</font></b>(<font color="#FF0000">"~s~n"</font>, [<font color="#009900">RespBody</font>])<font color="#990000">.</font>
+<font color="#009900">Hello</font> <font color="#FF6600">world</font><font color="#990000">!</font></tt></pre>
+</div></div>
+<p>Note that the length must be greater than zero for any data to be sent. Cowboy will send an empty body when the length is zero.</p>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="..">cowboy(7)</a></p></div>
-</div>
-</div>
+<p><a href="..">cowboy(7)</a></p>
+
diff --git a/docs/en/cowboy/2.0/manual/cowboy_rest/index.html b/docs/en/cowboy/2.0/manual/cowboy_rest/index.html
index dc58cef1..9b2e96d4 100644
--- a/docs/en/cowboy/2.0/manual/cowboy_rest/index.html
+++ b/docs/en/cowboy/2.0/manual/cowboy_rest/index.html
@@ -62,641 +62,464 @@
<h1 class="lined-header"><span>cowboy_rest(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_rest - REST handlers</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_rest - REST handlers</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The module <code>cowboy_rest</code> implements the HTTP state machine.</p></div>
-<div class="paragraph"><p>Implementing REST handlers is not enough to provide a REST
-interface; this interface must also follow the REST
-constraints including HATEOAS (hypermedia as the engine
-of application state).</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The module <code>cowboy_rest</code> implements the HTTP state machine.</p>
+<p>Implementing REST handlers is not enough to provide a REST interface; this interface must also follow the REST constraints including HATEOAS (hypermedia as the engine of application state).</p>
<h2 id="_callbacks">Callbacks</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>REST handlers implement the following interface:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
-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="color: #FF6600">cowboy_rest</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
-
-<span style="color: #009900">Callback</span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>)
- <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
- | {<span style="color: #FF6600">stop</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
-
-<span style="font-weight: bold"><span style="color: #000000">terminate</span></span>(<span style="color: #009900">Reason</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> <span style="color: #FF6600">ok</span> <span style="font-style: italic"><span style="color: #9A1900">%% optional</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">State</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()
-<span style="color: #009900">Reason</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">normal</span></span>
- | {<span style="color: #FF6600">crash</span>, <span style="color: #FF6600">error</span> | <span style="font-weight: bold"><span style="color: #000080">exit</span></span> | <span style="font-weight: bold"><span style="color: #000080">throw</span></span>, <span style="font-weight: bold"><span style="color: #000000">any</span></span>()}
-
-<span style="color: #009900">Callback</span> <span style="color: #990000">-</span> <span style="color: #FF6600">see</span> <span style="color: #FF6600">below</span>
-<span style="color: #009900">Result</span> <span style="color: #990000">-</span> <span style="color: #FF6600">see</span> <span style="color: #FF6600">below</span>
-<span style="color: #009900">Default</span> <span style="color: #990000">-</span> <span style="color: #FF6600">see</span> <span style="color: #FF6600">below</span></tt></pre></div></div>
-<div class="paragraph"><p>The <code>init/2</code> callback is common to all handlers. To switch
-to the REST handler behavior, it must return <code>cowboy_rest</code>
-as the first element of the tuple.</p></div>
-<div class="paragraph"><p>The <code>Callback/2</code> above represents all the REST-specific
-callbacks. They are described in the following section
-of this manual. REST-specific callbacks differ by their
-name, semantics, result and default values. The default
-value is the one used when the callback has not been
-implemented. They otherwise all follow the same interface.</p></div>
-<div class="paragraph"><p>The <code>stop</code> tuple can be returned to stop REST processing.
-If no response was sent before then, Cowboy will send a
-<em>204 No Content</em>.</p></div>
-<div class="paragraph"><p>The optional <code>terminate/3</code> callback will ultimately be called
-with the reason for the termination of the handler.
-Cowboy will terminate the process right after this. There
-is no need to perform any cleanup in this callback.</p></div>
-<div class="paragraph"><p>The following terminate reasons are defined for loop handlers:</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-normal
-</dt>
-<dd>
-<p>
- The handler terminated normally.
-</p>
+<p>REST handlers implement the following interface:</p>
+<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><b><font color="#000000">init</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>)
+ <font color="#990000">-&gt;</font> {<font color="#FF6600">cowboy_rest</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
+
+<font color="#009900">Callback</font>(<font color="#009900">Req</font>, <font color="#009900">State</font>)
+ <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
+ | {<font color="#FF6600">stop</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
+
+<b><font color="#000000">terminate</font></b>(<font color="#009900">Reason</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> <font color="#FF6600">ok</font> <i><font color="#9A1900">%% optional</font></i>
+
+<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()
+<font color="#009900">State</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()
+<font color="#009900">Reason</font> <font color="#990000">::</font> <b><font color="#000080">normal</font></b>
+ | {<font color="#FF6600">crash</font>, <font color="#FF6600">error</font> | <b><font color="#000080">exit</font></b> | <b><font color="#000080">throw</font></b>, <b><font color="#000000">any</font></b>()}
+
+<font color="#009900">Callback</font> <font color="#990000">-</font> <font color="#FF6600">see</font> <font color="#FF6600">below</font>
+<font color="#009900">Result</font> <font color="#990000">-</font> <font color="#FF6600">see</font> <font color="#FF6600">below</font>
+<font color="#009900">Default</font> <font color="#990000">-</font> <font color="#FF6600">see</font> <font color="#FF6600">below</font></tt></pre>
+</div></div>
+<p>The <code>init/2</code> callback is common to all handlers. To switch to the REST handler behavior, it must return <code>cowboy_rest</code> as the first element of the tuple.</p>
+<p>The <code>Callback/2</code> above represents all the REST-specific callbacks. They are described in the following section of this manual. REST-specific callbacks differ by their name, semantics, result and default values. The default value is the one used when the callback has not been implemented. They otherwise all follow the same interface.</p>
+<p>The <code>stop</code> tuple can be returned to stop REST processing. If no response was sent before then, Cowboy will send a <em>204 No Content</em>.</p>
+<p>The optional <code>terminate/3</code> callback will ultimately be called with the reason for the termination of the handler. Cowboy will terminate the process right after this. There is no need to perform any cleanup in this callback.</p>
+<p>The following terminate reasons are defined for loop handlers:</p>
+<dl><dt>normal</dt>
+<dd><p>The handler terminated normally.</p>
</dd>
-<dt class="hdlist1">
-{crash, Class, Reason}
-</dt>
-<dd>
-<p>
- A crash occurred in the handler. <code>Class</code> and <code>Reason</code> can be
- used to obtain more information about the crash. The function
- <code>erlang:get_stacktrace/0</code> can also be called to obtain the
- stacktrace of the process when the crash occurred.
-</p>
+<dt>{crash, Class, Reason}</dt>
+<dd><p>A crash occurred in the handler. <code>Class</code> and <code>Reason</code> can be used to obtain more information about the crash. The function <code>erlang:get_stacktrace/0</code> can also be called to obtain the stacktrace of the process when the crash occurred.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_rest_callbacks">REST callbacks</h2>
-<div class="sectionbody">
-<div class="sect2">
<h3 id="_acceptcallback">AcceptCallback</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #009900">AcceptCallback</span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
-
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="color: #000080">true</span> | {<span style="color: #000080">true</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: #000080">false</span>}
-<span style="color: #009900">Default</span> <span style="color: #990000">-</span> <span style="color: #FF6600">crash</span></tt></pre></div></div>
-<div class="paragraph"><p>Process the request body.</p></div>
-<div class="paragraph"><p>This function should create or update the resource using the
-request body.</p></div>
-<div class="paragraph"><p>For PUT requests, the body is a representation of the resource
-that is being created or replaced.</p></div>
-<div class="paragraph"><p>For POST requests, the body is typically application-specific
-instructions on how to process the request, but it may also
-be a representation of the resource. When creating a new
-resource with POST at a different location, return <code>{true, URI}</code>
-with <code>URI</code> the new location.</p></div>
-<div class="paragraph"><p>For PATCH requests, the body is a series of instructions on
-how to update the resource. Patch files or JSON Patch are
-examples of such media types.</p></div>
-<div class="paragraph"><p>A response body may be sent. The appropriate media type, charset
-and language for the response can be retrieved from the Req
-object using the <code>media_type</code>, <code>charset</code> and <code>language</code> keys,
-respectively. The body can be set using
-<a href="../cowboy_req.set_resp_body">cowboy_req:set_resp_body(3)</a>.</p></div>
-</div>
-<div class="sect2">
+<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><font color="#009900">AcceptCallback</font>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
+
+<font color="#009900">Result</font> <font color="#990000">::</font> <font color="#000080">true</font> | {<font color="#000080">true</font>, <font color="#009900">URI</font> <font color="#990000">::</font> <b><font color="#000000">iodata</font></b>()} | <font color="#000080">false</font>}
+<font color="#009900">Default</font> <font color="#990000">-</font> <font color="#FF6600">crash</font></tt></pre>
+</div></div>
+<p>Process the request body.</p>
+<p>This function should create or update the resource using the request body.</p>
+<p>For PUT requests, the body is a representation of the resource that is being created or replaced.</p>
+<p>For POST requests, the body is typically application-specific instructions on how to process the request, but it may also be a representation of the resource. When creating a new resource with POST at a different location, return <code>{true, URI}</code> with <code>URI</code> the new location.</p>
+<p>For PATCH requests, the body is a series of instructions on how to update the resource. Patch files or JSON Patch are examples of such media types.</p>
+<p>A response body may be sent. The appropriate media type, charset and language for the response can be retrieved from the Req object using the <code>media_type</code>, <code>charset</code> and <code>language</code> keys, respectively. The body can be set using <a href="../cowboy_req.set_resp_body">cowboy_req:set_resp_body(3)</a>.</p>
<h3 id="_allowed_methods">allowed_methods</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">allowed_methods</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">allowed_methods</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</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: #009900">Default</span> <span style="color: #990000">::</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">"HEAD"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"OPTIONS"</span><span style="color: #990000">&gt;&gt;</span>]</tt></pre></div></div>
-<div class="paragraph"><p>Return the list of allowed methods.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> [<b><font color="#000080">binary</font></b>()] <i><font color="#9A1900">%% case sensitive</font></i>
+<font color="#009900">Default</font> <font color="#990000">::</font> [<font color="#990000">&lt;&lt;</font><font color="#FF0000">"GET"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"HEAD"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"OPTIONS"</font><font color="#990000">&gt;&gt;</font>]</tt></pre>
+</div></div>
+<p>Return the list of allowed methods.</p>
<h3 id="_allow_missing_post">allow_missing_post</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">allow_missing_post</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">allow_missing_post</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()
-<span style="color: #009900">Default</span> <span style="color: #990000">::</span> <span style="color: #000080">true</span></tt></pre></div></div>
-<div class="paragraph"><p>Return whether POST is allowed when the resource doesn&#8217;t exist.</p></div>
-<div class="paragraph"><p>Returning <code>true</code> here means that a new resource will be
-created. The URI for the newly created resource should be
-returned from the <code>AcceptCallback</code> function.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> <b><font color="#000000">boolean</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <font color="#000080">true</font></tt></pre>
+</div></div>
+<p>Return whether POST is allowed when the resource doesn&apos;t exist.</p>
+<p>Returning <code>true</code> here means that a new resource will be created. The URI for the newly created resource should be returned from the <code>AcceptCallback</code> function.</p>
<h3 id="_charsets_provided">charsets_provided</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">charsets_provided</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">charsets_provided</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</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: #009900">Default</span> <span style="color: #990000">-</span> <span style="color: #FF6600">skip</span> <span style="color: #FF6600">this</span> <span style="color: #FF6600">step</span></tt></pre></div></div>
-<div class="paragraph"><p>Return the list of charsets the resource provides in order
-of preference.</p></div>
-<div class="paragraph"><p>During content negotiation Cowboy will pick the most
-appropriate charset for the client. The client advertises
-charsets it prefers with the accept-charset header. When
-that header is missing, Cowboy picks the first charset
-from the resource.</p></div>
-<div class="paragraph"><p>Cowboy will add the negotiated <code>charset</code> to the Req object
-after this step completes:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<font color="#009900">Result</font> <font color="#990000">::</font> [<b><font color="#000080">binary</font></b>()] <i><font color="#9A1900">%% lowercase; case insensitive</font></i>
+<font color="#009900">Default</font> <font color="#990000">-</font> <font color="#FF6600">skip</font> <font color="#FF6600">this</font> <font color="#FF6600">step</font></tt></pre>
+</div></div>
+<p>Return the list of charsets the resource provides in order of preference.</p>
+<p>During content negotiation Cowboy will pick the most appropriate charset for the client. The client advertises charsets it prefers with the accept-charset header. When that header is missing, Cowboy picks the first charset from the resource.</p>
+<!-- @todo We should explain precisely how charsets are picked.-->
+<p>Cowboy will add the negotiated <code>charset</code> to the Req object after this step completes:</p>
+<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: #0000FF">charset</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>
-}</tt></pre></div></div>
-</div>
-<div class="sect2">
+<pre><tt><b><font color="#000000">req</font></b>() <font color="#990000">::</font> #{
+ <font color="#0000FF">charset</font> <font color="#990000">=&gt;</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% lowercase; case insensitive</font></i>
+}</tt></pre>
+</div></div>
<h3 id="_content_types_accepted">content_types_accepted</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
-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">content_types_accepted</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
-
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> [{<span style="font-weight: bold"><span style="color: #000080">binary</span></span>() | <span style="color: #009900">ParsedMime</span>, <span style="color: #009900">AcceptCallback</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">atom</span></span>()}]
-<span style="color: #009900">ParsedMime</span> <span style="color: #990000">::</span> {<span style="color: #009900">Type</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="color: #009900">SubType</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="color: #FF6600">'*'</span> | <span style="color: #009900">Params</span>}
-<span style="color: #009900">Params</span> <span style="color: #990000">::</span> [{<span style="color: #009900">Key</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="color: #009900">Value</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()}]
-
-<span style="color: #009900">Default</span> <span style="color: #990000">-</span> <span style="color: #FF6600">crash</span></tt></pre></div></div>
-<div class="paragraph"><p>Return the list of media types the resource accepts in
-order of preference.</p></div>
-<div class="paragraph"><p>A media type is made of different parts. The media type
-<code>text/html;charset=utf-8</code> is of type <code>text</code>, subtype <code>html</code>
-and has a single parameter <code>charset</code> with value <code>utf-8</code>.</p></div>
-<div class="paragraph"><p>Cowboy will match the content-type request header against
-the media types the server accepts and select the appropriate
-callback. When that header is missing, or when the server does not
-accept this media type, the request fails and an error response
-is returned. Cowboy will execute the callback immediately otherwise.</p></div>
-<div class="paragraph"><p>An empty parameters list <code>[]</code> means that no parameters will be
-accepted. When any parameter is acceptable, the tuple form
-should be used with parameters as the atom <code>'*'</code>.</p></div>
-<div class="paragraph"><p>Cowboy treats all parameters as case sensitive, except for the
-<code>charset</code> parameter, which is known to be case insensitive. You
-should therefore always provide the charset as a lowercase
-binary string.</p></div>
-</div>
-<div class="sect2">
+<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><b><font color="#000000">content_types_accepted</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
+
+<font color="#009900">Result</font> <font color="#990000">::</font> [{<b><font color="#000080">binary</font></b>() | <font color="#009900">ParsedMime</font>, <font color="#009900">AcceptCallback</font> <font color="#990000">::</font> <b><font color="#000080">atom</font></b>()}]
+<font color="#009900">ParsedMime</font> <font color="#990000">::</font> {<font color="#009900">Type</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">SubType</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#FF6600">'*'</font> | <font color="#009900">Params</font>}
+<font color="#009900">Params</font> <font color="#990000">::</font> [{<font color="#009900">Key</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()}]
+
+<font color="#009900">Default</font> <font color="#990000">-</font> <font color="#FF6600">crash</font></tt></pre>
+</div></div>
+<!-- @todo Case sensitivity of parsed mime content?-->
+<p>Return the list of media types the resource accepts in order of preference.</p>
+<p>A media type is made of different parts. The media type <code>text/html;charset=utf-8</code> is of type <code>text</code>, subtype <code>html</code> and has a single parameter <code>charset</code> with value <code>utf-8</code>.</p>
+<!-- @todo Cowboy needs to ignore the boundary parameter for-->
+<!-- multipart, as we never want to match against it. Or allow-->
+<!-- ignoring specific parameters at the very least.-->
+<p>Cowboy will match the content-type request header against the media types the server accepts and select the appropriate callback. When that header is missing, or when the server does not accept this media type, the request fails and an error response is returned. Cowboy will execute the callback immediately otherwise.</p>
+<!-- @todo We should explain precisely how media types are picked.-->
+<p>An empty parameters list <code>[]</code> means that no parameters will be accepted. When any parameter is acceptable, the tuple form should be used with parameters as the atom <code>&apos;*&apos;</code>.</p>
+<p>Cowboy treats all parameters as case sensitive, except for the <code>charset</code> parameter, which is known to be case insensitive. You should therefore always provide the charset as a lowercase binary string.</p>
+<!-- @todo Maybe this should be in the user guide instead.-->
+<!-- This function will be called for POST, PUT and PATCH requests.-->
+<!-- It is entirely possible to define different callbacks for different-->
+<!-- methods if the handling of the request differs. Simply verify-->
+<!-- what the method is with `cowboy_req:method/1` and return a-->
+<!-- different list for each methods.-->
<h3 id="_content_types_provided">content_types_provided</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
-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">content_types_provided</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
-
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> [{<span style="font-weight: bold"><span style="color: #000080">binary</span></span>() | <span style="color: #009900">ParsedMime</span>, <span style="color: #009900">ProvideCallback</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">atom</span></span>()}]
-<span style="color: #009900">ParsedMime</span> <span style="color: #990000">::</span> {<span style="color: #009900">Type</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="color: #009900">SubType</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="color: #FF6600">'*'</span> | <span style="color: #009900">Params</span>}
-<span style="color: #009900">Params</span> <span style="color: #990000">::</span> [{<span style="color: #009900">Key</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="color: #009900">Value</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()}]
-
-<span style="color: #009900">Default</span> <span style="color: #990000">-</span> [{{ <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"html"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #FF6600">'*'</span>}, <span style="color: #FF6600">to_html</span>}]</tt></pre></div></div>
-<div class="paragraph"><p>Return the list of media types the resource provides in
-order of preference.</p></div>
-<div class="paragraph"><p>A media type is made of different parts. The media type
-<code>text/html;charset=utf-8</code> is of type <code>text</code>, subtype <code>html</code>
-and has a single parameter <code>charset</code> with value <code>utf-8</code>.</p></div>
-<div class="paragraph"><p>During content negotiation Cowboy will pick the most appropriate
-media type for the client. The client advertises media types it
-prefers with the accept header. When that header is missing,
-the content negotiation fails and an error response is returned.</p></div>
-<div class="paragraph"><p>The callback given for the selected media type will be called
-at the end of the execution of GET and HEAD requests when a
-representation must be sent to the client.</p></div>
-<div class="paragraph"><p>An empty parameters list <code>[]</code> means that no parameters will be
-accepted. When any parameter is acceptable, the tuple form
-should be used with parameters as the atom <code>'*'</code>.</p></div>
-<div class="paragraph"><p>Cowboy treats all parameters as case sensitive, except for the
-<code>charset</code> parameter, which is known to be case insensitive. You
-should therefore always provide the charset as a lowercase
-binary string.</p></div>
-<div class="paragraph"><p>Cowboy will add the negotiated <code>media_type</code> to the Req object
-after this step completes:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
-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: #0000FF">media_type</span> <span style="color: #990000">=&gt;</span> <span style="color: #009900">ParsedMime</span>
-}</tt></pre></div></div>
-</div>
-<div class="sect2">
+<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><b><font color="#000000">content_types_provided</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
+
+<font color="#009900">Result</font> <font color="#990000">::</font> [{<b><font color="#000080">binary</font></b>() | <font color="#009900">ParsedMime</font>, <font color="#009900">ProvideCallback</font> <font color="#990000">::</font> <b><font color="#000080">atom</font></b>()}]
+<font color="#009900">ParsedMime</font> <font color="#990000">::</font> {<font color="#009900">Type</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">SubType</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#FF6600">'*'</font> | <font color="#009900">Params</font>}
+<font color="#009900">Params</font> <font color="#990000">::</font> [{<font color="#009900">Key</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()}]
+
+<font color="#009900">Default</font> <font color="#990000">-</font> [{{ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"html"</font><font color="#990000">&gt;&gt;</font>, <font color="#FF6600">'*'</font>}, <font color="#FF6600">to_html</font>}]</tt></pre>
+</div></div>
+<!-- @todo Case sensitivity of parsed mime content?-->
+<!-- @todo Space required for the time being: https://github.com/spf13/hugo/issues/2398-->
+<p>Return the list of media types the resource provides in order of preference.</p>
+<p>A media type is made of different parts. The media type <code>text/html;charset=utf-8</code> is of type <code>text</code>, subtype <code>html</code> and has a single parameter <code>charset</code> with value <code>utf-8</code>.</p>
+<!-- @todo Cowboy needs to ignore the boundary parameter for-->
+<!-- multipart, as we never want to match against it. Or allow-->
+<!-- ignoring specific parameters at the very least.-->
+<p>During content negotiation Cowboy will pick the most appropriate media type for the client. The client advertises media types it prefers with the accept header. When that header is missing, the content negotiation fails and an error response is returned.</p>
+<p>The callback given for the selected media type will be called at the end of the execution of GET and HEAD requests when a representation must be sent to the client.</p>
+<!-- @todo We should explain precisely how media types are picked.-->
+<p>An empty parameters list <code>[]</code> means that no parameters will be accepted. When any parameter is acceptable, the tuple form should be used with parameters as the atom <code>&apos;*&apos;</code>.</p>
+<p>Cowboy treats all parameters as case sensitive, except for the <code>charset</code> parameter, which is known to be case insensitive. You should therefore always provide the charset as a lowercase binary string.</p>
+<p>Cowboy will add the negotiated <code>media_type</code> to the Req object after this step completes:</p>
+<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><b><font color="#000000">req</font></b>() <font color="#990000">::</font> #{
+ <font color="#0000FF">media_type</font> <font color="#990000">=&gt;</font> <font color="#009900">ParsedMime</font>
+}</tt></pre>
+</div></div>
+<!-- @todo Case sensitivity of parsed mime content?-->
<h3 id="_delete_completed">delete_completed</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">delete_completed</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">delete_completed</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()
-<span style="color: #009900">Default</span> <span style="color: #990000">::</span> <span style="color: #000080">true</span></tt></pre></div></div>
-<div class="paragraph"><p>Return whether the resource has been fully deleted from the
-system, including from any internal cache.</p></div>
-<div class="paragraph"><p>Returning <code>false</code> will result in a <em>202 Accepted</em> response
-being sent instead of a <em>200 OK</em> or <em>204 No Content</em>.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> <b><font color="#000000">boolean</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <font color="#000080">true</font></tt></pre>
+</div></div>
+<p>Return whether the resource has been fully deleted from the system, including from any internal cache.</p>
+<p>Returning <code>false</code> will result in a <em>202 Accepted</em> response being sent instead of a <em>200 OK</em> or <em>204 No Content</em>.</p>
<h3 id="_delete_resource">delete_resource</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">delete_resource</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">delete_resource</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()
-<span style="color: #009900">Default</span> <span style="color: #990000">::</span> <span style="color: #000080">false</span></tt></pre></div></div>
-<div class="paragraph"><p>Delete the resource.</p></div>
-<div class="paragraph"><p>Cowboy will send an error response when this function
-returns <code>false</code>.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> <b><font color="#000000">boolean</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <font color="#000080">false</font></tt></pre>
+</div></div>
+<p>Delete the resource.</p>
+<p>Cowboy will send an error response when this function returns <code>false</code>.</p>
<h3 id="_expires">expires</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">expires</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">expires</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">calendar:datetime</span></span>() | <span style="font-weight: bold"><span style="color: #000080">binary</span></span>() | <span style="color: #000080">undefined</span>
-<span style="color: #009900">Default</span> <span style="color: #990000">::</span> <span style="color: #000080">undefined</span></tt></pre></div></div>
-<div class="paragraph"><p>Return the resource&#8217;s expiration date.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> <b><font color="#000000">calendar:datetime</font></b>() | <b><font color="#000080">binary</font></b>() | <font color="#000080">undefined</font>
+<font color="#009900">Default</font> <font color="#990000">::</font> <font color="#000080">undefined</font></tt></pre>
+</div></div>
+<p>Return the resource&apos;s expiration date.</p>
<h3 id="_forbidden">forbidden</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">forbidden</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">forbidden</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()
-<span style="color: #009900">Default</span> <span style="color: #990000">::</span> <span style="color: #000080">false</span></tt></pre></div></div>
-<div class="paragraph"><p>Return whether access to the resource is forbidden.</p></div>
-<div class="paragraph"><p>A <em>403 Forbidden</em> response will be sent if this
-function returns <code>true</code>. This status code means that
-access is forbidden regardless of authentication,
-and that the request shouldn&#8217;t be repeated.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> <b><font color="#000000">boolean</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <font color="#000080">false</font></tt></pre>
+</div></div>
+<p>Return whether access to the resource is forbidden.</p>
+<p>A <em>403 Forbidden</em> response will be sent if this function returns <code>true</code>. This status code means that access is forbidden regardless of authentication, and that the request shouldn&apos;t be repeated.</p>
<h3 id="_generate_etag">generate_etag</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">generate_etag</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">generate_etag</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>() | {<span style="color: #FF6600">weak</span> | <span style="color: #FF6600">strong</span>, <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()}
-<span style="color: #009900">Default</span> <span style="color: #990000">-</span> <span style="color: #FF6600">no</span> <span style="color: #FF6600">etag</span> <span style="color: #FF6600">value</span></tt></pre></div></div>
-<div class="paragraph"><p>Return the entity tag of the resource.</p></div>
-<div class="paragraph"><p>When a binary is returned, the value is automatically
-parsed to a tuple. The binary must be in the same
-format as the etag header, including quotes.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() | {<font color="#FF6600">weak</font> | <font color="#FF6600">strong</font>, <b><font color="#000080">binary</font></b>()}
+<font color="#009900">Default</font> <font color="#990000">-</font> <font color="#FF6600">no</font> <font color="#FF6600">etag</font> <font color="#FF6600">value</font></tt></pre>
+</div></div>
+<p>Return the entity tag of the resource.</p>
+<p>When a binary is returned, the value is automatically parsed to a tuple. The binary must be in the same format as the etag header, including quotes.</p>
<h3 id="_is_authorized">is_authorized</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">is_authorized</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">is_authorized</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="color: #000080">true</span> | {<span style="color: #000080">false</span>, <span style="color: #009900">AuthHeader</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>()}
-<span style="color: #009900">Default</span> <span style="color: #990000">-</span> <span style="color: #000080">true</span></tt></pre></div></div>
-<div class="paragraph"><p>Return whether the user is authorized to perform the action.</p></div>
-<div class="paragraph"><p>This function should be used to perform any necessary
-authentication of the user before attempting to perform
-any action on the resource.</p></div>
-<div class="paragraph"><p>When authentication fails, the <code>AuthHeader</code> value will
-be sent in the www-authenticate header for the
-<em>401 Unauthorized</em> response.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> <font color="#000080">true</font> | {<font color="#000080">false</font>, <font color="#009900">AuthHeader</font> <font color="#990000">::</font> <b><font color="#000000">iodata</font></b>()}
+<font color="#009900">Default</font> <font color="#990000">-</font> <font color="#000080">true</font></tt></pre>
+</div></div>
+<p>Return whether the user is authorized to perform the action.</p>
+<p>This function should be used to perform any necessary authentication of the user before attempting to perform any action on the resource.</p>
+<p>When authentication fails, the <code>AuthHeader</code> value will be sent in the www-authenticate header for the <em>401 Unauthorized</em> response.</p>
<h3 id="_is_conflict">is_conflict</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">is_conflict</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">is_conflict</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()
-<span style="color: #009900">Default</span> <span style="color: #990000">::</span> <span style="color: #000080">false</span></tt></pre></div></div>
-<div class="paragraph"><p>Return whether the PUT request results in a conflict.</p></div>
-<div class="paragraph"><p>A <em>409 Conflict</em> response is sent when <code>true</code>.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> <b><font color="#000000">boolean</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <font color="#000080">false</font></tt></pre>
+</div></div>
+<p>Return whether the PUT request results in a conflict.</p>
+<p>A <em>409 Conflict</em> response is sent when <code>true</code>.</p>
<h3 id="_known_methods">known_methods</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">known_methods</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">known_methods</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</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: #009900">Default</span> <span style="color: #990000">::</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">"HEAD"</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="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"PUT"</span><span style="color: #990000">&gt;&gt;</span>,
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"PATCH"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"DELETE"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"OPTIONS"</span><span style="color: #990000">&gt;&gt;</span>]</tt></pre></div></div>
-<div class="paragraph"><p>Return the list of known methods.</p></div>
-<div class="paragraph"><p>The full list of methods known by the server should be
-returned, regardless of their use in the resource.</p></div>
-<div class="paragraph"><p>The default value lists the methods Cowboy knows and
-implement in <code>cowboy_rest</code>.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> [<b><font color="#000080">binary</font></b>()] <i><font color="#9A1900">%% case sensitive</font></i>
+<font color="#009900">Default</font> <font color="#990000">::</font> [<font color="#990000">&lt;&lt;</font><font color="#FF0000">"GET"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"HEAD"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"POST"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"PUT"</font><font color="#990000">&gt;&gt;</font>,
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"PATCH"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"DELETE"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"OPTIONS"</font><font color="#990000">&gt;&gt;</font>]</tt></pre>
+</div></div>
+<p>Return the list of known methods.</p>
+<p>The full list of methods known by the server should be returned, regardless of their use in the resource.</p>
+<p>The default value lists the methods Cowboy knows and implement in <code>cowboy_rest</code>.</p>
<h3 id="_languages_provided">languages_provided</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">languages_provided</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">languages_provided</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</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: #009900">Default</span> <span style="color: #990000">-</span> <span style="color: #FF6600">skip</span> <span style="color: #FF6600">this</span> <span style="color: #FF6600">step</span></tt></pre></div></div>
-<div class="paragraph"><p>Return the list of languages the resource provides in order
-of preference.</p></div>
-<div class="paragraph"><p>During content negotiation Cowboy will pick the most
-appropriate language for the client. The client advertises
-languages it prefers with the accept-language header. When
-that header is missing, Cowboy picks the first language
-from the resource.</p></div>
-<div class="paragraph"><p>Cowboy will add the negotiated <code>language</code> to the Req object
-after this step completes:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<font color="#009900">Result</font> <font color="#990000">::</font> [<b><font color="#000080">binary</font></b>()] <i><font color="#9A1900">%% lowercase; case insensitive</font></i>
+<font color="#009900">Default</font> <font color="#990000">-</font> <font color="#FF6600">skip</font> <font color="#FF6600">this</font> <font color="#FF6600">step</font></tt></pre>
+</div></div>
+<p>Return the list of languages the resource provides in order of preference.</p>
+<p>During content negotiation Cowboy will pick the most appropriate language for the client. The client advertises languages it prefers with the accept-language header. When that header is missing, Cowboy picks the first language from the resource.</p>
+<!-- @todo We should explain precisely how languages are picked.-->
+<p>Cowboy will add the negotiated <code>language</code> to the Req object after this step completes:</p>
+<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: #0000FF">language</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>
-}</tt></pre></div></div>
-</div>
-<div class="sect2">
+<pre><tt><b><font color="#000000">req</font></b>() <font color="#990000">::</font> #{
+ <font color="#0000FF">language</font> <font color="#990000">=&gt;</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% lowercase; case insensitive</font></i>
+}</tt></pre>
+</div></div>
<h3 id="_last_modified">last_modified</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">last_modified</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">last_modified</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">calendar:datetime</span></span>()
-<span style="color: #009900">Default</span> <span style="color: #990000">-</span> <span style="color: #FF6600">no</span> <span style="color: #FF6600">last</span> <span style="color: #FF6600">modified</span> <span style="color: #FF6600">value</span></tt></pre></div></div>
-<div class="paragraph"><p>Return the resource&#8217;s last modification date.</p></div>
-<div class="paragraph"><p>This date will be used to test against the if-modified-since
-and if-unmodified-since headers, and sent as the last-modified
-header in the response to GET and HEAD requests.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> <b><font color="#000000">calendar:datetime</font></b>()
+<font color="#009900">Default</font> <font color="#990000">-</font> <font color="#FF6600">no</font> <font color="#FF6600">last</font> <font color="#FF6600">modified</font> <font color="#FF6600">value</font></tt></pre>
+</div></div>
+<p>Return the resource&apos;s last modification date.</p>
+<p>This date will be used to test against the if-modified-since and if-unmodified-since headers, and sent as the last-modified header in the response to GET and HEAD requests.</p>
<h3 id="_malformed_request">malformed_request</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">malformed_request</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">malformed_request</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()
-<span style="color: #009900">Default</span> <span style="color: #990000">::</span> <span style="color: #000080">false</span></tt></pre></div></div>
-<div class="paragraph"><p>Return whether the request is malformed.</p></div>
-<div class="paragraph"><p>A request is malformed when a component required by the
-resource is invalid. This may include the query string
-or individual headers. They should be parsed and validated
-in this function. The body should not be read at this point.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> <b><font color="#000000">boolean</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <font color="#000080">false</font></tt></pre>
+</div></div>
+<p>Return whether the request is malformed.</p>
+<p>A request is malformed when a component required by the resource is invalid. This may include the query string or individual headers. They should be parsed and validated in this function. The body should not be read at this point.</p>
<h3 id="_moved_permanently">moved_permanently</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">moved_permanently</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">moved_permanently</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> {<span style="color: #000080">true</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: #000080">false</span>
-<span style="color: #009900">Default</span> <span style="color: #990000">::</span> <span style="color: #000080">false</span></tt></pre></div></div>
-<div class="paragraph"><p>Return whether the resource was permanently moved, and
-what its new location is.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> {<font color="#000080">true</font>, <font color="#009900">URI</font> <font color="#990000">::</font> <b><font color="#000000">iodata</font></b>()} | <font color="#000080">false</font>
+<font color="#009900">Default</font> <font color="#990000">::</font> <font color="#000080">false</font></tt></pre>
+</div></div>
+<p>Return whether the resource was permanently moved, and what its new location is.</p>
<h3 id="_moved_temporarily">moved_temporarily</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">moved_temporarily</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">moved_temporarily</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> {<span style="color: #000080">true</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: #000080">false</span>
-<span style="color: #009900">Default</span> <span style="color: #990000">::</span> <span style="color: #000080">false</span></tt></pre></div></div>
-<div class="paragraph"><p>Return whether the resource was temporarily moved, and
-what its new location is.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> {<font color="#000080">true</font>, <font color="#009900">URI</font> <font color="#990000">::</font> <b><font color="#000000">iodata</font></b>()} | <font color="#000080">false</font>
+<font color="#009900">Default</font> <font color="#990000">::</font> <font color="#000080">false</font></tt></pre>
+</div></div>
+<p>Return whether the resource was temporarily moved, and what its new location is.</p>
<h3 id="_multiple_choices">multiple_choices</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
-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">multiple_choices</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
-
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()
-<span style="color: #009900">Default</span> <span style="color: #990000">::</span> <span style="color: #000080">false</span></tt></pre></div></div>
-<div class="paragraph"><p>Return whether the client should engage in reactive
-negotiation.</p></div>
-<div class="paragraph"><p>Return <code>true</code> when the server has multiple representations
-of a resource, each with their specific identifier, but is
-unable to determine which is best for the client. For
-example an image might have different sizes and the server
-is unable to determine the capabilities of the client.</p></div>
-<div class="paragraph"><p>When returning <code>true</code> the server should send a body with
-links to the different representations. If the server has
-a preferred representation it can send its link inside a
-location header.</p></div>
-</div>
-<div class="sect2">
+<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><b><font color="#000000">multiple_choices</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
+
+<font color="#009900">Result</font> <font color="#990000">::</font> <b><font color="#000000">boolean</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <font color="#000080">false</font></tt></pre>
+</div></div>
+<p>Return whether the client should engage in reactive negotiation.</p>
+<p>Return <code>true</code> when the server has multiple representations of a resource, each with their specific identifier, but is unable to determine which is best for the client. For example an image might have different sizes and the server is unable to determine the capabilities of the client.</p>
+<p>When returning <code>true</code> the server should send a body with links to the different representations. If the server has a preferred representation it can send its link inside a location header.</p>
<h3 id="_options">options</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">options</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}</tt></pre></div></div>
-<div class="paragraph"><p>Respond to an OPTIONS request.</p></div>
-<div class="paragraph"><p>The response should inform the client the communication
-options available for this resource. By default Cowboy
-will send a <em>200 OK</em> response with the allow header set.</p></div>
-</div>
-<div class="sect2">
+<pre><tt><b><font color="#000000">options</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}</tt></pre>
+</div></div>
+<p>Respond to an OPTIONS request.</p>
+<p>The response should inform the client the communication options available for this resource. By default Cowboy will send a <em>200 OK</em> response with the allow header set.</p>
<h3 id="_previously_existed">previously_existed</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">previously_existed</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">previously_existed</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()
-<span style="color: #009900">Default</span> <span style="color: #990000">::</span> <span style="color: #000080">false</span></tt></pre></div></div>
-<div class="paragraph"><p>Return whether the resource existed previously.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> <b><font color="#000000">boolean</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <font color="#000080">false</font></tt></pre>
+</div></div>
+<p>Return whether the resource existed previously.</p>
<h3 id="_providecallback">ProvideCallback</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">ProvideCallback</span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><font color="#009900">ProvideCallback</font>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:resp_body</span></span>()
-<span style="color: #009900">Default</span> <span style="color: #990000">-</span> <span style="color: #FF6600">crash</span></tt></pre></div></div>
-<div class="paragraph"><p>Return the response body.</p></div>
-<div class="paragraph"><p>The response body can be provided either as the actual data
-to be sent or a tuple indicating which file to send.</p></div>
-<div class="paragraph"><p>This function is called for both GET and HEAD requests. For
-the latter the body is not sent, however.</p></div>
-<div class="paragraph"><p>Note that there used to be a way to stream the response body.
-It was temporarily removed and will be added back in a later
-release.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:resp_body</font></b>()
+<font color="#009900">Default</font> <font color="#990000">-</font> <font color="#FF6600">crash</font></tt></pre>
+</div></div>
+<p>Return the response body.</p>
+<p>The response body can be provided either as the actual data to be sent or a tuple indicating which file to send.</p>
+<p>This function is called for both GET and HEAD requests. For the latter the body is not sent, however.</p>
+<!-- @todo Perhaps we can optimize HEAD requests and just-->
+<!-- allow calculating the length instead of returning the-->
+<!-- whole thing.-->
+<p>Note that there used to be a way to stream the response body. It was temporarily removed and will be added back in a later release.</p>
+<!-- @todo Add a way to switch to loop handler for streaming the body.-->
<h3 id="_resource_exists">resource_exists</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">resource_exists</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">resource_exists</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()
-<span style="color: #009900">Default</span> <span style="color: #990000">::</span> <span style="color: #000080">true</span></tt></pre></div></div>
-<div class="paragraph"><p>Return whether the resource exists.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> <b><font color="#000000">boolean</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <font color="#000080">true</font></tt></pre>
+</div></div>
+<p>Return whether the resource exists.</p>
<h3 id="_service_available">service_available</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">service_available</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">service_available</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()
-<span style="color: #009900">Default</span> <span style="color: #990000">::</span> <span style="color: #000080">true</span></tt></pre></div></div>
-<div class="paragraph"><p>Return whether the service is available.</p></div>
-<div class="paragraph"><p>A <em>503 Service Unavailable</em> response will be sent when this
-function returns <code>false</code>.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> <b><font color="#000000">boolean</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <font color="#000080">true</font></tt></pre>
+</div></div>
+<p>Return whether the service is available.</p>
+<p>A <em>503 Service Unavailable</em> response will be sent when this function returns <code>false</code>.</p>
<h3 id="_uri_too_long">uri_too_long</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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_too_long</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">uri_too_long</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()
-<span style="color: #009900">Default</span> <span style="color: #990000">::</span> <span style="color: #000080">false</span></tt></pre></div></div>
-<div class="paragraph"><p>Return whether the requested URI is too long.</p></div>
-<div class="paragraph"><p>This function can be used to further restrict the length
-of the URI for this specific resource.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> <b><font color="#000000">boolean</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <font color="#000080">false</font></tt></pre>
+</div></div>
+<p>Return whether the requested URI is too long.</p>
+<p>This function can be used to further restrict the length of the URI for this specific resource.</p>
<h3 id="_valid_content_headers">valid_content_headers</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">valid_content_headers</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">valid_content_headers</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()
-<span style="color: #009900">Default</span> <span style="color: #990000">::</span> <span style="color: #000080">true</span></tt></pre></div></div>
-<div class="paragraph"><p>Return whether the content headers are valid.</p></div>
-<div class="paragraph"><p>This callback can be used to reject requests that have
-invalid content header values, for example an unsupported
-content-encoding.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> <b><font color="#000000">boolean</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <font color="#000080">true</font></tt></pre>
+</div></div>
+<p>Return whether the content headers are valid.</p>
+<p>This callback can be used to reject requests that have invalid content header values, for example an unsupported content-encoding.</p>
<h3 id="_valid_entity_length">valid_entity_length</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">valid_entity_length</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">valid_entity_length</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()
-<span style="color: #009900">Default</span> <span style="color: #990000">::</span> <span style="color: #000080">true</span></tt></pre></div></div>
-<div class="paragraph"><p>Return whether the request body length is within acceptable boundaries.</p></div>
-<div class="paragraph"><p>A <em>413 Request Entity Too Large</em> response will be sent if this
-function returns <code>false</code>.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> <b><font color="#000000">boolean</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <font color="#000080">true</font></tt></pre>
+</div></div>
+<p>Return whether the request body length is within acceptable boundaries.</p>
+<p>A <em>413 Request Entity Too Large</em> response will be sent if this function returns <code>false</code>.</p>
<h3 id="_variances">variances</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">variances</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">variances</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</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 insensitive</span></span>
-<span style="color: #009900">Default</span> <span style="color: #990000">::</span> []</tt></pre></div></div>
-<div class="paragraph"><p>Return the list of request headers that affect the
-representation of the resource.</p></div>
-<div class="paragraph"><p>Cowboy automatically adds the accept, accept-charset and
-accept-language headers when necessary.</p></div>
-</div>
-</div>
-</div>
-<div class="sect1">
+<font color="#009900">Result</font> <font color="#990000">::</font> [<b><font color="#000080">binary</font></b>()] <i><font color="#9A1900">%% case insensitive</font></i>
+<font color="#009900">Default</font> <font color="#990000">::</font> []</tt></pre>
+</div></div>
+<p>Return the list of request headers that affect the representation of the resource.</p>
+<p>Cowboy automatically adds the accept, accept-charset and accept-language headers when necessary.</p>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="..">cowboy(7)</a>,
-<a href="../cowboy_handler">cowboy_handler(3)</a></p></div>
-</div>
-</div>
+<p><a href="..">cowboy(7)</a>, <a href="../cowboy_handler">cowboy_handler(3)</a></p>
+
diff --git a/docs/en/cowboy/2.0/manual/cowboy_router.compile/index.html b/docs/en/cowboy/2.0/manual/cowboy_router.compile/index.html
index 112c1524..28bea031 100644
--- a/docs/en/cowboy/2.0/manual/cowboy_router.compile/index.html
+++ b/docs/en/cowboy/2.0/manual/cowboy_router.compile/index.html
@@ -62,87 +62,48 @@
<h1 class="lined-header"><span>cowboy_router:compile(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_router:compile - Compile routes to the resources</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_router:compile - Compile routes to the resources</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">compile</span></span>(<span style="font-weight: bold"><span style="color: #000000">cowboy_router:routes</span></span>()) <span style="color: #990000">-&gt;</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_router:dispatch_rules</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Compile routes to the resources.</p></div>
-<div class="paragraph"><p>Takes a human readable list of routes and transforms it
-into a form more efficient to process.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">compile</font></b>(<b><font color="#000000">cowboy_router:routes</font></b>()) <font color="#990000">-&gt;</font> <b><font color="#000000">cowboy_router:dispatch_rules</font></b>()</tt></pre>
+</div></div>
+<p>Compile routes to the resources.</p>
+<p>Takes a human readable list of routes and transforms it into a form more efficient to process.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Routes
-</dt>
-<dd>
-<p>
-Human readable list of routes.
-</p>
+<dl><dt>Routes</dt>
+<dd><p>Human readable list of routes.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>An opaque dispatch rules value is returned. This value
-must be given to Cowboy as a middleware environment value.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>An opaque dispatch rules value is returned. This value must be given to Cowboy as a middleware environment value.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<ul><li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Compile routes and start a listener</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Compile routes and start a listener</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">Dispatch</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_router:compile</span></span>([
- {<span style="color: #FF6600">'_'</span>, [
- {<span style="color: #FF0000">"/"</span>, <span style="color: #FF6600">toppage_h</span>, []},
- {<span style="color: #FF0000">"/[...], cowboy_static, {priv_dir, my_example_app, ""}}</span>
-<span style="color: #FF0000"> ]}</span>
-<span style="color: #FF0000">]),</span>
-
-<span style="color: #FF0000">{ok, _} = cowboy:start_clear(example, [{port, 8080}], #{</span>
-<span style="color: #FF0000"> env =&gt; #{dispatch =&gt; Dispatch}</span>
-<span style="color: #FF0000">}).</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Dispatch</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_router:compile</font></b>([
+ {<font color="#FF6600">'_'</font>, [
+ {<font color="#FF0000">"/"</font>, <font color="#FF6600">toppage_h</font>, []},
+ {<font color="#FF0000">"/[...], cowboy_static, {priv_dir, my_example_app, ""}}</font>
+<font color="#FF0000"> ]}</font>
+<font color="#FF0000">]),</font>
+
+<font color="#FF0000">{ok, _} = cowboy:start_clear(example, [{port, 8080}], #{</font>
+<font color="#FF0000"> env =&gt; #{dispatch =&gt; Dispatch}</font>
+<font color="#FF0000">}).</font></tt></pre>
+</div></div>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../cowboy_router">cowboy_router(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_router">cowboy_router(3)</a></p>
+
diff --git a/docs/en/cowboy/2.0/manual/cowboy_router/index.html b/docs/en/cowboy/2.0/manual/cowboy_router/index.html
index a4c31b82..d6cb8147 100644
--- a/docs/en/cowboy/2.0/manual/cowboy_router/index.html
+++ b/docs/en/cowboy/2.0/manual/cowboy_router/index.html
@@ -62,110 +62,65 @@
<h1 class="lined-header"><span>cowboy_router(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_router - Router middleware</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_router - Router middleware</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <code>cowboy_router</code> middleware maps the requested host and
-path to the handler to be used for processing the request.</p></div>
-<div class="paragraph"><p>The router takes the <code>dispatch</code> rules as input from the
-middleware environment. Dispatch rules are generated by
-calling the
-<a href="../cowboy_router.compile">cowboy_router:compile(3)</a>
-function.</p></div>
-<div class="paragraph"><p>When a route matches, the router sets the <code>handler</code> and
-<code>handler_opts</code> middleware environment values containing
-the handler module and initial state, respectively.</p></div>
-<div class="paragraph"><p>The router will stop execution when no route matches.
-It will send a 400 response if no host was found, and
-a 404 response otherwise.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The <code>cowboy_router</code> middleware maps the requested host and path to the handler to be used for processing the request.</p>
+<p>The router takes the <code>dispatch</code> rules as input from the middleware environment. Dispatch rules are generated by calling the <a href="../cowboy_router.compile">cowboy_router:compile(3)</a> function.</p>
+<p>When a route matches, the router sets the <code>handler</code> and <code>handler_opts</code> middleware environment values containing the handler module and initial state, respectively.</p>
+<p>The router will stop execution when no route matches. It will send a 400 response if no host was found, and a 404 response otherwise.</p>
<h2 id="_exports">Exports</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../cowboy_router.compile">cowboy_router:compile(3)</a> - Compile routes to the resources
-</p>
+<ul><li><a href="../cowboy_router.compile">cowboy_router:compile(3)</a> - Compile routes to the resources
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_types">Types</h2>
-<div class="sectionbody">
-<div class="sect2">
<h3 id="_bindings">bindings()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">bindings</span></span>() <span style="color: #990000">::</span> #{<span style="font-weight: bold"><span style="color: #000080">atom</span></span>() <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>Bindings found during routing.</p></div>
-</div>
-<div class="sect2">
+<pre><tt><b><font color="#000000">bindings</font></b>() <font color="#990000">::</font> #{<b><font color="#000080">atom</font></b>() <font color="#990000">=&gt;</font> <b><font color="#000000">any</font></b>()}</tt></pre>
+</div></div>
+<p>Bindings found during routing.</p>
<h3 id="_dispatch_rules">dispatch_rules()</h3>
-<div class="paragraph"><p>Opaque type containing the compiled routes.</p></div>
-</div>
-<div class="sect2">
+<p>Opaque type containing the compiled routes.</p>
<h3 id="_routes">routes()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">routes</span></span>() <span style="color: #990000">=</span> [
- {<span style="color: #009900">Host</span>, <span style="color: #009900">PathList</span>} |
- {<span style="color: #009900">Host</span>, <span style="color: #009900">Fields</span>, <span style="color: #009900">PathList</span>}
+<pre><tt><b><font color="#000000">routes</font></b>() <font color="#990000">=</font> [
+ {<font color="#009900">Host</font>, <font color="#009900">PathList</font>} |
+ {<font color="#009900">Host</font>, <font color="#009900">Fields</font>, <font color="#009900">PathList</font>}
]
-<span style="color: #009900">PathList</span> <span style="color: #990000">::</span> [
- {<span style="color: #009900">Path</span>, <span style="color: #009900">Handler</span>, <span style="color: #009900">InitialState</span>} |
- {<span style="color: #009900">Path</span>, <span style="color: #009900">Fields</span>, <span style="color: #009900">Handler</span>, <span style="color: #009900">InitialState</span>}
+<font color="#009900">PathList</font> <font color="#990000">::</font> [
+ {<font color="#009900">Path</font>, <font color="#009900">Handler</font>, <font color="#009900">InitialState</font>} |
+ {<font color="#009900">Path</font>, <font color="#009900">Fields</font>, <font color="#009900">Handler</font>, <font color="#009900">InitialState</font>}
]
-<span style="color: #009900">Host</span> <span style="color: #990000">::</span> <span style="color: #FF6600">'_'</span> | <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>()
-<span style="color: #009900">Path</span> <span style="color: #990000">::</span> <span style="color: #FF6600">'_'</span> | <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>()
-<span style="color: #009900">Fields</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:fields</span></span>()
-<span style="color: #009900">Handler</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">module</span></span>()
-<span style="color: #009900">InitialState</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>Human readable list of routes to handlers.</p></div>
-<div class="paragraph"><p>Cowboy uses this list to map hosts and paths, optionally
-augmented with constraints applied to the bindings, to
-handler modules.</p></div>
-<div class="paragraph"><p>The syntax for routes is currently defined in the user guide.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Host</font> <font color="#990000">::</font> <font color="#FF6600">'_'</font> | <b><font color="#000000">iodata</font></b>()
+<font color="#009900">Path</font> <font color="#990000">::</font> <font color="#FF6600">'_'</font> | <b><font color="#000000">iodata</font></b>()
+<font color="#009900">Fields</font> <font color="#990000">::</font> <b><font color="#000000">cowboy:fields</font></b>()
+<font color="#009900">Handler</font> <font color="#990000">::</font> <b><font color="#000000">module</font></b>()
+<font color="#009900">InitialState</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()</tt></pre>
+</div></div>
+<p>Human readable list of routes to handlers.</p>
+<p>Cowboy uses this list to map hosts and paths, optionally augmented with constraints applied to the bindings, to handler modules.</p>
+<p>The syntax for routes is currently defined in the user guide.</p>
+<!-- @todo The syntax should probably be in this module,-->
+<!-- and the user guide show more practical examples.-->
<h3 id="_tokens">tokens()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">tokens</span></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>List of <code>host_info</code> and <code>path_info</code> tokens that were found
-using the <code>...</code> syntax.</p></div>
-</div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">tokens</font></b>() <font color="#990000">::</font> [<b><font color="#000080">binary</font></b>()]</tt></pre>
+</div></div>
+<p>List of <code>host_info</code> and <code>path_info</code> tokens that were found using the <code>...</code> syntax.</p>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="..">cowboy(7)</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>,
-<a href="../cowboy_req.path_info">cowboy_req:path_info(3)</a></p></div>
-</div>
-</div>
+<p><a href="..">cowboy(7)</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>, <a href="../cowboy_req.path_info">cowboy_req:path_info(3)</a></p>
+
diff --git a/docs/en/cowboy/2.0/manual/cowboy_static/index.html b/docs/en/cowboy/2.0/manual/cowboy_static/index.html
index 9a74ad94..47c98159 100644
--- a/docs/en/cowboy/2.0/manual/cowboy_static/index.html
+++ b/docs/en/cowboy/2.0/manual/cowboy_static/index.html
@@ -62,175 +62,110 @@
<h1 class="lined-header"><span>cowboy_static(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_static - Static file handler</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_static - Static file handler</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The module <code>cowboy_static</code> implements file serving capabilities
-using the REST semantics provided by <code>cowboy_rest</code>.</p></div>
-<div class="paragraph"><p>The static file handler is a pre-written handler coming with
-Cowboy. To serve files, use it in your routes.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The module <code>cowboy_static</code> implements file serving capabilities using the REST semantics provided by <code>cowboy_rest</code>.</p>
+<p>The static file handler is a pre-written handler coming with Cowboy. To serve files, use it in your routes.</p>
<h2 id="_options">Options</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">opts</span></span>() <span style="color: #990000">::</span> {<span style="color: #FF6600">priv_file</span>, <span style="color: #009900">App</span>, <span style="color: #009900">Path</span>}
- | {<span style="color: #FF6600">priv_file</span>, <span style="color: #009900">App</span>, <span style="color: #009900">Path</span>, <span style="color: #009900">Extra</span>}
- | {<span style="color: #FF6600">file</span>, <span style="color: #009900">Path</span>}
- | {<span style="color: #FF6600">file</span>, <span style="color: #009900">Path</span>, <span style="color: #009900">Extra</span>}
- | {<span style="color: #FF6600">priv_dir</span>, <span style="color: #009900">App</span>, <span style="color: #009900">Path</span>}
- | {<span style="color: #FF6600">priv_dir</span>, <span style="color: #009900">App</span>, <span style="color: #009900">Path</span>, <span style="color: #009900">Extra</span>}
- | {<span style="color: #FF6600">dir</span>, <span style="color: #009900">Path</span>}
- | {<span style="color: #FF6600">dir</span>, <span style="color: #009900">Path</span>, <span style="color: #009900">Extra</span>}
-
-<span style="color: #009900">App</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">atom</span></span>()
-<span style="color: #009900">Path</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>() | <span style="font-weight: bold"><span style="color: #000000">string</span></span>()
-<span style="color: #009900">Extra</span> <span style="color: #990000">::</span> [<span style="color: #009900">Etag</span> | <span style="color: #009900">Mimetypes</span>]
-
-<span style="color: #009900">Etag</span> <span style="color: #990000">::</span> {<span style="color: #FF6600">etag</span>, <span style="font-weight: bold"><span style="color: #000000">module</span></span>(), <span style="font-weight: bold"><span style="color: #000080">function</span></span>()}
- | {<span style="color: #FF6600">etag</span>, <span style="color: #000080">false</span>}
-
-<span style="color: #009900">Mimetypes</span> <span style="color: #990000">::</span> {<span style="color: #FF6600">mimetypes</span>, <span style="font-weight: bold"><span style="color: #000000">module</span></span>(), <span style="font-weight: bold"><span style="color: #000080">function</span></span>()}
- | {<span style="color: #FF6600">mimetypes</span>, <span style="font-weight: bold"><span style="color: #000080">binary</span></span>() | <span style="color: #009900">ParsedMime</span>}
-
-<span style="color: #009900">ParsedMime</span> <span style="color: #990000">::</span> {<span style="color: #009900">Type</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="color: #009900">SubType</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="color: #009900">Params</span>}
-<span style="color: #009900">Params</span> <span style="color: #990000">::</span> [{<span style="color: #009900">Key</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="color: #009900">Value</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>Static handler configuration.</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-priv_file
-</dt>
-<dd>
-<p>
-Send a file.
-</p>
-<div class="paragraph"><p>The path is relative to the given application&#8217;s private
-directory.</p></div>
+<pre><tt><b><font color="#000000">opts</font></b>() <font color="#990000">::</font> {<font color="#FF6600">priv_file</font>, <font color="#009900">App</font>, <font color="#009900">Path</font>}
+ | {<font color="#FF6600">priv_file</font>, <font color="#009900">App</font>, <font color="#009900">Path</font>, <font color="#009900">Extra</font>}
+ | {<font color="#FF6600">file</font>, <font color="#009900">Path</font>}
+ | {<font color="#FF6600">file</font>, <font color="#009900">Path</font>, <font color="#009900">Extra</font>}
+ | {<font color="#FF6600">priv_dir</font>, <font color="#009900">App</font>, <font color="#009900">Path</font>}
+ | {<font color="#FF6600">priv_dir</font>, <font color="#009900">App</font>, <font color="#009900">Path</font>, <font color="#009900">Extra</font>}
+ | {<font color="#FF6600">dir</font>, <font color="#009900">Path</font>}
+ | {<font color="#FF6600">dir</font>, <font color="#009900">Path</font>, <font color="#009900">Extra</font>}
+
+<font color="#009900">App</font> <font color="#990000">::</font> <b><font color="#000080">atom</font></b>()
+<font color="#009900">Path</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() | <b><font color="#000000">string</font></b>()
+<font color="#009900">Extra</font> <font color="#990000">::</font> [<font color="#009900">Etag</font> | <font color="#009900">Mimetypes</font>]
+
+<font color="#009900">Etag</font> <font color="#990000">::</font> {<font color="#FF6600">etag</font>, <b><font color="#000000">module</font></b>(), <b><font color="#000080">function</font></b>()}
+ | {<font color="#FF6600">etag</font>, <font color="#000080">false</font>}
+
+<font color="#009900">Mimetypes</font> <font color="#990000">::</font> {<font color="#FF6600">mimetypes</font>, <b><font color="#000000">module</font></b>(), <b><font color="#000080">function</font></b>()}
+ | {<font color="#FF6600">mimetypes</font>, <b><font color="#000080">binary</font></b>() | <font color="#009900">ParsedMime</font>}
+
+<font color="#009900">ParsedMime</font> <font color="#990000">::</font> {<font color="#009900">Type</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">SubType</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">Params</font>}
+<font color="#009900">Params</font> <font color="#990000">::</font> [{<font color="#009900">Key</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()}]</tt></pre>
+</div></div>
+<p>Static handler configuration.</p>
+<dl><dt>priv_file</dt>
+<dd><p>Send a file.</p>
+<p>The path is relative to the given application&apos;s private directory.</p>
</dd>
-<dt class="hdlist1">
-file
-</dt>
-<dd>
-<p>
-Send a file.
-</p>
-<div class="paragraph"><p>The path is either absolute or relative to the Erlang node&#8217;s
-current directory.</p></div>
+<dt>file</dt>
+<dd><p>Send a file.</p>
+<p>The path is either absolute or relative to the Erlang node&apos;s current directory.</p>
</dd>
-<dt class="hdlist1">
-priv_dir
-</dt>
-<dd>
-<p>
-Recursively serve files from a directory.
-</p>
-<div class="paragraph"><p>The path is relative to the given application&#8217;s private
-directory.</p></div>
+<dt>priv_dir</dt>
+<dd><p>Recursively serve files from a directory.</p>
+<p>The path is relative to the given application&apos;s private directory.</p>
</dd>
-<dt class="hdlist1">
-dir
-</dt>
-<dd>
-<p>
-Recursively serve files from a directory.
-</p>
-<div class="paragraph"><p>The path is either absolute or relative to the Erlang node&#8217;s
-current directory.</p></div>
+<dt>dir</dt>
+<dd><p>Recursively serve files from a directory.</p>
+<p>The path is either absolute or relative to the Erlang node&apos;s current directory.</p>
</dd>
-</dl></div>
-<div class="paragraph"><p>The extra options allow you to define how the etag should be
-calculated and how the MIME type of files should be detected.</p></div>
-<div class="paragraph"><p>By default the static handler will generate an etag based
-on the size and modification time of the file. You may disable
-the etag entirely with <code>{etag, false}</code> or provide a module
-and function that will be called when needed:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+</dl>
+<p>The extra options allow you to define how the etag should be calculated and how the MIME type of files should be detected.</p>
+<p>By default the static handler will generate an etag based on the size and modification time of the file. You may disable the etag entirely with <code>{etag, false}</code> or provide a module and function that will be called when needed:</p>
+<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">generate_etag</span></span>(<span style="color: #009900">Path</span>, <span style="color: #009900">Size</span>, <span style="color: #009900">Mtime</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #FF6600">strong</span> | <span style="color: #FF6600">weak</span>, <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()}
-
-<span style="color: #009900">Path</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()
-<span style="color: #009900">Size</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>()
-<span style="color: #009900">Mtime</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">file:date_time</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>By default the static handler will detect Web-related MIME types
-by looking at the file extension. You can provide a specific
-MIME type that will always be used, or a module and function that
-will be called when needed:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">generate_etag</font></b>(<font color="#009900">Path</font>, <font color="#009900">Size</font>, <font color="#009900">Mtime</font>) <font color="#990000">-&gt;</font> {<font color="#FF6600">strong</font> | <font color="#FF6600">weak</font>, <b><font color="#000080">binary</font></b>()}
+
+<font color="#009900">Path</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()
+<font color="#009900">Size</font> <font color="#990000">::</font> <b><font color="#000000">non_neg_integer</font></b>()
+<font color="#009900">Mtime</font> <font color="#990000">::</font> <b><font color="#000000">file:date_time</font></b>()</tt></pre>
+</div></div>
+<p>By default the static handler will detect Web-related MIME types by looking at the file extension. You can provide a specific MIME type that will always be used, or a module and function that will be called when needed:</p>
+<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">detect_mimetype</span></span>(<span style="color: #009900">Path</span>) <span style="color: #990000">-&gt;</span> <span style="color: #009900">ParsedMime</span>
-
-<span style="color: #009900">Path</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()
-<span style="color: #009900">ParsedMime</span> <span style="color: #990000">::</span> {<span style="color: #009900">Type</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="color: #009900">SubType</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="color: #009900">Params</span>}
-<span style="color: #009900">Params</span> <span style="color: #990000">::</span> [{<span style="color: #009900">Key</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="color: #009900">Value</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>Cowboy comes with two such functions; the default function
-<code>cow_mimetypes:web/1</code>, and a second function generated from
-the Apache <em>mime.types</em> file, <code>cow_mimetypes:all/1</code>.</p></div>
-<div class="paragraph"><p>The MIME type function should return
-<code>{&lt;&lt;"application"&gt;&gt;, &lt;&lt;"octet-stream"&gt;&gt;, []}</code>
-when it fails to detect a file&#8217;s MIME type.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">detect_mimetype</font></b>(<font color="#009900">Path</font>) <font color="#990000">-&gt;</font> <font color="#009900">ParsedMime</font>
+
+<font color="#009900">Path</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()
+<font color="#009900">ParsedMime</font> <font color="#990000">::</font> {<font color="#009900">Type</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">SubType</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">Params</font>}
+<font color="#009900">Params</font> <font color="#990000">::</font> [{<font color="#009900">Key</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()}]</tt></pre>
+</div></div>
+<!-- @todo Case sensitivity of parsed mime content?-->
+<p>Cowboy comes with two such functions; the default function <code>cow_mimetypes:web/1</code>, and a second function generated from the Apache <em>mime.types</em> file, <code>cow_mimetypes:all/1</code>.</p>
+<p>The MIME type function should return <code>{&lt;&lt;&quot;application&quot;&gt;&gt;, &lt;&lt;&quot;octet-stream&quot;&gt;&gt;, []}</code> when it fails to detect a file&apos;s MIME type.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>1.0</strong>: Handler introduced.
-</p>
+<ul><li><strong>1.0</strong>: Handler introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Custom etag function</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Custom etag function</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">generate_etag</span></span>(<span style="color: #009900">Path</span>, <span style="color: #009900">Size</span>, <span style="color: #009900">Mtime</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">strong</span>, <span style="font-weight: bold"><span style="color: #000000">integer_to_binary</span></span>(
- <span style="font-weight: bold"><span style="color: #000000">erlang:phash2</span></span>({<span style="color: #009900">Path</span>, <span style="color: #009900">Size</span>, <span style="color: #009900">Mtime</span>}, <span style="color: #993399">16#ffffffff</span>))}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Custom MIME type function</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">generate_etag</font></b>(<font color="#009900">Path</font>, <font color="#009900">Size</font>, <font color="#009900">Mtime</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">strong</font>, <b><font color="#000000">integer_to_binary</font></b>(
+ <b><font color="#000000">erlang:phash2</font></b>({<font color="#009900">Path</font>, <font color="#009900">Size</font>, <font color="#009900">Mtime</font>}, <font color="#993399">16#ffffffff</font>))}<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Custom MIME type function</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">always_octet_stream</span></span>(<span style="color: #009900">_Path</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">filename:extension</span></span>(<span style="color: #009900">Path</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">".erl"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">-&gt;</span> {<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"plain"</span><span style="color: #990000">&gt;&gt;</span>, []};
- <span style="color: #990000">_</span> <span style="color: #990000">-&gt;</span> {<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"application"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"octet-stream"</span><span style="color: #990000">&gt;&gt;</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">
+<pre><tt><b><font color="#000000">always_octet_stream</font></b>(<font color="#009900">_Path</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">case</font></b> <b><font color="#000000">filename:extension</font></b>(<font color="#009900">Path</font>) <b><font color="#0000FF">of</font></b>
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">".erl"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">-&gt;</font> {<font color="#990000">&lt;&lt;</font><font color="#FF0000">"text"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"plain"</font><font color="#990000">&gt;&gt;</font>, []};
+ <font color="#990000">_</font> <font color="#990000">-&gt;</font> {<font color="#990000">&lt;&lt;</font><font color="#FF0000">"application"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"octet-stream"</font><font color="#990000">&gt;&gt;</font>, []}
+ <b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="..">cowboy(7)</a>,
-<a href="../cowboy_router">cowboy_router(3)</a></p></div>
-</div>
-</div>
+<p><a href="..">cowboy(7)</a>, <a href="../cowboy_router">cowboy_router(3)</a></p>
+
diff --git a/docs/en/cowboy/2.0/manual/cowboy_stream/index.html b/docs/en/cowboy/2.0/manual/cowboy_stream/index.html
index 488e5d87..095b0831 100644
--- a/docs/en/cowboy/2.0/manual/cowboy_stream/index.html
+++ b/docs/en/cowboy/2.0/manual/cowboy_stream/index.html
@@ -62,411 +62,282 @@
<h1 class="lined-header"><span>cowboy_stream(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_handler - Stream handlers</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_handler - Stream handlers</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The module <code>cowboy_stream</code> defines a callback interface
-and a protocol for handling HTTP streams.</p></div>
-<div class="paragraph"><p>An HTTP request and its associated response is called
-a stream. A connection may have many streams. In HTTP/1.1
-they are executed sequentially, while in HTTP/2 they are
-executed concurrently.</p></div>
-<div class="paragraph"><p>Cowboy calls the stream handler for nearly all events
-related to a stream. Exceptions vary depending on the
-protocol.</p></div>
-<div class="paragraph"><p>Extra care must be taken when implementing stream handlers
-to ensure compatibility. While some modification of the
-events and commands is allowed, it is generally not a good
-idea to completely omit them.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The module <code>cowboy_stream</code> defines a callback interface and a protocol for handling HTTP streams.</p>
+<p>An HTTP request and its associated response is called a stream. A connection may have many streams. In HTTP/1.1 they are executed sequentially, while in HTTP/2 they are executed concurrently.</p>
+<p>Cowboy calls the stream handler for nearly all events related to a stream. Exceptions vary depending on the protocol.</p>
+<p>Extra care must be taken when implementing stream handlers to ensure compatibility. While some modification of the events and commands is allowed, it is generally not a good idea to completely omit them.</p>
<h2 id="_callbacks">Callbacks</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Stream handlers must implement the following interface:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Stream handlers must implement the following interface:</p>
+<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">init</span></span>(<span style="color: #009900">StreamID</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">Opts</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Commands</span>, <span style="color: #009900">State</span>}
-<span style="font-weight: bold"><span style="color: #000000">data</span></span>(<span style="color: #009900">StreamID</span>, <span style="color: #009900">IsFin</span>, <span style="color: #009900">Data</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Commands</span>, <span style="color: #009900">State</span>}
-<span style="font-weight: bold"><span style="color: #000000">info</span></span>(<span style="color: #009900">StreamID</span>, <span style="color: #009900">Info</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Commands</span>, <span style="color: #009900">State</span>}
-<span style="font-weight: bold"><span style="color: #000000">terminate</span></span>(<span style="color: #009900">StreamID</span>, <span style="color: #009900">Reason</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()
-<span style="font-weight: bold"><span style="color: #000000">early_error</span></span>(<span style="color: #009900">StreamID</span>, <span style="color: #009900">Reason</span>, <span style="color: #009900">PartialReq</span>, <span style="color: #009900">Resp</span>, <span style="color: #009900">Opts</span>) <span style="color: #990000">-&gt;</span> <span style="color: #009900">Resp</span>
-
-<span style="color: #009900">StreamID</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_stream:streamid</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">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:opts</span></span>()
-<span style="color: #009900">Commands</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_stream:commands</span></span>()
-<span style="color: #009900">State</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()
-<span style="color: #009900">IsFin</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_stream:fin</span></span>()
-<span style="color: #009900">Data</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()
-<span style="color: #009900">Info</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()
-<span style="color: #009900">Reason</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_stream:reason</span></span>()
-<span style="color: #009900">PartialReq</span> <span style="color: #990000">-</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:req</span></span>(), <span style="color: #FF6600">except</span> <span style="color: #FF6600">all</span> <span style="color: #FF6600">fields</span> <span style="color: #FF6600">are</span> <span style="color: #FF6600">optional</span>
-<span style="color: #009900">Resp</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_stream:resp_command</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>HTTP/1.1 will initialize a stream only when the request-line
-and all headers have been received. When errors occur before
-that point Cowboy will call the callback <code>early_error/5</code>
-with a partial request, the error reason and the response
-Cowboy intends to send. All other events go throuh the
-stream handler using the normal callbacks.</p></div>
-<div class="paragraph"><p>HTTP/2 will initialize the stream when the <code>HEADERS</code> block has
-been fully received and decoded. Any protocol error occuring
-before that will not result in a response being sent and
-will therefore not go through the stream handler. In addition
-Cowboy may terminate streams without sending an HTTP response
-back.</p></div>
-<div class="paragraph"><p>The stream is initialized by calling <code>init/3</code>. All streams
-that are initialized will eventually be terminated by calling
-<code>terminate/3</code>.</p></div>
-<div class="paragraph"><p>When Cowboy receives data for the stream it will call <code>data/4</code>.
-The data given is the request body after any transfer decoding
-has been applied.</p></div>
-<div class="paragraph"><p>When Cowboy receives a message addressed to a stream, or when
-Cowboy needs to inform the stream handler that an internal
-event has occurred, it will call <code>info/3</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">StreamID</font>, <font color="#009900">Req</font>, <font color="#009900">Opts</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Commands</font>, <font color="#009900">State</font>}
+<b><font color="#000000">data</font></b>(<font color="#009900">StreamID</font>, <font color="#009900">IsFin</font>, <font color="#009900">Data</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Commands</font>, <font color="#009900">State</font>}
+<b><font color="#000000">info</font></b>(<font color="#009900">StreamID</font>, <font color="#009900">Info</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Commands</font>, <font color="#009900">State</font>}
+<b><font color="#000000">terminate</font></b>(<font color="#009900">StreamID</font>, <font color="#009900">Reason</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> <b><font color="#000000">any</font></b>()
+<b><font color="#000000">early_error</font></b>(<font color="#009900">StreamID</font>, <font color="#009900">Reason</font>, <font color="#009900">PartialReq</font>, <font color="#009900">Resp</font>, <font color="#009900">Opts</font>) <font color="#990000">-&gt;</font> <font color="#009900">Resp</font>
+
+<font color="#009900">StreamID</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_stream:streamid</font></b>()
+<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()
+<font color="#009900">Opts</font> <font color="#990000">::</font> <b><font color="#000000">cowboy:opts</font></b>()
+<font color="#009900">Commands</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_stream:commands</font></b>()
+<font color="#009900">State</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()
+<font color="#009900">IsFin</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_stream:fin</font></b>()
+<font color="#009900">Data</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()
+<font color="#009900">Info</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()
+<font color="#009900">Reason</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_stream:reason</font></b>()
+<font color="#009900">PartialReq</font> <font color="#990000">-</font> <b><font color="#000000">cowboy_req:req</font></b>(), <font color="#FF6600">except</font> <font color="#FF6600">all</font> <font color="#FF6600">fields</font> <font color="#FF6600">are</font> <font color="#FF6600">optional</font>
+<font color="#009900">Resp</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_stream:resp_command</font></b>()</tt></pre>
+</div></div>
+<p>HTTP/1.1 will initialize a stream only when the request-line and all headers have been received. When errors occur before that point Cowboy will call the callback <code>early_error/5</code> with a partial request, the error reason and the response Cowboy intends to send. All other events go throuh the stream handler using the normal callbacks.</p>
+<p>HTTP/2 will initialize the stream when the <code>HEADERS</code> block has been fully received and decoded. Any protocol error occuring before that will not result in a response being sent and will therefore not go through the stream handler. In addition Cowboy may terminate streams without sending an HTTP response back.</p>
+<p>The stream is initialized by calling <code>init/3</code>. All streams that are initialized will eventually be terminated by calling <code>terminate/3</code>.</p>
+<p>When Cowboy receives data for the stream it will call <code>data/4</code>. The data given is the request body after any transfer decoding has been applied.</p>
+<p>When Cowboy receives a message addressed to a stream, or when Cowboy needs to inform the stream handler that an internal event has occurred, it will call <code>info/3</code>.</p>
<h2 id="commands">Commands</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Stream handlers can return a list of commands to be executed
-from the <code>init/3</code>, <code>data/4</code> and <code>info/3</code> callbacks. In addition,
-the <code>early_error/5</code> callback must return a response command.</p></div>
-<div class="paragraph"><p>The following commands are defined:</p></div>
-<div class="sect2">
+<p>Stream handlers can return a list of commands to be executed from the <code>init/3</code>, <code>data/4</code> and <code>info/3</code> callbacks. In addition, the <code>early_error/5</code> callback must return a response command.</p>
+<!-- @todo We need a &apos;log&apos; command that would call error_logger.-->
+<!-- It&apos;s better than doing in the handlers directly because-->
+<!-- then we can have other stream handlers manipulate those logs.-->
+<!-- @todo We need a command to send a message so that other-->
+<!-- stream handlers can manipulate these messages if necessary.-->
+<p>The following commands are defined:</p>
<h3 id="response_command">response</h3>
-<div class="paragraph"><p>Send a response to the client.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Send a response to the client.</p>
+<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">response</span>, <span style="font-weight: bold"><span style="color: #000000">cowboy:http_status</span></span>(), <span style="font-weight: bold"><span style="color: #000000">cowboy:http_headers</span></span>(),
- <span style="font-weight: bold"><span style="color: #000000">cowboy_req:resp_body</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>No more data can be sent after this command.</p></div>
-</div>
-<div class="sect2">
+<pre><tt>{<font color="#FF6600">response</font>, <b><font color="#000000">cowboy:http_status</font></b>(), <b><font color="#000000">cowboy:http_headers</font></b>(),
+ <b><font color="#000000">cowboy_req:resp_body</font></b>()}</tt></pre>
+</div></div>
+<p>No more data can be sent after this command.</p>
<h3 id="headers_command">headers</h3>
-<div class="paragraph"><p>Initiate a response to the client.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Initiate a response to the client.</p>
+<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="font-weight: bold"><span style="color: #000000">cowboy:http_status</span></span>(), <span style="font-weight: bold"><span style="color: #000000">cowboy:http_headers</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>This initiates a response to the client. The stream
-will end when a data command with the <code>fin</code> flag is
-returned.</p></div>
-</div>
-<div class="sect2">
+<pre><tt>{<font color="#FF6600">headers</font>, <b><font color="#000000">cowboy:http_status</font></b>(), <b><font color="#000000">cowboy:http_headers</font></b>()}</tt></pre>
+</div></div>
+<p>This initiates a response to the client. The stream will end when a data command with the <code>fin</code> flag is returned.</p>
<h3 id="data_command">data</h3>
-<div class="paragraph"><p>Send data to the client.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Send data to the client.</p>
+<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">data</span>, <span style="font-weight: bold"><span style="color: #000000">fin</span></span>(), <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>()}</tt></pre></div></div>
-</div>
-<div class="sect2">
+<pre><tt>{<font color="#FF6600">data</font>, <b><font color="#000000">fin</font></b>(), <b><font color="#000000">iodata</font></b>()}</tt></pre>
+</div></div>
<h3 id="push_command">push</h3>
-<div class="paragraph"><p>Push a resource to the client.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Push a resource to the client.</p>
+<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">push</span>, <span style="color: #009900">Method</span>, <span style="color: #009900">Scheme</span>, <span style="color: #009900">Host</span>, <span style="font-weight: bold"><span style="color: #000000">inet:port_number</span></span>(),
- <span style="color: #009900">Path</span>, <span style="color: #009900">Qs</span>, <span style="font-weight: bold"><span style="color: #000000">cowboy:http_headers</span></span>()}
+<pre><tt>{<font color="#FF6600">push</font>, <font color="#009900">Method</font>, <font color="#009900">Scheme</font>, <font color="#009900">Host</font>, <b><font color="#000000">inet:port_number</font></b>(),
+ <font color="#009900">Path</font>, <font color="#009900">Qs</font>, <b><font color="#000000">cowboy:http_headers</font></b>()}
-<span style="color: #009900">Method</span> <span style="color: #990000">=</span> <span style="color: #009900">Scheme</span> <span style="color: #990000">=</span> <span style="color: #009900">Host</span> <span style="color: #990000">=</span> <span style="color: #009900">Path</span> <span style="color: #990000">=</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>The command will be ignored if the protocol does not provide
-any server push mechanism.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Method</font> <font color="#990000">=</font> <font color="#009900">Scheme</font> <font color="#990000">=</font> <font color="#009900">Host</font> <font color="#990000">=</font> <font color="#009900">Path</font> <font color="#990000">=</font> <font color="#009900">Qs</font> <font color="#990000">=</font> <b><font color="#000080">binary</font></b>()</tt></pre>
+</div></div>
+<p>The command will be ignored if the protocol does not provide any server push mechanism.</p>
<h3 id="_flow">flow</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">flow</span>, <span style="font-weight: bold"><span style="color: #000000">pos_integer</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>Request more data to be read from the request body. The
-exact behavior depends on the protocol.</p></div>
-</div>
-<div class="sect2">
+<pre><tt>{<font color="#FF6600">flow</font>, <b><font color="#000000">pos_integer</font></b>()}</tt></pre>
+</div></div>
+<p>Request more data to be read from the request body. The exact behavior depends on the protocol.</p>
<h3 id="_spawn">spawn</h3>
-<div class="paragraph"><p>Inform Cowboy that a process was spawned and should be
-supervised.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Inform Cowboy that a process was spawned and should be supervised.</p>
+<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: #000080">spawn</span></span>, <span style="font-weight: bold"><span style="color: #000080">pid</span></span>(), <span style="font-weight: bold"><span style="color: #000000">timeout</span></span>()}</tt></pre></div></div>
-</div>
-<div class="sect2">
+<pre><tt>{<b><font color="#000080">spawn</font></b>, <b><font color="#000080">pid</font></b>(), <b><font color="#000000">timeout</font></b>()}</tt></pre>
+</div></div>
<h3 id="_error_response">error_response</h3>
-<div class="paragraph"><p>Send an error response if no response was sent previously.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Send an error response if no response was sent previously.</p>
+<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">error_response</span>, <span style="font-weight: bold"><span style="color: #000000">cowboy:http_status</span></span>(), <span style="font-weight: bold"><span style="color: #000000">cowboy:http_headers</span></span>(), <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>()}</tt></pre></div></div>
-</div>
-<div class="sect2">
+<pre><tt>{<font color="#FF6600">error_response</font>, <b><font color="#000000">cowboy:http_status</font></b>(), <b><font color="#000000">cowboy:http_headers</font></b>(), <b><font color="#000000">iodata</font></b>()}</tt></pre>
+</div></div>
<h3 id="switch_protocol_command">switch_protocol</h3>
-<div class="paragraph"><p>Switch to a different protocol.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Switch to a different protocol.</p>
+<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">switch_protocol</span>, <span style="font-weight: bold"><span style="color: #000000">cowboy:http_headers</span></span>(), <span style="font-weight: bold"><span style="color: #000000">module</span></span>(), <span style="font-weight: bold"><span style="color: #000000">state</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>Contains the headers that will be sent in the 101 response,
-along with the module implementing the protocol we are
-switching to and its initial state.</p></div>
-</div>
-<div class="sect2">
+<pre><tt>{<font color="#FF6600">switch_protocol</font>, <b><font color="#000000">cowboy:http_headers</font></b>(), <b><font color="#000000">module</font></b>(), <b><font color="#000000">state</font></b>()}</tt></pre>
+</div></div>
+<p>Contains the headers that will be sent in the 101 response, along with the module implementing the protocol we are switching to and its initial state.</p>
<h3 id="_stop">stop</h3>
-<div class="paragraph"><p>Stop the stream.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Stop the stream.</p>
+<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">stop</span></tt></pre></div></div>
-<div class="paragraph"><p>While no more data can be sent after the <code>fin</code> flag was set,
-the stream is still tracked by Cowboy until it is stopped by
-the handler.</p></div>
-<div class="paragraph"><p>The behavior when stopping a stream for which no response
-has been sent will vary depending on the protocol. The stream
-will end successfully as far as the client is concerned.</p></div>
-<div class="paragraph"><p>To indicate that an error occurred, either use <code>error_response</code>
-before stopping, or use <code>internal_error</code>.</p></div>
-</div>
-<div class="sect2">
+<pre><tt><font color="#FF6600">stop</font></tt></pre>
+</div></div>
+<p>While no more data can be sent after the <code>fin</code> flag was set, the stream is still tracked by Cowboy until it is stopped by the handler.</p>
+<p>The behavior when stopping a stream for which no response has been sent will vary depending on the protocol. The stream will end successfully as far as the client is concerned.</p>
+<p>To indicate that an error occurred, either use <code>error_response</code> before stopping, or use <code>internal_error</code>.</p>
<h3 id="_internal_error">internal_error</h3>
-<div class="paragraph"><p>Stop the stream with an error.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Stop the stream with an error.</p>
+<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">internal_error</span>, <span style="color: #009900">Reason</span>, <span style="color: #009900">HumanReadable</span>}
-
-<span style="color: #009900">Reason</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()
-<span style="color: #009900">HumanReadable</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000080">atom</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>This command should be used when the stream cannot continue
-because of an internal error. An <code>error_response</code> command
-may be sent before that to advertise to the client why the
-stream is dropped.</p></div>
-</div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#FF6600">internal_error</font>, <font color="#009900">Reason</font>, <font color="#009900">HumanReadable</font>}
+
+<font color="#009900">Reason</font> <font color="#990000">=</font> <b><font color="#000000">any</font></b>()
+<font color="#009900">HumanReadable</font> <font color="#990000">=</font> <b><font color="#000080">atom</font></b>()</tt></pre>
+</div></div>
+<p>This command should be used when the stream cannot continue because of an internal error. An <code>error_response</code> command may be sent before that to advertise to the client why the stream is dropped.</p>
<h2 id="_predefined_events">Predefined events</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy will forward all messages sent to the stream to
-the <code>info/3</code> callback. To send a message to a stream,
-send a message to the connection process with the form
-<code>{{Pid, StreamID}, Msg}</code>. The connection process will
-then forward <code>Msg</code> to the stream handlers.</p></div>
-<div class="paragraph"><p>Cowboy will also forward the exit signals for the
-processes that the stream spawned.</p></div>
-<div class="sect2">
+<p>Cowboy will forward all messages sent to the stream to the <code>info/3</code> callback. To send a message to a stream, send a message to the connection process with the form <code>{{Pid, StreamID}, Msg}</code>. The connection process will then forward <code>Msg</code> to the stream handlers.</p>
+<p>Cowboy will also forward the exit signals for the processes that the stream spawned.</p>
<h3 id="_exit">EXIT</h3>
-<div class="paragraph"><p>A process spawned by this stream has exited.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<!-- info(_StreamID, {&apos;EXIT&apos;, Pid, normal}, State=#state{pid=Pid}) -&gt;-->
+<!-- info(_StreamID, {&apos;EXIT&apos;, Pid, {_Reason, [_, {cow_http_hd, _, _, _}|_]}}, State=#state{pid=Pid}) -&gt;-->
+<!-- info(StreamID, Exit = {&apos;EXIT&apos;, Pid, {Reason, Stacktrace}}, State=#state{ref=Ref, pid=Pid}) -&gt;-->
+<p>A process spawned by this stream has exited.</p>
+<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: #000080">'EXIT'</span>, <span style="font-weight: bold"><span style="color: #000080">pid</span></span>(), <span style="font-weight: bold"><span style="color: #000000">any</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>This is the raw exit message without any modification.</p></div>
-</div>
-<div class="sect2">
+<pre><tt>{<font color="#000080">'EXIT'</font>, <b><font color="#000080">pid</font></b>(), <b><font color="#000000">any</font></b>()}</tt></pre>
+</div></div>
+<p>This is the raw exit message without any modification.</p>
+<!-- === read_body-->
+<!-- -->
+<!-- //info(_StreamID, {read_body, Ref, Length, _},-->
+<!-- //info(StreamID, {read_body, Ref, Length, Period}, State) -&gt;-->
+<!-- -->
+<!-- TODO yeah I am not actually sure this one should be public just yet-->
+<!-- TODO if it is, then we probably shouldn&apos;t send a message directly,-->
+<!-- TODO but rather return a command that will end up sending the message-->
+<!-- -->
+<!-- TODO The problem being that no stream handler has access to that-->
+<!-- TODO message if we send it directly. So we should have a command-->
+<!-- TODO send_message or something that can be seen from all handlers.-->
+<!-- -->
+<!-- TODO The thing is that stream handlers can have 0 to N processes-->
+<!-- TODO so we have to make it easy to say which process should-->
+<!-- TODO receive the message, and perhaps *identify* which process-->
+<!-- TODO gets it?-->
<h3 id="_response">response</h3>
-<div class="paragraph"><p>Same as the <a href="../response_command">response command</a>.</p></div>
-<div class="paragraph"><p>Usually sent when the request process replies to the client.
-May also be sent by Cowboy internally.</p></div>
-</div>
-<div class="sect2">
+<p>Same as the <a href="../response_command">response command</a>.</p>
+<p>Usually sent when the request process replies to the client. May also be sent by Cowboy internally.</p>
<h3 id="_headers">headers</h3>
-<div class="paragraph"><p>Same as the <a href="../headers_command">headers command</a>.</p></div>
-<div class="paragraph"><p>Sent when the request process starts replying to the client.</p></div>
-</div>
-<div class="sect2">
+<p>Same as the <a href="../headers_command">headers command</a>.</p>
+<p>Sent when the request process starts replying to the client.</p>
<h3 id="_data">data</h3>
-<div class="paragraph"><p>Same as the <a href="../data_command">data command</a>.</p></div>
-<div class="paragraph"><p>Sent when the request process streams data to the client.</p></div>
-</div>
-<div class="sect2">
+<p>Same as the <a href="../data_command">data command</a>.</p>
+<p>Sent when the request process streams data to the client.</p>
<h3 id="_push">push</h3>
-<div class="paragraph"><p>Same as the <a href="../push_command">push command</a>.</p></div>
-<div class="paragraph"><p>Sent when the request process pushes a resource to the client.</p></div>
-</div>
-<div class="sect2">
+<p>Same as the <a href="../push_command">push command</a>.</p>
+<p>Sent when the request process pushes a resource to the client.</p>
<h3 id="_switch_protocol">switch_protocol</h3>
-<div class="paragraph"><p>Same as the <a href="../switch_protocol_command">switch_protocol command</a>.</p></div>
-<div class="paragraph"><p>Sent when switching to the HTTP/2 or Websocket protocol.</p></div>
-</div>
-</div>
-</div>
-<div class="sect1">
+<p>Same as the <a href="../switch_protocol_command">switch_protocol command</a>.</p>
+<!-- @todo Not done for HTTP/2 yet.-->
+<p>Sent when switching to the HTTP/2 or Websocket protocol.</p>
<h2 id="_exports">Exports</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The following function should be called by modules implementing
-stream handlers to execute the next stream handler in the list:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../cowboy_stream.init">cowboy_stream:init(3)</a> - Initialize a stream
-</p>
+<p>The following function should be called by modules implementing stream handlers to execute the next stream handler in the list:</p>
+<ul><li><a href="../cowboy_stream.init">cowboy_stream:init(3)</a> - Initialize a stream
</li>
-<li>
-<p>
-<a href="../cowboy_stream.data">cowboy_stream:data(3)</a> - Handle data for a stream
-</p>
+<li><a href="../cowboy_stream.data">cowboy_stream:data(3)</a> - Handle data for a stream
</li>
-<li>
-<p>
-<a href="../cowboy_stream.info">cowboy_stream:info(3)</a> - Handle a message for a stream
-</p>
+<li><a href="../cowboy_stream.info">cowboy_stream:info(3)</a> - Handle a message for a stream
</li>
-<li>
-<p>
-<a href="../cowboy_stream.terminate">cowboy_stream:terminate(3)</a> - Terminate a stream
-</p>
+<li><a href="../cowboy_stream.terminate">cowboy_stream:terminate(3)</a> - Terminate a stream
</li>
-<li>
-<p>
-<a href="../cowboy_stream.early_error">cowboy_stream:early_error(3)</a> - Handle an early error for a stream
-</p>
+<li><a href="../cowboy_stream.early_error">cowboy_stream:early_error(3)</a> - Handle an early error for a stream
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_types">Types</h2>
-<div class="sectionbody">
-<div class="sect2">
<h3 id="_commands">commands()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">commands</span></span>() <span style="color: #990000">::</span> [<span style="color: #009900">Command</span>]</tt></pre></div></div>
-<div class="paragraph"><p>See the <a href="../commands">list of commands</a> for details.</p></div>
-</div>
-<div class="sect2">
+<pre><tt><b><font color="#000000">commands</font></b>() <font color="#990000">::</font> [<font color="#009900">Command</font>]</tt></pre>
+</div></div>
+<p>See the <a href="../commands">list of commands</a> for details.</p>
<h3 id="_fin">fin()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">fin</span></span>() <span style="color: #990000">::</span> <span style="color: #FF6600">fin</span> | <span style="color: #FF6600">nofin</span></tt></pre></div></div>
-<div class="paragraph"><p>Used in commands and events to indicate that this is
-the end of the stream.</p></div>
-</div>
-<div class="sect2">
+<pre><tt><b><font color="#000000">fin</font></b>() <font color="#990000">::</font> <font color="#FF6600">fin</font> | <font color="#FF6600">nofin</font></tt></pre>
+</div></div>
+<p>Used in commands and events to indicate that this is the end of the stream.</p>
<h3 id="_partial_req">partial_req()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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: #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">version</span> <span style="color: #990000">=&gt;</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: #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">path</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">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>
- <span style="color: #0000FF">headers</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:http_headers</span></span>(),
- <span style="color: #0000FF">peer</span> <span style="color: #990000">=&gt;</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>Partial request information received when an early error is
-detected.</p></div>
-</div>
-<div class="sect2">
+<pre><tt><b><font color="#000000">req</font></b>() <font color="#990000">::</font> #{
+ <font color="#0000FF">method</font> <font color="#990000">=&gt;</font> <b><font color="#000080">binary</font></b>(), <i><font color="#9A1900">%% case sensitive</font></i>
+ <font color="#0000FF">version</font> <font color="#990000">=&gt;</font> <b><font color="#000000">cowboy:http_version</font></b>() | <b><font color="#000080">atom</font></b>(),
+ <font color="#0000FF">scheme</font> <font color="#990000">=&gt;</font> <b><font color="#000080">binary</font></b>(), <i><font color="#9A1900">%% lowercase; case insensitive</font></i>
+ <font color="#0000FF">host</font> <font color="#990000">=&gt;</font> <b><font color="#000080">binary</font></b>(), <i><font color="#9A1900">%% lowercase; case insensitive</font></i>
+ <font color="#0000FF">port</font> <font color="#990000">=&gt;</font> <b><font color="#000000">inet:port_number</font></b>(),
+ <font color="#0000FF">path</font> <font color="#990000">=&gt;</font> <b><font color="#000080">binary</font></b>(), <i><font color="#9A1900">%% case sensitive</font></i>
+ <font color="#0000FF">qs</font> <font color="#990000">=&gt;</font> <b><font color="#000080">binary</font></b>(), <i><font color="#9A1900">%% case sensitive</font></i>
+ <font color="#0000FF">headers</font> <font color="#990000">=&gt;</font> <b><font color="#000000">cowboy:http_headers</font></b>(),
+ <font color="#0000FF">peer</font> <font color="#990000">=&gt;</font> {<b><font color="#000000">inet:ip_address</font></b>(), <b><font color="#000000">inet:port_number</font></b>()}
+}</tt></pre>
+</div></div>
+<p>Partial request information received when an early error is detected.</p>
<h3 id="_reason">reason()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">reason</span></span>() <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">normal</span></span>
- | {<span style="color: #FF6600">internal_error</span>, <span style="color: #FF6600">timeout</span> | {<span style="color: #FF6600">error</span> | <span style="font-weight: bold"><span style="color: #000080">exit</span></span> | <span style="font-weight: bold"><span style="color: #000080">throw</span></span>, <span style="font-weight: bold"><span style="color: #000000">any</span></span>()}, <span style="color: #009900">HumanReadable</span>}
- | {<span style="color: #FF6600">socket_error</span>, <span style="color: #FF6600">closed</span> | <span style="font-weight: bold"><span style="color: #000080">atom</span></span>(), <span style="color: #009900">HumanReadable</span>}
- | {<span style="color: #FF6600">stream_error</span>, <span style="color: #009900">Error</span>, <span style="color: #009900">HumanReadable</span>}
- | {<span style="color: #FF6600">connection_error</span>, <span style="color: #009900">Error</span>, <span style="color: #009900">HumanReadable</span>}
- | {<span style="color: #FF6600">stop</span>, <span style="font-weight: bold"><span style="color: #000000">cow_http2:frame</span></span>(), <span style="color: #009900">HumanReadable</span>}
-
-<span style="color: #009900">Error</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000080">atom</span></span>()
-<span style="color: #009900">HumanReadable</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000080">atom</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Reason for the stream termination.</p></div>
-</div>
-<div class="sect2">
+<pre><tt><b><font color="#000000">reason</font></b>() <font color="#990000">::</font> <b><font color="#000080">normal</font></b>
+ | {<font color="#FF6600">internal_error</font>, <font color="#FF6600">timeout</font> | {<font color="#FF6600">error</font> | <b><font color="#000080">exit</font></b> | <b><font color="#000080">throw</font></b>, <b><font color="#000000">any</font></b>()}, <font color="#009900">HumanReadable</font>}
+ | {<font color="#FF6600">socket_error</font>, <font color="#FF6600">closed</font> | <b><font color="#000080">atom</font></b>(), <font color="#009900">HumanReadable</font>}
+ | {<font color="#FF6600">stream_error</font>, <font color="#009900">Error</font>, <font color="#009900">HumanReadable</font>}
+ | {<font color="#FF6600">connection_error</font>, <font color="#009900">Error</font>, <font color="#009900">HumanReadable</font>}
+ | {<font color="#FF6600">stop</font>, <b><font color="#000000">cow_http2:frame</font></b>(), <font color="#009900">HumanReadable</font>}
+
+<font color="#009900">Error</font> <font color="#990000">=</font> <b><font color="#000080">atom</font></b>()
+<font color="#009900">HumanReadable</font> <font color="#990000">=</font> <b><font color="#000080">atom</font></b>()</tt></pre>
+</div></div>
+<p>Reason for the stream termination.</p>
<h3 id="_resp_command">resp_command()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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_command</span></span>() <span style="color: #990000">::</span> {<span style="color: #FF6600">response</span>, <span style="font-weight: bold"><span style="color: #000000">cowboy:http_status</span></span>(),
- <span style="font-weight: bold"><span style="color: #000000">cowboy:http_headers</span></span>(), <span style="font-weight: bold"><span style="color: #000000">cowboy_req:resp_body</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>See the <a href="../response_command">response command</a> for details.</p></div>
-</div>
-<div class="sect2">
+<pre><tt><b><font color="#000000">resp_command</font></b>() <font color="#990000">::</font> {<font color="#FF6600">response</font>, <b><font color="#000000">cowboy:http_status</font></b>(),
+ <b><font color="#000000">cowboy:http_headers</font></b>(), <b><font color="#000000">cowboy_req:resp_body</font></b>()}</tt></pre>
+</div></div>
+<p>See the <a href="../response_command">response command</a> for details.</p>
<h3 id="_streamid">streamid()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">streamid</span></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>The identifier for this stream.</p></div>
-<div class="paragraph"><p>The identifier is unique over the connection process.
-It is possible to form a unique identifier node-wide and
-cluster-wide by wrapping it in a <code>{self(), StreamID}</code>
-tuple.</p></div>
-</div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">streamid</font></b>() <font color="#990000">::</font> <b><font color="#000000">any</font></b>()</tt></pre>
+</div></div>
+<p>The identifier for this stream.</p>
+<p>The identifier is unique over the connection process. It is possible to form a unique identifier node-wide and cluster-wide by wrapping it in a <code>{self(), StreamID}</code> tuple.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Module introduced.
-</p>
+<ul><li><strong>2.0</strong>: Module introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="..">cowboy(7)</a>,
-<a href="../cowboy_http">cowboy_http(3)</a>,
-<a href="../cowboy_http2">cowboy_http2(3)</a></p></div>
-</div>
-</div>
+<p><a href="..">cowboy(7)</a>, <a href="../cowboy_http">cowboy_http(3)</a>, <a href="../cowboy_http2">cowboy_http2(3)</a></p>
+
diff --git a/docs/en/cowboy/2.0/manual/cowboy_websocket/index.html b/docs/en/cowboy/2.0/manual/cowboy_websocket/index.html
index 8710a2f9..0291d043 100644
--- a/docs/en/cowboy/2.0/manual/cowboy_websocket/index.html
+++ b/docs/en/cowboy/2.0/manual/cowboy_websocket/index.html
@@ -62,295 +62,144 @@
<h1 class="lined-header"><span>cowboy_websocket(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_websocket - Websocket</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_websocket - Websocket</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The module <code>cowboy_websocket</code> implements Websocket
-as a Ranch protocol. It also defines a callback interface
-for handling Websocket connections.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The module <code>cowboy_websocket</code> implements Websocket as a Ranch protocol. It also defines a callback interface for handling Websocket connections.</p>
<h2 id="_callbacks">Callbacks</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Websocket handlers must implement the following callback
-interface:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Websocket handlers must implement the following callback interface:</p>
+<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">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_websocket</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
- | {<span style="color: #FF6600">cowboy_websocket</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>, <span style="color: #009900">Opts</span>}
-
-<span style="font-weight: bold"><span style="color: #000000">websocket_init</span></span>(<span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> <span style="color: #009900">CallResult</span> <span style="font-style: italic"><span style="color: #9A1900">%% optional</span></span>
-<span style="font-weight: bold"><span style="color: #000000">websocket_handle</span></span>(<span style="color: #009900">InFrame</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> <span style="color: #009900">CallResult</span>
-<span style="font-weight: bold"><span style="color: #000000">websocket_info</span></span>(<span style="color: #009900">Info</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> <span style="color: #009900">CallResult</span>
-
-<span style="font-weight: bold"><span style="color: #000000">terminate</span></span>(<span style="color: #009900">Reason</span>, <span style="color: #009900">PartialReq</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> <span style="color: #FF6600">ok</span> <span style="font-style: italic"><span style="color: #9A1900">%% optional</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">PartialReq</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">map</span></span>()
-<span style="color: #009900">State</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()
-<span style="color: #009900">Opts</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_websocket:opts</span></span>()
-<span style="color: #009900">InFrame</span> <span style="color: #990000">::</span> {<span style="color: #FF6600">text</span> | <span style="font-weight: bold"><span style="color: #000080">binary</span></span> | <span style="color: #FF6600">ping</span> | <span style="color: #FF6600">pong</span>, <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()}
-<span style="color: #009900">OutFrame</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cow_ws:frame</span></span>() <span style="font-style: italic"><span style="color: #9A1900">%% see types below</span></span>
-<span style="color: #009900">Info</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()
-
-<span style="color: #009900">CallResult</span> <span style="color: #990000">::</span> {<span style="color: #FF6600">ok</span>, <span style="color: #009900">State</span>}
- | {<span style="color: #FF6600">ok</span>, <span style="color: #009900">State</span>, <span style="color: #FF6600">hibernate</span>}
- | {<span style="color: #FF6600">reply</span>, <span style="color: #009900">OutFrame</span> | [<span style="color: #009900">OutFrame</span>], <span style="color: #009900">State</span>}
- | {<span style="color: #FF6600">reply</span>, <span style="color: #009900">OutFrame</span> | [<span style="color: #009900">OutFrame</span>], <span style="color: #009900">State</span>, <span style="color: #FF6600">hibernate</span>}
- | {<span style="color: #FF6600">stop</span>, <span style="color: #009900">State</span>}
-
-<span style="color: #009900">Reason</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">normal</span></span> | <span style="color: #FF6600">stop</span> | <span style="color: #FF6600">timeout</span>
- | <span style="color: #FF6600">remote</span> | {<span style="color: #FF6600">remote</span>, <span style="font-weight: bold"><span style="color: #000000">cow_ws:close_code</span></span>(), <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()}
- | {<span style="color: #FF6600">error</span>, <span style="color: #FF6600">badencoding</span> | <span style="color: #FF6600">badframe</span> | <span style="color: #FF6600">closed</span> | <span style="font-weight: bold"><span style="color: #000080">atom</span></span>()}
- | {<span style="color: #FF6600">crash</span>, <span style="color: #FF6600">error</span> | <span style="font-weight: bold"><span style="color: #000080">exit</span></span> | <span style="font-weight: bold"><span style="color: #000080">throw</span></span>, <span style="font-weight: bold"><span style="color: #000000">any</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>The <code>init/2</code> callback is common to all handlers. To upgrade
-the connection to Websocket, it must return <code>cowboy_websocket</code>
-as the first element of the tuple.</p></div>
-<div class="paragraph"><p>Any operation requiring the HTTP request must be done in the
-<code>init/2</code> function, as the Req object will not be available
-after it returns. Websocket sub-protocol selection should
-therefore be done in this function.</p></div>
-<div class="paragraph"><p>The optional <code>websocket_init/1</code> callback will be called once
-the connection has been upgraded to Websocket. It can be used
-to perform any required initialization of the handler.</p></div>
-<div class="paragraph"><p>Note that the <code>init/2</code> function does not run in the same
-process as the Websocket callbacks. Any Websocket-specific
-initialization must be done in <code>websocket_init/1</code>.</p></div>
-<div class="paragraph"><p>The <code>websocket_handle/2</code> callback will be called for every
-frame received. The <code>websocket_info/2</code> callback will be
-called for every Erlang message received.</p></div>
-<div class="paragraph"><p>All three Websocket callbacks may send one or more frames
-back to the client (by returning a <code>reply</code> tuple) or terminate
-the connection (by sending a <code>close</code> frame or returning a <code>stop</code>
-tuple).</p></div>
-<div class="paragraph"><p>The optional <code>terminate/3</code> callback will ultimately be called
-with the reason for the termination of the connection. This
-callback is common to all handlers. Note that Websocket will
-not provide the full Req object by default, to save memory.</p></div>
-<div class="paragraph"><p>Cowboy will terminate the process right after closing the
-Websocket connection. This means that there is no need to
-perform any cleanup in the <code>terminate/3</code> callback.</p></div>
-<div class="paragraph"><p>The following terminate reasons are defined for Websocket
-connections:</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-normal
-</dt>
-<dd>
-<p>
- The connection was closed normally before establishing a Websocket
- connection. This typically happens if an <code>ok</code> tuple is returned
- from the <code>init/2</code> callback.
-</p>
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>)
+ <font color="#990000">-&gt;</font> {<font color="#FF6600">cowboy_websocket</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
+ | {<font color="#FF6600">cowboy_websocket</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>, <font color="#009900">Opts</font>}
+
+<b><font color="#000000">websocket_init</font></b>(<font color="#009900">State</font>) <font color="#990000">-&gt;</font> <font color="#009900">CallResult</font> <i><font color="#9A1900">%% optional</font></i>
+<b><font color="#000000">websocket_handle</font></b>(<font color="#009900">InFrame</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> <font color="#009900">CallResult</font>
+<b><font color="#000000">websocket_info</font></b>(<font color="#009900">Info</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> <font color="#009900">CallResult</font>
+
+<b><font color="#000000">terminate</font></b>(<font color="#009900">Reason</font>, <font color="#009900">PartialReq</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> <font color="#FF6600">ok</font> <i><font color="#9A1900">%% optional</font></i>
+
+<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()
+<font color="#009900">PartialReq</font> <font color="#990000">::</font> <b><font color="#000000">map</font></b>()
+<font color="#009900">State</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()
+<font color="#009900">Opts</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_websocket:opts</font></b>()
+<font color="#009900">InFrame</font> <font color="#990000">::</font> {<font color="#FF6600">text</font> | <b><font color="#000080">binary</font></b> | <font color="#FF6600">ping</font> | <font color="#FF6600">pong</font>, <b><font color="#000080">binary</font></b>()}
+<font color="#009900">OutFrame</font> <font color="#990000">::</font> <b><font color="#000000">cow_ws:frame</font></b>() <i><font color="#9A1900">%% see types below</font></i>
+<font color="#009900">Info</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()
+
+<font color="#009900">CallResult</font> <font color="#990000">::</font> {<font color="#FF6600">ok</font>, <font color="#009900">State</font>}
+ | {<font color="#FF6600">ok</font>, <font color="#009900">State</font>, <font color="#FF6600">hibernate</font>}
+ | {<font color="#FF6600">reply</font>, <font color="#009900">OutFrame</font> | [<font color="#009900">OutFrame</font>], <font color="#009900">State</font>}
+ | {<font color="#FF6600">reply</font>, <font color="#009900">OutFrame</font> | [<font color="#009900">OutFrame</font>], <font color="#009900">State</font>, <font color="#FF6600">hibernate</font>}
+ | {<font color="#FF6600">stop</font>, <font color="#009900">State</font>}
+
+<font color="#009900">Reason</font> <font color="#990000">::</font> <b><font color="#000080">normal</font></b> | <font color="#FF6600">stop</font> | <font color="#FF6600">timeout</font>
+ | <font color="#FF6600">remote</font> | {<font color="#FF6600">remote</font>, <b><font color="#000000">cow_ws:close_code</font></b>(), <b><font color="#000080">binary</font></b>()}
+ | {<font color="#FF6600">error</font>, <font color="#FF6600">badencoding</font> | <font color="#FF6600">badframe</font> | <font color="#FF6600">closed</font> | <b><font color="#000080">atom</font></b>()}
+ | {<font color="#FF6600">crash</font>, <font color="#FF6600">error</font> | <b><font color="#000080">exit</font></b> | <b><font color="#000080">throw</font></b>, <b><font color="#000000">any</font></b>()}</tt></pre>
+</div></div>
+<p>The <code>init/2</code> callback is common to all handlers. To upgrade the connection to Websocket, it must return <code>cowboy_websocket</code> as the first element of the tuple.</p>
+<p>Any operation requiring the HTTP request must be done in the <code>init/2</code> function, as the Req object will not be available after it returns. Websocket sub-protocol selection should therefore be done in this function.</p>
+<p>The optional <code>websocket_init/1</code> callback will be called once the connection has been upgraded to Websocket. It can be used to perform any required initialization of the handler.</p>
+<p>Note that the <code>init/2</code> function does not run in the same process as the Websocket callbacks. Any Websocket-specific initialization must be done in <code>websocket_init/1</code>.</p>
+<p>The <code>websocket_handle/2</code> callback will be called for every frame received. The <code>websocket_info/2</code> callback will be called for every Erlang message received.</p>
+<p>All three Websocket callbacks may send one or more frames back to the client (by returning a <code>reply</code> tuple) or terminate the connection (by sending a <code>close</code> frame or returning a <code>stop</code> tuple).</p>
+<p>The optional <code>terminate/3</code> callback will ultimately be called with the reason for the termination of the connection. This callback is common to all handlers. Note that Websocket will not provide the full Req object by default, to save memory.</p>
+<p>Cowboy will terminate the process right after closing the Websocket connection. This means that there is no need to perform any cleanup in the <code>terminate/3</code> callback.</p>
+<p>The following terminate reasons are defined for Websocket connections:</p>
+<dl><dt>normal</dt>
+<dd><p>The connection was closed normally before establishing a Websocket connection. This typically happens if an <code>ok</code> tuple is returned from the <code>init/2</code> callback.</p>
</dd>
-<dt class="hdlist1">
-remote
-</dt>
-<dd>
-<p>
- The remote endpoint closed the connection without giving any
- further details.
-</p>
+<dt>remote</dt>
+<dd><p>The remote endpoint closed the connection without giving any further details.</p>
</dd>
-<dt class="hdlist1">
-{remote, Code, Payload}
-</dt>
-<dd>
-<p>
- The remote endpoint closed the connection with the given
- <code>Code</code> and <code>Payload</code> as the reason.
-</p>
+<dt>{remote, Code, Payload}</dt>
+<dd><p>The remote endpoint closed the connection with the given <code>Code</code> and <code>Payload</code> as the reason.</p>
</dd>
-<dt class="hdlist1">
-stop
-</dt>
-<dd>
-<p>
- The handler requested to close the connection, either by returning
- a <code>stop</code> tuple or by sending a <code>close</code> frame.
-</p>
+<dt>stop</dt>
+<dd><p>The handler requested to close the connection, either by returning a <code>stop</code> tuple or by sending a <code>close</code> frame.</p>
</dd>
-<dt class="hdlist1">
-timeout
-</dt>
-<dd>
-<p>
- The connection has been closed due to inactivity. The timeout
- value can be configured from <code>init/2</code>.
-</p>
+<dt>timeout</dt>
+<dd><p>The connection has been closed due to inactivity. The timeout value can be configured from <code>init/2</code>.</p>
</dd>
-<dt class="hdlist1">
-{crash, Class, Reason}
-</dt>
-<dd>
-<p>
- A crash occurred in the handler. <code>Class</code> and <code>Reason</code> can be
- used to obtain more information about the crash. The function
- <code>erlang:get_stacktrace/0</code> can also be called to obtain the
- stacktrace of the process when the crash occurred.
-</p>
+<dt>{crash, Class, Reason}</dt>
+<dd><p>A crash occurred in the handler. <code>Class</code> and <code>Reason</code> can be used to obtain more information about the crash. The function <code>erlang:get_stacktrace/0</code> can also be called to obtain the stacktrace of the process when the crash occurred.</p>
</dd>
-<dt class="hdlist1">
-{error, badencoding}
-</dt>
-<dd>
-<p>
- A text frame was sent by the client with invalid encoding. All
- text frames must be valid UTF-8.
-</p>
+<dt>{error, badencoding}</dt>
+<dd><p>A text frame was sent by the client with invalid encoding. All text frames must be valid UTF-8.</p>
</dd>
-<dt class="hdlist1">
-{error, badframe}
-</dt>
-<dd>
-<p>
- A protocol error has been detected.
-</p>
+<dt>{error, badframe}</dt>
+<dd><p>A protocol error has been detected.</p>
</dd>
-<dt class="hdlist1">
-{error, closed}
-</dt>
-<dd>
-<p>
- The socket has been closed brutally without a close frame being
- received first.
-</p>
+<dt>{error, closed}</dt>
+<dd><p>The socket has been closed brutally without a close frame being received first.</p>
</dd>
-<dt class="hdlist1">
-{error, Reason}
-</dt>
-<dd>
-<p>
- A socket error ocurred.
-</p>
+<dt>{error, Reason}</dt>
+<dd><p>A socket error ocurred.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_types">Types</h2>
-<div class="sectionbody">
-<div class="sect3">
<h4 id="_cow_ws_frame">cow_ws:frame()</h4>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">frame</span></span>() <span style="color: #990000">::</span> {<span style="color: #FF6600">text</span>, <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>()}
- | {<span style="font-weight: bold"><span style="color: #000080">binary</span></span>, <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>()}
- | <span style="color: #FF6600">ping</span> | {<span style="color: #FF6600">ping</span>, <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>()}
- | <span style="color: #FF6600">pong</span> | {<span style="color: #FF6600">pong</span>, <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>()}
- | <span style="color: #FF6600">close</span> | {<span style="color: #FF6600">close</span>, <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>()} | {<span style="color: #FF6600">close</span>, <span style="font-weight: bold"><span style="color: #000000">close_code</span></span>(), <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>()}
-
-<span style="font-weight: bold"><span style="color: #000000">close_code</span></span>() <span style="color: #990000">::</span> <span style="color: #993399">1000</span><span style="color: #990000">..</span><span style="color: #993399">1003</span> | <span style="color: #993399">1006</span><span style="color: #990000">..</span><span style="color: #993399">1011</span> | <span style="color: #993399">3000</span><span style="color: #990000">..</span><span style="color: #993399">4999</span></tt></pre></div></div>
-<div class="paragraph"><p>Websocket frames that can be sent as a response.</p></div>
-<div class="paragraph"><p>Note that there is no need to send pong frames back as
-Cowboy does it automatically for you.</p></div>
-</div>
-<div class="sect2">
+<pre><tt><b><font color="#000000">frame</font></b>() <font color="#990000">::</font> {<font color="#FF6600">text</font>, <b><font color="#000000">iodata</font></b>()}
+ | {<b><font color="#000080">binary</font></b>, <b><font color="#000000">iodata</font></b>()}
+ | <font color="#FF6600">ping</font> | {<font color="#FF6600">ping</font>, <b><font color="#000000">iodata</font></b>()}
+ | <font color="#FF6600">pong</font> | {<font color="#FF6600">pong</font>, <b><font color="#000000">iodata</font></b>()}
+ | <font color="#FF6600">close</font> | {<font color="#FF6600">close</font>, <b><font color="#000000">iodata</font></b>()} | {<font color="#FF6600">close</font>, <b><font color="#000000">close_code</font></b>(), <b><font color="#000000">iodata</font></b>()}
+
+<b><font color="#000000">close_code</font></b>() <font color="#990000">::</font> <font color="#993399">1000</font><font color="#990000">..</font><font color="#993399">1003</font> | <font color="#993399">1006</font><font color="#990000">..</font><font color="#993399">1011</font> | <font color="#993399">3000</font><font color="#990000">..</font><font color="#993399">4999</font></tt></pre>
+</div></div>
+<p>Websocket frames that can be sent as a response.</p>
+<p>Note that there is no need to send pong frames back as Cowboy does it automatically for you.</p>
<h3 id="_opts">opts()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">opts</span></span>() <span style="color: #990000">::</span> #{
- <span style="color: #0000FF">compress</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>(),
- <span style="color: #0000FF">idle_timeout</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">timeout</span></span>(),
- <span style="color: #0000FF">req_filter</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">fun</span></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">map</span></span>())
-}</tt></pre></div></div>
-<div class="paragraph"><p>Websocket handler options.</p></div>
-<div class="paragraph"><p>This configuration is passed to Cowboy from the <code>init/2</code>
-function:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">opts</font></b>() <font color="#990000">::</font> #{
+ <font color="#0000FF">compress</font> <font color="#990000">=&gt;</font> <b><font color="#000000">boolean</font></b>(),
+ <font color="#0000FF">idle_timeout</font> <font color="#990000">=&gt;</font> <b><font color="#000000">timeout</font></b>(),
+ <font color="#0000FF">req_filter</font> <font color="#990000">=&gt;</font> <b><font color="#0000FF">fun</font></b>((<b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <b><font color="#000000">map</font></b>())
+}</tt></pre>
+</div></div>
+<p>Websocket handler options.</p>
+<p>This configuration is passed to Cowboy from the <code>init/2</code> function:</p>
+<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">init</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- <span style="color: #009900">Opts</span> <span style="color: #990000">=</span> #{<span style="color: #0000FF">compress</span> <span style="color: #990000">=&gt;</span> <span style="color: #000080">true</span>},
- {<span style="color: #FF6600">cowboy_websocket</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>, <span style="color: #009900">Opts</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>The default value is given next to the option name:</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-compress (false)
-</dt>
-<dd>
-<p>
- Whether to enable the Websocket frame compression
- extension. Frames will only be compressed for the
- clients that support this extension.
-</p>
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ <font color="#009900">Opts</font> <font color="#990000">=</font> #{<font color="#0000FF">compress</font> <font color="#990000">=&gt;</font> <font color="#000080">true</font>},
+ {<font color="#FF6600">cowboy_websocket</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>, <font color="#009900">Opts</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>The default value is given next to the option name:</p>
+<dl><dt>compress (false)</dt>
+<dd><p>Whether to enable the Websocket frame compression extension. Frames will only be compressed for the clients that support this extension.</p>
</dd>
-<dt class="hdlist1">
-idle_timeout (60000)
-</dt>
-<dd>
-<p>
- Time in milliseconds that Cowboy will keep the
- connection open without receiving anything from
- the client.
-</p>
+<dt>idle_timeout (60000)</dt>
+<dd><p>Time in milliseconds that Cowboy will keep the connection open without receiving anything from the client.</p>
</dd>
-<dt class="hdlist1">
-req_filter
-</dt>
-<dd>
-<p>
- A function applied to the Req to compact it and
- only keep required information. The Req is only
- given back in the <code>terminate/3</code> callback. By default
- it keeps the method, version, URI components and peer
- information.
-</p>
+<dt>req_filter</dt>
+<dd><p>A function applied to the Req to compact it and only keep required information. The Req is only given back in the <code>terminate/3</code> callback. By default it keeps the method, version, URI components and peer information.</p>
</dd>
-</dl></div>
-</div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: The Req object is no longer passed to Websocket callbacks.
-</p>
+<ul><li><strong>2.0</strong>: The Req object is no longer passed to Websocket callbacks.
</li>
-<li>
-<p>
-<strong>2.0</strong>: The callback <code>websocket_terminate/3</code> was removed in favor of <code>terminate/3</code>.
-</p>
+<li><strong>2.0</strong>: The callback <code>websocket_terminate/3</code> was removed in favor of <code>terminate/3</code>.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Protocol introduced.
-</p>
+<li><strong>1.0</strong>: Protocol introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="..">cowboy(7)</a>,
-<a href="../cowboy_handler">cowboy_handler(3)</a>,
-<a href="../cowboy_http">cowboy_http(3)</a>,
-<a href="../cowboy_http2">cowboy_http2(3)</a></p></div>
-</div>
-</div>
+<p><a href="..">cowboy(7)</a>, <a href="../cowboy_handler">cowboy_handler(3)</a>, <a href="../cowboy_http">cowboy_http(3)</a>, <a href="../cowboy_http2">cowboy_http2(3)</a></p>
+
diff --git a/docs/en/cowboy/2.0/manual/http_status_codes/index.html b/docs/en/cowboy/2.0/manual/http_status_codes/index.html
index 95c6ef0d..485dc418 100644
--- a/docs/en/cowboy/2.0/manual/http_status_codes/index.html
+++ b/docs/en/cowboy/2.0/manual/http_status_codes/index.html
@@ -62,271 +62,92 @@
<h1 class="lined-header"><span>HTTP status codes(7)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>HTTP status codes - status codes used by Cowboy</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>HTTP status codes - status codes used by Cowboy</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This chapter aims to list all HTTP status codes that Cowboy
-may return, with details on the reasons why. The list given
-here only includes the replies that Cowboy sends, not user
-replies.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This chapter aims to list all HTTP status codes that Cowboy may return, with details on the reasons why. The list given here only includes the replies that Cowboy sends, not user replies.</p>
<h2 id="_100_continue">100 Continue</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>When the client sends an <code>expect: 100-continue</code> header,
-Cowboy automatically sends a this status code before
-trying to read the request body. This behavior can be
-disabled using the appropriate body option.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>When the client sends an <code>expect: 100-continue</code> header, Cowboy automatically sends a this status code before trying to read the request body. This behavior can be disabled using the appropriate body option.</p>
<h2 id="_101_switching_protocols">101 Switching Protocols</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This is the status code sent when switching to the
-Websocket protocol.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This is the status code sent when switching to the Websocket protocol.</p>
<h2 id="_200_ok">200 OK</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_201_created">201 Created</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_202_accepted">202 Accepted</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_204_no_content">204 No Content</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent when the processing of a request
-ends without any reply having been sent. It may also be
-sent by <code>cowboy_rest</code> under normal conditions.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent when the processing of a request ends without any reply having been sent. It may also be sent by <code>cowboy_rest</code> under normal conditions.</p>
<h2 id="_300_multiple_choices">300 Multiple Choices</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_301_moved_permanently">301 Moved Permanently</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_303_see_other">303 See Other</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_304_not_modified">304 Not Modified</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_307_temporary_redirect">307 Temporary Redirect</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_400_bad_request">400 Bad Request</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy will send this status code for any of the
-following reasons:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-Too many empty lines were sent before the request.
-</p>
+<p>Cowboy will send this status code for any of the following reasons:</p>
+<ul><li>Too many empty lines were sent before the request.
</li>
-<li>
-<p>
-The request-line could not be parsed.
-</p>
+<li>The request-line could not be parsed.
</li>
-<li>
-<p>
-Too many headers were sent.
-</p>
+<li>Too many headers were sent.
</li>
-<li>
-<p>
-A header name was too long.
-</p>
+<li>A header name was too long.
</li>
-<li>
-<p>
-A header value was too long.
-</p>
+<li>A header value was too long.
</li>
-<li>
-<p>
-The host header was missing from an HTTP/1.1 request.
-</p>
+<li>The host header was missing from an HTTP/1.1 request.
</li>
-<li>
-<p>
-The host header could not be parsed.
-</p>
+<li>The host header could not be parsed.
</li>
-<li>
-<p>
-The requested host was not found.
-</p>
+<li>The requested host was not found.
</li>
-<li>
-<p>
-The requested path could not be parsed.
-</p>
+<li>The requested path could not be parsed.
</li>
-<li>
-<p>
-The accept header could not be parsed when using REST.
-</p>
+<li>The accept header could not be parsed when using REST.
</li>
-<li>
-<p>
-REST under normal conditions.
-</p>
+<li>REST under normal conditions.
</li>
-<li>
-<p>
-A Websocket upgrade failed.
-</p>
+<li>A Websocket upgrade failed.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_401_unauthorized">401 Unauthorized</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_403_forbidden">403 Forbidden</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_404_not_found">404 Not Found</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent when the router successfully
-resolved the host but didn&#8217;t find a matching path for
-the request. It may also be sent by <code>cowboy_rest</code> under
-normal conditions.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent when the router successfully resolved the host but didn&apos;t find a matching path for the request. It may also be sent by <code>cowboy_rest</code> under normal conditions.</p>
<h2 id="_405_method_not_allowed">405 Method Not Allowed</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_406_not_acceptable">406 Not Acceptable</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_408_request_timeout">408 Request Timeout</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy will send this status code to the client if the
-client started to send a request, indicated by the
-request-line being received fully, but failed to send
-all headers in a reasonable time.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Cowboy will send this status code to the client if the client started to send a request, indicated by the request-line being received fully, but failed to send all headers in a reasonable time.</p>
<h2 id="_409_conflict">409 Conflict</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_410_gone">410 Gone</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_412_precondition_failed">412 Precondition Failed</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_413_request_entity_too_large">413 Request Entity Too Large</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_414_request_uri_too_long">414 Request-URI Too Long</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy will send this status code to the client if the
-request-line is too long. It may also be sent by
-<code>cowboy_rest</code> under normal conditions.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Cowboy will send this status code to the client if the request-line is too long. It may also be sent by <code>cowboy_rest</code> under normal conditions.</p>
<h2 id="_415_unsupported_media_type">415 Unsupported Media Type</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_500_internal_server_error">500 Internal Server Error</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent when a crash occurs in HTTP, loop
-or REST handlers, or when an invalid return value is
-returned. It may also be sent by <code>cowboy_rest</code> under
-normal conditions.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent when a crash occurs in HTTP, loop or REST handlers, or when an invalid return value is returned. It may also be sent by <code>cowboy_rest</code> under normal conditions.</p>
<h2 id="_501_not_implemented">501 Not Implemented</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_503_service_unavailable">503 Service Unavailable</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_505_http_version_not_supported">505 HTTP Version Not Supported</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy only supports the versions 1.0 and 1.1 of HTTP.
-In all other cases this status code is sent back to the
-client and the connection is closed.</p></div>
-</div>
-</div>
+<p>Cowboy only supports the versions 1.0 and 1.1 of HTTP. In all other cases this status code is sent back to the client and the connection is closed.</p>
+
diff --git a/docs/en/cowboy/2.0/manual/index.html b/docs/en/cowboy/2.0/manual/index.html
index 9d5602a5..b7771995 100644
--- a/docs/en/cowboy/2.0/manual/index.html
+++ b/docs/en/cowboy/2.0/manual/index.html
@@ -62,171 +62,77 @@
<h1 class="lined-header"><span>Cowboy Function Reference</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy - Small, fast, modern HTTP server for Erlang/OTP</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy - Small, fast, modern HTTP server for Erlang/OTP</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy is an HTTP server for Erlang/OTP with support for the
-HTTP/1.1, HTTP/2 and Websocket protocols.</p></div>
-<div class="paragraph"><p>Cowboy aims to provide a complete HTTP stack. This includes
-the implementation of the HTTP RFCs but also any directly
-related standards, like Websocket or Server-Sent Events.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Cowboy is an HTTP server for Erlang/OTP with support for the HTTP/1.1, HTTP/2 and Websocket protocols.</p>
+<p>Cowboy aims to provide a complete HTTP stack. This includes the implementation of the HTTP RFCs but also any directly related standards, like Websocket or Server-Sent Events.</p>
<h2 id="_modules">Modules</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Functions:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="cowboy">cowboy(3)</a> - Listener management
-</p>
+<p>Functions:</p>
+<ul><li><a href="cowboy">cowboy(3)</a> - Listener management
</li>
-<li>
-<p>
-<a href="cowboy_req">cowboy_req(3)</a> - Request and response
-</p>
+<li><a href="cowboy_req">cowboy_req(3)</a> - Request and response
</li>
-<li>
-<p>
-<a href="cowboy_router">cowboy_router(3)</a> - Router
-</p>
+<li><a href="cowboy_router">cowboy_router(3)</a> - Router
</li>
-<li>
-<p>
-<a href="cowboy_constraints">cowboy_constraints(3)</a> - Constraints
-</p>
+<li><a href="cowboy_constraints">cowboy_constraints(3)</a> - Constraints
</li>
-</ul></div>
-<div class="paragraph"><p>Protocols:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="cowboy_http">cowboy_http(3)</a> - HTTP/1.1
-</p>
+</ul>
+<p>Protocols:</p>
+<ul><li><a href="cowboy_http">cowboy_http(3)</a> - HTTP/1.1
</li>
-<li>
-<p>
-<a href="cowboy_http2">cowboy_http2(3)</a> - HTTP/2
-</p>
+<li><a href="cowboy_http2">cowboy_http2(3)</a> - HTTP/2
</li>
-<li>
-<p>
-<a href="cowboy_websocket">cowboy_websocket(3)</a> - Websocket
-</p>
+<li><a href="cowboy_websocket">cowboy_websocket(3)</a> - Websocket
</li>
-</ul></div>
-<div class="paragraph"><p>Handlers:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="cowboy_static">cowboy_static(3)</a> - Static file handler
-</p>
+</ul>
+<p>Handlers:</p>
+<ul><li><a href="cowboy_static">cowboy_static(3)</a> - Static file handler
</li>
-</ul></div>
-<div class="paragraph"><p>Behaviors:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="cowboy_handler">cowboy_handler(3)</a> - Plain HTTP handlers
-</p>
+</ul>
+<p>Behaviors:</p>
+<ul><li><a href="cowboy_handler">cowboy_handler(3)</a> - Plain HTTP handlers
</li>
-<li>
-<p>
-<a href="cowboy_loop">cowboy_loop(3)</a> - Loop handlers
-</p>
+<li><a href="cowboy_loop">cowboy_loop(3)</a> - Loop handlers
</li>
-<li>
-<p>
-<a href="cowboy_middleware">cowboy_middleware(3)</a> - Middlewares
-</p>
+<li><a href="cowboy_middleware">cowboy_middleware(3)</a> - Middlewares
</li>
-<li>
-<p>
-<a href="cowboy_rest">cowboy_rest(3)</a> - REST handlers
-</p>
+<li><a href="cowboy_rest">cowboy_rest(3)</a> - REST handlers
</li>
-<li>
-<p>
-<a href="cowboy_stream">cowboy_stream(3)</a> - Stream handlers
-</p>
+<li><a href="cowboy_stream">cowboy_stream(3)</a> - Stream handlers
</li>
-<li>
-<p>
-<a href="cowboy_websocket">cowboy_websocket(3)</a> - Websocket handlers
-</p>
+<li><a href="cowboy_websocket">cowboy_websocket(3)</a> - Websocket handlers
</li>
-</ul></div>
-<div class="paragraph"><p>Middlewares:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="cowboy_router">cowboy_router(3)</a> - Router middleware
-</p>
+</ul>
+<p>Middlewares:</p>
+<ul><li><a href="cowboy_router">cowboy_router(3)</a> - Router middleware
</li>
-<li>
-<p>
-<a href="cowboy_handler">cowboy_handler(3)</a> - Handler middleware
-</p>
+<li><a href="cowboy_handler">cowboy_handler(3)</a> - Handler middleware
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
+<!-- @todo http_status_codes is not linked to; what to do with it?-->
<h2 id="_dependencies">Dependencies</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="ranch_app">ranch(7)</a> - Socket acceptor pool for TCP protocols
-</p>
+<ul><li><a href="ranch_app">ranch(7)</a> - Socket acceptor pool for TCP protocols
</li>
-<li>
-<p>
-<a href="cowlib_app">cowlib(7)</a> - Support library for manipulating Web protocols
-</p>
+<li><a href="cowlib_app">cowlib(7)</a> - Support library for manipulating Web protocols
</li>
-<li>
-<p>
-ssl - Secure communication over sockets
-</p>
+<li>ssl - Secure communication over sockets
</li>
-<li>
-<p>
-crypto - Crypto functions
-</p>
+<li>crypto - Crypto functions
</li>
-</ul></div>
-<div class="paragraph"><p>All these applications must be started before the <code>cowboy</code>
-application. To start Cowboy and all dependencies at once:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+</ul>
+<p>All these applications must be started before the <code>cowboy</code> application. To start Cowboy and all dependencies at once:</p>
+<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">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">application:ensure_all_started</span></span>(<span style="color: #FF6600">cowboy</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">application:ensure_all_started</font></b>(<font color="#FF6600">cowboy</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_environment">Environment</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <code>cowboy</code> application does not define any application
-environment configuration parameters.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The <code>cowboy</code> application does not define any application environment configuration parameters.</p>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="ranch_app">ranch(7)</a>,
-<a href="cowlib_app">cowlib(7)</a></p></div>
-</div>
-</div>
+<p><a href="ranch_app">ranch(7)</a>, <a href="cowlib_app">cowlib(7)</a></p>
+
diff --git a/docs/en/cowboy/2.1/guide/constraints/index.html b/docs/en/cowboy/2.1/guide/constraints/index.html
index 0081ed1d..99e4eb17 100644
--- a/docs/en/cowboy/2.1/guide/constraints/index.html
+++ b/docs/en/cowboy/2.1/guide/constraints/index.html
@@ -62,141 +62,86 @@
<h1 class="lined-header"><span>Constraints</span></h1>
-<div class="paragraph"><p>Constraints are validation and conversion functions applied
-to user input.</p></div>
-<div class="paragraph"><p>They are used in various places in Cowboy, including the
-router and the <code>cowboy_req</code> match functions.</p></div>
-<div class="sect1">
+<p>Constraints are validation and conversion functions applied to user input.</p>
+<p>They are used in various places in Cowboy, including the router and the <code>cowboy_req</code> match functions.</p>
<h2 id="_syntax">Syntax</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Constraints are provided as a list of fields. For each field
-in the list, specific constraints can be applied, as well as
-a default value if the field is missing.</p></div>
-<div class="paragraph"><p>A field can take the form of an atom <code>field</code>, a tuple with
-constraints <code>{field, Constraints}</code> or a tuple with constraints
-and a default value <code>{field, Constraints, Default}</code>.
-The <code>field</code> form indicates the field is mandatory.</p></div>
-<div class="paragraph"><p>Note that when used with the router, only the second form
-makes sense, as it does not use the default and the field
-is always defined.</p></div>
-<div class="paragraph"><p>Constraints for each field are provided as an ordered list
-of atoms or funs to apply. Built-in constraints are provided
-as atoms, while custom constraints are provided as funs.</p></div>
-<div class="paragraph"><p>When multiple constraints are provided, they are applied in
-the order given. If the value has been modified by a constraint
-then the next one receives the new value.</p></div>
-<div class="paragraph"><p>For example, the following constraints will first validate
-and convert the field <code>my_value</code> to an integer, and then
-check that the integer is positive:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Constraints are provided as a list of fields. For each field in the list, specific constraints can be applied, as well as a default value if the field is missing.</p>
+<p>A field can take the form of an atom <code>field</code>, a tuple with constraints <code>{field, Constraints}</code> or a tuple with constraints and a default value <code>{field, Constraints, Default}</code>. The <code>field</code> form indicates the field is mandatory.</p>
+<p>Note that when used with the router, only the second form makes sense, as it does not use the default and the field is always defined.</p>
+<p>Constraints for each field are provided as an ordered list of atoms or funs to apply. Built-in constraints are provided as atoms, while custom constraints are provided as funs.</p>
+<p>When multiple constraints are provided, they are applied in the order given. If the value has been modified by a constraint then the next one receives the new value.</p>
+<p>For example, the following constraints will first validate and convert the field <code>my_value</code> to an integer, and then check that the integer is positive:</p>
+<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">PositiveFun</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">fun</span></span>
- (<span style="color: #990000">_</span>, <span style="color: #009900">V</span>) <span style="font-weight: bold"><span style="color: #0000FF">when</span></span> <span style="color: #009900">V</span> <span style="color: #990000">&gt;</span> <span style="color: #993399">0</span> <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">V</span>};
- (<span style="color: #990000">_</span>, <span style="color: #990000">_</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">error</span>, <span style="color: #FF6600">not_positive</span>}
-<span style="font-weight: bold"><span style="color: #0000FF">end</span></span>,
-{<span style="color: #FF6600">my_value</span>, [<span style="color: #FF6600">int</span>, <span style="color: #009900">PositiveFun</span>]}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>We ignore the first fun argument in this snippet. We shouldn&#8217;t.
-We will simply learn what it is later in this chapter.</p></div>
-<div class="paragraph"><p>When there&#8217;s only one constraint, it can be provided directly
-without wrapping it into a list:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">PositiveFun</font> <font color="#990000">=</font> <b><font color="#0000FF">fun</font></b>
+ (<font color="#990000">_</font>, <font color="#009900">V</font>) <b><font color="#0000FF">when</font></b> <font color="#009900">V</font> <font color="#990000">&gt;</font> <font color="#993399">0</font> <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <font color="#009900">V</font>};
+ (<font color="#990000">_</font>, <font color="#990000">_</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">error</font>, <font color="#FF6600">not_positive</font>}
+<b><font color="#0000FF">end</font></b>,
+{<font color="#FF6600">my_value</font>, [<font color="#FF6600">int</font>, <font color="#009900">PositiveFun</font>]}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>We ignore the first fun argument in this snippet. We shouldn&apos;t. We will simply learn what it is later in this chapter.</p>
+<p>When there&apos;s only one constraint, it can be provided directly without wrapping it into a list:</p>
+<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">my_value</span>, <span style="color: #FF6600">int</span>}</tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#FF6600">my_value</font>, <font color="#FF6600">int</font>}</tt></pre>
+</div></div>
<h2 id="_built_in_constraints">Built-in constraints</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Built-in constraints are specified as an atom:</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"> Constraint </th>
-<th align="left" valign="top"> Description</th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td align="left" valign="top"><p class="table">int</p></td>
-<td align="left" valign="top"><p class="table">Converts binary value to integer.</p></td>
+<p>Built-in constraints are specified as an atom:</p>
+<table rules="all" width="100%" frame="border"
+ cellspacing="0" cellpadding="4">
+<thead><tr><th>Constraint</th>
+<th>Description</th>
+</tr></thead><tbody><tr><td>int</td>
+<td>Converts binary value to integer.</td>
</tr>
-<tr>
-<td align="left" valign="top"><p class="table">nonempty</p></td>
-<td align="left" valign="top"><p class="table">Ensures the binary value is non-empty.</p></td>
+<tr><td>nonempty</td>
+<td>Ensures the binary value is non-empty.</td>
</tr>
-</tbody>
-</table>
-</div>
-</div>
-</div>
-<div class="sect1">
+</tbody></table>
<h2 id="_custom_constraints">Custom constraints</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Custom constraints are specified as a fun. This fun takes
-two arguments. The first argument indicates the operation
-to be performed, and the second is the value. What the
-value is and what must be returned depends on the operation.</p></div>
-<div class="paragraph"><p>Cowboy currently defines three operations. The operation
-used for validating and converting user input is the <code>forward</code>
-operation.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Custom constraints are specified as a fun. This fun takes two arguments. The first argument indicates the operation to be performed, and the second is the value. What the value is and what must be returned depends on the operation.</p>
+<p>Cowboy currently defines three operations. The operation used for validating and converting user input is the <code>forward</code> operation.</p>
+<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">int</span></span>(<span style="color: #FF6600">forward</span>, <span style="color: #009900">Value</span>) <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #0000FF">try</span></span>
- {<span style="color: #FF6600">ok</span>, <span style="font-weight: bold"><span style="color: #000000">binary_to_integer</span></span>(<span style="color: #009900">Value</span>)}
- <span style="font-weight: bold"><span style="color: #0000FF">catch</span></span> <span style="color: #990000">_:_</span> <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">error</span>, <span style="color: #FF6600">not_an_integer</span>}
- <span style="font-weight: bold"><span style="color: #0000FF">end</span></span>;</tt></pre></div></div>
-<div class="paragraph"><p>The value must be returned even if it is not converted
-by the constraint.</p></div>
-<div class="paragraph"><p>The <code>reverse</code> operation does the opposite: it
-takes a converted value and changes it back to what the
-user input would have been.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">int</font></b>(<font color="#FF6600">forward</font>, <font color="#009900">Value</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">try</font></b>
+ {<font color="#FF6600">ok</font>, <b><font color="#000000">binary_to_integer</font></b>(<font color="#009900">Value</font>)}
+ <b><font color="#0000FF">catch</font></b> <font color="#990000">_:_</font> <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">error</font>, <font color="#FF6600">not_an_integer</font>}
+ <b><font color="#0000FF">end</font></b>;</tt></pre>
+</div></div>
+<p>The value must be returned even if it is not converted by the constraint.</p>
+<p>The <code>reverse</code> operation does the opposite: it takes a converted value and changes it back to what the user input would have been.</p>
+<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">int</span></span>(<span style="color: #FF6600">reverse</span>, <span style="color: #009900">Value</span>) <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #0000FF">try</span></span>
- {<span style="color: #FF6600">ok</span>, <span style="font-weight: bold"><span style="color: #000000">integer_to_binary</span></span>(<span style="color: #009900">Value</span>)}
- <span style="font-weight: bold"><span style="color: #0000FF">catch</span></span> <span style="color: #990000">_:_</span> <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">error</span>, <span style="color: #FF6600">not_an_integer</span>}
- <span style="font-weight: bold"><span style="color: #0000FF">end</span></span>;</tt></pre></div></div>
-<div class="paragraph"><p>Finally, the <code>format_error</code> operation takes an error
-returned by any other operation and returns a formatted
-human-readable error message.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">int</font></b>(<font color="#FF6600">reverse</font>, <font color="#009900">Value</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">try</font></b>
+ {<font color="#FF6600">ok</font>, <b><font color="#000000">integer_to_binary</font></b>(<font color="#009900">Value</font>)}
+ <b><font color="#0000FF">catch</font></b> <font color="#990000">_:_</font> <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">error</font>, <font color="#FF6600">not_an_integer</font>}
+ <b><font color="#0000FF">end</font></b>;</tt></pre>
+</div></div>
+<p>Finally, the <code>format_error</code> operation takes an error returned by any other operation and returns a formatted human-readable error message.</p>
+<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">int</span></span>(<span style="color: #FF6600">format_error</span>, {<span style="color: #FF6600">not_an_integer</span>, <span style="color: #009900">Value</span>}) <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #000000">io_lib:format</span></span>(<span style="color: #FF0000">"The value ~p is not an integer."</span>, [<span style="color: #009900">Value</span>])<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Notice that for this case you get both the error and
-the value that was given to the constraint that produced
-this error.</p></div>
-<div class="paragraph"><p>Cowboy will not catch exceptions coming from constraint
-functions. They should be written to not emit any exceptions.</p></div>
-</div>
-</div>
+<pre><tt><b><font color="#000000">int</font></b>(<font color="#FF6600">format_error</font>, {<font color="#FF6600">not_an_integer</font>, <font color="#009900">Value</font>}) <font color="#990000">-&gt;</font>
+ <b><font color="#000000">io_lib:format</font></b>(<font color="#FF0000">"The value ~p is not an integer."</font>, [<font color="#009900">Value</font>])<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Notice that for this case you get both the error and the value that was given to the constraint that produced this error.</p>
+<p>Cowboy will not catch exceptions coming from constraint functions. They should be written to not emit any exceptions.</p>
+
diff --git a/docs/en/cowboy/2.1/guide/cookies/index.html b/docs/en/cowboy/2.1/guide/cookies/index.html
index 9468bbb1..9d56a3a5 100644
--- a/docs/en/cowboy/2.1/guide/cookies/index.html
+++ b/docs/en/cowboy/2.1/guide/cookies/index.html
@@ -62,144 +62,103 @@
<h1 class="lined-header"><span>Using cookies</span></h1>
-<div class="paragraph"><p>Cookies are a mechanism allowing applications to maintain
-state on top of the stateless HTTP protocol.</p></div>
-<div class="paragraph"><p>Cookies are a name/value store where the names and values are
-stored in plain text. They expire either after a delay
-or when the browser closes. They can be configured on a
-specific domain name or path, and restricted to secure
-resources (sent or downloaded over HTTPS), or restricted
-to the server (disallowing access from client-side scripts).</p></div>
-<div class="paragraph"><p>Cookie names are de facto case sensitive.</p></div>
-<div class="paragraph"><p>Cookies are stored client-side and sent with every subsequent
-request that matches the domain and path for which they were
-stored, until they expire. This can create a non-negligible
-cost.</p></div>
-<div class="paragraph"><p>Cookies should not be considered secure. They are stored on
-the user&#8217;s computer in plain text, and can be read by any
-program. They can also be read by proxies when using clear
-connections. Always validate the value before using it,
-and never store any sensitive information inside it.</p></div>
-<div class="paragraph"><p>Cookies set by the server are only available in requests
-following the client reception of the response containing
-them.</p></div>
-<div class="paragraph"><p>Cookies may be sent repeatedly. This is often useful to
-update the expiration time and avoid losing a cookie.</p></div>
-<div class="sect1">
+<p>Cookies are a mechanism allowing applications to maintain state on top of the stateless HTTP protocol.</p>
+<p>Cookies are a name/value store where the names and values are stored in plain text. They expire either after a delay or when the browser closes. They can be configured on a specific domain name or path, and restricted to secure resources (sent or downloaded over HTTPS), or restricted to the server (disallowing access from client-side scripts).</p>
+<p>Cookie names are de facto case sensitive.</p>
+<p>Cookies are stored client-side and sent with every subsequent request that matches the domain and path for which they were stored, until they expire. This can create a non-negligible cost.</p>
+<p>Cookies should not be considered secure. They are stored on the user&apos;s computer in plain text, and can be read by any program. They can also be read by proxies when using clear connections. Always validate the value before using it, and never store any sensitive information inside it.</p>
+<p>Cookies set by the server are only available in requests following the client reception of the response containing them.</p>
+<p>Cookies may be sent repeatedly. This is often useful to update the expiration time and avoid losing a cookie.</p>
<h2 id="_setting_cookies">Setting cookies</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>By default cookies are defined for the duration of the session:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>By default cookies are defined for the duration of the session:</p>
+<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">SessionID</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">generate_session_id</span></span>(),
-<span style="color: #009900">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_cookie</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"sessionid"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">SessionID</span>, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>They can also be set for a duration in seconds:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">SessionID</font> <font color="#990000">=</font> <b><font color="#000000">generate_session_id</font></b>(),
+<font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_cookie</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"sessionid"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">SessionID</font>, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>They can also be set for a duration in seconds:</p>
+<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">SessionID</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">generate_session_id</span></span>(),
-<span style="color: #009900">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_cookie</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"sessionid"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">SessionID</span>, <span style="color: #009900">Req0</span>,
- #{<span style="color: #0000FF">max_age</span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">3600</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>To delete cookies, set <code>max_age</code> to 0:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">SessionID</font> <font color="#990000">=</font> <b><font color="#000000">generate_session_id</font></b>(),
+<font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_cookie</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"sessionid"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">SessionID</font>, <font color="#009900">Req0</font>,
+ #{<font color="#0000FF">max_age</font> <font color="#990000">=&gt;</font> <font color="#993399">3600</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>To delete cookies, set <code>max_age</code> to 0:</p>
+<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">SessionID</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">generate_session_id</span></span>(),
-<span style="color: #009900">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_cookie</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"sessionid"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">SessionID</span>, <span style="color: #009900">Req0</span>,
- #{<span style="color: #0000FF">max_age</span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">0</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>To restrict cookies to a specific domain and path, the options
-of the same name can be used:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">SessionID</font> <font color="#990000">=</font> <b><font color="#000000">generate_session_id</font></b>(),
+<font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_cookie</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"sessionid"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">SessionID</font>, <font color="#009900">Req0</font>,
+ #{<font color="#0000FF">max_age</font> <font color="#990000">=&gt;</font> <font color="#993399">0</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>To restrict cookies to a specific domain and path, the options of the same name can be used:</p>
+<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">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_cookie</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"inaccount"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"1"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req0</span>,
- #{<span style="color: #0000FF">domain</span> <span style="color: #990000">=&gt;</span> <span style="color: #FF0000">"my.example.org"</span>, <span style="color: #0000FF">path</span> <span style="color: #990000">=&gt;</span> <span style="color: #FF0000">"/account"</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Cookies will be sent with requests to this domain and all
-its subdomains, and to resources on this path or deeper
-in the path hierarchy.</p></div>
-<div class="paragraph"><p>To restrict cookies to secure channels (typically resources
-available over HTTPS):</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_cookie</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"inaccount"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"1"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req0</font>,
+ #{<font color="#0000FF">domain</font> <font color="#990000">=&gt;</font> <font color="#FF0000">"my.example.org"</font>, <font color="#0000FF">path</font> <font color="#990000">=&gt;</font> <font color="#FF0000">"/account"</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Cookies will be sent with requests to this domain and all its subdomains, and to resources on this path or deeper in the path hierarchy.</p>
+<p>To restrict cookies to secure channels (typically resources available over HTTPS):</p>
+<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">SessionID</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">generate_session_id</span></span>(),
-<span style="color: #009900">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_cookie</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"sessionid"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">SessionID</span>, <span style="color: #009900">Req0</span>,
- #{<span style="color: #0000FF">secure</span> <span style="color: #990000">=&gt;</span> <span style="color: #000080">true</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>To prevent client-side scripts from accessing a cookie:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">SessionID</font> <font color="#990000">=</font> <b><font color="#000000">generate_session_id</font></b>(),
+<font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_cookie</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"sessionid"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">SessionID</font>, <font color="#009900">Req0</font>,
+ #{<font color="#0000FF">secure</font> <font color="#990000">=&gt;</font> <font color="#000080">true</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>To prevent client-side scripts from accessing a cookie:</p>
+<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">SessionID</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">generate_session_id</span></span>(),
-<span style="color: #009900">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_cookie</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"sessionid"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">SessionID</span>, <span style="color: #009900">Req0</span>,
- #{<span style="color: #0000FF">http_only</span> <span style="color: #990000">=&gt;</span> <span style="color: #000080">true</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Cookies may also be set client-side, for example using
-Javascript.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">SessionID</font> <font color="#990000">=</font> <b><font color="#000000">generate_session_id</font></b>(),
+<font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_cookie</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"sessionid"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">SessionID</font>, <font color="#009900">Req0</font>,
+ #{<font color="#0000FF">http_only</font> <font color="#990000">=&gt;</font> <font color="#000080">true</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Cookies may also be set client-side, for example using Javascript.</p>
<h2 id="_reading_cookies">Reading cookies</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The client only ever sends back the cookie name and value.
-All other options that can be set are never sent back.</p></div>
-<div class="paragraph"><p>Cowboy provides two functions for reading cookies. Both
-involve parsing the cookie header(s) and so should not
-be called repeatedly.</p></div>
-<div class="paragraph"><p>You can get all cookies as a key/value list:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The client only ever sends back the cookie name and value. All other options that can be set are never sent back.</p>
+<p>Cowboy provides two functions for reading cookies. Both involve parsing the cookie header(s) and so should not be called repeatedly.</p>
+<p>You can get all cookies as a key/value list:</p>
+<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">Cookies</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:parse_cookies</span></span>(<span style="color: #009900">Req</span>),
-{<span style="color: #990000">_</span>, <span style="color: #009900">Lang</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">lists:keyfind</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"lang"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #993399">1</span>, <span style="color: #009900">Cookies</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Or you can perform a match against cookies and retrieve
-only the ones you need, while at the same time doing
-any required post processing using <a href="../constraints">constraints</a>.
-This function returns a map:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Cookies</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:parse_cookies</font></b>(<font color="#009900">Req</font>),
+{<font color="#990000">_</font>, <font color="#009900">Lang</font>} <font color="#990000">=</font> <b><font color="#000000">lists:keyfind</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"lang"</font><font color="#990000">&gt;&gt;</font>, <font color="#993399">1</font>, <font color="#009900">Cookies</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Or you can perform a match against cookies and retrieve only the ones you need, while at the same time doing any required post processing using <a href="../constraints">constraints</a>. This function returns a map:</p>
+<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">id</span> <span style="color: #990000">:=</span> <span style="color: #009900">ID</span>, <span style="color: #FF6600">lang</span> <span style="color: #990000">:=</span> <span style="color: #009900">Lang</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:match_cookies</span></span>([<span style="color: #FF6600">id</span>, <span style="color: #FF6600">lang</span>], <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>You can use constraints to validate the values while matching
-them. The following snippet will crash if the <code>id</code> cookie is
-not an integer number or if the <code>lang</code> cookie is empty. Additionally
-the <code>id</code> cookie value will be converted to an integer term:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>#{<font color="#FF6600">id</font> <font color="#990000">:=</font> <font color="#009900">ID</font>, <font color="#FF6600">lang</font> <font color="#990000">:=</font> <font color="#009900">Lang</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:match_cookies</font></b>([<font color="#FF6600">id</font>, <font color="#FF6600">lang</font>], <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>You can use constraints to validate the values while matching them. The following snippet will crash if the <code>id</code> cookie is not an integer number or if the <code>lang</code> cookie is empty. Additionally the <code>id</code> cookie value will be converted to an integer term:</p>
+<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">CookiesMap</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:match_cookies</span></span>([{<span style="color: #FF6600">id</span>, <span style="color: #FF6600">int</span>}, {<span style="color: #FF6600">lang</span>, <span style="color: #FF6600">nonempty</span>}], <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Note that if two cookies share the same name, then the map value
-will be a list of the two cookie values.</p></div>
-<div class="paragraph"><p>A default value can be provided. The default will be used
-if the <code>lang</code> cookie is not found. It will not be used if
-the cookie is found but has an empty value:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">CookiesMap</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:match_cookies</font></b>([{<font color="#FF6600">id</font>, <font color="#FF6600">int</font>}, {<font color="#FF6600">lang</font>, <font color="#FF6600">nonempty</font>}], <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Note that if two cookies share the same name, then the map value will be a list of the two cookie values.</p>
+<p>A default value can be provided. The default will be used if the <code>lang</code> cookie is not found. It will not be used if the cookie is found but has an empty value:</p>
+<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">lang</span> <span style="color: #990000">:=</span> <span style="color: #009900">Lang</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:match_cookies</span></span>([{<span style="color: #FF6600">lang</span>, [], <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"en-US"</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="paragraph"><p>If no default is provided and the value is missing, an
-exception is thrown.</p></div>
-</div>
-</div>
+<pre><tt>#{<font color="#FF6600">lang</font> <font color="#990000">:=</font> <font color="#009900">Lang</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:match_cookies</font></b>([{<font color="#FF6600">lang</font>, [], <font color="#990000">&lt;&lt;</font><font color="#FF0000">"en-US"</font><font color="#990000">&gt;&gt;</font>}], <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>If no default is provided and the value is missing, an exception is thrown.</p>
+
diff --git a/docs/en/cowboy/2.1/guide/erlang_web/index.html b/docs/en/cowboy/2.1/guide/erlang_web/index.html
index 6bc96a17..69f6bca2 100644
--- a/docs/en/cowboy/2.1/guide/erlang_web/index.html
+++ b/docs/en/cowboy/2.1/guide/erlang_web/index.html
@@ -62,194 +62,52 @@
<h1 class="lined-header"><span>Erlang and the Web</span></h1>
-<div class="paragraph"><p>Erlang is the ideal platform for writing Web applications.
-Its features are a perfect match for the requirements of
-modern Web applications.</p></div>
-<div class="sect1">
+<p>Erlang is the ideal platform for writing Web applications. Its features are a perfect match for the requirements of modern Web applications.</p>
<h2 id="_the_web_is_concurrent">The Web is concurrent</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>When you access a website there is little concurrency
-involved. A few connections are opened and requests
-are sent through these connections. Then the web page
-is displayed on your screen. Your browser will only
-open up to 4 or 8 connections to the server, depending
-on your settings. This isn&#8217;t much.</p></div>
-<div class="paragraph"><p>But think about it. You are not the only one accessing
-the server at the same time. There can be hundreds, if
-not thousands, if not millions of connections to the
-same server at the same time.</p></div>
-<div class="paragraph"><p>Even today a lot of systems used in production haven&#8217;t
-solved the C10K problem (ten thousand concurrent connections).
-And the ones who did are trying hard to get to the next
-step, C100K, and are pretty far from it.</p></div>
-<div class="paragraph"><p>Erlang meanwhile has no problem handling millions of
-connections. At the time of writing there are application
-servers written in Erlang that can handle more than two
-million connections on a single server in a real production
-application, with spare memory and CPU!</p></div>
-<div class="paragraph"><p>The Web is concurrent, and Erlang is a language designed
-for concurrency, so it is a perfect match.</p></div>
-<div class="paragraph"><p>Of course, various platforms need to scale beyond a few
-million connections. This is where Erlang&#8217;s built-in
-distribution mechanisms come in. If one server isn&#8217;t
-enough, add more! Erlang allows you to use the same code
-for talking to local processes or to processes in other
-parts of your cluster, which means you can scale very
-quickly if the need arises.</p></div>
-<div class="paragraph"><p>The Web has large userbases, and the Erlang platform was
-designed to work in a distributed setting, so it is a
-perfect match.</p></div>
-<div class="paragraph"><p>Or is it? Surely you can find solutions to handle that many
-concurrent connections with your favorite language&#8230; But all
-these solutions will break down in the next few years. Why?
-Firstly because servers don&#8217;t get any more powerful, they
-instead get a lot more cores and memory. This is only useful
-if your application can use them properly, and Erlang is
-light-years away from anything else in that area. Secondly,
-today your computer and your phone are online, tomorrow your
-watch, goggles, bike, car, fridge and tons of other devices
-will also connect to various applications on the Internet.</p></div>
-<div class="paragraph"><p>Only Erlang is prepared to deal with what&#8217;s coming.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>When you access a website there is little concurrency involved. A few connections are opened and requests are sent through these connections. Then the web page is displayed on your screen. Your browser will only open up to 4 or 8 connections to the server, depending on your settings. This isn&apos;t much.</p>
+<p>But think about it. You are not the only one accessing the server at the same time. There can be hundreds, if not thousands, if not millions of connections to the same server at the same time.</p>
+<p>Even today a lot of systems used in production haven&apos;t solved the C10K problem (ten thousand concurrent connections). And the ones who did are trying hard to get to the next step, C100K, and are pretty far from it.</p>
+<p>Erlang meanwhile has no problem handling millions of connections. At the time of writing there are application servers written in Erlang that can handle more than two million connections on a single server in a real production application, with spare memory and CPU!</p>
+<p>The Web is concurrent, and Erlang is a language designed for concurrency, so it is a perfect match.</p>
+<p>Of course, various platforms need to scale beyond a few million connections. This is where Erlang&apos;s built-in distribution mechanisms come in. If one server isn&apos;t enough, add more! Erlang allows you to use the same code for talking to local processes or to processes in other parts of your cluster, which means you can scale very quickly if the need arises.</p>
+<p>The Web has large userbases, and the Erlang platform was designed to work in a distributed setting, so it is a perfect match.</p>
+<p>Or is it? Surely you can find solutions to handle that many concurrent connections with your favorite language... But all these solutions will break down in the next few years. Why? Firstly because servers don&apos;t get any more powerful, they instead get a lot more cores and memory. This is only useful if your application can use them properly, and Erlang is light-years away from anything else in that area. Secondly, today your computer and your phone are online, tomorrow your watch, goggles, bike, car, fridge and tons of other devices will also connect to various applications on the Internet.</p>
+<p>Only Erlang is prepared to deal with what&apos;s coming.</p>
<h2 id="_the_web_is_soft_real_time">The Web is soft real time</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>What does soft real time mean, you ask? It means we want the
-operations done as quickly as possible, and in the case of
-web applications, it means we want the data propagated fast.</p></div>
-<div class="paragraph"><p>In comparison, hard real time has a similar meaning, but also
-has a hard time constraint, for example an operation needs to
-be done in under N milliseconds otherwise the system fails
-entirely.</p></div>
-<div class="paragraph"><p>Users aren&#8217;t that needy yet, they just want to get access
-to their content in a reasonable delay, and they want the
-actions they make to register at most a few seconds after
-they submitted them, otherwise they&#8217;ll start worrying about
-whether it successfully went through.</p></div>
-<div class="paragraph"><p>The Web is soft real time because taking longer to perform an
-operation would be seen as bad quality of service.</p></div>
-<div class="paragraph"><p>Erlang is a soft real time system. It will always run
-processes fairly, a little at a time, switching to another
-process after a while and preventing a single process to
-steal resources from all others. This means that Erlang
-can guarantee stable low latency of operations.</p></div>
-<div class="paragraph"><p>Erlang provides the guarantees that the soft real time Web
-requires.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>What does soft real time mean, you ask? It means we want the operations done as quickly as possible, and in the case of web applications, it means we want the data propagated fast.</p>
+<p>In comparison, hard real time has a similar meaning, but also has a hard time constraint, for example an operation needs to be done in under N milliseconds otherwise the system fails entirely.</p>
+<p>Users aren&apos;t that needy yet, they just want to get access to their content in a reasonable delay, and they want the actions they make to register at most a few seconds after they submitted them, otherwise they&apos;ll start worrying about whether it successfully went through.</p>
+<p>The Web is soft real time because taking longer to perform an operation would be seen as bad quality of service.</p>
+<p>Erlang is a soft real time system. It will always run processes fairly, a little at a time, switching to another process after a while and preventing a single process to steal resources from all others. This means that Erlang can guarantee stable low latency of operations.</p>
+<p>Erlang provides the guarantees that the soft real time Web requires.</p>
<h2 id="_the_web_is_asynchronous">The Web is asynchronous</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Long ago, the Web was synchronous because HTTP was synchronous.
-You fired a request, and then waited for a response. Not anymore.
-It all began when XmlHttpRequest started being used. It allowed
-the client to perform asynchronous calls to the server.</p></div>
-<div class="paragraph"><p>Then Websocket appeared and allowed both the server and the client
-to send data to the other endpoint completely asynchronously. The
-data is contained within frames and no response is necessary.</p></div>
-<div class="paragraph"><p>Erlang processes work the same. They send each other data contained
-within messages and then continue running without needing a response.
-They tend to spend most of their time inactive, waiting for a new
-message, and the Erlang VM happily activate them when one is received.</p></div>
-<div class="paragraph"><p>It is therefore quite easy to imagine Erlang being good at receiving
-Websocket frames, which may come in at unpredictable times, pass the
-data to the responsible processes which are always ready waiting for
-new messages, and perform the operations required by only activating
-the required parts of the system.</p></div>
-<div class="paragraph"><p>The more recent Web technologies, like Websocket of course, but also
-HTTP/2.0, are all fully asynchronous protocols. The concept
-of requests and responses is retained of course, but anything could
-be sent in between, by both the client or the browser, and the
-responses could also be received in a completely different order.</p></div>
-<div class="paragraph"><p>Erlang is by nature asynchronous and really good at it thanks to the
-great engineering that has been done in the VM over the years. It&#8217;s
-only natural that it&#8217;s so good at dealing with the asynchronous Web.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Long ago, the Web was synchronous because HTTP was synchronous. You fired a request, and then waited for a response. Not anymore. It all began when XmlHttpRequest started being used. It allowed the client to perform asynchronous calls to the server.</p>
+<p>Then Websocket appeared and allowed both the server and the client to send data to the other endpoint completely asynchronously. The data is contained within frames and no response is necessary.</p>
+<p>Erlang processes work the same. They send each other data contained within messages and then continue running without needing a response. They tend to spend most of their time inactive, waiting for a new message, and the Erlang VM happily activate them when one is received.</p>
+<p>It is therefore quite easy to imagine Erlang being good at receiving Websocket frames, which may come in at unpredictable times, pass the data to the responsible processes which are always ready waiting for new messages, and perform the operations required by only activating the required parts of the system.</p>
+<p>The more recent Web technologies, like Websocket of course, but also HTTP/2.0, are all fully asynchronous protocols. The concept of requests and responses is retained of course, but anything could be sent in between, by both the client or the browser, and the responses could also be received in a completely different order.</p>
+<p>Erlang is by nature asynchronous and really good at it thanks to the great engineering that has been done in the VM over the years. It&apos;s only natural that it&apos;s so good at dealing with the asynchronous Web.</p>
<h2 id="_the_web_is_omnipresent">The Web is omnipresent</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The Web has taken a very important part of our lives. We&#8217;re
-connected at all times, when we&#8217;re on our phone, using our computer,
-passing time using a tablet while in the bathroom&#8230; And this
-isn&#8217;t going to slow down, every single device at home or on us
-will be connected.</p></div>
-<div class="paragraph"><p>All these devices are always connected. And with the number of
-alternatives to give you access to the content you seek, users
-tend to not stick around when problems arise. Users today want
-their applications to be always available and if it&#8217;s having
-too many issues they just move on.</p></div>
-<div class="paragraph"><p>Despite this, when developers choose a product to use for building
-web applications, their only concern seems to be "Is it fast?",
-and they look around for synthetic benchmarks showing which one
-is the fastest at sending "Hello world" with only a handful
-concurrent connections. Web benchmarks haven&#8217;t been representative
-of reality in a long time, and are drifting further away as
-time goes on.</p></div>
-<div class="paragraph"><p>What developers should really ask themselves is "Can I service
-all my users with no interruption?" and they&#8217;d find that they have
-two choices. They can either hope for the best, or they can use
-Erlang.</p></div>
-<div class="paragraph"><p>Erlang is built for fault tolerance. When writing code in any other
-language, you have to check all the return values and act accordingly
-to avoid any unforeseen issues. If you&#8217;re lucky, you won&#8217;t miss
-anything important. When writing Erlang code, you can just check
-the success condition and ignore all errors. If an error happens,
-the Erlang process crashes and is then restarted by a special
-process called a supervisor.</p></div>
-<div class="paragraph"><p>Erlang developers thus have no need to fear unhandled
-errors, and can focus on handling only the errors that should
-give some feedback to the user and let the system take care of
-the rest. This also has the advantage of allowing them to write
-a lot less code, and let them sleep at night.</p></div>
-<div class="paragraph"><p>Erlang&#8217;s fault tolerance oriented design is the first piece of
-what makes it the best choice for the omnipresent, always available
-Web.</p></div>
-<div class="paragraph"><p>The second piece is Erlang&#8217;s built-in distribution. Distribution
-is a key part of building a fault tolerant system, because it
-allows you to handle bigger failures, like a whole server going
-down, or even a data center entirely.</p></div>
-<div class="paragraph"><p>Fault tolerance and distribution are important today, and will be
-vital in the future of the Web. Erlang is ready.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The Web has taken a very important part of our lives. We&apos;re connected at all times, when we&apos;re on our phone, using our computer, passing time using a tablet while in the bathroom... And this isn&apos;t going to slow down, every single device at home or on us will be connected.</p>
+<p>All these devices are always connected. And with the number of alternatives to give you access to the content you seek, users tend to not stick around when problems arise. Users today want their applications to be always available and if it&apos;s having too many issues they just move on.</p>
+<p>Despite this, when developers choose a product to use for building web applications, their only concern seems to be &quot;Is it fast?&quot;, and they look around for synthetic benchmarks showing which one is the fastest at sending &quot;Hello world&quot; with only a handful concurrent connections. Web benchmarks haven&apos;t been representative of reality in a long time, and are drifting further away as time goes on.</p>
+<p>What developers should really ask themselves is &quot;Can I service all my users with no interruption?&quot; and they&apos;d find that they have two choices. They can either hope for the best, or they can use Erlang.</p>
+<p>Erlang is built for fault tolerance. When writing code in any other language, you have to check all the return values and act accordingly to avoid any unforeseen issues. If you&apos;re lucky, you won&apos;t miss anything important. When writing Erlang code, you can just check the success condition and ignore all errors. If an error happens, the Erlang process crashes and is then restarted by a special process called a supervisor.</p>
+<p>Erlang developers thus have no need to fear unhandled errors, and can focus on handling only the errors that should give some feedback to the user and let the system take care of the rest. This also has the advantage of allowing them to write a lot less code, and let them sleep at night.</p>
+<p>Erlang&apos;s fault tolerance oriented design is the first piece of what makes it the best choice for the omnipresent, always available Web.</p>
+<p>The second piece is Erlang&apos;s built-in distribution. Distribution is a key part of building a fault tolerant system, because it allows you to handle bigger failures, like a whole server going down, or even a data center entirely.</p>
+<p>Fault tolerance and distribution are important today, and will be vital in the future of the Web. Erlang is ready.</p>
<h2 id="_learn_erlang">Learn Erlang</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>If you are new to Erlang, you may want to grab a book or
-two to get started. Those are my recommendations as the
-author of Cowboy.</p></div>
-<div class="sect3">
+<p>If you are new to Erlang, you may want to grab a book or two to get started. Those are my recommendations as the author of Cowboy.</p>
<h4 id="_the_erlanger_playbook">The Erlanger Playbook</h4>
-<div class="paragraph"><p>The Erlanger Playbook is an ebook I am currently writing,
-which covers a number of different topics from code to
-documentation to testing Erlang applications. It also has
-an Erlang section where it covers directly the building
-blocks and patterns, rather than details like the syntax.</p></div>
-<div class="paragraph"><p>You can most likely read it as a complete beginner, but
-you will need a companion book to make the most of it.
-Buy it from the <a href="https://ninenines.eu">Nine Nines website</a>.</p></div>
-</div>
-<div class="sect3">
+<p>The Erlanger Playbook is an ebook I am currently writing, which covers a number of different topics from code to documentation to testing Erlang applications. It also has an Erlang section where it covers directly the building blocks and patterns, rather than details like the syntax.</p>
+<p>You can most likely read it as a complete beginner, but you will need a companion book to make the most of it. Buy it from the <a href="https://ninenines.eu">Nine Nines website</a>.</p>
<h4 id="_programming_erlang">Programming Erlang</h4>
-<div class="paragraph"><p>This book is from one of the creator of Erlang, Joe
-Armstrong. It provides a very good explanation of what
-Erlang is and why it is so. It serves as a very good
-introduction to the language and platform.</p></div>
-<div class="paragraph"><p>The book is <a href="http://pragprog.com/book/jaerlang2/programming-erlang">Programming Erlang</a>,
-and it also features a chapter on Cowboy.</p></div>
-</div>
-<div class="sect3">
+<p>This book is from one of the creator of Erlang, Joe Armstrong. It provides a very good explanation of what Erlang is and why it is so. It serves as a very good introduction to the language and platform.</p>
+<p>The book is <a href="http://pragprog.com/book/jaerlang2/programming-erlang">Programming Erlang</a>, and it also features a chapter on Cowboy.</p>
<h4 id="_learn_you_some_erlang_for_great_good">Learn You Some Erlang for Great Good!</h4>
-<div class="paragraph"><p><a href="http://learnyousomeerlang.com">LYSE</a> is a much more complete
-book covering many aspects of Erlang, while also providing
-stories and humor. Be warned: it&#8217;s pretty verbose. It comes
-with a free online version and a more refined paper and
-ebook version.</p></div>
-</div>
-</div>
-</div>
+<p><a href="http://learnyousomeerlang.com">LYSE</a> is a much more complete book covering many aspects of Erlang, while also providing stories and humor. Be warned: it&apos;s pretty verbose. It comes with a free online version and a more refined paper and ebook version.</p>
+
diff --git a/docs/en/cowboy/2.1/guide/flow_diagram/index.html b/docs/en/cowboy/2.1/guide/flow_diagram/index.html
index 2bba77ce..fa42249d 100644
--- a/docs/en/cowboy/2.1/guide/flow_diagram/index.html
+++ b/docs/en/cowboy/2.1/guide/flow_diagram/index.html
@@ -62,113 +62,30 @@
<h1 class="lined-header"><span>Flow diagram</span></h1>
-<div class="paragraph"><p>Cowboy is a lightweight HTTP server with support for HTTP/1.1,
-HTTP/2 and Websocket.</p></div>
-<div class="paragraph"><p>It is built on top of Ranch. Please see the Ranch guide for more
-information about how the network connections are handled.</p></div>
-<div class="sect1">
+<p>Cowboy is a lightweight HTTP server with support for HTTP/1.1, HTTP/2 and Websocket.</p>
+<p>It is built on top of Ranch. Please see the Ranch guide for more information about how the network connections are handled.</p>
<h2 id="_overview">Overview</h2>
-<div class="sectionbody">
-<div class="imageblock">
-<div class="content">
-<img src="../http_req_resp.png" alt="HTTP request/response flowchart" />
-</div>
-</div>
-<div class="paragraph"><p>As you can see on the diagram, the client
-begins by connecting to the server. This step is handled
-by a Ranch acceptor, which is a process dedicated to
-accepting new connections.</p></div>
-<div class="paragraph"><p>After Ranch accepts a new connection, whether it is an
-HTTP/1.1 or HTTP/2 connection, Cowboy starts receiving
-requests and handling them.</p></div>
-<div class="paragraph"><p>In HTTP/1.1 all requests come sequentially. In HTTP/2
-the requests may arrive and be processed concurrently.</p></div>
-<div class="paragraph"><p>When a request comes in, Cowboy creates a stream, which
-is a set of request/response and all the events associated
-with them. The protocol code in Cowboy defers the handling
-of these streams to stream handler modules. When you
-configure Cowboy you may define one or more module that
-will receive all events associated with a stream, including
-the request, response, bodies, Erlang messages and more.</p></div>
-<div class="paragraph"><p>By default Cowboy comes configured with a stream handler
-called <code>cowboy_stream_h</code>. This stream handler will create
-a new process for every request coming in, and then
-communicate with this process to read the body or send
-a response back. The request process executes middlewares
-which, by default, including the router and then the
-execution of handlers. Like stream handlers, middlewares
-may also be customized.</p></div>
-<div class="paragraph"><p>A response may be sent at almost any point in this
-diagram. If the response must be sent before the stream
-is initialized (because an error occurred early, for
-example) then stream handlers receive a special event
-indicating this error.</p></div>
-</div>
-</div>
-<div class="sect1">
+<img src="../http_req_resp.png" alt="HTTP request/response flowchart"/><p>As you can see on the diagram, the client begins by connecting to the server. This step is handled by a Ranch acceptor, which is a process dedicated to accepting new connections.</p>
+<p>After Ranch accepts a new connection, whether it is an HTTP/1.1 or HTTP/2 connection, Cowboy starts receiving requests and handling them.</p>
+<p>In HTTP/1.1 all requests come sequentially. In HTTP/2 the requests may arrive and be processed concurrently.</p>
+<p>When a request comes in, Cowboy creates a stream, which is a set of request/response and all the events associated with them. The protocol code in Cowboy defers the handling of these streams to stream handler modules. When you configure Cowboy you may define one or more module that will receive all events associated with a stream, including the request, response, bodies, Erlang messages and more.</p>
+<p>By default Cowboy comes configured with a stream handler called <code>cowboy_stream_h</code>. This stream handler will create a new process for every request coming in, and then communicate with this process to read the body or send a response back. The request process executes middlewares which, by default, including the router and then the execution of handlers. Like stream handlers, middlewares may also be customized.</p>
+<p>A response may be sent at almost any point in this diagram. If the response must be sent before the stream is initialized (because an error occurred early, for example) then stream handlers receive a special event indicating this error.</p>
<h2 id="_protocol_specific_headers">Protocol-specific headers</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy takes care of protocol-specific headers and prevents
-you from sending them manually. For HTTP/1.1 this includes
-the <code>transfer-encoding</code> and <code>connection</code> headers. For HTTP/2
-this includes the colon headers like <code>:status</code>.</p></div>
-<div class="paragraph"><p>Cowboy will also remove protocol-specific headers from
-requests before passing them to stream handlers. Cowboy
-tries to hide the implementation details of all protocols
-as well as possible.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Cowboy takes care of protocol-specific headers and prevents you from sending them manually. For HTTP/1.1 this includes the <code>transfer-encoding</code> and <code>connection</code> headers. For HTTP/2 this includes the colon headers like <code>:status</code>.</p>
+<p>Cowboy will also remove protocol-specific headers from requests before passing them to stream handlers. Cowboy tries to hide the implementation details of all protocols as well as possible.</p>
<h2 id="_number_of_processes_per_connection">Number of processes per connection</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>By default, Cowboy will use one process per connection,
-plus one process per set of request/response (called a
-stream, internally).</p></div>
-<div class="paragraph"><p>The reason it creates a new process for every request is due
-to the requirements of HTTP/2 where requests are executed
-concurrently and independently from the connection. The
-frames from the different requests end up interleaved on
-the single TCP connection.</p></div>
-<div class="paragraph"><p>The request processes are never reused. There is therefore
-no need to perform any cleanup after the response has been
-sent. The process will terminate and Erlang/OTP will reclaim
-all memory at once.</p></div>
-<div class="paragraph"><p>Cowboy ultimately does not require more than one process
-per connection. It is possible to interact with the connection
-directly from a stream handler, a low level interface to Cowboy.
-They are executed from within the connection process, and can
-handle the incoming requests and send responses. This is however
-not recommended in normal circumstances, as a stream handler
-taking too long to execute could have a negative impact on
-concurrent requests or the state of the connection itself.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>By default, Cowboy will use one process per connection, plus one process per set of request/response (called a stream, internally).</p>
+<p>The reason it creates a new process for every request is due to the requirements of HTTP/2 where requests are executed concurrently and independently from the connection. The frames from the different requests end up interleaved on the single TCP connection.</p>
+<p>The request processes are never reused. There is therefore no need to perform any cleanup after the response has been sent. The process will terminate and Erlang/OTP will reclaim all memory at once.</p>
+<p>Cowboy ultimately does not require more than one process per connection. It is possible to interact with the connection directly from a stream handler, a low level interface to Cowboy. They are executed from within the connection process, and can handle the incoming requests and send responses. This is however not recommended in normal circumstances, as a stream handler taking too long to execute could have a negative impact on concurrent requests or the state of the connection itself.</p>
<h2 id="_date_header">Date header</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Because querying for the current date and time can be expensive,
-Cowboy generates one <em>Date</em> header value every second, shares it
-to all other processes, which then simply copy it in the response.
-This allows compliance with HTTP/1.1 with no actual performance loss.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Because querying for the current date and time can be expensive, Cowboy generates one <em>Date</em> header value every second, shares it to all other processes, which then simply copy it in the response. This allows compliance with HTTP/1.1 with no actual performance loss.</p>
<h2 id="_binaries">Binaries</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy makes extensive use of binaries.</p></div>
-<div class="paragraph"><p>Binaries are more efficient than lists for representing
-strings because they take less memory space. Processing
-performance can vary depending on the operation. Binaries
-are known for generally getting a great boost if the code
-is compiled natively. Please see the HiPE documentation
-for more details.</p></div>
-<div class="paragraph"><p>Binaries may end up being shared between processes. This
-can lead to some large memory usage when one process keeps
-the binary data around forever without freeing it. If you
-see some weird memory usage in your application, this might
-be the cause.</p></div>
-</div>
-</div>
+<p>Cowboy makes extensive use of binaries.</p>
+<p>Binaries are more efficient than lists for representing strings because they take less memory space. Processing performance can vary depending on the operation. Binaries are known for generally getting a great boost if the code is compiled natively. Please see the HiPE documentation for more details.</p>
+<p>Binaries may end up being shared between processes. This can lead to some large memory usage when one process keeps the binary data around forever without freeing it. If you see some weird memory usage in your application, this might be the cause.</p>
+
diff --git a/docs/en/cowboy/2.1/guide/getting_started/index.html b/docs/en/cowboy/2.1/guide/getting_started/index.html
index 480a5535..74a900dd 100644
--- a/docs/en/cowboy/2.1/guide/getting_started/index.html
+++ b/docs/en/cowboy/2.1/guide/getting_started/index.html
@@ -62,161 +62,104 @@
<h1 class="lined-header"><span>Getting started</span></h1>
-<div class="paragraph"><p>Erlang is more than a language, it is also an operating system
-for your applications. Erlang developers rarely write standalone
-modules, they write libraries or applications, and then bundle
-those into what is called a release. A release contains the
-Erlang VM plus all applications required to run the node, so
-it can be pushed to production directly.</p></div>
-<div class="paragraph"><p>This chapter walks you through all the steps of setting up
-Cowboy, writing your first application and generating your first
-release. At the end of this chapter you should know everything
-you need to push your first Cowboy application to production.</p></div>
-<div class="sect1">
+<p>Erlang is more than a language, it is also an operating system for your applications. Erlang developers rarely write standalone modules, they write libraries or applications, and then bundle those into what is called a release. A release contains the Erlang VM plus all applications required to run the node, so it can be pushed to production directly.</p>
+<p>This chapter walks you through all the steps of setting up Cowboy, writing your first application and generating your first release. At the end of this chapter you should know everything you need to push your first Cowboy application to production.</p>
<h2 id="_prerequisites">Prerequisites</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>We are going to use the <a href="https://github.com/ninenines/erlang.mk">Erlang.mk</a>
-build system. If you are using Windows, please check the
-<a href="http://erlang.mk/guide/installation.html">Installation instructions</a>
-to get your environment setup before you continue.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>We are going to use the <a href="https://github.com/ninenines/erlang.mk">Erlang.mk</a> build system. If you are using Windows, please check the <a href="http://erlang.mk/guide/installation.html">Installation instructions</a> to get your environment setup before you continue.</p>
<h2 id="_bootstrap">Bootstrap</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>First, let&#8217;s create the directory for our application.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>First, let&apos;s create the directory for our application.</p>
+<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 hello_erlang
-$ cd hello_erlang</tt></pre></div></div>
-<div class="paragraph"><p>Then we need to download Erlang.mk. Either use the following
-command or download it manually.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+$ cd hello_erlang</tt></pre>
+</div></div>
+<p>Then we need to download Erlang.mk. Either use the following command or download it manually.</p>
+<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>$ wget 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>We can now bootstrap our application. Since we are going to generate
-a release, we will also bootstrap it at the same time.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>$ wget https<font color="#990000">:</font>//erlang<font color="#990000">.</font>mk/erlang<font color="#990000">.</font>mk</tt></pre>
+</div></div>
+<p>We can now bootstrap our application. Since we are going to generate a release, we will also bootstrap it at the same time.</p>
+<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 -f erlang<span style="color: #990000">.</span>mk bootstrap bootstrap-rel</tt></pre></div></div>
-<div class="paragraph"><p>This creates a Makefile, a base application, and the release files
-necessary for creating the release. We can already build and start
-this release.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>$ make -f erlang<font color="#990000">.</font>mk bootstrap bootstrap-rel</tt></pre>
+</div></div>
+<p>This creates a Makefile, a base application, and the release files necessary for creating the release. We can already build and start this release.</p>
+<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 run
-<span style="color: #990000">...</span>
-<span style="color: #990000">(</span>hello_erlang@<span style="color: #993399">127.0</span><span style="color: #990000">.</span><span style="color: #993399">0.1</span><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>Entering the command <code>i().</code> will show the running processes, including
-one called <code>hello_erlang_sup</code>. This is the supervisor for our
-application.</p></div>
-<div class="paragraph"><p>The release currently does nothing. In the rest of this chapter we
-will add Cowboy as a dependency and write a simple "Hello world!"
-handler.</p></div>
-</div>
-</div>
-<div class="sect1">
+<font color="#990000">...</font>
+<font color="#990000">(</font>hello_erlang@<font color="#993399">127.0</font><font color="#990000">.</font><font color="#993399">0.1</font><font color="#990000">)</font><font color="#993399">1</font><font color="#990000">&gt;</font></tt></pre>
+</div></div>
+<p>Entering the command <code>i().</code> will show the running processes, including one called <code>hello_erlang_sup</code>. This is the supervisor for our application.</p>
+<p>The release currently does nothing. In the rest of this chapter we will add Cowboy as a dependency and write a simple &quot;Hello world!&quot; handler.</p>
<h2 id="_cowboy_setup">Cowboy setup</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>We will modify the <em>Makefile</em> to tell the build system it needs to
-fetch and compile Cowboy:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>We will modify the <em>Makefile</em> to tell the build system it needs to fetch and compile Cowboy:</p>
+<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">PROJECT =</span> hello_erlang
+<pre><tt><font color="#009900">PROJECT =</font> hello_erlang
-<span style="color: #009900">DEPS =</span> cowboy
-<span style="color: #009900">dep_cowboy_commit =</span> 2.1.0
+<font color="#009900">DEPS =</font> cowboy
+<font color="#009900">dep_cowboy_commit =</font> 2.1.0
-<span style="color: #009900">DEP_PLUGINS =</span> cowboy
+<font color="#009900">DEP_PLUGINS =</font> cowboy
-include erlang.mk</tt></pre></div></div>
-<div class="paragraph"><p>We also tell the build system to load the plugins Cowboy provides.
-These include predefined templates that we will use soon.</p></div>
-<div class="paragraph"><p>If you do <code>make run</code> now, Cowboy will be included in the release
-and started automatically. This is not enough however, as Cowboy
-doesn&#8217;t do anything by default. We still need to tell Cowboy to
-listen for connections.</p></div>
-</div>
-</div>
-<div class="sect1">
+include erlang.mk</tt></pre>
+</div></div>
+<p>We also tell the build system to load the plugins Cowboy provides. These include predefined templates that we will use soon.</p>
+<p>If you do <code>make run</code> now, Cowboy will be included in the release and started automatically. This is not enough however, as Cowboy doesn&apos;t do anything by default. We still need to tell Cowboy to listen for connections.</p>
<h2 id="_listening_for_connections">Listening for connections</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>First we define the routes that Cowboy will use to map requests
-to handler modules, and then we start the listener. This is best
-done at application startup.</p></div>
-<div class="paragraph"><p>Open the <em>src/hello_erlang_app.erl</em> file and add the necessary
-code to the <code>start/2</code> function to make it look like this:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>First we define the routes that Cowboy will use to map requests to handler modules, and then we start the listener. This is best done at application startup.</p>
+<p>Open the <em>src/hello_erlang_app.erl</em> file and add the necessary code to the <code>start/2</code> function to make it look like this:</p>
+<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">start</span></span>(<span style="color: #009900">_Type</span>, <span style="color: #009900">_Args</span>) <span style="color: #990000">-&gt;</span>
- <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: #FF6600">'_'</span>, [{<span style="color: #FF0000">"/"</span>, <span style="color: #FF6600">hello_handler</span>, []}]}
+<pre><tt><b><font color="#000000">start</font></b>(<font color="#009900">_Type</font>, <font color="#009900">_Args</font>) <font color="#990000">-&gt;</font>
+ <font color="#009900">Dispatch</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_router:compile</font></b>([
+ {<font color="#FF6600">'_'</font>, [{<font color="#FF0000">"/"</font>, <font color="#FF6600">hello_handler</font>, []}]}
]),
- {<span style="color: #FF6600">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:start_clear</span></span>(<span style="color: #FF6600">my_http_listener</span>,
- [{<span style="color: #FF6600">port</span>, <span style="color: #993399">8080</span>}],
- #{<span style="color: #0000FF">env</span> <span style="color: #990000">=&gt;</span> #{<span style="color: #0000FF">dispatch</span> <span style="color: #990000">=&gt;</span> <span style="color: #009900">Dispatch</span>}}
+ {<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy:start_clear</font></b>(<font color="#FF6600">my_http_listener</font>,
+ [{<font color="#FF6600">port</font>, <font color="#993399">8080</font>}],
+ #{<font color="#0000FF">env</font> <font color="#990000">=&gt;</font> #{<font color="#0000FF">dispatch</font> <font color="#990000">=&gt;</font> <font color="#009900">Dispatch</font>}}
),
- <span style="font-weight: bold"><span style="color: #000000">hello_erlang_sup:start_link</span></span>()<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Routes are explained in details in the <a href="../routing">Routing</a>
-chapter. For this tutorial we map the path <code>/</code> to the handler
-module <code>hello_handler</code>. This module doesn&#8217;t exist yet.</p></div>
-<div class="paragraph"><p>Build and start the release, then open <a href="http://localhost:8080">http://localhost:8080</a>
-in your browser. You will get a 500 error because the module is missing.
-Any other URL, like <a href="http://localhost:8080/test">http://localhost:8080/test</a>, will result in a
-404 error.</p></div>
-</div>
-</div>
-<div class="sect1">
+ <b><font color="#000000">hello_erlang_sup:start_link</font></b>()<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Routes are explained in details in the <a href="../routing">Routing</a> chapter. For this tutorial we map the path <code>/</code> to the handler module <code>hello_handler</code>. This module doesn&apos;t exist yet.</p>
+<p>Build and start the release, then open <a href="http://localhost:8080">http://localhost:8080</a> in your browser. You will get a 500 error because the module is missing. Any other URL, like <a href="http://localhost:8080/test">http://localhost:8080/test</a>, will result in a 404 error.</p>
<h2 id="_handling_requests">Handling requests</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy features different kinds of handlers, including REST
-and Websocket handlers. For this tutorial we will use a plain
-HTTP handler.</p></div>
-<div class="paragraph"><p>Generate a handler from a template:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Cowboy features different kinds of handlers, including REST and Websocket handlers. For this tutorial we will use a plain HTTP handler.</p>
+<p>Generate a handler from a template:</p>
+<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 new <span style="color: #009900">t</span><span style="color: #990000">=</span>cowboy<span style="color: #990000">.</span>http <span style="color: #009900">n</span><span style="color: #990000">=</span>hello_handler</tt></pre></div></div>
-<div class="paragraph"><p>Then, open the <em>src/hello_handler.erl</em> file and modify
-the <code>init/2</code> function like this to send a reply.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>$ make new <font color="#009900">t</font><font color="#990000">=</font>cowboy<font color="#990000">.</font>http <font color="#009900">n</font><font color="#990000">=</font>hello_handler</tt></pre>
+</div></div>
+<p>Then, open the <em>src/hello_handler.erl</em> file and modify the <code>init/2</code> function like this to send a reply.</p>
+<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">init</span></span>(<span style="color: #009900">Req0</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">200</span>,
- #{<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/plain"</span><span style="color: #990000">&gt;&gt;</span>},
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Hello Erlang!"</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="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>What the above code does is send a 200 OK reply, with the
-Content-type header set to <code>text/plain</code> and the response
-body set to <code>Hello Erlang!</code>.</p></div>
-<div class="paragraph"><p>If you run the release and open <a href="http://localhost:8080">http://localhost:8080</a>
-in your browser, you should get a nice <code>Hello Erlang!</code> displayed!</p></div>
-</div>
-</div>
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req0</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ <font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:reply</font></b>(<font color="#993399">200</font>,
+ #{<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/plain"</font><font color="#990000">&gt;&gt;</font>},
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"Hello Erlang!"</font><font color="#990000">&gt;&gt;</font>,
+ <font color="#009900">Req0</font>),
+ {<font color="#FF6600">ok</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>What the above code does is send a 200 OK reply, with the Content-type header set to <code>text/plain</code> and the response body set to <code>Hello Erlang!</code>.</p>
+<p>If you run the release and open <a href="http://localhost:8080">http://localhost:8080</a> in your browser, you should get a nice <code>Hello Erlang!</code> displayed!</p>
+
diff --git a/docs/en/cowboy/2.1/guide/handlers/index.html b/docs/en/cowboy/2.1/guide/handlers/index.html
index aa49c1c0..2d7b354b 100644
--- a/docs/en/cowboy/2.1/guide/handlers/index.html
+++ b/docs/en/cowboy/2.1/guide/handlers/index.html
@@ -62,91 +62,57 @@
<h1 class="lined-header"><span>Handlers</span></h1>
-<div class="paragraph"><p>Handlers are Erlang modules that handle HTTP requests.</p></div>
-<div class="sect1">
+<p>Handlers are Erlang modules that handle HTTP requests.</p>
<h2 id="_plain_http_handlers">Plain HTTP handlers</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The most basic handler in Cowboy implements the mandatory
-<code>init/2</code> callback, manipulates the request, optionally
-sends a response and then returns.</p></div>
-<div class="paragraph"><p>This callback receives the <a href="../req">Req object</a> and the initial
-state defined in the <a href="../routing">router configuration</a>.</p></div>
-<div class="paragraph"><p>A handler that does nothing would look like this:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The most basic handler in Cowboy implements the mandatory <code>init/2</code> callback, manipulates the request, optionally sends a response and then returns.</p>
+<p>This callback receives the <a href="../req">Req object</a> and the initial state defined in the <a href="../routing">router configuration</a>.</p>
+<p>A handler that does nothing would look like this:</p>
+<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">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">ok</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Despite sending no reply, a <code>204 No Content</code> response will be
-sent to the client, as Cowboy makes sure that a response is
-sent for every request.</p></div>
-<div class="paragraph"><p>We need to use the Req object to reply.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Despite sending no reply, a <code>204 No Content</code> response will be sent to the client, as Cowboy makes sure that a response is sent for every request.</p>
+<p>We need to use the Req object to reply.</p>
+<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">init</span></span>(<span style="color: #009900">Req0</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">200</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/plain"</span><span style="color: #990000">&gt;&gt;</span>
- }, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Hello World!"</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="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Cowboy will immediately send a response when <code>cowboy:reply/4</code>
-is called.</p></div>
-<div class="paragraph"><p>We then return a 3-tuple. <code>ok</code> means that the handler ran
-successfully. We also give the modified Req back to Cowboy.</p></div>
-<div class="paragraph"><p>The last value of the tuple is a state that will be used
-in every subsequent callbacks to this handler. Plain HTTP
-handlers only have one additional callback, the optional
-and rarely used <code>terminate/3</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req0</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ <font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:reply</font></b>(<font color="#993399">200</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/plain"</font><font color="#990000">&gt;&gt;</font>
+ }, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"Hello World!"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req0</font>),
+ {<font color="#FF6600">ok</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Cowboy will immediately send a response when <code>cowboy:reply/4</code> is called.</p>
+<p>We then return a 3-tuple. <code>ok</code> means that the handler ran successfully. We also give the modified Req back to Cowboy.</p>
+<p>The last value of the tuple is a state that will be used in every subsequent callbacks to this handler. Plain HTTP handlers only have one additional callback, the optional and rarely used <code>terminate/3</code>.</p>
<h2 id="_other_handlers">Other handlers</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <code>init/2</code> callback can also be used to inform Cowboy
-that this is a different kind of handler and that Cowboy
-should switch to it. To do this you simply need to return
-the module name of the handler type you want to switch to.</p></div>
-<div class="paragraph"><p>Cowboy comes with three handler types you can switch to:
-<a href="../rest_handlers">cowboy_rest</a>, <a href="#ws_handlers">cowboy_websocket</a>
-and <a href="../loop_handlers">cowboy_loop</a>. In addition to those you
-can define your own handler types.</p></div>
-<div class="paragraph"><p>Switching is simple. Instead of returning <code>ok</code>, you simply
-return the name of the handler type you want to use. The
-following snippet switches to a Websocket handler:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The <code>init/2</code> callback can also be used to inform Cowboy that this is a different kind of handler and that Cowboy should switch to it. To do this you simply need to return the module name of the handler type you want to switch to.</p>
+<p>Cowboy comes with three handler types you can switch to: <a href="../rest_handlers">cowboy_rest</a>, <a href="../ws_handlers">cowboy_websocket</a> and <a href="../loop_handlers">cowboy_loop</a>. In addition to those you can define your own handler types.</p>
+<p>Switching is simple. Instead of returning <code>ok</code>, you simply return the name of the handler type you want to use. The following snippet switches to a Websocket handler:</p>
+<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">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_websocket</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">
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">cowboy_websocket</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_cleaning_up">Cleaning up</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>All handler types provide the optional <code>terminate/3</code> callback.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>All handler types provide the optional <code>terminate/3</code> callback.</p>
+<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">terminate</span></span>(<span style="color: #009900">_Reason</span>, <span style="color: #009900">_Req</span>, <span style="color: #009900">_State</span>) <span style="color: #990000">-&gt;</span>
- <span style="color: #FF6600">ok</span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>This callback is strictly reserved for any required cleanup.
-You cannot send a response from this function. There is no
-other return value.</p></div>
-<div class="paragraph"><p>This callback is optional because it is rarely necessary.
-Cleanup should be done in separate processes directly (by
-monitoring the handler process to detect when it exits).</p></div>
-<div class="paragraph"><p>Cowboy does not reuse processes for different requests. The
-process will terminate soon after this call returns.</p></div>
-</div>
-</div>
+<pre><tt><b><font color="#000000">terminate</font></b>(<font color="#009900">_Reason</font>, <font color="#009900">_Req</font>, <font color="#009900">_State</font>) <font color="#990000">-&gt;</font>
+ <font color="#FF6600">ok</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>This callback is strictly reserved for any required cleanup. You cannot send a response from this function. There is no other return value.</p>
+<p>This callback is optional because it is rarely necessary. Cleanup should be done in separate processes directly (by monitoring the handler process to detect when it exits).</p>
+<p>Cowboy does not reuse processes for different requests. The process will terminate soon after this call returns.</p>
+
diff --git a/docs/en/cowboy/2.1/guide/index.html b/docs/en/cowboy/2.1/guide/index.html
index 520577a7..aa488e54 100644
--- a/docs/en/cowboy/2.1/guide/index.html
+++ b/docs/en/cowboy/2.1/guide/index.html
@@ -62,204 +62,81 @@
<h1 class="lined-header"><span>Cowboy User Guide</span></h1>
-<div class="sect1">
+<!-- REST: where should i handle bindings? init, probably. qs? in media type functions-->
+<!-- REST: explain how a module per media type is good; module may be shared between client/server-->
<h2 id="_rationale">Rationale</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="modern_web/">The modern Web</a>
-</p>
+<ul><li><a href="modern_web/">The modern Web</a>
</li>
-<li>
-<p>
-<a href="erlang_web/">Erlang and the Web</a>
-</p>
+<li><a href="erlang_web/">Erlang and the Web</a>
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_introduction">Introduction</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="introduction/">Introduction</a>
-</p>
+<ul><li><a href="introduction/">Introduction</a>
</li>
-<li>
-<p>
-<a href="getting_started/">Getting started</a>
-</p>
+<li><a href="getting_started/">Getting started</a>
</li>
-<li>
-<p>
-<a href="flow_diagram/">Flow diagram</a>
-</p>
+<li><a href="flow_diagram/">Flow diagram</a>
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_configuration">Configuration</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="listeners/">Listeners</a>
-</p>
+<ul><li><a href="listeners/">Listeners</a>
</li>
-<li>
-<p>
-<a href="routing/">Routing</a>
-</p>
+<li><a href="routing/">Routing</a>
</li>
-<li>
-<p>
-<a href="constraints/">Constraints</a>
-</p>
+<li><a href="constraints/">Constraints</a>
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_handlers">Handlers</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="handlers/">Handlers</a>
-</p>
+<ul><li><a href="handlers/">Handlers</a>
</li>
-<li>
-<p>
-<a href="loop_handlers/">Loop handlers</a>
-</p>
+<li><a href="loop_handlers/">Loop handlers</a>
</li>
-<li>
-<p>
-<a href="static_files/">Static files</a>
-</p>
+<li><a href="static_files/">Static files</a>
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_request_and_response">Request and response</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="req/">Request details</a>
-</p>
+<ul><li><a href="req/">Request details</a>
</li>
-<li>
-<p>
-<a href="req_body/">Reading the request body</a>
-</p>
+<li><a href="req_body/">Reading the request body</a>
</li>
-<li>
-<p>
-<a href="resp/">Sending a response</a>
-</p>
+<li><a href="resp/">Sending a response</a>
</li>
-<li>
-<p>
-<a href="cookies/">Using cookies</a>
-</p>
+<li><a href="cookies/">Using cookies</a>
</li>
-<li>
-<p>
-<a href="multipart/">Multipart</a>
-</p>
+<li><a href="multipart/">Multipart</a>
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_rest">REST</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="rest_principles/">REST principles</a>
-</p>
+<ul><li><a href="rest_principles/">REST principles</a>
</li>
-<li>
-<p>
-<a href="rest_handlers/">Handling REST requests</a>
-</p>
+<li><a href="rest_handlers/">Handling REST requests</a>
</li>
-<li>
-<p>
-<a href="rest_flowcharts/">REST flowcharts</a>
-</p>
+<li><a href="rest_flowcharts/">REST flowcharts</a>
</li>
-<li>
-<p>
-<a href="resource_design/">Designing a resource handler</a>
-</p>
+<li><a href="resource_design/">Designing a resource handler</a>
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_websocket">Websocket</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="ws_protocol/">The Websocket protocol</a>
-</p>
+<ul><li><a href="ws_protocol/">The Websocket protocol</a>
</li>
-<li>
-<p>
-<a href="ws_handlers/">Websocket handlers</a>
-</p>
+<li><a href="ws_handlers/">Websocket handlers</a>
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_advanced">Advanced</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="streams/">Streams</a>
-</p>
+<ul><li><a href="streams/">Streams</a>
</li>
-<li>
-<p>
-<a href="middlewares/">Middlewares</a>
-</p>
+<li><a href="middlewares/">Middlewares</a>
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_additional_information">Additional information</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="migrating_from_2.0/">Migrating from Cowboy 2.0 to 2.1</a>
-</p>
+<ul><li><a href="migrating_from_2.0/">Migrating from Cowboy 2.0 to 2.1</a>
</li>
-<li>
-<p>
-<a href="migrating_from_1.0/">Migrating from Cowboy 1.0 to 2.0</a>
-</p>
+<li><a href="migrating_from_1.0/">Migrating from Cowboy 1.0 to 2.0</a>
</li>
-<li>
-<p>
-<a href="specs/">HTTP and other specifications</a>
-</p>
+<li><a href="specs/">HTTP and other specifications</a>
</li>
-</ul></div>
-</div>
-</div>
+</ul>
+
diff --git a/docs/en/cowboy/2.1/guide/introduction/index.html b/docs/en/cowboy/2.1/guide/introduction/index.html
index 7a8642d8..9c529bd7 100644
--- a/docs/en/cowboy/2.1/guide/introduction/index.html
+++ b/docs/en/cowboy/2.1/guide/introduction/index.html
@@ -62,79 +62,40 @@
<h1 class="lined-header"><span>Introduction</span></h1>
-<div class="paragraph"><p>Cowboy is a small, fast and modern HTTP server for Erlang/OTP.</p></div>
-<div class="paragraph"><p>Cowboy aims to provide a complete <a href="../modern_web">modern Web stack</a>.
-This includes HTTP/1.1, HTTP/2, Websocket, Server-Sent Events and
-Webmachine-based REST.</p></div>
-<div class="paragraph"><p>Cowboy comes with functions for introspection and tracing, enabling
-developers to know precisely what is happening at any time. Its modular
-design also easily enable developers to add instrumentation.</p></div>
-<div class="paragraph"><p>Cowboy is a high quality project. It has a small code base, is very
-efficient (both in latency and memory use) and can easily be embedded
-in another application.</p></div>
-<div class="paragraph"><p>Cowboy is clean Erlang code. It includes hundreds of tests and its code
-is fully compliant with the Dialyzer. It is also well documented and
-features a Function Reference, a User Guide and numerous Tutorials.</p></div>
-<div class="sect1">
+<p>Cowboy is a small, fast and modern HTTP server for Erlang/OTP.</p>
+<p>Cowboy aims to provide a complete <a href="../modern_web">modern Web stack</a>. This includes HTTP/1.1, HTTP/2, Websocket, Server-Sent Events and Webmachine-based REST.</p>
+<p>Cowboy comes with functions for introspection and tracing, enabling developers to know precisely what is happening at any time. Its modular design also easily enable developers to add instrumentation.</p>
+<p>Cowboy is a high quality project. It has a small code base, is very efficient (both in latency and memory use) and can easily be embedded in another application.</p>
+<p>Cowboy is clean Erlang code. It includes hundreds of tests and its code is fully compliant with the Dialyzer. It is also well documented and features a Function Reference, a User Guide and numerous Tutorials.</p>
<h2 id="_prerequisites">Prerequisites</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Beginner Erlang knowledge is recommended for reading this guide.</p></div>
-<div class="paragraph"><p>Knowledge of the HTTP protocol is recommended but not required, as it
-will be detailed throughout the guide.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Beginner Erlang knowledge is recommended for reading this guide.</p>
+<p>Knowledge of the HTTP protocol is recommended but not required, as it will be detailed throughout the guide.</p>
<h2 id="_supported_platforms">Supported platforms</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy is tested and supported on Linux, FreeBSD, Windows and OSX.</p></div>
-<div class="paragraph"><p>Cowboy has been reported to work on other platforms, but we make no
-guarantee that the experience will be safe and smooth. You are advised
-to perform the necessary testing and security audits prior to deploying
-on other platforms.</p></div>
-<div class="paragraph"><p>Cowboy is developed for Erlang/OTP 19.0 and newer.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Cowboy is tested and supported on Linux, FreeBSD, Windows and OSX.</p>
+<p>Cowboy has been reported to work on other platforms, but we make no guarantee that the experience will be safe and smooth. You are advised to perform the necessary testing and security audits prior to deploying on other platforms.</p>
+<p>Cowboy is developed for Erlang/OTP 19.0 and newer.</p>
<h2 id="_license">License</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy uses the ISC License.</p></div>
-<div class="listingblock">
-<div class="content">
-<pre><code>Copyright (c) 2011-2017, Loïc Hoguin &lt;[email protected]&gt;
+<p>Cowboy uses the ISC License.</p>
+<div class="listingblock"><div class="content"><pre>Copyright (c) 2011-2017, Loïc Hoguin &lt;[email protected]&gt;
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+THE SOFTWARE IS PROVIDED &quot;AS IS&quot; AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.</code></pre>
-</div></div>
-</div>
-</div>
-<div class="sect1">
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.</pre></div></div>
<h2 id="_versioning">Versioning</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy uses <a href="http://semver.org/">Semantic Versioning 2.0.0</a>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Cowboy uses <a href="http://semver.org/">Semantic Versioning 2.0.0</a>.</p>
<h2 id="_conventions">Conventions</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>In the HTTP protocol, the method name is case sensitive. All standard
-method names are uppercase.</p></div>
-<div class="paragraph"><p>Header names are case insensitive. When using HTTP/1.1, Cowboy converts
-all the request header names to lowercase. HTTP/2 requires clients to
-send them as lowercase. Any other header name is expected to be provided
-lowercased, including when querying information about the request or
-when sending responses.</p></div>
-<div class="paragraph"><p>The same applies to any other case insensitive value.</p></div>
-</div>
-</div>
+<p>In the HTTP protocol, the method name is case sensitive. All standard method names are uppercase.</p>
+<p>Header names are case insensitive. When using HTTP/1.1, Cowboy converts all the request header names to lowercase. HTTP/2 requires clients to send them as lowercase. Any other header name is expected to be provided lowercased, including when querying information about the request or when sending responses.</p>
+<p>The same applies to any other case insensitive value.</p>
+
diff --git a/docs/en/cowboy/2.1/guide/listeners/index.html b/docs/en/cowboy/2.1/guide/listeners/index.html
index 63bbae5c..79f5ec00 100644
--- a/docs/en/cowboy/2.1/guide/listeners/index.html
+++ b/docs/en/cowboy/2.1/guide/listeners/index.html
@@ -62,109 +62,61 @@
<h1 class="lined-header"><span>Listeners</span></h1>
-<div class="paragraph"><p>A listener is a set of processes that listens on a port for
-new connections. Incoming connections get handled by Cowboy.
-Depending on the connection handshake, one or another protocol
-may be used.</p></div>
-<div class="paragraph"><p>This chapter is specific to Cowboy. Please refer to the
-<a href="https://ninenines.eu/docs/en/ranch/1.3/guide/listeners/">Ranch User Guide</a>
-for more information about listeners.</p></div>
-<div class="paragraph"><p>Cowboy provides two types of listeners: one listening for
-clear TCP connections, and one listening for secure TLS
-connections. Both of them support the HTTP/1.1 and HTTP/2
-protocols.</p></div>
-<div class="sect1">
+<p>A listener is a set of processes that listens on a port for new connections. Incoming connections get handled by Cowboy. Depending on the connection handshake, one or another protocol may be used.</p>
+<p>This chapter is specific to Cowboy. Please refer to the <a href="https://ninenines.eu/docs/en/ranch/1.3/guide/listeners/">Ranch User Guide</a> for more information about listeners.</p>
+<p>Cowboy provides two types of listeners: one listening for clear TCP connections, and one listening for secure TLS connections. Both of them support the HTTP/1.1 and HTTP/2 protocols.</p>
<h2 id="_clear_tcp_listener">Clear TCP listener</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The clear TCP listener will accept connections on the
-given port. A typical HTTP server would listen on port 80.
-Port 80 requires special permissions on most platforms
-however so a common alternative is port 8080.</p></div>
-<div class="paragraph"><p>The following snippet starts listening for connections
-on port 8080:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The clear TCP listener will accept connections on the given port. A typical HTTP server would listen on port 80. Port 80 requires special permissions on most platforms however so a common alternative is port 8080.</p>
+<p>The following snippet starts listening for connections on port 8080:</p>
+<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">start</span></span>(<span style="color: #009900">_Type</span>, <span style="color: #009900">_Args</span>) <span style="color: #990000">-&gt;</span>
- <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: #FF6600">'_'</span>, [{<span style="color: #FF0000">"/"</span>, <span style="color: #FF6600">hello_handler</span>, []}]}
+<pre><tt><b><font color="#000000">start</font></b>(<font color="#009900">_Type</font>, <font color="#009900">_Args</font>) <font color="#990000">-&gt;</font>
+ <font color="#009900">Dispatch</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_router:compile</font></b>([
+ {<font color="#FF6600">'_'</font>, [{<font color="#FF0000">"/"</font>, <font color="#FF6600">hello_handler</font>, []}]}
]),
- {<span style="color: #FF6600">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:start_clear</span></span>(<span style="color: #FF6600">my_http_listener</span>,
- [{<span style="color: #FF6600">port</span>, <span style="color: #993399">8080</span>}],
- #{<span style="color: #0000FF">env</span> <span style="color: #990000">=&gt;</span> #{<span style="color: #0000FF">dispatch</span> <span style="color: #990000">=&gt;</span> <span style="color: #009900">Dispatch</span>}}
+ {<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy:start_clear</font></b>(<font color="#FF6600">my_http_listener</font>,
+ [{<font color="#FF6600">port</font>, <font color="#993399">8080</font>}],
+ #{<font color="#0000FF">env</font> <font color="#990000">=&gt;</font> #{<font color="#0000FF">dispatch</font> <font color="#990000">=&gt;</font> <font color="#009900">Dispatch</font>}}
),
- <span style="font-weight: bold"><span style="color: #000000">hello_erlang_sup:start_link</span></span>()<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>The <a href="../getting_started">Getting Started</a> chapter uses a
-clear TCP listener.</p></div>
-<div class="paragraph"><p>Clients connecting to Cowboy on the clear listener port are
-expected to use either HTTP/1.1 or HTTP/2.</p></div>
-<div class="paragraph"><p>Cowboy supports both methods of initiating a clear
-HTTP/2 connection: through the Upgrade mechanism
-(<a href="https://tools.ietf.org/html/rfc7540#section-3.2">RFC 7540 3.2</a>)
-or by sending the preface directly
-(<a href="https://tools.ietf.org/html/rfc7540#section-3.4">RFC 7540 3.4</a>).</p></div>
-<div class="paragraph"><p>Compatibility with HTTP/1.0 is provided by Cowboy&#8217;s HTTP/1.1
-implementation.</p></div>
-</div>
-</div>
-<div class="sect1">
+ <b><font color="#000000">hello_erlang_sup:start_link</font></b>()<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>The <a href="../getting_started">Getting Started</a> chapter uses a clear TCP listener.</p>
+<p>Clients connecting to Cowboy on the clear listener port are expected to use either HTTP/1.1 or HTTP/2.</p>
+<p>Cowboy supports both methods of initiating a clear HTTP/2 connection: through the Upgrade mechanism (<a href="https://tools.ietf.org/html/rfc7540#section-3.2">RFC 7540 3.2</a>) or by sending the preface directly (<a href="https://tools.ietf.org/html/rfc7540#section-3.4">RFC 7540 3.4</a>).</p>
+<p>Compatibility with HTTP/1.0 is provided by Cowboy&apos;s HTTP/1.1 implementation.</p>
<h2 id="_secure_tls_listener">Secure TLS listener</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The secure TLS listener will accept connections on the
-given port. A typical HTTPS server would listen on port 443.
-Port 443 requires special permissions on most platforms
-however so a common alternative is port 8443.</p></div>
-<div class="paragraph"><p>The function provided by Cowboy will ensure that the TLS
-options given are following the HTTP/2 RFC with regards
-to security. For example some TLS extensions or ciphers
-may be disabled. This also applies to HTTP/1.1 connections
-on this listener. If this is not desirable, Ranch can be
-used directly to setup a custom listener.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The secure TLS listener will accept connections on the given port. A typical HTTPS server would listen on port 443. Port 443 requires special permissions on most platforms however so a common alternative is port 8443.</p>
+<!-- @todo Make a complete list of restrictions.-->
+<p>The function provided by Cowboy will ensure that the TLS options given are following the HTTP/2 RFC with regards to security. For example some TLS extensions or ciphers may be disabled. This also applies to HTTP/1.1 connections on this listener. If this is not desirable, Ranch can be used directly to setup a custom listener.</p>
+<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">start</span></span>(<span style="color: #009900">_Type</span>, <span style="color: #009900">_Args</span>) <span style="color: #990000">-&gt;</span>
- <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: #FF6600">'_'</span>, [{<span style="color: #FF0000">"/"</span>, <span style="color: #FF6600">hello_handler</span>, []}]}
+<pre><tt><b><font color="#000000">start</font></b>(<font color="#009900">_Type</font>, <font color="#009900">_Args</font>) <font color="#990000">-&gt;</font>
+ <font color="#009900">Dispatch</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_router:compile</font></b>([
+ {<font color="#FF6600">'_'</font>, [{<font color="#FF0000">"/"</font>, <font color="#FF6600">hello_handler</font>, []}]}
]),
- {<span style="color: #FF6600">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:start_tls</span></span>(<span style="color: #FF6600">my_http_listener</span>,
+ {<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy:start_tls</font></b>(<font color="#FF6600">my_http_listener</font>,
[
- {<span style="color: #FF6600">port</span>, <span style="color: #993399">8443</span>},
- {<span style="color: #FF6600">certfile</span>, <span style="color: #FF0000">"/path/to/certfile"</span>},
- {<span style="color: #FF6600">keyfile</span>, <span style="color: #FF0000">"/path/to/keyfile"</span>}
+ {<font color="#FF6600">port</font>, <font color="#993399">8443</font>},
+ {<font color="#FF6600">certfile</font>, <font color="#FF0000">"/path/to/certfile"</font>},
+ {<font color="#FF6600">keyfile</font>, <font color="#FF0000">"/path/to/keyfile"</font>}
],
- #{<span style="color: #0000FF">env</span> <span style="color: #990000">=&gt;</span> #{<span style="color: #0000FF">dispatch</span> <span style="color: #990000">=&gt;</span> <span style="color: #009900">Dispatch</span>}}
+ #{<font color="#0000FF">env</font> <font color="#990000">=&gt;</font> #{<font color="#0000FF">dispatch</font> <font color="#990000">=&gt;</font> <font color="#009900">Dispatch</font>}}
),
- <span style="font-weight: bold"><span style="color: #000000">hello_erlang_sup:start_link</span></span>()<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Clients connecting to Cowboy on the secure listener are
-expected to use the ALPN TLS extension to indicate what
-protocols they understand. Cowboy always prefers HTTP/2
-over HTTP/1.1 when both are supported. When neither are
-supported by the client, or when the ALPN extension was
-missing, Cowboy expects HTTP/1.1 to be used.</p></div>
-<div class="paragraph"><p>Cowboy also advertises HTTP/2 support through the older
-NPN TLS extension for compatibility. Note however that
-this support will likely not be enabled by default when
-Cowboy 2.0 gets released.</p></div>
-<div class="paragraph"><p>Compatibility with HTTP/1.0 is provided by Cowboy&#8217;s HTTP/1.1
-implementation.</p></div>
-</div>
-</div>
-<div class="sect1">
+ <b><font color="#000000">hello_erlang_sup:start_link</font></b>()<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Clients connecting to Cowboy on the secure listener are expected to use the ALPN TLS extension to indicate what protocols they understand. Cowboy always prefers HTTP/2 over HTTP/1.1 when both are supported. When neither are supported by the client, or when the ALPN extension was missing, Cowboy expects HTTP/1.1 to be used.</p>
+<p>Cowboy also advertises HTTP/2 support through the older NPN TLS extension for compatibility. Note however that this support will likely not be enabled by default when Cowboy 2.0 gets released.</p>
+<p>Compatibility with HTTP/1.0 is provided by Cowboy&apos;s HTTP/1.1 implementation.</p>
<h2 id="_protocol_configuration">Protocol configuration</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The HTTP/1.1 and HTTP/2 protocols share the same semantics;
-only their framing differs. The first is a text protocol and
-the second a binary protocol.</p></div>
-<div class="paragraph"><p>Cowboy doesn&#8217;t separate the configuration for HTTP/1.1 and
-HTTP/2. Everything goes into the same map. Many options are
-shared.</p></div>
-</div>
-</div>
+<p>The HTTP/1.1 and HTTP/2 protocols share the same semantics; only their framing differs. The first is a text protocol and the second a binary protocol.</p>
+<p>Cowboy doesn&apos;t separate the configuration for HTTP/1.1 and HTTP/2. Everything goes into the same map. Many options are shared.</p>
+<!-- @todo Describe good to know options for both protocols?-->
+<!-- Maybe do that in separate chapters?-->
+
diff --git a/docs/en/cowboy/2.1/guide/loop_handlers/index.html b/docs/en/cowboy/2.1/guide/loop_handlers/index.html
index 82075e75..fc370036 100644
--- a/docs/en/cowboy/2.1/guide/loop_handlers/index.html
+++ b/docs/en/cowboy/2.1/guide/loop_handlers/index.html
@@ -62,131 +62,72 @@
<h1 class="lined-header"><span>Loop handlers</span></h1>
-<div class="paragraph"><p>Loop handlers are a special kind of HTTP handlers used when the
-response can not be sent right away. The handler enters instead
-a receive loop waiting for the right message before it can send
-a response.</p></div>
-<div class="paragraph"><p>Loop handlers are used for requests where a response might not
-be immediately available, but where you would like to keep the
-connection open for a while in case the response arrives. The
-most known example of such practice is known as long polling.</p></div>
-<div class="paragraph"><p>Loop handlers can also be used for requests where a response is
-partially available and you need to stream the response body
-while the connection is open. The most known example of such
-practice is server-sent events.</p></div>
-<div class="paragraph"><p>While the same can be accomplished using plain HTTP handlers,
-it is recommended to use loop handlers because they are well-tested
-and allow using built-in features like hibernation and timeouts.</p></div>
-<div class="paragraph"><p>Loop handlers essentially wait for one or more Erlang messages
-and feed these messages to the <code>info/3</code> callback. It also features
-the <code>init/2</code> and <code>terminate/3</code> callbacks which work the same as
-for plain HTTP handlers.</p></div>
-<div class="sect1">
+<p>Loop handlers are a special kind of HTTP handlers used when the response can not be sent right away. The handler enters instead a receive loop waiting for the right message before it can send a response.</p>
+<p>Loop handlers are used for requests where a response might not be immediately available, but where you would like to keep the connection open for a while in case the response arrives. The most known example of such practice is known as long polling.</p>
+<p>Loop handlers can also be used for requests where a response is partially available and you need to stream the response body while the connection is open. The most known example of such practice is server-sent events.</p>
+<p>While the same can be accomplished using plain HTTP handlers, it is recommended to use loop handlers because they are well-tested and allow using built-in features like hibernation and timeouts.</p>
+<p>Loop handlers essentially wait for one or more Erlang messages and feed these messages to the <code>info/3</code> callback. It also features the <code>init/2</code> and <code>terminate/3</code> callbacks which work the same as for plain HTTP handlers.</p>
<h2 id="_initialization">Initialization</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <code>init/2</code> function must return a <code>cowboy_loop</code> tuple to enable
-loop handler behavior. This tuple may optionally contain
-a timeout value and/or the atom <code>hibernate</code> to make the
-process enter hibernation until a message is received.</p></div>
-<div class="paragraph"><p>This snippet enables the loop handler:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The <code>init/2</code> function must return a <code>cowboy_loop</code> tuple to enable loop handler behavior. This tuple may optionally contain a timeout value and/or the atom <code>hibernate</code> to make the process enter hibernation until a message is received.</p>
+<p>This snippet enables the loop handler:</p>
+<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">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_loop</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>This also makes the process hibernate:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">cowboy_loop</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>This also makes the process hibernate:</p>
+<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">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_loop</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>, <span style="color: #FF6600">hibernate</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">cowboy_loop</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>, <font color="#FF6600">hibernate</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_receive_loop">Receive loop</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Once initialized, Cowboy will wait for messages to arrive
-in the process' mailbox. When a message arrives, Cowboy
-calls the <code>info/3</code> function with the message, the Req object
-and the handler&#8217;s state.</p></div>
-<div class="paragraph"><p>The following snippet sends a reply when it receives a
-<code>reply</code> message from another process, or waits for another
-message otherwise.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Once initialized, Cowboy will wait for messages to arrive in the process&apos; mailbox. When a message arrives, Cowboy calls the <code>info/3</code> function with the message, the Req object and the handler&apos;s state.</p>
+<p>The following snippet sends a reply when it receives a <code>reply</code> message from another process, or waits for another message otherwise.</p>
+<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">info</span></span>({<span style="color: #FF6600">reply</span>, <span style="color: #009900">Body</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: #000000">cowboy_req:reply</span></span>(<span style="color: #993399">200</span>, #{}, <span style="color: #009900">Body</span>, <span style="color: #009900">Req</span>),
- {<span style="color: #FF6600">stop</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>};
-<span style="font-weight: bold"><span style="color: #000000">info</span></span>(<span style="color: #009900">_Msg</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>, <span style="color: #FF6600">hibernate</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Do note that the <code>reply</code> tuple here may be any message
-and is simply an example.</p></div>
-<div class="paragraph"><p>This callback may perform any necessary operation including
-sending all or parts of a reply, and will subsequently
-return a tuple indicating if more messages are to be expected.</p></div>
-<div class="paragraph"><p>The callback may also choose to do nothing at all and just
-skip the message received.</p></div>
-<div class="paragraph"><p>If a reply is sent, then the <code>stop</code> tuple should be returned.
-This will instruct Cowboy to end the request.</p></div>
-<div class="paragraph"><p>Otherwise an <code>ok</code> tuple should be returned.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">info</font></b>({<font color="#FF6600">reply</font>, <font color="#009900">Body</font>}, <font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#000000">cowboy_req:reply</font></b>(<font color="#993399">200</font>, #{}, <font color="#009900">Body</font>, <font color="#009900">Req</font>),
+ {<font color="#FF6600">stop</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>};
+<b><font color="#000000">info</font></b>(<font color="#009900">_Msg</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>, <font color="#FF6600">hibernate</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Do note that the <code>reply</code> tuple here may be any message and is simply an example.</p>
+<p>This callback may perform any necessary operation including sending all or parts of a reply, and will subsequently return a tuple indicating if more messages are to be expected.</p>
+<p>The callback may also choose to do nothing at all and just skip the message received.</p>
+<p>If a reply is sent, then the <code>stop</code> tuple should be returned. This will instruct Cowboy to end the request.</p>
+<p>Otherwise an <code>ok</code> tuple should be returned.</p>
<h2 id="_streaming_loop">Streaming loop</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Another common case well suited for loop handlers is
-streaming data received in the form of Erlang messages.
-This can be done by initiating a chunked reply in the
-<code>init/2</code> callback and then using <code>cowboy_req:chunk/2</code>
-every time a message is received.</p></div>
-<div class="paragraph"><p>The following snippet does exactly that. As you can see
-a chunk is sent every time an <code>event</code> message is received,
-and the loop is stopped by sending an <code>eof</code> message.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Another common case well suited for loop handlers is streaming data received in the form of Erlang messages. This can be done by initiating a chunked reply in the <code>init/2</code> callback and then using <code>cowboy_req:chunk/2</code> every time a message is received.</p>
+<p>The following snippet does exactly that. As you can see a chunk is sent every time an <code>event</code> message is received, and the loop is stopped by sending an <code>eof</code> message.</p>
+<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">init</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- <span style="color: #009900">Req2</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_reply</span></span>(<span style="color: #993399">200</span>, <span style="color: #009900">Req</span>),
- {<span style="color: #FF6600">cowboy_loop</span>, <span style="color: #009900">Req2</span>, <span style="color: #009900">State</span>}<span style="color: #990000">.</span>
-
-<span style="font-weight: bold"><span style="color: #000000">info</span></span>(<span style="color: #FF6600">eof</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">stop</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>};
-<span style="font-weight: bold"><span style="color: #000000">info</span></span>({<span style="color: #FF6600">event</span>, <span style="color: #009900">Data</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: #000000">cowboy_req:stream_body</span></span>(<span style="color: #009900">Data</span>, <span style="color: #FF6600">nofin</span>, <span style="color: #009900">Req</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">info</span></span>(<span style="color: #009900">_Msg</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">ok</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">
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ <font color="#009900">Req2</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:stream_reply</font></b>(<font color="#993399">200</font>, <font color="#009900">Req</font>),
+ {<font color="#FF6600">cowboy_loop</font>, <font color="#009900">Req2</font>, <font color="#009900">State</font>}<font color="#990000">.</font>
+
+<b><font color="#000000">info</font></b>(<font color="#FF6600">eof</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">stop</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>};
+<b><font color="#000000">info</font></b>({<font color="#FF6600">event</font>, <font color="#009900">Data</font>}, <font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#000000">cowboy_req:stream_body</font></b>(<font color="#009900">Data</font>, <font color="#FF6600">nofin</font>, <font color="#009900">Req</font>),
+ {<font color="#FF6600">ok</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>};
+<b><font color="#000000">info</font></b>(<font color="#009900">_Msg</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_cleaning_up">Cleaning up</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>It is recommended that you set the connection header to
-<code>close</code> when replying, as this process may be reused for
-a subsequent request.</p></div>
-<div class="paragraph"><p>Please refer to the <a href="../handlers">Handlers chapter</a>
-for general instructions about cleaning up.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>It is recommended that you set the connection header to <code>close</code> when replying, as this process may be reused for a subsequent request.</p>
+<p>Please refer to the <a href="../handlers">Handlers chapter</a> for general instructions about cleaning up.</p>
<h2 id="_hibernate">Hibernate</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>To save memory, you may hibernate the process in between
-messages received. This is done by returning the atom
-<code>hibernate</code> as part of the <code>loop</code> tuple callbacks normally
-return. Just add the atom at the end and Cowboy will hibernate
-accordingly.</p></div>
-</div>
-</div>
+<p>To save memory, you may hibernate the process in between messages received. This is done by returning the atom <code>hibernate</code> as part of the <code>loop</code> tuple callbacks normally return. Just add the atom at the end and Cowboy will hibernate accordingly.</p>
+
diff --git a/docs/en/cowboy/2.1/guide/middlewares/index.html b/docs/en/cowboy/2.1/guide/middlewares/index.html
index 71dde058..8ff8dd01 100644
--- a/docs/en/cowboy/2.1/guide/middlewares/index.html
+++ b/docs/en/cowboy/2.1/guide/middlewares/index.html
@@ -62,92 +62,38 @@
<h1 class="lined-header"><span>Middlewares</span></h1>
-<div class="paragraph"><p>Cowboy delegates the request processing to middleware components.
-By default, two middlewares are defined, for the routing and handling
-of the request, as is detailed in most of this guide.</p></div>
-<div class="paragraph"><p>Middlewares give you complete control over how requests are to be
-processed. You can add your own middlewares to the mix or completely
-change the chain of middlewares as needed.</p></div>
-<div class="paragraph"><p>Cowboy will execute all middlewares in the given order, unless one
-of them decides to stop processing.</p></div>
-<div class="sect1">
+<p>Cowboy delegates the request processing to middleware components. By default, two middlewares are defined, for the routing and handling of the request, as is detailed in most of this guide.</p>
+<p>Middlewares give you complete control over how requests are to be processed. You can add your own middlewares to the mix or completely change the chain of middlewares as needed.</p>
+<p>Cowboy will execute all middlewares in the given order, unless one of them decides to stop processing.</p>
<h2 id="_usage">Usage</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Middlewares only need to implement a single callback: <code>execute/2</code>.
-It is defined in the <code>cowboy_middleware</code> behavior.</p></div>
-<div class="paragraph"><p>This callback has two arguments. The first is the <code>Req</code> object.
-The second is the environment.</p></div>
-<div class="paragraph"><p>Middlewares can return one of three different values:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<code>{ok, Req, Env}</code> to continue the request processing
-</p>
+<p>Middlewares only need to implement a single callback: <code>execute/2</code>. It is defined in the <code>cowboy_middleware</code> behavior.</p>
+<p>This callback has two arguments. The first is the <code>Req</code> object. The second is the environment.</p>
+<p>Middlewares can return one of three different values:</p>
+<ul><li><code>{ok, Req, Env}</code> to continue the request processing
</li>
-<li>
-<p>
-<code>{suspend, Module, Function, Args}</code> to hibernate
-</p>
+<li><code>{suspend, Module, Function, Args}</code> to hibernate
</li>
-<li>
-<p>
-<code>{stop, Req}</code> to stop processing and move on to the next request
-</p>
+<li><code>{stop, Req}</code> to stop processing and move on to the next request
</li>
-</ul></div>
-<div class="paragraph"><p>Of note is that when hibernating, processing will resume on the given
-MFA, discarding all previous stacktrace. Make sure you keep the <code>Req</code>
-and <code>Env</code> in the arguments of this MFA for later use.</p></div>
-<div class="paragraph"><p>If an error happens during middleware processing, Cowboy will not try
-to send an error back to the socket, the process will just crash. It
-is up to the middleware to make sure that a reply is sent if something
-goes wrong.</p></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
+<p>Of note is that when hibernating, processing will resume on the given MFA, discarding all previous stacktrace. Make sure you keep the <code>Req</code> and <code>Env</code> in the arguments of this MFA for later use.</p>
+<p>If an error happens during middleware processing, Cowboy will not try to send an error back to the socket, the process will just crash. It is up to the middleware to make sure that a reply is sent if something goes wrong.</p>
<h2 id="_configuration">Configuration</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The middleware environment is defined as the <code>env</code> protocol option.
-In the previous chapters we saw it briefly when we needed to pass
-the routing information. It is a list of tuples with the first
-element being an atom and the second any Erlang term.</p></div>
-<div class="paragraph"><p>Two values in the environment are reserved:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<code>listener</code> contains the name of the listener
-</p>
+<p>The middleware environment is defined as the <code>env</code> protocol option. In the previous chapters we saw it briefly when we needed to pass the routing information. It is a list of tuples with the first element being an atom and the second any Erlang term.</p>
+<p>Two values in the environment are reserved:</p>
+<ul><li><code>listener</code> contains the name of the listener
</li>
-<li>
-<p>
-<code>result</code> contains the result of the processing
-</p>
+<li><code>result</code> contains the result of the processing
</li>
-</ul></div>
-<div class="paragraph"><p>The <code>listener</code> value is always defined. The <code>result</code> value can be
-set by any middleware. If set to anything other than <code>ok</code>, Cowboy
-will not process any subsequent requests on this connection.</p></div>
-<div class="paragraph"><p>The middlewares that come with Cowboy may define or require other
-environment values to perform.</p></div>
-<div class="paragraph"><p>You can update the environment by calling the <code>cowboy:set_env/3</code>
-convenience function, adding or replacing a value in the environment.</p></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
+<p>The <code>listener</code> value is always defined. The <code>result</code> value can be set by any middleware. If set to anything other than <code>ok</code>, Cowboy will not process any subsequent requests on this connection.</p>
+<p>The middlewares that come with Cowboy may define or require other environment values to perform.</p>
+<p>You can update the environment by calling the <code>cowboy:set_env/3</code> convenience function, adding or replacing a value in the environment.</p>
<h2 id="_routing_middleware">Routing middleware</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The routing middleware requires the <code>dispatch</code> value. If routing
-succeeds, it will put the handler name and options in the <code>handler</code>
-and <code>handler_opts</code> values of the environment, respectively.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The routing middleware requires the <code>dispatch</code> value. If routing succeeds, it will put the handler name and options in the <code>handler</code> and <code>handler_opts</code> values of the environment, respectively.</p>
<h2 id="_handler_middleware">Handler middleware</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The handler middleware requires the <code>handler</code> and <code>handler_opts</code>
-values. It puts the result of the request handling into <code>result</code>.</p></div>
-</div>
-</div>
+<p>The handler middleware requires the <code>handler</code> and <code>handler_opts</code> values. It puts the result of the request handling into <code>result</code>.</p>
+
diff --git a/docs/en/cowboy/2.1/guide/migrating_from_1.0/index.html b/docs/en/cowboy/2.1/guide/migrating_from_1.0/index.html
index e2ae159d..6a6cd794 100644
--- a/docs/en/cowboy/2.1/guide/migrating_from_1.0/index.html
+++ b/docs/en/cowboy/2.1/guide/migrating_from_1.0/index.html
@@ -62,388 +62,120 @@
<h1 class="lined-header"><span>Migrating from Cowboy 1.0 to 2.0</span></h1>
-<div class="paragraph"><p>A lot has changed between Cowboy 1.0 and 2.0. The <code>cowboy_req</code>
-interface in particular has seen a massive revamp. Hooks are
-gone, their functionality can now be achieved via stream
-handlers.</p></div>
-<div class="paragraph"><p>The documentation has seen great work, in particular the
-manual. Each module and each function now has its own dedicated
-manual page with full details and examples.</p></div>
-<div class="sect1">
+<p>A lot has changed between Cowboy 1.0 and 2.0. The <code>cowboy_req</code> interface in particular has seen a massive revamp. Hooks are gone, their functionality can now be achieved via stream handlers.</p>
+<p>The documentation has seen great work, in particular the manual. Each module and each function now has its own dedicated manual page with full details and examples.</p>
<h2 id="_compatibility">Compatibility</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Compatibility with Erlang/OTP R16, 17 and 18 has been dropped.
-Erlang/OTP 19.0 or above is required. It is non-trivial to
-make Cowboy 2.0 work with older Erlang/OTP versions.</p></div>
-<div class="paragraph"><p>Cowboy 2.0 is not compatible with Cowlib versions older than
-2.0. It should be compatible with Ranch 1.0 or above, however
-it has not been tested with Ranch versions older than 1.4.</p></div>
-<div class="paragraph"><p>Cowboy 2.0 is tested on Arch Linux, Ubuntu, FreeBSD, Windows
-and OSX. It is tested with every point release (latest patch
-release) and also with HiPE on the most recent release.</p></div>
-<div class="paragraph"><p>Cowboy 2.0 now comes with Erlang.mk templates.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Compatibility with Erlang/OTP R16, 17 and 18 has been dropped. Erlang/OTP 19.0 or above is required. It is non-trivial to make Cowboy 2.0 work with older Erlang/OTP versions.</p>
+<p>Cowboy 2.0 is not compatible with Cowlib versions older than 2.0. It should be compatible with Ranch 1.0 or above, however it has not been tested with Ranch versions older than 1.4.</p>
+<p>Cowboy 2.0 is tested on Arch Linux, Ubuntu, FreeBSD, Windows and OSX. It is tested with every point release (latest patch release) and also with HiPE on the most recent release.</p>
+<p>Cowboy 2.0 now comes with Erlang.mk templates.</p>
<h2 id="_features_added">Features added</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-The HTTP/2 protocol is now supported.
-</p>
-</li>
-<li>
-<p>
-Cowboy no longer uses only one process per connection.
- It now uses one process per connection plus one process
- per request by default. This is necessary for HTTP/2.
- There might be a slight drop in performance for HTTP/1.1
- connections due to this change.
-</p>
-</li>
-<li>
-<p>
-Cowboy internals have largely been reworked in order to
- support HTTP/2. This opened the way to stream handlers,
- which are a chain of modules that are called whenever
- something happens relating to a request/response.
-</p>
-</li>
-<li>
-<p>
-The <code>cowboy_stream_h</code> stream handler has been added.
- It provides most of Cowboy&#8217;s default behavior.
-</p>
-</li>
-<li>
-<p>
-The <code>cowboy_compress_h</code> stream handler has been added.
- It compresses responses when possible. It&#8217;s worth noting
- that it compresses in more cases than Cowboy 1.0 ever did.
-</p>
-</li>
-<li>
-<p>
-Because of the many changes in the internals of Cowboy,
- many options have been added or modified. Of note is that
- the Websocket options are now given per handler rather
- than for the entire listener.
-</p>
-</li>
-<li>
-<p>
-Websocket permessage-deflate compression is now supported
- via the <code>compress</code> option.
-</p>
-</li>
-<li>
-<p>
-Static file handlers will now correctly find files found
- in <em>.ez</em> archives.
-</p>
-</li>
-<li>
-<p>
-Constraints have been generalized and are now used not only
- in the router but also in some <code>cowboy_req</code> functions. Their
- interface has also been modified to allow for reverse
- operations and formatting of errors.
-</p>
-</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+<ul><li>The HTTP/2 protocol is now supported.
+</li>
+<li>Cowboy no longer uses only one process per connection. It now uses one process per connection plus one process per request by default. This is necessary for HTTP/2. There might be a slight drop in performance for HTTP/1.1 connections due to this change.
+</li>
+<li>Cowboy internals have largely been reworked in order to support HTTP/2. This opened the way to stream handlers, which are a chain of modules that are called whenever something happens relating to a request/response.
+</li>
+<li>The <code>cowboy_stream_h</code> stream handler has been added. It provides most of Cowboy&apos;s default behavior.
+</li>
+<li>The <code>cowboy_compress_h</code> stream handler has been added. It compresses responses when possible. It&apos;s worth noting that it compresses in more cases than Cowboy 1.0 ever did.
+</li>
+<li>Because of the many changes in the internals of Cowboy, many options have been added or modified. Of note is that the Websocket options are now given per handler rather than for the entire listener.
+</li>
+<li>Websocket permessage-deflate compression is now supported via the <code>compress</code> option.
+</li>
+<li>Static file handlers will now correctly find files found in <em>.ez</em> archives.
+</li>
+<li>Constraints have been generalized and are now used not only in the router but also in some <code>cowboy_req</code> functions. Their interface has also been modified to allow for reverse operations and formatting of errors.
+</li>
+</ul>
<h2 id="_features_removed">Features removed</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-SPDY support has been removed. Use HTTP/2 instead.
-</p>
-</li>
-<li>
-<p>
-Hooks have been removed. Use <a href="../streams">stream handlers</a> instead.
-</p>
-</li>
-<li>
-<p>
-The undocumented <code>waiting_stream</code> hack has been removed.
- It allowed disabling chunked transfer-encoding for HTTP/1.1.
- It has no equivalent in Cowboy 2.0. Open a ticket if necessary.
-</p>
-</li>
-<li>
-<p>
-Sub protocols still exist, but their interface has largely changed
- and they are no longer documented for the time being.
-</p>
-</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+<ul><li>SPDY support has been removed. Use HTTP/2 instead.
+</li>
+<li>Hooks have been removed. Use <a href="../streams">stream handlers</a> instead.
+</li>
+<li>The undocumented <code>waiting_stream</code> hack has been removed. It allowed disabling chunked transfer-encoding for HTTP/1.1. It has no equivalent in Cowboy 2.0. Open a ticket if necessary.
+</li>
+<li>Sub protocols still exist, but their interface has largely changed and they are no longer documented for the time being.
+</li>
+</ul>
<h2 id="_changed_behaviors">Changed behaviors</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-The handler behaviors have been renamed and are now <code>cowboy_handler</code>,
- <code>cowboy_loop</code>, <code>cowboy_rest</code> and <code>cowboy_websocket</code>.
-</p>
-</li>
-<li>
-<p>
-Plain HTTP, loop, REST and Websocket handlers have had their
- init and terminate callbacks unified. They now all use the
- <code>init/2</code> and <code>terminate/3</code> callbacks. The latter is now optional.
- The terminate reason has now been documented for all handlers.
-</p>
-</li>
-<li>
-<p>
-The tuple returned to switch to a different handler type has
- changed. It now takes the form <code>{Module, Req, State}</code> or
- <code>{Module, Req, State, Opts}</code>, where <code>Opts</code> is a map of options
- to configure the handler. The timeout and hibernate options
- must now be specified using this map, where applicable.
-</p>
-</li>
-<li>
-<p>
-All behaviors that used to accept <code>halt</code> or <code>shutdown</code> tuples
- as a return value no longer do so. The return value is now
- a <code>stop</code> tuple, consistent across Cowboy.
-</p>
-</li>
-<li>
-<p>
-Middlewares can no longer return an <code>error</code> tuple. They have
- to send the response and return a <code>stop</code> tuple instead.
-</p>
-</li>
-<li>
-<p>
-The <code>known_content_type</code> REST handler callback has been removed
- as it was found unnecessary.
-</p>
-</li>
-<li>
-<p>
-Websocket handlers have both the normal <code>init/2</code> and
- an optional <code>websocket_init/1</code> function. The reason for
- that exception is that the <code>websocket_*</code> callbacks execute
- in a separate process from the <code>init/2</code> callback, and it
- was therefore not obvious how timers or monitors should
- be setup properly. They are effectively initializing the
- handler before and after the HTTP/1.1 upgrade.
-</p>
-</li>
-<li>
-<p>
-Websocket handlers can now send frames directly from
- <code>websocket_init/1</code>. The frames will be sent immediately
- after the handshake.
-</p>
-</li>
-<li>
-<p>
-Websocket handler callbacks no longer receive the Req
- argument. The <code>init/2</code> callback still receives it and
- can be used to extract relevant information. The <code>terminate/3</code>
- callback, if implemented, may still receive the Req
- (see next bullet point).
-</p>
-</li>
-<li>
-<p>
-Websocket handlers have a new <code>req_filter</code> option that
- can be used to customize how much information should be
- discarded from the Req object after the handshake. Note
- that the Req object is only available in <code>terminate/3</code>
- past that point.
-</p>
-</li>
-<li>
-<p>
-Websocket handlers have their timeout default changed
- from infinity to 60 seconds.
-</p>
-</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+<ul><li>The handler behaviors have been renamed and are now <code>cowboy_handler</code>, <code>cowboy_loop</code>, <code>cowboy_rest</code> and <code>cowboy_websocket</code>.
+</li>
+<li>Plain HTTP, loop, REST and Websocket handlers have had their init and terminate callbacks unified. They now all use the <code>init/2</code> and <code>terminate/3</code> callbacks. The latter is now optional. The terminate reason has now been documented for all handlers.
+</li>
+<li>The tuple returned to switch to a different handler type has changed. It now takes the form <code>{Module, Req, State}</code> or <code>{Module, Req, State, Opts}</code>, where <code>Opts</code> is a map of options to configure the handler. The timeout and hibernate options must now be specified using this map, where applicable.
+</li>
+<li>All behaviors that used to accept <code>halt</code> or <code>shutdown</code> tuples as a return value no longer do so. The return value is now a <code>stop</code> tuple, consistent across Cowboy.
+</li>
+<li>Middlewares can no longer return an <code>error</code> tuple. They have to send the response and return a <code>stop</code> tuple instead.
+</li>
+<li>The <code>known_content_type</code> REST handler callback has been removed as it was found unnecessary.
+</li>
+<li>Websocket handlers have both the normal <code>init/2</code> and an optional <code>websocket_init/1</code> function. The reason for that exception is that the <code>websocket_*</code> callbacks execute in a separate process from the <code>init/2</code> callback, and it was therefore not obvious how timers or monitors should be setup properly. They are effectively initializing the handler before and after the HTTP/1.1 upgrade.
+</li>
+<li>Websocket handlers can now send frames directly from <code>websocket_init/1</code>. The frames will be sent immediately after the handshake.
+</li>
+<li>Websocket handler callbacks no longer receive the Req argument. The <code>init/2</code> callback still receives it and can be used to extract relevant information. The <code>terminate/3</code> callback, if implemented, may still receive the Req (see next bullet point).
+</li>
+<li>Websocket handlers have a new <code>req_filter</code> option that can be used to customize how much information should be discarded from the Req object after the handshake. Note that the Req object is only available in <code>terminate/3</code> past that point.
+</li>
+<li>Websocket handlers have their timeout default changed from infinity to 60 seconds.
+</li>
+</ul>
<h2 id="_new_functions">New functions</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-The <code>cowboy_req:scheme/1</code> function has been added.
-</p>
-</li>
-<li>
-<p>
-The <code>cowboy_req:uri/1,2</code> function has been added, replacing the
- less powerful functions <code>cowboy_req:url/1</code> and <code>cowboy_req:host_url/1</code>.
-</p>
-</li>
-<li>
-<p>
-The functions <code>cowboy_req:match_qs/2</code> and <code>cowboy_req:match_cookies/2</code>
- allow matching query string and cookies against constraints.
-</p>
-</li>
-<li>
-<p>
-The function <code>cowboy_req:set_resp_cookie/3</code> has been added to
- complement <code>cowboy_req:set_resp_cookie/4</code>.
-</p>
-</li>
-<li>
-<p>
-The functions <code>cowboy_req:resp_header/2,3</code> and <code>cowboy_req:resp_headers/1</code>
- have been added. They can be used to retrieve response headers
- that were previously set.
-</p>
-</li>
-<li>
-<p>
-The function <code>cowboy_req:set_resp_headers/2</code> has been added. It
- allows setting many response headers at once.
-</p>
-</li>
-<li>
-<p>
-The functions <code>cowboy_req:push/3,4</code> can be used to push resources
- for protocols that support it (by default only HTTP/2).
-</p>
-</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+<ul><li>The <code>cowboy_req:scheme/1</code> function has been added.
+</li>
+<li>The <code>cowboy_req:uri/1,2</code> function has been added, replacing the less powerful functions <code>cowboy_req:url/1</code> and <code>cowboy_req:host_url/1</code>.
+</li>
+<li>The functions <code>cowboy_req:match_qs/2</code> and <code>cowboy_req:match_cookies/2</code> allow matching query string and cookies against constraints.
+</li>
+<li>The function <code>cowboy_req:set_resp_cookie/3</code> has been added to complement <code>cowboy_req:set_resp_cookie/4</code>.
+</li>
+<li>The functions <code>cowboy_req:resp_header/2,3</code> and <code>cowboy_req:resp_headers/1</code> have been added. They can be used to retrieve response headers that were previously set.
+</li>
+<li>The function <code>cowboy_req:set_resp_headers/2</code> has been added. It allows setting many response headers at once.
+</li>
+<li>The functions <code>cowboy_req:push/3,4</code> can be used to push resources for protocols that support it (by default only HTTP/2).
+</li>
+</ul>
<h2 id="_changed_functions">Changed functions</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-The <code>cowboy:start_http/4</code> function was renamed to <code>cowboy:start_clear/3</code>.
-</p>
-</li>
-<li>
-<p>
-The <code>cowboy:start_https/4</code> function was renamed to <code>cowboy:start_tls/3</code>.
-</p>
-</li>
-<li>
-<p>
-Most, if not all, functions in the <code>cowboy_req</code> module have been modified.
- Please consult the changelog of each individual functions. The changes
- are mainly about simplifying and clarifying the interface. The Req is no
- longer returned when not necessary, maps are used wherever possible,
- and some functions have been renamed.
-</p>
-</li>
-<li>
-<p>
-The position of the <code>Opts</code> argument for <code>cowboy_req:set_resp_cookie/4</code>
- has changed to improve consistency. It is now the last argument.
-</p>
-</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+<ul><li>The <code>cowboy:start_http/4</code> function was renamed to <code>cowboy:start_clear/3</code>.
+</li>
+<li>The <code>cowboy:start_https/4</code> function was renamed to <code>cowboy:start_tls/3</code>.
+</li>
+<li>Most, if not all, functions in the <code>cowboy_req</code> module have been modified. Please consult the changelog of each individual functions. The changes are mainly about simplifying and clarifying the interface. The Req is no longer returned when not necessary, maps are used wherever possible, and some functions have been renamed.
+</li>
+<li>The position of the <code>Opts</code> argument for <code>cowboy_req:set_resp_cookie/4</code> has changed to improve consistency. It is now the last argument.
+</li>
+</ul>
<h2 id="_removed_functions">Removed functions</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-The functions <code>cowboy_req:url/1</code> and <code>cowboy_req:host_url/1</code> have been
- removed in favor of the new function <code>cowboy_req:uri/1,2</code>.
-</p>
-</li>
-<li>
-<p>
-The functions <code>cowboy_req:meta/2,3</code> and <code>cowboy_req:set_meta/3</code> have
- been removed. The Req object is now a public map, therefore they became
- unnecessary.
-</p>
-</li>
-<li>
-<p>
-The functions <code>cowboy_req:set_resp_body_fun/2,3</code> have been removed.
- For sending files, the function <code>cowboy_req:set_resp_body/2</code> can now
- take a sendfile tuple.
-</p>
-</li>
-<li>
-<p>
-Remove many undocumented functions from <code>cowboy_req</code>, including the
- functions <code>cowboy_req:get/2</code> and <code>cowboy_req:set/3</code>.
-</p>
-</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+<ul><li>The functions <code>cowboy_req:url/1</code> and <code>cowboy_req:host_url/1</code> have been removed in favor of the new function <code>cowboy_req:uri/1,2</code>.
+</li>
+<li>The functions <code>cowboy_req:meta/2,3</code> and <code>cowboy_req:set_meta/3</code> have been removed. The Req object is now a public map, therefore they became unnecessary.
+</li>
+<li>The functions <code>cowboy_req:set_resp_body_fun/2,3</code> have been removed. For sending files, the function <code>cowboy_req:set_resp_body/2</code> can now take a sendfile tuple.
+</li>
+<li>Remove many undocumented functions from <code>cowboy_req</code>, including the functions <code>cowboy_req:get/2</code> and <code>cowboy_req:set/3</code>.
+</li>
+</ul>
<h2 id="_other_changes">Other changes</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-The correct percent-decoding algorithm is now used for path elements
- during routing. It will no longer decode <code>+</code> characters.
-</p>
-</li>
-<li>
-<p>
-The router will now properly handle path segments <code>.</code> and <code>..</code>.
-</p>
-</li>
-<li>
-<p>
-Routing behavior has changed for URIs containing latin1 characters.
- They are no longer allowed. URIs are expected to be in UTF-8 once
- they are percent-decoded.
-</p>
-</li>
-<li>
-<p>
-Clients that send multiple headers of the same name
- will have the values of those headers concatenated into a
- comma-separated list. This is of special importance in the
- case of the content-type header, as previously only the
- first value was used in the <code>content_types_accepted/2</code> step
- in REST handlers.
-</p>
-</li>
-<li>
-<p>
-Etag comparison in REST handlers has been fixed. Some requests may
- now fail when they succeeded in the past.
-</p>
-</li>
-<li>
-<p>
-The <code>If-*-Since</code> headers are now ignored in REST handlers if
- the corresponding <code>If*-Match</code> header exist. The former is
- largely a backward compatible header and this shouldn&#8217;t create
- any issue. The new behavior follows the current RFCs more closely.
-</p>
-</li>
-<li>
-<p>
-The static file handler has been improved to handle more special
- characters on systems that accept them.
-</p>
-</li>
-</ul></div>
-</div>
-</div>
+<ul><li>The correct percent-decoding algorithm is now used for path elements during routing. It will no longer decode <code>+</code> characters.
+</li>
+<li>The router will now properly handle path segments <code>.</code> and <code>..</code>.
+</li>
+<li>Routing behavior has changed for URIs containing latin1 characters. They are no longer allowed. URIs are expected to be in UTF-8 once they are percent-decoded.
+</li>
+<li>Clients that send multiple headers of the same name will have the values of those headers concatenated into a comma-separated list. This is of special importance in the case of the content-type header, as previously only the first value was used in the <code>content_types_accepted/2</code> step in REST handlers.
+</li>
+<li>Etag comparison in REST handlers has been fixed. Some requests may now fail when they succeeded in the past.
+</li>
+<li>The <code>If-*-Since</code> headers are now ignored in REST handlers if the corresponding <code>If*-Match</code> header exist. The former is largely a backward compatible header and this shouldn&apos;t create any issue. The new behavior follows the current RFCs more closely.
+</li>
+<li>The static file handler has been improved to handle more special characters on systems that accept them.
+</li>
+</ul>
+
diff --git a/docs/en/cowboy/2.1/guide/migrating_from_2.0/index.html b/docs/en/cowboy/2.1/guide/migrating_from_2.0/index.html
index dcae7395..4124c49a 100644
--- a/docs/en/cowboy/2.1/guide/migrating_from_2.0/index.html
+++ b/docs/en/cowboy/2.1/guide/migrating_from_2.0/index.html
@@ -62,188 +62,55 @@
<h1 class="lined-header"><span>Migrating from Cowboy 2.0 to 2.1</span></h1>
-<div class="paragraph"><p>Cowboy 2.1 focused on adding features that were temporarily
-removed in Cowboy 2.0. A number of bugs found in the 2.0
-release were also fixed.</p></div>
-<div class="sect1">
+<p>Cowboy 2.1 focused on adding features that were temporarily removed in Cowboy 2.0. A number of bugs found in the 2.0 release were also fixed.</p>
<h2 id="_features_added">Features added</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-It is now possible to obtain the client TLS certificate
- and the local IP/port for the connection from the Req object.
-</p>
+<ul><li>It is now possible to obtain the client TLS certificate and the local IP/port for the connection from the Req object.
</li>
-<li>
-<p>
-Informational responses (1XX responses) can now be sent.
- They must be sent before initiating the final response.
-</p>
+<li>Informational responses (1XX responses) can now be sent. They must be sent before initiating the final response.
</li>
-<li>
-<p>
-The <code>expect: 100-continue</code> header is now handled
- automatically. The 100 response will be sent on the
- first <code>cowboy_req:read_body/2,3,4</code> call. This only applies
- when using the default <code>cowboy_stream_h</code> stream handler.
-</p>
+<li>The <code>expect: 100-continue</code> header is now handled automatically. The 100 response will be sent on the first <code>cowboy_req:read_body/2,3,4</code> call. This only applies when using the default <code>cowboy_stream_h</code> stream handler.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_experimental_features_added">Experimental features added</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Experimental features are previews of features that will be
-added in a future release. They are not documented and their
-interface may change at any time. You are welcome to try them
-and provide feedback.</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-The <code>cowboy_metrics_h</code> stream handler can be used to
- extract metrics out of Cowboy. It must be used first in
- the list of stream handlers, and will record all events
- related to requests, responses and spawned processes.
- When the stream terminates it will pass this information
- to a user-defined callback.
-</p>
+<p>Experimental features are previews of features that will be added in a future release. They are not documented and their interface may change at any time. You are welcome to try them and provide feedback.</p>
+<ul><li>The <code>cowboy_metrics_h</code> stream handler can be used to extract metrics out of Cowboy. It must be used first in the list of stream handlers, and will record all events related to requests, responses and spawned processes. When the stream terminates it will pass this information to a user-defined callback.
</li>
-<li>
-<p>
-The <code>cowboy_tracer_h</code> stream handler can be used to setup
- automatic tracing of specific requests. You can conditionally
- enable tracing based on a function, header, path or any other
- element from the request and the trace will apply to the
- entire connection and any processes created by it. This is
- meant to be used for debugging both in tests and production.
-</p>
+<li>The <code>cowboy_tracer_h</code> stream handler can be used to setup automatic tracing of specific requests. You can conditionally enable tracing based on a function, header, path or any other element from the request and the trace will apply to the entire connection and any processes created by it. This is meant to be used for debugging both in tests and production.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_changed_behaviors">Changed behaviors</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-The <code>cowboy_rest</code> handler now implements a mechanism for
- switching to a different type of handler from any callback
- where <code>stop</code> is also allowed. Switch by returning
- <code>{switch_handler, Module}</code> or <code>{switch_handler, Module, Opts}</code>.
- This is especially useful for switching to <code>cowboy_loop</code>
- for streaming the request or response body.
-</p>
+<ul><li>The <code>cowboy_rest</code> handler now implements a mechanism for switching to a different type of handler from any callback where <code>stop</code> is also allowed. Switch by returning <code>{switch_handler, Module}</code> or <code>{switch_handler, Module, Opts}</code>. This is especially useful for switching to <code>cowboy_loop</code> for streaming the request or response body.
</li>
-<li>
-<p>
-REST callbacks that do not allow <code>stop</code> as a return value
- are now explicitly listed in the documentation.
-</p>
+<li>REST callbacks that do not allow <code>stop</code> as a return value are now explicitly listed in the documentation.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_new_functions">New functions</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-The function <code>cowboy_req:sock/1</code> returns the IP/port
- of the local socket.
-</p>
+<ul><li>The function <code>cowboy_req:sock/1</code> returns the IP/port of the local socket.
</li>
-<li>
-<p>
-The function <code>cowboy_req:cert/1</code> returns the client
- TLS certificate or <code>undefined</code> if it isn&#8217;t available.
-</p>
+<li>The function <code>cowboy_req:cert/1</code> returns the client TLS certificate or <code>undefined</code> if it isn&apos;t available.
</li>
-<li>
-<p>
-The function <code>cowboy_req:inform/2,3</code> sends an
- informational response.
-</p>
+<li>The function <code>cowboy_req:inform/2,3</code> sends an informational response.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_bugs_fixed">Bugs fixed</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-Ensure HTTP/2 connections are not closed prematurely
- when the user code does not read the request body.
-</p>
+<ul><li>Ensure HTTP/2 connections are not closed prematurely when the user code does not read the request body.
</li>
-<li>
-<p>
-Ensure HTTP/1.1 streams are not terminated too early.
- Their behavior is now consistent with the HTTP/2 code
- where the stream handler is only terminated when the
- <code>stop</code> command is returned.
-</p>
+<li>Ensure HTTP/1.1 streams are not terminated too early. Their behavior is now consistent with the HTTP/2 code where the stream handler is only terminated when the <code>stop</code> command is returned.
</li>
-<li>
-<p>
-Sending zero-sized data from stream handlers or from
- <code>cowboy_req:stream_body/3</code> could lead to issues with
- HTTP/1.1. This has been fixed.
-</p>
+<li>Sending zero-sized data from stream handlers or from <code>cowboy_req:stream_body/3</code> could lead to issues with HTTP/1.1. This has been fixed.
</li>
-<li>
-<p>
-The final chunk sent by Cowboy when it terminates a
- chunked body after the handler process exits was not
- passed through stream handlers, which could lead to
- issues when <code>cowboy_compress_h</code> was being used. This
- is now corrected.
-</p>
+<li>The final chunk sent by Cowboy when it terminates a chunked body after the handler process exits was not passed through stream handlers, which could lead to issues when <code>cowboy_compress_h</code> was being used. This is now corrected.
</li>
-<li>
-<p>
-The stream handler state was discarded in some cases
- where Cowboy had to send a response or response data
- automatically when ending a stream. This has now
- been corrected.
-</p>
+<li>The stream handler state was discarded in some cases where Cowboy had to send a response or response data automatically when ending a stream. This has now been corrected.
</li>
-<li>
-<p>
-The stream handler callback <code>terminate/3</code> will now be
- called when switching to another protocol using the
- command <code>switch_protocol</code>. This doesn&#8217;t apply when
- doing upgrades to HTTP/2 as those occur before the
- stream is initialized.
-</p>
+<li>The stream handler callback <code>terminate/3</code> will now be called when switching to another protocol using the command <code>switch_protocol</code>. This doesn&apos;t apply when doing upgrades to HTTP/2 as those occur before the stream is initialized.
</li>
-<li>
-<p>
-Cowlib has been updated to 2.0.1 to fix an issue with
- Websocket compression when using Erlang/OTP 20.1. Note
- that at the time of writing all 20.1 versions (from
- 20.1 to 20.1.4) have issues when compression is enabled.
- It is expected to work properly from 20.1.5 onward. In
- the meantime it is recommended to run the plain 20.1
- release and disable Websocket compression, or use a
- release before 20.1.
-</p>
+<li>Cowlib has been updated to 2.0.1 to fix an issue with Websocket compression when using Erlang/OTP 20.1. Note that at the time of writing all 20.1 versions (from 20.1 to 20.1.4) have issues when compression is enabled. It is expected to work properly from 20.1.5 onward. In the meantime it is recommended to run the plain 20.1 release and disable Websocket compression, or use a release before 20.1.
</li>
-<li>
-<p>
-Cowboy will no longer crash when the <code>cowboy_clock</code>
- process is not running. This can happen when Cowboy
- is being restarted during upgrades, for example.
-</p>
+<li>Cowboy will no longer crash when the <code>cowboy_clock</code> process is not running. This can happen when Cowboy is being restarted during upgrades, for example.
</li>
-</ul></div>
-</div>
-</div>
+</ul>
+
diff --git a/docs/en/cowboy/2.1/guide/modern_web/index.html b/docs/en/cowboy/2.1/guide/modern_web/index.html
index 3c793fb7..4f31995c 100644
--- a/docs/en/cowboy/2.1/guide/modern_web/index.html
+++ b/docs/en/cowboy/2.1/guide/modern_web/index.html
@@ -62,115 +62,38 @@
<h1 class="lined-header"><span>The modern Web</span></h1>
-<div class="paragraph"><p>Cowboy is a server for the modern Web. This chapter explains
-what it means and details all the standards involved.</p></div>
-<div class="paragraph"><p>Cowboy supports all the standards listed in this document.</p></div>
-<div class="sect1">
+<p>Cowboy is a server for the modern Web. This chapter explains what it means and details all the standards involved.</p>
+<p>Cowboy supports all the standards listed in this document.</p>
<h2 id="_http_2">HTTP/2</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>HTTP/2 is the most efficient protocol for consuming Web
-services. It enables clients to keep a connection open
-for long periods of time; to send requests concurrently;
-to reduce the size of requests through HTTP headers
-compression; and more. The protocol is binary, greatly
-reducing the resources needed to parse it.</p></div>
-<div class="paragraph"><p>HTTP/2 also enables the server to push messages to the
-client. This can be used for various purposes, including
-the sending of related resources before the client requests
-them, in an effort to reduce latency. This can also be used
-to enable bidirectional communication.</p></div>
-<div class="paragraph"><p>Cowboy provides transparent support for HTTP/2. Clients
-that know it can use it; others fall back to HTTP/1.1
-automatically.</p></div>
-<div class="paragraph"><p>HTTP/2 is compatible with the HTTP/1.1 semantics.</p></div>
-<div class="paragraph"><p>HTTP/2 is defined by RFC 7540 and RFC 7541.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>HTTP/2 is the most efficient protocol for consuming Web services. It enables clients to keep a connection open for long periods of time; to send requests concurrently; to reduce the size of requests through HTTP headers compression; and more. The protocol is binary, greatly reducing the resources needed to parse it.</p>
+<p>HTTP/2 also enables the server to push messages to the client. This can be used for various purposes, including the sending of related resources before the client requests them, in an effort to reduce latency. This can also be used to enable bidirectional communication.</p>
+<p>Cowboy provides transparent support for HTTP/2. Clients that know it can use it; others fall back to HTTP/1.1 automatically.</p>
+<p>HTTP/2 is compatible with the HTTP/1.1 semantics.</p>
+<p>HTTP/2 is defined by RFC 7540 and RFC 7541.</p>
<h2 id="_http_1_1">HTTP/1.1</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>HTTP/1.1 is the previous version of the HTTP protocol.
-The protocol itself is text-based and suffers from numerous
-issues and limitations. In particular it is not possible
-to execute requests concurrently (though pipelining is
-sometimes possible), and it&#8217;s also sometimes difficult
-to detect that a client disconnected.</p></div>
-<div class="paragraph"><p>HTTP/1.1 does provide very good semantics for interacting
-with Web services. It defines the standard methods, headers
-and status codes used by HTTP/1.1 and HTTP/2 clients and
-servers.</p></div>
-<div class="paragraph"><p>HTTP/1.1 also defines compatibility with an older version
-of the protocol, HTTP/1.0, which was never really standardized
-across implementations.</p></div>
-<div class="paragraph"><p>The core of HTTP/1.1 is defined by RFC 7230, RFC 7231,
-RFC 7232, RFC 7233, RFC 7234 and RFC 7235. Numerous RFCs
-and other specifications exist defining additional HTTP
-methods, status codes, headers or semantics.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>HTTP/1.1 is the previous version of the HTTP protocol. The protocol itself is text-based and suffers from numerous issues and limitations. In particular it is not possible to execute requests concurrently (though pipelining is sometimes possible), and it&apos;s also sometimes difficult to detect that a client disconnected.</p>
+<p>HTTP/1.1 does provide very good semantics for interacting with Web services. It defines the standard methods, headers and status codes used by HTTP/1.1 and HTTP/2 clients and servers.</p>
+<p>HTTP/1.1 also defines compatibility with an older version of the protocol, HTTP/1.0, which was never really standardized across implementations.</p>
+<p>The core of HTTP/1.1 is defined by RFC 7230, RFC 7231, RFC 7232, RFC 7233, RFC 7234 and RFC 7235. Numerous RFCs and other specifications exist defining additional HTTP methods, status codes, headers or semantics.</p>
<h2 id="_websocket">Websocket</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../ws_protocol">Websocket</a> is a protocol built on top of HTTP/1.1
-that provides a two-ways communication channel between the client and
-the server. Communication is asynchronous and can occur concurrently.</p></div>
-<div class="paragraph"><p>It consists of a Javascript object allowing setting up a
-Websocket connection to the server, and a binary based
-protocol for sending data to the server or the client.</p></div>
-<div class="paragraph"><p>Websocket connections can transfer either UTF-8 encoded text
-data or binary data. The protocol also includes support for
-implementing a ping/pong mechanism, allowing the server and
-the client to have more confidence that the connection is still
-alive.</p></div>
-<div class="paragraph"><p>A Websocket connection can be used to transfer any kind of data,
-small or big, text or binary. Because of this Websocket is
-sometimes used for communication between systems.</p></div>
-<div class="paragraph"><p>Websocket messages have no semantics on their own. Websocket
-is closer to TCP in that aspect, and requires you to design
-and implement your own protocol on top of it; or adapt an
-existing protocol to Websocket.</p></div>
-<div class="paragraph"><p>Cowboy provides an interface known as <a href="../ws_handlers">Websocket handlers</a>
-that gives complete control over a Websocket connection.</p></div>
-<div class="paragraph"><p>The Websocket protocol is defined by RFC 6455.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p><a href="../ws_protocol">Websocket</a> is a protocol built on top of HTTP/1.1 that provides a two-ways communication channel between the client and the server. Communication is asynchronous and can occur concurrently.</p>
+<p>It consists of a Javascript object allowing setting up a Websocket connection to the server, and a binary based protocol for sending data to the server or the client.</p>
+<p>Websocket connections can transfer either UTF-8 encoded text data or binary data. The protocol also includes support for implementing a ping/pong mechanism, allowing the server and the client to have more confidence that the connection is still alive.</p>
+<p>A Websocket connection can be used to transfer any kind of data, small or big, text or binary. Because of this Websocket is sometimes used for communication between systems.</p>
+<p>Websocket messages have no semantics on their own. Websocket is closer to TCP in that aspect, and requires you to design and implement your own protocol on top of it; or adapt an existing protocol to Websocket.</p>
+<p>Cowboy provides an interface known as <a href="../ws_handlers">Websocket handlers</a> that gives complete control over a Websocket connection.</p>
+<p>The Websocket protocol is defined by RFC 6455.</p>
<h2 id="_long_lived_requests">Long-lived requests</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy provides an interface that can be used to support
-long-polling or to stream large amounts of data reliably,
-including using Server-Sent Events.</p></div>
-<div class="paragraph"><p>Long-polling is a mechanism in which the client performs
-a request which may not be immediately answered by the
-server. It allows clients to request resources that may
-not currently exist, but are expected to be created soon,
-and which will be returned as soon as they are.</p></div>
-<div class="paragraph"><p>Long-polling is essentially a hack, but it is widely used
-to overcome limitations on older clients and servers.</p></div>
-<div class="paragraph"><p>Server-Sent Events is a small protocol defined as a media
-type, <code>text/event-stream</code>, along with a new HTTP header,
-<code>Last-Event-ID</code>. It is defined in the EventSource W3C
-specification.</p></div>
-<div class="paragraph"><p>Cowboy provides an interface known as <a href="../loop_handlers">loop handlers</a>
-that facilitates the implementation of long-polling or stream
-mechanisms. It works regardless of the underlying protocol.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Cowboy provides an interface that can be used to support long-polling or to stream large amounts of data reliably, including using Server-Sent Events.</p>
+<p>Long-polling is a mechanism in which the client performs a request which may not be immediately answered by the server. It allows clients to request resources that may not currently exist, but are expected to be created soon, and which will be returned as soon as they are.</p>
+<p>Long-polling is essentially a hack, but it is widely used to overcome limitations on older clients and servers.</p>
+<p>Server-Sent Events is a small protocol defined as a media type, <code>text/event-stream</code>, along with a new HTTP header, <code>Last-Event-ID</code>. It is defined in the EventSource W3C specification.</p>
+<p>Cowboy provides an interface known as <a href="../loop_handlers">loop handlers</a> that facilitates the implementation of long-polling or stream mechanisms. It works regardless of the underlying protocol.</p>
<h2 id="_rest">REST</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../rest_principles">REST, or REpresentational State Transfer</a>,
-is a style of architecture for loosely connected distributed
-systems. It can easily be implemented on top of HTTP.</p></div>
-<div class="paragraph"><p>REST is essentially a set of constraints to be followed.
-Many of these constraints are purely architectural and
-solved by simply using HTTP. Some constraints must be
-explicitly followed by the developer.</p></div>
-<div class="paragraph"><p>Cowboy provides an interface known as <a href="../rest_handlers">REST handlers</a>
-that simplifies the implementation of a REST API on top of
-the HTTP protocol.</p></div>
-</div>
-</div>
+<p><a href="../rest_principles">REST, or REpresentational State Transfer</a>, is a style of architecture for loosely connected distributed systems. It can easily be implemented on top of HTTP.</p>
+<p>REST is essentially a set of constraints to be followed. Many of these constraints are purely architectural and solved by simply using HTTP. Some constraints must be explicitly followed by the developer.</p>
+<p>Cowboy provides an interface known as <a href="../rest_handlers">REST handlers</a> that simplifies the implementation of a REST API on top of the HTTP protocol.</p>
+
diff --git a/docs/en/cowboy/2.1/guide/multipart/index.html b/docs/en/cowboy/2.1/guide/multipart/index.html
index ddc9f4ef..ee825e25 100644
--- a/docs/en/cowboy/2.1/guide/multipart/index.html
+++ b/docs/en/cowboy/2.1/guide/multipart/index.html
@@ -62,169 +62,107 @@
<h1 class="lined-header"><span>Multipart requests</span></h1>
-<div class="paragraph"><p>Multipart originates from MIME, an Internet standard that
-extends the format of emails.</p></div>
-<div class="paragraph"><p>A multipart message is a list of parts. A part contains
-headers and a body. The body of the parts may be
-of any media type, and contain text or binary data.
-It is possible for parts to contain a multipart media
-type.</p></div>
-<div class="paragraph"><p>In the context of HTTP, multipart is most often used
-with the <code>multipart/form-data</code> media type. It is what
-browsers use to upload files through HTML forms.</p></div>
-<div class="paragraph"><p>The <code>multipart/byteranges</code> is also common. It is the
-media type used to send arbitrary bytes from a resource,
-enabling clients to resume downloads.</p></div>
-<div class="sect1">
+<p>Multipart originates from MIME, an Internet standard that extends the format of emails.</p>
+<p>A multipart message is a list of parts. A part contains headers and a body. The body of the parts may be of any media type, and contain text or binary data. It is possible for parts to contain a multipart media type.</p>
+<p>In the context of HTTP, multipart is most often used with the <code>multipart/form-data</code> media type. It is what browsers use to upload files through HTML forms.</p>
+<p>The <code>multipart/byteranges</code> is also common. It is the media type used to send arbitrary bytes from a resource, enabling clients to resume downloads.</p>
<h2 id="_form_data">Form-data</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>In the normal case, when a form is submitted, the
-browser will use the <code>application/x-www-form-urlencoded</code>
-content-type. This type is just a list of keys and
-values and is therefore not fit for uploading files.</p></div>
-<div class="paragraph"><p>That&#8217;s where the <code>multipart/form-data</code> content-type
-comes in. When the form is configured to use this
-content-type, the browser will create a multipart
-message where each part corresponds to a field on
-the form. For files, it also adds some metadata in
-the part headers, like the file name.</p></div>
-<div class="paragraph"><p>A form with a text input, a file input and a select
-choice box will result in a multipart message with
-three parts, one for each field.</p></div>
-<div class="paragraph"><p>The browser does its best to determine the media type
-of the files it sends this way, but you should not
-rely on it for determining the contents of the file.
-Proper investigation of the contents is recommended.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>In the normal case, when a form is submitted, the browser will use the <code>application/x-www-form-urlencoded</code> content-type. This type is just a list of keys and values and is therefore not fit for uploading files.</p>
+<p>That&apos;s where the <code>multipart/form-data</code> content-type comes in. When the form is configured to use this content-type, the browser will create a multipart message where each part corresponds to a field on the form. For files, it also adds some metadata in the part headers, like the file name.</p>
+<p>A form with a text input, a file input and a select choice box will result in a multipart message with three parts, one for each field.</p>
+<p>The browser does its best to determine the media type of the files it sends this way, but you should not rely on it for determining the contents of the file. Proper investigation of the contents is recommended.</p>
<h2 id="_checking_for_multipart_messages">Checking for multipart messages</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The content-type header indicates the presence of
-a multipart message:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The content-type header indicates the presence of a multipart message:</p>
+<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">&lt;&lt;</span><span style="color: #FF0000">"multipart"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"form-data"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">_</span>}
- <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:parse_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#990000">&lt;&lt;</font><font color="#FF0000">"multipart"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"form-data"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">_</font>}
+ <font color="#990000">=</font> <b><font color="#000000">cowboy_req:parse_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_reading_a_multipart_message">Reading a multipart message</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy provides two sets of functions for reading
-request bodies as multipart messages.</p></div>
-<div class="paragraph"><p>The <code>cowboy_req:read_part/1,2</code> functions return the
-next part&#8217;s headers, if any.</p></div>
-<div class="paragraph"><p>The <code>cowboy_req:read_part_body/1,2</code> functions return
-the current part&#8217;s body. For large bodies you may
-need to call the function multiple times.</p></div>
-<div class="paragraph"><p>To read a multipart message you need to iterate over
-all its parts:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Cowboy provides two sets of functions for reading request bodies as multipart messages.</p>
+<p>The <code>cowboy_req:read_part/1,2</code> functions return the next part&apos;s headers, if any.</p>
+<p>The <code>cowboy_req:read_part_body/1,2</code> functions return the current part&apos;s body. For large bodies you may need to call the function multiple times.</p>
+<p>To read a multipart message you need to iterate over all its parts:</p>
+<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">multipart</span></span>(<span style="color: #009900">Req0</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">cowboy_req:read_part</span></span>(<span style="color: #009900">Req0</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">_Headers</span>, <span style="color: #009900">Req1</span>} <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">_Body</span>, <span style="color: #009900">Req</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="font-weight: bold"><span style="color: #000000">multipart</span></span>(<span style="color: #009900">Req</span>);
- {<span style="color: #FF6600">done</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">-&gt;</span>
- <span style="color: #009900">Req</span>
- <span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>When part bodies are too large, Cowboy will return
-a <code>more</code> tuple, and allow you to loop until the part
-body has been fully read.</p></div>
-<div class="paragraph"><p>The function <code>cow_multipart:form_data/1</code> can be used
-to quickly obtain information about a part from a
-<code>multipart/form-data</code> message. The function returns
-a <code>data</code> or a <code>file</code> tuple depending on whether this
-is a normal field or a file being uploaded.</p></div>
-<div class="paragraph"><p>The following snippet will use this function and
-use different strategies depending on whether the
-part is a file:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">multipart</font></b>(<font color="#009900">Req0</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">case</font></b> <b><font color="#000000">cowboy_req:read_part</font></b>(<font color="#009900">Req0</font>) <b><font color="#0000FF">of</font></b>
+ {<font color="#FF6600">ok</font>, <font color="#009900">_Headers</font>, <font color="#009900">Req1</font>} <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <font color="#009900">_Body</font>, <font color="#009900">Req</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:read_part_body</font></b>(<font color="#009900">Req1</font>),
+ <b><font color="#000000">multipart</font></b>(<font color="#009900">Req</font>);
+ {<font color="#FF6600">done</font>, <font color="#009900">Req</font>} <font color="#990000">-&gt;</font>
+ <font color="#009900">Req</font>
+ <b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>When part bodies are too large, Cowboy will return a <code>more</code> tuple, and allow you to loop until the part body has been fully read.</p>
+<p>The function <code>cow_multipart:form_data/1</code> can be used to quickly obtain information about a part from a <code>multipart/form-data</code> message. The function returns a <code>data</code> or a <code>file</code> tuple depending on whether this is a normal field or a file being uploaded.</p>
+<p>The following snippet will use this function and use different strategies depending on whether the part is a file:</p>
+<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">multipart</span></span>(<span style="color: #009900">Req0</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">cowboy_req:read_part</span></span>(<span style="color: #009900">Req0</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Headers</span>, <span style="color: #009900">Req1</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: #0000FF">case</span></span> <span style="font-weight: bold"><span style="color: #000000">cow_multipart:form_data</span></span>(<span style="color: #009900">Headers</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
- {<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: #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>);
- {<span style="color: #FF6600">done</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">-&gt;</span>
- <span style="color: #009900">Req</span>
- <span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span>
-
-<span style="font-weight: bold"><span style="color: #000000">stream_file</span></span>(<span style="color: #009900">Req0</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">cowboy_req:read_part_body</span></span>(<span style="color: #009900">Req0</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">_LastBodyChunk</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">-&gt;</span>
- <span style="color: #009900">Req</span>;
- {<span style="color: #FF6600">more</span>, <span style="color: #009900">_BodyChunk</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #000000">stream_file</span></span>(<span style="color: #009900">Req</span>)
- <span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Both the part header and body reading functions can take
-options that will be given to the request body reading
-functions. By default, <code>cowboy_req:read_part/1</code> reads
-up to 64KB for up to 5 seconds. <code>cowboy_req:read_part_body/1</code>
-has the same defaults as <code>cowboy_req:read_body/1</code>.</p></div>
-<div class="paragraph"><p>To change the defaults for part headers:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">multipart</font></b>(<font color="#009900">Req0</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">case</font></b> <b><font color="#000000">cowboy_req:read_part</font></b>(<font color="#009900">Req0</font>) <b><font color="#0000FF">of</font></b>
+ {<font color="#FF6600">ok</font>, <font color="#009900">Headers</font>, <font color="#009900">Req1</font>} <font color="#990000">-&gt;</font>
+ <font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#0000FF">case</font></b> <b><font color="#000000">cow_multipart:form_data</font></b>(<font color="#009900">Headers</font>) <b><font color="#0000FF">of</font></b>
+ {<font color="#FF6600">data</font>, <font color="#009900">_FieldName</font>} <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <font color="#009900">_Body</font>, <font color="#009900">Req2</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:read_part_body</font></b>(<font color="#009900">Req1</font>),
+ <font color="#009900">Req2</font>;
+ {<font color="#FF6600">file</font>, <font color="#009900">_FieldName</font>, <font color="#009900">_Filename</font>, <font color="#009900">_CType</font>} <font color="#990000">-&gt;</font>
+ <b><font color="#000000">stream_file</font></b>(<font color="#009900">Req1</font>)
+ <b><font color="#0000FF">end</font></b>,
+ <b><font color="#000000">multipart</font></b>(<font color="#009900">Req</font>);
+ {<font color="#FF6600">done</font>, <font color="#009900">Req</font>} <font color="#990000">-&gt;</font>
+ <font color="#009900">Req</font>
+ <b><font color="#0000FF">end</font></b><font color="#990000">.</font>
+
+<b><font color="#000000">stream_file</font></b>(<font color="#009900">Req0</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">case</font></b> <b><font color="#000000">cowboy_req:read_part_body</font></b>(<font color="#009900">Req0</font>) <b><font color="#0000FF">of</font></b>
+ {<font color="#FF6600">ok</font>, <font color="#009900">_LastBodyChunk</font>, <font color="#009900">Req</font>} <font color="#990000">-&gt;</font>
+ <font color="#009900">Req</font>;
+ {<font color="#FF6600">more</font>, <font color="#009900">_BodyChunk</font>, <font color="#009900">Req</font>} <font color="#990000">-&gt;</font>
+ <b><font color="#000000">stream_file</font></b>(<font color="#009900">Req</font>)
+ <b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Both the part header and body reading functions can take options that will be given to the request body reading functions. By default, <code>cowboy_req:read_part/1</code> reads up to 64KB for up to 5 seconds. <code>cowboy_req:read_part_body/1</code> has the same defaults as <code>cowboy_req:read_body/1</code>.</p>
+<p>To change the defaults for part headers:</p>
+<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">cowboy_req:read_part</span></span>(<span style="color: #009900">Req</span>, #{<span style="font-weight: bold"><span style="color: #000080">length</span></span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">128000</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>And for part bodies:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">cowboy_req:read_part</font></b>(<font color="#009900">Req</font>, #{<b><font color="#000080">length</font></b> <font color="#990000">=&gt;</font> <font color="#993399">128000</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>And for part bodies:</p>
+<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">cowboy_req:read_part_body</span></span>(<span style="color: #009900">Req</span>, #{<span style="font-weight: bold"><span style="color: #000080">length</span></span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">1000000</span>, <span style="color: #0000FF">period</span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">7000</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">cowboy_req:read_part_body</font></b>(<font color="#009900">Req</font>, #{<b><font color="#000080">length</font></b> <font color="#990000">=&gt;</font> <font color="#993399">1000000</font>, <font color="#0000FF">period</font> <font color="#990000">=&gt;</font> <font color="#993399">7000</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_skipping_unwanted_parts">Skipping unwanted parts</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Part bodies do not have to be read. Cowboy will automatically
-skip it when you request the next part&#8217;s body.</p></div>
-<div class="paragraph"><p>The following snippet reads all part headers and skips
-all bodies:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Part bodies do not have to be read. Cowboy will automatically skip it when you request the next part&apos;s body.</p>
+<p>The following snippet reads all part headers and skips all bodies:</p>
+<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">multipart</span></span>(<span style="color: #009900">Req0</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">cowboy_req:read_part</span></span>(<span style="color: #009900">Req0</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">_Headers</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #000000">multipart</span></span>(<span style="color: #009900">Req</span>);
- {<span style="color: #FF6600">done</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">-&gt;</span>
- <span style="color: #009900">Req</span>
- <span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Similarly, if you start reading the body and it ends up
-being too big, you can simply continue with the next part.
-Cowboy will automatically skip what remains.</p></div>
-<div class="paragraph"><p>While Cowboy can skip part bodies automatically, the read
-rate is not configurable. Depending on your application
-you may want to skip manually, in particular if you observe
-poor performance while skipping.</p></div>
-<div class="paragraph"><p>You do not have to read all parts either. You can stop
-reading as soon as you find the data you need.</p></div>
-</div>
-</div>
+<pre><tt><b><font color="#000000">multipart</font></b>(<font color="#009900">Req0</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">case</font></b> <b><font color="#000000">cowboy_req:read_part</font></b>(<font color="#009900">Req0</font>) <b><font color="#0000FF">of</font></b>
+ {<font color="#FF6600">ok</font>, <font color="#009900">_Headers</font>, <font color="#009900">Req</font>} <font color="#990000">-&gt;</font>
+ <b><font color="#000000">multipart</font></b>(<font color="#009900">Req</font>);
+ {<font color="#FF6600">done</font>, <font color="#009900">Req</font>} <font color="#990000">-&gt;</font>
+ <font color="#009900">Req</font>
+ <b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Similarly, if you start reading the body and it ends up being too big, you can simply continue with the next part. Cowboy will automatically skip what remains.</p>
+<p>While Cowboy can skip part bodies automatically, the read rate is not configurable. Depending on your application you may want to skip manually, in particular if you observe poor performance while skipping.</p>
+<p>You do not have to read all parts either. You can stop reading as soon as you find the data you need.</p>
+<!-- @todo Cover the building of multipart messages.-->
+
diff --git a/docs/en/cowboy/2.1/guide/req/index.html b/docs/en/cowboy/2.1/guide/req/index.html
index 640eb075..7ecf8bc5 100644
--- a/docs/en/cowboy/2.1/guide/req/index.html
+++ b/docs/en/cowboy/2.1/guide/req/index.html
@@ -62,407 +62,283 @@
<h1 class="lined-header"><span>The Req object</span></h1>
-<div class="paragraph"><p>The Req object is a variable used for obtaining information
-about a request, read its body or send a response.</p></div>
-<div class="paragraph"><p>It is not really an object in the object-oriented sense.
-It is a simple map that can be directly accessed or
-used when calling functions from the <code>cowboy_req</code> module.</p></div>
-<div class="paragraph"><p>The Req object is the subject of a few different chapters.
-In this chapter we will learn about the Req object and
-look at how to retrieve information about the request.</p></div>
-<div class="sect1">
+<p>The Req object is a variable used for obtaining information about a request, read its body or send a response.</p>
+<p>It is not really an object in the object-oriented sense. It is a simple map that can be directly accessed or used when calling functions from the <code>cowboy_req</code> module.</p>
+<p>The Req object is the subject of a few different chapters. In this chapter we will learn about the Req object and look at how to retrieve information about the request.</p>
<h2 id="_direct_access">Direct access</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The Req map contains a number of fields which are documented
-and can be accessed directly. They are the fields that have
-a direct mapping to HTTP: the request <code>method</code>; the HTTP
-<code>version</code> used; the effective URI components <code>scheme</code>,
-<code>host</code>, <code>port</code>, <code>path</code> and <code>qs</code>; the request <code>headers</code>;
-and the connection <code>peer</code> address and port.</p></div>
-<div class="paragraph"><p>Note that the <code>version</code> field can be used to determine
-whether a connection is using HTTP/2.</p></div>
-<div class="paragraph"><p>To access a field, you can simply match in the function
-head. The following example sends a simple "Hello world!"
-response when the <code>method</code> is GET, and a 405 error
-otherwise.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The Req map contains a number of fields which are documented and can be accessed directly. They are the fields that have a direct mapping to HTTP: the request <code>method</code>; the HTTP <code>version</code> used; the effective URI components <code>scheme</code>, <code>host</code>, <code>port</code>, <code>path</code> and <code>qs</code>; the request <code>headers</code>; and the connection <code>peer</code> address and port.</p>
+<p>Note that the <code>version</code> field can be used to determine whether a connection is using HTTP/2.</p>
+<p>To access a field, you can simply match in the function head. The following example sends a simple &quot;Hello world!&quot; response when the <code>method</code> is GET, and a 405 error otherwise.</p>
+<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">init</span></span>(<span style="color: #009900">Req0</span><span style="color: #990000">=</span>#{<span style="color: #FF6600">method</span> <span style="color: #990000">:=</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"GET"</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">200</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/plain"</span><span style="color: #990000">&gt;&gt;</span>
- }, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Hello world!"</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">Req0</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">405</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"allow"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"GET"</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="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Any other field is internal and should not be accessed.
-They may change in future releases, including maintenance
-releases, without notice.</p></div>
-<div class="paragraph"><p>Modifying the Req object, while allowed, is not recommended
-unless strictly necessary. If adding new fields, make sure
-to namespace the field names so that no conflict can occur
-with future Cowboy updates or third party projects.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req0</font><font color="#990000">=</font>#{<font color="#FF6600">method</font> <font color="#990000">:=</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"GET"</font><font color="#990000">&gt;&gt;</font>}, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ <font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:reply</font></b>(<font color="#993399">200</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/plain"</font><font color="#990000">&gt;&gt;</font>
+ }, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"Hello world!"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req0</font>),
+ {<font color="#FF6600">ok</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>};
+<b><font color="#000000">init</font></b>(<font color="#009900">Req0</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ <font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:reply</font></b>(<font color="#993399">405</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"allow"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"GET"</font><font color="#990000">&gt;&gt;</font>
+ }, <font color="#009900">Req0</font>),
+ {<font color="#FF6600">ok</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Any other field is internal and should not be accessed. They may change in future releases, including maintenance releases, without notice.</p>
+<p>Modifying the Req object, while allowed, is not recommended unless strictly necessary. If adding new fields, make sure to namespace the field names so that no conflict can occur with future Cowboy updates or third party projects.</p>
+<!-- @todo There are currently no tests for direct access.-->
<h2 id="_introduction_to_the_cowboy_req_interface">Introduction to the cowboy_req interface</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Functions in the <code>cowboy_req</code> module provide access to
-the request information but also various operations that
-are common when dealing with HTTP requests.</p></div>
-<div class="paragraph"><p>All the functions that begin with a verb indicate an action.
-Other functions simply return the corresponding value
-(sometimes that value does need to be built, but the
-cost of the operation is equivalent to retrieving a value).</p></div>
-<div class="paragraph"><p>Some of the <code>cowboy_req</code> functions return an updated Req
-object. They are the read, reply, set and delete functions.
-While ignoring the returned Req will not cause incorrect
-behavior for some of them, it is highly recommended to
-always keep and use the last returned Req object. The
-manual for <code>cowboy_req</code> details these functions and what
-modifications are done to the Req object.</p></div>
-<div class="paragraph"><p>Some of the calls to <code>cowboy_req</code> have side effects. This
-is the case of the read and reply functions. Cowboy reads
-the request body or replies immediately when the function
-is called.</p></div>
-<div class="paragraph"><p>All functions will crash if something goes wrong. There
-is usually no need to catch these errors, Cowboy will
-send the appropriate 4xx or 5xx response depending on
-where the crash occurred.</p></div>
-</div>
-</div>
-<div class="sect1">
+<!-- @todo Link to cowboy_req manual-->
+<p>Functions in the <code>cowboy_req</code> module provide access to the request information but also various operations that are common when dealing with HTTP requests.</p>
+<p>All the functions that begin with a verb indicate an action. Other functions simply return the corresponding value (sometimes that value does need to be built, but the cost of the operation is equivalent to retrieving a value).</p>
+<p>Some of the <code>cowboy_req</code> functions return an updated Req object. They are the read, reply, set and delete functions. While ignoring the returned Req will not cause incorrect behavior for some of them, it is highly recommended to always keep and use the last returned Req object. The manual for <code>cowboy_req</code> details these functions and what modifications are done to the Req object.</p>
+<p>Some of the calls to <code>cowboy_req</code> have side effects. This is the case of the read and reply functions. Cowboy reads the request body or replies immediately when the function is called.</p>
+<p>All functions will crash if something goes wrong. There is usually no need to catch these errors, Cowboy will send the appropriate 4xx or 5xx response depending on where the crash occurred.</p>
<h2 id="_request_method">Request method</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The request method can be retrieved directly:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The request method can be retrieved directly:</p>
+<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 class="paragraph"><p>Or using a function:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>#{<font color="#FF6600">method</font> <font color="#990000">:=</font> <font color="#009900">Method</font>} <font color="#990000">=</font> <font color="#009900">Req</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Or using a function:</p>
+<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">Method</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="paragraph"><p>The method is a case sensitive binary string. Standard
-methods include GET, HEAD, OPTIONS, PATCH, POST, PUT
-or DELETE.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Method</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:method</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>The method is a case sensitive binary string. Standard methods include GET, HEAD, OPTIONS, PATCH, POST, PUT or DELETE.</p>
<h2 id="_http_version">HTTP version</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The HTTP version is informational. It does not indicate that
-the client implements the protocol well or fully.</p></div>
-<div class="paragraph"><p>There is typically no need to change behavior based on the
-HTTP version: Cowboy already does it for you.</p></div>
-<div class="paragraph"><p>It can be useful in some cases, though. For example, one may
-want to redirect HTTP/1.1 clients to use Websocket, while HTTP/2
-clients keep using HTTP/2.</p></div>
-<div class="paragraph"><p>The HTTP version can be retrieved directly:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The HTTP version is informational. It does not indicate that the client implements the protocol well or fully.</p>
+<p>There is typically no need to change behavior based on the HTTP version: Cowboy already does it for you.</p>
+<p>It can be useful in some cases, though. For example, one may want to redirect HTTP/1.1 clients to use Websocket, while HTTP/2 clients keep using HTTP/2.</p>
+<p>The HTTP version can be retrieved directly:</p>
+<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 class="paragraph"><p>Or using a function:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>#{<font color="#FF6600">version</font> <font color="#990000">:=</font> <font color="#009900">Version</font>} <font color="#990000">=</font> <font color="#009900">Req</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Or using a function:</p>
+<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">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 class="paragraph"><p>Cowboy defines the <code>'HTTP/1.0'</code>, <code>'HTTP/1.1'</code> and <code>'HTTP/2'</code>
-versions. Custom protocols can define their own values as
-atoms.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Version</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:version</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Cowboy defines the <code>&apos;HTTP/1.0&apos;</code>, <code>&apos;HTTP/1.1&apos;</code> and <code>&apos;HTTP/2&apos;</code> versions. Custom protocols can define their own values as atoms.</p>
<h2 id="_effective_request_uri">Effective request URI</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The scheme, host, port, path and query string components
-of the effective request URI can all be retrieved directly:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The scheme, host, port, path and query string components of the effective request URI can all be retrieved directly:</p>
+<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: #FF6600">host</span> <span style="color: #990000">:=</span> <span style="color: #009900">Host</span>,
- <span style="color: #FF6600">port</span> <span style="color: #990000">:=</span> <span style="color: #009900">Port</span>,
- <span style="color: #FF6600">path</span> <span style="color: #990000">:=</span> <span style="color: #009900">Path</span>,
- <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 class="paragraph"><p>Or using the related functions:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+ <font color="#FF6600">scheme</font> <font color="#990000">:=</font> <font color="#009900">Scheme</font>,
+ <font color="#FF6600">host</font> <font color="#990000">:=</font> <font color="#009900">Host</font>,
+ <font color="#FF6600">port</font> <font color="#990000">:=</font> <font color="#009900">Port</font>,
+ <font color="#FF6600">path</font> <font color="#990000">:=</font> <font color="#009900">Path</font>,
+ <font color="#FF6600">qs</font> <font color="#990000">:=</font> <font color="#009900">Qs</font>
+} <font color="#990000">=</font> <font color="#009900">Req</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Or using the related functions:</p>
+<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">Scheme</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:scheme</span></span>(<span style="color: #009900">Req</span>),
-<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: #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: #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>
-<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 class="paragraph"><p>The scheme and host are lowercased case insensitive binary
-strings. The port is an integer representing the port number.
-The path and query string are case sensitive binary strings.</p></div>
-<div class="paragraph"><p>Cowboy defines only the <code>&lt;&lt;"http"&gt;&gt;</code> and <code>&lt;&lt;"https"&gt;&gt;</code> schemes.
-They are chosen so that the scheme will only be <code>&lt;&lt;"https"&gt;&gt;</code>
-for requests on secure HTTP/1.1 or HTTP/2 connections.</p></div>
-<div class="paragraph"><p>The effective request URI itself can be reconstructed with
-the <code>cowboy_req:uri/1,2</code> function. By default, an absolute
-URI is returned:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Scheme</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:scheme</font></b>(<font color="#009900">Req</font>),
+<font color="#009900">Host</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:host</font></b>(<font color="#009900">Req</font>),
+<font color="#009900">Port</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:port</font></b>(<font color="#009900">Req</font>),
+<font color="#009900">Path</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:path</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font>
+<font color="#009900">Qs</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:qs</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>The scheme and host are lowercased case insensitive binary strings. The port is an integer representing the port number. The path and query string are case sensitive binary strings.</p>
+<p>Cowboy defines only the <code>&lt;&lt;&quot;http&quot;&gt;&gt;</code> and <code>&lt;&lt;&quot;https&quot;&gt;&gt;</code> schemes. They are chosen so that the scheme will only be <code>&lt;&lt;&quot;https&quot;&gt;&gt;</code> for requests on secure HTTP/1.1 or HTTP/2 connections.</p>
+<!-- @todo Is that tested well?-->
+<p>The effective request URI itself can be reconstructed with the <code>cowboy_req:uri/1,2</code> function. By default, an absolute URI is returned:</p>
+<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-style: italic"><span style="color: #9A1900">%% </span></span><span style="text-decoration: underline"><span style="color: #0000FF">scheme://host</span></span><span style="font-style: italic"><span style="color: #9A1900">[:port]/path[?qs]</span></span>
-<span style="color: #009900">URI</span> <span style="color: #990000">=</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 class="paragraph"><p>Options are available to either disable or replace some
-or all of the components. Various URIs or URI formats can
-be generated this way, including the origin form:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><i><font color="#9A1900">%% </font></i><u><font color="#0000FF">scheme://host</font></u><i><font color="#9A1900">[:port]/path[?qs]</font></i>
+<font color="#009900">URI</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:uri</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Options are available to either disable or replace some or all of the components. Various URIs or URI formats can be generated this way, including the origin form:</p>
+<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-style: italic"><span style="color: #9A1900">%% /path[?qs]</span></span>
-<span style="color: #009900">URI</span> <span style="color: #990000">=</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="paragraph"><p>The protocol relative form:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><i><font color="#9A1900">%% /path[?qs]</font></i>
+<font color="#009900">URI</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:uri</font></b>(<font color="#009900">Req</font>, #{<font color="#0000FF">host</font> <font color="#990000">=&gt;</font> <font color="#000080">undefined</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>The protocol relative form:</p>
+<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-style: italic"><span style="color: #9A1900">%% //host[:port]/path[?qs]</span></span>
-<span style="color: #009900">URI</span> <span style="color: #990000">=</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="paragraph"><p>The absolute URI without a query string:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><i><font color="#9A1900">%% //host[:port]/path[?qs]</font></i>
+<font color="#009900">URI</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:uri</font></b>(<font color="#009900">Req</font>, #{<font color="#0000FF">scheme</font> <font color="#990000">=&gt;</font> <font color="#000080">undefined</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>The absolute URI without a query string:</p>
+<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">URI</span> <span style="color: #990000">=</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">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="paragraph"><p>A different host:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">URI</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:uri</font></b>(<font color="#009900">Req</font>, #{<font color="#0000FF">qs</font> <font color="#990000">=&gt;</font> <font color="#000080">undefined</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>A different host:</p>
+<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">URI</span> <span style="color: #990000">=</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: #990000">&lt;&lt;</span><span style="color: #FF0000">"example.org"</span><span style="color: #990000">&gt;&gt;</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>And any other combination.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">URI</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:uri</font></b>(<font color="#009900">Req</font>, #{<font color="#0000FF">host</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"example.org"</font><font color="#990000">&gt;&gt;</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>And any other combination.</p>
<h2 id="_bindings">Bindings</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Bindings are the host and path components that you chose
-to extract when defining the routes of your application.
-They are only available after the routing.</p></div>
-<div class="paragraph"><p>Cowboy provides functions to retrieve one or all bindings.</p></div>
-<div class="paragraph"><p>To retrieve a single value:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Bindings are the host and path components that you chose to extract when defining the routes of your application. They are only available after the routing.</p>
+<p>Cowboy provides functions to retrieve one or all bindings.</p>
+<p>To retrieve a single value:</p>
+<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">Value</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:binding</span></span>(<span style="color: #FF6600">userid</span>, <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>When attempting to retrieve a value that was not bound,
-<code>undefined</code> will be returned. A different default value
-can be provided:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Value</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:binding</font></b>(<font color="#FF6600">userid</font>, <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>When attempting to retrieve a value that was not bound, <code>undefined</code> will be returned. A different default value can be provided:</p>
+<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">Value</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:binding</span></span>(<span style="color: #FF6600">userid</span>, <span style="color: #009900">Req</span>, <span style="color: #993399">42</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>To retrieve everything that was bound:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Value</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:binding</font></b>(<font color="#FF6600">userid</font>, <font color="#009900">Req</font>, <font color="#993399">42</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>To retrieve everything that was bound:</p>
+<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">Bindings</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:bindings</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>They are returned as a map, with keys being atoms.</p></div>
-<div class="paragraph"><p>The Cowboy router also allows you to capture many host
-or path segments at once using the <code>...</code> qualifier.</p></div>
-<div class="paragraph"><p>To retrieve the segments captured from the host name:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Bindings</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:bindings</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>They are returned as a map, with keys being atoms.</p>
+<p>The Cowboy router also allows you to capture many host or path segments at once using the <code>...</code> qualifier.</p>
+<p>To retrieve the segments captured from the host name:</p>
+<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">HostInfo</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:host_info</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>And the path segments:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">HostInfo</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:host_info</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>And the path segments:</p>
+<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">PathInfo</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:path_info</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Cowboy will return <code>undefined</code> if <code>...</code> was not used
-in the route.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">PathInfo</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:path_info</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Cowboy will return <code>undefined</code> if <code>...</code> was not used in the route.</p>
<h2 id="_query_parameters">Query parameters</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy provides two functions to access query parameters.
-You can use the first to get the entire list of parameters.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Cowboy provides two functions to access query parameters. You can use the first to get the entire list of parameters.</p>
+<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">QsVals</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:parse_qs</span></span>(<span style="color: #009900">Req</span>),
-{<span style="color: #990000">_</span>, <span style="color: #009900">Lang</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">lists:keyfind</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"lang"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #993399">1</span>, <span style="color: #009900">QsVals</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Cowboy will only parse the query string, and not do any
-transformation. This function may therefore return duplicates,
-or parameter names without an associated value. The order of
-the list returned is undefined.</p></div>
-<div class="paragraph"><p>When a query string is <code>key=1&amp;key=2</code>, the list returned will
-contain two parameters of name <code>key</code>.</p></div>
-<div class="paragraph"><p>The same is true when trying to use the PHP-style suffix <code>[]</code>.
-When a query string is <code>key[]=1&amp;key[]=2</code>, the list returned will
-contain two parameters of name <code>key[]</code>.</p></div>
-<div class="paragraph"><p>When a query string is simply <code>key</code>, Cowboy will return the
-list <code>[{&lt;&lt;"key"&gt;&gt;, true}]</code>, using <code>true</code> to indicate that the
-parameter <code>key</code> was defined, but with no value.</p></div>
-<div class="paragraph"><p>The second function Cowboy provides allows you to match out
-only the parameters you are interested in, and at the same
-time do any post processing you require using <a href="../constraints">constraints</a>.
-This function returns a map.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">QsVals</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:parse_qs</font></b>(<font color="#009900">Req</font>),
+{<font color="#990000">_</font>, <font color="#009900">Lang</font>} <font color="#990000">=</font> <b><font color="#000000">lists:keyfind</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"lang"</font><font color="#990000">&gt;&gt;</font>, <font color="#993399">1</font>, <font color="#009900">QsVals</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Cowboy will only parse the query string, and not do any transformation. This function may therefore return duplicates, or parameter names without an associated value. The order of the list returned is undefined.</p>
+<p>When a query string is <code>key=1&amp;key=2</code>, the list returned will contain two parameters of name <code>key</code>.</p>
+<p>The same is true when trying to use the PHP-style suffix <code>[]</code>. When a query string is <code>key[]=1&amp;key[]=2</code>, the list returned will contain two parameters of name <code>key[]</code>.</p>
+<p>When a query string is simply <code>key</code>, Cowboy will return the list <code>[{&lt;&lt;&quot;key&quot;&gt;&gt;, true}]</code>, using <code>true</code> to indicate that the parameter <code>key</code> was defined, but with no value.</p>
+<p>The second function Cowboy provides allows you to match out only the parameters you are interested in, and at the same time do any post processing you require using <a href="../constraints">constraints</a>. This function returns a map.</p>
+<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">id</span> <span style="color: #990000">:=</span> <span style="color: #009900">ID</span>, <span style="color: #FF6600">lang</span> <span style="color: #990000">:=</span> <span style="color: #009900">Lang</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:match_qs</span></span>([<span style="color: #FF6600">id</span>, <span style="color: #FF6600">lang</span>], <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Constraints can be applied automatically. The following
-snippet will crash when the <code>id</code> parameter is not an integer,
-or when the <code>lang</code> parameter is empty. At the same time, the
-value for <code>id</code> will be converted to an integer term:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>#{<font color="#FF6600">id</font> <font color="#990000">:=</font> <font color="#009900">ID</font>, <font color="#FF6600">lang</font> <font color="#990000">:=</font> <font color="#009900">Lang</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:match_qs</font></b>([<font color="#FF6600">id</font>, <font color="#FF6600">lang</font>], <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Constraints can be applied automatically. The following snippet will crash when the <code>id</code> parameter is not an integer, or when the <code>lang</code> parameter is empty. At the same time, the value for <code>id</code> will be converted to an integer term:</p>
+<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">QsMap</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:match_qs</span></span>([{<span style="color: #FF6600">id</span>, <span style="color: #FF6600">int</span>}, {<span style="color: #FF6600">lang</span>, <span style="color: #FF6600">nonempty</span>}], <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>A default value may also be provided. The default will be used
-if the <code>lang</code> key is not found. It will not be used if
-the key is found but has an empty value.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">QsMap</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:match_qs</font></b>([{<font color="#FF6600">id</font>, <font color="#FF6600">int</font>}, {<font color="#FF6600">lang</font>, <font color="#FF6600">nonempty</font>}], <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>A default value may also be provided. The default will be used if the <code>lang</code> key is not found. It will not be used if the key is found but has an empty value.</p>
+<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">lang</span> <span style="color: #990000">:=</span> <span style="color: #009900">Lang</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:match_qs</span></span>([{<span style="color: #FF6600">lang</span>, [], <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"en-US"</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="paragraph"><p>If no default is provided and the value is missing, the
-query string is deemed invalid and the process will crash.</p></div>
-<div class="paragraph"><p>When the query string is <code>key=1&amp;key=2</code>, the value for <code>key</code>
-will be the list <code>[1, 2]</code>. Parameter names do not need to
-include the PHP-style suffix. Constraints may be used to
-ensure that only one value was passed through.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>#{<font color="#FF6600">lang</font> <font color="#990000">:=</font> <font color="#009900">Lang</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:match_qs</font></b>([{<font color="#FF6600">lang</font>, [], <font color="#990000">&lt;&lt;</font><font color="#FF0000">"en-US"</font><font color="#990000">&gt;&gt;</font>}], <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>If no default is provided and the value is missing, the query string is deemed invalid and the process will crash.</p>
+<p>When the query string is <code>key=1&amp;key=2</code>, the value for <code>key</code> will be the list <code>[1, 2]</code>. Parameter names do not need to include the PHP-style suffix. Constraints may be used to ensure that only one value was passed through.</p>
<h2 id="_headers">Headers</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Header values can be retrieved either as a binary string
-or parsed into a more meaningful representation.</p></div>
-<div class="paragraph"><p>The get the raw value:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Header values can be retrieved either as a binary string or parsed into a more meaningful representation.</p>
+<p>The get the raw value:</p>
+<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">HeaderVal</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-type"</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="paragraph"><p>Cowboy expects all header names to be provided as lowercase
-binary strings. This is true for both requests and responses,
-regardless of the underlying protocol.</p></div>
-<div class="paragraph"><p>When the header is missing from the request, <code>undefined</code>
-will be returned. A different default can be provided:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">HeaderVal</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Cowboy expects all header names to be provided as lowercase binary strings. This is true for both requests and responses, regardless of the underlying protocol.</p>
+<p>When the header is missing from the request, <code>undefined</code> will be returned. A different default can be provided:</p>
+<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">HeaderVal</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-type"</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">"text/plain"</span><span style="color: #990000">&gt;&gt;</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>All headers can be retrieved at once, either directly:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">HeaderVal</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/plain"</font><font color="#990000">&gt;&gt;</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>All headers can be retrieved at once, either directly:</p>
+<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">AllHeaders</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>Or using a function:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>#{<font color="#FF6600">headers</font> <font color="#990000">:=</font> <font color="#009900">AllHeaders</font>} <font color="#990000">=</font> <font color="#009900">Req</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Or using a function:</p>
+<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">AllHeaders</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 class="paragraph"><p>Cowboy provides equivalent functions to parse individual
-headers. There is no function to parse all headers at once.</p></div>
-<div class="paragraph"><p>To parse a specific header:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">AllHeaders</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:headers</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Cowboy provides equivalent functions to parse individual headers. There is no function to parse all headers at once.</p>
+<p>To parse a specific header:</p>
+<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">ParsedVal</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:parse_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</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="paragraph"><p>An exception will be thrown if it doesn&#8217;t know how to parse the
-given header, or if the value is invalid. The list of known headers
-and default values can be found in the manual.</p></div>
-<div class="paragraph"><p>When the header is missing, <code>undefined</code> is returned. You can
-change the default value. Note that it should be the parsed value
-directly:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">ParsedVal</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:parse_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>An exception will be thrown if it doesn&apos;t know how to parse the given header, or if the value is invalid. The list of known headers and default values can be found in the manual.</p>
+<p>When the header is missing, <code>undefined</code> is returned. You can change the default value. Note that it should be the parsed value directly:</p>
+<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">ParsedVal</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:parse_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</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">"text"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"plain"</span><span style="color: #990000">&gt;&gt;</span>, []})<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">ParsedVal</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:parse_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>,
+ {<font color="#990000">&lt;&lt;</font><font color="#FF0000">"text"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"plain"</font><font color="#990000">&gt;&gt;</font>, []})<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_peer">Peer</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The peer address and port number for the connection can be
-retrieved either directly or using a function.</p></div>
-<div class="paragraph"><p>To retrieve the peer directly:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The peer address and port number for the connection can be retrieved either directly or using a function.</p>
+<p>To retrieve the peer directly:</p>
+<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 class="paragraph"><p>And using a function:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>#{<font color="#FF6600">peer</font> <font color="#990000">:=</font> {<font color="#009900">IP</font>, <font color="#009900">Port</font>}} <font color="#990000">=</font> <font color="#009900">Req</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>And using a function:</p>
+<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">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 class="paragraph"><p>Note that the peer corresponds to the remote end of the
-connection to the server, which may or may not be the
-client itself. It may also be a proxy or a gateway.</p></div>
-</div>
-</div>
+<pre><tt>{<font color="#009900">IP</font>, <font color="#009900">Port</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:peer</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Note that the peer corresponds to the remote end of the connection to the server, which may or may not be the client itself. It may also be a proxy or a gateway.</p>
+
diff --git a/docs/en/cowboy/2.1/guide/req_body/index.html b/docs/en/cowboy/2.1/guide/req_body/index.html
index 6589675c..f9dca81e 100644
--- a/docs/en/cowboy/2.1/guide/req_body/index.html
+++ b/docs/en/cowboy/2.1/guide/req_body/index.html
@@ -62,144 +62,93 @@
<h1 class="lined-header"><span>Reading the request body</span></h1>
-<div class="paragraph"><p>The request body can be read using the Req object.</p></div>
-<div class="paragraph"><p>Cowboy will not attempt to read the body until requested.
-You need to call the body reading functions in order to
-retrieve it.</p></div>
-<div class="paragraph"><p>Cowboy will not cache the body, it is therefore only
-possible to read it once.</p></div>
-<div class="paragraph"><p>You are not required to read it, however. If a body is
-present and was not read, Cowboy will either cancel or
-skip its download, depending on the protocol.</p></div>
-<div class="paragraph"><p>Cowboy provides functions for reading the body raw,
-and read and parse form urlencoded or <a href="../multipart">multipart bodies</a>.
-The latter is covered in its own chapter.</p></div>
-<div class="sect1">
+<p>The request body can be read using the Req object.</p>
+<p>Cowboy will not attempt to read the body until requested. You need to call the body reading functions in order to retrieve it.</p>
+<p>Cowboy will not cache the body, it is therefore only possible to read it once.</p>
+<p>You are not required to read it, however. If a body is present and was not read, Cowboy will either cancel or skip its download, depending on the protocol.</p>
+<p>Cowboy provides functions for reading the body raw, and read and parse form urlencoded or <a href="../multipart">multipart bodies</a>. The latter is covered in its own chapter.</p>
<h2 id="_request_body_presence">Request body presence</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Not all requests come with a body. You can check for
-the presence of a request body with this function:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Not all requests come with a body. You can check for the presence of a request body with this function:</p>
+<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">cowboy_req:has_body</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>It returns <code>true</code> if there is a body; <code>false</code> otherwise.</p></div>
-<div class="paragraph"><p>In practice, this function is rarely used. When the
-method is <code>POST</code>, <code>PUT</code> or <code>PATCH</code>, the request body
-is often required by the application, which should
-just attempt to read it directly.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">cowboy_req:has_body</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>It returns <code>true</code> if there is a body; <code>false</code> otherwise.</p>
+<p>In practice, this function is rarely used. When the method is <code>POST</code>, <code>PUT</code> or <code>PATCH</code>, the request body is often required by the application, which should just attempt to read it directly.</p>
<h2 id="_request_body_length">Request body length</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>You can obtain the length of the body:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>You can obtain the length of the body:</p>
+<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">Length</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:body_length</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Note that the length may not be known in advance. In
-that case <code>undefined</code> will be returned. This can happen
-with HTTP/1.1&#8217;s chunked transfer-encoding, or HTTP/2
-when no content-length was provided.</p></div>
-<div class="paragraph"><p>Cowboy will update the body length in the Req object
-once the body has been read completely. A length will
-always be returned when attempting to call this function
-after reading the body completely.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Length</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:body_length</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Note that the length may not be known in advance. In that case <code>undefined</code> will be returned. This can happen with HTTP/1.1&apos;s chunked transfer-encoding, or HTTP/2 when no content-length was provided.</p>
+<p>Cowboy will update the body length in the Req object once the body has been read completely. A length will always be returned when attempting to call this function after reading the body completely.</p>
<h2 id="_reading_the_body">Reading the body</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>You can read the entire body with one function call:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>You can read the entire body with one function call:</p>
+<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">ok</span>, <span style="color: #009900">Data</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:read_body</span></span>(<span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Cowboy returns an <code>ok</code> tuple when the body has been
-read fully.</p></div>
-<div class="paragraph"><p>By default, Cowboy will attempt to read up to 8MB
-of data, for up to 15 seconds. The call will return
-once Cowboy has read at least 8MB of data, or at
-the end of the 15 seconds period.</p></div>
-<div class="paragraph"><p>These values can be customized. For example, to read
-only up to 1MB for up to 5 seconds:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#009900">Data</font>, <font color="#009900">Req</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:read_body</font></b>(<font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Cowboy returns an <code>ok</code> tuple when the body has been read fully.</p>
+<p>By default, Cowboy will attempt to read up to 8MB of data, for up to 15 seconds. The call will return once Cowboy has read at least 8MB of data, or at the end of the 15 seconds period.</p>
+<p>These values can be customized. For example, to read only up to 1MB for up to 5 seconds:</p>
+<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">ok</span>, <span style="color: #009900">Data</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:read_body</span></span>(<span style="color: #009900">Req0</span>,
- #{<span style="font-weight: bold"><span style="color: #000080">length</span></span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">1000000</span>, <span style="color: #0000FF">period</span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">5000</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>You may also disable the length limit:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#009900">Data</font>, <font color="#009900">Req</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:read_body</font></b>(<font color="#009900">Req0</font>,
+ #{<b><font color="#000080">length</font></b> <font color="#990000">=&gt;</font> <font color="#993399">1000000</font>, <font color="#0000FF">period</font> <font color="#990000">=&gt;</font> <font color="#993399">5000</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>You may also disable the length limit:</p>
+<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">ok</span>, <span style="color: #009900">Data</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:read_body</span></span>(<span style="color: #009900">Req0</span>, #{<span style="font-weight: bold"><span style="color: #000080">length</span></span> <span style="color: #990000">=&gt;</span> <span style="color: #FF6600">infinity</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>This makes the function wait 15 seconds and return with
-whatever arrived during that period. This is not
-recommended for public facing applications.</p></div>
-<div class="paragraph"><p>These two options can effectively be used to control
-the rate of transmission of the request body.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#009900">Data</font>, <font color="#009900">Req</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:read_body</font></b>(<font color="#009900">Req0</font>, #{<b><font color="#000080">length</font></b> <font color="#990000">=&gt;</font> <font color="#FF6600">infinity</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>This makes the function wait 15 seconds and return with whatever arrived during that period. This is not recommended for public facing applications.</p>
+<p>These two options can effectively be used to control the rate of transmission of the request body.</p>
<h2 id="_streaming_the_body">Streaming the body</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>When the body is too large, the first call will return
-a <code>more</code> tuple instead of <code>ok</code>. You can call the
-function again to read more of the body, reading
-it one chunk at a time.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>When the body is too large, the first call will return a <code>more</code> tuple instead of <code>ok</code>. You can call the function again to read more of the body, reading it one chunk at a time.</p>
+<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_to_console</span></span>(<span style="color: #009900">Req0</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">cowboy_req:read_body</span></span>(<span style="color: #009900">Req0</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Data</span>, <span style="color: #009900">Req</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"</span>, [<span style="color: #009900">Data</span>]),
- <span style="color: #009900">Req</span>;
- {<span style="color: #FF6600">more</span>, <span style="color: #009900">Data</span>, <span style="color: #009900">Req</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"</span>, [<span style="color: #009900">Data</span>]),
- <span style="font-weight: bold"><span style="color: #000000">read_body_to_console</span></span>(<span style="color: #009900">Req</span>)
- <span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>The <code>length</code> and <code>period</code> options can also be used.
-They need to be passed for every call.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">read_body_to_console</font></b>(<font color="#009900">Req0</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">case</font></b> <b><font color="#000000">cowboy_req:read_body</font></b>(<font color="#009900">Req0</font>) <b><font color="#0000FF">of</font></b>
+ {<font color="#FF6600">ok</font>, <font color="#009900">Data</font>, <font color="#009900">Req</font>} <font color="#990000">-&gt;</font>
+ <b><font color="#000000">io:format</font></b>(<font color="#FF0000">"~s"</font>, [<font color="#009900">Data</font>]),
+ <font color="#009900">Req</font>;
+ {<font color="#FF6600">more</font>, <font color="#009900">Data</font>, <font color="#009900">Req</font>} <font color="#990000">-&gt;</font>
+ <b><font color="#000000">io:format</font></b>(<font color="#FF0000">"~s"</font>, [<font color="#009900">Data</font>]),
+ <b><font color="#000000">read_body_to_console</font></b>(<font color="#009900">Req</font>)
+ <b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>The <code>length</code> and <code>period</code> options can also be used. They need to be passed for every call.</p>
<h2 id="_reading_a_form_urlencoded_body">Reading a form urlencoded body</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy provides a convenient function for reading and
-parsing bodies sent as application/x-www-form-urlencoded.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Cowboy provides a convenient function for reading and parsing bodies sent as application/x-www-form-urlencoded.</p>
+<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">ok</span>, <span style="color: #009900">KeyValues</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:read_urlencoded_body</span></span>(<span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>This function returns a list of key/values, exactly like
-the function <code>cowboy_req:parse_qs/1</code>.</p></div>
-<div class="paragraph"><p>The defaults for this function are different. Cowboy will
-read for up to 64KB and up to 5 seconds. They can be modified:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#009900">KeyValues</font>, <font color="#009900">Req</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:read_urlencoded_body</font></b>(<font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>This function returns a list of key/values, exactly like the function <code>cowboy_req:parse_qs/1</code>.</p>
+<p>The defaults for this function are different. Cowboy will read for up to 64KB and up to 5 seconds. They can be modified:</p>
+<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">ok</span>, <span style="color: #009900">KeyValues</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:read_urlencoded_body</span></span>(<span style="color: #009900">Req0</span>,
- #{<span style="font-weight: bold"><span style="color: #000080">length</span></span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">4096</span>, <span style="color: #0000FF">period</span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">3000</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#009900">KeyValues</font>, <font color="#009900">Req</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:read_urlencoded_body</font></b>(<font color="#009900">Req0</font>,
+ #{<b><font color="#000080">length</font></b> <font color="#990000">=&gt;</font> <font color="#993399">4096</font>, <font color="#0000FF">period</font> <font color="#990000">=&gt;</font> <font color="#993399">3000</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+
diff --git a/docs/en/cowboy/2.1/guide/resource_design/index.html b/docs/en/cowboy/2.1/guide/resource_design/index.html
index 6df3301e..5b13ead0 100644
--- a/docs/en/cowboy/2.1/guide/resource_design/index.html
+++ b/docs/en/cowboy/2.1/guide/resource_design/index.html
@@ -62,213 +62,66 @@
<h1 class="lined-header"><span>Designing a resource handler</span></h1>
-<div class="paragraph"><p>This chapter aims to provide you with a list of questions
-you must answer in order to write a good resource handler.
-It is meant to be usable as a step by step guide.</p></div>
-<div class="sect1">
+<p>This chapter aims to provide you with a list of questions you must answer in order to write a good resource handler. It is meant to be usable as a step by step guide.</p>
<h2 id="_the_service">The service</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Can the service become unavailable, and when it does, can
-we detect it? For example, database connectivity problems
-may be detected early. We may also have planned outages
-of all or parts of the system. Implement the
-<code>service_available</code> callback.</p></div>
-<div class="paragraph"><p>What HTTP methods does the service implement? Do we need
-more than the standard OPTIONS, HEAD, GET, PUT, POST,
-PATCH and DELETE? Are we not using one of those at all?
-Implement the <code>known_methods</code> callback.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Can the service become unavailable, and when it does, can we detect it? For example, database connectivity problems may be detected early. We may also have planned outages of all or parts of the system. Implement the <code>service_available</code> callback.</p>
+<p>What HTTP methods does the service implement? Do we need more than the standard OPTIONS, HEAD, GET, PUT, POST, PATCH and DELETE? Are we not using one of those at all? Implement the <code>known_methods</code> callback.</p>
<h2 id="_type_of_resource_handler">Type of resource handler</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Am I writing a handler for a collection of resources,
-or for a single resource?</p></div>
-<div class="paragraph"><p>The semantics for each of these are quite different.
-You should not mix collection and single resource in
-the same handler.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Am I writing a handler for a collection of resources, or for a single resource?</p>
+<p>The semantics for each of these are quite different. You should not mix collection and single resource in the same handler.</p>
<h2 id="_collection_handler">Collection handler</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Skip this section if you are not doing a collection.</p></div>
-<div class="paragraph"><p>Is the collection hardcoded or dynamic? For example,
-if you use the route <code>/users</code> for the collection of
-users then the collection is hardcoded; if you use
-<code>/forums/:category</code> for the collection of threads
-then it isn&#8217;t. When the collection is hardcoded you
-can safely assume the resource always exists.</p></div>
-<div class="paragraph"><p>What methods should I implement?</p></div>
-<div class="paragraph"><p>OPTIONS is used to get some information about the
-collection. It is recommended to allow it even if you
-do not implement it, as Cowboy has a default
-implementation built-in.</p></div>
-<div class="paragraph"><p>HEAD and GET are used to retrieve the collection.
-If you allow GET, also allow HEAD as there&#8217;s no extra
-work required to make it work.</p></div>
-<div class="paragraph"><p>POST is used to create a new resource inside the
-collection. Creating a resource by using POST on
-the collection is useful when resources may be
-created before knowing their URI, usually because
-parts of it are generated dynamically. A common
-case is some kind of auto incremented integer
-identifier.</p></div>
-<div class="paragraph"><p>The next methods are more rarely allowed.</p></div>
-<div class="paragraph"><p>PUT is used to create a new collection (when
-the collection isn&#8217;t hardcoded), or replace
-the entire collection.</p></div>
-<div class="paragraph"><p>DELETE is used to delete the entire collection.</p></div>
-<div class="paragraph"><p>PATCH is used to modify the collection using
-instructions given in the request body. A PATCH
-operation is atomic. The PATCH operation may
-be used for such things as reordering; adding,
-modifying or deleting parts of the collection.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Skip this section if you are not doing a collection.</p>
+<p>Is the collection hardcoded or dynamic? For example, if you use the route <code>/users</code> for the collection of users then the collection is hardcoded; if you use <code>/forums/:category</code> for the collection of threads then it isn&apos;t. When the collection is hardcoded you can safely assume the resource always exists.</p>
+<p>What methods should I implement?</p>
+<p>OPTIONS is used to get some information about the collection. It is recommended to allow it even if you do not implement it, as Cowboy has a default implementation built-in.</p>
+<p>HEAD and GET are used to retrieve the collection. If you allow GET, also allow HEAD as there&apos;s no extra work required to make it work.</p>
+<p>POST is used to create a new resource inside the collection. Creating a resource by using POST on the collection is useful when resources may be created before knowing their URI, usually because parts of it are generated dynamically. A common case is some kind of auto incremented integer identifier.</p>
+<p>The next methods are more rarely allowed.</p>
+<p>PUT is used to create a new collection (when the collection isn&apos;t hardcoded), or replace the entire collection.</p>
+<p>DELETE is used to delete the entire collection.</p>
+<p>PATCH is used to modify the collection using instructions given in the request body. A PATCH operation is atomic. The PATCH operation may be used for such things as reordering; adding, modifying or deleting parts of the collection.</p>
<h2 id="_single_resource_handler">Single resource handler</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Skip this section if you are doing a collection.</p></div>
-<div class="paragraph"><p>What methods should I implement?</p></div>
-<div class="paragraph"><p>OPTIONS is used to get some information about the
-resource. It is recommended to allow it even if you
-do not implement it, as Cowboy has a default
-implementation built-in.</p></div>
-<div class="paragraph"><p>HEAD and GET are used to retrieve the resource.
-If you allow GET, also allow HEAD as there&#8217;s no extra
-work required to make it work.</p></div>
-<div class="paragraph"><p>POST is used to update the resource.</p></div>
-<div class="paragraph"><p>PUT is used to create a new resource (when it doesn&#8217;t
-already exist) or replace the resource.</p></div>
-<div class="paragraph"><p>DELETE is used to delete the resource.</p></div>
-<div class="paragraph"><p>PATCH is used to modify the resource using
-instructions given in the request body. A PATCH
-operation is atomic. The PATCH operation may
-be used for adding, removing or modifying specific
-values in the resource.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Skip this section if you are doing a collection.</p>
+<p>What methods should I implement?</p>
+<p>OPTIONS is used to get some information about the resource. It is recommended to allow it even if you do not implement it, as Cowboy has a default implementation built-in.</p>
+<p>HEAD and GET are used to retrieve the resource. If you allow GET, also allow HEAD as there&apos;s no extra work required to make it work.</p>
+<p>POST is used to update the resource.</p>
+<p>PUT is used to create a new resource (when it doesn&apos;t already exist) or replace the resource.</p>
+<p>DELETE is used to delete the resource.</p>
+<p>PATCH is used to modify the resource using instructions given in the request body. A PATCH operation is atomic. The PATCH operation may be used for adding, removing or modifying specific values in the resource.</p>
<h2 id="_the_resource">The resource</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Following the above discussion, implement the
-<code>allowed_methods</code> callback.</p></div>
-<div class="paragraph"><p>Does the resource always exist? If it may not, implement
-the <code>resource_exists</code> callback.</p></div>
-<div class="paragraph"><p>Do I need to authenticate the client before they can
-access the resource? What authentication mechanisms
-should I provide? This may include form-based, token-based
-(in the URL or a cookie), HTTP basic, HTTP digest,
-SSL certificate or any other form of authentication.
-Implement the <code>is_authorized</code> callback.</p></div>
-<div class="paragraph"><p>Do I need fine-grained access control? How do I determine
-that they are authorized access? Handle that in your
-<code>is_authorized</code> callback.</p></div>
-<div class="paragraph"><p>Can access to a resource be forbidden regardless of access
-being authorized? A simple example of that is censorship
-of a resource. Implement the <code>forbidden</code> callback.</p></div>
-<div class="paragraph"><p>Are there any constraints on the length of the resource URI?
-For example, the URI may be used as a key in storage and may
-have a limit in length. Implement <code>uri_too_long</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Following the above discussion, implement the <code>allowed_methods</code> callback.</p>
+<p>Does the resource always exist? If it may not, implement the <code>resource_exists</code> callback.</p>
+<p>Do I need to authenticate the client before they can access the resource? What authentication mechanisms should I provide? This may include form-based, token-based (in the URL or a cookie), HTTP basic, HTTP digest, SSL certificate or any other form of authentication. Implement the <code>is_authorized</code> callback.</p>
+<p>Do I need fine-grained access control? How do I determine that they are authorized access? Handle that in your <code>is_authorized</code> callback.</p>
+<p>Can access to a resource be forbidden regardless of access being authorized? A simple example of that is censorship of a resource. Implement the <code>forbidden</code> callback.</p>
+<p>Are there any constraints on the length of the resource URI? For example, the URI may be used as a key in storage and may have a limit in length. Implement <code>uri_too_long</code>.</p>
<h2 id="_representations">Representations</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>What media types do I provide? If text based, what charsets
-are provided? What languages do I provide?</p></div>
-<div class="paragraph"><p>Implement the mandatory <code>content_types_provided</code>. Prefix
-the callbacks with <code>to_</code> for clarity. For example, <code>to_html</code>
-or <code>to_text</code>.</p></div>
-<div class="paragraph"><p>Implement the <code>languages_provided</code> or <code>charsets_provided</code>
-callbacks if applicable.</p></div>
-<div class="paragraph"><p>Is there any other header that may make the representation
-of the resource vary? Implement the <code>variances</code> callback.</p></div>
-<div class="paragraph"><p>Depending on your choices for caching content, you may
-want to implement one or more of the <code>generate_etag</code>,
-<code>last_modified</code> and <code>expires</code> callbacks.</p></div>
-<div class="paragraph"><p>Do I want the user or user agent to actively choose a
-representation available? Send a list of available
-representations in the response body and implement
-the <code>multiple_choices</code> callback.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>What media types do I provide? If text based, what charsets are provided? What languages do I provide?</p>
+<p>Implement the mandatory <code>content_types_provided</code>. Prefix the callbacks with <code>to_</code> for clarity. For example, <code>to_html</code> or <code>to_text</code>.</p>
+<p>Implement the <code>languages_provided</code> or <code>charsets_provided</code> callbacks if applicable.</p>
+<p>Is there any other header that may make the representation of the resource vary? Implement the <code>variances</code> callback.</p>
+<p>Depending on your choices for caching content, you may want to implement one or more of the <code>generate_etag</code>, <code>last_modified</code> and <code>expires</code> callbacks.</p>
+<p>Do I want the user or user agent to actively choose a representation available? Send a list of available representations in the response body and implement the <code>multiple_choices</code> callback.</p>
<h2 id="_redirections">Redirections</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Do I need to keep track of what resources were deleted?
-For example, you may have a mechanism where moving a
-resource leaves a redirect link to its new location.
-Implement the <code>previously_existed</code> callback.</p></div>
-<div class="paragraph"><p>Was the resource moved, and is the move temporary? If
-it is explicitly temporary, for example due to maintenance,
-implement the <code>moved_temporarily</code> callback. Otherwise,
-implement the <code>moved_permanently</code> callback.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Do I need to keep track of what resources were deleted? For example, you may have a mechanism where moving a resource leaves a redirect link to its new location. Implement the <code>previously_existed</code> callback.</p>
+<p>Was the resource moved, and is the move temporary? If it is explicitly temporary, for example due to maintenance, implement the <code>moved_temporarily</code> callback. Otherwise, implement the <code>moved_permanently</code> callback.</p>
<h2 id="_the_request">The request</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Do you need to read the query string? Individual headers?
-Implement <code>malformed_request</code> and do all the parsing and
-validation in this function. Note that the body should not
-be read at this point.</p></div>
-<div class="paragraph"><p>May there be a request body? Will I know its size?
-What&#8217;s the maximum size of the request body I&#8217;m willing
-to accept? Implement <code>valid_entity_length</code>.</p></div>
-<div class="paragraph"><p>Finally, take a look at the sections corresponding to the
-methods you are implementing.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Do you need to read the query string? Individual headers? Implement <code>malformed_request</code> and do all the parsing and validation in this function. Note that the body should not be read at this point.</p>
+<p>May there be a request body? Will I know its size? What&apos;s the maximum size of the request body I&apos;m willing to accept? Implement <code>valid_entity_length</code>.</p>
+<p>Finally, take a look at the sections corresponding to the methods you are implementing.</p>
<h2 id="_options_method">OPTIONS method</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy by default will send back a list of allowed methods.
-Do I need to add more information to the response? Implement
-the <code>options</code> method.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Cowboy by default will send back a list of allowed methods. Do I need to add more information to the response? Implement the <code>options</code> method.</p>
<h2 id="_get_and_head_methods">GET and HEAD methods</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>If you implement the methods GET and/or HEAD, you must
-implement one <code>ProvideResource</code> callback for each
-content-type returned by the <code>content_types_provided</code>
-callback.</p></div>
-</div>
-</div>
-<div class="sect1">
-<h2 id="_put_post_and_patch_methods">PUT, POST and PATCH methods</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>If you implement the methods PUT, POST and/or PATCH,
-you must implement the <code>content_types_accepted</code> callback,
-and one <code>AcceptCallback</code> callback for each content-type
-it returns. Prefix the <code>AcceptCallback</code> callback names
-with <code>from_</code> for clarity. For example, <code>from_html</code> or
-<code>from_json</code>.</p></div>
-<div class="paragraph"><p>Do we want to allow the POST method to create individual
-resources directly through their URI (like PUT)? Implement
-the <code>allow_missing_post</code> callback. It is recommended to
-explicitly use PUT in these cases instead.</p></div>
-<div class="paragraph"><p>May there be conflicts when using PUT to create or replace
-a resource? Do we want to make sure that two updates around
-the same time are not cancelling one another? Implement the
-<code>is_conflict</code> callback.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>If you implement the methods GET and/or HEAD, you must implement one <code>ProvideResource</code> callback for each content-type returned by the <code>content_types_provided</code> callback.</p>
+<h2 id="_put__post_and_patch_methods">PUT, POST and PATCH methods</h2>
+<p>If you implement the methods PUT, POST and/or PATCH, you must implement the <code>content_types_accepted</code> callback, and one <code>AcceptCallback</code> callback for each content-type it returns. Prefix the <code>AcceptCallback</code> callback names with <code>from_</code> for clarity. For example, <code>from_html</code> or <code>from_json</code>.</p>
+<p>Do we want to allow the POST method to create individual resources directly through their URI (like PUT)? Implement the <code>allow_missing_post</code> callback. It is recommended to explicitly use PUT in these cases instead.</p>
+<p>May there be conflicts when using PUT to create or replace a resource? Do we want to make sure that two updates around the same time are not cancelling one another? Implement the <code>is_conflict</code> callback.</p>
<h2 id="_delete_methods">DELETE methods</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>If you implement the method DELETE, you must implement
-the <code>delete_resource</code> callback.</p></div>
-<div class="paragraph"><p>When <code>delete_resource</code> returns, is the resource completely
-removed from the server, including from any caching service?
-If not, and/or if the deletion is asynchronous and we have
-no way of knowing it has been completed yet, implement the
-<code>delete_completed</code> callback.</p></div>
-</div>
-</div>
+<p>If you implement the method DELETE, you must implement the <code>delete_resource</code> callback.</p>
+<p>When <code>delete_resource</code> returns, is the resource completely removed from the server, including from any caching service? If not, and/or if the deletion is asynchronous and we have no way of knowing it has been completed yet, implement the <code>delete_completed</code> callback.</p>
+
diff --git a/docs/en/cowboy/2.1/guide/resp/index.html b/docs/en/cowboy/2.1/guide/resp/index.html
index 129e304b..e884cd91 100644
--- a/docs/en/cowboy/2.1/guide/resp/index.html
+++ b/docs/en/cowboy/2.1/guide/resp/index.html
@@ -62,346 +62,231 @@
<h1 class="lined-header"><span>Sending a response</span></h1>
-<div class="paragraph"><p>The response must be sent using the Req object.</p></div>
-<div class="paragraph"><p>Cowboy provides two different ways of sending responses:
-either directly or by streaming the body. Response headers
-and body may be set in advance. The response is sent as
-soon as one of the reply or stream reply function is
-called.</p></div>
-<div class="paragraph"><p>Cowboy also provides a simplified interface for sending
-files. It can also send only specific parts of a file.</p></div>
-<div class="paragraph"><p>While only one response is allowed for every request,
-HTTP/2 introduced a mechanism that allows the server
-to push additional resources related to the response.
-This chapter also describes how this feature works in
-Cowboy.</p></div>
-<div class="sect1">
+<p>The response must be sent using the Req object.</p>
+<p>Cowboy provides two different ways of sending responses: either directly or by streaming the body. Response headers and body may be set in advance. The response is sent as soon as one of the reply or stream reply function is called.</p>
+<p>Cowboy also provides a simplified interface for sending files. It can also send only specific parts of a file.</p>
+<p>While only one response is allowed for every request, HTTP/2 introduced a mechanism that allows the server to push additional resources related to the response. This chapter also describes how this feature works in Cowboy.</p>
<h2 id="_reply">Reply</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy provides three functions for sending the entire reply,
-depending on whether you need to set headers and body. In all
-cases, Cowboy will add any headers required by the protocol
-(for example the date header will always be sent).</p></div>
-<div class="paragraph"><p>When you need to set only the status code,
-use <code>cowboy_req:reply/2</code>:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Cowboy provides three functions for sending the entire reply, depending on whether you need to set headers and body. In all cases, Cowboy will add any headers required by the protocol (for example the date header will always be sent).</p>
+<p>When you need to set only the status code, use <code>cowboy_req:reply/2</code>:</p>
+<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">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">200</span>, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>When you need to set response headers at the same time,
-use <code>cowboy_req:reply/3</code>:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:reply</font></b>(<font color="#993399">200</font>, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>When you need to set response headers at the same time, use <code>cowboy_req:reply/3</code>:</p>
+<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">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">303</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="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"https://ninenines.eu"</span><span style="color: #990000">&gt;&gt;</span>
-}, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Note that the header name must always be a lowercase
-binary.</p></div>
-<div class="paragraph"><p>When you also need to set the response body,
-use <code>cowboy_req:reply/4</code>:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:reply</font></b>(<font color="#993399">303</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"location"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"https://ninenines.eu"</font><font color="#990000">&gt;&gt;</font>
+}, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Note that the header name must always be a lowercase binary.</p>
+<p>When you also need to set the response body, use <code>cowboy_req:reply/4</code>:</p>
+<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">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">200</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/plain"</span><span style="color: #990000">&gt;&gt;</span>
-}, <span style="color: #FF0000">"Hello world!"</span>, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>You should always set the content-type header when the
-response has a body. There is however no need to set
-the content-length header; Cowboy does it automatically.</p></div>
-<div class="paragraph"><p>The response body and the header values must be either
-a binary or an iolist. An iolist is a list containing
-binaries, characters, strings or other iolists. This
-allows you to build a response from different parts
-without having to do any concatenation:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:reply</font></b>(<font color="#993399">200</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/plain"</font><font color="#990000">&gt;&gt;</font>
+}, <font color="#FF0000">"Hello world!"</font>, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>You should always set the content-type header when the response has a body. There is however no need to set the content-length header; Cowboy does it automatically.</p>
+<p>The response body and the header values must be either a binary or an iolist. An iolist is a list containing binaries, characters, strings or other iolists. This allows you to build a response from different parts without having to do any concatenation:</p>
+<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">Title</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"Hello world!"</span>,
-<span style="color: #009900">Body</span> <span style="color: #990000">=</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Hats off!"</span><span style="color: #990000">&gt;&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">200</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/html"</span><span style="color: #990000">&gt;&gt;</span>
-}, [<span style="color: #FF0000">"&lt;html&gt;&lt;head&gt;&lt;title&gt;"</span>, <span style="color: #009900">Title</span>, <span style="color: #FF0000">"&lt;/title&gt;&lt;/head&gt;"</span>,
- <span style="color: #FF0000">"&lt;body&gt;&lt;p&gt;"</span>, <span style="color: #009900">Body</span>, <span style="color: #FF0000">"&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;"</span>], <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>This method of building responses is more efficient than
-concatenating. Behind the scenes, each element of the list
-is simply a pointer, and those pointers are used directly
-when writing to the socket.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Title</font> <font color="#990000">=</font> <font color="#FF0000">"Hello world!"</font>,
+<font color="#009900">Body</font> <font color="#990000">=</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"Hats off!"</font><font color="#990000">&gt;&gt;</font>,
+<font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:reply</font></b>(<font color="#993399">200</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/html"</font><font color="#990000">&gt;&gt;</font>
+}, [<font color="#FF0000">"&lt;html&gt;&lt;head&gt;&lt;title&gt;"</font>, <font color="#009900">Title</font>, <font color="#FF0000">"&lt;/title&gt;&lt;/head&gt;"</font>,
+ <font color="#FF0000">"&lt;body&gt;&lt;p&gt;"</font>, <font color="#009900">Body</font>, <font color="#FF0000">"&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;"</font>], <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>This method of building responses is more efficient than concatenating. Behind the scenes, each element of the list is simply a pointer, and those pointers are used directly when writing to the socket.</p>
<h2 id="_stream_reply">Stream reply</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy provides two functions for initiating a response,
-and an additional function for streaming the response body.
-Cowboy will add any required headers to the response.</p></div>
-<div class="paragraph"><p>When you need to set only the status code,
-use <code>cowboy_req:stream_reply/2</code>:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Cowboy provides two functions for initiating a response, and an additional function for streaming the response body. Cowboy will add any required headers to the response.</p>
+<!-- @todo For HTTP/1.1 Cowboy should probably not use chunked transfer-encoding if the content-length is set.-->
+<p>When you need to set only the status code, use <code>cowboy_req:stream_reply/2</code>:</p>
+<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">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_reply</span></span>(<span style="color: #993399">200</span>, <span style="color: #009900">Req0</span>),
-
-<span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_body</span></span>(<span style="color: #FF0000">"Hello..."</span>, <span style="color: #FF6600">nofin</span>, <span style="color: #009900">Req</span>),
-<span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_body</span></span>(<span style="color: #FF0000">"chunked..."</span>, <span style="color: #FF6600">nofin</span>, <span style="color: #009900">Req</span>),
-<span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_body</span></span>(<span style="color: #FF0000">"world!!"</span>, <span style="color: #FF6600">fin</span>, <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>The second argument to <code>cowboy_req:stream_body/3</code> indicates
-whether this data terminates the body. Use <code>fin</code> for the
-final flag, and <code>nofin</code> otherwise.</p></div>
-<div class="paragraph"><p>This snippet does not set a content-type header. This is
-not recommended. All responses with a body should have
-a content-type. The header can be set beforehand, or
-using the <code>cowboy_req:stream_reply/3</code>:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:stream_reply</font></b>(<font color="#993399">200</font>, <font color="#009900">Req0</font>),
+
+<b><font color="#000000">cowboy_req:stream_body</font></b>(<font color="#FF0000">"Hello..."</font>, <font color="#FF6600">nofin</font>, <font color="#009900">Req</font>),
+<b><font color="#000000">cowboy_req:stream_body</font></b>(<font color="#FF0000">"chunked..."</font>, <font color="#FF6600">nofin</font>, <font color="#009900">Req</font>),
+<b><font color="#000000">cowboy_req:stream_body</font></b>(<font color="#FF0000">"world!!"</font>, <font color="#FF6600">fin</font>, <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>The second argument to <code>cowboy_req:stream_body/3</code> indicates whether this data terminates the body. Use <code>fin</code> for the final flag, and <code>nofin</code> otherwise.</p>
+<p>This snippet does not set a content-type header. This is not recommended. All responses with a body should have a content-type. The header can be set beforehand, or using the <code>cowboy_req:stream_reply/3</code>:</p>
+<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">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_reply</span></span>(<span style="color: #993399">200</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/html"</span><span style="color: #990000">&gt;&gt;</span>
-}, <span style="color: #009900">Req0</span>),
-
-<span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_body</span></span>(<span style="color: #FF0000">"&lt;html&gt;&lt;head&gt;Hello world!&lt;/head&gt;"</span>, <span style="color: #FF6600">nofin</span>, <span style="color: #009900">Req</span>),
-<span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_body</span></span>(<span style="color: #FF0000">"&lt;body&gt;&lt;p&gt;Hats off!&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;"</span>, <span style="color: #FF6600">fin</span>, <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>HTTP provides a few different ways to stream response bodies.
-Cowboy will select the most appropriate one based on the HTTP
-version and the request and response headers.</p></div>
-<div class="paragraph"><p>While not required by any means, it is recommended that you
-set the content-length header in the response if you know it
-in advance. This will ensure that the best response method
-is selected and help clients understand when the response
-is fully received.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:stream_reply</font></b>(<font color="#993399">200</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/html"</font><font color="#990000">&gt;&gt;</font>
+}, <font color="#009900">Req0</font>),
+
+<b><font color="#000000">cowboy_req:stream_body</font></b>(<font color="#FF0000">"&lt;html&gt;&lt;head&gt;Hello world!&lt;/head&gt;"</font>, <font color="#FF6600">nofin</font>, <font color="#009900">Req</font>),
+<b><font color="#000000">cowboy_req:stream_body</font></b>(<font color="#FF0000">"&lt;body&gt;&lt;p&gt;Hats off!&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;"</font>, <font color="#FF6600">fin</font>, <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>HTTP provides a few different ways to stream response bodies. Cowboy will select the most appropriate one based on the HTTP version and the request and response headers.</p>
+<p>While not required by any means, it is recommended that you set the content-length header in the response if you know it in advance. This will ensure that the best response method is selected and help clients understand when the response is fully received.</p>
+<!-- @todo Document trailers here.-->
<h2 id="_preset_response_headers">Preset response headers</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy provides functions to set response headers without
-immediately sending them. They are stored in the Req object
-and sent as part of the response when a reply function is
-called.</p></div>
-<div class="paragraph"><p>To set response headers:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Cowboy provides functions to set response headers without immediately sending them. They are stored in the Req object and sent as part of the response when a reply function is called.</p>
+<p>To set response headers:</p>
+<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">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"allow"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #FF0000">"GET"</span>, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Header names must be a lowercase binary.</p></div>
-<div class="paragraph"><p>Do not use this function for setting cookies. Refer to
-the <a href="../cookies">Cookies</a> chapter for more information.</p></div>
-<div class="paragraph"><p>To check if a response header has already been set:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"allow"</font><font color="#990000">&gt;&gt;</font>, <font color="#FF0000">"GET"</font>, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Header names must be a lowercase binary.</p>
+<p>Do not use this function for setting cookies. Refer to the <a href="../cookies">Cookies</a> chapter for more information.</p>
+<p>To check if a response header has already been set:</p>
+<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">cowboy_req:has_resp_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"allow"</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="paragraph"><p>It returns <code>true</code> if the header was set, <code>false</code> otherwise.</p></div>
-<div class="paragraph"><p>To delete a response header that was set previously:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">cowboy_req:has_resp_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"allow"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>It returns <code>true</code> if the header was set, <code>false</code> otherwise.</p>
+<p>To delete a response header that was set previously:</p>
+<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">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:delete_resp_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"allow"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:delete_resp_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"allow"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_overriding_headers">Overriding headers</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>As Cowboy provides different ways of setting response
-headers and body, clashes may occur, so it&#8217;s important
-to understand what happens when a header is set twice.</p></div>
-<div class="paragraph"><p>Headers come from five different origins:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-Protocol-specific headers (for example HTTP/1.1&#8217;s connection header)
-</p>
+<p>As Cowboy provides different ways of setting response headers and body, clashes may occur, so it&apos;s important to understand what happens when a header is set twice.</p>
+<p>Headers come from five different origins:</p>
+<ul><li>Protocol-specific headers (for example HTTP/1.1&apos;s connection header)
</li>
-<li>
-<p>
-Other required headers (for example the date header)
-</p>
+<li>Other required headers (for example the date header)
</li>
-<li>
-<p>
-Preset headers
-</p>
+<li>Preset headers
</li>
-<li>
-<p>
-Headers given to the reply function
-</p>
+<li>Headers given to the reply function
</li>
-<li>
-<p>
-Set-cookie headers
-</p>
+<li>Set-cookie headers
</li>
-</ul></div>
-<div class="paragraph"><p>Cowboy does not allow overriding protocol-specific headers.</p></div>
-<div class="paragraph"><p>Set-cookie headers will always be appended at the end of
-the list of headers before sending the response.</p></div>
-<div class="paragraph"><p>Headers given to the reply function will always override
-preset headers and required headers. If a header is found
-in two or three of these, then the one in the reply function
-is picked and the others are dropped.</p></div>
-<div class="paragraph"><p>Similarly, preset headers will always override required
-headers.</p></div>
-<div class="paragraph"><p>To illustrate, look at the following snippet. Cowboy by
-default sends the server header with the value "Cowboy".
-We can override it:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+</ul>
+<p>Cowboy does not allow overriding protocol-specific headers.</p>
+<p>Set-cookie headers will always be appended at the end of the list of headers before sending the response.</p>
+<p>Headers given to the reply function will always override preset headers and required headers. If a header is found in two or three of these, then the one in the reply function is picked and the others are dropped.</p>
+<p>Similarly, preset headers will always override required headers.</p>
+<p>To illustrate, look at the following snippet. Cowboy by default sends the server header with the value &quot;Cowboy&quot;. We can override it:</p>
+<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">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">200</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"server"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"yaws"</span><span style="color: #990000">&gt;&gt;</span>
-}, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:reply</font></b>(<font color="#993399">200</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"server"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"yaws"</font><font color="#990000">&gt;&gt;</font>
+}, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_preset_response_body">Preset response body</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy provides functions to set the response body without
-immediately sending it. It is stored in the Req object and
-sent when the reply function is called.</p></div>
-<div class="paragraph"><p>To set the response body:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Cowboy provides functions to set the response body without immediately sending it. It is stored in the Req object and sent when the reply function is called.</p>
+<p>To set the response body:</p>
+<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">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_body</span></span>(<span style="color: #FF0000">"Hello world!"</span>, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>To check if a response body has already been set:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_body</font></b>(<font color="#FF0000">"Hello world!"</font>, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<!-- @todo Yeah we probably should add that function that-->
+<!-- also sets the content-type at the same time...-->
+<p>To check if a response body has already been set:</p>
+<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">cowboy_req:has_resp_body</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>It returns <code>true</code> if the body was set and is non-empty,
-<code>false</code> otherwise.</p></div>
-<div class="paragraph"><p>The preset response body is only sent if the reply function
-used is <code>cowboy_req:reply/2</code> or <code>cowboy_req:reply/3</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">cowboy_req:has_resp_body</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>It returns <code>true</code> if the body was set and is non-empty, <code>false</code> otherwise.</p>
+<!-- @todo We probably should also have a function that-->
+<!-- properly removes the response body, including any-->
+<!-- content-* headers.-->
+<p>The preset response body is only sent if the reply function used is <code>cowboy_req:reply/2</code> or <code>cowboy_req:reply/3</code>.</p>
<h2 id="_sending_files">Sending files</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy provides a shortcut for sending files. When
-using <code>cowboy_req:reply/4</code>, or when presetting the
-response header, you can give a <code>sendfile</code> tuple to
-Cowboy:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Cowboy provides a shortcut for sending files. When using <code>cowboy_req:reply/4</code>, or when presetting the response header, you can give a <code>sendfile</code> tuple to Cowboy:</p>
+<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">sendfile</span>, <span style="color: #009900">Offset</span>, <span style="color: #009900">Length</span>, <span style="color: #009900">Filename</span>}</tt></pre></div></div>
-<div class="paragraph"><p>Depending on the values for <code>Offset</code> or <code>Length</code>, the
-entire file may be sent, or just a part of it.</p></div>
-<div class="paragraph"><p>The length is required even for sending the entire file.
-Cowboy sends it in the content-length header.</p></div>
-<div class="paragraph"><p>To send a file while replying:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>{<font color="#FF6600">sendfile</font>, <font color="#009900">Offset</font>, <font color="#009900">Length</font>, <font color="#009900">Filename</font>}</tt></pre>
+</div></div>
+<p>Depending on the values for <code>Offset</code> or <code>Length</code>, the entire file may be sent, or just a part of it.</p>
+<p>The length is required even for sending the entire file. Cowboy sends it in the content-length header.</p>
+<p>To send a file while replying:</p>
+<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">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">200</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #FF0000">"image/png"</span>
-}, {<span style="color: #FF6600">sendfile</span>, <span style="color: #993399">0</span>, <span style="color: #993399">12345</span>, <span style="color: #FF0000">"path/to/logo.png"</span>}, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:reply</font></b>(<font color="#993399">200</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#FF0000">"image/png"</font>
+}, {<font color="#FF6600">sendfile</font>, <font color="#993399">0</font>, <font color="#993399">12345</font>, <font color="#FF0000">"path/to/logo.png"</font>}, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<!-- @todo An example of presetting a file would be useful,-->
+<!-- but let&apos;s wait for the function that can set the-->
+<!-- content-type at the same time.-->
+<!-- @todo What about streaming many files? For example-->
+<!-- it should be possible to build a tar file on the fly-->
+<!-- while still using sendfile. Another example could be-->
+<!-- proper support for multipart byte ranges. Yet another-->
+<!-- example would be automatic concatenation of CSS or JS-->
+<!-- files.-->
<h2 id="_informational_responses">Informational responses</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy allows you to send informational responses.</p></div>
-<div class="paragraph"><p>Informational responses are responses that have a status
-code between 100 and 199. Any number can be sent before
-the proper response. Sending an informational response
-does not change the behavior of the proper response, and
-clients are expected to ignore any informational response
-they do not understand.</p></div>
-<div class="paragraph"><p>The following snippet sends a 103 informational response
-with some headers that are expected to be in the final
-response.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Cowboy allows you to send informational responses.</p>
+<p>Informational responses are responses that have a status code between 100 and 199. Any number can be sent before the proper response. Sending an informational response does not change the behavior of the proper response, and clients are expected to ignore any informational response they do not understand.</p>
+<p>The following snippet sends a 103 informational response with some headers that are expected to be in the final response.</p>
+<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">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:inform</span></span>(<span style="color: #993399">103</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"link"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"&lt;/style.css&gt;; rel=preload; as=style"</span><span style="color: #990000">&gt;&gt;</span>,
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"link"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"&lt;/script.js&gt;; rel=preload; as=script"</span><span style="color: #990000">&gt;&gt;</span>
-}, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:inform</font></b>(<font color="#993399">103</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"link"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"&lt;/style.css&gt;; rel=preload; as=style"</font><font color="#990000">&gt;&gt;</font>,
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"link"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"&lt;/script.js&gt;; rel=preload; as=script"</font><font color="#990000">&gt;&gt;</font>
+}, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_push">Push</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The HTTP/2 protocol introduced the ability to push resources
-related to the one sent in the response. Cowboy provides two
-functions for that purpose: <code>cowboy_req:push/3,4</code>.</p></div>
-<div class="paragraph"><p>Push is only available for HTTP/2. Cowboy will automatically
-ignore push requests if the protocol doesn&#8217;t support it.</p></div>
-<div class="paragraph"><p>The push function must be called before any of the reply
-functions. Doing otherwise will result in a crash.</p></div>
-<div class="paragraph"><p>To push a resource, you need to provide the same information
-as a client performing a request would. This includes the
-HTTP method, the URI and any necessary request headers.</p></div>
-<div class="paragraph"><p>Cowboy by default only requires you to give the path to
-the resource and the request headers. The rest of the URI
-is taken from the current request (excluding the query
-string, set to empty) and the method is GET by default.</p></div>
-<div class="paragraph"><p>The following snippet pushes a CSS file that is linked to
-in the response:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The HTTP/2 protocol introduced the ability to push resources related to the one sent in the response. Cowboy provides two functions for that purpose: <code>cowboy_req:push/3,4</code>.</p>
+<p>Push is only available for HTTP/2. Cowboy will automatically ignore push requests if the protocol doesn&apos;t support it.</p>
+<p>The push function must be called before any of the reply functions. Doing otherwise will result in a crash.</p>
+<p>To push a resource, you need to provide the same information as a client performing a request would. This includes the HTTP method, the URI and any necessary request headers.</p>
+<p>Cowboy by default only requires you to give the path to the resource and the request headers. The rest of the URI is taken from the current request (excluding the query string, set to empty) and the method is GET by default.</p>
+<p>The following snippet pushes a CSS file that is linked to in the response:</p>
+<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">cowboy_req:push</span></span>(<span style="color: #FF0000">"/static/style.css"</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"accept"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/css"</span><span style="color: #990000">&gt;&gt;</span>
-}, <span style="color: #009900">Req0</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">200</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/html"</span><span style="color: #990000">&gt;&gt;</span>
-}, [<span style="color: #FF0000">"&lt;html&gt;&lt;head&gt;&lt;title&gt;My web page&lt;/title&gt;"</span>,
- <span style="color: #FF0000">"&lt;link rel='stylesheet' type='text/css' href='/static/style.css'&gt;"</span>,
- <span style="color: #FF0000">"&lt;body&gt;&lt;p&gt;Welcome to Erlang!&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;"</span>], <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>To override the method, scheme, host, port or query string,
-simply pass in a fourth argument. The following snippet
-uses a different host name:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">cowboy_req:push</font></b>(<font color="#FF0000">"/static/style.css"</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"accept"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/css"</font><font color="#990000">&gt;&gt;</font>
+}, <font color="#009900">Req0</font>),
+<font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:reply</font></b>(<font color="#993399">200</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/html"</font><font color="#990000">&gt;&gt;</font>
+}, [<font color="#FF0000">"&lt;html&gt;&lt;head&gt;&lt;title&gt;My web page&lt;/title&gt;"</font>,
+ <font color="#FF0000">"&lt;link rel='stylesheet' type='text/css' href='/static/style.css'&gt;"</font>,
+ <font color="#FF0000">"&lt;body&gt;&lt;p&gt;Welcome to Erlang!&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;"</font>], <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>To override the method, scheme, host, port or query string, simply pass in a fourth argument. The following snippet uses a different host name:</p>
+<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">cowboy_req:push</span></span>(<span style="color: #FF0000">"/static/style.css"</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"accept"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/css"</span><span style="color: #990000">&gt;&gt;</span>
-}, #{<span style="color: #0000FF">host</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"cdn.example.org"</span><span style="color: #990000">&gt;&gt;</span>}, <span style="color: #009900">Req</span>),</tt></pre></div></div>
-<div class="paragraph"><p>Pushed resources don&#8217;t have to be files. As long as the push
-request is cacheable, safe and does not include a body, the
-resource can be pushed.</p></div>
-<div class="paragraph"><p>Under the hood, Cowboy handles pushed requests the same as
-normal requests: a different process is created which will
-ultimately send a response to the client.</p></div>
-</div>
-</div>
+<pre><tt><b><font color="#000000">cowboy_req:push</font></b>(<font color="#FF0000">"/static/style.css"</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"accept"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/css"</font><font color="#990000">&gt;&gt;</font>
+}, #{<font color="#0000FF">host</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"cdn.example.org"</font><font color="#990000">&gt;&gt;</font>}, <font color="#009900">Req</font>),</tt></pre>
+</div></div>
+<p>Pushed resources don&apos;t have to be files. As long as the push request is cacheable, safe and does not include a body, the resource can be pushed.</p>
+<p>Under the hood, Cowboy handles pushed requests the same as normal requests: a different process is created which will ultimately send a response to the client.</p>
+
diff --git a/docs/en/cowboy/2.1/guide/rest_flowcharts/index.html b/docs/en/cowboy/2.1/guide/rest_flowcharts/index.html
index 87d33daa..7eb1edfb 100644
--- a/docs/en/cowboy/2.1/guide/rest_flowcharts/index.html
+++ b/docs/en/cowboy/2.1/guide/rest_flowcharts/index.html
@@ -62,244 +62,64 @@
<h1 class="lined-header"><span>REST flowcharts</span></h1>
-<div class="paragraph"><p>This chapter will explain the REST handler state machine through
-a number of different diagrams.</p></div>
-<div class="paragraph"><p>There are four main paths that requests may follow. One for the
-method OPTIONS; one for the methods GET and HEAD; one for the
-methods PUT, POST and PATCH; and one for the method DELETE.</p></div>
-<div class="paragraph"><p>All paths start with the "Start" diagram, and all paths excluding
-the OPTIONS path go through the "Content negotiation" diagram
-and optionally the "Conditional requests" diagram if the resource
-exists.</p></div>
-<div class="paragraph"><p>The red squares refer to another diagram. The light green squares
-indicate a response. Other squares may be either a callback or a
-question answered by Cowboy itself. Green arrows tend to indicate
-the default behavior if the callback is undefined.</p></div>
-<div class="sect1">
+<p>This chapter will explain the REST handler state machine through a number of different diagrams.</p>
+<p>There are four main paths that requests may follow. One for the method OPTIONS; one for the methods GET and HEAD; one for the methods PUT, POST and PATCH; and one for the method DELETE.</p>
+<p>All paths start with the &quot;Start&quot; diagram, and all paths excluding the OPTIONS path go through the &quot;Content negotiation&quot; diagram and optionally the &quot;Conditional requests&quot; diagram if the resource exists.</p>
+<p>The red squares refer to another diagram. The light green squares indicate a response. Other squares may be either a callback or a question answered by Cowboy itself. Green arrows tend to indicate the default behavior if the callback is undefined.</p>
<h2 id="_start">Start</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>All requests start from here.</p></div>
-<div class="imageblock">
-<div class="content">
-<img src="../rest_start.png" alt="REST starting flowchart" />
-</div>
-</div>
-<div class="paragraph"><p>A series of callbacks are called in succession to perform
-a general checkup of the service, the request line and
-request headers.</p></div>
-<div class="paragraph"><p>The request body, if any, is not expected to have been
-received for any of these steps. It is only processed
-at the end of the "PUT, POST and PATCH methods" diagram,
-when all conditions have been met.</p></div>
-<div class="paragraph"><p>The <code>known_methods</code> and <code>allowed_methods</code> callbacks
-return a list of methods. Cowboy then checks if the request
-method is in the list, and stops otherwise.</p></div>
-<div class="paragraph"><p>The <code>is_authorized</code> callback may be used to check that
-access to the resource is authorized. Authentication
-may also be performed as needed. When authorization is
-denied, the return value from the callback must include
-a challenge applicable to the requested resource, which
-will be sent back to the client in the www-authenticate
-header.</p></div>
-<div class="paragraph"><p>This diagram is immediately followed by either the
-"OPTIONS method" diagram when the request method is
-OPTIONS, or the "Content negotiation" diagram otherwise.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>All requests start from here.</p>
+<img src="../rest_start.png" alt="REST starting flowchart"/><p>A series of callbacks are called in succession to perform a general checkup of the service, the request line and request headers.</p>
+<p>The request body, if any, is not expected to have been received for any of these steps. It is only processed at the end of the &quot;PUT, POST and PATCH methods&quot; diagram, when all conditions have been met.</p>
+<p>The <code>known_methods</code> and <code>allowed_methods</code> callbacks return a list of methods. Cowboy then checks if the request method is in the list, and stops otherwise.</p>
+<p>The <code>is_authorized</code> callback may be used to check that access to the resource is authorized. Authentication may also be performed as needed. When authorization is denied, the return value from the callback must include a challenge applicable to the requested resource, which will be sent back to the client in the www-authenticate header.</p>
+<p>This diagram is immediately followed by either the &quot;OPTIONS method&quot; diagram when the request method is OPTIONS, or the &quot;Content negotiation&quot; diagram otherwise.</p>
<h2 id="_options_method">OPTIONS method</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This diagram only applies to OPTIONS requests.</p></div>
-<div class="imageblock">
-<div class="content">
-<img src="../rest_options.png" alt="REST OPTIONS method flowchart" />
-</div>
-</div>
-<div class="paragraph"><p>The <code>options</code> callback may be used to add information
-about the resource, such as media types or languages
-provided; allowed methods; any extra information. A
-response body may also be set, although clients should
-not be expected to read it.</p></div>
-<div class="paragraph"><p>If the <code>options</code> callback is not defined, Cowboy will
-send a response containing the list of allowed methods
-by default.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This diagram only applies to OPTIONS requests.</p>
+<img src="../rest_options.png" alt="REST OPTIONS method flowchart"/><p>The <code>options</code> callback may be used to add information about the resource, such as media types or languages provided; allowed methods; any extra information. A response body may also be set, although clients should not be expected to read it.</p>
+<p>If the <code>options</code> callback is not defined, Cowboy will send a response containing the list of allowed methods by default.</p>
<h2 id="_content_negotiation">Content negotiation</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This diagram applies to all request methods other than
-OPTIONS. It is executed right after the "Start" diagram
-is completed.</p></div>
-<div class="imageblock">
-<div class="content">
-<img src="../rest_conneg.png" alt="REST content negotiation flowchart" />
-</div>
-</div>
-<div class="paragraph"><p>The purpose of these steps is to determine an appropriate
-representation to be sent back to the client.</p></div>
-<div class="paragraph"><p>The request may contain any of the accept header; the
-accept-language header; or the accept-charset header.
-When present, Cowboy will parse the headers and then
-call the corresponding callback to obtain the list
-of provided content-type, language or charset for this
-resource. It then automatically select the best match
-based on the request.</p></div>
-<div class="paragraph"><p>If a callback is not defined, Cowboy will select the
-content-type, language or charset that the client
-prefers.</p></div>
-<div class="paragraph"><p>The <code>content_types_provided</code> also returns the name of
-a callback for every content-type it accepts. This
-callback will only be called at the end of the
-"GET and HEAD methods" diagram, when all conditions
-have been met.</p></div>
-<div class="paragraph"><p>The selected content-type, language and charset are
-saved as meta values in the Req object. You <strong>should</strong>
-use the appropriate representation if you set a
-response body manually (alongside an error code,
-for example).</p></div>
-<div class="paragraph"><p>This diagram is immediately followed by
-the "GET and HEAD methods" diagram,
-the "PUT, POST and PATCH methods" diagram,
-or the "DELETE method" diagram, depending on the
-method.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This diagram applies to all request methods other than OPTIONS. It is executed right after the &quot;Start&quot; diagram is completed.</p>
+<img src="../rest_conneg.png" alt="REST content negotiation flowchart"/><p>The purpose of these steps is to determine an appropriate representation to be sent back to the client.</p>
+<p>The request may contain any of the accept header; the accept-language header; or the accept-charset header. When present, Cowboy will parse the headers and then call the corresponding callback to obtain the list of provided content-type, language or charset for this resource. It then automatically select the best match based on the request.</p>
+<p>If a callback is not defined, Cowboy will select the content-type, language or charset that the client prefers.</p>
+<p>The <code>content_types_provided</code> also returns the name of a callback for every content-type it accepts. This callback will only be called at the end of the &quot;GET and HEAD methods&quot; diagram, when all conditions have been met.</p>
+<p>The selected content-type, language and charset are saved as meta values in the Req object. You <strong>should</strong> use the appropriate representation if you set a response body manually (alongside an error code, for example).</p>
+<p>This diagram is immediately followed by the &quot;GET and HEAD methods&quot; diagram, the &quot;PUT, POST and PATCH methods&quot; diagram, or the &quot;DELETE method&quot; diagram, depending on the method.</p>
<h2 id="_get_and_head_methods">GET and HEAD methods</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This diagram only applies to GET and HEAD requests.</p></div>
-<div class="paragraph"><p>For a description of the <code>cond</code> step, please see
-the "Conditional requests" diagram.</p></div>
-<div class="imageblock">
-<div class="content">
-<img src="../rest_get_head.png" alt="REST GET/HEAD methods flowchart" />
-</div>
-</div>
-<div class="paragraph"><p>When the resource exists, and the conditional steps
-succeed, the resource can be retrieved.</p></div>
-<div class="paragraph"><p>Cowboy prepares the response by first retrieving
-metadata about the representation, then by calling
-the <code>ProvideResource</code> callback. This is the callback
-you defined for each content-types you returned from
-<code>content_types_provided</code>. This callback returns the body
-that will be sent back to the client, or a fun if the
-body must be streamed.</p></div>
-<div class="paragraph"><p>When the resource does not exist, Cowboy will figure out
-whether the resource existed previously, and if so whether
-it was moved elsewhere in order to redirect the client to
-the new URI.</p></div>
-<div class="paragraph"><p>The <code>moved_permanently</code> and <code>moved_temporarily</code> callbacks
-must return the new location of the resource if it was in
-fact moved.</p></div>
-</div>
-</div>
-<div class="sect1">
-<h2 id="_put_post_and_patch_methods">PUT, POST and PATCH methods</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This diagram only applies to PUT, POST and PATCH requests.</p></div>
-<div class="paragraph"><p>For a description of the <code>cond</code> step, please see
-the "Conditional requests" diagram.</p></div>
-<div class="imageblock">
-<div class="content">
-<img src="../rest_put_post_patch.png" alt="REST PUT/POST/PATCH methods flowchart" />
-</div>
-</div>
-<div class="paragraph"><p>When the resource exists, first the conditional steps
-are executed. When that succeeds, and the method is PUT,
-Cowboy will call the <code>is_conflict</code> callback. This function
-can be used to prevent potential race conditions, by locking
-the resource for example.</p></div>
-<div class="paragraph"><p>Then all three methods reach the <code>content_types_accepted</code>
-step that we will describe in a few paragraphs.</p></div>
-<div class="paragraph"><p>When the resource does not exist, and the method is PUT,
-Cowboy will check for conflicts and then move on to the
-<code>content_types_accepted</code> step. For other methods, Cowboy
-will figure out whether the resource existed previously,
-and if so whether it was moved elsewhere. If the resource
-is truly non-existent, the method is POST and the call
-for <code>allow_missing_post</code> returns <code>true</code>, then Cowboy will
-move on to the <code>content_types_accepted</code> step. Otherwise
-the request processing ends there.</p></div>
-<div class="paragraph"><p>The <code>moved_permanently</code> and <code>moved_temporarily</code> callbacks
-must return the new location of the resource if it was in
-fact moved.</p></div>
-<div class="paragraph"><p>The <code>content_types_accepted</code> returns a list of
-content-types it accepts, but also the name of a callback
-for each of them. Cowboy will select the appropriate
-callback for processing the request body and call it.</p></div>
-<div class="paragraph"><p>This callback may return one of three different return
-values.</p></div>
-<div class="paragraph"><p>If an error occurred while processing the request body,
-it must return <code>false</code> and Cowboy will send an
-appropriate error response.</p></div>
-<div class="paragraph"><p>If the method is POST, then you may return <code>true</code> with
-an URI of where the resource has been created. This is
-especially useful for writing handlers for collections.</p></div>
-<div class="paragraph"><p>Otherwise, return <code>true</code> to indicate success. Cowboy
-will select the appropriate response to be sent depending
-on whether a resource has been created, rather than
-modified, and on the availability of a location header
-or a body in the response.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This diagram only applies to GET and HEAD requests.</p>
+<p>For a description of the <code>cond</code> step, please see the &quot;Conditional requests&quot; diagram.</p>
+<img src="../rest_get_head.png" alt="REST GET/HEAD methods flowchart"/><p>When the resource exists, and the conditional steps succeed, the resource can be retrieved.</p>
+<p>Cowboy prepares the response by first retrieving metadata about the representation, then by calling the <code>ProvideResource</code> callback. This is the callback you defined for each content-types you returned from <code>content_types_provided</code>. This callback returns the body that will be sent back to the client, or a fun if the body must be streamed.</p>
+<p>When the resource does not exist, Cowboy will figure out whether the resource existed previously, and if so whether it was moved elsewhere in order to redirect the client to the new URI.</p>
+<p>The <code>moved_permanently</code> and <code>moved_temporarily</code> callbacks must return the new location of the resource if it was in fact moved.</p>
+<h2 id="_put__post_and_patch_methods">PUT, POST and PATCH methods</h2>
+<p>This diagram only applies to PUT, POST and PATCH requests.</p>
+<p>For a description of the <code>cond</code> step, please see the &quot;Conditional requests&quot; diagram.</p>
+<img src="../rest_put_post_patch.png" alt="REST PUT/POST/PATCH methods flowchart"/><p>When the resource exists, first the conditional steps are executed. When that succeeds, and the method is PUT, Cowboy will call the <code>is_conflict</code> callback. This function can be used to prevent potential race conditions, by locking the resource for example.</p>
+<p>Then all three methods reach the <code>content_types_accepted</code> step that we will describe in a few paragraphs.</p>
+<p>When the resource does not exist, and the method is PUT, Cowboy will check for conflicts and then move on to the <code>content_types_accepted</code> step. For other methods, Cowboy will figure out whether the resource existed previously, and if so whether it was moved elsewhere. If the resource is truly non-existent, the method is POST and the call for <code>allow_missing_post</code> returns <code>true</code>, then Cowboy will move on to the <code>content_types_accepted</code> step. Otherwise the request processing ends there.</p>
+<p>The <code>moved_permanently</code> and <code>moved_temporarily</code> callbacks must return the new location of the resource if it was in fact moved.</p>
+<p>The <code>content_types_accepted</code> returns a list of content-types it accepts, but also the name of a callback for each of them. Cowboy will select the appropriate callback for processing the request body and call it.</p>
+<p>This callback may return one of three different return values.</p>
+<p>If an error occurred while processing the request body, it must return <code>false</code> and Cowboy will send an appropriate error response.</p>
+<p>If the method is POST, then you may return <code>true</code> with an URI of where the resource has been created. This is especially useful for writing handlers for collections.</p>
+<p>Otherwise, return <code>true</code> to indicate success. Cowboy will select the appropriate response to be sent depending on whether a resource has been created, rather than modified, and on the availability of a location header or a body in the response.</p>
<h2 id="_delete_method">DELETE method</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This diagram only applies to DELETE requests.</p></div>
-<div class="paragraph"><p>For a description of the <code>cond</code> step, please see
-the "Conditional requests" diagram.</p></div>
-<div class="imageblock">
-<div class="content">
-<img src="../rest_delete.png" alt="REST DELETE method flowchart" />
-</div>
-</div>
-<div class="paragraph"><p>When the resource exists, and the conditional steps
-succeed, the resource can be deleted.</p></div>
-<div class="paragraph"><p>Deleting the resource is a two steps process. First
-the callback <code>delete_resource</code> is executed. Use this
-callback to delete the resource.</p></div>
-<div class="paragraph"><p>Because the resource may be cached, you must also
-delete all cached representations of this resource
-in the system. This operation may take a while though,
-so you may return before it finished.</p></div>
-<div class="paragraph"><p>Cowboy will then call the <code>delete_completed</code> callback.
-If you know that the resource has been completely
-deleted from your system, including from caches, then
-you can return <code>true</code>. If any doubts persist, return
-<code>false</code>. Cowboy will assume <code>true</code> by default.</p></div>
-<div class="paragraph"><p>To finish, Cowboy checks if you set a response body,
-and depending on that, sends the appropriate response.</p></div>
-<div class="paragraph"><p>When the resource does not exist, Cowboy will figure out
-whether the resource existed previously, and if so whether
-it was moved elsewhere in order to redirect the client to
-the new URI.</p></div>
-<div class="paragraph"><p>The <code>moved_permanently</code> and <code>moved_temporarily</code> callbacks
-must return the new location of the resource if it was in
-fact moved.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This diagram only applies to DELETE requests.</p>
+<p>For a description of the <code>cond</code> step, please see the &quot;Conditional requests&quot; diagram.</p>
+<img src="../rest_delete.png" alt="REST DELETE method flowchart"/><p>When the resource exists, and the conditional steps succeed, the resource can be deleted.</p>
+<p>Deleting the resource is a two steps process. First the callback <code>delete_resource</code> is executed. Use this callback to delete the resource.</p>
+<p>Because the resource may be cached, you must also delete all cached representations of this resource in the system. This operation may take a while though, so you may return before it finished.</p>
+<p>Cowboy will then call the <code>delete_completed</code> callback. If you know that the resource has been completely deleted from your system, including from caches, then you can return <code>true</code>. If any doubts persist, return <code>false</code>. Cowboy will assume <code>true</code> by default.</p>
+<p>To finish, Cowboy checks if you set a response body, and depending on that, sends the appropriate response.</p>
+<p>When the resource does not exist, Cowboy will figure out whether the resource existed previously, and if so whether it was moved elsewhere in order to redirect the client to the new URI.</p>
+<p>The <code>moved_permanently</code> and <code>moved_temporarily</code> callbacks must return the new location of the resource if it was in fact moved.</p>
<h2 id="_conditional_requests">Conditional requests</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This diagram applies to all request methods other than
-OPTIONS. It is executed right after the <code>resource_exists</code>
-callback, when the resource exists.</p></div>
-<div class="imageblock">
-<div class="content">
-<img src="../rest_cond.png" alt="REST conditional requests flowchart" />
-</div>
-</div>
-<div class="paragraph"><p>A request becomes conditional when it includes either of
-the if-match header; the if-unmodified-since header; the
-if-none-match header; or the if-modified-since header.</p></div>
-<div class="paragraph"><p>If the condition fails, the request ends immediately
-without any retrieval or modification of the resource.</p></div>
-<div class="paragraph"><p>The <code>generate_etag</code> and <code>last_modified</code> are called as
-needed. Cowboy will only call them once and then cache
-the results for subsequent use.</p></div>
-</div>
-</div>
+<p>This diagram applies to all request methods other than OPTIONS. It is executed right after the <code>resource_exists</code> callback, when the resource exists.</p>
+<img src="../rest_cond.png" alt="REST conditional requests flowchart"/><p>A request becomes conditional when it includes either of the if-match header; the if-unmodified-since header; the if-none-match header; or the if-modified-since header.</p>
+<p>If the condition fails, the request ends immediately without any retrieval or modification of the resource.</p>
+<p>The <code>generate_etag</code> and <code>last_modified</code> are called as needed. Cowboy will only call them once and then cache the results for subsequent use.</p>
+
diff --git a/docs/en/cowboy/2.1/guide/rest_handlers/index.html b/docs/en/cowboy/2.1/guide/rest_handlers/index.html
index 9ec77e6b..76c32a51 100644
--- a/docs/en/cowboy/2.1/guide/rest_handlers/index.html
+++ b/docs/en/cowboy/2.1/guide/rest_handlers/index.html
@@ -62,287 +62,162 @@
<h1 class="lined-header"><span>REST handlers</span></h1>
-<div class="paragraph"><p>REST is implemented in Cowboy as a sub protocol. The request
-is handled as a state machine with many optional callbacks
-describing the resource and modifying the machine&#8217;s behavior.</p></div>
-<div class="paragraph"><p>The REST handler is the recommended way to handle HTTP requests.</p></div>
-<div class="sect1">
+<p>REST is implemented in Cowboy as a sub protocol. The request is handled as a state machine with many optional callbacks describing the resource and modifying the machine&apos;s behavior.</p>
+<p>The REST handler is the recommended way to handle HTTP requests.</p>
<h2 id="_initialization">Initialization</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>First, the <code>init/2</code> callback is called. This callback is common
-to all handlers. To use REST for the current request, this function
-must return a <code>cowboy_rest</code> tuple.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>First, the <code>init/2</code> callback is called. This callback is common to all handlers. To use REST for the current request, this function must return a <code>cowboy_rest</code> tuple.</p>
+<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">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 class="paragraph"><p>Cowboy will then switch to the REST protocol and start executing
-the state machine.</p></div>
-<div class="paragraph"><p>After reaching the end of the flowchart, the <code>terminate/3</code> callback
-will be called if it is defined.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">cowboy_rest</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Cowboy will then switch to the REST protocol and start executing the state machine.</p>
+<p>After reaching the end of the flowchart, the <code>terminate/3</code> callback will be called if it is defined.</p>
<h2 id="_methods">Methods</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The REST component has code for handling the following HTTP methods:
-HEAD, GET, POST, PATCH, PUT, DELETE and OPTIONS.</p></div>
-<div class="paragraph"><p>Other methods can be accepted, however they have no specific callback
-defined for them at this time.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The REST component has code for handling the following HTTP methods: HEAD, GET, POST, PATCH, PUT, DELETE and OPTIONS.</p>
+<p>Other methods can be accepted, however they have no specific callback defined for them at this time.</p>
<h2 id="_callbacks">Callbacks</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>All callbacks are optional. Some may become mandatory depending
-on what other defined callbacks return. The various flowcharts
-in the next chapter should be a useful to determine which callbacks
-you need.</p></div>
-<div class="paragraph"><p>All callbacks take two arguments, the Req object and the State,
-and return a three-element tuple of the form <code>{Value, Req, State}</code>.</p></div>
-<div class="paragraph"><p>Nearly all callbacks can also return <code>{stop, Req, State}</code> to
-stop execution of the request, and
-<code>{{switch_handler, Module}, Req, State}</code> or
-<code>{{switch_handler, Module, Opts}, Req, State}</code> to switch to
-a different handler type. The exceptions are <code>expires</code>
-<code>generate_etag</code>, <code>last_modified</code> and <code>variances</code>.</p></div>
-<div class="paragraph"><p>The following table summarizes the callbacks and their default values.
-If the callback isn&#8217;t defined, then the default value will be used.
-Please look at the flowcharts to find out the result of each return
-value.</p></div>
-<div class="paragraph"><p>In the following table, "skip" means the callback is entirely skipped
-if it is undefined, moving directly to the next step. Similarly,
-"none" means there is no default value for this callback.</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"> Callback name </th>
-<th align="center" valign="top"> Default value</th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td align="left" valign="top"><p class="table">allowed_methods</p></td>
-<td align="center" valign="top"><p class="table"><code>[&lt;&lt;"GET"&gt;&gt;, &lt;&lt;"HEAD"&gt;&gt;, &lt;&lt;"OPTIONS"&gt;&gt;]</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">allow_missing_post</p></td>
-<td align="center" valign="top"><p class="table"><code>true</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">charsets_provided</p></td>
-<td align="center" valign="top"><p class="table">skip</p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">content_types_accepted</p></td>
-<td align="center" valign="top"><p class="table">none</p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">content_types_provided</p></td>
-<td align="center" valign="top"><p class="table"><code>[{{ &lt;&lt;"text"&gt;&gt;, &lt;&lt;"html"&gt;&gt;, '*'}, to_html}]</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">delete_completed</p></td>
-<td align="center" valign="top"><p class="table"><code>true</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">delete_resource</p></td>
-<td align="center" valign="top"><p class="table"><code>false</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">expires</p></td>
-<td align="center" valign="top"><p class="table"><code>undefined</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">forbidden</p></td>
-<td align="center" valign="top"><p class="table"><code>false</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">generate_etag</p></td>
-<td align="center" valign="top"><p class="table"><code>undefined</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">is_authorized</p></td>
-<td align="center" valign="top"><p class="table"><code>true</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">is_conflict</p></td>
-<td align="center" valign="top"><p class="table"><code>false</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">known_methods</p></td>
-<td align="center" valign="top"><p class="table"><code>[&lt;&lt;"GET"&gt;&gt;, &lt;&lt;"HEAD"&gt;&gt;, &lt;&lt;"POST"&gt;&gt;, &lt;&lt;"PUT"&gt;&gt;, &lt;&lt;"PATCH"&gt;&gt;, &lt;&lt;"DELETE"&gt;&gt;, &lt;&lt;"OPTIONS"&gt;&gt;]</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">languages_provided</p></td>
-<td align="center" valign="top"><p class="table">skip</p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">last_modified</p></td>
-<td align="center" valign="top"><p class="table"><code>undefined</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">malformed_request</p></td>
-<td align="center" valign="top"><p class="table"><code>false</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">moved_permanently</p></td>
-<td align="center" valign="top"><p class="table"><code>false</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">moved_temporarily</p></td>
-<td align="center" valign="top"><p class="table"><code>false</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">multiple_choices</p></td>
-<td align="center" valign="top"><p class="table"><code>false</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">options</p></td>
-<td align="center" valign="top"><p class="table"><code>ok</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">previously_existed</p></td>
-<td align="center" valign="top"><p class="table"><code>false</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">resource_exists</p></td>
-<td align="center" valign="top"><p class="table"><code>true</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">service_available</p></td>
-<td align="center" valign="top"><p class="table"><code>true</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">uri_too_long</p></td>
-<td align="center" valign="top"><p class="table"><code>false</code></p></td>
+<p>All callbacks are optional. Some may become mandatory depending on what other defined callbacks return. The various flowcharts in the next chapter should be a useful to determine which callbacks you need.</p>
+<p>All callbacks take two arguments, the Req object and the State, and return a three-element tuple of the form <code>{Value, Req, State}</code>.</p>
+<p>Nearly all callbacks can also return <code>{stop, Req, State}</code> to stop execution of the request, and <code>{{switch_handler, Module}, Req, State}</code> or <code>{{switch_handler, Module, Opts}, Req, State}</code> to switch to a different handler type. The exceptions are <code>expires</code> <code>generate_etag</code>, <code>last_modified</code> and <code>variances</code>.</p>
+<p>The following table summarizes the callbacks and their default values. If the callback isn&apos;t defined, then the default value will be used. Please look at the flowcharts to find out the result of each return value.</p>
+<p>In the following table, &quot;skip&quot; means the callback is entirely skipped if it is undefined, moving directly to the next step. Similarly, &quot;none&quot; means there is no default value for this callback.</p>
+<table rules="all" width="100%" frame="border"
+ cellspacing="0" cellpadding="4">
+<thead><tr><th>Callback name</th>
+<th>Default value</th>
+</tr></thead><tbody><tr><td>allowed_methods</td>
+<td><code>[&lt;&lt;&quot;GET&quot;&gt;&gt;, &lt;&lt;&quot;HEAD&quot;&gt;&gt;, &lt;&lt;&quot;OPTIONS&quot;&gt;&gt;]</code></td>
</tr>
-<tr>
-<td align="left" valign="top"><p class="table">valid_content_headers</p></td>
-<td align="center" valign="top"><p class="table"><code>true</code></p></td>
+<tr><td>allow_missing_post</td>
+<td><code>true</code></td>
</tr>
-<tr>
-<td align="left" valign="top"><p class="table">valid_entity_length</p></td>
-<td align="center" valign="top"><p class="table"><code>true</code></p></td>
+<tr><td>charsets_provided</td>
+<td>skip</td>
</tr>
-<tr>
-<td align="left" valign="top"><p class="table">variances</p></td>
-<td align="center" valign="top"><p class="table"><code>[]</code></p></td>
+<tr><td>content_types_accepted</td>
+<td>none</td>
</tr>
-</tbody>
-</table>
-</div>
-<div class="paragraph"><p>As you can see, Cowboy tries to move on with the request whenever
-possible by using well thought out default values.</p></div>
-<div class="paragraph"><p>In addition to these, there can be any number of user-defined
-callbacks that are specified through <code>content_types_accepted/2</code>
-and <code>content_types_provided/2</code>. They can take any name, however
-it is recommended to use a separate prefix for the callbacks of
-each function. For example, <code>from_html</code> and <code>to_html</code> indicate
-in the first case that we&#8217;re accepting a resource given as HTML,
-and in the second case that we send one as HTML.</p></div>
-</div>
-</div>
-<div class="sect1">
+<tr><td>content_types_provided</td>
+<td><code>[{{ &lt;&lt;&quot;text&quot;&gt;&gt;, &lt;&lt;&quot;html&quot;&gt;&gt;, &apos;*&apos;}, to_html}]</code></td>
+</tr>
+<tr><td>delete_completed</td>
+<td><code>true</code></td>
+</tr>
+<tr><td>delete_resource</td>
+<td><code>false</code></td>
+</tr>
+<tr><td>expires</td>
+<td><code>undefined</code></td>
+</tr>
+<tr><td>forbidden</td>
+<td><code>false</code></td>
+</tr>
+<tr><td>generate_etag</td>
+<td><code>undefined</code></td>
+</tr>
+<tr><td>is_authorized</td>
+<td><code>true</code></td>
+</tr>
+<tr><td>is_conflict</td>
+<td><code>false</code></td>
+</tr>
+<tr><td>known_methods</td>
+<td><code>[&lt;&lt;&quot;GET&quot;&gt;&gt;, &lt;&lt;&quot;HEAD&quot;&gt;&gt;, &lt;&lt;&quot;POST&quot;&gt;&gt;, &lt;&lt;&quot;PUT&quot;&gt;&gt;, &lt;&lt;&quot;PATCH&quot;&gt;&gt;, &lt;&lt;&quot;DELETE&quot;&gt;&gt;, &lt;&lt;&quot;OPTIONS&quot;&gt;&gt;]</code></td>
+</tr>
+<tr><td>languages_provided</td>
+<td>skip</td>
+</tr>
+<tr><td>last_modified</td>
+<td><code>undefined</code></td>
+</tr>
+<tr><td>malformed_request</td>
+<td><code>false</code></td>
+</tr>
+<tr><td>moved_permanently</td>
+<td><code>false</code></td>
+</tr>
+<tr><td>moved_temporarily</td>
+<td><code>false</code></td>
+</tr>
+<tr><td>multiple_choices</td>
+<td><code>false</code></td>
+</tr>
+<tr><td>options</td>
+<td><code>ok</code></td>
+</tr>
+<tr><td>previously_existed</td>
+<td><code>false</code></td>
+</tr>
+<tr><td>resource_exists</td>
+<td><code>true</code></td>
+</tr>
+<tr><td>service_available</td>
+<td><code>true</code></td>
+</tr>
+<tr><td>uri_too_long</td>
+<td><code>false</code></td>
+</tr>
+<tr><td>valid_content_headers</td>
+<td><code>true</code></td>
+</tr>
+<tr><td>valid_entity_length</td>
+<td><code>true</code></td>
+</tr>
+<tr><td>variances</td>
+<td><code>[]</code></td>
+</tr>
+</tbody></table>
+<p>As you can see, Cowboy tries to move on with the request whenever possible by using well thought out default values.</p>
+<p>In addition to these, there can be any number of user-defined callbacks that are specified through <code>content_types_accepted/2</code> and <code>content_types_provided/2</code>. They can take any name, however it is recommended to use a separate prefix for the callbacks of each function. For example, <code>from_html</code> and <code>to_html</code> indicate in the first case that we&apos;re accepting a resource given as HTML, and in the second case that we send one as HTML.</p>
<h2 id="_meta_data">Meta data</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy will set informative values to the Req object at various
-points of the execution. You can retrieve them by matching the
-Req object directly. The values are defined in the following table:</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"> Key </th>
-<th align="left" valign="top"> Details</th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td align="left" valign="top"><p class="table">media_type</p></td>
-<td align="left" valign="top"><p class="table">The content-type negotiated for the response entity.</p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">language</p></td>
-<td align="left" valign="top"><p class="table">The language negotiated for the response entity.</p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">charset</p></td>
-<td align="left" valign="top"><p class="table">The charset negotiated for the response entity.</p></td>
-</tr>
-</tbody>
-</table>
-</div>
-<div class="paragraph"><p>They can be used to send a proper body with the response to a
-request that used a method other than HEAD or GET.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Cowboy will set informative values to the Req object at various points of the execution. You can retrieve them by matching the Req object directly. The values are defined in the following table:</p>
+<table rules="all" width="100%" frame="border"
+ cellspacing="0" cellpadding="4">
+<thead><tr><th>Key</th>
+<th>Details</th>
+</tr></thead><tbody><tr><td>media_type</td>
+<td>The content-type negotiated for the response entity.</td>
+</tr>
+<tr><td>language</td>
+<td>The language negotiated for the response entity.</td>
+</tr>
+<tr><td>charset</td>
+<td>The charset negotiated for the response entity.</td>
+</tr>
+</tbody></table>
+<p>They can be used to send a proper body with the response to a request that used a method other than HEAD or GET.</p>
<h2 id="_response_headers">Response headers</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy will set response headers automatically over the execution
-of the REST code. They are listed in the following table.</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="left" valign="top"> Details</th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td align="left" valign="top"><p class="table">content-language</p></td>
-<td align="left" valign="top"><p class="table">Language used in the response body</p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">content-type</p></td>
-<td align="left" valign="top"><p class="table">Media type and charset of the response body</p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">etag</p></td>
-<td align="left" valign="top"><p class="table">Etag of the resource</p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">expires</p></td>
-<td align="left" valign="top"><p class="table">Expiration date of the resource</p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">last-modified</p></td>
-<td align="left" valign="top"><p class="table">Last modification date for the resource</p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">location</p></td>
-<td align="left" valign="top"><p class="table">Relative or absolute URI to the requested resource</p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">vary</p></td>
-<td align="left" valign="top"><p class="table">List of headers that may change the representation of the resource</p></td>
-</tr>
-</tbody>
-</table>
-</div>
-</div>
-</div>
+<p>Cowboy will set response headers automatically over the execution of the REST code. They are listed in the following table.</p>
+<table rules="all" width="100%" frame="border"
+ cellspacing="0" cellpadding="4">
+<thead><tr><th>Header name</th>
+<th>Details</th>
+</tr></thead><tbody><tr><td>content-language</td>
+<td>Language used in the response body</td>
+</tr>
+<tr><td>content-type</td>
+<td>Media type and charset of the response body</td>
+</tr>
+<tr><td>etag</td>
+<td>Etag of the resource</td>
+</tr>
+<tr><td>expires</td>
+<td>Expiration date of the resource</td>
+</tr>
+<tr><td>last-modified</td>
+<td>Last modification date for the resource</td>
+</tr>
+<tr><td>location</td>
+<td>Relative or absolute URI to the requested resource</td>
+</tr>
+<tr><td>vary</td>
+<td>List of headers that may change the representation of the resource</td>
+</tr>
+</tbody></table>
+
diff --git a/docs/en/cowboy/2.1/guide/rest_principles/index.html b/docs/en/cowboy/2.1/guide/rest_principles/index.html
index dddcb229..2df06a2c 100644
--- a/docs/en/cowboy/2.1/guide/rest_principles/index.html
+++ b/docs/en/cowboy/2.1/guide/rest_principles/index.html
@@ -62,153 +62,38 @@
<h1 class="lined-header"><span>REST principles</span></h1>
-<div class="paragraph"><p>This chapter will attempt to define the concepts behind REST
-and explain what makes a service RESTful.</p></div>
-<div class="paragraph"><p>REST is often confused with performing a distinct operation
-depending on the HTTP method, while using more than the GET
-and POST methods. That&#8217;s highly misguided at best.</p></div>
-<div class="paragraph"><p>We will first attempt to define REST and will look at what
-it means in the context of HTTP and the Web.
-For a more in-depth explanation of REST, you can read
-<a href="http://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm">Roy T. Fielding&#8217;s dissertation</a>
-as it does a great job explaining where it comes from and
-what it achieves.</p></div>
-<div class="sect1">
+<p>This chapter will attempt to define the concepts behind REST and explain what makes a service RESTful.</p>
+<p>REST is often confused with performing a distinct operation depending on the HTTP method, while using more than the GET and POST methods. That&apos;s highly misguided at best.</p>
+<p>We will first attempt to define REST and will look at what it means in the context of HTTP and the Web. For a more in-depth explanation of REST, you can read <a href="http://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm">Roy T. Fielding&apos;s dissertation</a> as it does a great job explaining where it comes from and what it achieves.</p>
<h2 id="_rest_architecture">REST architecture</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>REST is a <strong>client-server</strong> architecture. The client and the server
-both have a different set of concerns. The server stores and/or
-manipulates information and makes it available to the user in
-an efficient manner. The client takes that information and
-displays it to the user and/or uses it to perform subsequent
-requests for information. This separation of concerns allows both
-the client and the server to evolve independently as it only
-requires that the interface stays the same.</p></div>
-<div class="paragraph"><p>REST is <strong>stateless</strong>. That means the communication between the
-client and the server always contains all the information needed
-to perform the request. There is no session state in the server,
-it is kept entirely on the client&#8217;s side. If access to a resource
-requires authentication, then the client needs to authenticate
-itself with every request.</p></div>
-<div class="paragraph"><p>REST is <strong>cacheable</strong>. The client, the server and any intermediary
-components can all cache resources in order to improve performance.</p></div>
-<div class="paragraph"><p>REST provides a <strong>uniform interface</strong> between components. This
-simplifies the architecture, as all components follow the same
-rules to speak to one another. It also makes it easier to understand
-the interactions between the different components of the system.
-A number of constraints are required to achieve this. They are
-covered in the rest of the chapter.</p></div>
-<div class="paragraph"><p>REST is a <strong>layered system</strong>. Individual components cannot see
-beyond the immediate layer with which they are interacting. This
-means that a client connecting to an intermediate component, like
-a proxy, has no knowledge of what lies beyond. This allows
-components to be independent and thus easily replaceable or
-extendable.</p></div>
-<div class="paragraph"><p>REST optionally provides <strong>code on demand</strong>. Code may be downloaded
-to extend client functionality. This is optional however because
-the client may not be able to download or run this code, and so
-a REST component cannot rely on it being executed.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>REST is a <strong>client-server</strong> architecture. The client and the server both have a different set of concerns. The server stores and/or manipulates information and makes it available to the user in an efficient manner. The client takes that information and displays it to the user and/or uses it to perform subsequent requests for information. This separation of concerns allows both the client and the server to evolve independently as it only requires that the interface stays the same.</p>
+<p>REST is <strong>stateless</strong>. That means the communication between the client and the server always contains all the information needed to perform the request. There is no session state in the server, it is kept entirely on the client&apos;s side. If access to a resource requires authentication, then the client needs to authenticate itself with every request.</p>
+<p>REST is <strong>cacheable</strong>. The client, the server and any intermediary components can all cache resources in order to improve performance.</p>
+<p>REST provides a <strong>uniform interface</strong> between components. This simplifies the architecture, as all components follow the same rules to speak to one another. It also makes it easier to understand the interactions between the different components of the system. A number of constraints are required to achieve this. They are covered in the rest of the chapter.</p>
+<p>REST is a <strong>layered system</strong>. Individual components cannot see beyond the immediate layer with which they are interacting. This means that a client connecting to an intermediate component, like a proxy, has no knowledge of what lies beyond. This allows components to be independent and thus easily replaceable or extendable.</p>
+<p>REST optionally provides <strong>code on demand</strong>. Code may be downloaded to extend client functionality. This is optional however because the client may not be able to download or run this code, and so a REST component cannot rely on it being executed.</p>
<h2 id="_resources_and_resource_identifiers">Resources and resource identifiers</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A resource is an abstract concept. In a REST system, any information
-that can be named may be a resource. This includes documents, images,
-a collection of resources and any other information. Any information
-that can be the target of an hypertext link can be a resource.</p></div>
-<div class="paragraph"><p>A resource is a conceptual mapping to a set of entities. The set of
-entities evolves over time; a resource doesn&#8217;t. For example, a resource
-can map to "users who have logged in this past month" and another
-to "all users". At some point in time they may map to the same set of
-entities, because all users logged in this past month. But they are
-still different resources. Similarly, if nobody logged in recently,
-then the first resource may map to the empty set. This resource exists
-regardless of the information it maps to.</p></div>
-<div class="paragraph"><p>Resources are identified by uniform resource identifiers, also known
-as URIs. Sometimes internationalized resource identifiers, or IRIs,
-may also be used, but these can be directly translated into a URI.</p></div>
-<div class="paragraph"><p>In practice we will identify two kinds of resources. Individual
-resources map to a set of one element, for example "user Joe".
-Collection of resources map to a set of 0 to N elements,
-for example "all users".</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>A resource is an abstract concept. In a REST system, any information that can be named may be a resource. This includes documents, images, a collection of resources and any other information. Any information that can be the target of an hypertext link can be a resource.</p>
+<p>A resource is a conceptual mapping to a set of entities. The set of entities evolves over time; a resource doesn&apos;t. For example, a resource can map to &quot;users who have logged in this past month&quot; and another to &quot;all users&quot;. At some point in time they may map to the same set of entities, because all users logged in this past month. But they are still different resources. Similarly, if nobody logged in recently, then the first resource may map to the empty set. This resource exists regardless of the information it maps to.</p>
+<p>Resources are identified by uniform resource identifiers, also known as URIs. Sometimes internationalized resource identifiers, or IRIs, may also be used, but these can be directly translated into a URI.</p>
+<p>In practice we will identify two kinds of resources. Individual resources map to a set of one element, for example &quot;user Joe&quot;. Collection of resources map to a set of 0 to N elements, for example &quot;all users&quot;.</p>
<h2 id="_resource_representations">Resource representations</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The representation of a resource is a sequence of bytes associated
-with metadata.</p></div>
-<div class="paragraph"><p>The metadata comes as a list of key-value pairs, where the name
-corresponds to a standard that defines the value&#8217;s structure and
-semantics. With HTTP, the metadata comes in the form of request
-or response headers. The headers' structure and semantics are well
-defined in the HTTP standard. Metadata includes representation
-metadata, resource metadata and control data.</p></div>
-<div class="paragraph"><p>The representation metadata gives information about the
-representation, such as its media type, the date of last
-modification, or even a checksum.</p></div>
-<div class="paragraph"><p>Resource metadata could be link to related resources or
-information about additional representations of the resource.</p></div>
-<div class="paragraph"><p>Control data allows parameterizing the request or response.
-For example, we may only want the representation returned if
-it is more recent than the one we have in cache. Similarly,
-we may want to instruct the client about how it should cache
-the representation. This isn&#8217;t restricted to caching. We may,
-for example, want to store a new representation of a resource
-only if it wasn&#8217;t modified since we first retrieved it.</p></div>
-<div class="paragraph"><p>The data format of a representation is also known as the media
-type. Some media types are intended for direct rendering to the
-user, while others are intended for automated processing. The
-media type is a key component of the REST architecture.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The representation of a resource is a sequence of bytes associated with metadata.</p>
+<p>The metadata comes as a list of key-value pairs, where the name corresponds to a standard that defines the value&apos;s structure and semantics. With HTTP, the metadata comes in the form of request or response headers. The headers&apos; structure and semantics are well defined in the HTTP standard. Metadata includes representation metadata, resource metadata and control data.</p>
+<p>The representation metadata gives information about the representation, such as its media type, the date of last modification, or even a checksum.</p>
+<p>Resource metadata could be link to related resources or information about additional representations of the resource.</p>
+<p>Control data allows parameterizing the request or response. For example, we may only want the representation returned if it is more recent than the one we have in cache. Similarly, we may want to instruct the client about how it should cache the representation. This isn&apos;t restricted to caching. We may, for example, want to store a new representation of a resource only if it wasn&apos;t modified since we first retrieved it.</p>
+<p>The data format of a representation is also known as the media type. Some media types are intended for direct rendering to the user, while others are intended for automated processing. The media type is a key component of the REST architecture.</p>
<h2 id="_self_descriptive_messages">Self-descriptive messages</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Messages must be self-descriptive. That means that the data
-format of a representation must always come with its media
-type (and similarly requesting a resource involves choosing
-the media type of the representation returned). If you are
-sending HTML, then you must say it is HTML by sending the
-media type with the representation. In HTTP this is done
-using the content-type header.</p></div>
-<div class="paragraph"><p>The media type is often an IANA registered media type, like
-<code>text/html</code> or <code>image/png</code>, but does not need to be. Exactly
-two things are important for respecting this constraint: that
-the media type is well specified, and that the sender and
-recipient agree about what the media type refers to.</p></div>
-<div class="paragraph"><p>This means that you can create your own media types, like
-<code>application/x-mine</code>, and that as long as you write the
-specifications for it and that both endpoints agree about
-it then the constraint is respected.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Messages must be self-descriptive. That means that the data format of a representation must always come with its media type (and similarly requesting a resource involves choosing the media type of the representation returned). If you are sending HTML, then you must say it is HTML by sending the media type with the representation. In HTTP this is done using the content-type header.</p>
+<p>The media type is often an IANA registered media type, like <code>text/html</code> or <code>image/png</code>, but does not need to be. Exactly two things are important for respecting this constraint: that the media type is well specified, and that the sender and recipient agree about what the media type refers to.</p>
+<p>This means that you can create your own media types, like <code>application/x-mine</code>, and that as long as you write the specifications for it and that both endpoints agree about it then the constraint is respected.</p>
<h2 id="_hypermedia_as_the_engine_of_application_state">Hypermedia as the engine of application state</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The last constraint is generally where services that claim
-to be RESTful fail. Interactions with a server must be
-entirely driven by hypermedia. The client does not need
-any prior knowledge of the service in order to use it,
-other than an entry point and of course basic understanding
-of the media type of the representations, at the very least
-enough to find and identify hyperlinks and link relations.</p></div>
-<div class="paragraph"><p>To give a simple example, if your service only works with
-the <code>application/json</code> media type then this constraint
-cannot be respected (as there are no concept of links in
-JSON) and thus your service isn&#8217;t RESTful. This is the case
-for the majority of self-proclaimed REST services.</p></div>
-<div class="paragraph"><p>On the other hand if you create a JSON based media type
-that has a concept of links and link relations, then
-your service might be RESTful.</p></div>
-<div class="paragraph"><p>Respecting this constraint means that the entirety of the
-service becomes self-discoverable, not only the resources
-in it, but also the operations you can perform on it. This
-makes clients very thin as there is no need to implement
-anything specific to the service to operate on it.</p></div>
-</div>
-</div>
+<p>The last constraint is generally where services that claim to be RESTful fail. Interactions with a server must be entirely driven by hypermedia. The client does not need any prior knowledge of the service in order to use it, other than an entry point and of course basic understanding of the media type of the representations, at the very least enough to find and identify hyperlinks and link relations.</p>
+<p>To give a simple example, if your service only works with the <code>application/json</code> media type then this constraint cannot be respected (as there are no concept of links in JSON) and thus your service isn&apos;t RESTful. This is the case for the majority of self-proclaimed REST services.</p>
+<p>On the other hand if you create a JSON based media type that has a concept of links and link relations, then your service might be RESTful.</p>
+<p>Respecting this constraint means that the entirety of the service becomes self-discoverable, not only the resources in it, but also the operations you can perform on it. This makes clients very thin as there is no need to implement anything specific to the service to operate on it.</p>
+
diff --git a/docs/en/cowboy/2.1/guide/routing/index.html b/docs/en/cowboy/2.1/guide/routing/index.html
index 513a8b94..6080fa67 100644
--- a/docs/en/cowboy/2.1/guide/routing/index.html
+++ b/docs/en/cowboy/2.1/guide/routing/index.html
@@ -62,261 +62,181 @@
<h1 class="lined-header"><span>Routing</span></h1>
-<div class="paragraph"><p>Cowboy does nothing by default.</p></div>
-<div class="paragraph"><p>To make Cowboy useful, you need to map URIs to Erlang modules that will
-handle the requests. This is called routing.</p></div>
-<div class="paragraph"><p>When Cowboy receives a request, it tries to match the requested host and
-path to the configured routes. When there&#8217;s a match, the route&#8217;s
-associated handler is executed.</p></div>
-<div class="paragraph"><p>Routes need to be compiled before they can be used by Cowboy.
-The result of the compilation is the dispatch rules.</p></div>
-<div class="sect1">
+<p>Cowboy does nothing by default.</p>
+<p>To make Cowboy useful, you need to map URIs to Erlang modules that will handle the requests. This is called routing.</p>
+<p>When Cowboy receives a request, it tries to match the requested host and path to the configured routes. When there&apos;s a match, the route&apos;s associated handler is executed.</p>
+<p>Routes need to be compiled before they can be used by Cowboy. The result of the compilation is the dispatch rules.</p>
<h2 id="_syntax">Syntax</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The general structure for the routes is defined as follow.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The general structure for the routes is defined as follow.</p>
+<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">Routes</span> <span style="color: #990000">=</span> [<span style="color: #009900">Host1</span>, <span style="color: #009900">Host2</span>, <span style="color: #990000">...</span> <span style="color: #009900">HostN</span>]<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Each host contains matching rules for the host along with optional
-constraints, and a list of routes for the path component.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Routes</font> <font color="#990000">=</font> [<font color="#009900">Host1</font>, <font color="#009900">Host2</font>, <font color="#990000">...</font> <font color="#009900">HostN</font>]<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Each host contains matching rules for the host along with optional constraints, and a list of routes for the path component.</p>
+<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">Host1</span> <span style="color: #990000">=</span> {<span style="color: #009900">HostMatch</span>, <span style="color: #009900">PathsList</span>}<span style="color: #990000">.</span>
-<span style="color: #009900">Host2</span> <span style="color: #990000">=</span> {<span style="color: #009900">HostMatch</span>, <span style="color: #009900">Constraints</span>, <span style="color: #009900">PathsList</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>The list of routes for the path component is defined similar to the
-list of hosts.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Host1</font> <font color="#990000">=</font> {<font color="#009900">HostMatch</font>, <font color="#009900">PathsList</font>}<font color="#990000">.</font>
+<font color="#009900">Host2</font> <font color="#990000">=</font> {<font color="#009900">HostMatch</font>, <font color="#009900">Constraints</font>, <font color="#009900">PathsList</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>The list of routes for the path component is defined similar to the list of hosts.</p>
+<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">PathsList</span> <span style="color: #990000">=</span> [<span style="color: #009900">Path1</span>, <span style="color: #009900">Path2</span>, <span style="color: #990000">...</span> <span style="color: #009900">PathN</span>]<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Finally, each path contains matching rules for the path along with
-optional constraints, and gives us the handler module to be used
-along with its initial state.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">PathsList</font> <font color="#990000">=</font> [<font color="#009900">Path1</font>, <font color="#009900">Path2</font>, <font color="#990000">...</font> <font color="#009900">PathN</font>]<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Finally, each path contains matching rules for the path along with optional constraints, and gives us the handler module to be used along with its initial state.</p>
+<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">Path1</span> <span style="color: #990000">=</span> {<span style="color: #009900">PathMatch</span>, <span style="color: #009900">Handler</span>, <span style="color: #009900">InitialState</span>}<span style="color: #990000">.</span>
-<span style="color: #009900">Path2</span> <span style="color: #990000">=</span> {<span style="color: #009900">PathMatch</span>, <span style="color: #009900">Constraints</span>, <span style="color: #009900">Handler</span>, <span style="color: #009900">InitialState</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Continue reading to learn more about the match syntax and the optional
-constraints.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Path1</font> <font color="#990000">=</font> {<font color="#009900">PathMatch</font>, <font color="#009900">Handler</font>, <font color="#009900">InitialState</font>}<font color="#990000">.</font>
+<font color="#009900">Path2</font> <font color="#990000">=</font> {<font color="#009900">PathMatch</font>, <font color="#009900">Constraints</font>, <font color="#009900">Handler</font>, <font color="#009900">InitialState</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Continue reading to learn more about the match syntax and the optional constraints.</p>
<h2 id="_match_syntax">Match syntax</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The match syntax is used to associate host names and paths with their
-respective handlers.</p></div>
-<div class="paragraph"><p>The match syntax is the same for host and path with a few subtleties.
-Indeed, the segments separator is different, and the host is matched
-starting from the last segment going to the first. All examples will
-feature both host and path match rules and explain the differences
-when encountered.</p></div>
-<div class="paragraph"><p>Excluding special values that we will explain at the end of this section,
-the simplest match value is a host or a path. It can be given as either
-a <code>string()</code> or a <code>binary()</code>.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The match syntax is used to associate host names and paths with their respective handlers.</p>
+<p>The match syntax is the same for host and path with a few subtleties. Indeed, the segments separator is different, and the host is matched starting from the last segment going to the first. All examples will feature both host and path match rules and explain the differences when encountered.</p>
+<p>Excluding special values that we will explain at the end of this section, the simplest match value is a host or a path. It can be given as either a <code>string()</code> or a <code>binary()</code>.</p>
+<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">PathMatch1</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"/"</span><span style="color: #990000">.</span>
-<span style="color: #009900">PathMatch2</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"/path/to/resource"</span><span style="color: #990000">.</span>
-
-<span style="color: #009900">HostMatch1</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"cowboy.example.org"</span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>As you can see, all paths defined this way must start with a slash
-character. Note that these two paths are identical as far as routing
-is concerned.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">PathMatch1</font> <font color="#990000">=</font> <font color="#FF0000">"/"</font><font color="#990000">.</font>
+<font color="#009900">PathMatch2</font> <font color="#990000">=</font> <font color="#FF0000">"/path/to/resource"</font><font color="#990000">.</font>
+
+<font color="#009900">HostMatch1</font> <font color="#990000">=</font> <font color="#FF0000">"cowboy.example.org"</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>As you can see, all paths defined this way must start with a slash character. Note that these two paths are identical as far as routing is concerned.</p>
+<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">PathMatch2</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"/path/to/resource"</span><span style="color: #990000">.</span>
-<span style="color: #009900">PathMatch3</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"/path/to/resource/"</span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Hosts with and without a trailing dot are equivalent for routing.
-Similarly, hosts with and without a leading dot are also equivalent.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">PathMatch2</font> <font color="#990000">=</font> <font color="#FF0000">"/path/to/resource"</font><font color="#990000">.</font>
+<font color="#009900">PathMatch3</font> <font color="#990000">=</font> <font color="#FF0000">"/path/to/resource/"</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Hosts with and without a trailing dot are equivalent for routing. Similarly, hosts with and without a leading dot are also equivalent.</p>
+<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">HostMatch1</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"cowboy.example.org"</span><span style="color: #990000">.</span>
-<span style="color: #009900">HostMatch2</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"cowboy.example.org."</span><span style="color: #990000">.</span>
-<span style="color: #009900">HostMatch3</span> <span style="color: #990000">=</span> <span style="color: #FF0000">".cowboy.example.org"</span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>It is possible to extract segments of the host and path and to store
-the values in the <code>Req</code> object for later use. We call these kind of
-values bindings.</p></div>
-<div class="paragraph"><p>The syntax for bindings is very simple. A segment that begins with
-the <code>:</code> character means that what follows until the end of the segment
-is the name of the binding in which the segment value will be stored.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">HostMatch1</font> <font color="#990000">=</font> <font color="#FF0000">"cowboy.example.org"</font><font color="#990000">.</font>
+<font color="#009900">HostMatch2</font> <font color="#990000">=</font> <font color="#FF0000">"cowboy.example.org."</font><font color="#990000">.</font>
+<font color="#009900">HostMatch3</font> <font color="#990000">=</font> <font color="#FF0000">".cowboy.example.org"</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>It is possible to extract segments of the host and path and to store the values in the <code>Req</code> object for later use. We call these kind of values bindings.</p>
+<p>The syntax for bindings is very simple. A segment that begins with the <code>:</code> character means that what follows until the end of the segment is the name of the binding in which the segment value will be stored.</p>
+<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">PathMatch</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"/hats/:name/prices"</span><span style="color: #990000">.</span>
-<span style="color: #009900">HostMatch</span> <span style="color: #990000">=</span> <span style="color: #FF0000">":subdomain.example.org"</span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>If these two end up matching when routing, you will end up with two
-bindings defined, <code>subdomain</code> and <code>name</code>, each containing the
-segment value where they were defined. For example, the URL
-<code>http://test.example.org/hats/wild_cowboy_legendary/prices</code> will
-result in having the value <code>test</code> bound to the name <code>subdomain</code>
-and the value <code>wild_cowboy_legendary</code> bound to the name <code>name</code>.
-They can later be retrieved using <code>cowboy_req:binding/{2,3}</code>. The
-binding name must be given as an atom.</p></div>
-<div class="paragraph"><p>There is a special binding name you can use to mimic the underscore
-variable in Erlang. Any match against the <code>_</code> binding will succeed
-but the data will be discarded. This is especially useful for
-matching against many domain names in one go.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">PathMatch</font> <font color="#990000">=</font> <font color="#FF0000">"/hats/:name/prices"</font><font color="#990000">.</font>
+<font color="#009900">HostMatch</font> <font color="#990000">=</font> <font color="#FF0000">":subdomain.example.org"</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>If these two end up matching when routing, you will end up with two bindings defined, <code>subdomain</code> and <code>name</code>, each containing the segment value where they were defined. For example, the URL <code>http://test.example.org/hats/wild_cowboy_legendary/prices</code> will result in having the value <code>test</code> bound to the name <code>subdomain</code> and the value <code>wild_cowboy_legendary</code> bound to the name <code>name</code>. They can later be retrieved using <code>cowboy_req:binding/{2,3}</code>. The binding name must be given as an atom.</p>
+<p>There is a special binding name you can use to mimic the underscore variable in Erlang. Any match against the <code>_</code> binding will succeed but the data will be discarded. This is especially useful for matching against many domain names in one go.</p>
+<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">HostMatch</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"ninenines.:_"</span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Similarly, it is possible to have optional segments. Anything
-between brackets is optional.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">HostMatch</font> <font color="#990000">=</font> <font color="#FF0000">"ninenines.:_"</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Similarly, it is possible to have optional segments. Anything between brackets is optional.</p>
+<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">PathMatch</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"/hats/[page/:number]"</span><span style="color: #990000">.</span>
-<span style="color: #009900">HostMatch</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"[www.]ninenines.eu"</span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>You can also have imbricated optional segments.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">PathMatch</font> <font color="#990000">=</font> <font color="#FF0000">"/hats/[page/:number]"</font><font color="#990000">.</font>
+<font color="#009900">HostMatch</font> <font color="#990000">=</font> <font color="#FF0000">"[www.]ninenines.eu"</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>You can also have imbricated optional segments.</p>
+<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">PathMatch</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"/hats/[page/[:number]]"</span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>You can retrieve the rest of the host or path using <code>[...]</code>.
-In the case of hosts it will match anything before, in the case
-of paths anything after the previously matched segments. It is
-a special case of optional segments, in that it can have
-zero, one or many segments. You can then find the segments using
-<code>cowboy_req:host_info/1</code> and <code>cowboy_req:path_info/1</code> respectively.
-They will be represented as a list of segments.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">PathMatch</font> <font color="#990000">=</font> <font color="#FF0000">"/hats/[page/[:number]]"</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>You can retrieve the rest of the host or path using <code>[...]</code>. In the case of hosts it will match anything before, in the case of paths anything after the previously matched segments. It is a special case of optional segments, in that it can have zero, one or many segments. You can then find the segments using <code>cowboy_req:host_info/1</code> and <code>cowboy_req:path_info/1</code> respectively. They will be represented as a list of segments.</p>
+<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">PathMatch</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"/hats/[...]"</span><span style="color: #990000">.</span>
-<span style="color: #009900">HostMatch</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"[...]ninenines.eu"</span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>If a binding appears twice in the routing rules, then the match
-will succeed only if they share the same value. This copies the
-Erlang pattern matching behavior.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">PathMatch</font> <font color="#990000">=</font> <font color="#FF0000">"/hats/[...]"</font><font color="#990000">.</font>
+<font color="#009900">HostMatch</font> <font color="#990000">=</font> <font color="#FF0000">"[...]ninenines.eu"</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>If a binding appears twice in the routing rules, then the match will succeed only if they share the same value. This copies the Erlang pattern matching behavior.</p>
+<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">PathMatch</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"/hats/:name/:name"</span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>This is also true when an optional segment is present. In this
-case the two values must be identical only if the segment is
-available.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">PathMatch</font> <font color="#990000">=</font> <font color="#FF0000">"/hats/:name/:name"</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>This is also true when an optional segment is present. In this case the two values must be identical only if the segment is available.</p>
+<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">PathMatch</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"/hats/:name/[:name]"</span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>If a binding is defined in both the host and path, then they must
-also share the same value.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">PathMatch</font> <font color="#990000">=</font> <font color="#FF0000">"/hats/:name/[:name]"</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>If a binding is defined in both the host and path, then they must also share the same value.</p>
+<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">PathMatch</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"/:user/[...]"</span><span style="color: #990000">.</span>
-<span style="color: #009900">HostMatch</span> <span style="color: #990000">=</span> <span style="color: #FF0000">":user.github.com"</span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Finally, there are two special match values that can be used. The
-first is the atom <code>'_'</code> which will match any host or path.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">PathMatch</font> <font color="#990000">=</font> <font color="#FF0000">"/:user/[...]"</font><font color="#990000">.</font>
+<font color="#009900">HostMatch</font> <font color="#990000">=</font> <font color="#FF0000">":user.github.com"</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Finally, there are two special match values that can be used. The first is the atom <code>&apos;_&apos;</code> which will match any host or path.</p>
+<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">PathMatch</span> <span style="color: #990000">=</span> <span style="color: #FF6600">'_'</span><span style="color: #990000">.</span>
-<span style="color: #009900">HostMatch</span> <span style="color: #990000">=</span> <span style="color: #FF6600">'_'</span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>The second is the special host match <code>"*"</code> which will match the
-wildcard path, generally used alongside the <code>OPTIONS</code> method.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">PathMatch</font> <font color="#990000">=</font> <font color="#FF6600">'_'</font><font color="#990000">.</font>
+<font color="#009900">HostMatch</font> <font color="#990000">=</font> <font color="#FF6600">'_'</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>The second is the special host match <code>&quot;*&quot;</code> which will match the wildcard path, generally used alongside the <code>OPTIONS</code> method.</p>
+<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">HostMatch</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"*"</span><span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">HostMatch</font> <font color="#990000">=</font> <font color="#FF0000">"*"</font><font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_constraints">Constraints</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>After the matching has completed, the resulting bindings can be tested
-against a set of constraints. Constraints are only tested when the
-binding is defined. They run in the order you defined them. The match
-will succeed only if they all succeed. If the match fails, then Cowboy
-tries the next route in the list.</p></div>
-<div class="paragraph"><p>The format used for constraints is the same as match functions in
-<code>cowboy_req</code>: they are provided as a list of fields which may have
-one or more constraints. While the router accepts the same format,
-it will skip fields with no constraints and will also ignore default
-values, if any.</p></div>
-<div class="paragraph"><p>Read more about <a href="../constraints">constraints</a>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>After the matching has completed, the resulting bindings can be tested against a set of constraints. Constraints are only tested when the binding is defined. They run in the order you defined them. The match will succeed only if they all succeed. If the match fails, then Cowboy tries the next route in the list.</p>
+<p>The format used for constraints is the same as match functions in <code>cowboy_req</code>: they are provided as a list of fields which may have one or more constraints. While the router accepts the same format, it will skip fields with no constraints and will also ignore default values, if any.</p>
+<p>Read more about <a href="../constraints">constraints</a>.</p>
<h2 id="_compilation">Compilation</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The routes must be compiled before Cowboy can use them. The compilation
-step normalizes the routes to simplify the code and speed up the
-execution, but the routes are still looked up one by one in the end.
-Faster compilation strategies could be to compile the routes directly
-to Erlang code, but would require heavier dependencies.</p></div>
-<div class="paragraph"><p>To compile routes, just call the appropriate function:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The routes must be compiled before Cowboy can use them. The compilation step normalizes the routes to simplify the code and speed up the execution, but the routes are still looked up one by one in the end. Faster compilation strategies could be to compile the routes directly to Erlang code, but would require heavier dependencies.</p>
+<p>To compile routes, just call the appropriate function:</p>
+<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">Dispatch</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_router:compile</span></span>([
- <span style="font-style: italic"><span style="color: #9A1900">%% {HostMatch, list({PathMatch, Handler, InitialState})}</span></span>
- {<span style="color: #FF6600">'_'</span>, [{<span style="color: #FF6600">'_'</span>, <span style="color: #FF6600">my_handler</span>, #{}}]}
+<pre><tt><font color="#009900">Dispatch</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_router:compile</font></b>([
+ <i><font color="#9A1900">%% {HostMatch, list({PathMatch, Handler, InitialState})}</font></i>
+ {<font color="#FF6600">'_'</font>, [{<font color="#FF6600">'_'</font>, <font color="#FF6600">my_handler</font>, #{}}]}
]),
-<span style="font-style: italic"><span style="color: #9A1900">%% Name, NbAcceptors, TransOpts, ProtoOpts</span></span>
-<span style="font-weight: bold"><span style="color: #000000">cowboy:start_clear</span></span>(<span style="color: #FF6600">my_http_listener</span>,
- [{<span style="color: #FF6600">port</span>, <span style="color: #993399">8080</span>}],
- #{<span style="color: #0000FF">env</span> <span style="color: #990000">=&gt;</span> #{<span style="color: #0000FF">dispatch</span> <span style="color: #990000">=&gt;</span> <span style="color: #009900">Dispatch</span>}}
-)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<i><font color="#9A1900">%% Name, NbAcceptors, TransOpts, ProtoOpts</font></i>
+<b><font color="#000000">cowboy:start_clear</font></b>(<font color="#FF6600">my_http_listener</font>,
+ [{<font color="#FF6600">port</font>, <font color="#993399">8080</font>}],
+ #{<font color="#0000FF">env</font> <font color="#990000">=&gt;</font> #{<font color="#0000FF">dispatch</font> <font color="#990000">=&gt;</font> <font color="#009900">Dispatch</font>}}
+)<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_live_update">Live update</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>You can use the <code>cowboy:set_env/3</code> function for updating the dispatch
-list used by routing. This will apply to all new connections accepted
-by the listener:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>You can use the <code>cowboy:set_env/3</code> function for updating the dispatch list used by routing. This will apply to all new connections accepted by the listener:</p>
+<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">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>
+<pre><tt><font color="#009900">Dispatch</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_router:compile</font></b>(<font color="#009900">Routes</font>),
+<b><font color="#000000">cowboy:set_env</font></b>(<font color="#FF6600">my_http_listener</font>, <font color="#FF6600">dispatch</font>, <font color="#009900">Dispatch</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Note that you need to compile the routes again before updating.</p>
+
diff --git a/docs/en/cowboy/2.1/guide/specs/index.html b/docs/en/cowboy/2.1/guide/specs/index.html
index a35ac154..4b24e97c 100644
--- a/docs/en/cowboy/2.1/guide/specs/index.html
+++ b/docs/en/cowboy/2.1/guide/specs/index.html
@@ -62,839 +62,337 @@
<h1 class="lined-header"><span>HTTP and other specifications</span></h1>
-<div class="paragraph"><p>This chapter intends to list all the specification documents
-for or related to HTTP.</p></div>
-<div class="sect1">
+<p>This chapter intends to list all the specification documents for or related to HTTP.</p>
<h2 id="_http">HTTP</h2>
-<div class="sectionbody">
-<div class="sect3">
<h4 id="_iana_registries">IANA Registries</h4>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="https://www.iana.org/assignments/http-methods/http-methods.xhtml">HTTP Method Registry</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml">HTTP Status Code Registry</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.iana.org/assignments/message-headers/message-headers.xhtml">Message Headers</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.iana.org/assignments/http-parameters/http-parameters.xhtml">HTTP Parameters</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.iana.org/assignments/http-alt-svc-parameters/http-alt-svc-parameters.xhtml">HTTP Alt-Svc Parameter Registry</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.iana.org/assignments/http-authschemes/http-authschemes.xhtml">HTTP Authentication Scheme Registry</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.iana.org/assignments/http-cache-directives/http-cache-directives.xhtml">HTTP Cache Directive Registry</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.iana.org/assignments/http-dig-alg/http-dig-alg.xhtml">HTTP Digest Algorithm Values</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.iana.org/assignments/hoba-device-identifiers/hoba-device-identifiers.xhtml">HTTP Origin-Bound Authentication Device Identifier Types</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.iana.org/assignments/http-upgrade-tokens/http-upgrade-tokens.xhtml">HTTP Upgrade Token Registry</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.iana.org/assignments/http-warn-codes/http-warn-codes.xhtml">HTTP Warn Codes</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.iana.org/assignments/http2-parameters/http2-parameters.xhtml">HTTP/2 Parameters</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.ietf.org/assignments/websocket/websocket.xml">WebSocket Protocol Registries</a>
-</p>
-</li>
-</ul></div>
-</div>
-<div class="sect3">
+<ul><li><a href="https://www.iana.org/assignments/http-methods/http-methods.xhtml">HTTP Method Registry</a>
+</li>
+<li><a href="https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml">HTTP Status Code Registry</a>
+</li>
+<li><a href="https://www.iana.org/assignments/message-headers/message-headers.xhtml">Message Headers</a>
+</li>
+<li><a href="https://www.iana.org/assignments/http-parameters/http-parameters.xhtml">HTTP Parameters</a>
+</li>
+<li><a href="https://www.iana.org/assignments/http-alt-svc-parameters/http-alt-svc-parameters.xhtml">HTTP Alt-Svc Parameter Registry</a>
+</li>
+<li><a href="https://www.iana.org/assignments/http-authschemes/http-authschemes.xhtml">HTTP Authentication Scheme Registry</a>
+</li>
+<li><a href="https://www.iana.org/assignments/http-cache-directives/http-cache-directives.xhtml">HTTP Cache Directive Registry</a>
+</li>
+<li><a href="https://www.iana.org/assignments/http-dig-alg/http-dig-alg.xhtml">HTTP Digest Algorithm Values</a>
+</li>
+<li><a href="https://www.iana.org/assignments/hoba-device-identifiers/hoba-device-identifiers.xhtml">HTTP Origin-Bound Authentication Device Identifier Types</a>
+</li>
+<li><a href="https://www.iana.org/assignments/http-upgrade-tokens/http-upgrade-tokens.xhtml">HTTP Upgrade Token Registry</a>
+</li>
+<li><a href="https://www.iana.org/assignments/http-warn-codes/http-warn-codes.xhtml">HTTP Warn Codes</a>
+</li>
+<li><a href="https://www.iana.org/assignments/http2-parameters/http2-parameters.xhtml">HTTP/2 Parameters</a>
+</li>
+<li><a href="https://www.ietf.org/assignments/websocket/websocket.xml">WebSocket Protocol Registries</a>
+</li>
+</ul>
<h4 id="_current">Current</h4>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="http://www.w3.org/TR/cors/">CORS</a>: Cross-Origin Resource Sharing
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/CSP2/">CSP2</a>: Content Security Policy Level 2
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/tracking-dnt/">DNT</a>: Tracking Preference Expression (DNT)
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/eventsource/">eventsource</a>: Server-Sent Events
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.w3.org/TR/html4/interact/forms.html#h-17.13.4">Form content types</a>: Form content types
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.w3.org/TR/preload/">Preload</a>: Preload
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm">REST</a>: Fielding&#8217;s Dissertation
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc1945">RFC 1945</a>: HTTP/1.0
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc1951">RFC 1951</a>: DEFLATE Compressed Data Format Specification version 1.3
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc1952">RFC 1952</a>: GZIP file format specification version 4.3
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc2046#section-5.1">RFC 2046</a>: Multipart media type (in MIME Part Two: Media Types)
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc2295">RFC 2295</a>: Transparent Content Negotiation in HTTP
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc2296">RFC 2296</a>: HTTP Remote Variant Selection Algorithm: RVSA/1.0
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc2817">RFC 2817</a>: Upgrading to TLS Within HTTP/1.1
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc2818">RFC 2818</a>: HTTP Over TLS
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc3230">RFC 3230</a>: Instance Digests in HTTP
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc4559">RFC 4559</a>: SPNEGO-based Kerberos and NTLM HTTP Authentication in Microsoft Windows
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc5789">RFC 5789</a>: PATCH Method for HTTP
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc5843">RFC 5843</a>: Additional Hash Algorithms for HTTP Instance Digests
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc5861">RFC 5861</a>: HTTP Cache-Control Extensions for Stale Content
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc5988">RFC 5988</a>: Web Linking
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6265">RFC 6265</a>: HTTP State Management Mechanism
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6266">RFC 6266</a>: Use of the Content-Disposition Header Field
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6454">RFC 6454</a>: The Web Origin Concept
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6455">RFC 6455</a>: The WebSocket Protocol
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6585">RFC 6585</a>: Additional HTTP Status Codes
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6750">RFC 6750</a>: The OAuth 2.0 Authorization Framework: Bearer Token Usage
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6797">RFC 6797</a>: HTTP Strict Transport Security (HSTS)
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6903">RFC 6903</a>: Additional Link Relation Types
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7034">RFC 7034</a>: HTTP Header Field X-Frame-Options
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7089">RFC 7089</a>: Time-Based Access to Resource States: Memento
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7230">RFC 7230</a>: HTTP/1.1 Message Syntax and Routing
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7231">RFC 7231</a>: HTTP/1.1 Semantics and Content
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>: HTTP/1.1 Conditional Requests
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7233">RFC 7233</a>: HTTP/1.1 Range Requests
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7234">RFC 7234</a>: HTTP/1.1 Caching
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7235">RFC 7235</a>: HTTP/1.1 Authentication
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7239">RFC 7239</a>: Forwarded HTTP Extension
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7240">RFC 7240</a>: Prefer Header for HTTP
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7469">RFC 7469</a>: Public Key Pinning Extension for HTTP
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7486">RFC 7486</a>: HTTP Origin-Bound Authentication (HOBA)
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7538">RFC 7538</a>: HTTP Status Code 308 (Permanent Redirect)
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7540">RFC 7540</a>: Hypertext Transfer Protocol Version 2 (HTTP/2)
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7541">RFC 7541</a>: HPACK: Header Compression for HTTP/2
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7578">RFC 7578</a>: Returning Values from Forms: multipart/form-data
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7615">RFC 7615</a>: HTTP Authentication-Info and Proxy-Authentication-Info Response Header Fields
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7616">RFC 7616</a>: HTTP Digest Access Authentication
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7617">RFC 7617</a>: The <em>Basic</em> HTTP Authentication Scheme
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7639">RFC 7639</a>: The ALPN HTTP Header Field
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7692">RFC 7692</a>: Compression Extensions for WebSocket
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7694">RFC 7694</a>: HTTP Client-Initiated Content-Encoding
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7725">RFC 7725</a>: An HTTP Status Code to Report Legal Obstacles
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7804">RFC 7804</a>: Salted Challenge Response HTTP Authentication Mechanism
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7838">RFC 7838</a>: HTTP Alternative Services
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7932">RFC 7932</a>: Brotli Compressed Data Format
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7936">RFC 7936</a>: Clarifying Registry Procedures for the WebSocket Subprotocol Name Registry
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc8053">RFC 8053</a>: HTTP Authentication Extensions for Interactive Clients
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc8164">RFC 8164</a>: Opportunistic Security for HTTP/2
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc8187">RFC 8187</a>: Indicating Character Encoding and Language for HTTP Header Field Parameters
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc8188">RFC 8188</a>: Encrypted Content-Encoding for HTTP
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc8246">RFC 8246</a>: HTTP Immutable Responses
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.w3.org/TR/webmention/">Webmention</a>: Webmention
-</p>
-</li>
-</ul></div>
-</div>
-<div class="sect3">
+<ul><li><a href="http://www.w3.org/TR/cors/">CORS</a>: Cross-Origin Resource Sharing
+</li>
+<li><a href="http://www.w3.org/TR/CSP2/">CSP2</a>: Content Security Policy Level 2
+</li>
+<li><a href="http://www.w3.org/TR/tracking-dnt/">DNT</a>: Tracking Preference Expression (DNT)
+</li>
+<li><a href="http://www.w3.org/TR/eventsource/">eventsource</a>: Server-Sent Events
+</li>
+<li><a href="https://www.w3.org/TR/html4/interact/forms.html#h-17.13.4">Form content types</a>: Form content types
+</li>
+<li><a href="https://www.w3.org/TR/preload/">Preload</a>: Preload
+</li>
+<li><a href="http://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm">REST</a>: Fielding&apos;s Dissertation
+</li>
+<li><a href="https://tools.ietf.org/html/rfc1945">RFC 1945</a>: HTTP/1.0
+</li>
+<li><a href="https://tools.ietf.org/html/rfc1951">RFC 1951</a>: DEFLATE Compressed Data Format Specification version 1.3
+</li>
+<li><a href="https://tools.ietf.org/html/rfc1952">RFC 1952</a>: GZIP file format specification version 4.3
+</li>
+<li><a href="https://tools.ietf.org/html/rfc2046#section-5.1">RFC 2046</a>: Multipart media type (in MIME Part Two: Media Types)
+</li>
+<li><a href="https://tools.ietf.org/html/rfc2295">RFC 2295</a>: Transparent Content Negotiation in HTTP
+</li>
+<li><a href="https://tools.ietf.org/html/rfc2296">RFC 2296</a>: HTTP Remote Variant Selection Algorithm: RVSA/1.0
+</li>
+<li><a href="https://tools.ietf.org/html/rfc2817">RFC 2817</a>: Upgrading to TLS Within HTTP/1.1
+</li>
+<li><a href="https://tools.ietf.org/html/rfc2818">RFC 2818</a>: HTTP Over TLS
+</li>
+<li><a href="https://tools.ietf.org/html/rfc3230">RFC 3230</a>: Instance Digests in HTTP
+</li>
+<li><a href="https://tools.ietf.org/html/rfc4559">RFC 4559</a>: SPNEGO-based Kerberos and NTLM HTTP Authentication in Microsoft Windows
+</li>
+<li><a href="https://tools.ietf.org/html/rfc5789">RFC 5789</a>: PATCH Method for HTTP
+</li>
+<li><a href="https://tools.ietf.org/html/rfc5843">RFC 5843</a>: Additional Hash Algorithms for HTTP Instance Digests
+</li>
+<li><a href="https://tools.ietf.org/html/rfc5861">RFC 5861</a>: HTTP Cache-Control Extensions for Stale Content
+</li>
+<li><a href="https://tools.ietf.org/html/rfc5988">RFC 5988</a>: Web Linking
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6265">RFC 6265</a>: HTTP State Management Mechanism
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6266">RFC 6266</a>: Use of the Content-Disposition Header Field
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6454">RFC 6454</a>: The Web Origin Concept
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6455">RFC 6455</a>: The WebSocket Protocol
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6585">RFC 6585</a>: Additional HTTP Status Codes
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6750">RFC 6750</a>: The OAuth 2.0 Authorization Framework: Bearer Token Usage
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6797">RFC 6797</a>: HTTP Strict Transport Security (HSTS)
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6903">RFC 6903</a>: Additional Link Relation Types
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7034">RFC 7034</a>: HTTP Header Field X-Frame-Options
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7089">RFC 7089</a>: Time-Based Access to Resource States: Memento
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7230">RFC 7230</a>: HTTP/1.1 Message Syntax and Routing
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7231">RFC 7231</a>: HTTP/1.1 Semantics and Content
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>: HTTP/1.1 Conditional Requests
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7233">RFC 7233</a>: HTTP/1.1 Range Requests
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7234">RFC 7234</a>: HTTP/1.1 Caching
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7235">RFC 7235</a>: HTTP/1.1 Authentication
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7239">RFC 7239</a>: Forwarded HTTP Extension
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7240">RFC 7240</a>: Prefer Header for HTTP
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7469">RFC 7469</a>: Public Key Pinning Extension for HTTP
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7486">RFC 7486</a>: HTTP Origin-Bound Authentication (HOBA)
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7538">RFC 7538</a>: HTTP Status Code 308 (Permanent Redirect)
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7540">RFC 7540</a>: Hypertext Transfer Protocol Version 2 (HTTP/2)
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7541">RFC 7541</a>: HPACK: Header Compression for HTTP/2
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7578">RFC 7578</a>: Returning Values from Forms: multipart/form-data
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7615">RFC 7615</a>: HTTP Authentication-Info and Proxy-Authentication-Info Response Header Fields
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7616">RFC 7616</a>: HTTP Digest Access Authentication
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7617">RFC 7617</a>: The <em>Basic</em> HTTP Authentication Scheme
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7639">RFC 7639</a>: The ALPN HTTP Header Field
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7692">RFC 7692</a>: Compression Extensions for WebSocket
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7694">RFC 7694</a>: HTTP Client-Initiated Content-Encoding
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7725">RFC 7725</a>: An HTTP Status Code to Report Legal Obstacles
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7804">RFC 7804</a>: Salted Challenge Response HTTP Authentication Mechanism
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7838">RFC 7838</a>: HTTP Alternative Services
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7932">RFC 7932</a>: Brotli Compressed Data Format
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7936">RFC 7936</a>: Clarifying Registry Procedures for the WebSocket Subprotocol Name Registry
+</li>
+<li><a href="https://tools.ietf.org/html/rfc8053">RFC 8053</a>: HTTP Authentication Extensions for Interactive Clients
+</li>
+<li><a href="https://tools.ietf.org/html/rfc8164">RFC 8164</a>: Opportunistic Security for HTTP/2
+</li>
+<li><a href="https://tools.ietf.org/html/rfc8187">RFC 8187</a>: Indicating Character Encoding and Language for HTTP Header Field Parameters
+</li>
+<li><a href="https://tools.ietf.org/html/rfc8188">RFC 8188</a>: Encrypted Content-Encoding for HTTP
+</li>
+<li><a href="https://tools.ietf.org/html/rfc8246">RFC 8246</a>: HTTP Immutable Responses
+</li>
+<li><a href="https://www.w3.org/TR/webmention/">Webmention</a>: Webmention
+</li>
+</ul>
<h4 id="_upcoming">Upcoming</h4>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="https://www.w3.org/TR/csp-cookies/">Content Security Policy: Cookie Controls</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.w3.org/TR/csp-embedded-enforcement/">Content Security Policy: Embedded Enforcement</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.w3.org/TR/CSP3/">Content Security Policy Level 3</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.w3.org/TR/csp-pinning/">Content Security Policy Pinning</a>
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/referrer-policy/">Referrer Policy</a>
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/UISecurity/">User Interface Security Directives for Content Security Policy</a>
-</p>
-</li>
-</ul></div>
-</div>
-<div class="sect3">
+<ul><li><a href="https://www.w3.org/TR/csp-cookies/">Content Security Policy: Cookie Controls</a>
+</li>
+<li><a href="https://www.w3.org/TR/csp-embedded-enforcement/">Content Security Policy: Embedded Enforcement</a>
+</li>
+<li><a href="https://www.w3.org/TR/CSP3/">Content Security Policy Level 3</a>
+</li>
+<li><a href="https://www.w3.org/TR/csp-pinning/">Content Security Policy Pinning</a>
+</li>
+<li><a href="http://www.w3.org/TR/referrer-policy/">Referrer Policy</a>
+</li>
+<li><a href="http://www.w3.org/TR/UISecurity/">User Interface Security Directives for Content Security Policy</a>
+</li>
+</ul>
<h4 id="_informative">Informative</h4>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="http://www.w3.org/TR/webarch/">Architecture of the World Wide Web</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc2936">RFC 2936</a>: HTTP MIME Type Handler Detection
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc2964">RFC 2964</a>: Use of HTTP State Management
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc3143">RFC 3143</a>: Known HTTP Proxy/Caching Problems
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6202">RFC 6202</a>: Known Issues and Best Practices for the Use of Long Polling and Streaming in Bidirectional HTTP
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6838">RFC 6838</a>: Media Type Specifications and Registration Procedures
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7478">RFC 7478</a>: Web Real-Time Communication Use Cases and Requirements
-</p>
-</li>
-</ul></div>
-</div>
-<div class="sect3">
+<ul><li><a href="http://www.w3.org/TR/webarch/">Architecture of the World Wide Web</a>
+</li>
+<li><a href="https://tools.ietf.org/html/rfc2936">RFC 2936</a>: HTTP MIME Type Handler Detection
+</li>
+<li><a href="https://tools.ietf.org/html/rfc2964">RFC 2964</a>: Use of HTTP State Management
+</li>
+<li><a href="https://tools.ietf.org/html/rfc3143">RFC 3143</a>: Known HTTP Proxy/Caching Problems
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6202">RFC 6202</a>: Known Issues and Best Practices for the Use of Long Polling and Streaming in Bidirectional HTTP
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6838">RFC 6838</a>: Media Type Specifications and Registration Procedures
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7478">RFC 7478</a>: Web Real-Time Communication Use Cases and Requirements
+</li>
+</ul>
<h4 id="_related">Related</h4>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="http://www.w3.org/TR/app-uri/">app: URL Scheme</a>
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/beacon/">Beacon</a>
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/FileAPI/">File API</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc8030">Generic Event Delivery Using HTTP Push</a>
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/capability-urls/">Good Practices for Capability URLs</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://html.spec.whatwg.org/multipage/">HTML Living Standard</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://developers.whatwg.org/">HTML Living Standard for Web developers</a>
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/html401/">HTML4.01</a>
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/html5/">HTML5</a>
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/html51/">HTML5.1</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.w3.org/TR/html52/">HTML5.2</a>
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/media-frags/">Media Fragments URI 1.0</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6690">RFC 6690</a>: Constrained RESTful Environments (CoRE) Link Format
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7807">RFC 7807</a>: Problem Details for HTTP APIs
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6906">RFC 6906</a>: The <em>profile</em> Link Relation Type
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/SRI/">Subresource Integrity</a>
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/tracking-compliance/">Tracking Compliance and Scope</a>
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/media-frags-reqs/">Use cases and requirements for Media Fragments</a>
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/webrtc/">WebRTC 1.0: Real-time Communication Between Browsers</a>
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/websockets/">Websocket API</a>
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/XMLHttpRequest/">XMLHttpRequest Level 1</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://xhr.spec.whatwg.org/">XMLHttpRequest Living Standard</a>
-</p>
-</li>
-</ul></div>
-</div>
-<div class="sect3">
+<ul><li><a href="http://www.w3.org/TR/app-uri/">app: URL Scheme</a>
+</li>
+<li><a href="http://www.w3.org/TR/beacon/">Beacon</a>
+</li>
+<li><a href="http://www.w3.org/TR/FileAPI/">File API</a>
+</li>
+<li><a href="https://tools.ietf.org/html/rfc8030">Generic Event Delivery Using HTTP Push</a>
+</li>
+<li><a href="http://www.w3.org/TR/capability-urls/">Good Practices for Capability URLs</a>
+</li>
+<li><a href="https://html.spec.whatwg.org/multipage/">HTML Living Standard</a>
+</li>
+<li><a href="https://developers.whatwg.org/">HTML Living Standard for Web developers</a>
+</li>
+<li><a href="http://www.w3.org/TR/html401/">HTML4.01</a>
+</li>
+<li><a href="http://www.w3.org/TR/html5/">HTML5</a>
+</li>
+<li><a href="http://www.w3.org/TR/html51/">HTML5.1</a>
+</li>
+<li><a href="https://www.w3.org/TR/html52/">HTML5.2</a>
+</li>
+<li><a href="http://www.w3.org/TR/media-frags/">Media Fragments URI 1.0</a>
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6690">RFC 6690</a>: Constrained RESTful Environments (CoRE) Link Format
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7807">RFC 7807</a>: Problem Details for HTTP APIs
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6906">RFC 6906</a>: The <em>profile</em> Link Relation Type
+</li>
+<li><a href="http://www.w3.org/TR/SRI/">Subresource Integrity</a>
+</li>
+<li><a href="http://www.w3.org/TR/tracking-compliance/">Tracking Compliance and Scope</a>
+</li>
+<li><a href="http://www.w3.org/TR/media-frags-reqs/">Use cases and requirements for Media Fragments</a>
+</li>
+<li><a href="http://www.w3.org/TR/webrtc/">WebRTC 1.0: Real-time Communication Between Browsers</a>
+</li>
+<li><a href="http://www.w3.org/TR/websockets/">Websocket API</a>
+</li>
+<li><a href="http://www.w3.org/TR/XMLHttpRequest/">XMLHttpRequest Level 1</a>
+</li>
+<li><a href="https://xhr.spec.whatwg.org/">XMLHttpRequest Living Standard</a>
+</li>
+</ul>
<h4 id="_seemingly_obsolete">Seemingly obsolete</h4>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc2227">RFC 2227</a>: Simple Hit-Metering and Usage-Limiting for HTTP
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc2310">RFC 2310</a>: The Safe Response Header Field
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc2324">RFC 2324</a>: Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0)
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc2660">RFC 2660</a>: The Secure HyperText Transfer Protocol
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc2774">RFC 2774</a>: An HTTP Extension Framework
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc2965">RFC 2965</a>: HTTP State Management Mechanism (Cookie2)
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc3229">RFC 3229</a>: Delta encoding in HTTP
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7168">RFC 7168</a>: The Hyper Text Coffee Pot Control Protocol for Tea Efflux Appliances (HTCPCP-TEA)
-</p>
-</li>
-<li>
-<p>
-<a href="http://dev.chromium.org/spdy/spdy-protocol">SPDY</a>: SPDY Protocol
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/draft-tyoshino-hybi-websocket-perframe-deflate-06">x-webkit-deflate-frame</a>: Deprecated Websocket compression
-</p>
-</li>
-</ul></div>
-</div>
-</div>
-</div>
-<div class="sect1">
+<ul><li><a href="https://tools.ietf.org/html/rfc2227">RFC 2227</a>: Simple Hit-Metering and Usage-Limiting for HTTP
+</li>
+<li><a href="https://tools.ietf.org/html/rfc2310">RFC 2310</a>: The Safe Response Header Field
+</li>
+<li><a href="https://tools.ietf.org/html/rfc2324">RFC 2324</a>: Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0)
+</li>
+<li><a href="https://tools.ietf.org/html/rfc2660">RFC 2660</a>: The Secure HyperText Transfer Protocol
+</li>
+<li><a href="https://tools.ietf.org/html/rfc2774">RFC 2774</a>: An HTTP Extension Framework
+</li>
+<li><a href="https://tools.ietf.org/html/rfc2965">RFC 2965</a>: HTTP State Management Mechanism (Cookie2)
+</li>
+<li><a href="https://tools.ietf.org/html/rfc3229">RFC 3229</a>: Delta encoding in HTTP
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7168">RFC 7168</a>: The Hyper Text Coffee Pot Control Protocol for Tea Efflux Appliances (HTCPCP-TEA)
+</li>
+<li><a href="http://dev.chromium.org/spdy/spdy-protocol">SPDY</a>: SPDY Protocol
+</li>
+<li><a href="https://tools.ietf.org/html/draft-tyoshino-hybi-websocket-perframe-deflate-06">x-webkit-deflate-frame</a>: Deprecated Websocket compression
+</li>
+</ul>
<h2 id="_url">URL</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc3986">RFC 3986</a>: URI Generic Syntax
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6570">RFC 6570</a>: URI Template
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6874">RFC 6874</a>: Representing IPv6 Zone Identifiers in Address Literals and URIs
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7320">RFC 7320</a>: URI Design and Ownership
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/url-1/">URL</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://url.spec.whatwg.org/">URL Living Standard</a>
-</p>
-</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+<ul><li><a href="https://tools.ietf.org/html/rfc3986">RFC 3986</a>: URI Generic Syntax
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6570">RFC 6570</a>: URI Template
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6874">RFC 6874</a>: Representing IPv6 Zone Identifiers in Address Literals and URIs
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7320">RFC 7320</a>: URI Design and Ownership
+</li>
+<li><a href="http://www.w3.org/TR/url-1/">URL</a>
+</li>
+<li><a href="https://url.spec.whatwg.org/">URL Living Standard</a>
+</li>
+</ul>
<h2 id="_webdav">WebDAV</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc3253">RFC 3253</a>: Versioning Extensions to WebDAV
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc3648">RFC 3648</a>: WebDAV Ordered Collections Protocol
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc3744">RFC 3744</a>: WebDAV Access Control Protocol
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc4316">RFC 4316</a>: Datatypes for WebDAV Properties
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc4331">RFC 4331</a>: Quota and Size Properties for DAV Collections
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc4437">RFC 4437</a>: WebDAV Redirect Reference Resources
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc4709">RFC 4709</a>: Mounting WebDAV Servers
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc4791">RFC 4791</a>: Calendaring Extensions to WebDAV (CalDAV)
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc4918">RFC 4918</a>: HTTP Extensions for WebDAV
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc5323">RFC 5323</a>: WebDAV SEARCH
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc5397">RFC 5397</a>: WebDAV Current Principal Extension
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc5689">RFC 5689</a>: Extended MKCOL for WebDAV
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc5842">RFC 5842</a>: Binding Extensions to WebDAV
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc5995">RFC 5995</a>: Using POST to Add Members to WebDAV Collections
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6352">RFC 6352</a>: CardDAV: vCard Extensions to WebDAV
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6578">RFC 6578</a>: Collection Synchronization for WebDAV
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6638">RFC 6638</a>: Scheduling Extensions to CalDAV
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6764">RFC 6764</a>: Locating Services for Calendaring Extensions to WebDAV (CalDAV) and vCard Extensions to WebDAV (CardDAV)
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7809">RFC 7809</a>: Calendaring Extensions to WebDAV (CalDAV): Time Zones by Reference
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7953">RFC 7953</a>: Calendar Availability
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc8144">RFC 8144</a>: Use of the Prefer Header Field in WebDAV
-</p>
-</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+<ul><li><a href="https://tools.ietf.org/html/rfc3253">RFC 3253</a>: Versioning Extensions to WebDAV
+</li>
+<li><a href="https://tools.ietf.org/html/rfc3648">RFC 3648</a>: WebDAV Ordered Collections Protocol
+</li>
+<li><a href="https://tools.ietf.org/html/rfc3744">RFC 3744</a>: WebDAV Access Control Protocol
+</li>
+<li><a href="https://tools.ietf.org/html/rfc4316">RFC 4316</a>: Datatypes for WebDAV Properties
+</li>
+<li><a href="https://tools.ietf.org/html/rfc4331">RFC 4331</a>: Quota and Size Properties for DAV Collections
+</li>
+<li><a href="https://tools.ietf.org/html/rfc4437">RFC 4437</a>: WebDAV Redirect Reference Resources
+</li>
+<li><a href="https://tools.ietf.org/html/rfc4709">RFC 4709</a>: Mounting WebDAV Servers
+</li>
+<li><a href="https://tools.ietf.org/html/rfc4791">RFC 4791</a>: Calendaring Extensions to WebDAV (CalDAV)
+</li>
+<li><a href="https://tools.ietf.org/html/rfc4918">RFC 4918</a>: HTTP Extensions for WebDAV
+</li>
+<li><a href="https://tools.ietf.org/html/rfc5323">RFC 5323</a>: WebDAV SEARCH
+</li>
+<li><a href="https://tools.ietf.org/html/rfc5397">RFC 5397</a>: WebDAV Current Principal Extension
+</li>
+<li><a href="https://tools.ietf.org/html/rfc5689">RFC 5689</a>: Extended MKCOL for WebDAV
+</li>
+<li><a href="https://tools.ietf.org/html/rfc5842">RFC 5842</a>: Binding Extensions to WebDAV
+</li>
+<li><a href="https://tools.ietf.org/html/rfc5995">RFC 5995</a>: Using POST to Add Members to WebDAV Collections
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6352">RFC 6352</a>: CardDAV: vCard Extensions to WebDAV
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6578">RFC 6578</a>: Collection Synchronization for WebDAV
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6638">RFC 6638</a>: Scheduling Extensions to CalDAV
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6764">RFC 6764</a>: Locating Services for Calendaring Extensions to WebDAV (CalDAV) and vCard Extensions to WebDAV (CardDAV)
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7809">RFC 7809</a>: Calendaring Extensions to WebDAV (CalDAV): Time Zones by Reference
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7953">RFC 7953</a>: Calendar Availability
+</li>
+<li><a href="https://tools.ietf.org/html/rfc8144">RFC 8144</a>: Use of the Prefer Header Field in WebDAV
+</li>
+</ul>
<h2 id="_coap">CoAP</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7252">RFC 7252</a>: The Constrained Application Protocol (CoAP)
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7390">RFC 7390</a>: Group Communication for CoAP
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7641">RFC 7641</a>: Observing Resources in CoAP
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7650">RFC 7650</a>: A CoAP Usage for REsource LOcation And Discovery (RELOAD)
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7959">RFC 7959</a>: Block-Wise Transfers in CoAP
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7967">RFC 7967</a>: CoAP Option for No Server Response
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc8075">RFC 8075</a>: Guidelines for Mapping Implementations: HTTP to CoAP
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc8132">RFC 8132</a>: PATCH and FETCH Methods for CoAP
-</p>
-</li>
-</ul></div>
-</div>
-</div>
+<ul><li><a href="https://tools.ietf.org/html/rfc7252">RFC 7252</a>: The Constrained Application Protocol (CoAP)
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7390">RFC 7390</a>: Group Communication for CoAP
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7641">RFC 7641</a>: Observing Resources in CoAP
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7650">RFC 7650</a>: A CoAP Usage for REsource LOcation And Discovery (RELOAD)
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7959">RFC 7959</a>: Block-Wise Transfers in CoAP
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7967">RFC 7967</a>: CoAP Option for No Server Response
+</li>
+<li><a href="https://tools.ietf.org/html/rfc8075">RFC 8075</a>: Guidelines for Mapping Implementations: HTTP to CoAP
+</li>
+<li><a href="https://tools.ietf.org/html/rfc8132">RFC 8132</a>: PATCH and FETCH Methods for CoAP
+</li>
+</ul>
+
diff --git a/docs/en/cowboy/2.1/guide/static_files/index.html b/docs/en/cowboy/2.1/guide/static_files/index.html
index 40d70996..c0f10d1c 100644
--- a/docs/en/cowboy/2.1/guide/static_files/index.html
+++ b/docs/en/cowboy/2.1/guide/static_files/index.html
@@ -62,173 +62,101 @@
<h1 class="lined-header"><span>Static files</span></h1>
-<div class="paragraph"><p>Cowboy comes with a ready to use handler for serving static
-files. It is provided as a convenience for serving files
-during development.</p></div>
-<div class="paragraph"><p>For systems in production, consider using one of the many
-Content Distribution Network (CDN) available on the market,
-as they are the best solution for serving files.</p></div>
-<div class="paragraph"><p>The static handler can serve either one file or all files
-from a given directory. The etag generation and mime types
-can be configured.</p></div>
-<div class="sect1">
+<p>Cowboy comes with a ready to use handler for serving static files. It is provided as a convenience for serving files during development.</p>
+<p>For systems in production, consider using one of the many Content Distribution Network (CDN) available on the market, as they are the best solution for serving files.</p>
+<p>The static handler can serve either one file or all files from a given directory. The etag generation and mime types can be configured.</p>
<h2 id="_serve_one_file">Serve one file</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>You can use the static handler to serve one specific file
-from an application&#8217;s private directory. This is particularly
-useful to serve an <em>index.html</em> file when the client requests
-the <code>/</code> path, for example. The path configured is relative
-to the given application&#8217;s private directory.</p></div>
-<div class="paragraph"><p>The following rule will serve the file <em>static/index.html</em>
-from the application <code>my_app</code>'s priv directory whenever the
-path <code>/</code> is accessed:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>You can use the static handler to serve one specific file from an application&apos;s private directory. This is particularly useful to serve an <em>index.html</em> file when the client requests the <code>/</code> path, for example. The path configured is relative to the given application&apos;s private directory.</p>
+<p>The following rule will serve the file <em>static/index.html</em> from the application <code>my_app</code>&apos;s priv directory whenever the path <code>/</code> is accessed:</p>
+<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: #FF0000">"/"</span>, <span style="color: #FF6600">cowboy_static</span>, {<span style="color: #FF6600">priv_file</span>, <span style="color: #FF6600">my_app</span>, <span style="color: #FF0000">"static/index.html"</span>}}</tt></pre></div></div>
-<div class="paragraph"><p>You can also specify the absolute path to a file, or the
-path to the file relative to the current directory:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>{<font color="#FF0000">"/"</font>, <font color="#FF6600">cowboy_static</font>, {<font color="#FF6600">priv_file</font>, <font color="#FF6600">my_app</font>, <font color="#FF0000">"static/index.html"</font>}}</tt></pre>
+</div></div>
+<p>You can also specify the absolute path to a file, or the path to the file relative to the current directory:</p>
+<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: #FF0000">"/"</span>, <span style="color: #FF6600">cowboy_static</span>, {<span style="color: #FF6600">file</span>, <span style="color: #FF0000">"/var/www/index.html"</span>}}</tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#FF0000">"/"</font>, <font color="#FF6600">cowboy_static</font>, {<font color="#FF6600">file</font>, <font color="#FF0000">"/var/www/index.html"</font>}}</tt></pre>
+</div></div>
<h2 id="_serve_all_files_from_a_directory">Serve all files from a directory</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>You can also use the static handler to serve all files that
-can be found in the configured directory. The handler will
-use the <code>path_info</code> information to resolve the file location,
-which means that your route must end with a <code>[...]</code> pattern
-for it to work. All files are served, including the ones that
-may be found in subfolders.</p></div>
-<div class="paragraph"><p>You can specify the directory relative to an application&#8217;s
-private directory.</p></div>
-<div class="paragraph"><p>The following rule will serve any file found in the application
-<code>my_app</code>'s priv directory inside the <code>static/assets</code> folder
-whenever the requested path begins with <code>/assets/</code>:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>You can also use the static handler to serve all files that can be found in the configured directory. The handler will use the <code>path_info</code> information to resolve the file location, which means that your route must end with a <code>[...]</code> pattern for it to work. All files are served, including the ones that may be found in subfolders.</p>
+<p>You can specify the directory relative to an application&apos;s private directory.</p>
+<p>The following rule will serve any file found in the application <code>my_app</code>&apos;s priv directory inside the <code>static/assets</code> folder whenever the requested path begins with <code>/assets/</code>:</p>
+<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: #FF0000">"/assets/[...]"</span>, <span style="color: #FF6600">cowboy_static</span>, {<span style="color: #FF6600">priv_dir</span>, <span style="color: #FF6600">my_app</span>, <span style="color: #FF0000">"static/assets"</span>}}</tt></pre></div></div>
-<div class="paragraph"><p>You can also specify the absolute path to the directory or
-set it relative to the current directory:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>{<font color="#FF0000">"/assets/[...]"</font>, <font color="#FF6600">cowboy_static</font>, {<font color="#FF6600">priv_dir</font>, <font color="#FF6600">my_app</font>, <font color="#FF0000">"static/assets"</font>}}</tt></pre>
+</div></div>
+<p>You can also specify the absolute path to the directory or set it relative to the current directory:</p>
+<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: #FF0000">"/assets/[...]"</span>, <span style="color: #FF6600">cowboy_static</span>, {<span style="color: #FF6600">dir</span>, <span style="color: #FF0000">"/var/www/assets"</span>}}</tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#FF0000">"/assets/[...]"</font>, <font color="#FF6600">cowboy_static</font>, {<font color="#FF6600">dir</font>, <font color="#FF0000">"/var/www/assets"</font>}}</tt></pre>
+</div></div>
<h2 id="_customize_the_mimetype_detection">Customize the mimetype detection</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>By default, Cowboy will attempt to recognize the mimetype
-of your static files by looking at the extension.</p></div>
-<div class="paragraph"><p>You can override the function that figures out the mimetype
-of the static files. It can be useful when Cowboy is missing
-a mimetype you need to handle, or when you want to reduce
-the list to make lookups faster. You can also give a
-hard-coded mimetype that will be used unconditionally.</p></div>
-<div class="paragraph"><p>Cowboy comes with two functions built-in. The default
-function only handles common file types used when building
-Web applications. The other function is an extensive list
-of hundreds of mimetypes that should cover almost any need
-you may have. You can of course create your own function.</p></div>
-<div class="paragraph"><p>To use the default function, you should not have to configure
-anything, as it is the default. If you insist, though, the
-following will do the job:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>By default, Cowboy will attempt to recognize the mimetype of your static files by looking at the extension.</p>
+<p>You can override the function that figures out the mimetype of the static files. It can be useful when Cowboy is missing a mimetype you need to handle, or when you want to reduce the list to make lookups faster. You can also give a hard-coded mimetype that will be used unconditionally.</p>
+<p>Cowboy comes with two functions built-in. The default function only handles common file types used when building Web applications. The other function is an extensive list of hundreds of mimetypes that should cover almost any need you may have. You can of course create your own function.</p>
+<p>To use the default function, you should not have to configure anything, as it is the default. If you insist, though, the following will do the job:</p>
+<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: #FF0000">"/assets/[...]"</span>, <span style="color: #FF6600">cowboy_static</span>, {<span style="color: #FF6600">priv_dir</span>, <span style="color: #FF6600">my_app</span>, <span style="color: #FF0000">"static/assets"</span>,
- [{<span style="color: #FF6600">mimetypes</span>, <span style="color: #FF6600">cow_mimetypes</span>, <span style="color: #FF6600">web</span>}]}}</tt></pre></div></div>
-<div class="paragraph"><p>As you can see, there is an optional field that may contain
-a list of less used options, like mimetypes or etag. All option
-types have this optional field.</p></div>
-<div class="paragraph"><p>To use the function that will detect almost any mimetype,
-the following configuration will do:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>{<font color="#FF0000">"/assets/[...]"</font>, <font color="#FF6600">cowboy_static</font>, {<font color="#FF6600">priv_dir</font>, <font color="#FF6600">my_app</font>, <font color="#FF0000">"static/assets"</font>,
+ [{<font color="#FF6600">mimetypes</font>, <font color="#FF6600">cow_mimetypes</font>, <font color="#FF6600">web</font>}]}}</tt></pre>
+</div></div>
+<p>As you can see, there is an optional field that may contain a list of less used options, like mimetypes or etag. All option types have this optional field.</p>
+<p>To use the function that will detect almost any mimetype, the following configuration will do:</p>
+<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: #FF0000">"/assets/[...]"</span>, <span style="color: #FF6600">cowboy_static</span>, {<span style="color: #FF6600">priv_dir</span>, <span style="color: #FF6600">my_app</span>, <span style="color: #FF0000">"static/assets"</span>,
- [{<span style="color: #FF6600">mimetypes</span>, <span style="color: #FF6600">cow_mimetypes</span>, <span style="color: #FF6600">all</span>}]}}</tt></pre></div></div>
-<div class="paragraph"><p>You probably noticed the pattern by now. The configuration
-expects a module and a function name, so you can use any
-of your own functions instead:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>{<font color="#FF0000">"/assets/[...]"</font>, <font color="#FF6600">cowboy_static</font>, {<font color="#FF6600">priv_dir</font>, <font color="#FF6600">my_app</font>, <font color="#FF0000">"static/assets"</font>,
+ [{<font color="#FF6600">mimetypes</font>, <font color="#FF6600">cow_mimetypes</font>, <font color="#FF6600">all</font>}]}}</tt></pre>
+</div></div>
+<p>You probably noticed the pattern by now. The configuration expects a module and a function name, so you can use any of your own functions instead:</p>
+<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: #FF0000">"/assets/[...]"</span>, <span style="color: #FF6600">cowboy_static</span>, {<span style="color: #FF6600">priv_dir</span>, <span style="color: #FF6600">my_app</span>, <span style="color: #FF0000">"static/assets"</span>,
- [{<span style="color: #FF6600">mimetypes</span>, <span style="color: #009900">Module</span>, <span style="color: #009900">Function</span>}]}}</tt></pre></div></div>
-<div class="paragraph"><p>The function that performs the mimetype detection receives
-a single argument that is the path to the file on disk. It
-is recommended to return the mimetype in tuple form, although
-a binary string is also allowed (but will require extra
-processing). If the function can&#8217;t figure out the mimetype,
-then it should return <code>{&lt;&lt;"application"&gt;&gt;, &lt;&lt;"octet-stream"&gt;&gt;, []}</code>.</p></div>
-<div class="paragraph"><p>When the static handler fails to find the extension,
-it will send the file as <code>application/octet-stream</code>.
-A browser receiving such file will attempt to download it
-directly to disk.</p></div>
-<div class="paragraph"><p>Finally, the mimetype can be hard-coded for all files.
-This is especially useful in combination with the <code>file</code>
-and <code>priv_file</code> options as it avoids needless computation:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>{<font color="#FF0000">"/assets/[...]"</font>, <font color="#FF6600">cowboy_static</font>, {<font color="#FF6600">priv_dir</font>, <font color="#FF6600">my_app</font>, <font color="#FF0000">"static/assets"</font>,
+ [{<font color="#FF6600">mimetypes</font>, <font color="#009900">Module</font>, <font color="#009900">Function</font>}]}}</tt></pre>
+</div></div>
+<p>The function that performs the mimetype detection receives a single argument that is the path to the file on disk. It is recommended to return the mimetype in tuple form, although a binary string is also allowed (but will require extra processing). If the function can&apos;t figure out the mimetype, then it should return <code>{&lt;&lt;&quot;application&quot;&gt;&gt;, &lt;&lt;&quot;octet-stream&quot;&gt;&gt;, []}</code>.</p>
+<p>When the static handler fails to find the extension, it will send the file as <code>application/octet-stream</code>. A browser receiving such file will attempt to download it directly to disk.</p>
+<p>Finally, the mimetype can be hard-coded for all files. This is especially useful in combination with the <code>file</code> and <code>priv_file</code> options as it avoids needless computation:</p>
+<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: #FF0000">"/"</span>, <span style="color: #FF6600">cowboy_static</span>, {<span style="color: #FF6600">priv_file</span>, <span style="color: #FF6600">my_app</span>, <span style="color: #FF0000">"static/index.html"</span>,
- [{<span style="color: #FF6600">mimetypes</span>, {<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"html"</span><span style="color: #990000">&gt;&gt;</span>, []}}]}}</tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#FF0000">"/"</font>, <font color="#FF6600">cowboy_static</font>, {<font color="#FF6600">priv_file</font>, <font color="#FF6600">my_app</font>, <font color="#FF0000">"static/index.html"</font>,
+ [{<font color="#FF6600">mimetypes</font>, {<font color="#990000">&lt;&lt;</font><font color="#FF0000">"text"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"html"</font><font color="#990000">&gt;&gt;</font>, []}}]}}</tt></pre>
+</div></div>
<h2 id="_generate_an_etag">Generate an etag</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>By default, the static handler will generate an etag header
-value based on the size and modified time. This solution
-can not be applied to all systems though. It would perform
-rather poorly over a cluster of nodes, for example, as the
-file metadata will vary from server to server, giving a
-different etag on each server.</p></div>
-<div class="paragraph"><p>You can however change the way the etag is calculated:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>By default, the static handler will generate an etag header value based on the size and modified time. This solution can not be applied to all systems though. It would perform rather poorly over a cluster of nodes, for example, as the file metadata will vary from server to server, giving a different etag on each server.</p>
+<p>You can however change the way the etag is calculated:</p>
+<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: #FF0000">"/assets/[...]"</span>, <span style="color: #FF6600">cowboy_static</span>, {<span style="color: #FF6600">priv_dir</span>, <span style="color: #FF6600">my_app</span>, <span style="color: #FF0000">"static/assets"</span>,
- [{<span style="color: #FF6600">etag</span>, <span style="color: #009900">Module</span>, <span style="color: #009900">Function</span>}]}}</tt></pre></div></div>
-<div class="paragraph"><p>This function will receive three arguments: the path to the
-file on disk, the size of the file and the last modification
-time. In a distributed setup, you would typically use the
-file path to retrieve an etag value that is identical across
-all your servers.</p></div>
-<div class="paragraph"><p>You can also completely disable etag handling:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>{<font color="#FF0000">"/assets/[...]"</font>, <font color="#FF6600">cowboy_static</font>, {<font color="#FF6600">priv_dir</font>, <font color="#FF6600">my_app</font>, <font color="#FF0000">"static/assets"</font>,
+ [{<font color="#FF6600">etag</font>, <font color="#009900">Module</font>, <font color="#009900">Function</font>}]}}</tt></pre>
+</div></div>
+<p>This function will receive three arguments: the path to the file on disk, the size of the file and the last modification time. In a distributed setup, you would typically use the file path to retrieve an etag value that is identical across all your servers.</p>
+<p>You can also completely disable etag handling:</p>
+<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: #FF0000">"/assets/[...]"</span>, <span style="color: #FF6600">cowboy_static</span>, {<span style="color: #FF6600">priv_dir</span>, <span style="color: #FF6600">my_app</span>, <span style="color: #FF0000">"static/assets"</span>,
- [{<span style="color: #FF6600">etag</span>, <span style="color: #000080">false</span>}]}}</tt></pre></div></div>
-</div>
-</div>
+<pre><tt>{<font color="#FF0000">"/assets/[...]"</font>, <font color="#FF6600">cowboy_static</font>, {<font color="#FF6600">priv_dir</font>, <font color="#FF6600">my_app</font>, <font color="#FF0000">"static/assets"</font>,
+ [{<font color="#FF6600">etag</font>, <font color="#000080">false</font>}]}}</tt></pre>
+</div></div>
+
diff --git a/docs/en/cowboy/2.1/guide/streams/index.html b/docs/en/cowboy/2.1/guide/streams/index.html
index 152f413e..887ec381 100644
--- a/docs/en/cowboy/2.1/guide/streams/index.html
+++ b/docs/en/cowboy/2.1/guide/streams/index.html
@@ -62,61 +62,23 @@
<h1 class="lined-header"><span>Streams</span></h1>
-<div class="paragraph"><p>A stream is the set of messages that form an HTTP
-request/response pair.</p></div>
-<div class="paragraph"><p>The term stream comes from HTTP/2. In Cowboy, it is
-also used when talking about HTTP/1.1 or HTTP/1.0.
-It should not be confused with streaming the request
-or response body.</p></div>
-<div class="paragraph"><p>All versions of HTTP allow clients to initiate
-streams. HTTP/2 is the only one also allowing servers,
-through its server push feature. Both client and
-server-initiated streams go through the same process
-in Cowboy.</p></div>
-<div class="sect1">
+<p>A stream is the set of messages that form an HTTP request/response pair.</p>
+<p>The term stream comes from HTTP/2. In Cowboy, it is also used when talking about HTTP/1.1 or HTTP/1.0. It should not be confused with streaming the request or response body.</p>
+<p>All versions of HTTP allow clients to initiate streams. HTTP/2 is the only one also allowing servers, through its server push feature. Both client and server-initiated streams go through the same process in Cowboy.</p>
<h2 id="_stream_handlers">Stream handlers</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Stream handlers must implement five different callbacks.
-Four of them are directly related; one is special.</p></div>
-<div class="paragraph"><p>All callbacks receives the stream ID as first argument.</p></div>
-<div class="paragraph"><p>Most of them can return a list of commands to be executed
-by Cowboy. When callbacks are chained, it is possible to
-intercept and modify these commands. This can be useful
-for modifying responses for example.</p></div>
-<div class="paragraph"><p>The <code>init/3</code> callback is invoked when a new request
-comes in. It receives the Req object and the protocol options
-for this listener.</p></div>
-<div class="paragraph"><p>The <code>data/4</code> callback is invoked when data from the request
-body is received. It receives both this data and a flag
-indicating whether more is to be expected.</p></div>
-<div class="paragraph"><p>The <code>info/3</code> callback is invoked when an Erlang message is
-received for this stream. They will typically be messages
-sent by the request process.</p></div>
-<div class="paragraph"><p>Finally the <code>terminate/3</code> callback is invoked with the
-terminate reason for the stream. The return value is ignored.
-Note that as with all terminate callbacks in Erlang, there
-is no strong guarantee that it will be called.</p></div>
-<div class="paragraph"><p>The special callback <code>early_error/5</code> is called when an error
-occurs before the request headers were fully received and
-Cowboy is sending a response. It receives the partial Req
-object, the error reason, the protocol options and the response
-Cowboy will send. This response must be returned, possibly
-modified.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Stream handlers must implement five different callbacks. Four of them are directly related; one is special.</p>
+<p>All callbacks receives the stream ID as first argument.</p>
+<p>Most of them can return a list of commands to be executed by Cowboy. When callbacks are chained, it is possible to intercept and modify these commands. This can be useful for modifying responses for example.</p>
+<p>The <code>init/3</code> callback is invoked when a new request comes in. It receives the Req object and the protocol options for this listener.</p>
+<p>The <code>data/4</code> callback is invoked when data from the request body is received. It receives both this data and a flag indicating whether more is to be expected.</p>
+<p>The <code>info/3</code> callback is invoked when an Erlang message is received for this stream. They will typically be messages sent by the request process.</p>
+<p>Finally the <code>terminate/3</code> callback is invoked with the terminate reason for the stream. The return value is ignored. Note that as with all terminate callbacks in Erlang, there is no strong guarantee that it will be called.</p>
+<p>The special callback <code>early_error/5</code> is called when an error occurs before the request headers were fully received and Cowboy is sending a response. It receives the partial Req object, the error reason, the protocol options and the response Cowboy will send. This response must be returned, possibly modified.</p>
<h2 id="_built_in_handlers">Built-in handlers</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy comes with two handlers.</p></div>
-<div class="paragraph"><p><code>cowboy_stream_h</code> is the default stream handler.
-It is the core of much of the functionality of Cowboy.
-All chains of stream handlers should call it last.</p></div>
-<div class="paragraph"><p><code>cowboy_compress_h</code> will automatically compress
-responses when possible. It is not enabled by default.
-It is a good example for writing your own handlers
-that will modify responses.</p></div>
-</div>
-</div>
+<p>Cowboy comes with two handlers.</p>
+<p><code>cowboy_stream_h</code> is the default stream handler. It is the core of much of the functionality of Cowboy. All chains of stream handlers should call it last.</p>
+<p><code>cowboy_compress_h</code> will automatically compress responses when possible. It is not enabled by default. It is a good example for writing your own handlers that will modify responses.</p>
+
diff --git a/docs/en/cowboy/2.1/guide/ws_handlers/index.html b/docs/en/cowboy/2.1/guide/ws_handlers/index.html
index 7abf9626..027e9d2d 100644
--- a/docs/en/cowboy/2.1/guide/ws_handlers/index.html
+++ b/docs/en/cowboy/2.1/guide/ws_handlers/index.html
@@ -62,271 +62,171 @@
<h1 class="lined-header"><span>Websocket handlers</span></h1>
-<div class="paragraph"><p>Websocket handlers provide an interface for upgrading HTTP/1.1
-connections to Websocket and sending or receiving frames on
-the Websocket connection.</p></div>
-<div class="paragraph"><p>As Websocket connections are established through the HTTP/1.1
-upgrade mechanism, Websocket handlers need to be able to first
-receive the HTTP request for the upgrade, before switching to
-Websocket and taking over the connection. They can then receive
-or send Websocket frames, handle incoming Erlang messages or
-close the connection.</p></div>
-<div class="sect1">
+<p>Websocket handlers provide an interface for upgrading HTTP/1.1 connections to Websocket and sending or receiving frames on the Websocket connection.</p>
+<p>As Websocket connections are established through the HTTP/1.1 upgrade mechanism, Websocket handlers need to be able to first receive the HTTP request for the upgrade, before switching to Websocket and taking over the connection. They can then receive or send Websocket frames, handle incoming Erlang messages or close the connection.</p>
<h2 id="_upgrade">Upgrade</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <code>init/2</code> callback is called when the request is received.
-To establish a Websocket connection, you must switch to the
-<code>cowboy_websocket</code> module:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The <code>init/2</code> callback is called when the request is received. To establish a Websocket connection, you must switch to the <code>cowboy_websocket</code> module:</p>
+<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">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_websocket</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Cowboy will perform the Websocket handshake immediately. Note
-that the handshake will fail if the client did not request an
-upgrade to Websocket.</p></div>
-<div class="paragraph"><p>The Req object becomes unavailable after this function returns.
-Any information required for proper execution of the Websocket
-handler must be saved in the state.</p></div>
-</div>
-</div>
-<div class="sect1">
-<h2 id="_subprotocol">Subprotocol</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The client may provide a list of Websocket subprotocols it
-supports in the sec-websocket-protocol header. The server <strong>must</strong>
-select one of them and send it back to the client or the
-handshake will fail.</p></div>
-<div class="paragraph"><p>For example, a client could understand both STOMP and MQTT over
-Websocket, and provide the header:</p></div>
-<div class="listingblock">
-<div class="content">
-<pre><code>sec-websocket-protocol: v12.stomp, mqtt</code></pre>
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">cowboy_websocket</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
</div></div>
-<div class="paragraph"><p>If the server only understands MQTT it can return:</p></div>
-<div class="listingblock">
-<div class="content">
-<pre><code>sec-websocket-protocol: mqtt</code></pre>
-</div></div>
-<div class="paragraph"><p>This selection must be done in <code>init/2</code>. An example usage could
-be:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Cowboy will perform the Websocket handshake immediately. Note that the handshake will fail if the client did not request an upgrade to Websocket.</p>
+<p>The Req object becomes unavailable after this function returns. Any information required for proper execution of the Websocket handler must be saved in the state.</p>
+<h2 id="_subprotocol">Subprotocol</h2>
+<p>The client may provide a list of Websocket subprotocols it supports in the sec-websocket-protocol header. The server <strong>must</strong> select one of them and send it back to the client or the handshake will fail.</p>
+<p>For example, a client could understand both STOMP and MQTT over Websocket, and provide the header:</p>
+<div class="listingblock"><div class="content"><pre>sec-websocket-protocol: v12.stomp, mqtt</pre></div></div>
+<p>If the server only understands MQTT it can return:</p>
+<div class="listingblock"><div class="content"><pre>sec-websocket-protocol: mqtt</pre></div></div>
+<p>This selection must be done in <code>init/2</code>. An example usage could be:</p>
+<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">init</span></span>(<span style="color: #009900">Req0</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">cowboy_req:parse_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"sec-websocket-protocol"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req0</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
- <span style="color: #000080">undefined</span> <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">cowboy_websocket</span>, <span style="color: #009900">Req0</span>, <span style="color: #009900">State</span>};
- <span style="color: #009900">Subprotocols</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:keymember</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"mqtt"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #993399">1</span>, <span style="color: #009900">Subprotocols</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="color: #009900">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"sec-websocket-protocol"</span><span style="color: #990000">&gt;&gt;</span>,
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"mqtt"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req0</span>),
- {<span style="color: #FF6600">cowboy_websocket</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="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">400</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: #0000FF">end</span></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">
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req0</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">case</font></b> <b><font color="#000000">cowboy_req:parse_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"sec-websocket-protocol"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req0</font>) <b><font color="#0000FF">of</font></b>
+ <font color="#000080">undefined</font> <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">cowboy_websocket</font>, <font color="#009900">Req0</font>, <font color="#009900">State</font>};
+ <font color="#009900">Subprotocols</font> <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">case</font></b> <b><font color="#000000">lists:keymember</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"mqtt"</font><font color="#990000">&gt;&gt;</font>, <font color="#993399">1</font>, <font color="#009900">Subprotocols</font>) <b><font color="#0000FF">of</font></b>
+ <font color="#000080">true</font> <font color="#990000">-&gt;</font>
+ <font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"sec-websocket-protocol"</font><font color="#990000">&gt;&gt;</font>,
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"mqtt"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req0</font>),
+ {<font color="#FF6600">cowboy_websocket</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>};
+ <font color="#000080">false</font> <font color="#990000">-&gt;</font>
+ <font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:reply</font></b>(<font color="#993399">400</font>, <font color="#009900">Req0</font>),
+ {<font color="#FF6600">ok</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
+ <b><font color="#0000FF">end</font></b>
+ <b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_post_upgrade_initialization">Post-upgrade initialization</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy has separate processes for handling the connection
-and requests. Because Websocket takes over the connection,
-the Websocket protocol handling occurs in a different
-process than the request handling.</p></div>
-<div class="paragraph"><p>This is reflected in the different callbacks Websocket
-handlers have. The <code>init/2</code> callback is called from the
-temporary request process and the <code>websocket_</code> callbacks
-from the connection process.</p></div>
-<div class="paragraph"><p>This means that some initialization cannot be done from
-<code>init/2</code>. Anything that would require the current pid,
-or be tied to the current pid, will not work as intended.
-The optional <code>websocket_init/1</code> can be used instead:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Cowboy has separate processes for handling the connection and requests. Because Websocket takes over the connection, the Websocket protocol handling occurs in a different process than the request handling.</p>
+<p>This is reflected in the different callbacks Websocket handlers have. The <code>init/2</code> callback is called from the temporary request process and the <code>websocket_</code> callbacks from the connection process.</p>
+<p>This means that some initialization cannot be done from <code>init/2</code>. Anything that would require the current pid, or be tied to the current pid, will not work as intended. The optional <code>websocket_init/1</code> can be used instead:</p>
+<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">websocket_init</span></span>(<span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #000000">erlang:start_timer</span></span>(<span style="color: #993399">1000</span>, <span style="font-weight: bold"><span style="color: #000080">self</span></span>(), <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Hello!"</span><span style="color: #990000">&gt;&gt;</span>),
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">State</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>All Websocket callbacks share the same return values. This
-means that we can send frames to the client right after
-the upgrade:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">websocket_init</font></b>(<font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#000000">erlang:start_timer</font></b>(<font color="#993399">1000</font>, <b><font color="#000080">self</font></b>(), <font color="#990000">&lt;&lt;</font><font color="#FF0000">"Hello!"</font><font color="#990000">&gt;&gt;</font>),
+ {<font color="#FF6600">ok</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>All Websocket callbacks share the same return values. This means that we can send frames to the client right after the upgrade:</p>
+<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">websocket_init</span></span>(<span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">reply</span>, {<span style="color: #FF6600">text</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Hello!"</span><span style="color: #990000">&gt;&gt;</span>}, <span style="color: #009900">State</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">websocket_init</font></b>(<font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">reply</font>, {<font color="#FF6600">text</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"Hello!"</font><font color="#990000">&gt;&gt;</font>}, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_receiving_frames">Receiving frames</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy will call <code>websocket_handle/2</code> whenever a text, binary,
-ping or pong frame arrives from the client.</p></div>
-<div class="paragraph"><p>The handler can handle or ignore the frames. It can also
-send frames back to the client or stop the connection.</p></div>
-<div class="paragraph"><p>The following snippet echoes back any text frame received and
-ignores all others:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Cowboy will call <code>websocket_handle/2</code> whenever a text, binary, ping or pong frame arrives from the client.</p>
+<p>The handler can handle or ignore the frames. It can also send frames back to the client or stop the connection.</p>
+<p>The following snippet echoes back any text frame received and ignores all others:</p>
+<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">websocket_handle</span></span>(<span style="color: #009900">Frame</span> <span style="color: #990000">=</span> {<span style="color: #FF6600">text</span>, <span style="color: #990000">_</span>}, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">reply</span>, <span style="color: #009900">Frame</span>, <span style="color: #009900">State</span>};
-<span style="font-weight: bold"><span style="color: #000000">websocket_handle</span></span>(<span style="color: #009900">_Frame</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">State</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Note that ping and pong frames require no action from the
-handler as Cowboy will automatically reply to ping frames.
-They are provided for informative purposes only.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">websocket_handle</font></b>(<font color="#009900">Frame</font> <font color="#990000">=</font> {<font color="#FF6600">text</font>, <font color="#990000">_</font>}, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">reply</font>, <font color="#009900">Frame</font>, <font color="#009900">State</font>};
+<b><font color="#000000">websocket_handle</font></b>(<font color="#009900">_Frame</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Note that ping and pong frames require no action from the handler as Cowboy will automatically reply to ping frames. They are provided for informative purposes only.</p>
<h2 id="_receiving_erlang_messages">Receiving Erlang messages</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy will call <code>websocket_info/2</code> whenever an Erlang message
-arrives.</p></div>
-<div class="paragraph"><p>The handler can handle or ignore the messages. It can also
-send frames to the client or stop the connection.</p></div>
-<div class="paragraph"><p>The following snippet forwards log messages to the client
-and ignores all others:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Cowboy will call <code>websocket_info/2</code> whenever an Erlang message arrives.</p>
+<p>The handler can handle or ignore the messages. It can also send frames to the client or stop the connection.</p>
+<p>The following snippet forwards log messages to the client and ignores all others:</p>
+<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">websocket_info</span></span>({<span style="font-weight: bold"><span style="color: #000080">log</span></span>, <span style="color: #009900">Text</span>}, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">reply</span>, {<span style="color: #FF6600">text</span>, <span style="color: #009900">Text</span>}, <span style="color: #009900">State</span>};
-<span style="font-weight: bold"><span style="color: #000000">websocket_info</span></span>(<span style="color: #009900">_Info</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">State</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">websocket_info</font></b>({<b><font color="#000080">log</font></b>, <font color="#009900">Text</font>}, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">reply</font>, {<font color="#FF6600">text</font>, <font color="#009900">Text</font>}, <font color="#009900">State</font>};
+<b><font color="#000000">websocket_info</font></b>(<font color="#009900">_Info</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_sending_frames">Sending frames</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>All <code>websocket_</code> callbacks share return values. They may
-send zero, one or many frames to the client.</p></div>
-<div class="paragraph"><p>To send nothing, just return an ok tuple:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<!-- @todo This will be deprecated and eventually replaced with a-->
+<!-- {Commands, State} interface that allows providing more-->
+<!-- functionality easily.-->
+<p>All <code>websocket_</code> callbacks share return values. They may send zero, one or many frames to the client.</p>
+<p>To send nothing, just return an ok tuple:</p>
+<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">websocket_info</span></span>(<span style="color: #009900">_Info</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">State</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>To send one frame, return a reply tuple with the frame to send:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">websocket_info</font></b>(<font color="#009900">_Info</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>To send one frame, return a reply tuple with the frame to send:</p>
+<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">websocket_info</span></span>(<span style="color: #009900">_Info</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">reply</span>, {<span style="color: #FF6600">text</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Hello!"</span><span style="color: #990000">&gt;&gt;</span>}, <span style="color: #009900">State</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>You can send frames of any type: text, binary, ping, pong
-or close frames.</p></div>
-<div class="paragraph"><p>To send many frames at once, return a reply tuple with the
-list of frames to send:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">websocket_info</font></b>(<font color="#009900">_Info</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">reply</font>, {<font color="#FF6600">text</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"Hello!"</font><font color="#990000">&gt;&gt;</font>}, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>You can send frames of any type: text, binary, ping, pong or close frames.</p>
+<p>To send many frames at once, return a reply tuple with the list of frames to send:</p>
+<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">websocket_info</span></span>(<span style="color: #009900">_Info</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">reply</span>, [
- {<span style="color: #FF6600">text</span>, <span style="color: #FF0000">"Hello"</span>},
- {<span style="color: #FF6600">text</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"world!"</span><span style="color: #990000">&gt;&gt;</span>},
- {<span style="font-weight: bold"><span style="color: #000080">binary</span></span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #993399">0</span><span style="color: #990000">:</span><span style="color: #993399">8000</span><span style="color: #990000">&gt;&gt;</span>}
- ], <span style="color: #009900">State</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>They are sent in the given order.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">websocket_info</font></b>(<font color="#009900">_Info</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">reply</font>, [
+ {<font color="#FF6600">text</font>, <font color="#FF0000">"Hello"</font>},
+ {<font color="#FF6600">text</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"world!"</font><font color="#990000">&gt;&gt;</font>},
+ {<b><font color="#000080">binary</font></b>, <font color="#990000">&lt;&lt;</font><font color="#993399">0</font><font color="#990000">:</font><font color="#993399">8000</font><font color="#990000">&gt;&gt;</font>}
+ ], <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>They are sent in the given order.</p>
<h2 id="_keeping_the_connection_alive">Keeping the connection alive</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy will automatically respond to ping frames sent by
-the client. They are still forwarded to the handler for
-informative purposes, but no further action is required.</p></div>
-<div class="paragraph"><p>Cowboy does not send ping frames itself. The handler can
-do it if required. A better solution in most cases is to
-let the client handle pings. Doing it from the handler
-would imply having an additional timer per connection and
-this can be a considerable cost for servers that need to
-handle large numbers of connections.</p></div>
-<div class="paragraph"><p>Cowboy can be configured to close idle connections
-automatically. It is highly recommended to configure
-a timeout here, to avoid having processes linger longer
-than needed.</p></div>
-<div class="paragraph"><p>The <code>init/2</code> callback can set the timeout to be used
-for the connection. For example, this would make Cowboy
-close connections idle for more than 30 seconds:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Cowboy will automatically respond to ping frames sent by the client. They are still forwarded to the handler for informative purposes, but no further action is required.</p>
+<p>Cowboy does not send ping frames itself. The handler can do it if required. A better solution in most cases is to let the client handle pings. Doing it from the handler would imply having an additional timer per connection and this can be a considerable cost for servers that need to handle large numbers of connections.</p>
+<p>Cowboy can be configured to close idle connections automatically. It is highly recommended to configure a timeout here, to avoid having processes linger longer than needed.</p>
+<p>The <code>init/2</code> callback can set the timeout to be used for the connection. For example, this would make Cowboy close connections idle for more than 30 seconds:</p>
+<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">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_websocket</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>, #{
- <span style="color: #0000FF">idle_timeout</span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">30000</span>}}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>This value cannot be changed once it is set. It defaults to
-<code>60000</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">cowboy_websocket</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>, #{
+ <font color="#0000FF">idle_timeout</font> <font color="#990000">=&gt;</font> <font color="#993399">30000</font>}}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>This value cannot be changed once it is set. It defaults to <code>60000</code>.</p>
<h2 id="_saving_memory">Saving memory</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The Websocket connection process can be set to hibernate
-after the callback returns.</p></div>
-<div class="paragraph"><p>Simply add an <code>hibernate</code> field to the ok or reply tuples:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The Websocket connection process can be set to hibernate after the callback returns.</p>
+<p>Simply add an <code>hibernate</code> field to the ok or reply tuples:</p>
+<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">websocket_init</span></span>(<span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">State</span>, <span style="color: #FF6600">hibernate</span>}<span style="color: #990000">.</span>
-
-<span style="font-weight: bold"><span style="color: #000000">websocket_handle</span></span>(<span style="color: #009900">_Frame</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">State</span>, <span style="color: #FF6600">hibernate</span>}<span style="color: #990000">.</span>
-
-<span style="font-weight: bold"><span style="color: #000000">websocket_info</span></span>(<span style="color: #009900">_Info</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">reply</span>, {<span style="color: #FF6600">text</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Hello!"</span><span style="color: #990000">&gt;&gt;</span>}, <span style="color: #009900">State</span>, <span style="color: #FF6600">hibernate</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>It is highly recommended to write your handlers with
-hibernate enabled, as this allows to greatly reduce the
-memory usage. Do note however that an increase in the
-CPU usage or latency can be observed instead, in particular
-for the more busy connections.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">websocket_init</font></b>(<font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <font color="#009900">State</font>, <font color="#FF6600">hibernate</font>}<font color="#990000">.</font>
+
+<b><font color="#000000">websocket_handle</font></b>(<font color="#009900">_Frame</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <font color="#009900">State</font>, <font color="#FF6600">hibernate</font>}<font color="#990000">.</font>
+
+<b><font color="#000000">websocket_info</font></b>(<font color="#009900">_Info</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">reply</font>, {<font color="#FF6600">text</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"Hello!"</font><font color="#990000">&gt;&gt;</font>}, <font color="#009900">State</font>, <font color="#FF6600">hibernate</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>It is highly recommended to write your handlers with hibernate enabled, as this allows to greatly reduce the memory usage. Do note however that an increase in the CPU usage or latency can be observed instead, in particular for the more busy connections.</p>
<h2 id="_closing_the_connection">Closing the connection</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The connection can be closed at any time, either by telling
-Cowboy to stop it or by sending a close frame.</p></div>
-<div class="paragraph"><p>To tell Cowboy to close the connection, use a stop tuple:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The connection can be closed at any time, either by telling Cowboy to stop it or by sending a close frame.</p>
+<p>To tell Cowboy to close the connection, use a stop tuple:</p>
+<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">websocket_info</span></span>(<span style="color: #009900">_Info</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">stop</span>, <span style="color: #009900">State</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Sending a <code>close</code> frame will immediately initiate the closing
-of the Websocket connection. Note that when sending a list of
-frames that include a close frame, any frame found after the
-close frame will not be sent.</p></div>
-</div>
-</div>
+<pre><tt><b><font color="#000000">websocket_info</font></b>(<font color="#009900">_Info</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">stop</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Sending a <code>close</code> frame will immediately initiate the closing of the Websocket connection. Note that when sending a list of frames that include a close frame, any frame found after the close frame will not be sent.</p>
+
diff --git a/docs/en/cowboy/2.1/guide/ws_protocol/index.html b/docs/en/cowboy/2.1/guide/ws_protocol/index.html
index f840e46c..aa5705d1 100644
--- a/docs/en/cowboy/2.1/guide/ws_protocol/index.html
+++ b/docs/en/cowboy/2.1/guide/ws_protocol/index.html
@@ -62,70 +62,22 @@
<h1 class="lined-header"><span>The Websocket protocol</span></h1>
-<div class="paragraph"><p>This chapter explains what Websocket is and why it is
-a vital component of soft realtime Web applications.</p></div>
-<div class="sect1">
+<p>This chapter explains what Websocket is and why it is a vital component of soft realtime Web applications.</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Websocket is an extension to HTTP that emulates plain TCP
-connections between the client, typically a Web browser,
-and the server. It uses the HTTP Upgrade mechanism to
-establish the connection.</p></div>
-<div class="paragraph"><p>Websocket connections are fully asynchronous, unlike
-HTTP/1.1 (synchronous) and HTTP/2 (asynchronous, but the
-server can only initiate streams in response to requests).
-With Websocket, the client and the server can both send
-frames at any time without any restriction. It is closer
-to TCP than any of the HTTP protocols.</p></div>
-<div class="paragraph"><p>Websocket is an IETF standard. Cowboy supports the standard
-and all drafts that were previously implemented by browsers,
-excluding the initial flawed draft sometimes known as
-"version 0".</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Websocket is an extension to HTTP that emulates plain TCP connections between the client, typically a Web browser, and the server. It uses the HTTP Upgrade mechanism to establish the connection.</p>
+<p>Websocket connections are fully asynchronous, unlike HTTP/1.1 (synchronous) and HTTP/2 (asynchronous, but the server can only initiate streams in response to requests). With Websocket, the client and the server can both send frames at any time without any restriction. It is closer to TCP than any of the HTTP protocols.</p>
+<p>Websocket is an IETF standard. Cowboy supports the standard and all drafts that were previously implemented by browsers, excluding the initial flawed draft sometimes known as &quot;version 0&quot;.</p>
<h2 id="_websocket_vs_http_2">Websocket vs HTTP/2</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>For a few years Websocket was the only way to have a
-bidirectional asynchronous connection with the server.
-This changed when HTTP/2 was introduced. While HTTP/2
-requires the client to first perform a request before
-the server can push data, this is only a minor restriction
-as the client can do so just as it connects.</p></div>
-<div class="paragraph"><p>Websocket was designed as a kind-of-TCP channel to a
-server. It only defines the framing and connection
-management and lets the developer implement a protocol
-on top of it. For example you could implement IRC over
-Websocket and use a Javascript IRC client to speak to
-the server.</p></div>
-<div class="paragraph"><p>HTTP/2 on the other hand is just an improvement over
-the HTTP/1.1 connection and request/response mechanism.
-It has the same semantics as HTTP/1.1.</p></div>
-<div class="paragraph"><p>If all you need is to access an HTTP API, then HTTP/2
-should be your first choice. On the other hand, if what
-you need is a different protocol, then you can use
-Websocket to implement it.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>For a few years Websocket was the only way to have a bidirectional asynchronous connection with the server. This changed when HTTP/2 was introduced. While HTTP/2 requires the client to first perform a request before the server can push data, this is only a minor restriction as the client can do so just as it connects.</p>
+<p>Websocket was designed as a kind-of-TCP channel to a server. It only defines the framing and connection management and lets the developer implement a protocol on top of it. For example you could implement IRC over Websocket and use a Javascript IRC client to speak to the server.</p>
+<p>HTTP/2 on the other hand is just an improvement over the HTTP/1.1 connection and request/response mechanism. It has the same semantics as HTTP/1.1.</p>
+<p>If all you need is to access an HTTP API, then HTTP/2 should be your first choice. On the other hand, if what you need is a different protocol, then you can use Websocket to implement it.</p>
<h2 id="_implementation">Implementation</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy implements Websocket as a protocol upgrade. Once the
-upgrade is performed from the <code>init/2</code> callback, Cowboy
-switches to Websocket. Please consult the next chapter for
-more information on initiating and handling Websocket
-connections.</p></div>
-<div class="paragraph"><p>The implementation of Websocket in Cowboy is validated using
-the Autobahn test suite, which is an extensive suite of tests
-covering all aspects of the protocol. Cowboy passes the
-suite with 100% success, including all optional tests.</p></div>
-<div class="paragraph"><p>Cowboy&#8217;s Websocket implementation also includes the
-permessage-deflate and x-webkit-deflate-frame compression
-extensions.</p></div>
-<div class="paragraph"><p>Cowboy will automatically use compression when the
-<code>compress</code> option is returned from the <code>init/2</code> function.</p></div>
-</div>
-</div>
+<p>Cowboy implements Websocket as a protocol upgrade. Once the upgrade is performed from the <code>init/2</code> callback, Cowboy switches to Websocket. Please consult the next chapter for more information on initiating and handling Websocket connections.</p>
+<p>The implementation of Websocket in Cowboy is validated using the Autobahn test suite, which is an extensive suite of tests covering all aspects of the protocol. Cowboy passes the suite with 100% success, including all optional tests.</p>
+<p>Cowboy&apos;s Websocket implementation also includes the permessage-deflate and x-webkit-deflate-frame compression extensions.</p>
+<p>Cowboy will automatically use compression when the <code>compress</code> option is returned from the <code>init/2</code> function.</p>
+
diff --git a/docs/en/cowboy/2.1/manual/cowboy.set_env/index.html b/docs/en/cowboy/2.1/manual/cowboy.set_env/index.html
index 94ab14c2..684e90a7 100644
--- a/docs/en/cowboy/2.1/manual/cowboy.set_env/index.html
+++ b/docs/en/cowboy/2.1/manual/cowboy.set_env/index.html
@@ -62,117 +62,59 @@
<h1 class="lined-header"><span>cowboy:set_env(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy:set_env - Update a listener&#8217;s environment value</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy:set_env - Update a listener&apos;s environment value</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">set_env</span></span>(<span style="color: #009900">Name</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">ranch:ref</span></span>(),
- <span style="color: #009900">Key</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">atom</span></span>(),
- <span style="color: #009900">Value</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>())
- <span style="color: #990000">-&gt;</span> <span style="color: #FF6600">ok</span></tt></pre></div></div>
-<div class="paragraph"><p>Set or update an environment value for a previously started
-listener.</p></div>
-<div class="paragraph"><p>This is most useful for updating the routes dynamically,
-without having to restart the listener.</p></div>
-<div class="paragraph"><p>The new value will only be available to new connections.
-Pre-existing connections will still use the old value.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">set_env</font></b>(<font color="#009900">Name</font> <font color="#990000">::</font> <b><font color="#000000">ranch:ref</font></b>(),
+ <font color="#009900">Key</font> <font color="#990000">::</font> <b><font color="#000080">atom</font></b>(),
+ <font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>())
+ <font color="#990000">-&gt;</font> <font color="#FF6600">ok</font></tt></pre>
+</div></div>
+<p>Set or update an environment value for a previously started listener.</p>
+<p>This is most useful for updating the routes dynamically, without having to restart the listener.</p>
+<p>The new value will only be available to new connections. Pre-existing connections will still use the old value.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Name
-</dt>
-<dd>
-<p>
-The name of the listener to update.
-</p>
-<div class="paragraph"><p>The name of the listener is the first argument given to the
-<a href="../cowboy.start_clear">cowboy:start_clear(3)</a>,
-<a href="../cowboy.start_tls">cowboy:start_tls(3)</a> or
-<a href="../ranch.start_listener">ranch:start_listener(3)</a> function.</p></div>
+<dl><dt>Name</dt>
+<dd><p>The name of the listener to update.</p>
+<p>The name of the listener is the first argument given to the <a href="../cowboy.start_clear">cowboy:start_clear(3)</a>, <a href="../cowboy.start_tls">cowboy:start_tls(3)</a> or <a href="../ranch.start_listener">ranch:start_listener(3)</a> function.</p>
</dd>
-<dt class="hdlist1">
-Key
-</dt>
-<dd>
-<p>
-The key in the environment map. Common keys include <code>dispatch</code>
-and <code>middlewares</code>.
-</p>
+<dt>Key</dt>
+<dd><p>The key in the environment map. Common keys include <code>dispatch</code> and <code>middlewares</code>.</p>
</dd>
-<dt class="hdlist1">
-Value
-</dt>
-<dd>
-<p>
-The new value.
-</p>
-<div class="paragraph"><p>The type of the value differs depending on the key.</p></div>
+<dt>Value</dt>
+<dd><p>The new value.</p>
+<p>The type of the value differs depending on the key.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The atom <code>ok</code> is returned on success.</p></div>
-<div class="paragraph"><p>An <code>exit:badarg</code> exception is thrown when the listener does
-not exist.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The atom <code>ok</code> is returned on success.</p>
+<p>An <code>exit:badarg</code> exception is thrown when the listener does not exist.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<ul><li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Update a listener&#8217;s routes</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Update a listener&apos;s routes</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">Dispatch</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_router:compile</span></span>([
- {<span style="color: #FF6600">'_'</span>, [
- {<span style="color: #FF0000">"/"</span>, <span style="color: #FF6600">toppage_h</span>, []},
- {<span style="color: #FF0000">"/ws"</span>, <span style="color: #FF6600">websocket_h</span>, []}
+<pre><tt><font color="#009900">Dispatch</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_router:compile</font></b>([
+ {<font color="#FF6600">'_'</font>, [
+ {<font color="#FF0000">"/"</font>, <font color="#FF6600">toppage_h</font>, []},
+ {<font color="#FF0000">"/ws"</font>, <font color="#FF6600">websocket_h</font>, []}
]}
]),
-<span style="font-weight: bold"><span style="color: #000000">cowboy:set_env</span></span>(<span style="color: #FF6600">example</span>, <span style="color: #FF6600">dispatch</span>, <span style="color: #009900">Dispatch</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<b><font color="#000000">cowboy:set_env</font></b>(<font color="#FF6600">example</font>, <font color="#FF6600">dispatch</font>, <font color="#009900">Dispatch</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../cowboy">cowboy(3)</a>,
-<a href="../cowboy.start_clear">cowboy:start_clear(3)</a>,
-<a href="../cowboy.start_tls">cowboy:start_tls(3)</a>,
-<a href="../ranch.set_protocol_options">ranch:set_protocol_options(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy">cowboy(3)</a>, <a href="../cowboy.start_clear">cowboy:start_clear(3)</a>, <a href="../cowboy.start_tls">cowboy:start_tls(3)</a>, <a href="../ranch.set_protocol_options">ranch:set_protocol_options(3)</a></p>
+
diff --git a/docs/en/cowboy/2.1/manual/cowboy.start_clear/index.html b/docs/en/cowboy/2.1/manual/cowboy.start_clear/index.html
index b5268e08..d20c97c5 100644
--- a/docs/en/cowboy/2.1/manual/cowboy.start_clear/index.html
+++ b/docs/en/cowboy/2.1/manual/cowboy.start_clear/index.html
@@ -62,148 +62,77 @@
<h1 class="lined-header"><span>cowboy:start_clear(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy:start_clear - Listen for connections using plain TCP</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy:start_clear - Listen for connections using plain TCP</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">start_clear</span></span>(<span style="color: #009900">Name</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">ranch:ref</span></span>(),
- <span style="color: #009900">TransportOpts</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">ranch_tcp:opts</span></span>(),
- <span style="color: #009900">ProtocolOpts</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">opts</span></span>())
- <span style="color: #990000">-&gt;</span> {<span style="color: #FF6600">ok</span>, <span style="color: #009900">ListenerPid</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">pid</span></span>()}
- | {<span style="color: #FF6600">error</span>, <span style="font-weight: bold"><span style="color: #000000">any</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>Start listening for connections over a clear TCP channel.</p></div>
-<div class="paragraph"><p>Both HTTP/1.1 and HTTP/2 are supported on this listener.
-HTTP/2 has two methods of establishing a connection over
-a clear TCP channel. Both the upgrade and the prior knowledge
-methods are supported.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">start_clear</font></b>(<font color="#009900">Name</font> <font color="#990000">::</font> <b><font color="#000000">ranch:ref</font></b>(),
+ <font color="#009900">TransportOpts</font> <font color="#990000">::</font> <b><font color="#000000">ranch_tcp:opts</font></b>(),
+ <font color="#009900">ProtocolOpts</font> <font color="#990000">::</font> <b><font color="#000000">opts</font></b>())
+ <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <font color="#009900">ListenerPid</font> <font color="#990000">::</font> <b><font color="#000080">pid</font></b>()}
+ | {<font color="#FF6600">error</font>, <b><font color="#000000">any</font></b>()}</tt></pre>
+</div></div>
+<p>Start listening for connections over a clear TCP channel.</p>
+<p>Both HTTP/1.1 and HTTP/2 are supported on this listener. HTTP/2 has two methods of establishing a connection over a clear TCP channel. Both the upgrade and the prior knowledge methods are supported.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Name
-</dt>
-<dd>
-<p>
-The listener name is used to refer to this listener in
-future calls, for example when stopping it or when
-updating the routes defined.
-</p>
-<div class="paragraph"><p>It can be any Erlang term. An atom is generally good enough,
-for example <code>api</code>, <code>my_app_clear</code> or <code>my_app_tls</code>.</p></div>
+<dl><dt>Name</dt>
+<dd><p>The listener name is used to refer to this listener in future calls, for example when stopping it or when updating the routes defined.</p>
+<p>It can be any Erlang term. An atom is generally good enough, for example <code>api</code>, <code>my_app_clear</code> or <code>my_app_tls</code>.</p>
</dd>
-<dt class="hdlist1">
-TransportOpts
-</dt>
-<dd>
-<p>
-The transport options are where the TCP options, including
-the listener&#8217;s port number, are defined. Transport options
-are provided as a list of keys and values, for example
-<code>[{port, 8080}]</code>.
-</p>
-<div class="paragraph"><p>The available options are documented in the
-<a href="../ranch_tcp">ranch_tcp(3)</a> manual.</p></div>
+<dt>TransportOpts</dt>
+<dd><p>The transport options are where the TCP options, including the listener&apos;s port number, are defined. Transport options are provided as a list of keys and values, for example <code>[{port, 8080}]</code>.</p>
+<p>The available options are documented in the <a href="../ranch_tcp">ranch_tcp(3)</a> manual.</p>
</dd>
-<dt class="hdlist1">
-ProtocolOpts
-</dt>
-<dd>
-<p>
-The protocol options are in a map containing all the options for
-the different protocols that may be involved when connecting
-to the listener, including HTTP/1.1 and HTTP/2.
-</p>
-<div class="paragraph"><p>The HTTP/1.1 options are documented in the
-<a href="../cowboy_http">cowboy_http(3)</a> manual;
-and the HTTP/2 options in
-<a href="../cowboy_http2">cowboy_http2(3)</a>.</p></div>
+<dt>ProtocolOpts</dt>
+<dd><p>The protocol options are in a map containing all the options for the different protocols that may be involved when connecting to the listener, including HTTP/1.1 and HTTP/2.</p>
+<p>The HTTP/1.1 options are documented in the <a href="../cowboy_http">cowboy_http(3)</a> manual; and the HTTP/2 options in <a href="../cowboy_http2">cowboy_http2(3)</a>.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>An ok tuple is returned on success. It contains the pid of
-the top-level supervisor for the listener.</p></div>
-<div class="paragraph"><p>An error tuple is returned on error. The error reason may
-be any Erlang term.</p></div>
-<div class="paragraph"><p>A common error is <code>eaddrinuse</code>. It indicates that the port
-configured for Cowboy is already in use.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>An ok tuple is returned on success. It contains the pid of the top-level supervisor for the listener.</p>
+<p>An error tuple is returned on error. The error reason may be any Erlang term.</p>
+<p>A common error is <code>eaddrinuse</code>. It indicates that the port configured for Cowboy is already in use.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: HTTP/2 support added.
-</p>
+<ul><li><strong>2.0</strong>: HTTP/2 support added.
</li>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced. Replaces <code>cowboy:start_http/4</code>.
-</p>
+<li><strong>2.0</strong>: Function introduced. Replaces <code>cowboy:start_http/4</code>.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Start a listener</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Start a listener</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">Dispatch</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_router:compile</span></span>([
- {<span style="color: #FF6600">'_'</span>, [
- {<span style="color: #FF0000">"/"</span>, <span style="color: #FF6600">toppage_h</span>, []}
+<pre><tt><font color="#009900">Dispatch</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_router:compile</font></b>([
+ {<font color="#FF6600">'_'</font>, [
+ {<font color="#FF0000">"/"</font>, <font color="#FF6600">toppage_h</font>, []}
]}
]),
-{<span style="color: #FF6600">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:start_clear</span></span>(<span style="color: #FF6600">example</span>, [{<span style="color: #FF6600">port</span>, <span style="color: #993399">8080</span>}], #{
- <span style="color: #0000FF">env</span> <span style="color: #990000">=&gt;</span> #{<span style="color: #0000FF">dispatch</span> <span style="color: #990000">=&gt;</span> <span style="color: #009900">Dispatch</span>}
-})<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Start a listener on a random port</div>
-<div class="content"><!-- Generator: GNU source-highlight
+{<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy:start_clear</font></b>(<font color="#FF6600">example</font>, [{<font color="#FF6600">port</font>, <font color="#993399">8080</font>}], #{
+ <font color="#0000FF">env</font> <font color="#990000">=&gt;</font> #{<font color="#0000FF">dispatch</font> <font color="#990000">=&gt;</font> <font color="#009900">Dispatch</font>}
+})<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Start a listener on a random port</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">Name</span> <span style="color: #990000">=</span> <span style="color: #FF6600">example</span>,
+<pre><tt><font color="#009900">Name</font> <font color="#990000">=</font> <font color="#FF6600">example</font>,
-{<span style="color: #FF6600">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:start_clear</span></span>(<span style="color: #009900">Name</span>, [], #{
- <span style="color: #0000FF">env</span> <span style="color: #990000">=&gt;</span> #{<span style="color: #0000FF">dispatch</span> <span style="color: #990000">=&gt;</span> <span style="color: #009900">Dispatch</span>}
+{<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy:start_clear</font></b>(<font color="#009900">Name</font>, [], #{
+ <font color="#0000FF">env</font> <font color="#990000">=&gt;</font> #{<font color="#0000FF">dispatch</font> <font color="#990000">=&gt;</font> <font color="#009900">Dispatch</font>}
}),
-<span style="color: #009900">Port</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">ranch:get_port</span></span>(<span style="color: #009900">Name</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<font color="#009900">Port</font> <font color="#990000">=</font> <b><font color="#000000">ranch:get_port</font></b>(<font color="#009900">Name</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../cowboy">cowboy(3)</a>,
-<a href="../cowboy.start_tls">cowboy:start_tls(3)</a>,
-<a href="../cowboy.stop_listener">cowboy:stop_listener(3)</a>,
-<a href="../ranch">ranch(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy">cowboy(3)</a>, <a href="../cowboy.start_tls">cowboy:start_tls(3)</a>, <a href="../cowboy.stop_listener">cowboy:stop_listener(3)</a>, <a href="../ranch">ranch(3)</a></p>
+
diff --git a/docs/en/cowboy/2.1/manual/cowboy.start_tls/index.html b/docs/en/cowboy/2.1/manual/cowboy.start_tls/index.html
index 63b6227a..33469ef1 100644
--- a/docs/en/cowboy/2.1/manual/cowboy.start_tls/index.html
+++ b/docs/en/cowboy/2.1/manual/cowboy.start_tls/index.html
@@ -62,153 +62,82 @@
<h1 class="lined-header"><span>cowboy:start_tls(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy:start_tls - Listen for connections using TLS</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy:start_tls - Listen for connections using TLS</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">start_tls</span></span>(<span style="color: #009900">Name</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">ranch:ref</span></span>(),
- <span style="color: #009900">TransportOpts</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">ranch_ssl:opts</span></span>(),
- <span style="color: #009900">ProtocolOpts</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">opts</span></span>())
- <span style="color: #990000">-&gt;</span> {<span style="color: #FF6600">ok</span>, <span style="color: #009900">ListenerPid</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">pid</span></span>()}
- | {<span style="color: #FF6600">error</span>, <span style="font-weight: bold"><span style="color: #000000">any</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>Start listening for connections over a secure TLS channel.</p></div>
-<div class="paragraph"><p>Both HTTP/1.1 and HTTP/2 are supported on this listener.
-The ALPN TLS extension must be used to initiate an HTTP/2
-connection.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">start_tls</font></b>(<font color="#009900">Name</font> <font color="#990000">::</font> <b><font color="#000000">ranch:ref</font></b>(),
+ <font color="#009900">TransportOpts</font> <font color="#990000">::</font> <b><font color="#000000">ranch_ssl:opts</font></b>(),
+ <font color="#009900">ProtocolOpts</font> <font color="#990000">::</font> <b><font color="#000000">opts</font></b>())
+ <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <font color="#009900">ListenerPid</font> <font color="#990000">::</font> <b><font color="#000080">pid</font></b>()}
+ | {<font color="#FF6600">error</font>, <b><font color="#000000">any</font></b>()}</tt></pre>
+</div></div>
+<p>Start listening for connections over a secure TLS channel.</p>
+<p>Both HTTP/1.1 and HTTP/2 are supported on this listener. The ALPN TLS extension must be used to initiate an HTTP/2 connection.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Name
-</dt>
-<dd>
-<p>
-The listener name is used to refer to this listener in
-future calls, for example when stopping it or when
-updating the routes defined.
-</p>
-<div class="paragraph"><p>It can be any Erlang term. An atom is generally good enough,
-for example <code>api</code>, <code>my_app_clear</code> or <code>my_app_tls</code>.</p></div>
+<dl><dt>Name</dt>
+<dd><p>The listener name is used to refer to this listener in future calls, for example when stopping it or when updating the routes defined.</p>
+<p>It can be any Erlang term. An atom is generally good enough, for example <code>api</code>, <code>my_app_clear</code> or <code>my_app_tls</code>.</p>
</dd>
-<dt class="hdlist1">
-TransportOpts
-</dt>
-<dd>
-<p>
-The transport options are where the TCP options, including
-the listener&#8217;s port number, are defined. They also contain
-the TLS options, like the server&#8217;s certificate. Transport options
-are provided as a list of keys and values, for example
-<code>[{port, 8443}, {certfile, "path/to/cert.pem"}]</code>.
-</p>
-<div class="paragraph"><p>The available options are documented in the
-<a href="../ranch_ssl">ranch_ssl(3)</a> manual.</p></div>
+<dt>TransportOpts</dt>
+<dd><p>The transport options are where the TCP options, including the listener&apos;s port number, are defined. They also contain the TLS options, like the server&apos;s certificate. Transport options are provided as a list of keys and values, for example <code>[{port, 8443}, {certfile, &quot;path/to/cert.pem&quot;}]</code>.</p>
+<p>The available options are documented in the <a href="../ranch_ssl">ranch_ssl(3)</a> manual.</p>
</dd>
-<dt class="hdlist1">
-ProtocolOpts
-</dt>
-<dd>
-<p>
-The protocol options are in a map containing all the options for
-the different protocols that may be involved when connecting
-to the listener, including HTTP/1.1 and HTTP/2.
-</p>
-<div class="paragraph"><p>The HTTP/1.1 options are documented in the
-<a href="../cowboy_http">cowboy_http(3)</a> manual;
-and the HTTP/2 options in
-<a href="../cowboy_http2">cowboy_http2(3)</a>.</p></div>
+<dt>ProtocolOpts</dt>
+<dd><p>The protocol options are in a map containing all the options for the different protocols that may be involved when connecting to the listener, including HTTP/1.1 and HTTP/2.</p>
+<p>The HTTP/1.1 options are documented in the <a href="../cowboy_http">cowboy_http(3)</a> manual; and the HTTP/2 options in <a href="../cowboy_http2">cowboy_http2(3)</a>.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>An ok tuple is returned on success. It contains the pid of
-the top-level supervisor for the listener.</p></div>
-<div class="paragraph"><p>An error tuple is returned on error. The error reason may
-be any Erlang term.</p></div>
-<div class="paragraph"><p>A common error is <code>eaddrinuse</code>. It indicates that the port
-configured for Cowboy is already in use.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>An ok tuple is returned on success. It contains the pid of the top-level supervisor for the listener.</p>
+<p>An error tuple is returned on error. The error reason may be any Erlang term.</p>
+<p>A common error is <code>eaddrinuse</code>. It indicates that the port configured for Cowboy is already in use.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: HTTP/2 support added.
-</p>
+<ul><li><strong>2.0</strong>: HTTP/2 support added.
</li>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced. Replaces <code>cowboy:start_https/4</code>.
-</p>
+<li><strong>2.0</strong>: Function introduced. Replaces <code>cowboy:start_https/4</code>.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Start a listener</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Start a listener</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">Dispatch</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_router:compile</span></span>([
- {<span style="color: #FF6600">'_'</span>, [
- {<span style="color: #FF0000">"/"</span>, <span style="color: #FF6600">toppage_h</span>, []}
+<pre><tt><font color="#009900">Dispatch</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_router:compile</font></b>([
+ {<font color="#FF6600">'_'</font>, [
+ {<font color="#FF0000">"/"</font>, <font color="#FF6600">toppage_h</font>, []}
]}
]),
-{<span style="color: #FF6600">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:start_tls</span></span>(<span style="color: #FF6600">example</span>, [
- {<span style="color: #FF6600">port</span>, <span style="color: #993399">8443</span>},
- {<span style="color: #FF6600">cert</span>, <span style="color: #FF0000">"path/to/cert.pem"</span>}
+{<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy:start_tls</font></b>(<font color="#FF6600">example</font>, [
+ {<font color="#FF6600">port</font>, <font color="#993399">8443</font>},
+ {<font color="#FF6600">cert</font>, <font color="#FF0000">"path/to/cert.pem"</font>}
], #{
- <span style="color: #0000FF">env</span> <span style="color: #990000">=&gt;</span> #{<span style="color: #0000FF">dispatch</span> <span style="color: #990000">=&gt;</span> <span style="color: #009900">Dispatch</span>}
-})<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Start a listener on a random port</div>
-<div class="content"><!-- Generator: GNU source-highlight
+ <font color="#0000FF">env</font> <font color="#990000">=&gt;</font> #{<font color="#0000FF">dispatch</font> <font color="#990000">=&gt;</font> <font color="#009900">Dispatch</font>}
+})<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Start a listener on a random port</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">Name</span> <span style="color: #990000">=</span> <span style="color: #FF6600">example</span>,
+<pre><tt><font color="#009900">Name</font> <font color="#990000">=</font> <font color="#FF6600">example</font>,
-{<span style="color: #FF6600">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:start_tls</span></span>(<span style="color: #009900">Name</span>, [
- {<span style="color: #FF6600">cert</span>, <span style="color: #FF0000">"path/to/cert.pem"</span>}
+{<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy:start_tls</font></b>(<font color="#009900">Name</font>, [
+ {<font color="#FF6600">cert</font>, <font color="#FF0000">"path/to/cert.pem"</font>}
], #{
- <span style="color: #0000FF">env</span> <span style="color: #990000">=&gt;</span> #{<span style="color: #0000FF">dispatch</span> <span style="color: #990000">=&gt;</span> <span style="color: #009900">Dispatch</span>}
+ <font color="#0000FF">env</font> <font color="#990000">=&gt;</font> #{<font color="#0000FF">dispatch</font> <font color="#990000">=&gt;</font> <font color="#009900">Dispatch</font>}
}),
-<span style="color: #009900">Port</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">ranch:get_port</span></span>(<span style="color: #009900">Name</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<font color="#009900">Port</font> <font color="#990000">=</font> <b><font color="#000000">ranch:get_port</font></b>(<font color="#009900">Name</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../cowboy">cowboy(3)</a>,
-<a href="../cowboy.start_clear">cowboy:start_clear(3)</a>,
-<a href="../cowboy.stop_listener">cowboy:stop_listener(3)</a>,
-<a href="../ranch">ranch(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy">cowboy(3)</a>, <a href="../cowboy.start_clear">cowboy:start_clear(3)</a>, <a href="../cowboy.stop_listener">cowboy:stop_listener(3)</a>, <a href="../ranch">ranch(3)</a></p>
+
diff --git a/docs/en/cowboy/2.1/manual/cowboy.stop_listener/index.html b/docs/en/cowboy/2.1/manual/cowboy.stop_listener/index.html
index 52b2bacc..7274f27c 100644
--- a/docs/en/cowboy/2.1/manual/cowboy.stop_listener/index.html
+++ b/docs/en/cowboy/2.1/manual/cowboy.stop_listener/index.html
@@ -62,87 +62,42 @@
<h1 class="lined-header"><span>cowboy:stop_listener(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy:stop_listener - Stop the given listener</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy:stop_listener - Stop the given listener</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">stop_listener</span></span>(<span style="color: #009900">Name</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">ranch:ref</span></span>())
- <span style="color: #990000">-&gt;</span> <span style="color: #FF6600">ok</span> | {<span style="color: #FF6600">error</span>, <span style="color: #FF6600">not_found</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Stop a previously started listener.</p></div>
-<div class="paragraph"><p>Alias of <a href="../ranch.stop_listener">ranch:stop_listener(3)</a>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">stop_listener</font></b>(<font color="#009900">Name</font> <font color="#990000">::</font> <b><font color="#000000">ranch:ref</font></b>())
+ <font color="#990000">-&gt;</font> <font color="#FF6600">ok</font> | {<font color="#FF6600">error</font>, <font color="#FF6600">not_found</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Stop a previously started listener.</p>
+<p>Alias of <a href="../ranch.stop_listener">ranch:stop_listener(3)</a>.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Name
-</dt>
-<dd>
-<p>
-The name of the listener to be stopped.
-</p>
-<div class="paragraph"><p>The name of the listener is the first argument given to the
-<a href="../cowboy.start_clear">cowboy:start_clear(3)</a>,
-<a href="../cowboy.start_tls">cowboy:start_tls(3)</a> or
-<a href="../ranch.start_listener">ranch:start_listener(3)</a> function.</p></div>
+<dl><dt>Name</dt>
+<dd><p>The name of the listener to be stopped.</p>
+<p>The name of the listener is the first argument given to the <a href="../cowboy.start_clear">cowboy:start_clear(3)</a>, <a href="../cowboy.start_tls">cowboy:start_tls(3)</a> or <a href="../ranch.start_listener">ranch:start_listener(3)</a> function.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The atom <code>ok</code> is returned on success.</p></div>
-<div class="paragraph"><p>The <code>{error, not_found}</code> tuple is returned when the listener
-does not exist.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The atom <code>ok</code> is returned on success.</p>
+<p>The <code>{error, not_found}</code> tuple is returned when the listener does not exist.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<ul><li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Stop a listener</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Stop a listener</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: #0000FF">ok</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:stop_listener</span></span>(<span style="color: #FF6600">example</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#0000FF">ok</font> <font color="#990000">=</font> <b><font color="#000000">cowboy:stop_listener</font></b>(<font color="#FF6600">example</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../cowboy">cowboy(3)</a>,
-<a href="../cowboy.start_clear">cowboy:start_clear(3)</a>,
-<a href="../cowboy.start_tls">cowboy:start_tls(3)</a>,
-<a href="../ranch">ranch(3)</a>,
-<a href="../ranch.start_listener">ranch:start_listener(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy">cowboy(3)</a>, <a href="../cowboy.start_clear">cowboy:start_clear(3)</a>, <a href="../cowboy.start_tls">cowboy:start_tls(3)</a>, <a href="../ranch">ranch(3)</a>, <a href="../ranch.start_listener">ranch:start_listener(3)</a></p>
+
diff --git a/docs/en/cowboy/2.1/manual/cowboy/index.html b/docs/en/cowboy/2.1/manual/cowboy/index.html
index 7caa8dc0..078f560f 100644
--- a/docs/en/cowboy/2.1/manual/cowboy/index.html
+++ b/docs/en/cowboy/2.1/manual/cowboy/index.html
@@ -62,129 +62,76 @@
<h1 class="lined-header"><span>cowboy(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy - HTTP server</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy - HTTP server</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The module <code>cowboy</code> provides convenience functions for
-manipulating Ranch listeners.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The module <code>cowboy</code> provides convenience functions for manipulating Ranch listeners.</p>
<h2 id="_exports">Exports</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../cowboy.start_clear">cowboy:start_clear(3)</a> - Listen for connections using plain TCP
-</p>
+<ul><li><a href="../cowboy.start_clear">cowboy:start_clear(3)</a> - Listen for connections using plain TCP
</li>
-<li>
-<p>
-<a href="../cowboy.start_tls">cowboy:start_tls(3)</a> - Listen for connections using TLS
-</p>
+<li><a href="../cowboy.start_tls">cowboy:start_tls(3)</a> - Listen for connections using TLS
</li>
-<li>
-<p>
-<a href="../cowboy.stop_listener">cowboy:stop_listener(3)</a> - Stop the given listener
-</p>
+<li><a href="../cowboy.stop_listener">cowboy:stop_listener(3)</a> - Stop the given listener
</li>
-<li>
-<p>
-<a href="../cowboy.set_env">cowboy:set_env(3)</a> - Update a listener&#8217;s environment value
-</p>
+<li><a href="../cowboy.set_env">cowboy:set_env(3)</a> - Update a listener&apos;s environment value
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_types">Types</h2>
-<div class="sectionbody">
-<div class="sect2">
<h3 id="_fields">fields()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">fields</span></span>() <span style="color: #990000">::</span> [<span style="color: #009900">Name</span>
- | {<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">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>
-<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
-<a href="../cowboy_req">cowboy_req(3)</a>.</p></div>
-</div>
-<div class="sect2">
+<pre><tt><b><font color="#000000">fields</font></b>() <font color="#990000">::</font> [<font color="#009900">Name</font>
+ | {<font color="#009900">Name</font>, <font color="#009900">Constraints</font>}
+ | {<font color="#009900">Name</font>, <font color="#009900">Constraints</font>, <font color="#009900">Default</font>}]
+
+<font color="#009900">Name</font> <font color="#990000">::</font> <b><font color="#000080">atom</font></b>()
+<font color="#009900">Constraints</font> <font color="#990000">::</font> <font color="#009900">Constraint</font> | [<font color="#009900">Constraint</font>]
+<font color="#009900">Constraint</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_constraints:constraint</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()</tt></pre>
+</div></div>
+<p>Fields description for match operations.</p>
+<p>This type is used in <a href="../cowboy_router">cowboy_router(3)</a> for matching bindings and in the match functions found in <a href="../cowboy_req">cowboy_req(3)</a>.</p>
<h3 id="_http_headers">http_headers()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">http_headers</span></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: #000000">iodata</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>HTTP headers.</p></div>
-</div>
-<div class="sect2">
+<pre><tt><b><font color="#000000">http_headers</font></b>() <font color="#990000">::</font> #{<b><font color="#000080">binary</font></b>() <font color="#990000">=&gt;</font> <b><font color="#000000">iodata</font></b>()}</tt></pre>
+</div></div>
+<p>HTTP headers.</p>
<h3 id="_http_status">http_status()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">http_status</span></span>() <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>() | <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>HTTP response status.</p></div>
-<div class="paragraph"><p>A binary status can be used to set a reason phrase. Note
-however that HTTP/2 only sends the status code and drops
-the reason phrase entirely.</p></div>
-</div>
-<div class="sect2">
+<pre><tt><b><font color="#000000">http_status</font></b>() <font color="#990000">::</font> <b><font color="#000000">non_neg_integer</font></b>() | <b><font color="#000080">binary</font></b>()</tt></pre>
+</div></div>
+<p>HTTP response status.</p>
+<p>A binary status can be used to set a reason phrase. Note however that HTTP/2 only sends the status code and drops the reason phrase entirely.</p>
<h3 id="_http_version">http_version()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">http_version</span></span>() <span style="color: #990000">::</span> <span style="color: #FF6600">'HTTP/2'</span> | <span style="color: #FF6600">'HTTP/1.1'</span> | <span style="color: #FF6600">'HTTP/1.0'</span></tt></pre></div></div>
-<div class="paragraph"><p>HTTP version.</p></div>
-<div class="paragraph"><p>Note that semantically, HTTP/1.1 and HTTP/2 are equivalent.</p></div>
-</div>
-<div class="sect2">
+<pre><tt><b><font color="#000000">http_version</font></b>() <font color="#990000">::</font> <font color="#FF6600">'HTTP/2'</font> | <font color="#FF6600">'HTTP/1.1'</font> | <font color="#FF6600">'HTTP/1.0'</font></tt></pre>
+</div></div>
+<p>HTTP version.</p>
+<p>Note that semantically, HTTP/1.1 and HTTP/2 are equivalent.</p>
<h3 id="_opts">opts()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">opts</span></span>() <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">map</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Options for the HTTP/1.1, HTTP/2 and Websocket protocols.</p></div>
-<div class="paragraph"><p>The protocol options are in a map containing all the options for
-the different protocols that may be involved when connecting
-to the listener, including HTTP/1.1 and HTTP/2.</p></div>
-<div class="paragraph"><p>The HTTP/1.1 options are documented in the
-<a href="../cowboy_http">cowboy_http(3)</a> manual
-and the HTTP/2 options in
-<a href="../cowboy_http2">cowboy_http2(3)</a>.</p></div>
-</div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">opts</font></b>() <font color="#990000">::</font> <b><font color="#000000">map</font></b>()</tt></pre>
+</div></div>
+<p>Options for the HTTP/1.1, HTTP/2 and Websocket protocols.</p>
+<p>The protocol options are in a map containing all the options for the different protocols that may be involved when connecting to the listener, including HTTP/1.1 and HTTP/2.</p>
+<p>The HTTP/1.1 options are documented in the <a href="../cowboy_http">cowboy_http(3)</a> manual and the HTTP/2 options in <a href="../cowboy_http2">cowboy_http2(3)</a>.</p>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="..">cowboy(7)</a>,
-<a href="../ranch">ranch(3)</a></p></div>
-</div>
-</div>
+<p><a href="..">cowboy(7)</a>, <a href="../ranch">ranch(3)</a></p>
+
diff --git a/docs/en/cowboy/2.1/manual/cowboy_app/index.html b/docs/en/cowboy/2.1/manual/cowboy_app/index.html
index b3ae0707..44c4d65d 100644
--- a/docs/en/cowboy/2.1/manual/cowboy_app/index.html
+++ b/docs/en/cowboy/2.1/manual/cowboy_app/index.html
@@ -62,171 +62,77 @@
<h1 class="lined-header"><span>cowboy(7)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy - Small, fast, modern HTTP server for Erlang/OTP</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy - Small, fast, modern HTTP server for Erlang/OTP</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy is an HTTP server for Erlang/OTP with support for the
-HTTP/1.1, HTTP/2 and Websocket protocols.</p></div>
-<div class="paragraph"><p>Cowboy aims to provide a complete HTTP stack. This includes
-the implementation of the HTTP RFCs but also any directly
-related standards, like Websocket or Server-Sent Events.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Cowboy is an HTTP server for Erlang/OTP with support for the HTTP/1.1, HTTP/2 and Websocket protocols.</p>
+<p>Cowboy aims to provide a complete HTTP stack. This includes the implementation of the HTTP RFCs but also any directly related standards, like Websocket or Server-Sent Events.</p>
<h2 id="_modules">Modules</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Functions:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../cowboy">cowboy(3)</a> - Listener management
-</p>
+<p>Functions:</p>
+<ul><li><a href="../cowboy">cowboy(3)</a> - Listener management
</li>
-<li>
-<p>
-<a href="../cowboy_req">cowboy_req(3)</a> - Request and response
-</p>
+<li><a href="../cowboy_req">cowboy_req(3)</a> - Request and response
</li>
-<li>
-<p>
-<a href="../cowboy_router">cowboy_router(3)</a> - Router
-</p>
+<li><a href="../cowboy_router">cowboy_router(3)</a> - Router
</li>
-<li>
-<p>
-<a href="../cowboy_constraints">cowboy_constraints(3)</a> - Constraints
-</p>
+<li><a href="../cowboy_constraints">cowboy_constraints(3)</a> - Constraints
</li>
-</ul></div>
-<div class="paragraph"><p>Protocols:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../cowboy_http">cowboy_http(3)</a> - HTTP/1.1
-</p>
+</ul>
+<p>Protocols:</p>
+<ul><li><a href="../cowboy_http">cowboy_http(3)</a> - HTTP/1.1
</li>
-<li>
-<p>
-<a href="../cowboy_http2">cowboy_http2(3)</a> - HTTP/2
-</p>
+<li><a href="../cowboy_http2">cowboy_http2(3)</a> - HTTP/2
</li>
-<li>
-<p>
-<a href="../cowboy_websocket">cowboy_websocket(3)</a> - Websocket
-</p>
+<li><a href="../cowboy_websocket">cowboy_websocket(3)</a> - Websocket
</li>
-</ul></div>
-<div class="paragraph"><p>Handlers:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../cowboy_static">cowboy_static(3)</a> - Static file handler
-</p>
+</ul>
+<p>Handlers:</p>
+<ul><li><a href="../cowboy_static">cowboy_static(3)</a> - Static file handler
</li>
-</ul></div>
-<div class="paragraph"><p>Behaviors:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../cowboy_handler">cowboy_handler(3)</a> - Plain HTTP handlers
-</p>
+</ul>
+<p>Behaviors:</p>
+<ul><li><a href="../cowboy_handler">cowboy_handler(3)</a> - Plain HTTP handlers
</li>
-<li>
-<p>
-<a href="../cowboy_loop">cowboy_loop(3)</a> - Loop handlers
-</p>
+<li><a href="../cowboy_loop">cowboy_loop(3)</a> - Loop handlers
</li>
-<li>
-<p>
-<a href="../cowboy_middleware">cowboy_middleware(3)</a> - Middlewares
-</p>
+<li><a href="../cowboy_middleware">cowboy_middleware(3)</a> - Middlewares
</li>
-<li>
-<p>
-<a href="../cowboy_rest">cowboy_rest(3)</a> - REST handlers
-</p>
+<li><a href="../cowboy_rest">cowboy_rest(3)</a> - REST handlers
</li>
-<li>
-<p>
-<a href="../cowboy_stream">cowboy_stream(3)</a> - Stream handlers
-</p>
+<li><a href="../cowboy_stream">cowboy_stream(3)</a> - Stream handlers
</li>
-<li>
-<p>
-<a href="../cowboy_websocket">cowboy_websocket(3)</a> - Websocket handlers
-</p>
+<li><a href="../cowboy_websocket">cowboy_websocket(3)</a> - Websocket handlers
</li>
-</ul></div>
-<div class="paragraph"><p>Middlewares:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../cowboy_router">cowboy_router(3)</a> - Router middleware
-</p>
+</ul>
+<p>Middlewares:</p>
+<ul><li><a href="../cowboy_router">cowboy_router(3)</a> - Router middleware
</li>
-<li>
-<p>
-<a href="../cowboy_handler">cowboy_handler(3)</a> - Handler middleware
-</p>
+<li><a href="../cowboy_handler">cowboy_handler(3)</a> - Handler middleware
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
+<!-- @todo http_status_codes is not linked to; what to do with it?-->
<h2 id="_dependencies">Dependencies</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../ranch">ranch(7)</a> - Socket acceptor pool for TCP protocols
-</p>
+<ul><li><a href="../ranch">ranch(7)</a> - Socket acceptor pool for TCP protocols
</li>
-<li>
-<p>
-<a href="../cowlib">cowlib(7)</a> - Support library for manipulating Web protocols
-</p>
+<li><a href="../cowlib">cowlib(7)</a> - Support library for manipulating Web protocols
</li>
-<li>
-<p>
-ssl - Secure communication over sockets
-</p>
+<li>ssl - Secure communication over sockets
</li>
-<li>
-<p>
-crypto - Crypto functions
-</p>
+<li>crypto - Crypto functions
</li>
-</ul></div>
-<div class="paragraph"><p>All these applications must be started before the <code>cowboy</code>
-application. To start Cowboy and all dependencies at once:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+</ul>
+<p>All these applications must be started before the <code>cowboy</code> application. To start Cowboy and all dependencies at once:</p>
+<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">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">application:ensure_all_started</span></span>(<span style="color: #FF6600">cowboy</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">application:ensure_all_started</font></b>(<font color="#FF6600">cowboy</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_environment">Environment</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <code>cowboy</code> application does not define any application
-environment configuration parameters.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The <code>cowboy</code> application does not define any application environment configuration parameters.</p>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../ranch">ranch(7)</a>,
-<a href="../cowlib">cowlib(7)</a></p></div>
-</div>
-</div>
+<p><a href="../ranch">ranch(7)</a>, <a href="../cowlib">cowlib(7)</a></p>
+
diff --git a/docs/en/cowboy/2.1/manual/cowboy_constraints.int/index.html b/docs/en/cowboy/2.1/manual/cowboy_constraints.int/index.html
index 5d35efd4..a4dd8866 100644
--- a/docs/en/cowboy/2.1/manual/cowboy_constraints.int/index.html
+++ b/docs/en/cowboy/2.1/manual/cowboy_constraints.int/index.html
@@ -62,92 +62,52 @@
<h1 class="lined-header"><span>cowboy_constraints:int(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_constraints:int - Integer constraint</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_constraints:int - Integer constraint</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Constraint functions implement a number of different operations.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Constraint functions implement a number of different operations.</p>
+<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">int</span></span>(<span style="color: #FF6600">forward</span>, <span style="color: #009900">Bin</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Int</span>} | {<span style="color: #FF6600">error</span>, <span style="color: #FF6600">not_an_integer</span>}
+<pre><tt><b><font color="#000000">int</font></b>(<font color="#FF6600">forward</font>, <font color="#009900">Bin</font>) <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <font color="#009900">Int</font>} | {<font color="#FF6600">error</font>, <font color="#FF6600">not_an_integer</font>}
-<span style="color: #009900">Bin</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()
-<span style="color: #009900">Int</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">integer</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Validate and convert the text representation of an integer.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<font color="#009900">Bin</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()
+<font color="#009900">Int</font> <font color="#990000">::</font> <b><font color="#000080">integer</font></b>()</tt></pre>
+</div></div>
+<p>Validate and convert the text representation of an integer.</p>
+<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">int</span></span>(<span style="color: #FF6600">reverse</span>, <span style="color: #009900">Int</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Bin</span>} | {<span style="color: #FF6600">error</span>, <span style="color: #FF6600">not_an_integer</span>}</tt></pre></div></div>
-<div class="paragraph"><p>Convert an integer back to its text representation.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">int</font></b>(<font color="#FF6600">reverse</font>, <font color="#009900">Int</font>) <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <font color="#009900">Bin</font>} | {<font color="#FF6600">error</font>, <font color="#FF6600">not_an_integer</font>}</tt></pre>
+</div></div>
+<p>Convert an integer back to its text representation.</p>
+<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">int</span></span>(<span style="color: #FF6600">format_error</span>, <span style="color: #009900">Error</span>) <span style="color: #990000">-&gt;</span> <span style="color: #009900">HumanReadable</span>
+<pre><tt><b><font color="#000000">int</font></b>(<font color="#FF6600">format_error</font>, <font color="#009900">Error</font>) <font color="#990000">-&gt;</font> <font color="#009900">HumanReadable</font>
-<span style="color: #009900">Error</span> <span style="color: #990000">::</span> {<span style="color: #FF6600">not_an_integer</span>, <span style="color: #009900">Bin</span> | <span style="color: #009900">Int</span>}
-<span style="color: #009900">HumanReadable</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">iolist</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Generate a human-readable error message.</p></div>
-</div>
-</div>
-<div class="sect1">
+<font color="#009900">Error</font> <font color="#990000">::</font> {<font color="#FF6600">not_an_integer</font>, <font color="#009900">Bin</font> | <font color="#009900">Int</font>}
+<font color="#009900">HumanReadable</font> <font color="#990000">::</font> <b><font color="#000000">iolist</font></b>()</tt></pre>
+</div></div>
+<p>Generate a human-readable error message.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Arguments vary depending on the operation. Constraint
-functions always take the operation type as first argument,
-and the value as second argument.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Arguments vary depending on the operation. Constraint functions always take the operation type as first argument, and the value as second argument.</p>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The return value varies depending on the operation.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The return value varies depending on the operation.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Interface modified to allow for a variety of operations.
-</p>
+<ul><li><strong>2.0</strong>: Interface modified to allow for a variety of operations.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Constraint introduced.
-</p>
+<li><strong>1.0</strong>: Constraint introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This function is not meant to be called directly.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This function is not meant to be called directly.</p>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../cowboy_constraints">cowboy_constraints(3)</a>,
-<a href="../cowboy_constraints.nonempty">cowboy_constraints:nonempty(3)</a>,
-<a href="../cowboy_router">cowboy_router(3)</a>,
-<a href="../cowboy_req.match_cookies">cowboy_req:match_cookies(3)</a>,
-<a href="../cowboy_req.match_qs">cowboy_req:match_qs(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_constraints">cowboy_constraints(3)</a>, <a href="../cowboy_constraints.nonempty">cowboy_constraints:nonempty(3)</a>, <a href="../cowboy_router">cowboy_router(3)</a>, <a href="../cowboy_req.match_cookies">cowboy_req:match_cookies(3)</a>, <a href="../cowboy_req.match_qs">cowboy_req:match_qs(3)</a></p>
+
diff --git a/docs/en/cowboy/2.1/manual/cowboy_constraints.nonempty/index.html b/docs/en/cowboy/2.1/manual/cowboy_constraints.nonempty/index.html
index 6134e88f..fed24ccc 100644
--- a/docs/en/cowboy/2.1/manual/cowboy_constraints.nonempty/index.html
+++ b/docs/en/cowboy/2.1/manual/cowboy_constraints.nonempty/index.html
@@ -62,91 +62,51 @@
<h1 class="lined-header"><span>cowboy_constraints:nonempty(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_constraints:nonempty - Non-empty constraint</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_constraints:nonempty - Non-empty constraint</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Constraint functions implement a number of different operations.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Constraint functions implement a number of different operations.</p>
+<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">nonempty</span></span>(<span style="color: #FF6600">forward</span> | <span style="color: #FF6600">reverse</span>, <span style="color: #990000">&lt;&lt;&gt;&gt;</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #FF6600">error</span>, <span style="color: #FF6600">empty</span>}</tt></pre></div></div>
-<div class="paragraph"><p>Reject empty values.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">nonempty</font></b>(<font color="#FF6600">forward</font> | <font color="#FF6600">reverse</font>, <font color="#990000">&lt;&lt;&gt;&gt;</font>) <font color="#990000">-&gt;</font> {<font color="#FF6600">error</font>, <font color="#FF6600">empty</font>}</tt></pre>
+</div></div>
+<p>Reject empty values.</p>
+<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">nonempty</span></span>(<span style="color: #FF6600">forward</span> | <span style="color: #FF6600">reverse</span>, <span style="color: #009900">Bin</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Bin</span>}
+<pre><tt><b><font color="#000000">nonempty</font></b>(<font color="#FF6600">forward</font> | <font color="#FF6600">reverse</font>, <font color="#009900">Bin</font>) <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <font color="#009900">Bin</font>}
-<span style="color: #009900">Bin</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>Accept any other binary values.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<font color="#009900">Bin</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()</tt></pre>
+</div></div>
+<p>Accept any other binary values.</p>
+<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">nonempty</span></span>(<span style="color: #FF6600">format_error</span>, <span style="color: #009900">Error</span>) <span style="color: #990000">-&gt;</span> <span style="color: #009900">HumanReadable</span>
+<pre><tt><b><font color="#000000">nonempty</font></b>(<font color="#FF6600">format_error</font>, <font color="#009900">Error</font>) <font color="#990000">-&gt;</font> <font color="#009900">HumanReadable</font>
-<span style="color: #009900">Error</span> <span style="color: #990000">::</span> {<span style="color: #FF6600">empty</span>, <span style="color: #009900">Bin</span>}
-<span style="color: #009900">HumanReadable</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">iolist</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Generate a human-readable error message.</p></div>
-</div>
-</div>
-<div class="sect1">
+<font color="#009900">Error</font> <font color="#990000">::</font> {<font color="#FF6600">empty</font>, <font color="#009900">Bin</font>}
+<font color="#009900">HumanReadable</font> <font color="#990000">::</font> <b><font color="#000000">iolist</font></b>()</tt></pre>
+</div></div>
+<p>Generate a human-readable error message.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Arguments vary depending on the operation. Constraint
-functions always take the operation type as first argument,
-and the value as second argument.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Arguments vary depending on the operation. Constraint functions always take the operation type as first argument, and the value as second argument.</p>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The return value varies depending on the operation.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The return value varies depending on the operation.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Interface modified to allow for a variety of operations.
-</p>
+<ul><li><strong>2.0</strong>: Interface modified to allow for a variety of operations.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Constraint introduced.
-</p>
+<li><strong>1.0</strong>: Constraint introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This function is not meant to be called directly.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This function is not meant to be called directly.</p>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../cowboy_constraints">cowboy_constraints(3)</a>,
-<a href="../cowboy_constraints.int">cowboy_constraints:int(3)</a>,
-<a href="../cowboy_router">cowboy_router(3)</a>,
-<a href="../cowboy_req.match_cookies">cowboy_req:match_cookies(3)</a>,
-<a href="../cowboy_req.match_qs">cowboy_req:match_qs(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_constraints">cowboy_constraints(3)</a>, <a href="../cowboy_constraints.int">cowboy_constraints:int(3)</a>, <a href="../cowboy_router">cowboy_router(3)</a>, <a href="../cowboy_req.match_cookies">cowboy_req:match_cookies(3)</a>, <a href="../cowboy_req.match_qs">cowboy_req:match_qs(3)</a></p>
+
diff --git a/docs/en/cowboy/2.1/manual/cowboy_constraints/index.html b/docs/en/cowboy/2.1/manual/cowboy_constraints/index.html
index 9776040e..20892d27 100644
--- a/docs/en/cowboy/2.1/manual/cowboy_constraints/index.html
+++ b/docs/en/cowboy/2.1/manual/cowboy_constraints/index.html
@@ -62,84 +62,43 @@
<h1 class="lined-header"><span>cowboy_constraints(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_constraints - Constraints</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_constraints - Constraints</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The module <code>cowboy_constraints</code> defines the built-in
-constraints in Cowboy and provides an interface for
-manipulating these constraints.</p></div>
-<div class="paragraph"><p>Constraints are functions that define what type of
-input is allowed. They are used throughout Cowboy,
-from the router to query strings to cookies.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The module <code>cowboy_constraints</code> defines the built-in constraints in Cowboy and provides an interface for manipulating these constraints.</p>
+<p>Constraints are functions that define what type of input is allowed. They are used throughout Cowboy, from the router to query strings to cookies.</p>
<h2 id="_exports">Exports</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Built-in constraints:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../cowboy_constraints.int">cowboy_constraints:int(3)</a> - Integer constraint
-</p>
+<p>Built-in constraints:</p>
+<ul><li><a href="../cowboy_constraints.int">cowboy_constraints:int(3)</a> - Integer constraint
</li>
-<li>
-<p>
-<a href="../cowboy_constraints.nonempty">cowboy_constraints:nonempty(3)</a> - Non-empty constraint
-</p>
+<li><a href="../cowboy_constraints.nonempty">cowboy_constraints:nonempty(3)</a> - Non-empty constraint
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_types">Types</h2>
-<div class="sectionbody">
-<div class="sect2">
<h3 id="_constraint">constraint()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">constraint</span></span>() <span style="color: #990000">::</span> <span style="color: #FF6600">int</span> | <span style="color: #FF6600">nonempty</span> | <span style="font-weight: bold"><span style="color: #0000FF">fun</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>A constraint function.</p></div>
-<div class="paragraph"><p>The atom constraints are built-in, see the corresponding
-function in the exports list above.</p></div>
-</div>
-<div class="sect2">
+<pre><tt><b><font color="#000000">constraint</font></b>() <font color="#990000">::</font> <font color="#FF6600">int</font> | <font color="#FF6600">nonempty</font> | <b><font color="#0000FF">fun</font></b>()</tt></pre>
+</div></div>
+<p>A constraint function.</p>
+<p>The atom constraints are built-in, see the corresponding function in the exports list above.</p>
<h3 id="_reason">reason()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">reason</span></span>() <span style="color: #990000">::</span> {<span style="font-weight: bold"><span style="color: #000000">constraint</span></span>(), <span style="color: #009900">Reason</span>, <span style="color: #009900">Value</span>}
-
-<span style="color: #009900">Reason</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()
-<span style="color: #009900">Value</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>Reason for the constraint failure.</p></div>
-<div class="paragraph"><p>It includes the constraint function in question,
-a machine-readable error reason and the value that
-made the constraint fail.</p></div>
-</div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">reason</font></b>() <font color="#990000">::</font> {<b><font color="#000000">constraint</font></b>(), <font color="#009900">Reason</font>, <font color="#009900">Value</font>}
+
+<font color="#009900">Reason</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()
+<font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()</tt></pre>
+</div></div>
+<p>Reason for the constraint failure.</p>
+<p>It includes the constraint function in question, a machine-readable error reason and the value that made the constraint fail.</p>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="..">cowboy(7)</a>,
-<a href="../cowboy">cowboy(3)</a>,
-<a href="../cowboy_router">cowboy_router(3)</a>,
-<a href="../cowboy_req.match_cookies">cowboy_req:match_cookies(3)</a>,
-<a href="../cowboy_req.match_qs">cowboy_req:match_qs(3)</a></p></div>
-</div>
-</div>
+<p><a href="..">cowboy(7)</a>, <a href="../cowboy">cowboy(3)</a>, <a href="../cowboy_router">cowboy_router(3)</a>, <a href="../cowboy_req.match_cookies">cowboy_req:match_cookies(3)</a>, <a href="../cowboy_req.match_qs">cowboy_req:match_qs(3)</a></p>
+
diff --git a/docs/en/cowboy/2.1/manual/cowboy_handler.terminate/index.html b/docs/en/cowboy/2.1/manual/cowboy_handler.terminate/index.html
index 9a6092ff..97ff596b 100644
--- a/docs/en/cowboy/2.1/manual/cowboy_handler.terminate/index.html
+++ b/docs/en/cowboy/2.1/manual/cowboy_handler.terminate/index.html
@@ -62,109 +62,54 @@
<h1 class="lined-header"><span>cowboy_handler:terminate(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_handler:terminate - Terminate the handler</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_handler:terminate - Terminate the handler</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">terminate</span></span>(<span style="color: #009900">Reason</span>, <span style="color: #009900">PartialReq</span>, <span style="color: #009900">State</span>, <span style="color: #009900">Handler</span>) <span style="color: #990000">-&gt;</span> <span style="color: #FF6600">ok</span>
-
-<span style="color: #009900">Reason</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()
-<span style="color: #009900">PartialReq</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">map</span></span>()
-<span style="color: #009900">State</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()
-<span style="color: #009900">Handler</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">module</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Call the optional terminate callback if it is defined.</p></div>
-<div class="paragraph"><p>Make sure to use this function at the end of the execution
-of modules that implement custom handler behaviors.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">terminate</font></b>(<font color="#009900">Reason</font>, <font color="#009900">PartialReq</font>, <font color="#009900">State</font>, <font color="#009900">Handler</font>) <font color="#990000">-&gt;</font> <font color="#FF6600">ok</font>
+
+<font color="#009900">Reason</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()
+<font color="#009900">PartialReq</font> <font color="#990000">::</font> <b><font color="#000000">map</font></b>()
+<font color="#009900">State</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()
+<font color="#009900">Handler</font> <font color="#990000">::</font> <b><font color="#000000">module</font></b>()</tt></pre>
+</div></div>
+<p>Call the optional terminate callback if it is defined.</p>
+<p>Make sure to use this function at the end of the execution of modules that implement custom handler behaviors.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Reason
-</dt>
-<dd>
-<p>
-Reason for termination.
-</p>
+<dl><dt>Reason</dt>
+<dd><p>Reason for termination.</p>
</dd>
-<dt class="hdlist1">
-PartialReq
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
-<div class="paragraph"><p>It is possible to remove fields from the Req object to save memory
-when the handler has no concept of requests/responses. The only
-requirement is that a map is provided.</p></div>
+<dt>PartialReq</dt>
+<dd><p>The Req object.</p>
+<p>It is possible to remove fields from the Req object to save memory when the handler has no concept of requests/responses. The only requirement is that a map is provided.</p>
</dd>
-<dt class="hdlist1">
-State
-</dt>
-<dd>
-<p>
-Handler state.
-</p>
+<dt>State</dt>
+<dd><p>Handler state.</p>
</dd>
-<dt class="hdlist1">
-Handler
-</dt>
-<dd>
-<p>
-Handler module.
-</p>
+<dt>Handler</dt>
+<dd><p>Handler module.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The atom <code>ok</code> is always returned. It can be safely ignored.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The atom <code>ok</code> is always returned. It can be safely ignored.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced.
-</p>
+<ul><li><strong>2.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Terminate a handler normally</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Terminate a handler normally</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">cowboy_handler:terminate</span></span>(<span style="font-weight: bold"><span style="color: #000080">normal</span></span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>, <span style="color: #009900">Handler</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">cowboy_handler:terminate</font></b>(<b><font color="#000080">normal</font></b>, <font color="#009900">Req</font>, <font color="#009900">State</font>, <font color="#009900">Handler</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../cowboy_handler">cowboy_handler(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_handler">cowboy_handler(3)</a></p>
+
diff --git a/docs/en/cowboy/2.1/manual/cowboy_handler/index.html b/docs/en/cowboy/2.1/manual/cowboy_handler/index.html
index b1fa30ee..1d1f3185 100644
--- a/docs/en/cowboy/2.1/manual/cowboy_handler/index.html
+++ b/docs/en/cowboy/2.1/manual/cowboy_handler/index.html
@@ -62,96 +62,46 @@
<h1 class="lined-header"><span>cowboy_handler(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_handler - Plain HTTP handlers</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_handler - Plain HTTP handlers</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <code>cowboy_handler</code> middleware executes the handler selected
-by the router or any other preceding middleware.</p></div>
-<div class="paragraph"><p>This middleware takes the handler module and initial state
-from the <code>handler</code> and <code>handler_opts</code> environment values,
-respectively. On completion, it adds a <code>result</code> value to
-the middleware environment, containing the return value
-of the <code>terminate/3</code> callback (if defined) and <code>ok</code> otherwise.</p></div>
-<div class="paragraph"><p>This module also defines a callback interface for handling
-HTTP requests.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The <code>cowboy_handler</code> middleware executes the handler selected by the router or any other preceding middleware.</p>
+<p>This middleware takes the handler module and initial state from the <code>handler</code> and <code>handler_opts</code> environment values, respectively. On completion, it adds a <code>result</code> value to the middleware environment, containing the return value of the <code>terminate/3</code> callback (if defined) and <code>ok</code> otherwise.</p>
+<p>This module also defines a callback interface for handling HTTP requests.</p>
<h2 id="_callbacks">Callbacks</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Plain HTTP handlers implement the following interface:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Plain HTTP handlers implement the following interface:</p>
+<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">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">ok</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
-
-<span style="font-weight: bold"><span style="color: #000000">terminate</span></span>(<span style="color: #009900">Reason</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> <span style="color: #FF6600">ok</span> <span style="font-style: italic"><span style="color: #9A1900">%% optional</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">State</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()
-<span style="color: #009900">Reason</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">normal</span></span>
- | {<span style="color: #FF6600">crash</span>, <span style="color: #FF6600">error</span> | <span style="font-weight: bold"><span style="color: #000080">exit</span></span> | <span style="font-weight: bold"><span style="color: #000080">throw</span></span>, <span style="font-weight: bold"><span style="color: #000000">any</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>These two callbacks are common to all handlers.</p></div>
-<div class="paragraph"><p>Plain HTTP handlers do all their work in the <code>init/2</code>
-callback. Returning <code>ok</code> terminates the handler. If no
-response is sent, Cowboy will send a <code>204 No Content</code>.</p></div>
-<div class="paragraph"><p>The optional <code>terminate/3</code> callback will ultimately be called
-with the reason for the termination of the handler.
-Cowboy will terminate the process right after this. There
-is no need to perform any cleanup in this callback.</p></div>
-<div class="paragraph"><p>The following terminate reasons are defined for plain HTTP
-handlers:</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-normal
-</dt>
-<dd>
-<p>
- The connection was closed normally.
-</p>
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
+
+<b><font color="#000000">terminate</font></b>(<font color="#009900">Reason</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> <font color="#FF6600">ok</font> <i><font color="#9A1900">%% optional</font></i>
+
+<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()
+<font color="#009900">State</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()
+<font color="#009900">Reason</font> <font color="#990000">::</font> <b><font color="#000080">normal</font></b>
+ | {<font color="#FF6600">crash</font>, <font color="#FF6600">error</font> | <b><font color="#000080">exit</font></b> | <b><font color="#000080">throw</font></b>, <b><font color="#000000">any</font></b>()}</tt></pre>
+</div></div>
+<p>These two callbacks are common to all handlers.</p>
+<p>Plain HTTP handlers do all their work in the <code>init/2</code> callback. Returning <code>ok</code> terminates the handler. If no response is sent, Cowboy will send a <code>204 No Content</code>.</p>
+<p>The optional <code>terminate/3</code> callback will ultimately be called with the reason for the termination of the handler. Cowboy will terminate the process right after this. There is no need to perform any cleanup in this callback.</p>
+<p>The following terminate reasons are defined for plain HTTP handlers:</p>
+<dl><dt>normal</dt>
+<dd><p>The connection was closed normally.</p>
</dd>
-<dt class="hdlist1">
-{crash, Class, Reason}
-</dt>
-<dd>
-<p>
- A crash occurred in the handler. <code>Class</code> and <code>Reason</code> can be
- used to obtain more information about the crash. The function
- <code>erlang:get_stacktrace/0</code> can also be called to obtain the
- stacktrace of the process when the crash occurred.
-</p>
+<dt>{crash, Class, Reason}</dt>
+<dd><p>A crash occurred in the handler. <code>Class</code> and <code>Reason</code> can be used to obtain more information about the crash. The function <code>erlang:get_stacktrace/0</code> can also be called to obtain the stacktrace of the process when the crash occurred.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_exports">Exports</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The following function should be called by modules implementing
-custom handlers to execute the optional terminate callback:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../cowboy_handler.terminate">cowboy_handler:terminate(3)</a> - Terminate the handler
-</p>
+<p>The following function should be called by modules implementing custom handlers to execute the optional terminate callback:</p>
+<ul><li><a href="../cowboy_handler.terminate">cowboy_handler:terminate(3)</a> - Terminate the handler
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="..">cowboy(7)</a></p></div>
-</div>
-</div>
+<p><a href="..">cowboy(7)</a></p>
+
diff --git a/docs/en/cowboy/2.1/manual/cowboy_http/index.html b/docs/en/cowboy/2.1/manual/cowboy_http/index.html
index 3d6bf3d3..f05ff949 100644
--- a/docs/en/cowboy/2.1/manual/cowboy_http/index.html
+++ b/docs/en/cowboy/2.1/manual/cowboy_http/index.html
@@ -62,240 +62,110 @@
<h1 class="lined-header"><span>cowboy_http(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_http - HTTP/1.1</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_http - HTTP/1.1</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The module <code>cowboy_http</code> implements HTTP/1.1 and HTTP/1.0
-as a Ranch protocol.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The module <code>cowboy_http</code> implements HTTP/1.1 and HTTP/1.0 as a Ranch protocol.</p>
<h2 id="_options">Options</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<!-- @todo Might be worth moving cowboy_clear/tls/stream_h options-->
+<!-- to their respective manual, when they are added.-->
+<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">opts</span></span>() <span style="color: #990000">::</span> #{
- <span style="color: #0000FF">connection_type</span> <span style="color: #990000">=&gt;</span> <span style="color: #FF6600">worker</span> | <span style="color: #FF6600">supervisor</span>,
- <span style="color: #0000FF">env</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_middleware:env</span></span>(),
- <span style="color: #0000FF">idle_timeout</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">timeout</span></span>(),
- <span style="color: #0000FF">inactivity_timeout</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">timeout</span></span>(),
- <span style="color: #0000FF">max_empty_lines</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">max_header_name_length</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">max_header_value_length</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">max_headers</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">max_keepalive</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">max_method_length</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">max_request_line_length</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">middlewares</span> <span style="color: #990000">=&gt;</span> [<span style="font-weight: bold"><span style="color: #000000">module</span></span>()],
- <span style="color: #0000FF">request_timeout</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">timeout</span></span>(),
- <span style="color: #000080">shutdown</span><span style="color: #009900">_timeout</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">timeout</span></span>(),
- <span style="color: #0000FF">stream_handlers</span> <span style="color: #990000">=&gt;</span> [<span style="font-weight: bold"><span style="color: #000000">module</span></span>()]
-}</tt></pre></div></div>
-<div class="paragraph"><p>Configuration for the HTTP/1.1 protocol.</p></div>
-<div class="paragraph"><p>This configuration is passed to Cowboy when starting listeners
-using <code>cowboy:start_clear/3</code> or <code>cowboy:start_tls/3</code> functions.</p></div>
-<div class="paragraph"><p>It can be updated without restarting listeners using the
-Ranch functions <code>ranch:get_protocol_options/1</code> and
-<code>ranch:set_protocol_options/2</code>.</p></div>
-<div class="paragraph"><p>The default value is given next to the option name:</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-connection_type (supervisor)
-</dt>
-<dd>
-<p>
- Whether the connection process also acts as a supervisor.
-</p>
+<pre><tt><b><font color="#000000">opts</font></b>() <font color="#990000">::</font> #{
+ <font color="#0000FF">connection_type</font> <font color="#990000">=&gt;</font> <font color="#FF6600">worker</font> | <font color="#FF6600">supervisor</font>,
+ <font color="#0000FF">env</font> <font color="#990000">=&gt;</font> <b><font color="#000000">cowboy_middleware:env</font></b>(),
+ <font color="#0000FF">idle_timeout</font> <font color="#990000">=&gt;</font> <b><font color="#000000">timeout</font></b>(),
+ <font color="#0000FF">inactivity_timeout</font> <font color="#990000">=&gt;</font> <b><font color="#000000">timeout</font></b>(),
+ <font color="#0000FF">max_empty_lines</font> <font color="#990000">=&gt;</font> <b><font color="#000000">non_neg_integer</font></b>(),
+ <font color="#0000FF">max_header_name_length</font> <font color="#990000">=&gt;</font> <b><font color="#000000">non_neg_integer</font></b>(),
+ <font color="#0000FF">max_header_value_length</font> <font color="#990000">=&gt;</font> <b><font color="#000000">non_neg_integer</font></b>(),
+ <font color="#0000FF">max_headers</font> <font color="#990000">=&gt;</font> <b><font color="#000000">non_neg_integer</font></b>(),
+ <font color="#0000FF">max_keepalive</font> <font color="#990000">=&gt;</font> <b><font color="#000000">non_neg_integer</font></b>(),
+ <font color="#0000FF">max_method_length</font> <font color="#990000">=&gt;</font> <b><font color="#000000">non_neg_integer</font></b>(),
+ <font color="#0000FF">max_request_line_length</font> <font color="#990000">=&gt;</font> <b><font color="#000000">non_neg_integer</font></b>(),
+ <font color="#0000FF">middlewares</font> <font color="#990000">=&gt;</font> [<b><font color="#000000">module</font></b>()],
+ <font color="#0000FF">request_timeout</font> <font color="#990000">=&gt;</font> <b><font color="#000000">timeout</font></b>(),
+ <font color="#000080">shutdown</font><font color="#009900">_timeout</font> <font color="#990000">=&gt;</font> <b><font color="#000000">timeout</font></b>(),
+ <font color="#0000FF">stream_handlers</font> <font color="#990000">=&gt;</font> [<b><font color="#000000">module</font></b>()]
+}</tt></pre>
+</div></div>
+<p>Configuration for the HTTP/1.1 protocol.</p>
+<p>This configuration is passed to Cowboy when starting listeners using <code>cowboy:start_clear/3</code> or <code>cowboy:start_tls/3</code> functions.</p>
+<p>It can be updated without restarting listeners using the Ranch functions <code>ranch:get_protocol_options/1</code> and <code>ranch:set_protocol_options/2</code>.</p>
+<p>The default value is given next to the option name:</p>
+<dl><dt>connection_type (supervisor)</dt>
+<dd><p>Whether the connection process also acts as a supervisor.</p>
</dd>
-<dt class="hdlist1">
-env (#{})
-</dt>
-<dd>
-<p>
- Middleware environment.
-</p>
+<dt>env (#{})</dt>
+<dd><p>Middleware environment.</p>
</dd>
-<dt class="hdlist1">
-idle_timeout (60000)
-</dt>
-<dd>
-<p>
- Time in ms with no data received before Cowboy closes the connection.
-</p>
+<dt>idle_timeout (60000)</dt>
+<dd><p>Time in ms with no data received before Cowboy closes the connection.</p>
</dd>
-<dt class="hdlist1">
-inactivity_timeout (300000)
-</dt>
-<dd>
-<p>
- Time in ms with nothing received at all before Cowboy closes the connection.
-</p>
+<dt>inactivity_timeout (300000)</dt>
+<dd><p>Time in ms with nothing received at all before Cowboy closes the connection.</p>
</dd>
-<dt class="hdlist1">
-max_empty_lines (5)
-</dt>
-<dd>
-<p>
- Maximum number of empty lines before a request.
-</p>
+<dt>max_empty_lines (5)</dt>
+<dd><p>Maximum number of empty lines before a request.</p>
</dd>
-<dt class="hdlist1">
-max_header_name_length (64)
-</dt>
-<dd>
-<p>
- Maximum length of header names.
-</p>
+<dt>max_header_name_length (64)</dt>
+<dd><p>Maximum length of header names.</p>
</dd>
-<dt class="hdlist1">
-max_header_value_length (4096)
-</dt>
-<dd>
-<p>
- Maximum length of header values.
-</p>
+<dt>max_header_value_length (4096)</dt>
+<dd><p>Maximum length of header values.</p>
</dd>
-<dt class="hdlist1">
-max_headers (100)
-</dt>
-<dd>
-<p>
- Maximum number of headers allowed per request.
-</p>
+<dt>max_headers (100)</dt>
+<dd><p>Maximum number of headers allowed per request.</p>
</dd>
-<dt class="hdlist1">
-max_keepalive (100)
-</dt>
-<dd>
-<p>
- Maximum number of requests allowed per connection.
-</p>
+<dt>max_keepalive (100)</dt>
+<dd><p>Maximum number of requests allowed per connection.</p>
</dd>
-<dt class="hdlist1">
-max_method_length (32)
-</dt>
-<dd>
-<p>
- Maximum length of the method.
-</p>
+<dt>max_method_length (32)</dt>
+<dd><p>Maximum length of the method.</p>
</dd>
-<dt class="hdlist1">
-max_request_line_length (8000)
-</dt>
-<dd>
-<p>
- Maximum length of the request line.
-</p>
+<dt>max_request_line_length (8000)</dt>
+<dd><p>Maximum length of the request line.</p>
</dd>
-<dt class="hdlist1">
-middlewares ([cowboy_router, cowboy_handler])
-</dt>
-<dd>
-<p>
- Middlewares to run for every request.
-</p>
+<dt>middlewares ([cowboy_router, cowboy_handler])</dt>
+<dd><p>Middlewares to run for every request.</p>
</dd>
-<dt class="hdlist1">
-request_timeout (5000)
-</dt>
-<dd>
-<p>
- Time in ms with no requests before Cowboy closes the connection.
-</p>
+<dt>request_timeout (5000)</dt>
+<dd><p>Time in ms with no requests before Cowboy closes the connection.</p>
</dd>
-<dt class="hdlist1">
-shutdown_timeout (5000)
-</dt>
-<dd>
-<p>
- Time in ms Cowboy will wait for child processes to shut down before killing them.
-</p>
+<dt>shutdown_timeout (5000)</dt>
+<dd><p>Time in ms Cowboy will wait for child processes to shut down before killing them.</p>
</dd>
-<dt class="hdlist1">
-stream_handlers ([cowboy_stream_h])
-</dt>
-<dd>
-<p>
- Ordered list of stream handlers that will handle all stream events.
-</p>
+<dt>stream_handlers ([cowboy_stream_h])</dt>
+<dd><p>Ordered list of stream handlers that will handle all stream events.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: The <code>timeout</code> option was renamed <code>request_timeout</code>.
-</p>
+<ul><li><strong>2.0</strong>: The <code>timeout</code> option was renamed <code>request_timeout</code>.
</li>
-<li>
-<p>
-<strong>2.0</strong>: The <code>idle_timeout</code>, <code>inactivity_timeout</code> and <code>shutdown_timeout</code> options were added.
-</p>
+<li><strong>2.0</strong>: The <code>idle_timeout</code>, <code>inactivity_timeout</code> and <code>shutdown_timeout</code> options were added.
</li>
-<li>
-<p>
-<strong>2.0</strong>: The <code>max_method_length</code> option was added.
-</p>
+<li><strong>2.0</strong>: The <code>max_method_length</code> option was added.
</li>
-<li>
-<p>
-<strong>2.0</strong>: The <code>max_request_line_length</code> default was increased from 4096 to 8000.
-</p>
+<li><strong>2.0</strong>: The <code>max_request_line_length</code> default was increased from 4096 to 8000.
</li>
-<li>
-<p>
-<strong>2.0</strong>: The <code>connection_type</code> option was added.
-</p>
+<li><strong>2.0</strong>: The <code>connection_type</code> option was added.
</li>
-<li>
-<p>
-<strong>2.0</strong>: The <code>env</code> option is now a map instead of a proplist.
-</p>
+<li><strong>2.0</strong>: The <code>env</code> option is now a map instead of a proplist.
</li>
-<li>
-<p>
-<strong>2.0</strong>: The <code>stream_handlers</code> option was added.
-</p>
+<li><strong>2.0</strong>: The <code>stream_handlers</code> option was added.
</li>
-<li>
-<p>
-<strong>2.0</strong>: The <code>compress</code> option was removed in favor of the <code>cowboy_compress_h</code> stream handler.
-</p>
+<li><strong>2.0</strong>: The <code>compress</code> option was removed in favor of the <code>cowboy_compress_h</code> stream handler.
</li>
-<li>
-<p>
-<strong>2.0</strong>: Options are now a map instead of a proplist.
-</p>
+<li><strong>2.0</strong>: Options are now a map instead of a proplist.
</li>
-<li>
-<p>
-<strong>2.0</strong>: Protocol introduced. Replaces <code>cowboy_protocol</code>.
-</p>
+<li><strong>2.0</strong>: Protocol introduced. Replaces <code>cowboy_protocol</code>.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="..">cowboy(7)</a>,
-<a href="../cowboy_http2">cowboy_http2(3)</a>,
-<a href="../cowboy_websocket">cowboy_websocket(3)</a></p></div>
-</div>
-</div>
+<p><a href="..">cowboy(7)</a>, <a href="../cowboy_http2">cowboy_http2(3)</a>, <a href="../cowboy_websocket">cowboy_websocket(3)</a></p>
+
diff --git a/docs/en/cowboy/2.1/manual/cowboy_http2/index.html b/docs/en/cowboy/2.1/manual/cowboy_http2/index.html
index 29016fa0..2a48eec9 100644
--- a/docs/en/cowboy/2.1/manual/cowboy_http2/index.html
+++ b/docs/en/cowboy/2.1/manual/cowboy_http2/index.html
@@ -62,123 +62,60 @@
<h1 class="lined-header"><span>cowboy_http2(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_http2 - HTTP/2</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_http2 - HTTP/2</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The module <code>cowboy_http2</code> implements HTTP/2
-as a Ranch protocol.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The module <code>cowboy_http2</code> implements HTTP/2 as a Ranch protocol.</p>
<h2 id="_options">Options</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<!-- @todo Might be worth moving cowboy_clear/tls/stream_h options-->
+<!-- to their respective manual, when they are added.-->
+<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">opts</span></span>() <span style="color: #990000">::</span> #{
- <span style="color: #0000FF">connection_type</span> <span style="color: #990000">=&gt;</span> <span style="color: #FF6600">worker</span> | <span style="color: #FF6600">supervisor</span>,
- <span style="color: #0000FF">env</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_middleware:env</span></span>(),
- <span style="color: #0000FF">inactivity_timeout</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">timeout</span></span>(),
- <span style="color: #0000FF">middlewares</span> <span style="color: #990000">=&gt;</span> [<span style="font-weight: bold"><span style="color: #000000">module</span></span>()],
- <span style="color: #0000FF">preface_timeout</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">timeout</span></span>(),
- <span style="color: #000080">shutdown</span><span style="color: #009900">_timeout</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">timeout</span></span>(),
- <span style="color: #0000FF">stream_handlers</span> <span style="color: #990000">=&gt;</span> [<span style="font-weight: bold"><span style="color: #000000">module</span></span>()]
-}</tt></pre></div></div>
-<div class="paragraph"><p>Configuration for the HTTP/2 protocol.</p></div>
-<div class="paragraph"><p>This configuration is passed to Cowboy when starting listeners
-using <code>cowboy:start_clear/3</code> or <code>cowboy:start_tls/3</code> functions.</p></div>
-<div class="paragraph"><p>It can be updated without restarting listeners using the
-Ranch functions <code>ranch:get_protocol_options/1</code> and
-<code>ranch:set_protocol_options/2</code>.</p></div>
-<div class="paragraph"><p>The default value is given next to the option name:</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-connection_type (supervisor)
-</dt>
-<dd>
-<p>
- Whether the connection process also acts as a supervisor.
-</p>
+<pre><tt><b><font color="#000000">opts</font></b>() <font color="#990000">::</font> #{
+ <font color="#0000FF">connection_type</font> <font color="#990000">=&gt;</font> <font color="#FF6600">worker</font> | <font color="#FF6600">supervisor</font>,
+ <font color="#0000FF">env</font> <font color="#990000">=&gt;</font> <b><font color="#000000">cowboy_middleware:env</font></b>(),
+ <font color="#0000FF">inactivity_timeout</font> <font color="#990000">=&gt;</font> <b><font color="#000000">timeout</font></b>(),
+ <font color="#0000FF">middlewares</font> <font color="#990000">=&gt;</font> [<b><font color="#000000">module</font></b>()],
+ <font color="#0000FF">preface_timeout</font> <font color="#990000">=&gt;</font> <b><font color="#000000">timeout</font></b>(),
+ <font color="#000080">shutdown</font><font color="#009900">_timeout</font> <font color="#990000">=&gt;</font> <b><font color="#000000">timeout</font></b>(),
+ <font color="#0000FF">stream_handlers</font> <font color="#990000">=&gt;</font> [<b><font color="#000000">module</font></b>()]
+}</tt></pre>
+</div></div>
+<p>Configuration for the HTTP/2 protocol.</p>
+<p>This configuration is passed to Cowboy when starting listeners using <code>cowboy:start_clear/3</code> or <code>cowboy:start_tls/3</code> functions.</p>
+<p>It can be updated without restarting listeners using the Ranch functions <code>ranch:get_protocol_options/1</code> and <code>ranch:set_protocol_options/2</code>.</p>
+<p>The default value is given next to the option name:</p>
+<dl><dt>connection_type (supervisor)</dt>
+<dd><p>Whether the connection process also acts as a supervisor.</p>
</dd>
-<dt class="hdlist1">
-env (#{})
-</dt>
-<dd>
-<p>
- Middleware environment.
-</p>
+<dt>env (#{})</dt>
+<dd><p>Middleware environment.</p>
</dd>
-<dt class="hdlist1">
-inactivity_timeout (300000)
-</dt>
-<dd>
-<p>
- Time in ms with nothing received at all before Cowboy closes the connection.
-</p>
+<dt>inactivity_timeout (300000)</dt>
+<dd><p>Time in ms with nothing received at all before Cowboy closes the connection.</p>
</dd>
-<dt class="hdlist1">
-middlewares ([cowboy_router, cowboy_handler])
-</dt>
-<dd>
-<p>
- Middlewares to run for every request.
-</p>
+<dt>middlewares ([cowboy_router, cowboy_handler])</dt>
+<dd><p>Middlewares to run for every request.</p>
</dd>
-<dt class="hdlist1">
-preface_timeout (5000)
-</dt>
-<dd>
-<p>
- Time in ms Cowboy is willing to wait for the connection preface.
-</p>
+<dt>preface_timeout (5000)</dt>
+<dd><p>Time in ms Cowboy is willing to wait for the connection preface.</p>
</dd>
-<dt class="hdlist1">
-shutdown_timeout (5000)
-</dt>
-<dd>
-<p>
- Time in ms Cowboy will wait for child processes to shut down before killing them.
-</p>
+<dt>shutdown_timeout (5000)</dt>
+<dd><p>Time in ms Cowboy will wait for child processes to shut down before killing them.</p>
</dd>
-<dt class="hdlist1">
-stream_handlers ([cowboy_stream_h])
-</dt>
-<dd>
-<p>
- Ordered list of stream handlers that will handle all stream events.
-</p>
+<dt>stream_handlers ([cowboy_stream_h])</dt>
+<dd><p>Ordered list of stream handlers that will handle all stream events.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Protocol introduced.
-</p>
+<ul><li><strong>2.0</strong>: Protocol introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="..">cowboy(7)</a>,
-<a href="../cowboy_http">cowboy_http(3)</a>,
-<a href="../cowboy_websocket">cowboy_websocket(3)</a></p></div>
-</div>
-</div>
+<p><a href="..">cowboy(7)</a>, <a href="../cowboy_http">cowboy_http(3)</a>, <a href="../cowboy_websocket">cowboy_websocket(3)</a></p>
+
diff --git a/docs/en/cowboy/2.1/manual/cowboy_loop/index.html b/docs/en/cowboy/2.1/manual/cowboy_loop/index.html
index f287b2c4..7f0469c6 100644
--- a/docs/en/cowboy/2.1/manual/cowboy_loop/index.html
+++ b/docs/en/cowboy/2.1/manual/cowboy_loop/index.html
@@ -62,120 +62,60 @@
<h1 class="lined-header"><span>cowboy_loop(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_loop - Loop handlers</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_loop - Loop handlers</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The module <code>cowboy_loop</code> defines a callback interface for
-long running HTTP connections.</p></div>
-<div class="paragraph"><p>You should switch to this behavior for long polling,
-server-sent events and similar long-running requests.</p></div>
-<div class="paragraph"><p>There are generally two usage patterns:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-Loop until receiving a specific message, then send
- a response and stop execution (for example long polling);
-</p>
+<p>The module <code>cowboy_loop</code> defines a callback interface for long running HTTP connections.</p>
+<p>You should switch to this behavior for long polling, server-sent events and similar long-running requests.</p>
+<p>There are generally two usage patterns:</p>
+<ul><li>Loop until receiving a specific message, then send a response and stop execution (for example long polling);
</li>
-<li>
-<p>
-Or initiate a response in <code>init/2</code> and stream the
- body in <code>info/3</code> as necessary (for example server-sent events).
-</p>
+<li>Or initiate a response in <code>init/2</code> and stream the body in <code>info/3</code> as necessary (for example server-sent events).
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_callbacks">Callbacks</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Loop handlers implement the following interface:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Loop handlers implement the following interface:</p>
+<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">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_loop</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
- | {<span style="color: #FF6600">cowboy_loop</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>, <span style="color: #FF6600">hibernate</span>}
-
-<span style="font-weight: bold"><span style="color: #000000">info</span></span>(<span style="color: #009900">Info</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>)
- <span style="color: #990000">-&gt;</span> {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
- | {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>, <span style="color: #FF6600">hibernate</span>}
- | {<span style="color: #FF6600">stop</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
-
-<span style="font-weight: bold"><span style="color: #000000">terminate</span></span>(<span style="color: #009900">Reason</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> <span style="color: #FF6600">ok</span> <span style="font-style: italic"><span style="color: #9A1900">%% optional</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">State</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()
-<span style="color: #009900">Info</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()
-<span style="color: #009900">Reason</span> <span style="color: #990000">::</span> <span style="color: #FF6600">stop</span>
- | {<span style="color: #FF6600">crash</span>, <span style="color: #FF6600">error</span> | <span style="font-weight: bold"><span style="color: #000080">exit</span></span> | <span style="font-weight: bold"><span style="color: #000080">throw</span></span>, <span style="font-weight: bold"><span style="color: #000000">any</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>The <code>init/2</code> callback is common to all handlers. To switch
-to the loop behavior, it must return <code>cowboy_loop</code> as the
-first element of the tuple.</p></div>
-<div class="paragraph"><p>The <code>info/3</code> callback will be called for every Erlang message
-received. It may choose to continue the receive loop or stop
-it.</p></div>
-<div class="paragraph"><p>The optional <code>terminate/3</code> callback will ultimately be called
-with the reason for the termination of the handler.
-Cowboy will terminate the process right after this. There
-is no need to perform any cleanup in this callback.</p></div>
-<div class="paragraph"><p>The following terminate reasons are defined for loop handlers:</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-stop
-</dt>
-<dd>
-<p>
- The handler requested to close the connection by returning
- a <code>stop</code> tuple.
-</p>
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>)
+ <font color="#990000">-&gt;</font> {<font color="#FF6600">cowboy_loop</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
+ | {<font color="#FF6600">cowboy_loop</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>, <font color="#FF6600">hibernate</font>}
+
+<b><font color="#000000">info</font></b>(<font color="#009900">Info</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>)
+ <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
+ | {<font color="#FF6600">ok</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>, <font color="#FF6600">hibernate</font>}
+ | {<font color="#FF6600">stop</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
+
+<b><font color="#000000">terminate</font></b>(<font color="#009900">Reason</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> <font color="#FF6600">ok</font> <i><font color="#9A1900">%% optional</font></i>
+
+<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()
+<font color="#009900">State</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()
+<font color="#009900">Info</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()
+<font color="#009900">Reason</font> <font color="#990000">::</font> <font color="#FF6600">stop</font>
+ | {<font color="#FF6600">crash</font>, <font color="#FF6600">error</font> | <b><font color="#000080">exit</font></b> | <b><font color="#000080">throw</font></b>, <b><font color="#000000">any</font></b>()}</tt></pre>
+</div></div>
+<p>The <code>init/2</code> callback is common to all handlers. To switch to the loop behavior, it must return <code>cowboy_loop</code> as the first element of the tuple.</p>
+<p>The <code>info/3</code> callback will be called for every Erlang message received. It may choose to continue the receive loop or stop it.</p>
+<p>The optional <code>terminate/3</code> callback will ultimately be called with the reason for the termination of the handler. Cowboy will terminate the process right after this. There is no need to perform any cleanup in this callback.</p>
+<p>The following terminate reasons are defined for loop handlers:</p>
+<dl><dt>stop</dt>
+<dd><p>The handler requested to close the connection by returning a <code>stop</code> tuple.</p>
</dd>
-<dt class="hdlist1">
-{crash, Class, Reason}
-</dt>
-<dd>
-<p>
- A crash occurred in the handler. <code>Class</code> and <code>Reason</code> can be
- used to obtain more information about the crash. The function
- <code>erlang:get_stacktrace/0</code> can also be called to obtain the
- stacktrace of the process when the crash occurred.
-</p>
+<dt>{crash, Class, Reason}</dt>
+<dd><p>A crash occurred in the handler. <code>Class</code> and <code>Reason</code> can be used to obtain more information about the crash. The function <code>erlang:get_stacktrace/0</code> can also be called to obtain the stacktrace of the process when the crash occurred.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Loop handlers no longer need to handle overflow/timeouts.
-</p>
+<ul><li><strong>2.0</strong>: Loop handlers no longer need to handle overflow/timeouts.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Behavior introduced.
-</p>
+<li><strong>1.0</strong>: Behavior introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="..">cowboy(7)</a>,
-<a href="../cowboy_handler">cowboy_handler(3)</a></p></div>
-</div>
-</div>
+<p><a href="..">cowboy(7)</a>, <a href="../cowboy_handler">cowboy_handler(3)</a></p>
+
diff --git a/docs/en/cowboy/2.1/manual/cowboy_middleware/index.html b/docs/en/cowboy/2.1/manual/cowboy_middleware/index.html
index bc744f5c..4bbd9847 100644
--- a/docs/en/cowboy/2.1/manual/cowboy_middleware/index.html
+++ b/docs/en/cowboy/2.1/manual/cowboy_middleware/index.html
@@ -62,115 +62,56 @@
<h1 class="lined-header"><span>cowboy_middleware(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_middleware - Middlewares</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_middleware - Middlewares</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The module <code>cowboy_middleware</code> defines a callback interface for
-Cowboy middlewares.</p></div>
-<div class="paragraph"><p>Middlewares process the request sequentially in the order they
-are configured.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The module <code>cowboy_middleware</code> defines a callback interface for Cowboy middlewares.</p>
+<p>Middlewares process the request sequentially in the order they are configured.</p>
<h2 id="_callbacks">Callbacks</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Middlewares implement the following interface:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Middlewares implement the following interface:</p>
+<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">execute</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">Env</span>)
- <span style="color: #990000">-&gt;</span> {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">Env</span>}
- | {<span style="color: #FF6600">suspend</span>, <span style="font-weight: bold"><span style="color: #000000">module</span></span>(), <span style="font-weight: bold"><span style="color: #000080">atom</span></span>(), [<span style="font-weight: bold"><span style="color: #000000">any</span></span>()]}
- | {<span style="color: #FF6600">stop</span>, <span style="color: #009900">Req</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">Env</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_middleware:env</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>The <code>execute/2</code> is the only callback that needs to be
-implemented. It must execute the middleware and return
-with instructions for Cowboy.</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-ok
-</dt>
-<dd>
-<p>
-Cowboy should continue processing the request using the
-returned Req object and environment.
-</p>
+<pre><tt><b><font color="#000000">execute</font></b>(<font color="#009900">Req</font>, <font color="#009900">Env</font>)
+ <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <font color="#009900">Req</font>, <font color="#009900">Env</font>}
+ | {<font color="#FF6600">suspend</font>, <b><font color="#000000">module</font></b>(), <b><font color="#000080">atom</font></b>(), [<b><font color="#000000">any</font></b>()]}
+ | {<font color="#FF6600">stop</font>, <font color="#009900">Req</font>}
+
+<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()
+<font color="#009900">Env</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_middleware:env</font></b>()</tt></pre>
+</div></div>
+<p>The <code>execute/2</code> is the only callback that needs to be implemented. It must execute the middleware and return with instructions for Cowboy.</p>
+<dl><dt>ok</dt>
+<dd><p>Cowboy should continue processing the request using the returned Req object and environment.</p>
</dd>
-<dt class="hdlist1">
-suspend
-</dt>
-<dd>
-<p>
-Cowboy will hibernate the process. When resuming, Cowboy
-will apply the returned module, function and arguments.
-</p>
+<dt>suspend</dt>
+<dd><p>Cowboy will hibernate the process. When resuming, Cowboy will apply the returned module, function and arguments.</p>
</dd>
-<dt class="hdlist1">
-stop
-</dt>
-<dd>
-<p>
-Cowboy will stop middleware execution. No other middleware
-will be executed. This effectively ends the processing of
-the request.
-</p>
+<dt>stop</dt>
+<dd><p>Cowboy will stop middleware execution. No other middleware will be executed. This effectively ends the processing of the request.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_types">Types</h2>
-<div class="sectionbody">
-<div class="sect2">
<h3 id="_env">env()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">env</span></span>() <span style="color: #990000">::</span> #{<span style="font-weight: bold"><span style="color: #000080">atom</span></span>() <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>Middleware environment.</p></div>
-<div class="paragraph"><p>A new environment is created for every request. The initial
-environment contained the user configured environment values
-(like <code>dispatch</code> for example) plus the <code>listener</code> value which
-contains the name of the listener for this connection.</p></div>
-<div class="paragraph"><p>Middlewares may modify the environment as necessary.</p></div>
-</div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">env</font></b>() <font color="#990000">::</font> #{<b><font color="#000080">atom</font></b>() <font color="#990000">=&gt;</font> <b><font color="#000000">any</font></b>()}</tt></pre>
+</div></div>
+<p>Middleware environment.</p>
+<p>A new environment is created for every request. The initial environment contained the user configured environment values (like <code>dispatch</code> for example) plus the <code>listener</code> value which contains the name of the listener for this connection.</p>
+<p>Middlewares may modify the environment as necessary.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: The <code>env</code> type is now a map instead of a proplist.
-</p>
+<ul><li><strong>2.0</strong>: The <code>env</code> type is now a map instead of a proplist.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Behavior introduced.
-</p>
+<li><strong>1.0</strong>: Behavior introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="..">cowboy(7)</a></p></div>
-</div>
-</div>
+<p><a href="..">cowboy(7)</a></p>
+
diff --git a/docs/en/cowboy/2.1/manual/cowboy_req.binding/index.html b/docs/en/cowboy/2.1/manual/cowboy_req.binding/index.html
index 81d081ff..4c1ad4d1 100644
--- a/docs/en/cowboy/2.1/manual/cowboy_req.binding/index.html
+++ b/docs/en/cowboy/2.1/manual/cowboy_req.binding/index.html
@@ -62,116 +62,60 @@
<h1 class="lined-header"><span>cowboy_req:binding(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:binding - Access a value bound from the route</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:binding - Access a value bound from the route</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">binding</span></span>(<span style="color: #009900">Name</span>, <span style="color: #009900">Req</span>) <span style="color: #990000">-&gt;</span> <span style="font-weight: bold"><span style="color: #000000">binding</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">binding</span></span>(<span style="color: #009900">Name</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: #000000">any</span></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">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">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>Return the value for the given binding.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">binding</font></b>(<font color="#009900">Name</font>, <font color="#009900">Req</font>) <font color="#990000">-&gt;</font> <b><font color="#000000">binding</font></b>(<font color="#009900">Name</font>, <font color="#009900">Req</font>, <font color="#000080">undefined</font>)
+<b><font color="#000000">binding</font></b>(<font color="#009900">Name</font>, <font color="#009900">Req</font>, <font color="#009900">Default</font>) <font color="#990000">-&gt;</font> <b><font color="#000000">any</font></b>() | <font color="#009900">Default</font>
+
+<font color="#009900">Name</font> <font color="#990000">::</font> <b><font color="#000080">atom</font></b>()
+<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()</tt></pre>
+</div></div>
+<p>Return the value for the given binding.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Name
-</dt>
-<dd>
-<p>
-Desired binding name as an atom.
-</p>
+<dl><dt>Name</dt>
+<dd><p>Desired binding name as an atom.</p>
</dd>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-<dt class="hdlist1">
-Default
-</dt>
-<dd>
-<p>
-Default value returned when the binding is missing.
-</p>
+<dt>Default</dt>
+<dd><p>Default value returned when the binding is missing.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>By default the value is a case sensitive binary string, however
-constraints may change the type of this value (for example
-automatically converting numbers to integer).</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>By default the value is a case sensitive binary string, however constraints may change the type of this value (for example automatically converting numbers to integer).</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Only the value is returned, it is no longer wrapped in a tuple.
-</p>
+<ul><li><strong>2.0</strong>: Only the value is returned, it is no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Get the username from the path</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Get the username from the 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="font-style: italic"><span style="color: #9A1900">%% Route is "/users/:user"</span></span>
-<span style="color: #009900">Username</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:binding</span></span>(<span style="color: #FF6600">user</span>, <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Get the branch name, with a default</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><i><font color="#9A1900">%% Route is "/users/:user"</font></i>
+<font color="#009900">Username</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:binding</font></b>(<font color="#FF6600">user</font>, <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Get the branch name, with a default</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">%% Route is "/log[/:branch]"</span></span>
-<span style="color: #009900">Branch</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:binding</span></span>(<span style="color: #FF6600">branch</span>, <span style="color: #009900">Req</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"master"</span><span style="color: #990000">&gt;&gt;</span>)</tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><i><font color="#9A1900">%% Route is "/log[/:branch]"</font></i>
+<font color="#009900">Branch</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:binding</font></b>(<font color="#FF6600">branch</font>, <font color="#009900">Req</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"master"</font><font color="#990000">&gt;&gt;</font>)</tt></pre>
+</div></div>
<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.bindings">cowboy_req:bindings(3)</a>,
-<a href="../cowboy_req.host_info">cowboy_req:host_info(3)</a>,
-<a href="../cowboy_req.path_info">cowboy_req:path_info(3)</a>,
-<a href="../cowboy_router">cowboy_router(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.bindings">cowboy_req:bindings(3)</a>, <a href="../cowboy_req.host_info">cowboy_req:host_info(3)</a>, <a href="../cowboy_req.path_info">cowboy_req:path_info(3)</a>, <a href="../cowboy_router">cowboy_router(3)</a></p>
+
diff --git a/docs/en/cowboy/2.1/manual/cowboy_req.bindings/index.html b/docs/en/cowboy/2.1/manual/cowboy_req.bindings/index.html
index 41e74c3d..ae727c9b 100644
--- a/docs/en/cowboy/2.1/manual/cowboy_req.bindings/index.html
+++ b/docs/en/cowboy/2.1/manual/cowboy_req.bindings/index.html
@@ -62,86 +62,40 @@
<h1 class="lined-header"><span>cowboy_req:bindings(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:bindings - Access all values bound from the route</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:bindings - Access all values bound from the route</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">bindings</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_router:bindings</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Return a map containing all bindings.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">bindings</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <b><font color="#000000">cowboy_router:bindings</font></b>()</tt></pre>
+</div></div>
+<p>Return a map containing all bindings.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>By default values are case sensitive binary strings, however
-constraints may change the type of this value (for example
-automatically converting numbers to integer).</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>By default values are case sensitive binary strings, however constraints may change the type of this value (for example automatically converting numbers to integer).</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Only the values are returned, they are no longer wrapped in a tuple.
-</p>
+<ul><li><strong>2.0</strong>: Only the values are returned, they are no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Get all bindings</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Get all bindings</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">Bindings</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:bindings</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Bindings</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:bindings</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.host_info">cowboy_req:host_info(3)</a>,
-<a href="../cowboy_req.path_info">cowboy_req:path_info(3)</a>,
-<a href="../cowboy_router">cowboy_router(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.binding">cowboy_req:binding(3)</a>, <a href="../cowboy_req.host_info">cowboy_req:host_info(3)</a>, <a href="../cowboy_req.path_info">cowboy_req:path_info(3)</a>, <a href="../cowboy_router">cowboy_router(3)</a></p>
+
diff --git a/docs/en/cowboy/2.1/manual/cowboy_req.body_length/index.html b/docs/en/cowboy/2.1/manual/cowboy_req.body_length/index.html
index 9a55ee32..51e1a831 100644
--- a/docs/en/cowboy/2.1/manual/cowboy_req.body_length/index.html
+++ b/docs/en/cowboy/2.1/manual/cowboy_req.body_length/index.html
@@ -62,89 +62,41 @@
<h1 class="lined-header"><span>cowboy_req:body_length(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:body_length - Body length</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:body_length - Body length</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">body_length</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: #000080">undefined</span> | <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Return the length of the request body.</p></div>
-<div class="paragraph"><p>The length is not always known before reading the body.
-In those cases Cowboy will return <code>undefined</code>. The body
-length is available after the body has been fully read.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">body_length</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <font color="#000080">undefined</font> | <b><font color="#000000">non_neg_integer</font></b>()</tt></pre>
+</div></div>
+<p>Return the length of the request body.</p>
+<p>The length is not always known before reading the body. In those cases Cowboy will return <code>undefined</code>. The body length is available after the body has been fully read.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The length of the request body, or <code>undefined</code> if it is
-not known.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The length of the request body, or <code>undefined</code> if it is not known.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Only the length is returned, it is no longer wrapped in a tuple.
-</p>
+<ul><li><strong>2.0</strong>: Only the length is returned, it is no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Get the body length</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Get the body length</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:body_length</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Length</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:body_length</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.has_body">cowboy_req:has_body(3)</a>,
-<a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a>,
-<a href="../cowboy_req.read_urlencoded_body">cowboy_req:read_urlencoded_body(3)</a>,
-<a href="../cowboy_req.read_part">cowboy_req:read_part(3)</a>,
-<a href="../cowboy_req.read_part_body">cowboy_req:read_part_body(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.has_body">cowboy_req:has_body(3)</a>, <a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a>, <a href="../cowboy_req.read_urlencoded_body">cowboy_req:read_urlencoded_body(3)</a>, <a href="../cowboy_req.read_part">cowboy_req:read_part(3)</a>, <a href="../cowboy_req.read_part_body">cowboy_req:read_part_body(3)</a></p>
+
diff --git a/docs/en/cowboy/2.1/manual/cowboy_req.cert/index.html b/docs/en/cowboy/2.1/manual/cowboy_req.cert/index.html
index a297fbbe..6514040f 100644
--- a/docs/en/cowboy/2.1/manual/cowboy_req.cert/index.html
+++ b/docs/en/cowboy/2.1/manual/cowboy_req.cert/index.html
@@ -62,104 +62,60 @@
<h1 class="lined-header"><span>cowboy_req:cert(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:cert - Client TLS certificate</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:cert - Client TLS certificate</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">cert</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: #000080">binary</span></span>() | <span style="color: #000080">undefined</span></tt></pre></div></div>
-<div class="paragraph"><p>Return the peer&#8217;s TLS certificate.</p></div>
-<div class="paragraph"><p>Using the default configuration this function will always return
-<code>undefined</code>. You need to explicitly configure Cowboy to request
-the client certificate. To do this you need to set the <code>verify</code>
-transport option to <code>verify_peer</code>:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">cert</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <b><font color="#000080">binary</font></b>() | <font color="#000080">undefined</font></tt></pre>
+</div></div>
+<p>Return the peer&apos;s TLS certificate.</p>
+<p>Using the default configuration this function will always return <code>undefined</code>. You need to explicitly configure Cowboy to request the client certificate. To do this you need to set the <code>verify</code> transport option to <code>verify_peer</code>:</p>
+<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">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:start_tls</span></span>(<span style="color: #FF6600">example</span>, [
- {<span style="color: #FF6600">port</span>, <span style="color: #993399">8443</span>},
- {<span style="color: #FF6600">cert</span>, <span style="color: #FF0000">"path/to/cert.pem"</span>},
- {<span style="color: #FF6600">verify</span>, <span style="color: #FF6600">verify_peer</span>}
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy:start_tls</font></b>(<font color="#FF6600">example</font>, [
+ {<font color="#FF6600">port</font>, <font color="#993399">8443</font>},
+ {<font color="#FF6600">cert</font>, <font color="#FF0000">"path/to/cert.pem"</font>},
+ {<font color="#FF6600">verify</font>, <font color="#FF6600">verify_peer</font>}
], #{
- <span style="color: #0000FF">env</span> <span style="color: #990000">=&gt;</span> #{<span style="color: #0000FF">dispatch</span> <span style="color: #990000">=&gt;</span> <span style="color: #009900">Dispatch</span>}
-})<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>You may also want to customize the <code>verify_fun</code> function. Please
-consult the <code>ssl</code> application&#8217;s manual for more details.</p></div>
-<div class="paragraph"><p>TCP connections do not allow a certificate and this function
-will therefore always return <code>undefined</code>.</p></div>
-<div class="paragraph"><p>The certificate can also be obtained using pattern matching:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+ <font color="#0000FF">env</font> <font color="#990000">=&gt;</font> #{<font color="#0000FF">dispatch</font> <font color="#990000">=&gt;</font> <font color="#009900">Dispatch</font>}
+})<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>You may also want to customize the <code>verify_fun</code> function. Please consult the <code>ssl</code> application&apos;s manual for more details.</p>
+<p>TCP connections do not allow a certificate and this function will therefore always return <code>undefined</code>.</p>
+<p>The certificate can also be obtained using pattern matching:</p>
+<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">cert</span> <span style="color: #990000">:=</span> <span style="color: #009900">Cert</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">
+<pre><tt>#{<font color="#FF6600">cert</font> <font color="#990000">:=</font> <font color="#009900">Cert</font>} <font color="#990000">=</font> <font color="#009900">Req</font><font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The client TLS certificate.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The client TLS certificate.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.1</strong>: Function introduced.
-</p>
+<ul><li><strong>2.1</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Get the client TLS certificate.</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Get the client TLS certificate.</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">Cert</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:cert</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Cert</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:cert</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.peer">cowboy_req:peer(3)</a>,
-<a href="../cowboy_req.sock">cowboy_req:sock(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.peer">cowboy_req:peer(3)</a>, <a href="../cowboy_req.sock">cowboy_req:sock(3)</a></p>
+
diff --git a/docs/en/cowboy/2.1/manual/cowboy_req.delete_resp_header/index.html b/docs/en/cowboy/2.1/manual/cowboy_req.delete_resp_header/index.html
index 0efb2d46..96223e98 100644
--- a/docs/en/cowboy/2.1/manual/cowboy_req.delete_resp_header/index.html
+++ b/docs/en/cowboy/2.1/manual/cowboy_req.delete_resp_header/index.html
@@ -62,95 +62,45 @@
<h1 class="lined-header"><span>cowboy_req:delete_resp_header(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:delete_resp_header - Delete a response header</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:delete_resp_header - Delete a response header</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">delete_resp_header</span></span>(<span style="color: #009900">Name</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">Req</span>
+<pre><tt><b><font color="#000000">delete_resp_header</font></b>(<font color="#009900">Name</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <font color="#009900">Req</font>
-<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="font-style: italic"><span style="color: #9A1900">%% lowercase; case insensitive</span></span></tt></pre></div></div>
-<div class="paragraph"><p>Delete the given response 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>
-</div>
-<div class="sect1">
+<font color="#009900">Name</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% lowercase; case insensitive</font></i></tt></pre>
+</div></div>
+<p>Delete the given response header.</p>
+<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>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Name
-</dt>
-<dd>
-<p>
-Header name as a lowercase binary string.
-</p>
+<dl><dt>Name</dt>
+<dd><p>Header name as a lowercase binary string.</p>
</dd>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A new Req object is returned.</p></div>
-<div class="paragraph"><p>The returned Req object must be used from that point onward,
-otherwise the header will still be sent in the response.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>A new Req object is returned.</p>
+<p>The returned Req object must be used from that point onward, otherwise the header will still be sent in the response.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<ul><li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Remove the content-type header from the response</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Remove the content-type header from the response</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: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:delete_resp_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req0</span>),</tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:delete_resp_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req0</font>),</tt></pre>
+</div></div>
<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.set_resp_header">cowboy_req:set_resp_header(3)</a>,
-<a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a>,
-<a href="../cowboy_req.has_resp_header">cowboy_req:has_resp_header(3)</a>,
-<a href="../cowboy_req.resp_header">cowboy_req:resp_header(3)</a>,
-<a href="../cowboy_req.resp_headers">cowboy_req:resp_headers(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a>, <a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a>, <a href="../cowboy_req.has_resp_header">cowboy_req:has_resp_header(3)</a>, <a href="../cowboy_req.resp_header">cowboy_req:resp_header(3)</a>, <a href="../cowboy_req.resp_headers">cowboy_req:resp_headers(3)</a></p>
+
diff --git a/docs/en/cowboy/2.1/manual/cowboy_req.has_body/index.html b/docs/en/cowboy/2.1/manual/cowboy_req.has_body/index.html
index 3524e2c0..7739e636 100644
--- a/docs/en/cowboy/2.1/manual/cowboy_req.has_body/index.html
+++ b/docs/en/cowboy/2.1/manual/cowboy_req.has_body/index.html
@@ -62,80 +62,38 @@
<h1 class="lined-header"><span>cowboy_req:has_body(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:has_body - Is there a request body?</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:has_body - Is there a request body?</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">has_body</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">boolean</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Return whether the request has a body.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">has_body</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <b><font color="#000000">boolean</font></b>()</tt></pre>
+</div></div>
+<p>Return whether the request has a body.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A boolean indicating whether the request has a body.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>A boolean indicating whether the request has a body.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<ul><li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Ensure the request has a body</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Ensure the request has a body</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: #000080">true</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:has_body</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#000080">true</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:has_body</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.body_length">cowboy_req:body_length(3)</a>,
-<a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a>,
-<a href="../cowboy_req.read_urlencoded_body">cowboy_req:read_urlencoded_body(3)</a>,
-<a href="../cowboy_req.read_part">cowboy_req:read_part(3)</a>,
-<a href="../cowboy_req.read_part_body">cowboy_req:read_part_body(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.body_length">cowboy_req:body_length(3)</a>, <a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a>, <a href="../cowboy_req.read_urlencoded_body">cowboy_req:read_urlencoded_body(3)</a>, <a href="../cowboy_req.read_part">cowboy_req:read_part(3)</a>, <a href="../cowboy_req.read_part_body">cowboy_req:read_part_body(3)</a></p>
+
diff --git a/docs/en/cowboy/2.1/manual/cowboy_req.has_resp_body/index.html b/docs/en/cowboy/2.1/manual/cowboy_req.has_resp_body/index.html
index a2bd881f..6bfc1ff3 100644
--- a/docs/en/cowboy/2.1/manual/cowboy_req.has_resp_body/index.html
+++ b/docs/en/cowboy/2.1/manual/cowboy_req.has_resp_body/index.html
@@ -62,82 +62,43 @@
<h1 class="lined-header"><span>cowboy_req:has_resp_body(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:has_resp_body - Is there a response body?</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:has_resp_body - Is there a response body?</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">has_resp_body</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">boolean</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Return whether a response body has been set.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">has_resp_body</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <b><font color="#000000">boolean</font></b>()</tt></pre>
+</div></div>
+<p>Return whether a response body has been set.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A boolean indicating whether a response body has been set.</p></div>
-<div class="paragraph"><p>This function will return <code>false</code> when an empty response
-body has been set.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>A boolean indicating whether a response body has been set.</p>
+<p>This function will return <code>false</code> when an empty response body has been set.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<ul><li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Check whether a body has been set</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Check whether a body has been set</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: #000080">false</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:has_resp_body</span></span>(<span style="color: #009900">Req0</span>),
-<span style="color: #009900">Req1</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_body</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Hello!"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req0</span>),
-<span style="color: #000080">true</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:has_resp_body</span></span>(<span style="color: #009900">Req1</span>),
-<span style="color: #009900">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_body</span></span>(<span style="color: #990000">&lt;&lt;&gt;&gt;</span>, <span style="color: #009900">Req1</span>),
-<span style="color: #000080">false</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:has_resp_body</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#000080">false</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:has_resp_body</font></b>(<font color="#009900">Req0</font>),
+<font color="#009900">Req1</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_body</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"Hello!"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req0</font>),
+<font color="#000080">true</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:has_resp_body</font></b>(<font color="#009900">Req1</font>),
+<font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_body</font></b>(<font color="#990000">&lt;&lt;&gt;&gt;</font>, <font color="#009900">Req1</font>),
+<font color="#000080">false</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:has_resp_body</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.set_resp_body">cowboy_req:set_resp_body(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.set_resp_body">cowboy_req:set_resp_body(3)</a></p>
+
diff --git a/docs/en/cowboy/2.1/manual/cowboy_req.has_resp_header/index.html b/docs/en/cowboy/2.1/manual/cowboy_req.has_resp_header/index.html
index 0f56b764..edb18ee4 100644
--- a/docs/en/cowboy/2.1/manual/cowboy_req.has_resp_header/index.html
+++ b/docs/en/cowboy/2.1/manual/cowboy_req.has_resp_header/index.html
@@ -62,95 +62,46 @@
<h1 class="lined-header"><span>cowboy_req:has_resp_header(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:has_resp_header - Is the given response header set?</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:has_resp_header - Is the given response header set?</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">has_resp_header</span></span>(<span style="color: #009900">Name</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">boolean</span></span>()
+<pre><tt><b><font color="#000000">has_resp_header</font></b>(<font color="#009900">Name</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <b><font color="#000000">boolean</font></b>()
-<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="font-style: italic"><span style="color: #9A1900">%% lowercase; case insensitive</span></span></tt></pre></div></div>
-<div class="paragraph"><p>Return whether the given response header has been set.</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>
-</div>
-<div class="sect1">
+<font color="#009900">Name</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% lowercase; case insensitive</font></i></tt></pre>
+</div></div>
+<p>Return whether the given response header has been set.</p>
+<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>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Name
-</dt>
-<dd>
-<p>
-Header name as a lowercase binary string.
-</p>
+<dl><dt>Name</dt>
+<dd><p>Header name as a lowercase binary string.</p>
</dd>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A boolean indicating whether the given response header has been set.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>A boolean indicating whether the given response header has been set.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<ul><li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Check whether the content-type header has been set</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Check whether the content-type header has been set</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: #000080">false</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:has_resp_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req0</span>),
-<span style="color: #009900">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/html"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req0</span>),
-<span style="color: #000080">true</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:has_resp_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#000080">false</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:has_resp_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req0</font>),
+<font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/html"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req0</font>),
+<font color="#000080">true</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:has_resp_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.set_resp_header">cowboy_req:set_resp_header(3)</a>,
-<a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a>,
-<a href="../cowboy_req.resp_header">cowboy_req:resp_header(3)</a>,
-<a href="../cowboy_req.resp_headers">cowboy_req:resp_headers(3)</a>,
-<a href="../cowboy_req.delete_resp_header">cowboy_req:delete_resp_header(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a>, <a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a>, <a href="../cowboy_req.resp_header">cowboy_req:resp_header(3)</a>, <a href="../cowboy_req.resp_headers">cowboy_req:resp_headers(3)</a>, <a href="../cowboy_req.delete_resp_header">cowboy_req:delete_resp_header(3)</a></p>
+
diff --git a/docs/en/cowboy/2.1/manual/cowboy_req.header/index.html b/docs/en/cowboy/2.1/manual/cowboy_req.header/index.html
index 477c5c26..1b1a3995 100644
--- a/docs/en/cowboy/2.1/manual/cowboy_req.header/index.html
+++ b/docs/en/cowboy/2.1/manual/cowboy_req.header/index.html
@@ -62,122 +62,67 @@
<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">
+<p>cowboy_req:header - HTTP header</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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: #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: #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">Name</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: #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">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>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
+<pre><tt><b><font color="#000000">header</font></b>(<font color="#009900">Name</font>, <font color="#009900">Req</font>) <font color="#990000">-&gt;</font> <b><font color="#000000">header</font></b>(<font color="#009900">Name</font>, <font color="#009900">Req</font>, <font color="#000080">undefined</font>)
+<b><font color="#000000">header</font></b>(<font color="#009900">Name</font>, <font color="#009900">Req</font>, <font color="#009900">Default</font>) <font color="#990000">-&gt;</font> <b><font color="#000080">binary</font></b>() | <font color="#009900">Default</font>
+
+<font color="#009900">Name</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% lowercase; case insensitive</font></i>
+<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()</tt></pre>
+</div></div>
+<p>Return the value for the given HTTP header.</p>
+<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>
+<p>Headers can also be obtained using pattern matching:</p>
+<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">
+<pre><tt>#{<font color="#FF6600">headers</font> <font color="#990000">:=</font> #{<font color="#009900">Name</font> <font color="#990000">:=</font> <font color="#009900">Value</font>}} <font color="#990000">=</font> <font color="#009900">Req</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Note that this snippet will crash if the header is missing.</p>
<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 lowercase binary string.
-</p>
+<dl><dt>Name</dt>
+<dd><p>Desired HTTP header name as a lowercase binary string.</p>
</dd>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dt>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>
+<dt>Default</dt>
+<dd><p>Default value returned when the header is missing.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<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">
+<p>The header value is returned as a binary string. When the header is missing, the default argument is returned.</p>
<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>
+<ul><li><strong>2.0</strong>: Only the header value is returned, it is no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<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
+<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
+<pre><tt><font color="#009900">Accept</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"accept"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>)<font color="#990000">.</font></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">
+<pre><tt><font color="#009900">Length</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-length"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"0"</font><font color="#990000">&gt;&gt;</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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>
+<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>
+
diff --git a/docs/en/cowboy/2.1/manual/cowboy_req.headers/index.html b/docs/en/cowboy/2.1/manual/cowboy_req.headers/index.html
index 59aa63b5..9fe39b2a 100644
--- a/docs/en/cowboy/2.1/manual/cowboy_req.headers/index.html
+++ b/docs/en/cowboy/2.1/manual/cowboy_req.headers/index.html
@@ -62,90 +62,47 @@
<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">
+<p>cowboy_req:headers - HTTP headers</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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
+<pre><tt><b><font color="#000000">headers</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <b><font color="#000000">cowboy:http_headers</font></b>()</tt></pre>
+</div></div>
+<p>Return all request headers.</p>
+<p>Request headers can also be obtained using pattern matching:</p>
+<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">
+<pre><tt>#{<font color="#FF6600">headers</font> <font color="#990000">:=</font> <font color="#009900">Headers</font>} <font color="#990000">=</font> <font color="#009900">Req</font><font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<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">
+<p>Headers are returned as a map with keys being lowercase binary strings, and values as binary strings.</p>
<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>
+<ul><li><strong>2.0</strong>: Only the headers are returned, they are no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<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
+<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">
+<pre><tt><font color="#009900">Headers</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:headers</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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>
+<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>
+
diff --git a/docs/en/cowboy/2.1/manual/cowboy_req.host/index.html b/docs/en/cowboy/2.1/manual/cowboy_req.host/index.html
index 4875e476..e561dd87 100644
--- a/docs/en/cowboy/2.1/manual/cowboy_req.host/index.html
+++ b/docs/en/cowboy/2.1/manual/cowboy_req.host/index.html
@@ -62,91 +62,47 @@
<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">
+<p>cowboy_req:host - URI host name</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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
+<pre><tt><b><font color="#000000">host</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <font color="#009900">Host</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()</tt></pre>
+</div></div>
+<p>Return the host name of the effective request URI.</p>
+<p>The host name can also be obtained using pattern matching:</p>
+<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">
+<pre><tt>#{<font color="#FF6600">host</font> <font color="#990000">:=</font> <font color="#009900">Host</font>} <font color="#990000">=</font> <font color="#009900">Req</font><font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<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">
+<p>The host name is returned as a lowercase binary string. It is case insensitive.</p>
<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>
+<ul><li><strong>2.0</strong>: Only the host name is returned, it is no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<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
+<div class="listingblock"><div class="title">Get the effective request URI&apos;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">
+<pre><tt><font color="#009900">Host</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:host</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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>
+<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>
+
diff --git a/docs/en/cowboy/2.1/manual/cowboy_req.host_info/index.html b/docs/en/cowboy/2.1/manual/cowboy_req.host_info/index.html
index b5c53d33..9ef585bd 100644
--- a/docs/en/cowboy/2.1/manual/cowboy_req.host_info/index.html
+++ b/docs/en/cowboy/2.1/manual/cowboy_req.host_info/index.html
@@ -62,87 +62,41 @@
<h1 class="lined-header"><span>cowboy_req:host_info(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:host_info - Access the route&#8217;s heading host segments</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:host_info - Access the route&apos;s heading host segments</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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_info</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_router:tokens</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Return the tokens for the heading host segments.</p></div>
-<div class="paragraph"><p>This is the part of the host name that was matched using
-the <code>...</code> notation.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">host_info</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <b><font color="#000000">cowboy_router:tokens</font></b>()</tt></pre>
+</div></div>
+<p>Return the tokens for the heading host segments.</p>
+<p>This is the part of the host name that was matched using the <code>...</code> notation.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The tokens are returned as a list of case insensitive
-binary strings.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The tokens are returned as a list of case insensitive binary strings.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Only the tokens are returned, they are no longer wrapped in a tuple.
-</p>
+<ul><li><strong>2.0</strong>: Only the tokens are returned, they are no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Get the host_info tokens</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Get the host_info tokens</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">HostInfo</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:host_info</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">HostInfo</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:host_info</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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>,
-<a href="../cowboy_router">cowboy_router(3)</a></p></div>
-</div>
-</div>
+<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>, <a href="../cowboy_router">cowboy_router(3)</a></p>
+
diff --git a/docs/en/cowboy/2.1/manual/cowboy_req.inform/index.html b/docs/en/cowboy/2.1/manual/cowboy_req.inform/index.html
index 4a753810..142b57e8 100644
--- a/docs/en/cowboy/2.1/manual/cowboy_req.inform/index.html
+++ b/docs/en/cowboy/2.1/manual/cowboy_req.inform/index.html
@@ -62,125 +62,66 @@
<h1 class="lined-header"><span>cowboy_req:inform(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:inform - Send an informational response</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:inform - Send an informational response</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">inform</span></span>(<span style="color: #009900">Status</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">inform</span></span>(<span style="color: #009900">StatusCode</span>, #{}, <span style="color: #009900">Req</span>)
-
-<span style="font-weight: bold"><span style="color: #000000">inform</span></span>(<span style="color: #009900">Status</span>, <span style="color: #009900">Headers</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: #FF6600">ok</span>
-
-<span style="color: #009900">Status</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:http_status</span></span>()
-<span style="color: #009900">Headers</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:http_headers</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Send an informational response.</p></div>
-<div class="paragraph"><p>Informational responses use a status code between 100 and 199.
-They cannot include a body. This function will not use any
-of the previously set headers. All headers to be sent must
-be given directly.</p></div>
-<div class="paragraph"><p>Any number of informational responses can be sent as long as
-they are sent before the proper response. Attempting to use
-this function after sending a normal response will result
-in an error.</p></div>
-<div class="paragraph"><p>The header names must be given as lowercase binary strings.
-While header names are case insensitive, Cowboy requires them
-to be given as lowercase to function properly.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">inform</font></b>(<font color="#009900">Status</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> <b><font color="#000000">inform</font></b>(<font color="#009900">StatusCode</font>, #{}, <font color="#009900">Req</font>)
+
+<b><font color="#000000">inform</font></b>(<font color="#009900">Status</font>, <font color="#009900">Headers</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> <font color="#FF6600">ok</font>
+
+<font color="#009900">Status</font> <font color="#990000">::</font> <b><font color="#000000">cowboy:http_status</font></b>()
+<font color="#009900">Headers</font> <font color="#990000">::</font> <b><font color="#000000">cowboy:http_headers</font></b>()</tt></pre>
+</div></div>
+<p>Send an informational response.</p>
+<p>Informational responses use a status code between 100 and 199. They cannot include a body. This function will not use any of the previously set headers. All headers to be sent must be given directly.</p>
+<p>Any number of informational responses can be sent as long as they are sent before the proper response. Attempting to use this function after sending a normal response will result in an error.</p>
+<p>The header names must be given as lowercase binary strings. While header names are case insensitive, Cowboy requires them to be given as lowercase to function properly.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Status
-</dt>
-<dd>
-<p>
-The status code for the response.
-</p>
+<dl><dt>Status</dt>
+<dd><p>The status code for the response.</p>
</dd>
-<dt class="hdlist1">
-Headers
-</dt>
-<dd>
-<p>
-The response headers.
-</p>
+<dt>Headers</dt>
+<dd><p>The response headers.</p>
</dd>
-</dl></div>
-<div class="paragraph"><p>Header names must be given as lowercase binary strings.</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+</dl>
+<p>Header names must be given as lowercase binary strings.</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The atom <code>ok</code> is always returned. It can be safely ignored.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The atom <code>ok</code> is always returned. It can be safely ignored.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.1</strong>: Function introduced.
-</p>
+<ul><li><strong>2.1</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Send an informational response</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Send an informational response</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: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:inform</span></span>(<span style="color: #993399">102</span>, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Send an informational response with headers</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:inform</font></b>(<font color="#993399">102</font>, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Send an informational response with 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">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:inform</span></span>(<span style="color: #993399">103</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"link"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"&lt;/style.css&gt;; rel=preload; as=style"</span><span style="color: #990000">&gt;&gt;</span>,
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"link"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"&lt;/script.js&gt;; rel=preload; as=script"</span><span style="color: #990000">&gt;&gt;</span>
-}, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:inform</font></b>(<font color="#993399">103</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"link"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"&lt;/style.css&gt;; rel=preload; as=style"</font><font color="#990000">&gt;&gt;</font>,
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"link"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"&lt;/script.js&gt;; rel=preload; as=script"</font><font color="#990000">&gt;&gt;</font>
+}, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.reply">cowboy_req:reply(3)</a>,
-<a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a>,
-<a href="../cowboy_req.push">cowboy_req:push(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.reply">cowboy_req:reply(3)</a>, <a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a>, <a href="../cowboy_req.push">cowboy_req:push(3)</a></p>
+
diff --git a/docs/en/cowboy/2.1/manual/cowboy_req.match_cookies/index.html b/docs/en/cowboy/2.1/manual/cowboy_req.match_cookies/index.html
index 5847531a..4317a623 100644
--- a/docs/en/cowboy/2.1/manual/cowboy_req.match_cookies/index.html
+++ b/docs/en/cowboy/2.1/manual/cowboy_req.match_cookies/index.html
@@ -62,123 +62,67 @@
<h1 class="lined-header"><span>cowboy_req:match_cookies(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:match_cookies - Match cookies against constraints</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:match_cookies - Match cookies against constraints</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">match_cookies</span></span>(<span style="color: #009900">Fields</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:fields</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: #000080">atom</span></span>() <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>Parse the cookies and match specific values against
-constraints.</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>
-<div class="sect1">
+<pre><tt><b><font color="#000000">match_cookies</font></b>(<font color="#009900">Fields</font> <font color="#990000">::</font> <b><font color="#000000">cowboy:fields</font></b>(), <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> #{<b><font color="#000080">atom</font></b>() <font color="#990000">=&gt;</font> <b><font color="#000000">any</font></b>()}</tt></pre>
+</div></div>
+<p>Parse the cookies and match specific values against constraints.</p>
+<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>
+<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>
+<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>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Fields
-</dt>
-<dd>
-<p>
-Cookies to retrieve.
-</p>
-<div class="paragraph"><p>See <a href="../cowboy">cowboy(3)</a> for a complete description.</p></div>
+<dl><dt>Fields</dt>
+<dd><p>Cookies to retrieve.</p>
+<p>See <a href="../cowboy">cowboy(3)</a> for a complete description.</p>
</dd>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Desired values are returned as a map. The key is the atom
-that was given in the list of fields, and the value is the
-optionally converted value after applying constraints.</p></div>
-<div class="paragraph"><p>The map contains the same keys that were given in the fields.</p></div>
-<div class="paragraph"><p>An exception is triggered when the match fails.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Desired values are returned as a map. The key is the atom that was given in the list of fields, and the value is the optionally converted value after applying constraints.</p>
+<p>The map contains the same keys that were given in the fields.</p>
+<p>An exception is triggered when the match fails.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced.
-</p>
+<ul><li><strong>2.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Match fields</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Match fields</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">%% ID and Lang are binaries.</span></span>
-#{<span style="color: #FF6600">id</span> <span style="color: #990000">:=</span> <span style="color: #009900">ID</span>, <span style="color: #FF6600">lang</span> <span style="color: #990000">:=</span> <span style="color: #009900">Lang</span>}
- <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:match_cookies</span></span>([<span style="color: #FF6600">id</span>, <span style="color: #FF6600">lang</span>], <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Match fields and apply constraints</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><i><font color="#9A1900">%% ID and Lang are binaries.</font></i>
+#{<font color="#FF6600">id</font> <font color="#990000">:=</font> <font color="#009900">ID</font>, <font color="#FF6600">lang</font> <font color="#990000">:=</font> <font color="#009900">Lang</font>}
+ <font color="#990000">=</font> <b><font color="#000000">cowboy_req:match_cookies</font></b>([<font color="#FF6600">id</font>, <font color="#FF6600">lang</font>], <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Match fields and apply constraints</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">%% ID is an integer and Lang a non-empty binary.</span></span>
-#{<span style="color: #FF6600">id</span> <span style="color: #990000">:=</span> <span style="color: #009900">ID</span>, <span style="color: #FF6600">lang</span> <span style="color: #990000">:=</span> <span style="color: #009900">Lang</span>}
- <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:match_cookies</span></span>([{<span style="color: #FF6600">id</span>, <span style="color: #FF6600">int</span>}, {<span style="color: #FF6600">lang</span>, <span style="color: #FF6600">nonempty</span>}], <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Match fields with default values</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><i><font color="#9A1900">%% ID is an integer and Lang a non-empty binary.</font></i>
+#{<font color="#FF6600">id</font> <font color="#990000">:=</font> <font color="#009900">ID</font>, <font color="#FF6600">lang</font> <font color="#990000">:=</font> <font color="#009900">Lang</font>}
+ <font color="#990000">=</font> <b><font color="#000000">cowboy_req:match_cookies</font></b>([{<font color="#FF6600">id</font>, <font color="#FF6600">int</font>}, {<font color="#FF6600">lang</font>, <font color="#FF6600">nonempty</font>}], <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Match fields with default values</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: #FF6600">lang</span> <span style="color: #990000">:=</span> <span style="color: #009900">Lang</span>}
- <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:match_cookies</span></span>([{<span style="color: #FF6600">lang</span>, [], <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"en-US"</span><span style="color: #990000">&gt;&gt;</span>}], <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>#{<font color="#FF6600">lang</font> <font color="#990000">:=</font> <font color="#009900">Lang</font>}
+ <font color="#990000">=</font> <b><font color="#000000">cowboy_req:match_cookies</font></b>([{<font color="#FF6600">lang</font>, [], <font color="#990000">&lt;&lt;</font><font color="#FF0000">"en-US"</font><font color="#990000">&gt;&gt;</font>}], <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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_cookies">cowboy_req:parse_cookies(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.parse_cookies">cowboy_req:parse_cookies(3)</a></p>
+
diff --git a/docs/en/cowboy/2.1/manual/cowboy_req.match_qs/index.html b/docs/en/cowboy/2.1/manual/cowboy_req.match_qs/index.html
index ac39045e..d592d036 100644
--- a/docs/en/cowboy/2.1/manual/cowboy_req.match_qs/index.html
+++ b/docs/en/cowboy/2.1/manual/cowboy_req.match_qs/index.html
@@ -62,123 +62,67 @@
<h1 class="lined-header"><span>cowboy_req:match_qs(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:match_qs - Match the query string against constraints</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:match_qs - Match the query string against constraints</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">match_qs</span></span>(<span style="color: #009900">Fields</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:fields</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: #000080">atom</span></span>() <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>Parse the query string and match specific values against
-constraints.</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>
-<div class="sect1">
+<pre><tt><b><font color="#000000">match_qs</font></b>(<font color="#009900">Fields</font> <font color="#990000">::</font> <b><font color="#000000">cowboy:fields</font></b>(), <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> #{<b><font color="#000080">atom</font></b>() <font color="#990000">=&gt;</font> <b><font color="#000000">any</font></b>()}</tt></pre>
+</div></div>
+<p>Parse the query string and match specific values against constraints.</p>
+<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>
+<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>
+<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>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Fields
-</dt>
-<dd>
-<p>
-Fields to retrieve from the query string.
-</p>
-<div class="paragraph"><p>See <a href="../cowboy">cowboy(3)</a> for a complete description.</p></div>
+<dl><dt>Fields</dt>
+<dd><p>Fields to retrieve from the query string.</p>
+<p>See <a href="../cowboy">cowboy(3)</a> for a complete description.</p>
</dd>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Desired values are returned as a map. The key is the atom
-that was given in the list of fields, and the value is the
-optionally converted value after applying constraints.</p></div>
-<div class="paragraph"><p>The map contains the same keys that were given in the fields.</p></div>
-<div class="paragraph"><p>An exception is triggered when the match fails.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Desired values are returned as a map. The key is the atom that was given in the list of fields, and the value is the optionally converted value after applying constraints.</p>
+<p>The map contains the same keys that were given in the fields.</p>
+<p>An exception is triggered when the match fails.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced.
-</p>
+<ul><li><strong>2.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Match fields</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Match fields</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">%% ID and Lang are binaries.</span></span>
-#{<span style="color: #FF6600">id</span> <span style="color: #990000">:=</span> <span style="color: #009900">ID</span>, <span style="color: #FF6600">lang</span> <span style="color: #990000">:=</span> <span style="color: #009900">Lang</span>}
- <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:match_qs</span></span>([<span style="color: #FF6600">id</span>, <span style="color: #FF6600">lang</span>], <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Match fields and apply constraints</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><i><font color="#9A1900">%% ID and Lang are binaries.</font></i>
+#{<font color="#FF6600">id</font> <font color="#990000">:=</font> <font color="#009900">ID</font>, <font color="#FF6600">lang</font> <font color="#990000">:=</font> <font color="#009900">Lang</font>}
+ <font color="#990000">=</font> <b><font color="#000000">cowboy_req:match_qs</font></b>([<font color="#FF6600">id</font>, <font color="#FF6600">lang</font>], <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Match fields and apply constraints</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">%% ID is an integer and Lang a non-empty binary.</span></span>
-#{<span style="color: #FF6600">id</span> <span style="color: #990000">:=</span> <span style="color: #009900">ID</span>, <span style="color: #FF6600">lang</span> <span style="color: #990000">:=</span> <span style="color: #009900">Lang</span>}
- <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:match_qs</span></span>([{<span style="color: #FF6600">id</span>, <span style="color: #FF6600">int</span>}, {<span style="color: #FF6600">lang</span>, <span style="color: #FF6600">nonempty</span>}], <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Match fields with default values</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><i><font color="#9A1900">%% ID is an integer and Lang a non-empty binary.</font></i>
+#{<font color="#FF6600">id</font> <font color="#990000">:=</font> <font color="#009900">ID</font>, <font color="#FF6600">lang</font> <font color="#990000">:=</font> <font color="#009900">Lang</font>}
+ <font color="#990000">=</font> <b><font color="#000000">cowboy_req:match_qs</font></b>([{<font color="#FF6600">id</font>, <font color="#FF6600">int</font>}, {<font color="#FF6600">lang</font>, <font color="#FF6600">nonempty</font>}], <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Match fields with default values</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: #FF6600">lang</span> <span style="color: #990000">:=</span> <span style="color: #009900">Lang</span>}
- <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:match_qs</span></span>([{<span style="color: #FF6600">lang</span>, [], <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"en-US"</span><span style="color: #990000">&gt;&gt;</span>}], <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>#{<font color="#FF6600">lang</font> <font color="#990000">:=</font> <font color="#009900">Lang</font>}
+ <font color="#990000">=</font> <b><font color="#000000">cowboy_req:match_qs</font></b>([{<font color="#FF6600">lang</font>, [], <font color="#990000">&lt;&lt;</font><font color="#FF0000">"en-US"</font><font color="#990000">&gt;&gt;</font>}], <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.qs">cowboy_req:qs(3)</a>,
-<a href="../cowboy_req.parse_qs">cowboy_req:parse_qs(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.qs">cowboy_req:qs(3)</a>, <a href="../cowboy_req.parse_qs">cowboy_req:parse_qs(3)</a></p>
+
diff --git a/docs/en/cowboy/2.1/manual/cowboy_req.method/index.html b/docs/en/cowboy/2.1/manual/cowboy_req.method/index.html
index d58a364b..d0a6a414 100644
--- a/docs/en/cowboy/2.1/manual/cowboy_req.method/index.html
+++ b/docs/en/cowboy/2.1/manual/cowboy_req.method/index.html
@@ -62,100 +62,58 @@
<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">
+<p>cowboy_req:method - HTTP method</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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
+<pre><tt><b><font color="#000000">method</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <font color="#009900">Method</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()</tt></pre>
+</div></div>
+<p>Return the request&apos;s HTTP method.</p>
+<p>The method can also be obtained using pattern matching:</p>
+<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">
+<pre><tt>#{<font color="#FF6600">method</font> <font color="#990000">:=</font> <font color="#009900">Method</font>} <font color="#990000">=</font> <font color="#009900">Req</font><font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<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">
+<p>The request&apos;s HTTP method is returned as a binary string. While methods are case sensitive, standard methods are always uppercase.</p>
<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>
+<ul><li><strong>2.0</strong>: Only the method is returned, it is no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<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
+<div class="listingblock"><div class="title">Ensure the request&apos;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
+<pre><tt><font color="#990000">&lt;&lt;</font><font color="#FF0000">"GET"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:method</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></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">
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">case</font></b> <b><font color="#000000">lists:member</font></b>(<b><font color="#000000">cowboy_req:method</font></b>(<font color="#009900">Req</font>), [<font color="#990000">&lt;&lt;</font><font color="#FF0000">"GET"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"POST"</font><font color="#990000">&gt;&gt;</font>]) <b><font color="#0000FF">of</font></b>
+ <font color="#000080">true</font> <font color="#990000">-&gt;</font> <b><font color="#000000">handle</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>);
+ <font color="#000080">false</font> <font color="#990000">-&gt;</font> <b><font color="#000000">method_not_allowed</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>)
+ <b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
<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>
+<p><a href="../cowboy_req">cowboy_req(3)</a></p>
+
diff --git a/docs/en/cowboy/2.1/manual/cowboy_req.parse_cookies/index.html b/docs/en/cowboy/2.1/manual/cowboy_req.parse_cookies/index.html
index 5405fa1d..d2b8c356 100644
--- a/docs/en/cowboy/2.1/manual/cowboy_req.parse_cookies/index.html
+++ b/docs/en/cowboy/2.1/manual/cowboy_req.parse_cookies/index.html
@@ -62,91 +62,47 @@
<h1 class="lined-header"><span>cowboy_req:parse_cookies(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:parse_cookies - Parse cookie headers</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:parse_cookies - Parse cookie headers</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">parse_cookies</span></span>(<span style="color: #009900">Req</span>) <span style="color: #990000">-&gt;</span> [{<span style="color: #009900">Name</span>, <span style="color: #009900">Value</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="font-style: italic"><span style="color: #9A1900">%% case sensitive</span></span>
-<span style="color: #009900">Value</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></tt></pre></div></div>
-<div class="paragraph"><p>Parse cookie headers.</p></div>
-<div class="paragraph"><p>Alias for <a href="../cowboy_req.parse_header">cowboy_req:parse_header(<a href="#cookie">[cookie]</a>, Req)</a>.</p></div>
-<div class="paragraph"><p>When the cookie header is missing, <code>[]</code> is returned.</p></div>
-<div class="paragraph"><p>While an empty cookie header is not valid, some clients do
-send it. Cowboy will in this case also return <code>[]</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">parse_cookies</font></b>(<font color="#009900">Req</font>) <font color="#990000">-&gt;</font> [{<font color="#009900">Name</font>, <font color="#009900">Value</font>}]
+
+<font color="#009900">Name</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case sensitive</font></i>
+<font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case sensitive</font></i></tt></pre>
+</div></div>
+<p>Parse cookie headers.</p>
+<p>Alias for <a href="../cowboy_req.parse_header">cowboy_req:parse_header(&lt;&lt;&quot;cookie&quot;&gt;&gt;, Req)</a>.</p>
+<p>When the cookie header is missing, <code>[]</code> is returned.</p>
+<p>While an empty cookie header is not valid, some clients do send it. Cowboy will in this case also return <code>[]</code>.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The cookies are returned as a list of key/values. Keys and
-values are case sensitive binary strings.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The cookies are returned as a list of key/values. Keys and values are case sensitive binary strings.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Only the parsed header value is returned, it is no longer wrapped in a tuple.
-</p>
+<ul><li><strong>2.0</strong>: Only the parsed header value is returned, it is no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced. Replaces <code>cookie/2,3</code> and <code>cookies/1</code>.
-</p>
+<li><strong>2.0</strong>: Function introduced. Replaces <code>cookie/2,3</code> and <code>cookies/1</code>.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Look for a specific cookie</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Look for a specific cookie</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">Cookies</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:parse_cookies</span></span>(<span style="color: #009900">Req</span>),
-{<span style="color: #990000">_</span>, <span style="color: #009900">Token</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">lists:keyfind</span></span>(<span style="color: #FF6600">token</span>, <span style="color: #993399">1</span>, <span style="color: #009900">Cookies</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Cookies</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:parse_cookies</font></b>(<font color="#009900">Req</font>),
+{<font color="#990000">_</font>, <font color="#009900">Token</font>} <font color="#990000">=</font> <b><font color="#000000">lists:keyfind</font></b>(<font color="#FF6600">token</font>, <font color="#993399">1</font>, <font color="#009900">Cookies</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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_header">cowboy_req:parse_header(3)</a>,
-<a href="../cowboy_req.match_cookies">cowboy_req:match_cookies(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.parse_header">cowboy_req:parse_header(3)</a>, <a href="../cowboy_req.match_cookies">cowboy_req:match_cookies(3)</a></p>
+
diff --git a/docs/en/cowboy/2.1/manual/cowboy_req.parse_header/index.html b/docs/en/cowboy/2.1/manual/cowboy_req.parse_header/index.html
index 6ad50b43..4b245860 100644
--- a/docs/en/cowboy/2.1/manual/cowboy_req.parse_header/index.html
+++ b/docs/en/cowboy/2.1/manual/cowboy_req.parse_header/index.html
@@ -62,283 +62,218 @@
<h1 class="lined-header"><span>cowboy_req:parse_header(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:parse_header - Parse the given HTTP header</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:parse_header - Parse the given HTTP header</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">parse_header</span></span>(<span style="color: #009900">Name</span>, <span style="color: #009900">Req</span>) <span style="color: #990000">-&gt;</span> <span style="color: #009900">ParsedValue</span> | <span style="color: #009900">Default</span>
-<span style="font-weight: bold"><span style="color: #000000">parse_header</span></span>(<span style="color: #009900">Name</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">Default</span>) <span style="color: #990000">-&gt;</span> <span style="color: #009900">ParsedValue</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">binary</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">ParsedValue</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">any</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>Parse 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>The type of the parsed value varies depending on
-the header. Similarly, the default value when calling
-<code>cowboy_req:parse_header/2</code> differs depending on the
-header.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">parse_header</font></b>(<font color="#009900">Name</font>, <font color="#009900">Req</font>) <font color="#990000">-&gt;</font> <font color="#009900">ParsedValue</font> | <font color="#009900">Default</font>
+<b><font color="#000000">parse_header</font></b>(<font color="#009900">Name</font>, <font color="#009900">Req</font>, <font color="#009900">Default</font>) <font color="#990000">-&gt;</font> <font color="#009900">ParsedValue</font> | <font color="#009900">Default</font>
+
+<font color="#009900">Name</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()
+<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()
+<font color="#009900">ParsedValue</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()</tt></pre>
+</div></div>
+<p>Parse the given HTTP header.</p>
+<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>
+<p>The type of the parsed value varies depending on the header. Similarly, the default value when calling <code>cowboy_req:parse_header/2</code> differs depending on the header.</p>
<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 lowercase binary string.
-</p>
+<dl><dt>Name</dt>
+<dd><p>Desired HTTP header name as a lowercase binary string.</p>
</dd>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dt>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>
+<dt>Default</dt>
+<dd><p>Default value returned when the header is missing.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The parsed header value varies depending on the header.
-When the header is missing, the default argument is returned.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The parsed header value varies depending on the header. When the header is missing, the default argument is returned.</p>
<h2 id="_headers">Headers</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The following snippets detail the types returned by the
-different headers. Unless mentioned otherwise, the
-default value when the header is missing will be <code>undefined</code>:</p></div>
-<div class="listingblock">
-<div class="title">accept</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The following snippets detail the types returned by the different headers. Unless mentioned otherwise, the default value when the header is missing will be <code>undefined</code>:</p>
+<div class="listingblock"><div class="title">accept</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">parse_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">-&gt;</span> [{{<span style="color: #009900">Type</span>, <span style="color: #009900">SubType</span>, <span style="color: #009900">Params</span>}, <span style="color: #009900">Quality</span>, <span style="color: #009900">AcceptExt</span>}]
-
-<span style="color: #009900">Type</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 insensitive</span></span>
-<span style="color: #009900">SubType</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 insensitive</span></span>
-<span style="color: #009900">Params</span> <span style="color: #990000">::</span> [{<span style="color: #009900">Key</span>, <span style="color: #009900">Value</span>}]
-<span style="color: #009900">Quality</span> <span style="color: #990000">::</span> <span style="color: #993399">0</span><span style="color: #990000">..</span><span style="color: #993399">1000</span>
-<span style="color: #009900">AcceptExt</span> <span style="color: #990000">::</span> [<span style="color: #009900">Key</span> | {<span style="color: #009900">Key</span>, <span style="color: #009900">Value</span>}]
-<span style="color: #009900">Key</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 insensitive</span></span>
-<span style="color: #009900">Value</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></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">accept-charset, accept-encoding and accept-language</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">parse_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"accept"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>)
+ <font color="#990000">-&gt;</font> [{{<font color="#009900">Type</font>, <font color="#009900">SubType</font>, <font color="#009900">Params</font>}, <font color="#009900">Quality</font>, <font color="#009900">AcceptExt</font>}]
+
+<font color="#009900">Type</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case insensitive</font></i>
+<font color="#009900">SubType</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case insensitive</font></i>
+<font color="#009900">Params</font> <font color="#990000">::</font> [{<font color="#009900">Key</font>, <font color="#009900">Value</font>}]
+<font color="#009900">Quality</font> <font color="#990000">::</font> <font color="#993399">0</font><font color="#990000">..</font><font color="#993399">1000</font>
+<font color="#009900">AcceptExt</font> <font color="#990000">::</font> [<font color="#009900">Key</font> | {<font color="#009900">Key</font>, <font color="#009900">Value</font>}]
+<font color="#009900">Key</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case insensitive</font></i>
+<font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case sensitive</font></i></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">accept-charset, accept-encoding and accept-language</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">parse_header</span></span>(<span style="color: #009900">Name</span>, <span style="color: #009900">Req</span>) <span style="color: #990000">-&gt;</span> [{<span style="color: #009900">Value</span>, <span style="color: #009900">Quality</span>}]
-
-<span style="color: #009900">Name</span> <span style="color: #990000">::</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"accept-charset"</span><span style="color: #990000">&gt;&gt;</span>
- | <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"accept-encoding"</span><span style="color: #990000">&gt;&gt;</span>
- | <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"accept-language"</span><span style="color: #990000">&gt;&gt;</span>
-<span style="color: #009900">Value</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 insensitive</span></span>
-<span style="color: #009900">Quality</span> <span style="color: #990000">::</span> <span style="color: #993399">0</span><span style="color: #990000">..</span><span style="color: #993399">1000</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">authorization</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">parse_header</font></b>(<font color="#009900">Name</font>, <font color="#009900">Req</font>) <font color="#990000">-&gt;</font> [{<font color="#009900">Value</font>, <font color="#009900">Quality</font>}]
+
+<font color="#009900">Name</font> <font color="#990000">::</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"accept-charset"</font><font color="#990000">&gt;&gt;</font>
+ | <font color="#990000">&lt;&lt;</font><font color="#FF0000">"accept-encoding"</font><font color="#990000">&gt;&gt;</font>
+ | <font color="#990000">&lt;&lt;</font><font color="#FF0000">"accept-language"</font><font color="#990000">&gt;&gt;</font>
+<font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case insensitive</font></i>
+<font color="#009900">Quality</font> <font color="#990000">::</font> <font color="#993399">0</font><font color="#990000">..</font><font color="#993399">1000</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">authorization</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">parse_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"authorization"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req</span>)
- <span style="color: #990000">-&gt;</span> {<span style="color: #FF6600">basic</span>, <span style="color: #009900">Username</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="color: #009900">Password</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()}
- | {<span style="color: #FF6600">bearer</span>, <span style="color: #009900">Token</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()}
- | {<span style="color: #FF6600">digest</span>, [{<span style="color: #009900">Key</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="color: #009900">Value</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()}]}</tt></pre></div></div>
-<div class="listingblock">
-<div class="title">content-length</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">parse_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"authorization"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>)
+ <font color="#990000">-&gt;</font> {<font color="#FF6600">basic</font>, <font color="#009900">Username</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">Password</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()}
+ | {<font color="#FF6600">bearer</font>, <font color="#009900">Token</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()}
+ | {<font color="#FF6600">digest</font>, [{<font color="#009900">Key</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()}]}</tt></pre>
+</div></div>
+<!-- @todo Currently also parses connection. Do we want this? Should it be documented? Use case?-->
+<div class="listingblock"><div class="title">content-length</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">parse_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">-&gt;</span> <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>When the content-length header is missing, <code>0</code> is returned.</p></div>
-<div class="listingblock">
-<div class="title">content-type</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">parse_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-length"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>) <font color="#990000">-&gt;</font> <b><font color="#000000">non_neg_integer</font></b>()</tt></pre>
+</div></div>
+<p>When the content-length header is missing, <code>0</code> is returned.</p>
+<div class="listingblock"><div class="title">content-type</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">parse_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req</span>)
- <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Type</span>, <span style="color: #009900">SubType</span>, <span style="color: #009900">Params</span>}
-
-<span style="color: #009900">Type</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 insensitive</span></span>
-<span style="color: #009900">SubType</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 insensitive</span></span>
-<span style="color: #009900">Params</span> <span style="color: #990000">::</span> [{<span style="color: #009900">Key</span>, <span style="color: #009900">Value</span>}]
-<span style="color: #009900">Key</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 insensitive</span></span>
-<span style="color: #009900">Value</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></tt></pre></div></div>
-<div class="paragraph"><p>Note that the value for the charset parameter is case insensitive
-and returned as a lowercase binary string.</p></div>
-<div class="listingblock">
-<div class="title">cookie</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">parse_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>)
+ <font color="#990000">-&gt;</font> {<font color="#009900">Type</font>, <font color="#009900">SubType</font>, <font color="#009900">Params</font>}
+
+<font color="#009900">Type</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case insensitive</font></i>
+<font color="#009900">SubType</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case insensitive</font></i>
+<font color="#009900">Params</font> <font color="#990000">::</font> [{<font color="#009900">Key</font>, <font color="#009900">Value</font>}]
+<font color="#009900">Key</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case insensitive</font></i>
+<font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case sensitive;</font></i></tt></pre>
+</div></div>
+<p>Note that the value for the charset parameter is case insensitive and returned as a lowercase binary string.</p>
+<div class="listingblock"><div class="title">cookie</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">parse_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"cookie"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req</span>) <span style="color: #990000">-&gt;</span> [{<span style="color: #009900">Name</span>, <span style="color: #009900">Value</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="font-style: italic"><span style="color: #9A1900">%% case sensitive</span></span>
-<span style="color: #009900">Value</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></tt></pre></div></div>
-<div class="paragraph"><p>When the cookie header is missing, <code>[]</code> is returned.</p></div>
-<div class="paragraph"><p>While an empty cookie header is not valid, some clients do
-send it. Cowboy will in this case also return <code>[]</code>.</p></div>
-<div class="listingblock">
-<div class="title">expect</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">parse_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"cookie"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>) <font color="#990000">-&gt;</font> [{<font color="#009900">Name</font>, <font color="#009900">Value</font>}]
+
+<font color="#009900">Name</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case sensitive</font></i>
+<font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case sensitive</font></i></tt></pre>
+</div></div>
+<p>When the cookie header is missing, <code>[]</code> is returned.</p>
+<p>While an empty cookie header is not valid, some clients do send it. Cowboy will in this case also return <code>[]</code>.</p>
+<div class="listingblock"><div class="title">expect</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">parse_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"expect"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req</span>) <span style="color: #990000">-&gt;</span> <span style="color: #FF6600">continue</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">if-match and if-none-match</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">parse_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"expect"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>) <font color="#990000">-&gt;</font> <font color="#FF6600">continue</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">if-match and if-none-match</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">parse_header</span></span>(<span style="color: #009900">Name</span>, <span style="color: #009900">Req</span>)
- <span style="color: #990000">-&gt;</span> <span style="color: #FF6600">'*'</span> | [{<span style="color: #FF6600">weak</span> | <span style="color: #FF6600">strong</span>, <span style="color: #009900">OpaqueTag</span>}]
-
-<span style="color: #009900">Name</span> <span style="color: #990000">::</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"if-match"</span><span style="color: #990000">&gt;&gt;</span>
- | <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"if-none-match"</span><span style="color: #990000">&gt;&gt;</span>
-<span style="color: #009900">OpaqueTag</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></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">if-modified-since and if-unmodified-since</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">parse_header</font></b>(<font color="#009900">Name</font>, <font color="#009900">Req</font>)
+ <font color="#990000">-&gt;</font> <font color="#FF6600">'*'</font> | [{<font color="#FF6600">weak</font> | <font color="#FF6600">strong</font>, <font color="#009900">OpaqueTag</font>}]
+
+<font color="#009900">Name</font> <font color="#990000">::</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"if-match"</font><font color="#990000">&gt;&gt;</font>
+ | <font color="#990000">&lt;&lt;</font><font color="#FF0000">"if-none-match"</font><font color="#990000">&gt;&gt;</font>
+<font color="#009900">OpaqueTag</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case sensitive</font></i></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">if-modified-since and if-unmodified-since</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">parse_header</span></span>(<span style="color: #009900">Name</span>, <span style="color: #009900">Req</span>) <span style="color: #990000">-&gt;</span> <span style="font-weight: bold"><span style="color: #000000">calendar:datetime</span></span>()</tt></pre></div></div>
-<div class="listingblock">
-<div class="title">range</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">parse_header</font></b>(<font color="#009900">Name</font>, <font color="#009900">Req</font>) <font color="#990000">-&gt;</font> <b><font color="#000000">calendar:datetime</font></b>()</tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">range</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">parse_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"range"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">From</span>, <span style="color: #009900">To</span>} | <span style="color: #009900">Final</span>
-
-<span style="color: #009900">From</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>()
-<span style="color: #009900">To</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>() | <span style="color: #FF6600">infinity</span>
-<span style="color: #009900">Final</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">neg_integer</span></span>()</tt></pre></div></div>
-<div class="listingblock">
-<div class="title">sec-websocket-extensions</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">parse_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"range"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>) <font color="#990000">-&gt;</font> {<font color="#009900">From</font>, <font color="#009900">To</font>} | <font color="#009900">Final</font>
+
+<font color="#009900">From</font> <font color="#990000">::</font> <b><font color="#000000">non_neg_integer</font></b>()
+<font color="#009900">To</font> <font color="#990000">::</font> <b><font color="#000000">non_neg_integer</font></b>() | <font color="#FF6600">infinity</font>
+<font color="#009900">Final</font> <font color="#990000">::</font> <b><font color="#000000">neg_integer</font></b>()</tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">sec-websocket-extensions</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">parse_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"sec-websocket-extensions"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req</span>)
- <span style="color: #990000">-&gt;</span> [{<span style="color: #009900">Extension</span>, <span style="color: #009900">Params</span>}]
-
-<span style="color: #009900">Extension</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: #009900">Params</span> <span style="color: #990000">::</span> [<span style="color: #009900">Key</span> | {<span style="color: #009900">Key</span>, <span style="color: #009900">Value</span>}]
-<span style="color: #009900">Key</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: #009900">Value</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></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">sec-websocket-protocol and upgrade</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">parse_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"sec-websocket-extensions"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>)
+ <font color="#990000">-&gt;</font> [{<font color="#009900">Extension</font>, <font color="#009900">Params</font>}]
+
+<font color="#009900">Extension</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case sensitive</font></i>
+<font color="#009900">Params</font> <font color="#990000">::</font> [<font color="#009900">Key</font> | {<font color="#009900">Key</font>, <font color="#009900">Value</font>}]
+<font color="#009900">Key</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case sensitive</font></i>
+<font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case sensitive</font></i></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">sec-websocket-protocol and upgrade</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">parse_header</span></span>(<span style="color: #009900">Name</span>, <span style="color: #009900">Req</span>) <span style="color: #990000">-&gt;</span> [<span style="color: #009900">Token</span>]
-
-<span style="color: #009900">Name</span> <span style="color: #990000">::</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"sec-websocket-protocol"</span><span style="color: #990000">&gt;&gt;</span>
- | <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"upgrade"</span><span style="color: #990000">&gt;&gt;</span>
-<span style="color: #009900">Token</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 insensitive</span></span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">x-forwarded-for</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">parse_header</font></b>(<font color="#009900">Name</font>, <font color="#009900">Req</font>) <font color="#990000">-&gt;</font> [<font color="#009900">Token</font>]
+
+<font color="#009900">Name</font> <font color="#990000">::</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"sec-websocket-protocol"</font><font color="#990000">&gt;&gt;</font>
+ | <font color="#990000">&lt;&lt;</font><font color="#FF0000">"upgrade"</font><font color="#990000">&gt;&gt;</font>
+<font color="#009900">Token</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case insensitive</font></i></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">x-forwarded-for</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">parse_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"x-forwarded-for"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req</span>) <span style="color: #990000">-&gt;</span> [<span style="color: #009900">Token</span>]
+<pre><tt><b><font color="#000000">parse_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"x-forwarded-for"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>) <font color="#990000">-&gt;</font> [<font color="#009900">Token</font>]
-<span style="color: #009900">Token</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></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Unknown headers</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<font color="#009900">Token</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case sensitive</font></i></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Unknown 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="font-weight: bold"><span style="color: #000000">parse_header</span></span>(<span style="color: #990000">_</span>, <span style="color: #009900">Req</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #000080">undefined</span>, <span style="color: #009900">RawValue</span>}</tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">parse_header</font></b>(<font color="#990000">_</font>, <font color="#009900">Req</font>) <font color="#990000">-&gt;</font> {<font color="#000080">undefined</font>, <font color="#009900">RawValue</font>}</tt></pre>
+</div></div>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Only the parsed header value is returned, it is no longer wrapped in a tuple.
-</p>
+<ul><li><strong>2.0</strong>: Only the parsed header value is returned, it is no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Parse the accept header with a custom default value</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Parse the accept header with a custom 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="font-style: italic"><span style="color: #9A1900">%% Accept everything when header is missing.</span></span>
-<span style="color: #009900">Accept</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:parse_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">&lt;&lt;</span><span style="color: #FF0000">"*"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"*"</span><span style="color: #990000">&gt;&gt;</span>, []}, <span style="color: #993399">1000</span>, []}])<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Parse the content-length header</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><i><font color="#9A1900">%% Accept everything when header is missing.</font></i>
+<font color="#009900">Accept</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:parse_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"accept"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>,
+ [{{ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"*"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"*"</font><font color="#990000">&gt;&gt;</font>, []}, <font color="#993399">1000</font>, []}])<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Parse the content-length 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">%% Default content-length is 0.</span></span>
-<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">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><i><font color="#9A1900">%% Default content-length is 0.</font></i>
+<font color="#009900">Length</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-length"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.headers">cowboy_req:headers(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.header">cowboy_req:header(3)</a>, <a href="../cowboy_req.headers">cowboy_req:headers(3)</a></p>
+
diff --git a/docs/en/cowboy/2.1/manual/cowboy_req.parse_qs/index.html b/docs/en/cowboy/2.1/manual/cowboy_req.parse_qs/index.html
index 63e09f33..74e787fe 100644
--- a/docs/en/cowboy/2.1/manual/cowboy_req.parse_qs/index.html
+++ b/docs/en/cowboy/2.1/manual/cowboy_req.parse_qs/index.html
@@ -62,117 +62,55 @@
<h1 class="lined-header"><span>cowboy_req:parse_qs(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:parse_qs - Parse the query string</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:parse_qs - Parse the query string</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">parse_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">Key</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="color: #009900">Value</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>() | <span style="color: #000080">true</span>}]</tt></pre></div></div>
-<div class="paragraph"><p>Parse the query string as a list of key/value pairs.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">parse_qs</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> [{<font color="#009900">Key</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() | <font color="#000080">true</font>}]</tt></pre>
+</div></div>
+<p>Parse the query string as a list of key/value pairs.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The parsed query string is returned as a list of key/value pairs.
-The key is a binary string. The value is either a binary string,
-or the atom <code>true</code>. Both key and value are case sensitive.</p></div>
-<div class="paragraph"><p>The atom <code>true</code> is returned when a key is present in the query
-string without a value. For example, in the following URIs
-the key <code>&lt;&lt;"edit"&gt;&gt;</code> will always have the value <code>true</code>:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<code>/posts/42?edit</code>
-</p>
+<p>The parsed query string is returned as a list of key/value pairs. The key is a binary string. The value is either a binary string, or the atom <code>true</code>. Both key and value are case sensitive.</p>
+<p>The atom <code>true</code> is returned when a key is present in the query string without a value. For example, in the following URIs the key <code>&lt;&lt;&quot;edit&quot;&gt;&gt;</code> will always have the value <code>true</code>:</p>
+<ul><li><code>/posts/42?edit</code>
</li>
-<li>
-<p>
-<code>/posts/42?edit&amp;exclusive=1</code>
-</p>
+<li><code>/posts/42?edit&amp;exclusive=1</code>
</li>
-<li>
-<p>
-<code>/posts/42?exclusive=1&amp;edit</code>
-</p>
+<li><code>/posts/42?exclusive=1&amp;edit</code>
</li>
-<li>
-<p>
-<code>/posts/42?exclusive=1&amp;edit&amp;from=web</code>
-</p>
+<li><code>/posts/42?exclusive=1&amp;edit&amp;from=web</code>
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: The parsed value is not longer cached in the Req object.
-</p>
+<ul><li><strong>2.0</strong>: The parsed value is not longer cached in the Req object.
</li>
-<li>
-<p>
-<strong>2.0</strong>: Only the parsed query string is returned, it is no longer wrapped in a tuple.
-</p>
+<li><strong>2.0</strong>: Only the parsed query string is returned, it is no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced. Replaces <code>qs_val/1</code> and <code>qs_vals/1</code>.
-</p>
+<li><strong>2.0</strong>: Function introduced. Replaces <code>qs_val/1</code> and <code>qs_vals/1</code>.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Parse the query string and convert the keys to atoms</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Parse the query string and convert the keys to atoms</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">ParsedQs</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:parse_qs</span></span>(<span style="color: #009900">Req</span>),
-<span style="color: #009900">AtomsQs</span> <span style="color: #990000">=</span> [{<span style="font-weight: bold"><span style="color: #000000">binary_to_existing_atom</span></span>(<span style="color: #009900">K</span>, <span style="color: #FF6600">latin1</span>), <span style="color: #009900">V</span>}
- || {<span style="color: #009900">K</span>, <span style="color: #009900">V</span>} <span style="color: #990000">&lt;-</span> <span style="color: #009900">ParsedQs</span>]<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">ParsedQs</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:parse_qs</font></b>(<font color="#009900">Req</font>),
+<font color="#009900">AtomsQs</font> <font color="#990000">=</font> [{<b><font color="#000000">binary_to_existing_atom</font></b>(<font color="#009900">K</font>, <font color="#FF6600">latin1</font>), <font color="#009900">V</font>}
+ || {<font color="#009900">K</font>, <font color="#009900">V</font>} <font color="#990000">&lt;-</font> <font color="#009900">ParsedQs</font>]<font color="#990000">.</font></tt></pre>
+</div></div>
<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.qs">cowboy_req:qs(3)</a>,
-<a href="../cowboy_req.match_qs">cowboy_req:match_qs(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.qs">cowboy_req:qs(3)</a>, <a href="../cowboy_req.match_qs">cowboy_req:match_qs(3)</a></p>
+
diff --git a/docs/en/cowboy/2.1/manual/cowboy_req.path/index.html b/docs/en/cowboy/2.1/manual/cowboy_req.path/index.html
index 73aecfc8..5edd85e1 100644
--- a/docs/en/cowboy/2.1/manual/cowboy_req.path/index.html
+++ b/docs/en/cowboy/2.1/manual/cowboy_req.path/index.html
@@ -62,90 +62,47 @@
<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">
+<p>cowboy_req:path - URI path</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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
+<pre><tt><b><font color="#000000">path</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <font color="#009900">Path</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()</tt></pre>
+</div></div>
+<p>Return the path of the effective request URI.</p>
+<p>The path can also be obtained using pattern matching:</p>
+<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">
+<pre><tt>#{<font color="#FF6600">path</font> <font color="#990000">:=</font> <font color="#009900">Path</font>} <font color="#990000">=</font> <font color="#009900">Req</font><font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<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">
+<p>The path is returned as a binary string. It is case sensitive.</p>
<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>
+<ul><li><strong>2.0</strong>: Only the path is returned, it is no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<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
+<div class="listingblock"><div class="title">Get the effective request URI&apos;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">
+<pre><tt><font color="#009900">Path</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:path</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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>
+<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>
+
diff --git a/docs/en/cowboy/2.1/manual/cowboy_req.path_info/index.html b/docs/en/cowboy/2.1/manual/cowboy_req.path_info/index.html
index 68320b5e..ac35e9e9 100644
--- a/docs/en/cowboy/2.1/manual/cowboy_req.path_info/index.html
+++ b/docs/en/cowboy/2.1/manual/cowboy_req.path_info/index.html
@@ -62,87 +62,41 @@
<h1 class="lined-header"><span>cowboy_req:path_info(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:path_info - Access the route&#8217;s trailing path segments</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:path_info - Access the route&apos;s trailing path segments</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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_info</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_router:tokens</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Return the tokens for the trailing path segments.</p></div>
-<div class="paragraph"><p>This is the part of the host name that was matched using
-the <code>...</code> notation.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">path_info</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <b><font color="#000000">cowboy_router:tokens</font></b>()</tt></pre>
+</div></div>
+<p>Return the tokens for the trailing path segments.</p>
+<p>This is the part of the host name that was matched using the <code>...</code> notation.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The tokens are returned as a list of case sensitive
-binary strings.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The tokens are returned as a list of case sensitive binary strings.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Only the tokens are returned, they are no longer wrapped in a tuple.
-</p>
+<ul><li><strong>2.0</strong>: Only the tokens are returned, they are no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Get the path_info tokens</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Get the path_info tokens</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">PathInfo</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:path_info</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">PathInfo</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:path_info</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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>,
-<a href="../cowboy_router">cowboy_router(3)</a></p></div>
-</div>
-</div>
+<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>, <a href="../cowboy_router">cowboy_router(3)</a></p>
+
diff --git a/docs/en/cowboy/2.1/manual/cowboy_req.peer/index.html b/docs/en/cowboy/2.1/manual/cowboy_req.peer/index.html
index 3155feb3..00420d92 100644
--- a/docs/en/cowboy/2.1/manual/cowboy_req.peer/index.html
+++ b/docs/en/cowboy/2.1/manual/cowboy_req.peer/index.html
@@ -62,98 +62,51 @@
<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">
+<p>cowboy_req:peer - Peer address and port</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">Info</span>
+<pre><tt><b><font color="#000000">peer</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <font color="#009900">Info</font>
-<span style="color: #009900">Info</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 information can also be obtained using pattern matching:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<font color="#009900">Info</font> <font color="#990000">::</font> {<b><font color="#000000">inet:ip_address</font></b>(), <b><font color="#000000">inet:port_number</font></b>()}</tt></pre>
+</div></div>
+<p>Return the peer&apos;s IP address and port number.</p>
+<p>The peer information can also be obtained using pattern matching:</p>
+<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">
+<pre><tt>#{<font color="#FF6600">peer</font> <font color="#990000">:=</font> {<font color="#009900">IP</font>, <font color="#009900">Port</font>}} <font color="#990000">=</font> <font color="#009900">Req</font><font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<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">
+<p>The peer&apos;s IP address and port number.</p>
+<p>The peer is not necessarily the client&apos;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>
+<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>
<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>
+<ul><li><strong>2.0</strong>: Only the peer is returned, it is no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<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
+<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">
+<pre><tt>{<font color="#009900">IP</font>, <font color="#009900">Port</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:peer</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.sock">cowboy_req:sock(3)</a>,
-<a href="../cowboy_req.cert">cowboy_req:cert(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.sock">cowboy_req:sock(3)</a>, <a href="../cowboy_req.cert">cowboy_req:cert(3)</a></p>
+
diff --git a/docs/en/cowboy/2.1/manual/cowboy_req.port/index.html b/docs/en/cowboy/2.1/manual/cowboy_req.port/index.html
index 19ecfaef..91f92659 100644
--- a/docs/en/cowboy/2.1/manual/cowboy_req.port/index.html
+++ b/docs/en/cowboy/2.1/manual/cowboy_req.port/index.html
@@ -62,90 +62,48 @@
<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">
+<p>cowboy_req:port - URI port number</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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
+<pre><tt><b><font color="#000000">port</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <font color="#009900">Port</font> <font color="#990000">::</font> <b><font color="#000000">inet:port_number</font></b>()</tt></pre>
+</div></div>
+<p>Return the port number of the effective request URI.</p>
+<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>
+<p>The port number can also be obtained using pattern matching:</p>
+<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">
+<pre><tt>#{<font color="#FF6600">port</font> <font color="#990000">:=</font> <font color="#009900">Port</font>} <font color="#990000">=</font> <font color="#009900">Req</font><font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<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">
+<p>The port number is returned as an integer.</p>
<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>
+<ul><li><strong>2.0</strong>: Only the port number is returned, it is no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<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
+<div class="listingblock"><div class="title">Get the effective request URI&apos;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">
+<pre><tt><font color="#009900">Port</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:port</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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>
+<p><a href="../cowboy_req">cowboy_req(3)</a></p>
+
diff --git a/docs/en/cowboy/2.1/manual/cowboy_req.push/index.html b/docs/en/cowboy/2.1/manual/cowboy_req.push/index.html
index bdf4fd06..bbe96982 100644
--- a/docs/en/cowboy/2.1/manual/cowboy_req.push/index.html
+++ b/docs/en/cowboy/2.1/manual/cowboy_req.push/index.html
@@ -62,142 +62,74 @@
<h1 class="lined-header"><span>cowboy_req:push(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:push - Push a resource to the client</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:push - Push a resource to the client</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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</span></span>(<span style="color: #009900">Path</span>, <span style="color: #009900">Headers</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">push</span></span>(<span style="color: #009900">Path</span>, <span style="color: #009900">Headers</span>, <span style="color: #009900">Req</span>, #{})
-
-<span style="font-weight: bold"><span style="color: #000000">push</span></span>(<span style="color: #009900">Path</span>, <span style="color: #009900">Headers</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: #FF6600">ok</span>
-
-<span style="color: #009900">Path</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>() <span style="font-style: italic"><span style="color: #9A1900">%% case sensitive</span></span>
-<span style="color: #009900">Headers</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:http_headers</span></span>()
-<span style="color: #009900">Opts</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:push_opts</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Push a resource to the client.</p></div>
-<div class="paragraph"><p>Cowboy handles push requests the same way as if they came
-from the client, including the creation of a request handling
-process, routing and middlewares and so on.</p></div>
-<div class="paragraph"><p>This function does nothing when the HTTP/1.1 protocol is
-used. You may call it safely without first checking whether
-the connection uses HTTP/2.</p></div>
-<div class="paragraph"><p>The header names must be given as lowercase binary strings.
-While header names are case insensitive, Cowboy requires them
-to be given as lowercase to function properly.</p></div>
-<div class="paragraph"><p>Note that the headers must be the headers the client is expected
-to send if it were to perform the request. They are therefore
-request headers, and not response headers.</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. You can override them by passing options.</p></div>
-<div class="paragraph"><p>It is not possible to push resources after sending a response.
-Any attempt will result in an error.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">push</font></b>(<font color="#009900">Path</font>, <font color="#009900">Headers</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> <b><font color="#000000">push</font></b>(<font color="#009900">Path</font>, <font color="#009900">Headers</font>, <font color="#009900">Req</font>, #{})
+
+<b><font color="#000000">push</font></b>(<font color="#009900">Path</font>, <font color="#009900">Headers</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>(), <font color="#009900">Opts</font>)
+ <font color="#990000">-&gt;</font> <font color="#FF6600">ok</font>
+
+<font color="#009900">Path</font> <font color="#990000">::</font> <b><font color="#000000">iodata</font></b>() <i><font color="#9A1900">%% case sensitive</font></i>
+<font color="#009900">Headers</font> <font color="#990000">::</font> <b><font color="#000000">cowboy:http_headers</font></b>()
+<font color="#009900">Opts</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:push_opts</font></b>()</tt></pre>
+</div></div>
+<p>Push a resource to the client.</p>
+<p>Cowboy handles push requests the same way as if they came from the client, including the creation of a request handling process, routing and middlewares and so on.</p>
+<p>This function does nothing when the HTTP/1.1 protocol is used. You may call it safely without first checking whether the connection uses HTTP/2.</p>
+<p>The header names must be given as lowercase binary strings. While header names are case insensitive, Cowboy requires them to be given as lowercase to function properly.</p>
+<p>Note that the headers must be the headers the client is expected to send if it were to perform the request. They are therefore request headers, and not response headers.</p>
+<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&apos;s URI. You can override them by passing options.</p>
+<p>It is not possible to push resources after sending a response. Any attempt will result in an error.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Path
-</dt>
-<dd>
-<p>
-The status code for the response.
-</p>
+<dl><dt>Path</dt>
+<dd><p>The status code for the response.</p>
</dd>
-<dt class="hdlist1">
-Headers
-</dt>
-<dd>
-<p>
-The response headers.
-</p>
+<dt>Headers</dt>
+<dd><p>The response headers.</p>
</dd>
-</dl></div>
-<div class="paragraph"><p>Header names must be given as lowercase binary strings.</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+</dl>
+<p>Header names must be given as lowercase binary strings.</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-<dt class="hdlist1">
-Opts
-</dt>
-<dd>
-<p>
-Customize the HTTP method or the URI scheme, host, port
-or query string.
-</p>
+<dt>Opts</dt>
+<dd><p>Customize the HTTP method or the URI scheme, host, port or query string.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The atom <code>ok</code> is always returned. It can be safely ignored.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The atom <code>ok</code> is always returned. It can be safely ignored.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced.
-</p>
+<ul><li><strong>2.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Push a resource</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Push a resource</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">cowboy_req:push</span></span>(<span style="color: #FF0000">"/static/style.css"</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"accept"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/css"</span><span style="color: #990000">&gt;&gt;</span>
-}, <span style="color: #009900">Req</span>),</tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Push a resource with a custom host</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">cowboy_req:push</font></b>(<font color="#FF0000">"/static/style.css"</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"accept"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/css"</font><font color="#990000">&gt;&gt;</font>
+}, <font color="#009900">Req</font>),</tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Push a resource with a custom host</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">cowboy_req:push</span></span>(<span style="color: #FF0000">"/static/style.css"</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"accept"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/css"</span><span style="color: #990000">&gt;&gt;</span>
-}, #{<span style="color: #0000FF">host</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"cdn.example.org"</span><span style="color: #990000">&gt;&gt;</span>}, <span style="color: #009900">Req</span>),</tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">cowboy_req:push</font></b>(<font color="#FF0000">"/static/style.css"</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"accept"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/css"</font><font color="#990000">&gt;&gt;</font>
+}, #{<font color="#0000FF">host</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"cdn.example.org"</font><font color="#990000">&gt;&gt;</font>}, <font color="#009900">Req</font>),</tt></pre>
+</div></div>
<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.inform">cowboy_req:inform(3)</a>,
-<a href="../cowboy_req.reply">cowboy_req:reply(3)</a>,
-<a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.inform">cowboy_req:inform(3)</a>, <a href="../cowboy_req.reply">cowboy_req:reply(3)</a>, <a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a></p>
+
diff --git a/docs/en/cowboy/2.1/manual/cowboy_req.qs/index.html b/docs/en/cowboy/2.1/manual/cowboy_req.qs/index.html
index 097df763..d8b52154 100644
--- a/docs/en/cowboy/2.1/manual/cowboy_req.qs/index.html
+++ b/docs/en/cowboy/2.1/manual/cowboy_req.qs/index.html
@@ -62,89 +62,47 @@
<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">
+<p>cowboy_req:qs - URI query string</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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
+<pre><tt><b><font color="#000000">qs</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <font color="#009900">Qs</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()</tt></pre>
+</div></div>
+<p>Return the query string of the effective request URI.</p>
+<p>The query string can also be obtained using pattern matching:</p>
+<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">
+<pre><tt>#{<font color="#FF6600">qs</font> <font color="#990000">:=</font> <font color="#009900">Qs</font>} <font color="#990000">=</font> <font color="#009900">Req</font><font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<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">
+<p>The query string is returned as a binary string. It is case sensitive.</p>
<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>
+<ul><li><strong>2.0</strong>: Only the query string is returned, it is no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<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
+<div class="listingblock"><div class="title">Get the effective request URI&apos;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">
+<pre><tt><font color="#009900">Qs</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:qs</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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>
+<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>
+
diff --git a/docs/en/cowboy/2.1/manual/cowboy_req.read_body/index.html b/docs/en/cowboy/2.1/manual/cowboy_req.read_body/index.html
index 28eec5ba..a04fa945 100644
--- a/docs/en/cowboy/2.1/manual/cowboy_req.read_body/index.html
+++ b/docs/en/cowboy/2.1/manual/cowboy_req.read_body/index.html
@@ -62,143 +62,72 @@
<h1 class="lined-header"><span>cowboy_req:read_body(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:read_body - Read the request body</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:read_body - Read the request body</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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</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">read_body</span></span>(<span style="color: #009900">Req</span>, #{})
-
-<span style="font-weight: bold"><span style="color: #000000">read_body</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: #FF6600">ok</span>, <span style="color: #009900">Data</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: #FF6600">more</span>, <span style="color: #009900">Data</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">Opts</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:read_body_opts</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Read the request body.</p></div>
-<div class="paragraph"><p>This function reads a chunk of the request body. A <code>more</code> tuple
-is returned when more data remains to be read. Call the function
-repeatedly until an <code>ok</code> tuple is returned to read the entire body.</p></div>
-<div class="paragraph"><p>An <code>ok</code> tuple with empty data is returned when the request has no body,
-or when calling this function again after the body has already
-been read. It is therefore safe to call this function directly.
-Note that the body can only be read once.</p></div>
-<div class="paragraph"><p>This function reads the request body from the connection process.
-The connection process is responsible for reading from the socket.
-The exact behavior varies depending on the protocol.</p></div>
-<div class="paragraph"><p>The options therefore are only related to the communication
-between the request process and the connection process.</p></div>
-<div class="paragraph"><p>Cowboy will automatically handle protocol details including
-the expect header, chunked transfer-encoding and others.</p></div>
-<div class="paragraph"><p>Once the body has been read fully, Cowboy sets the content-length
-header if it was not previously provided.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">read_body</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> <b><font color="#000000">read_body</font></b>(<font color="#009900">Req</font>, #{})
+
+<b><font color="#000000">read_body</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>(), <font color="#009900">Opts</font>)
+ <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <font color="#009900">Data</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">Req</font>}
+ | {<font color="#FF6600">more</font>, <font color="#009900">Data</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">Req</font>}
+
+<font color="#009900">Opts</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:read_body_opts</font></b>()</tt></pre>
+</div></div>
+<p>Read the request body.</p>
+<p>This function reads a chunk of the request body. A <code>more</code> tuple is returned when more data remains to be read. Call the function repeatedly until an <code>ok</code> tuple is returned to read the entire body.</p>
+<p>An <code>ok</code> tuple with empty data is returned when the request has no body, or when calling this function again after the body has already been read. It is therefore safe to call this function directly. Note that the body can only be read once.</p>
+<p>This function reads the request body from the connection process. The connection process is responsible for reading from the socket. The exact behavior varies depending on the protocol.</p>
+<p>The options therefore are only related to the communication between the request process and the connection process.</p>
+<p>Cowboy will automatically handle protocol details including the expect header, chunked transfer-encoding and others.</p>
+<p>Once the body has been read fully, Cowboy sets the content-length header if it was not previously provided.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-<dt class="hdlist1">
-Opts
-</dt>
-<dd>
-<p>
-A map of body reading options.
-</p>
-<div class="paragraph"><p>The <code>length</code> option can be used to request smaller or bigger
-chunks of data to be sent. It is a best effort approach, Cowboy
-may send more data than configured on occasions. It defaults
-to 8MB.</p></div>
-<div class="paragraph"><p>The <code>period</code> indicates how long the connection process will wait
-before it provides us with the data it received. It defaults
-to 15 seconds.</p></div>
-<div class="paragraph"><p>The connection process sends data to the request process when
-either the <code>length</code> of data or the <code>period</code> of time is reached.</p></div>
-<div class="paragraph"><p>The <code>timeout</code> option is a safeguard in case the connection
-process becomes unresponsive. The function will crash if no
-message was received in that interval. The timeout should be
-larger than the period. It defaults to the period + 1 second.</p></div>
+<dt>Opts</dt>
+<dd><p>A map of body reading options.</p>
+<p>The <code>length</code> option can be used to request smaller or bigger chunks of data to be sent. It is a best effort approach, Cowboy may send more data than configured on occasions. It defaults to 8MB.</p>
+<p>The <code>period</code> indicates how long the connection process will wait before it provides us with the data it received. It defaults to 15 seconds.</p>
+<p>The connection process sends data to the request process when either the <code>length</code> of data or the <code>period</code> of time is reached.</p>
+<p>The <code>timeout</code> option is a safeguard in case the connection process becomes unresponsive. The function will crash if no message was received in that interval. The timeout should be larger than the period. It defaults to the period<br/> 1 second.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A <code>more</code> tuple is returned when there are more data to be read.</p></div>
-<div class="paragraph"><p>An <code>ok</code> tuple is returned when there are no more data to be read,
-either because this is the last chunk of data, the body has already
-been read, or there was no body to begin with.</p></div>
-<div class="paragraph"><p>The data is always returned as a binary.</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.
-For example it may have an added content-length header once the
-body has been read.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>A <code>more</code> tuple is returned when there are more data to be read.</p>
+<p>An <code>ok</code> tuple is returned when there are no more data to be read, either because this is the last chunk of data, the body has already been read, or there was no body to begin with.</p>
+<p>The data is always returned as a binary.</p>
+<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. For example it may have an added content-length header once the body has been read.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced. Replaces <code>body/1,2</code>.
-</p>
+<ul><li><strong>2.0</strong>: Function introduced. Replaces <code>body/1,2</code>.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Read the entire body</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Read the entire body</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">read_body</span></span>(<span style="color: #009900">Req0</span>, <span style="color: #009900">Acc</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">cowboy_req:read_body</span></span>(<span style="color: #009900">Req0</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Data</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">-&gt;</span> {<span style="color: #FF6600">ok</span>, <span style="color: #990000">&lt;&lt;</span> <span style="color: #009900">Acc</span><span style="color: #990000">/</span><span style="font-weight: bold"><span style="color: #000080">binary</span></span>, <span style="color: #009900">Data</span><span style="color: #990000">/</span><span style="font-weight: bold"><span style="color: #000080">binary</span></span> <span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req</span>};
- {<span style="color: #FF6600">more</span>, <span style="color: #009900">Data</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">-&gt;</span> <span style="font-weight: bold"><span style="color: #000000">read_body</span></span>(<span style="color: #009900">Req</span>, <span style="color: #990000">&lt;&lt;</span> <span style="color: #009900">Acc</span><span style="color: #990000">/</span><span style="font-weight: bold"><span style="color: #000080">binary</span></span>, <span style="color: #009900">Data</span><span style="color: #990000">/</span><span style="font-weight: bold"><span style="color: #000080">binary</span></span> <span style="color: #990000">&gt;&gt;</span>)
- <span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Read the body in small chunks</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">read_body</font></b>(<font color="#009900">Req0</font>, <font color="#009900">Acc</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">case</font></b> <b><font color="#000000">cowboy_req:read_body</font></b>(<font color="#009900">Req0</font>) <b><font color="#0000FF">of</font></b>
+ {<font color="#FF6600">ok</font>, <font color="#009900">Data</font>, <font color="#009900">Req</font>} <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <font color="#990000">&lt;&lt;</font> <font color="#009900">Acc</font><font color="#990000">/</font><b><font color="#000080">binary</font></b>, <font color="#009900">Data</font><font color="#990000">/</font><b><font color="#000080">binary</font></b> <font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>};
+ {<font color="#FF6600">more</font>, <font color="#009900">Data</font>, <font color="#009900">Req</font>} <font color="#990000">-&gt;</font> <b><font color="#000000">read_body</font></b>(<font color="#009900">Req</font>, <font color="#990000">&lt;&lt;</font> <font color="#009900">Acc</font><font color="#990000">/</font><b><font color="#000080">binary</font></b>, <font color="#009900">Data</font><font color="#990000">/</font><b><font color="#000080">binary</font></b> <font color="#990000">&gt;&gt;</font>)
+ <b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Read the body in small chunks</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">cowboy_req:read_body</span></span>(<span style="color: #009900">Req</span>, #{<span style="font-weight: bold"><span style="color: #000080">length</span></span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">64000</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">cowboy_req:read_body</font></b>(<font color="#009900">Req</font>, #{<b><font color="#000080">length</font></b> <font color="#990000">=&gt;</font> <font color="#993399">64000</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
<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.has_body">cowboy_req:has_body(3)</a>,
-<a href="../cowboy_req.body_length">cowboy_req:body_length(3)</a>,
-<a href="../cowboy_req.read_urlencoded_body">cowboy_req:read_urlencoded_body(3)</a>,
-<a href="../cowboy_req.read_part">cowboy_req:read_part(3)</a>,
-<a href="../cowboy_req.read_part_body">cowboy_req:read_part_body(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.has_body">cowboy_req:has_body(3)</a>, <a href="../cowboy_req.body_length">cowboy_req:body_length(3)</a>, <a href="../cowboy_req.read_urlencoded_body">cowboy_req:read_urlencoded_body(3)</a>, <a href="../cowboy_req.read_part">cowboy_req:read_part(3)</a>, <a href="../cowboy_req.read_part_body">cowboy_req:read_part_body(3)</a></p>
+
diff --git a/docs/en/cowboy/2.1/manual/cowboy_req.read_part/index.html b/docs/en/cowboy/2.1/manual/cowboy_req.read_part/index.html
index 1c8c632d..a4afda73 100644
--- a/docs/en/cowboy/2.1/manual/cowboy_req.read_part/index.html
+++ b/docs/en/cowboy/2.1/manual/cowboy_req.read_part/index.html
@@ -62,162 +62,94 @@
<h1 class="lined-header"><span>cowboy_req:read_part(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:read_part - Read the next multipart headers</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:read_part - Read the next multipart headers</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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_part</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">read_part</span></span>(<span style="color: #009900">Req</span>, #{})
-
-<span style="font-weight: bold"><span style="color: #000000">read_part</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: #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: #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
-their own headers and body. This function parses and returns
-headers. Examples of multipart media types are
-<code>multipart/form-data</code> and <code>multipart/byteranges</code>.</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>Cowboy will read the body before parsing in chunks of size
-up to 64KB, with a period of 5 seconds. This is tailored for
-reading part headers and might not be the most efficient for
-skipping the previous part&#8217;s body.</p></div>
-<div class="paragraph"><p>The headers returned are MIME headers, <strong>NOT</strong> 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 extract information from <code>multipart/form-data</code>
-representations.</p></div>
-<div class="paragraph"><p>Once a part has been read, it can not be read again.</p></div>
-<div class="paragraph"><p>Once the body has been read, Cowboy sets the content-length
-header if it was not previously provided.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">read_part</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> <b><font color="#000000">read_part</font></b>(<font color="#009900">Req</font>, #{})
+
+<b><font color="#000000">read_part</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>(), <font color="#009900">Opts</font>)
+ <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <font color="#009900">Headers</font>, <font color="#009900">Req</font>} | {<font color="#FF6600">done</font>, <font color="#009900">Req</font>}
+
+<font color="#009900">Opts</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:read_body_opts</font></b>()
+<font color="#009900">Headers</font> <font color="#990000">::</font> #{<b><font color="#000080">binary</font></b>() <font color="#990000">=&gt;</font> <b><font color="#000080">binary</font></b>()}</tt></pre>
+</div></div>
+<p>Read the next part of a multipart body.</p>
+<p>This function reads the request body and parses it as multipart. Each parts of a multipart representation have their own headers and body. This function parses and returns headers. Examples of multipart media types are <code>multipart/form-data</code> and <code>multipart/byteranges</code>.</p>
+<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&apos;t been read. Both are skipped automatically when calling this function.</p>
+<p>Cowboy will read the body before parsing in chunks of size up to 64KB, with a period of 5 seconds. This is tailored for reading part headers and might not be the most efficient for skipping the previous part&apos;s body.</p>
+<p>The headers returned are MIME headers, <strong>NOT</strong> 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 extract information from <code>multipart/form-data</code> representations.</p>
+<!-- @todo Proper link to cow_multipart:form_data.-->
+<p>Once a part has been read, it can not be read again.</p>
+<p>Once the body has been read, Cowboy sets the content-length header if it was not previously provided.</p>
+<!-- @todo Limit the maximum size of multipart headers.-->
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-<dt class="hdlist1">
-Opts
-</dt>
-<dd>
-<p>
-A map of body reading options. Please refer to
-<a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a>
-for details about each option.
-</p>
-<div class="paragraph"><p>This function defaults the <code>length</code> to 64KB and the <code>period</code>
-to 5 seconds.</p></div>
+<dt>Opts</dt>
+<dd><p>A map of body reading options. Please refer to <a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a> for details about each option.</p>
+<p>This function defaults the <code>length</code> to 64KB and the <code>period</code> to 5 seconds.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<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 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.
-For example it may have an added content-length header once the
-body has been read.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>An <code>ok</code> tuple is returned containing the next part&apos;s headers as a map.</p>
+<p>A <code>done</code> tuple is returned if there are no more parts to read.</p>
+<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. For example it may have an added content-length header once the body has been read.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced. Replaces <code>part/1,2</code>.
-</p>
+<ul><li><strong>2.0</strong>: Function introduced. Replaces <code>part/1,2</code>.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Read all parts</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Read all parts</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">acc_multipart</span></span>(<span style="color: #009900">Req0</span>, <span style="color: #009900">Acc</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">cowboy_req:read_part</span></span>(<span style="color: #009900">Req0</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Headers</span>, <span style="color: #009900">Req1</span>} <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Body</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">stream_body</span></span>(<span style="color: #009900">Req1</span>, <span style="color: #990000">&lt;&lt;&gt;&gt;</span>),
- <span style="font-weight: bold"><span style="color: #000000">acc_multipart</span></span>(<span style="color: #009900">Req</span>, [{<span style="color: #009900">Headers</span>, <span style="color: #009900">Body</span>}|<span style="color: #009900">Acc</span>]);
- {<span style="color: #FF6600">done</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">-&gt;</span>
- {<span style="font-weight: bold"><span style="color: #000000">lists:reverse</span></span>(<span style="color: #009900">Acc</span>), <span style="color: #009900">Req</span>}
- <span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span>
-
-<span style="font-weight: bold"><span style="color: #000000">stream_body</span></span>(<span style="color: #009900">Req0</span>, <span style="color: #009900">Acc</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">cowboy_req:read_part_body</span></span>(<span style="color: #009900">Req0</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
- {<span style="color: #FF6600">more</span>, <span style="color: #009900">Data</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #000000">stream_body</span></span>(<span style="color: #009900">Req</span>, <span style="color: #990000">&lt;&lt;</span> <span style="color: #009900">Acc</span><span style="color: #990000">/</span><span style="font-weight: bold"><span style="color: #000080">binary</span></span>, <span style="color: #009900">Data</span><span style="color: #990000">/</span><span style="font-weight: bold"><span style="color: #000080">binary</span></span> <span style="color: #990000">&gt;&gt;</span>);
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Data</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #990000">&lt;&lt;</span> <span style="color: #009900">Acc</span><span style="color: #990000">/</span><span style="font-weight: bold"><span style="color: #000080">binary</span></span>, <span style="color: #009900">Data</span><span style="color: #990000">/</span><span style="font-weight: bold"><span style="color: #000080">binary</span></span> <span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req</span>}
- <span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Read all part headers, skipping bodies</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">acc_multipart</font></b>(<font color="#009900">Req0</font>, <font color="#009900">Acc</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">case</font></b> <b><font color="#000000">cowboy_req:read_part</font></b>(<font color="#009900">Req0</font>) <b><font color="#0000FF">of</font></b>
+ {<font color="#FF6600">ok</font>, <font color="#009900">Headers</font>, <font color="#009900">Req1</font>} <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <font color="#009900">Body</font>, <font color="#009900">Req</font>} <font color="#990000">=</font> <b><font color="#000000">stream_body</font></b>(<font color="#009900">Req1</font>, <font color="#990000">&lt;&lt;&gt;&gt;</font>),
+ <b><font color="#000000">acc_multipart</font></b>(<font color="#009900">Req</font>, [{<font color="#009900">Headers</font>, <font color="#009900">Body</font>}|<font color="#009900">Acc</font>]);
+ {<font color="#FF6600">done</font>, <font color="#009900">Req</font>} <font color="#990000">-&gt;</font>
+ {<b><font color="#000000">lists:reverse</font></b>(<font color="#009900">Acc</font>), <font color="#009900">Req</font>}
+ <b><font color="#0000FF">end</font></b><font color="#990000">.</font>
+
+<b><font color="#000000">stream_body</font></b>(<font color="#009900">Req0</font>, <font color="#009900">Acc</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">case</font></b> <b><font color="#000000">cowboy_req:read_part_body</font></b>(<font color="#009900">Req0</font>) <b><font color="#0000FF">of</font></b>
+ {<font color="#FF6600">more</font>, <font color="#009900">Data</font>, <font color="#009900">Req</font>} <font color="#990000">-&gt;</font>
+ <b><font color="#000000">stream_body</font></b>(<font color="#009900">Req</font>, <font color="#990000">&lt;&lt;</font> <font color="#009900">Acc</font><font color="#990000">/</font><b><font color="#000080">binary</font></b>, <font color="#009900">Data</font><font color="#990000">/</font><b><font color="#000080">binary</font></b> <font color="#990000">&gt;&gt;</font>);
+ {<font color="#FF6600">ok</font>, <font color="#009900">Data</font>, <font color="#009900">Req</font>} <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <font color="#990000">&lt;&lt;</font> <font color="#009900">Acc</font><font color="#990000">/</font><b><font color="#000080">binary</font></b>, <font color="#009900">Data</font><font color="#990000">/</font><b><font color="#000080">binary</font></b> <font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>}
+ <b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Read all part headers, skipping bodies</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">skip_body_multipart</span></span>(<span style="color: #009900">Req0</span>, <span style="color: #009900">Acc</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">cowboy_req:read_part</span></span>(<span style="color: #009900">Req0</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Headers</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #000000">skip_body_multipart</span></span>(<span style="color: #009900">Req</span>, [<span style="color: #009900">Headers</span>|<span style="color: #009900">Acc</span>]);
- {<span style="color: #FF6600">done</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">-&gt;</span>
- {<span style="font-weight: bold"><span style="color: #000000">lists:reverse</span></span>(<span style="color: #009900">Acc</span>), <span style="color: #009900">Req</span>}
- <span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Read a part header in larger chunks</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">skip_body_multipart</font></b>(<font color="#009900">Req0</font>, <font color="#009900">Acc</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">case</font></b> <b><font color="#000000">cowboy_req:read_part</font></b>(<font color="#009900">Req0</font>) <b><font color="#0000FF">of</font></b>
+ {<font color="#FF6600">ok</font>, <font color="#009900">Headers</font>, <font color="#009900">Req</font>} <font color="#990000">-&gt;</font>
+ <b><font color="#000000">skip_body_multipart</font></b>(<font color="#009900">Req</font>, [<font color="#009900">Headers</font>|<font color="#009900">Acc</font>]);
+ {<font color="#FF6600">done</font>, <font color="#009900">Req</font>} <font color="#990000">-&gt;</font>
+ {<b><font color="#000000">lists:reverse</font></b>(<font color="#009900">Acc</font>), <font color="#009900">Req</font>}
+ <b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Read a part header in larger chunks</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: #FF6600">ok</span>, <span style="color: #009900">Headers</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:read_part</span></span>(<span style="color: #009900">Req0</span>, #{<span style="font-weight: bold"><span style="color: #000080">length</span></span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">1000000</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#009900">Headers</font>, <font color="#009900">Req</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:read_part</font></b>(<font color="#009900">Req0</font>, #{<b><font color="#000080">length</font></b> <font color="#990000">=&gt;</font> <font color="#993399">1000000</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
<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.has_body">cowboy_req:has_body(3)</a>,
-<a href="../cowboy_req.body_length">cowboy_req:body_length(3)</a>,
-<a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a>,
-<a href="../cowboy_req.read_urlencoded_body">cowboy_req:read_urlencoded_body(3)</a>,
-<a href="../cowboy_req.read_part_body">cowboy_req:read_part_body(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.has_body">cowboy_req:has_body(3)</a>, <a href="../cowboy_req.body_length">cowboy_req:body_length(3)</a>, <a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a>, <a href="../cowboy_req.read_urlencoded_body">cowboy_req:read_urlencoded_body(3)</a>, <a href="../cowboy_req.read_part_body">cowboy_req:read_part_body(3)</a></p>
+
diff --git a/docs/en/cowboy/2.1/manual/cowboy_req.read_part_body/index.html b/docs/en/cowboy/2.1/manual/cowboy_req.read_part_body/index.html
index 058903a0..c3b898a0 100644
--- a/docs/en/cowboy/2.1/manual/cowboy_req.read_part_body/index.html
+++ b/docs/en/cowboy/2.1/manual/cowboy_req.read_part_body/index.html
@@ -62,130 +62,70 @@
<h1 class="lined-header"><span>cowboy_req:read_part_body(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:read_part_body - Read the current part&#8217;s body</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:read_part_body - Read the current part&apos;s body</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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_part_body</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">read_part_body</span></span>(<span style="color: #009900">Req</span>, #{})
-
-<span style="font-weight: bold"><span style="color: #000000">read_part_body</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: #FF6600">ok</span>, <span style="color: #009900">Data</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: #FF6600">more</span>, <span style="color: #009900">Data</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">Opts</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:read_body_opts</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Read the body of the current part of the multipart message.</p></div>
-<div class="paragraph"><p>This function reads the request body and parses it as
-multipart. Each parts of a multipart representation have
-their own headers and body. This function returns the
-body of the current part. Examples of multipart media types
-are <code>multipart/form-data</code> and <code>multipart/byteranges</code>.</p></div>
-<div class="paragraph"><p>This function reads a chunk of the part&#8217;s body. A <code>more</code> tuple
-is returned when more data remains to be read. Call the function
-repeatedly until an <code>ok</code> tuple is returned to read the entire body.</p></div>
-<div class="paragraph"><p>Once a part has been read, it can not be read again.</p></div>
-<div class="paragraph"><p>Once the body has been read, Cowboy sets the content-length
-header if it was not previously provided.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">read_part_body</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> <b><font color="#000000">read_part_body</font></b>(<font color="#009900">Req</font>, #{})
+
+<b><font color="#000000">read_part_body</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>(), <font color="#009900">Opts</font>)
+ <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <font color="#009900">Data</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">Req</font>}
+ | {<font color="#FF6600">more</font>, <font color="#009900">Data</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">Req</font>}
+
+<font color="#009900">Opts</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:read_body_opts</font></b>()</tt></pre>
+</div></div>
+<p>Read the body of the current part of the multipart message.</p>
+<p>This function reads the request body and parses it as multipart. Each parts of a multipart representation have their own headers and body. This function returns the body of the current part. Examples of multipart media types are <code>multipart/form-data</code> and <code>multipart/byteranges</code>.</p>
+<p>This function reads a chunk of the part&apos;s body. A <code>more</code> tuple is returned when more data remains to be read. Call the function repeatedly until an <code>ok</code> tuple is returned to read the entire body.</p>
+<p>Once a part has been read, it can not be read again.</p>
+<p>Once the body has been read, Cowboy sets the content-length header if it was not previously provided.</p>
+<!-- @todo Limit the maximum size of multipart headers.-->
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-<dt class="hdlist1">
-Opts
-</dt>
-<dd>
-<p>
-A map of body reading options. Please refer to
-<a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a>
-for details about each option.
-</p>
-<div class="paragraph"><p>This function uses the same default options as the
-<a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a>
-function.</p></div>
+<dt>Opts</dt>
+<dd><p>A map of body reading options. Please refer to <a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a> for details about each option.</p>
+<p>This function uses the same default options as the <a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a> function.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A <code>more</code> tuple is returned when there are more data to be read.</p></div>
-<div class="paragraph"><p>An <code>ok</code> tuple is returned when there are no more data to be read.</p></div>
-<div class="paragraph"><p>The data is always returned as a binary.</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.
-For example it may have an added content-length header once the
-body has been read.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>A <code>more</code> tuple is returned when there are more data to be read.</p>
+<p>An <code>ok</code> tuple is returned when there are no more data to be read.</p>
+<p>The data is always returned as a binary.</p>
+<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. For example it may have an added content-length header once the body has been read.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced. Replaces <code>part_body/1,2</code>.
-</p>
+<ul><li><strong>2.0</strong>: Function introduced. Replaces <code>part_body/1,2</code>.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Read a full part&#8217;s body</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Read a full part&apos;s body</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">stream_body</span></span>(<span style="color: #009900">Req0</span>, <span style="color: #009900">Acc</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">cowboy_req:read_part_body</span></span>(<span style="color: #009900">Req0</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
- {<span style="color: #FF6600">more</span>, <span style="color: #009900">Data</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #000000">stream_body</span></span>(<span style="color: #009900">Req</span>, <span style="color: #990000">&lt;&lt;</span> <span style="color: #009900">Acc</span><span style="color: #990000">/</span><span style="font-weight: bold"><span style="color: #000080">binary</span></span>, <span style="color: #009900">Data</span><span style="color: #990000">/</span><span style="font-weight: bold"><span style="color: #000080">binary</span></span> <span style="color: #990000">&gt;&gt;</span>);
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Data</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #990000">&lt;&lt;</span> <span style="color: #009900">Acc</span><span style="color: #990000">/</span><span style="font-weight: bold"><span style="color: #000080">binary</span></span>, <span style="color: #009900">Data</span><span style="color: #990000">/</span><span style="font-weight: bold"><span style="color: #000080">binary</span></span> <span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req</span>}
- <span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Ensure a part&#8217;s body is smaller than 64KB</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">stream_body</font></b>(<font color="#009900">Req0</font>, <font color="#009900">Acc</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">case</font></b> <b><font color="#000000">cowboy_req:read_part_body</font></b>(<font color="#009900">Req0</font>) <b><font color="#0000FF">of</font></b>
+ {<font color="#FF6600">more</font>, <font color="#009900">Data</font>, <font color="#009900">Req</font>} <font color="#990000">-&gt;</font>
+ <b><font color="#000000">stream_body</font></b>(<font color="#009900">Req</font>, <font color="#990000">&lt;&lt;</font> <font color="#009900">Acc</font><font color="#990000">/</font><b><font color="#000080">binary</font></b>, <font color="#009900">Data</font><font color="#990000">/</font><b><font color="#000080">binary</font></b> <font color="#990000">&gt;&gt;</font>);
+ {<font color="#FF6600">ok</font>, <font color="#009900">Data</font>, <font color="#009900">Req</font>} <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <font color="#990000">&lt;&lt;</font> <font color="#009900">Acc</font><font color="#990000">/</font><b><font color="#000080">binary</font></b>, <font color="#009900">Data</font><font color="#990000">/</font><b><font color="#000080">binary</font></b> <font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>}
+ <b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Ensure a part&apos;s body is smaller than 64KB</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: #FF6600">ok</span>, <span style="color: #009900">Body</span>, <span style="color: #009900">Req</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">Req0</span>, #{<span style="font-weight: bold"><span style="color: #000080">length</span></span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">64000</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#009900">Body</font>, <font color="#009900">Req</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:read_part_body</font></b>(<font color="#009900">Req0</font>, #{<b><font color="#000080">length</font></b> <font color="#990000">=&gt;</font> <font color="#993399">64000</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
<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.has_body">cowboy_req:has_body(3)</a>,
-<a href="../cowboy_req.body_length">cowboy_req:body_length(3)</a>,
-<a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a>,
-<a href="../cowboy_req.read_urlencoded_body">cowboy_req:read_urlencoded_body(3)</a>,
-<a href="../cowboy_req.read_part">cowboy_req:read_part(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.has_body">cowboy_req:has_body(3)</a>, <a href="../cowboy_req.body_length">cowboy_req:body_length(3)</a>, <a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a>, <a href="../cowboy_req.read_urlencoded_body">cowboy_req:read_urlencoded_body(3)</a>, <a href="../cowboy_req.read_part">cowboy_req:read_part(3)</a></p>
+
diff --git a/docs/en/cowboy/2.1/manual/cowboy_req.read_urlencoded_body/index.html b/docs/en/cowboy/2.1/manual/cowboy_req.read_urlencoded_body/index.html
index 70bd0d48..19a2058f 100644
--- a/docs/en/cowboy/2.1/manual/cowboy_req.read_urlencoded_body/index.html
+++ b/docs/en/cowboy/2.1/manual/cowboy_req.read_urlencoded_body/index.html
@@ -62,126 +62,64 @@
<h1 class="lined-header"><span>cowboy_req:read_urlencoded_body(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:read_urlencoded_body - Read and parse a urlencoded request body</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:read_urlencoded_body - Read and parse a urlencoded request body</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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_urlencoded_body</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">read_urlencoded_body</span></span>(<span style="color: #009900">Req</span>, #{})
-
-<span style="font-weight: bold"><span style="color: #000000">read_urlencoded_body</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: #FF6600">ok</span>, <span style="color: #009900">Body</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">Body</span> <span style="color: #990000">::</span> [{<span style="color: #009900">Key</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="color: #009900">Value</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>() | <span style="color: #000080">true</span>}]</tt></pre></div></div>
-<div class="paragraph"><p>Read and parse a urlencoded request body.</p></div>
-<div class="paragraph"><p>This function reads the request body and parses it as
-<code>application/x-www-form-urlencoded</code>. It returns a list
-of key/values.</p></div>
-<div class="paragraph"><p>The urlencoded media type is used by Web browsers when
-submitting HTML forms using the POST method.</p></div>
-<div class="paragraph"><p>Cowboy needs to read the full body before parsing. By default
-it will read bodies of size up to 64KB. It is possible to
-provide options to read larger bodies if required.</p></div>
-<div class="paragraph"><p>Cowboy will automatically handle protocol details including
-the expect header, chunked transfer-encoding and others.</p></div>
-<div class="paragraph"><p>Once the body has been read, Cowboy sets the content-length
-header if it was not previously provided.</p></div>
-<div class="paragraph"><p>This function can only be called once. Calling it again will
-result in undefined behavior.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">read_urlencoded_body</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> <b><font color="#000000">read_urlencoded_body</font></b>(<font color="#009900">Req</font>, #{})
+
+<b><font color="#000000">read_urlencoded_body</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>(), <font color="#009900">Opts</font>)
+ <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <font color="#009900">Body</font>, <font color="#009900">Req</font>}
+
+<font color="#009900">Opts</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:read_body_opts</font></b>()
+<font color="#009900">Body</font> <font color="#990000">::</font> [{<font color="#009900">Key</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() | <font color="#000080">true</font>}]</tt></pre>
+</div></div>
+<p>Read and parse a urlencoded request body.</p>
+<p>This function reads the request body and parses it as <code>application/x-www-form-urlencoded</code>. It returns a list of key/values.</p>
+<p>The urlencoded media type is used by Web browsers when submitting HTML forms using the POST method.</p>
+<p>Cowboy needs to read the full body before parsing. By default it will read bodies of size up to 64KB. It is possible to provide options to read larger bodies if required.</p>
+<p>Cowboy will automatically handle protocol details including the expect header, chunked transfer-encoding and others.</p>
+<p>Once the body has been read, Cowboy sets the content-length header if it was not previously provided.</p>
+<p>This function can only be called once. Calling it again will result in undefined behavior.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-<dt class="hdlist1">
-Opts
-</dt>
-<dd>
-<p>
-A map of body reading options. Please refer to
-<a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a>
-for details about each option.
-</p>
-<div class="paragraph"><p>This function defaults the <code>length</code> to 64KB and the <code>period</code>
-to 5 seconds.</p></div>
+<dt>Opts</dt>
+<dd><p>A map of body reading options. Please refer to <a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a> for details about each option.</p>
+<p>This function defaults the <code>length</code> to 64KB and the <code>period</code> to 5 seconds.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>An <code>ok</code> tuple is returned containing a list of key/values found
-in the body.</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.
-For example it may have an added content-length header once the
-body has been read.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>An <code>ok</code> tuple is returned containing a list of key/values found in the body.</p>
+<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. For example it may have an added content-length header once the body has been read.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced. Replaces <code>body_qs/1,2</code>.
-</p>
+<ul><li><strong>2.0</strong>: Function introduced. Replaces <code>body_qs/1,2</code>.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Read a urlencoded body</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Read a urlencoded body</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: #FF6600">ok</span>, <span style="color: #009900">Body</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:read_urlencoded_body</span></span>(<span style="color: #009900">Req0</span>),
-{<span style="color: #990000">_</span>, <span style="color: #009900">Lang</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">lists:keyfind</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"lang"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #993399">1</span>, <span style="color: #009900">Body</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Allow large urlencoded bodies</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#009900">Body</font>, <font color="#009900">Req</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:read_urlencoded_body</font></b>(<font color="#009900">Req0</font>),
+{<font color="#990000">_</font>, <font color="#009900">Lang</font>} <font color="#990000">=</font> <b><font color="#000000">lists:keyfind</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"lang"</font><font color="#990000">&gt;&gt;</font>, <font color="#993399">1</font>, <font color="#009900">Body</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Allow large urlencoded bodies</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: #FF6600">ok</span>, <span style="color: #009900">Body</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:read_urlencoded_body</span></span>(<span style="color: #009900">Req0</span>, #{<span style="font-weight: bold"><span style="color: #000080">length</span></span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">1000000</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#009900">Body</font>, <font color="#009900">Req</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:read_urlencoded_body</font></b>(<font color="#009900">Req0</font>, #{<b><font color="#000080">length</font></b> <font color="#990000">=&gt;</font> <font color="#993399">1000000</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
<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.has_body">cowboy_req:has_body(3)</a>,
-<a href="../cowboy_req.body_length">cowboy_req:body_length(3)</a>,
-<a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a>,
-<a href="../cowboy_req.read_part">cowboy_req:read_part(3)</a>,
-<a href="../cowboy_req.read_part_body">cowboy_req:read_part_body(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.has_body">cowboy_req:has_body(3)</a>, <a href="../cowboy_req.body_length">cowboy_req:body_length(3)</a>, <a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a>, <a href="../cowboy_req.read_part">cowboy_req:read_part(3)</a>, <a href="../cowboy_req.read_part_body">cowboy_req:read_part_body(3)</a></p>
+
diff --git a/docs/en/cowboy/2.1/manual/cowboy_req.reply/index.html b/docs/en/cowboy/2.1/manual/cowboy_req.reply/index.html
index ae3ba450..f5c3f8ed 100644
--- a/docs/en/cowboy/2.1/manual/cowboy_req.reply/index.html
+++ b/docs/en/cowboy/2.1/manual/cowboy_req.reply/index.html
@@ -62,165 +62,87 @@
<h1 class="lined-header"><span>cowboy_req:reply(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:reply - Send the response</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:reply - Send the response</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">reply</span></span>(<span style="color: #009900">Status</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">reply</span></span>(<span style="color: #009900">StatusCode</span>, #{}, <span style="color: #009900">Req</span>)
-
-<span style="font-weight: bold"><span style="color: #000000">reply</span></span>(<span style="color: #009900">Status</span>, <span style="color: #009900">Headers</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">Req</span>
-
-<span style="font-weight: bold"><span style="color: #000000">reply</span></span>(<span style="color: #009900">Status</span>, <span style="color: #009900">Headers</span>, <span style="color: #009900">Body</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">Req</span>
-
-<span style="color: #009900">Status</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:http_status</span></span>()
-<span style="color: #009900">Headers</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:http_headers</span></span>()
-<span style="color: #009900">Body</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:resp_body</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Send the response.</p></div>
-<div class="paragraph"><p>The header names must be given as lowercase binary strings.
-While header names are case insensitive, Cowboy requires them
-to be given as lowercase to function properly.</p></div>
-<div class="paragraph"><p>Cowboy does not allow duplicate header names. Headers set
-by this function may overwrite those set by <code>set_resp_header/3</code>
-and <code>set_resp_headers/2</code>.</p></div>
-<div class="paragraph"><p>Use <a href="../cowboy_req.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a>
-instead of this function to set cookies.</p></div>
-<div class="paragraph"><p>The <code>reply/2,3</code> functions will send the body set previously,
-if any. The <code>reply/4</code> function always sends the given body,
-overriding any previously set.</p></div>
-<div class="paragraph"><p>You do not need to set the content-length header when
-sending a response body. Cowboy takes care of it automatically.
-You should however provide a content-type header.</p></div>
-<div class="paragraph"><p>No further data can be transmitted after this function
-returns. This includes the push mechanism. Attempting to
-send two replies, or to push resources after a reply has
-been sent, will result in an error.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">reply</font></b>(<font color="#009900">Status</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> <b><font color="#000000">reply</font></b>(<font color="#009900">StatusCode</font>, #{}, <font color="#009900">Req</font>)
+
+<b><font color="#000000">reply</font></b>(<font color="#009900">Status</font>, <font color="#009900">Headers</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> <font color="#009900">Req</font>
+
+<b><font color="#000000">reply</font></b>(<font color="#009900">Status</font>, <font color="#009900">Headers</font>, <font color="#009900">Body</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> <font color="#009900">Req</font>
+
+<font color="#009900">Status</font> <font color="#990000">::</font> <b><font color="#000000">cowboy:http_status</font></b>()
+<font color="#009900">Headers</font> <font color="#990000">::</font> <b><font color="#000000">cowboy:http_headers</font></b>()
+<font color="#009900">Body</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:resp_body</font></b>()</tt></pre>
+</div></div>
+<p>Send the response.</p>
+<p>The header names must be given as lowercase binary strings. While header names are case insensitive, Cowboy requires them to be given as lowercase to function properly.</p>
+<p>Cowboy does not allow duplicate header names. Headers set by this function may overwrite those set by <code>set_resp_header/3</code> and <code>set_resp_headers/2</code>.</p>
+<p>Use <a href="../cowboy_req.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a> instead of this function to set cookies.</p>
+<p>The <code>reply/2,3</code> functions will send the body set previously, if any. The <code>reply/4</code> function always sends the given body, overriding any previously set.</p>
+<p>You do not need to set the content-length header when sending a response body. Cowboy takes care of it automatically. You should however provide a content-type header.</p>
+<p>No further data can be transmitted after this function returns. This includes the push mechanism. Attempting to send two replies, or to push resources after a reply has been sent, will result in an error.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Status
-</dt>
-<dd>
-<p>
-The status code for the response.
-</p>
+<dl><dt>Status</dt>
+<dd><p>The status code for the response.</p>
</dd>
-<dt class="hdlist1">
-Headers
-</dt>
-<dd>
-<p>
-The response headers.
-</p>
+<dt>Headers</dt>
+<dd><p>The response headers.</p>
</dd>
-</dl></div>
-<div class="paragraph"><p>Header names must be given as lowercase binary strings.</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Body
-</dt>
-<dd>
-<p>
-The body can be either a binary value, an iolist or a
-<code>sendfile</code> tuple telling Cowboy to send the contents of
-a file.
-</p>
+</dl>
+<p>Header names must be given as lowercase binary strings.</p>
+<dl><dt>Body</dt>
+<dd><p>The body can be either a binary value, an iolist or a <code>sendfile</code> tuple telling Cowboy to send the contents of a file.</p>
</dd>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A new Req object is returned.</p></div>
-<div class="paragraph"><p>The returned Req object should be used from that point onward
-as it contains updated information about the state of the request.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>A new Req object is returned.</p>
+<p>The returned Req object should be used from that point onward as it contains updated information about the state of the request.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Only the Req is returned, it is no longer wrapped in a tuple.
-</p>
+<ul><li><strong>2.0</strong>: Only the Req is returned, it is no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Reply</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Reply</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: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:reply</span></span>(<span style="color: #993399">404</span>, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Reply with custom headers</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:reply</font></b>(<font color="#993399">404</font>, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Reply with custom 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">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">401</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"www-authenticate"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Basic realm=\"erlang.org\""</span><span style="color: #990000">&gt;&gt;</span>
-}, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Reply with custom headers and a body</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:reply</font></b>(<font color="#993399">401</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"www-authenticate"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"Basic realm=\"erlang.org\""</font><font color="#990000">&gt;&gt;</font>
+}, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Reply with custom headers and a body</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: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:reply</span></span>(<span style="color: #993399">200</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/plain"</span><span style="color: #990000">&gt;&gt;</span>
-}, <span style="color: #FF0000">"Hello world!"</span>, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:reply</font></b>(<font color="#993399">200</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/plain"</font><font color="#990000">&gt;&gt;</font>
+}, <font color="#FF0000">"Hello world!"</font>, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a>,
-<a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a>,
-<a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a>,
-<a href="../cowboy_req.set_resp_body">cowboy_req:set_resp_body(3)</a>,
-<a href="../cowboy_req.inform">cowboy_req:inform(3)</a>,
-<a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a>,
-<a href="../cowboy_req.push">cowboy_req:push(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a>, <a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a>, <a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a>, <a href="../cowboy_req.set_resp_body">cowboy_req:set_resp_body(3)</a>, <a href="../cowboy_req.inform">cowboy_req:inform(3)</a>, <a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a>, <a href="../cowboy_req.push">cowboy_req:push(3)</a></p>
+
diff --git a/docs/en/cowboy/2.1/manual/cowboy_req.resp_header/index.html b/docs/en/cowboy/2.1/manual/cowboy_req.resp_header/index.html
index 8633fcc7..53a0bb00 100644
--- a/docs/en/cowboy/2.1/manual/cowboy_req.resp_header/index.html
+++ b/docs/en/cowboy/2.1/manual/cowboy_req.resp_header/index.html
@@ -62,113 +62,58 @@
<h1 class="lined-header"><span>cowboy_req:resp_header(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:resp_header - Response header</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:resp_header - Response header</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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_header</span></span>(<span style="color: #009900">Name</span>, <span style="color: #009900">Req</span>) <span style="color: #990000">-&gt;</span> <span style="font-weight: bold"><span style="color: #000000">resp_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">resp_header</span></span>(<span style="color: #009900">Name</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">Name</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: #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">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>Return the value for the given response header.</p></div>
-<div class="paragraph"><p>The response header must have been set previously using
-<a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a> or
-<a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a>.</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>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">resp_header</font></b>(<font color="#009900">Name</font>, <font color="#009900">Req</font>) <font color="#990000">-&gt;</font> <b><font color="#000000">resp_header</font></b>(<font color="#009900">Name</font>, <font color="#009900">Req</font>, <font color="#000080">undefined</font>)
+<b><font color="#000000">resp_header</font></b>(<font color="#009900">Name</font>, <font color="#009900">Req</font>, <font color="#009900">Default</font>) <font color="#990000">-&gt;</font> <b><font color="#000080">binary</font></b>() | <font color="#009900">Default</font>
+
+<font color="#009900">Name</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% lowercase; case insensitive</font></i>
+<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()</tt></pre>
+</div></div>
+<p>Return the value for the given response header.</p>
+<p>The response header must have been set previously using <a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a> or <a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a>.</p>
+<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>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Name
-</dt>
-<dd>
-<p>
-Desired response header name as a lowercase binary string.
-</p>
+<dl><dt>Name</dt>
+<dd><p>Desired response header name as a lowercase binary string.</p>
</dd>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dt>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>
+<dt>Default</dt>
+<dd><p>Default value returned when the header is missing.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<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">
+<p>The header value is returned as a binary string. When the header is missing, the default argument is returned.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced.
-</p>
+<ul><li><strong>2.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Get the content-type response header</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Get the content-type response 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">Type</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:resp_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</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-type response header with a default value</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Type</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:resp_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Get the content-type response 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">Type</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:resp_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</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">"text/html"</span><span style="color: #990000">&gt;&gt;</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Type</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:resp_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/html"</font><font color="#990000">&gt;&gt;</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.resp_headers">cowboy_req:resp_headers(3)</a>,
-<a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a>,
-<a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.resp_headers">cowboy_req:resp_headers(3)</a>, <a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a>, <a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a></p>
+
diff --git a/docs/en/cowboy/2.1/manual/cowboy_req.resp_headers/index.html b/docs/en/cowboy/2.1/manual/cowboy_req.resp_headers/index.html
index b228ad28..d7be7452 100644
--- a/docs/en/cowboy/2.1/manual/cowboy_req.resp_headers/index.html
+++ b/docs/en/cowboy/2.1/manual/cowboy_req.resp_headers/index.html
@@ -62,79 +62,38 @@
<h1 class="lined-header"><span>cowboy_req:resp_headers(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:resp_headers - Response headers</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:resp_headers - Response headers</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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_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 response headers.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">resp_headers</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <b><font color="#000000">cowboy:http_headers</font></b>()</tt></pre>
+</div></div>
+<p>Return all response headers.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<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">
+<p>Headers are returned as a map with keys being lowercase binary strings, and values as binary strings.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced.
-</p>
+<ul><li><strong>2.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Get all response headers</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Get all response 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:resp_headers</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Headers</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:resp_headers</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.resp_header">cowboy_req:resp_header(3)</a>,
-<a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a>,
-<a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.resp_header">cowboy_req:resp_header(3)</a>, <a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a>, <a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a></p>
+
diff --git a/docs/en/cowboy/2.1/manual/cowboy_req.scheme/index.html b/docs/en/cowboy/2.1/manual/cowboy_req.scheme/index.html
index a1937174..ca4c8f1a 100644
--- a/docs/en/cowboy/2.1/manual/cowboy_req.scheme/index.html
+++ b/docs/en/cowboy/2.1/manual/cowboy_req.scheme/index.html
@@ -62,89 +62,52 @@
<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">
+<p>cowboy_req:scheme - URI scheme</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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
+<pre><tt><b><font color="#000000">scheme</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <font color="#009900">Scheme</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()</tt></pre>
+</div></div>
+<p>Return the scheme of the effective request URI.</p>
+<p>The scheme can also be obtained using pattern matching:</p>
+<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">
+<pre><tt>#{<font color="#FF6600">scheme</font> <font color="#990000">:=</font> <font color="#009900">Scheme</font>} <font color="#990000">=</font> <font color="#009900">Req</font><font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<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">
+<p>The scheme is returned as a binary. It is case insensitive.</p>
+<p>Cowboy will only set the scheme to <code>&lt;&lt;&quot;http&quot;&gt;&gt;</code> or <code>&lt;&lt;&quot;https&quot;&gt;&gt;</code>.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced.
-</p>
+<ul><li><strong>2.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<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
+<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">
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req0</font><font color="#990000">=</font>#{<font color="#FF6600">scheme</font> <font color="#990000">:=</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"http"</font><font color="#990000">&gt;&gt;</font>}, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ <font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:reply</font></b>(<font color="#993399">302</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"location"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <b><font color="#000000">cowboy_req:uri</font></b>(<font color="#009900">Req</font>, #{<font color="#0000FF">scheme</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"https"</font><font color="#990000">&gt;&gt;</font>})
+ }, <font color="#009900">Req0</font>),
+ {<font color="#FF6600">ok</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>};
+<b><font color="#000000">init</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">cowboy_rest</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
<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>
+<p><a href="../cowboy_req">cowboy_req(3)</a></p>
+
diff --git a/docs/en/cowboy/2.1/manual/cowboy_req.set_resp_body/index.html b/docs/en/cowboy/2.1/manual/cowboy_req.set_resp_body/index.html
index 537bdd40..c2fc5186 100644
--- a/docs/en/cowboy/2.1/manual/cowboy_req.set_resp_body/index.html
+++ b/docs/en/cowboy/2.1/manual/cowboy_req.set_resp_body/index.html
@@ -62,138 +62,79 @@
<h1 class="lined-header"><span>cowboy_req:set_resp_body(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:set_resp_body - Set the response body</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:set_resp_body - Set the response body</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">set_resp_body</span></span>(<span style="color: #009900">Body</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">Req</span>
-
-<span style="color: #009900">Body</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:resp_body</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Set the response body.</p></div>
-<div class="paragraph"><p>The response body will be sent when a reply is initiated.
-Note that the functions <code>stream_reply/2,3</code> and <code>reply/4</code>
-will override the body set by this function.</p></div>
-<div class="paragraph"><p>This function can also be used to remove a response body
-that was set previously. To do so, simply call this function
-with an empty body.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">set_resp_body</font></b>(<font color="#009900">Body</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> <font color="#009900">Req</font>
+
+<font color="#009900">Body</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:resp_body</font></b>()</tt></pre>
+</div></div>
+<p>Set the response body.</p>
+<p>The response body will be sent when a reply is initiated. Note that the functions <code>stream_reply/2,3</code> and <code>reply/4</code> will override the body set by this function.</p>
+<p>This function can also be used to remove a response body that was set previously. To do so, simply call this function with an empty body.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Body
-</dt>
-<dd>
-<p>
-The body can be either a binary value, an iolist or a
-<code>sendfile</code> tuple telling Cowboy to send the contents of
-a file.
-</p>
+<dl><dt>Body</dt>
+<dd><p>The body can be either a binary value, an iolist or a <code>sendfile</code> tuple telling Cowboy to send the contents of a file.</p>
</dd>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A new Req object is returned.</p></div>
-<div class="paragraph"><p>The returned Req object must be used from that point onward,
-otherwise the body will not be sent in the response.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>A new Req object is returned.</p>
+<p>The returned Req object must be used from that point onward, otherwise the body will not be sent in the response.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: The function now accepts a <code>sendfile</code> tuple.
-</p>
+<ul><li><strong>2.0</strong>: The function now accepts a <code>sendfile</code> tuple.
</li>
-<li>
-<p>
-<strong>2.0</strong>: The <code>set_resp_body_fun/2,3</code> functions were removed.
-</p>
+<li><strong>2.0</strong>: The <code>set_resp_body_fun/2,3</code> functions were removed.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Set the response body</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Set the response body</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: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_body</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Hello world!"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Set the response body as an iolist</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_body</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"Hello world!"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Set the response body as an iolist</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: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_body</span></span>([
- <span style="color: #FF0000">"&lt;html&gt;&lt;head&gt;&lt;title&gt;"</span>,
- <span style="font-weight: bold"><span style="color: #000000">page_title</span></span>(),
- <span style="color: #FF0000">"&lt;/title&gt;&lt;/head&gt;&lt;body&gt;"</span>,
- <span style="font-weight: bold"><span style="color: #000000">page_body</span></span>(),
- <span style="color: #FF0000">"&lt;/body&gt;&lt;/html&gt;"</span>
-], <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Tell Cowboy to send data from a file</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_body</font></b>([
+ <font color="#FF0000">"&lt;html&gt;&lt;head&gt;&lt;title&gt;"</font>,
+ <b><font color="#000000">page_title</font></b>(),
+ <font color="#FF0000">"&lt;/title&gt;&lt;/head&gt;&lt;body&gt;"</font>,
+ <b><font color="#000000">page_body</font></b>(),
+ <font color="#FF0000">"&lt;/body&gt;&lt;/html&gt;"</font>
+], <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Tell Cowboy to send data from a file</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: #FF6600">ok</span>, <span style="color: #008080">#file_info</span>{<span style="font-weight: bold"><span style="color: #000080">size</span></span><span style="color: #990000">=</span><span style="color: #009900">Size</span>}} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">file:read_file_info</span></span>(<span style="color: #009900">Filename</span>),
-<span style="color: #009900">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_body</span></span>({<span style="color: #FF6600">sendfile</span>, <span style="color: #993399">0</span>, <span style="color: #009900">Size</span>, <span style="color: #009900">Filename</span>}, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Clear any previously set response body</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#008080">#file_info</font>{<b><font color="#000080">size</font></b><font color="#990000">=</font><font color="#009900">Size</font>}} <font color="#990000">=</font> <b><font color="#000000">file:read_file_info</font></b>(<font color="#009900">Filename</font>),
+<font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_body</font></b>({<font color="#FF6600">sendfile</font>, <font color="#993399">0</font>, <font color="#009900">Size</font>, <font color="#009900">Filename</font>}, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Clear any previously set response body</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: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_body</span></span>(<span style="color: #990000">&lt;&lt;&gt;&gt;</span>, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_body</font></b>(<font color="#990000">&lt;&lt;&gt;&gt;</font>, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.set_resp_header">cowboy_req:set_resp_header(3)</a>,
-<a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a>,
-<a href="../cowboy_req.reply">cowboy_req:reply(3)</a>,
-<a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a>, <a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a>, <a href="../cowboy_req.reply">cowboy_req:reply(3)</a>, <a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a></p>
+
diff --git a/docs/en/cowboy/2.1/manual/cowboy_req.set_resp_cookie/index.html b/docs/en/cowboy/2.1/manual/cowboy_req.set_resp_cookie/index.html
index d251b22c..d816604c 100644
--- a/docs/en/cowboy/2.1/manual/cowboy_req.set_resp_cookie/index.html
+++ b/docs/en/cowboy/2.1/manual/cowboy_req.set_resp_cookie/index.html
@@ -62,167 +62,104 @@
<h1 class="lined-header"><span>cowboy_req:set_resp_cookie(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:set_resp_cookie - Set a cookie</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:set_resp_cookie - Set a cookie</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">set_resp_cookie</span></span>(<span style="color: #009900">Name</span>, <span style="color: #009900">Value</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">set_resp_cookie</span></span>(<span style="color: #009900">Name</span>, <span style="color: #009900">Value</span>, [], <span style="color: #009900">Req</span>)
-
-<span style="font-weight: bold"><span style="color: #000000">set_resp_cookie</span></span>(<span style="color: #009900">Name</span>, <span style="color: #009900">Value</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">Req</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="font-style: italic"><span style="color: #9A1900">%% case sensitive</span></span>
-<span style="color: #009900">Value</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>() <span style="font-style: italic"><span style="color: #9A1900">%% case sensitive</span></span>
-<span style="color: #009900">Opts</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cow_cookie:cookie_opts</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Set a cookie to be sent with the response.</p></div>
-<div class="paragraph"><p>Note that cookie names are case sensitive.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">set_resp_cookie</font></b>(<font color="#009900">Name</font>, <font color="#009900">Value</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> <b><font color="#000000">set_resp_cookie</font></b>(<font color="#009900">Name</font>, <font color="#009900">Value</font>, [], <font color="#009900">Req</font>)
+
+<b><font color="#000000">set_resp_cookie</font></b>(<font color="#009900">Name</font>, <font color="#009900">Value</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>(), <font color="#009900">Opts</font>)
+ <font color="#990000">-&gt;</font> <font color="#009900">Req</font>
+
+<font color="#009900">Name</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case sensitive</font></i>
+<font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000000">iodata</font></b>() <i><font color="#9A1900">%% case sensitive</font></i>
+<font color="#009900">Opts</font> <font color="#990000">::</font> <b><font color="#000000">cow_cookie:cookie_opts</font></b>()</tt></pre>
+</div></div>
+<p>Set a cookie to be sent with the response.</p>
+<p>Note that cookie names are case sensitive.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Name
-</dt>
-<dd>
-<p>
-Cookie name.
-</p>
+<dl><dt>Name</dt>
+<dd><p>Cookie name.</p>
</dd>
-<dt class="hdlist1">
-Value
-</dt>
-<dd>
-<p>
-Cookie value.
-</p>
+<dt>Value</dt>
+<dd><p>Cookie value.</p>
</dd>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-<dt class="hdlist1">
-Opts
-</dt>
-<dd>
-<p>
-Cookie options.
-</p>
+<dt>Opts</dt>
+<dd><p>Cookie options.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A new Req object is returned.</p></div>
-<div class="paragraph"><p>The returned Req object must be used from that point onward,
-otherwise the cookie will not be sent in the response.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>A new Req object is returned.</p>
+<p>The returned Req object must be used from that point onward, otherwise the cookie will not be sent in the response.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: <code>set_resp_cookie/3</code> introduced as an alias to <code>set_resp_cookie/4</code> with no options.
-</p>
+<ul><li><strong>2.0</strong>: <code>set_resp_cookie/3</code> introduced as an alias to <code>set_resp_cookie/4</code> with no options.
</li>
-<li>
-<p>
-<strong>2.0</strong>: The first argument type is now <code>binary()</code> instead of <code>iodata()</code>.
-</p>
+<li><strong>2.0</strong>: The first argument type is now <code>binary()</code> instead of <code>iodata()</code>.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Set a session cookie</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Set a session cookie</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">SessionID</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">base64:encode</span></span>(<span style="font-weight: bold"><span style="color: #000000">crypto:strong_rand_bytes</span></span>(<span style="color: #993399">32</span>)),
-<span style="color: #009900">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_cookie</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"sessionid"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">SessionID</span>, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Set a cookie with an expiration time</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">SessionID</font> <font color="#990000">=</font> <b><font color="#000000">base64:encode</font></b>(<b><font color="#000000">crypto:strong_rand_bytes</font></b>(<font color="#993399">32</font>)),
+<font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_cookie</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"sessionid"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">SessionID</font>, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Set a cookie with an expiration time</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: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_cookie</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"lang"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"fr-FR"</span><span style="color: #990000">&gt;&gt;</span>,
- <span style="color: #009900">Req0</span>, #{<span style="color: #0000FF">max_age</span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">3600</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Delete a cookie</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_cookie</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"lang"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"fr-FR"</font><font color="#990000">&gt;&gt;</font>,
+ <font color="#009900">Req0</font>, #{<font color="#0000FF">max_age</font> <font color="#990000">=&gt;</font> <font color="#993399">3600</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Delete a cookie</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: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_cookie</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"sessionid"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;&gt;&gt;</span>,
- <span style="color: #009900">Req0</span>, #{<span style="color: #0000FF">max_age</span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">0</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Set a cookie for a specific domain and path</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_cookie</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"sessionid"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;&gt;&gt;</font>,
+ <font color="#009900">Req0</font>, #{<font color="#0000FF">max_age</font> <font color="#990000">=&gt;</font> <font color="#993399">0</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Set a cookie for a specific domain and 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">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_cookie</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"inaccount"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"1"</span><span style="color: #990000">&gt;&gt;</span>,
- <span style="color: #009900">Req0</span>, #{<span style="color: #0000FF">domain</span> <span style="color: #990000">=&gt;</span> <span style="color: #FF0000">"my.example.org"</span>, <span style="color: #0000FF">path</span> <span style="color: #990000">=&gt;</span> <span style="color: #FF0000">"/account"</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Restrict a cookie to HTTPS</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_cookie</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"inaccount"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"1"</font><font color="#990000">&gt;&gt;</font>,
+ <font color="#009900">Req0</font>, #{<font color="#0000FF">domain</font> <font color="#990000">=&gt;</font> <font color="#FF0000">"my.example.org"</font>, <font color="#0000FF">path</font> <font color="#990000">=&gt;</font> <font color="#FF0000">"/account"</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Restrict a cookie 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="color: #009900">SessionID</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">base64:encode</span></span>(<span style="font-weight: bold"><span style="color: #000000">crypto:strong_rand_bytes</span></span>(<span style="color: #993399">32</span>)),
-<span style="color: #009900">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_cookie</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"sessionid"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">SessionID</span>,
- <span style="color: #009900">Req0</span>, #{<span style="color: #0000FF">secure</span> <span style="color: #990000">=&gt;</span> <span style="color: #000080">true</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Restrict a cookie to HTTP</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">SessionID</font> <font color="#990000">=</font> <b><font color="#000000">base64:encode</font></b>(<b><font color="#000000">crypto:strong_rand_bytes</font></b>(<font color="#993399">32</font>)),
+<font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_cookie</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"sessionid"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">SessionID</font>,
+ <font color="#009900">Req0</font>, #{<font color="#0000FF">secure</font> <font color="#990000">=&gt;</font> <font color="#000080">true</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Restrict a cookie to HTTP</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">SessionID</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">base64:encode</span></span>(<span style="font-weight: bold"><span style="color: #000000">crypto:strong_rand_bytes</span></span>(<span style="color: #993399">32</span>)),
-<span style="color: #009900">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_cookie</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"sessionid"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">SessionID</span>,
- <span style="color: #009900">Req0</span>, #{<span style="color: #0000FF">http_only</span> <span style="color: #990000">=&gt;</span> <span style="color: #000080">true</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">SessionID</font> <font color="#990000">=</font> <b><font color="#000000">base64:encode</font></b>(<b><font color="#000000">crypto:strong_rand_bytes</font></b>(<font color="#993399">32</font>)),
+<font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_cookie</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"sessionid"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">SessionID</font>,
+ <font color="#009900">Req0</font>, #{<font color="#0000FF">http_only</font> <font color="#990000">=&gt;</font> <font color="#000080">true</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
<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.set_resp_header">cowboy_req:set_resp_header(3)</a>,
-<a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a>,
-<a href="../cowboy_req.reply">cowboy_req:reply(3)</a>,
-<a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a>, <a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a>, <a href="../cowboy_req.reply">cowboy_req:reply(3)</a>, <a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a></p>
+
diff --git a/docs/en/cowboy/2.1/manual/cowboy_req.set_resp_header/index.html b/docs/en/cowboy/2.1/manual/cowboy_req.set_resp_header/index.html
index ee6fcf2c..57e6e8d7 100644
--- a/docs/en/cowboy/2.1/manual/cowboy_req.set_resp_header/index.html
+++ b/docs/en/cowboy/2.1/manual/cowboy_req.set_resp_header/index.html
@@ -62,121 +62,60 @@
<h1 class="lined-header"><span>cowboy_req:set_resp_header(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:set_resp_header - Set a response header</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:set_resp_header - Set a response header</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">set_resp_header</span></span>(<span style="color: #009900">Name</span>, <span style="color: #009900">Value</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">Req</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="font-style: italic"><span style="color: #9A1900">%% lowercase; case insensitive</span></span>
-<span style="color: #009900">Value</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>() <span style="font-style: italic"><span style="color: #9A1900">%% case depends on header</span></span></tt></pre></div></div>
-<div class="paragraph"><p>Set a header to be sent with the response.</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>Cowboy does not allow duplicate header names. Headers set
-by this function may be overwritten by those set from the
-reply functions.</p></div>
-<div class="paragraph"><p>Use <a href="../cowboy_req.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a>
-instead of this function to set cookies.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">set_resp_header</font></b>(<font color="#009900">Name</font>, <font color="#009900">Value</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> <font color="#009900">Req</font>
+
+<font color="#009900">Name</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% lowercase; case insensitive</font></i>
+<font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000000">iodata</font></b>() <i><font color="#9A1900">%% case depends on header</font></i></tt></pre>
+</div></div>
+<p>Set a header to be sent with the response.</p>
+<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>
+<p>Cowboy does not allow duplicate header names. Headers set by this function may be overwritten by those set from the reply functions.</p>
+<p>Use <a href="../cowboy_req.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a> instead of this function to set cookies.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Name
-</dt>
-<dd>
-<p>
-Header name as a lowercase binary string.
-</p>
+<dl><dt>Name</dt>
+<dd><p>Header name as a lowercase binary string.</p>
</dd>
-<dt class="hdlist1">
-Value
-</dt>
-<dd>
-<p>
-Header value.
-</p>
+<dt>Value</dt>
+<dd><p>Header value.</p>
</dd>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A new Req object is returned.</p></div>
-<div class="paragraph"><p>The returned Req object must be used from that point onward,
-otherwise the header will not be sent in the response.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>A new Req object is returned.</p>
+<p>The returned Req object must be used from that point onward, otherwise the header will not be sent in the response.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<ul><li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Set a header in the response</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Set a header in the response</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: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"allow"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #FF0000">"GET"</span>, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Construct a header using iolists</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"allow"</font><font color="#990000">&gt;&gt;</font>, <font color="#FF0000">"GET"</font>, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Construct a header using iolists</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: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"allow"</span><span style="color: #990000">&gt;&gt;</span>,
- [<span style="font-weight: bold"><span style="color: #000000">allowed_methods</span></span>(), <span style="color: #FF0000">", OPTIONS"</span>], <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"allow"</font><font color="#990000">&gt;&gt;</font>,
+ [<b><font color="#000000">allowed_methods</font></b>(), <font color="#FF0000">", OPTIONS"</font>], <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a>,
-<a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a>,
-<a href="../cowboy_req.has_resp_header">cowboy_req:has_resp_header(3)</a>,
-<a href="../cowboy_req.resp_header">cowboy_req:resp_header(3)</a>,
-<a href="../cowboy_req.resp_headers">cowboy_req:resp_headers(3)</a>,
-<a href="../cowboy_req.delete_resp_header">cowboy_req:delete_resp_header(3)</a>,
-<a href="../cowboy_req.reply">cowboy_req:reply(3)</a>,
-<a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a>, <a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a>, <a href="../cowboy_req.has_resp_header">cowboy_req:has_resp_header(3)</a>, <a href="../cowboy_req.resp_header">cowboy_req:resp_header(3)</a>, <a href="../cowboy_req.resp_headers">cowboy_req:resp_headers(3)</a>, <a href="../cowboy_req.delete_resp_header">cowboy_req:delete_resp_header(3)</a>, <a href="../cowboy_req.reply">cowboy_req:reply(3)</a>, <a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a></p>
+
diff --git a/docs/en/cowboy/2.1/manual/cowboy_req.set_resp_headers/index.html b/docs/en/cowboy/2.1/manual/cowboy_req.set_resp_headers/index.html
index 8b73363d..5545ea15 100644
--- a/docs/en/cowboy/2.1/manual/cowboy_req.set_resp_headers/index.html
+++ b/docs/en/cowboy/2.1/manual/cowboy_req.set_resp_headers/index.html
@@ -62,109 +62,51 @@
<h1 class="lined-header"><span>cowboy_req:set_resp_headers(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:set_resp_headers - Set several response headers</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:set_resp_headers - Set several response headers</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">set_resp_headers</span></span>(<span style="color: #009900">Headers</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">Req</span>
-
-<span style="color: #009900">Headers</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:http_headers</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Set several headers to be sent with the response.</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>Cowboy does not allow duplicate header names. Headers set
-by this function may be overwritten by those set from the
-reply functions. Likewise, headers set by this function may
-overwrite headers that were set previously.</p></div>
-<div class="paragraph"><p>Use <a href="../cowboy_req.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a>
-instead of this function to set cookies.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">set_resp_headers</font></b>(<font color="#009900">Headers</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> <font color="#009900">Req</font>
+
+<font color="#009900">Headers</font> <font color="#990000">::</font> <b><font color="#000000">cowboy:http_headers</font></b>()</tt></pre>
+</div></div>
+<p>Set several headers to be sent with the response.</p>
+<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>
+<p>Cowboy does not allow duplicate header names. Headers set by this function may be overwritten by those set from the reply functions. Likewise, headers set by this function may overwrite headers that were set previously.</p>
+<p>Use <a href="../cowboy_req.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a> instead of this function to set cookies.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Headers
-</dt>
-<dd>
-<p>
-Headers as a map with keys being lowercase binary strings,
-and values as binary strings.
-</p>
+<dl><dt>Headers</dt>
+<dd><p>Headers as a map with keys being lowercase binary strings, and values as binary strings.</p>
</dd>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A new Req object is returned.</p></div>
-<div class="paragraph"><p>The returned Req object must be used from that point onward,
-otherwise the headers will not be sent in the response.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>A new Req object is returned.</p>
+<p>The returned Req object must be used from that point onward, otherwise the headers will not be sent in the response.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced.
-</p>
+<ul><li><strong>2.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Set several response headers</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Set several response 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">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_headers</span></span>(#{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/html"</span><span style="color: #990000">&gt;&gt;</span>,
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-encoding"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"gzip"</span><span style="color: #990000">&gt;&gt;</span>
-}, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_headers</font></b>(#{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/html"</font><font color="#990000">&gt;&gt;</font>,
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-encoding"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"gzip"</font><font color="#990000">&gt;&gt;</font>
+}, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a>,
-<a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a>,
-<a href="../cowboy_req.has_resp_header">cowboy_req:has_resp_header(3)</a>,
-<a href="../cowboy_req.resp_header">cowboy_req:resp_header(3)</a>,
-<a href="../cowboy_req.resp_headers">cowboy_req:resp_headers(3)</a>,
-<a href="../cowboy_req.delete_resp_header">cowboy_req:delete_resp_header(3)</a>,
-<a href="../cowboy_req.reply">cowboy_req:reply(3)</a>,
-<a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a>, <a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a>, <a href="../cowboy_req.has_resp_header">cowboy_req:has_resp_header(3)</a>, <a href="../cowboy_req.resp_header">cowboy_req:resp_header(3)</a>, <a href="../cowboy_req.resp_headers">cowboy_req:resp_headers(3)</a>, <a href="../cowboy_req.delete_resp_header">cowboy_req:delete_resp_header(3)</a>, <a href="../cowboy_req.reply">cowboy_req:reply(3)</a>, <a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a></p>
+
diff --git a/docs/en/cowboy/2.1/manual/cowboy_req.sock/index.html b/docs/en/cowboy/2.1/manual/cowboy_req.sock/index.html
index 7395c134..3281d9b6 100644
--- a/docs/en/cowboy/2.1/manual/cowboy_req.sock/index.html
+++ b/docs/en/cowboy/2.1/manual/cowboy_req.sock/index.html
@@ -62,86 +62,47 @@
<h1 class="lined-header"><span>cowboy_req:sock(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:sock - Socket address and port</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:sock - Socket address and port</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">sock</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">Info</span>
+<pre><tt><b><font color="#000000">sock</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <font color="#009900">Info</font>
-<span style="color: #009900">Info</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 socket&#8217;s IP address and port number.</p></div>
-<div class="paragraph"><p>The socket information can also be obtained using pattern matching:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<font color="#009900">Info</font> <font color="#990000">::</font> {<b><font color="#000000">inet:ip_address</font></b>(), <b><font color="#000000">inet:port_number</font></b>()}</tt></pre>
+</div></div>
+<p>Return the socket&apos;s IP address and port number.</p>
+<p>The socket information can also be obtained using pattern matching:</p>
+<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">sock</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">
+<pre><tt>#{<font color="#FF6600">sock</font> <font color="#990000">:=</font> {<font color="#009900">IP</font>, <font color="#009900">Port</font>}} <font color="#990000">=</font> <font color="#009900">Req</font><font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The socket&#8217;s local IP address and port number.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The socket&apos;s local IP address and port number.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.1</strong>: Function introduced.
-</p>
+<ul><li><strong>2.1</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Get the socket&#8217;s IP address and port number.</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Get the socket&apos;s 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:sock</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#009900">IP</font>, <font color="#009900">Port</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:sock</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.peer">cowboy_req:peer(3)</a>,
-<a href="../cowboy_req.cert">cowboy_req:cert(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.peer">cowboy_req:peer(3)</a>, <a href="../cowboy_req.cert">cowboy_req:cert(3)</a></p>
+
diff --git a/docs/en/cowboy/2.1/manual/cowboy_req.stream_body/index.html b/docs/en/cowboy/2.1/manual/cowboy_req.stream_body/index.html
index f1f341f8..9b35540b 100644
--- a/docs/en/cowboy/2.1/manual/cowboy_req.stream_body/index.html
+++ b/docs/en/cowboy/2.1/manual/cowboy_req.stream_body/index.html
@@ -62,116 +62,56 @@
<h1 class="lined-header"><span>cowboy_req:stream_body(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:stream_body - Stream the response body</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:stream_body - Stream the response body</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">stream_body</span></span>(<span style="color: #009900">Data</span>, <span style="color: #009900">IsFin</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: #FF6600">ok</span>
-
-<span style="color: #009900">Data</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>()
-<span style="color: #009900">IsFin</span> <span style="color: #990000">::</span> <span style="color: #FF6600">fin</span> | <span style="color: #FF6600">nofin</span></tt></pre></div></div>
-<div class="paragraph"><p>Stream the response body.</p></div>
-<div class="paragraph"><p>This function may be called as many times as needed after
-initiating a response using the
-<a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a>
-function.</p></div>
-<div class="paragraph"><p>The second argument indicates if this call is the final
-call. Use the <code>nofin</code> value until you know no more data
-will be sent. The final call should use <code>fin</code> (possibly
-with an empty data value).</p></div>
-<div class="paragraph"><p>Note that not using <code>fin</code> for the final call is not an
-error; Cowboy will take care of it when the request
-handler terminates if needed. Depending on the resource
-it may however be more efficient to do it as early as
-possible.</p></div>
-<div class="paragraph"><p>You do not need to handle HEAD requests specifically as
-Cowboy will ensure no data is sent when you call this function.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">stream_body</font></b>(<font color="#009900">Data</font>, <font color="#009900">IsFin</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <font color="#FF6600">ok</font>
+
+<font color="#009900">Data</font> <font color="#990000">::</font> <b><font color="#000000">iodata</font></b>()
+<font color="#009900">IsFin</font> <font color="#990000">::</font> <font color="#FF6600">fin</font> | <font color="#FF6600">nofin</font></tt></pre>
+</div></div>
+<p>Stream the response body.</p>
+<p>This function may be called as many times as needed after initiating a response using the <a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a> function.</p>
+<p>The second argument indicates if this call is the final call. Use the <code>nofin</code> value until you know no more data will be sent. The final call should use <code>fin</code> (possibly with an empty data value).</p>
+<p>Note that not using <code>fin</code> for the final call is not an error; Cowboy will take care of it when the request handler terminates if needed. Depending on the resource it may however be more efficient to do it as early as possible.</p>
+<p>You do not need to handle HEAD requests specifically as Cowboy will ensure no data is sent when you call this function.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Data
-</dt>
-<dd>
-<p>
-The data to be sent.
-</p>
+<dl><dt>Data</dt>
+<dd><p>The data to be sent.</p>
</dd>
-<dt class="hdlist1">
-IsFin
-</dt>
-<dd>
-<p>
-A flag indicating whether this is the final piece of data
-to be sent.
-</p>
+<dt>IsFin</dt>
+<dd><p>A flag indicating whether this is the final piece of data to be sent.</p>
</dd>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The atom <code>ok</code> is always returned. It can be safely ignored.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The atom <code>ok</code> is always returned. It can be safely ignored.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced. Replaces <code>chunk/2</code>.
-</p>
+<ul><li><strong>2.0</strong>: Function introduced. Replaces <code>chunk/2</code>.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Stream the response body</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Stream the response body</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: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_reply</span></span>(<span style="color: #993399">200</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/plain"</span><span style="color: #990000">&gt;&gt;</span>
-}, <span style="color: #009900">Req0</span>),
-<span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_body</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Hello\n"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #FF6600">nofin</span>, <span style="color: #009900">Req</span>),
-<span style="font-weight: bold"><span style="color: #000000">timer:sleep</span></span>(<span style="color: #993399">1000</span>),
-<span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_body</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"World!\n"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #FF6600">fin</span>, <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:stream_reply</font></b>(<font color="#993399">200</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/plain"</font><font color="#990000">&gt;&gt;</font>
+}, <font color="#009900">Req0</font>),
+<b><font color="#000000">cowboy_req:stream_body</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"Hello\n"</font><font color="#990000">&gt;&gt;</font>, <font color="#FF6600">nofin</font>, <font color="#009900">Req</font>),
+<b><font color="#000000">timer:sleep</font></b>(<font color="#993399">1000</font>),
+<b><font color="#000000">cowboy_req:stream_body</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"World!\n"</font><font color="#990000">&gt;&gt;</font>, <font color="#FF6600">fin</font>, <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.stream_reply">cowboy_req:stream_reply(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a></p>
+
diff --git a/docs/en/cowboy/2.1/manual/cowboy_req.stream_reply/index.html b/docs/en/cowboy/2.1/manual/cowboy_req.stream_reply/index.html
index 1f4accbd..53d5066c 100644
--- a/docs/en/cowboy/2.1/manual/cowboy_req.stream_reply/index.html
+++ b/docs/en/cowboy/2.1/manual/cowboy_req.stream_reply/index.html
@@ -62,149 +62,76 @@
<h1 class="lined-header"><span>cowboy_req:stream_reply(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:stream_reply - Send the response headers</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:stream_reply - Send the response headers</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">stream_reply</span></span>(<span style="color: #009900">Status</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">stream_reply</span></span>(<span style="color: #009900">StatusCode</span>, #{}, <span style="color: #009900">Req</span>)
-
-<span style="font-weight: bold"><span style="color: #000000">stream_reply</span></span>(<span style="color: #009900">Status</span>, <span style="color: #009900">Headers</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">Req</span>
-
-<span style="color: #009900">Status</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:http_status</span></span>()
-<span style="color: #009900">Headers</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:http_headers</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Send the response headers.</p></div>
-<div class="paragraph"><p>The header names must be given as lowercase binary strings.
-While header names are case insensitive, Cowboy requires them
-to be given as lowercase to function properly.</p></div>
-<div class="paragraph"><p>Cowboy does not allow duplicate header names. Headers set
-by this function may overwrite those set by <code>set_resp_header/3</code>.</p></div>
-<div class="paragraph"><p>Use <a href="../cowboy_req.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a>
-instead of this function to set cookies.</p></div>
-<div class="paragraph"><p>If a response body was set before calling this function,
-it will not be sent.</p></div>
-<div class="paragraph"><p>Use <a href="../cowboy_req.stream_body">cowboy_req:stream_body(3)</a>
-to stream the response body.</p></div>
-<div class="paragraph"><p>You may want to set the content-length header when using
-this function, if it is known in advance. This will allow
-clients using HTTP/2 and HTTP/1.0 to process the response
-more efficiently.</p></div>
-<div class="paragraph"><p>The streaming method varies depending on the protocol being
-used. HTTP/2 will use the usual DATA frames. HTTP/1.1 will
-use chunked transfer-encoding. HTTP/1.0 will send the body
-unmodified and close the connection at the end if no
-content-length was set.</p></div>
-<div class="paragraph"><p>It is not possible to push resources after this function
-returns. Any attempt will result in an error.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">stream_reply</font></b>(<font color="#009900">Status</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> <b><font color="#000000">stream_reply</font></b>(<font color="#009900">StatusCode</font>, #{}, <font color="#009900">Req</font>)
+
+<b><font color="#000000">stream_reply</font></b>(<font color="#009900">Status</font>, <font color="#009900">Headers</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> <font color="#009900">Req</font>
+
+<font color="#009900">Status</font> <font color="#990000">::</font> <b><font color="#000000">cowboy:http_status</font></b>()
+<font color="#009900">Headers</font> <font color="#990000">::</font> <b><font color="#000000">cowboy:http_headers</font></b>()</tt></pre>
+</div></div>
+<p>Send the response headers.</p>
+<p>The header names must be given as lowercase binary strings. While header names are case insensitive, Cowboy requires them to be given as lowercase to function properly.</p>
+<p>Cowboy does not allow duplicate header names. Headers set by this function may overwrite those set by <code>set_resp_header/3</code>.</p>
+<p>Use <a href="../cowboy_req.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a> instead of this function to set cookies.</p>
+<p>If a response body was set before calling this function, it will not be sent.</p>
+<p>Use <a href="../cowboy_req.stream_body">cowboy_req:stream_body(3)</a> to stream the response body.</p>
+<p>You may want to set the content-length header when using this function, if it is known in advance. This will allow clients using HTTP/2 and HTTP/1.0 to process the response more efficiently.</p>
+<p>The streaming method varies depending on the protocol being used. HTTP/2 will use the usual DATA frames. HTTP/1.1 will use chunked transfer-encoding. HTTP/1.0 will send the body unmodified and close the connection at the end if no content-length was set.</p>
+<p>It is not possible to push resources after this function returns. Any attempt will result in an error.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Status
-</dt>
-<dd>
-<p>
-The status code for the response.
-</p>
+<dl><dt>Status</dt>
+<dd><p>The status code for the response.</p>
</dd>
-<dt class="hdlist1">
-Headers
-</dt>
-<dd>
-<p>
-The response headers.
-</p>
+<dt>Headers</dt>
+<dd><p>The response headers.</p>
</dd>
-</dl></div>
-<div class="paragraph"><p>Header names must be given as lowercase binary strings.</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+</dl>
+<p>Header names must be given as lowercase binary strings.</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A new Req object is returned.</p></div>
-<div class="paragraph"><p>The returned Req object must be used from that point onward
-in order to be able to stream the response body.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>A new Req object is returned.</p>
+<p>The returned Req object must be used from that point onward in order to be able to stream the response body.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Only the Req is returned, it is no longer wrapped in a tuple.
-</p>
+<ul><li><strong>2.0</strong>: Only the Req is returned, it is no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced. Replaces <code>chunked_reply/1,2</code>.
-</p>
+<li><strong>2.0</strong>: Function introduced. Replaces <code>chunked_reply/1,2</code>.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Initiate the response</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Initiate the response</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: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_reply</span></span>(<span style="color: #993399">200</span>, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Stream the response with custom headers</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:stream_reply</font></b>(<font color="#993399">200</font>, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Stream the response with custom 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">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_reply</span></span>(<span style="color: #993399">200</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/plain"</span><span style="color: #990000">&gt;&gt;</span>
-}, <span style="color: #009900">Req0</span>),
-<span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_body</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Hello\n"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #FF6600">nofin</span>, <span style="color: #009900">Req</span>),
-<span style="font-weight: bold"><span style="color: #000000">timer:sleep</span></span>(<span style="color: #993399">1000</span>),
-<span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_body</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"World!\n"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #FF6600">fin</span>, <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:stream_reply</font></b>(<font color="#993399">200</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/plain"</font><font color="#990000">&gt;&gt;</font>
+}, <font color="#009900">Req0</font>),
+<b><font color="#000000">cowboy_req:stream_body</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"Hello\n"</font><font color="#990000">&gt;&gt;</font>, <font color="#FF6600">nofin</font>, <font color="#009900">Req</font>),
+<b><font color="#000000">timer:sleep</font></b>(<font color="#993399">1000</font>),
+<b><font color="#000000">cowboy_req:stream_body</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"World!\n"</font><font color="#990000">&gt;&gt;</font>, <font color="#FF6600">fin</font>, <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a>,
-<a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a>,
-<a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a>,
-<a href="../cowboy_req.inform">cowboy_req:inform(3)</a>,
-<a href="../cowboy_req.reply">cowboy_req:reply(3)</a>,
-<a href="../cowboy_req.stream_body">cowboy_req:stream_body(3)</a>,
-<a href="../cowboy_req.push">cowboy_req:push(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a>, <a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a>, <a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a>, <a href="../cowboy_req.inform">cowboy_req:inform(3)</a>, <a href="../cowboy_req.reply">cowboy_req:reply(3)</a>, <a href="../cowboy_req.stream_body">cowboy_req:stream_body(3)</a>, <a href="../cowboy_req.push">cowboy_req:push(3)</a></p>
+
diff --git a/docs/en/cowboy/2.1/manual/cowboy_req.uri/index.html b/docs/en/cowboy/2.1/manual/cowboy_req.uri/index.html
index 329f721a..feb1c1c7 100644
--- a/docs/en/cowboy/2.1/manual/cowboy_req.uri/index.html
+++ b/docs/en/cowboy/2.1/manual/cowboy_req.uri/index.html
@@ -62,177 +62,106 @@
<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">
+<p>cowboy_req:uri - Reconstructed URI</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">
+<pre><tt><b><font color="#000000">uri</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <b><font color="#000000">uri</font></b>(<font color="#009900">Req</font>, #{})
+<b><font color="#000000">uri</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>(), <font color="#009900">Opts</font>) <font color="#990000">-&gt;</font> <font color="#009900">URI</font> <font color="#990000">::</font> <b><font color="#000000">iodata</font></b>()
+
+<font color="#009900">Opts</font> <font color="#990000">::</font> #{
+ <font color="#0000FF">scheme</font> <font color="#990000">=&gt;</font> <b><font color="#000000">iodata</font></b>() | <font color="#000080">undefined</font>,
+ <font color="#0000FF">host</font> <font color="#990000">=&gt;</font> <b><font color="#000000">iodata</font></b>() | <font color="#000080">undefined</font>,
+ <font color="#0000FF">port</font> <font color="#990000">=&gt;</font> <b><font color="#000000">inet:port_number</font></b>() | <font color="#000080">undefined</font>,
+ <font color="#0000FF">path</font> <font color="#990000">=&gt;</font> <b><font color="#000000">iodata</font></b>() | <font color="#000080">undefined</font>,
+ <font color="#0000FF">qs</font> <font color="#990000">=&gt;</font> <b><font color="#000000">iodata</font></b>() | <font color="#000080">undefined</font>,
+ <font color="#0000FF">fragment</font> <font color="#990000">=&gt;</font> <b><font color="#000000">iodata</font></b>() | <font color="#000080">undefined</font>
+}</tt></pre>
+</div></div>
+<p>Reconstruct the effective request URI, optionally modifying components.</p>
+<p>By default Cowboy will build a URI using the components found in the request. Options allow disabling or replacing individual components.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>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>
+<dt>Opts</dt>
+<dd><p>Map for overriding individual components.</p>
+<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>
+<p>As this function always returns a valid URI, there are some things to note:</p>
+<ul><li>Disabling the host also disables the scheme and port.
</li>
-<li>
-<p>
-There is no fragment component by default as these are
- not sent with the request.
-</p>
+<li>There is no fragment component by default as these are not sent with the request.
</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>The port number may not appear in the resulting URI if it is the default port for the given scheme (http: 80; https: 443).
</li>
-</ul></div>
+</ul>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<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">
+<p>The reconstructed URI is returned as an iolist or a binary string.</p>
<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>
+<ul><li><strong>2.0</strong>: Individual components can be replaced or disabled.
</li>
-<li>
-<p>
-<strong>2.0</strong>: Only the URI is returned, it is no longer wrapped in a tuple.
-</p>
+<li><strong>2.0</strong>: Only the URI is returned, it is no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced. Replaces <code>host_url/1</code> and <code>url/1</code>.
-</p>
+<li><strong>2.0</strong>: Function introduced. Replaces <code>host_url/1</code> and <code>url/1</code>.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<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
+<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 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
+<pre><tt><i><font color="#9A1900">%% //example.org/path/to/res?edit=1</font></i>
+<b><font color="#000000">cowboy_req:uri</font></b>(<font color="#009900">Req</font>, #{<font color="#0000FF">scheme</font> <font color="#990000">=&gt;</font> <font color="#000080">undefined</font>})<font color="#990000">.</font></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
+<pre><tt><i><font color="#9A1900">%% </font></i><u><font color="#0000FF">http://example.org</font></u>
+<b><font color="#000000">cowboy_req:uri</font></b>(<font color="#009900">Req</font>, #{<font color="#0000FF">path</font> <font color="#990000">=&gt;</font> <font color="#000080">undefined</font>, <font color="#0000FF">qs</font> <font color="#990000">=&gt;</font> <font color="#000080">undefined</font>})<font color="#990000">.</font></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
+<pre><tt><i><font color="#9A1900">%% /path/to/res?edit=1</font></i>
+<b><font color="#000000">cowboy_req:uri</font></b>(<font color="#009900">Req</font>, #{<font color="#0000FF">host</font> <font color="#990000">=&gt;</font> <font color="#000080">undefined</font>})<font color="#990000">.</font></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
+<pre><tt><i><font color="#9A1900">%% </font></i><u><font color="#0000FF">http://example.org/path/to/res</font></u><i><font color="#9A1900">?edit=1#errors</font></i>
+<b><font color="#000000">cowboy_req:uri</font></b>(<font color="#009900">Req</font>, #{<font color="#0000FF">fragment</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"errors"</font><font color="#990000">&gt;&gt;</font>})<font color="#990000">.</font></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
+<pre><tt><i><font color="#9A1900">%% </font></i><u><font color="#0000FF">https://example.org/path/to/res</font></u><i><font color="#9A1900">?edit=1</font></i>
+<b><font color="#000000">cowboy_req:uri</font></b>(<font color="#009900">Req</font>, #{<font color="#0000FF">scheme</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"https"</font><font color="#990000">&gt;&gt;</font>})<font color="#990000">.</font></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">
+<pre><tt><b><font color="#000000">iolist_to_binary</font></b>(<b><font color="#000000">cowboy_req:uri</font></b>(<font color="#009900">Req</font>))<font color="#990000">.</font></tt></pre>
+</div></div>
<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>
+<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>
+
diff --git a/docs/en/cowboy/2.1/manual/cowboy_req.version/index.html b/docs/en/cowboy/2.1/manual/cowboy_req.version/index.html
index bce5f980..d17b908f 100644
--- a/docs/en/cowboy/2.1/manual/cowboy_req.version/index.html
+++ b/docs/en/cowboy/2.1/manual/cowboy_req.version/index.html
@@ -62,88 +62,47 @@
<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">
+<p>cowboy_req:version - HTTP version</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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
+<pre><tt><b><font color="#000000">version</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <font color="#009900">Version</font> <font color="#990000">::</font> <b><font color="#000000">cowboy:http_version</font></b>()</tt></pre>
+</div></div>
+<p>Return the HTTP version used for the request.</p>
+<p>The version can also be obtained using pattern matching:</p>
+<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">
+<pre><tt>#{<font color="#FF6600">version</font> <font color="#990000">:=</font> <font color="#009900">Version</font>} <font color="#990000">=</font> <font color="#009900">Req</font><font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<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">
+<p>The HTTP version used for the request is returned as an atom. It is provided for informative purposes only.</p>
<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>
+<ul><li><strong>2.0</strong>: Only the version is returned, it is no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<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
+<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">
+<pre><tt><font color="#009900">Version</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:version</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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>
+<p><a href="../cowboy_req">cowboy_req(3)</a></p>
+
diff --git a/docs/en/cowboy/2.1/manual/cowboy_req/index.html b/docs/en/cowboy/2.1/manual/cowboy_req/index.html
index e228b025..7bd20a2f 100644
--- a/docs/en/cowboy/2.1/manual/cowboy_req/index.html
+++ b/docs/en/cowboy/2.1/manual/cowboy_req/index.html
@@ -62,409 +62,216 @@
<h1 class="lined-header"><span>cowboy_req(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req - HTTP request and response</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req - HTTP request and response</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<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>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="33%" />
-<col width="33%" />
-<col width="33%" />
-<thead>
-<tr>
-<th align="left" valign="top"> Type </th>
-<th align="left" valign="top"> Name pattern </th>
-<th align="left" valign="top"> Return type</th>
+<p>The module <code>cowboy_req</code> provides functions to access, manipulate and respond to requests.</p>
+<p>There are four types of functions in this module. They can be differentiated by their name and their return type:</p>
+<table rules="all" width="100%" frame="border"
+ cellspacing="0" cellpadding="4">
+<thead><tr><th>Type</th>
+<th>Name pattern</th>
+<th>Return type</th>
+</tr></thead><tbody><tr><td>access</td>
+<td>no verb, parse_*, match_*</td>
+<td><code>Value</code></td>
</tr>
-</thead>
-<tbody>
-<tr>
-<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><td>question</td>
+<td>has_*</td>
+<td><code>boolean()</code></td>
</tr>
-<tr>
-<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><td>modification</td>
+<td>set_*</td>
+<td><code>Req</code></td>
</tr>
-<tr>
-<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><td>action</td>
+<td>any other verb</td>
+<td><code>ok | {Result, Value, Req}</code></td>
</tr>
-<tr>
-<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>
-<div class="sect1">
+</tbody></table>
+<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&apos;s only possible to send one response, and to read the body once.</p>
<h2 id="_exports">Exports</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Connection:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../cowboy_req.peer">cowboy_req:peer(3)</a> - Peer address and port
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.sock">cowboy_req:sock(3)</a> - Socket address and port
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.cert">cowboy_req:cert(3)</a> - Client TLS certificate
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>Raw request:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../cowboy_req.method">cowboy_req:method(3)</a> - HTTP method
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.version">cowboy_req:version(3)</a> - HTTP version
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.scheme">cowboy_req:scheme(3)</a> - URI scheme
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.host">cowboy_req:host(3)</a> - URI host name
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.port">cowboy_req:port(3)</a> - URI port number
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.path">cowboy_req:path(3)</a> - URI path
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.qs">cowboy_req:qs(3)</a> - URI query string
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.uri">cowboy_req:uri(3)</a> - Reconstructed URI
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.header">cowboy_req:header(3)</a> - HTTP header
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.headers">cowboy_req:headers(3)</a> - HTTP headers
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>Processed request:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../cowboy_req.parse_qs">cowboy_req:parse_qs(3)</a> - Parse the query string
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.match_qs">cowboy_req:match_qs(3)</a> - Match the query string against constraints
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.parse_header">cowboy_req:parse_header(3)</a> - Parse the given HTTP header
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.parse_cookies">cowboy_req:parse_cookies(3)</a> - Parse cookie headers
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.match_cookies">cowboy_req:match_cookies(3)</a> - Match cookies against constraints
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.binding">cowboy_req:binding(3)</a> - Access a value bound from the route
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.bindings">cowboy_req:bindings(3)</a> - Access all values bound from the route
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.host_info">cowboy_req:host_info(3)</a> - Access the route&#8217;s heading host segments
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.path_info">cowboy_req:path_info(3)</a> - Access the route&#8217;s trailing path segments
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>Request body:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../cowboy_req.has_body">cowboy_req:has_body(3)</a> - Is there a request body?
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.body_length">cowboy_req:body_length(3)</a> - Body length
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a> - Read the request body
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.read_urlencoded_body">cowboy_req:read_urlencoded_body(3)</a> - Read and parse a urlencoded request body
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.read_part">cowboy_req:read_part(3)</a> - Read the next multipart headers
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.read_part_body">cowboy_req:read_part_body(3)</a> - Read the current part&#8217;s body
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>Response:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../cowboy_req.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a> - Set a cookie
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a> - Set a response header
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a> - Set several response headers
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.has_resp_header">cowboy_req:has_resp_header(3)</a> - Is the given response header set?
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.resp_header">cowboy_req:resp_header(3)</a> - Response header
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.resp_headers">cowboy_req:resp_headers(3)</a> - Response headers
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.delete_resp_header">cowboy_req:delete_resp_header(3)</a> - Delete a response header
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.set_resp_body">cowboy_req:set_resp_body(3)</a> - Set the response body
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.has_resp_body">cowboy_req:has_resp_body(3)</a> - Is there a response body?
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.inform">cowboy_req:inform(3)</a> - Send an informational response
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.reply">cowboy_req:reply(3)</a> - Send the response
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a> - Send the response headers
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.stream_body">cowboy_req:stream_body(3)</a> - Stream the response body
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.push">cowboy_req:push(3)</a> - Push a resource to the client
-</p>
-</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+<p>Connection:</p>
+<ul><li><a href="../cowboy_req.peer">cowboy_req:peer(3)</a> - Peer address and port
+</li>
+<li><a href="../cowboy_req.sock">cowboy_req:sock(3)</a> - Socket address and port
+</li>
+<li><a href="../cowboy_req.cert">cowboy_req:cert(3)</a> - Client TLS certificate
+</li>
+</ul>
+<p>Raw request:</p>
+<ul><li><a href="../cowboy_req.method">cowboy_req:method(3)</a> - HTTP method
+</li>
+<li><a href="../cowboy_req.version">cowboy_req:version(3)</a> - HTTP version
+</li>
+<li><a href="../cowboy_req.scheme">cowboy_req:scheme(3)</a> - URI scheme
+</li>
+<li><a href="../cowboy_req.host">cowboy_req:host(3)</a> - URI host name
+</li>
+<li><a href="../cowboy_req.port">cowboy_req:port(3)</a> - URI port number
+</li>
+<li><a href="../cowboy_req.path">cowboy_req:path(3)</a> - URI path
+</li>
+<li><a href="../cowboy_req.qs">cowboy_req:qs(3)</a> - URI query string
+</li>
+<li><a href="../cowboy_req.uri">cowboy_req:uri(3)</a> - Reconstructed URI
+</li>
+<li><a href="../cowboy_req.header">cowboy_req:header(3)</a> - HTTP header
+</li>
+<li><a href="../cowboy_req.headers">cowboy_req:headers(3)</a> - HTTP headers
+</li>
+</ul>
+<p>Processed request:</p>
+<ul><li><a href="../cowboy_req.parse_qs">cowboy_req:parse_qs(3)</a> - Parse the query string
+</li>
+<li><a href="../cowboy_req.match_qs">cowboy_req:match_qs(3)</a> - Match the query string against constraints
+</li>
+<li><a href="../cowboy_req.parse_header">cowboy_req:parse_header(3)</a> - Parse the given HTTP header
+</li>
+<li><a href="../cowboy_req.parse_cookies">cowboy_req:parse_cookies(3)</a> - Parse cookie headers
+</li>
+<li><a href="../cowboy_req.match_cookies">cowboy_req:match_cookies(3)</a> - Match cookies against constraints
+</li>
+<li><a href="../cowboy_req.binding">cowboy_req:binding(3)</a> - Access a value bound from the route
+</li>
+<li><a href="../cowboy_req.bindings">cowboy_req:bindings(3)</a> - Access all values bound from the route
+</li>
+<li><a href="../cowboy_req.host_info">cowboy_req:host_info(3)</a> - Access the route&apos;s heading host segments
+</li>
+<li><a href="../cowboy_req.path_info">cowboy_req:path_info(3)</a> - Access the route&apos;s trailing path segments
+</li>
+</ul>
+<p>Request body:</p>
+<ul><li><a href="../cowboy_req.has_body">cowboy_req:has_body(3)</a> - Is there a request body?
+</li>
+<li><a href="../cowboy_req.body_length">cowboy_req:body_length(3)</a> - Body length
+</li>
+<li><a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a> - Read the request body
+</li>
+<li><a href="../cowboy_req.read_urlencoded_body">cowboy_req:read_urlencoded_body(3)</a> - Read and parse a urlencoded request body
+</li>
+<li><a href="../cowboy_req.read_part">cowboy_req:read_part(3)</a> - Read the next multipart headers
+</li>
+<li><a href="../cowboy_req.read_part_body">cowboy_req:read_part_body(3)</a> - Read the current part&apos;s body
+</li>
+</ul>
+<p>Response:</p>
+<ul><li><a href="../cowboy_req.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a> - Set a cookie
+</li>
+<li><a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a> - Set a response header
+</li>
+<li><a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a> - Set several response headers
+</li>
+<li><a href="../cowboy_req.has_resp_header">cowboy_req:has_resp_header(3)</a> - Is the given response header set?
+</li>
+<li><a href="../cowboy_req.resp_header">cowboy_req:resp_header(3)</a> - Response header
+</li>
+<li><a href="../cowboy_req.resp_headers">cowboy_req:resp_headers(3)</a> - Response headers
+</li>
+<li><a href="../cowboy_req.delete_resp_header">cowboy_req:delete_resp_header(3)</a> - Delete a response header
+</li>
+<li><a href="../cowboy_req.set_resp_body">cowboy_req:set_resp_body(3)</a> - Set the response body
+</li>
+<li><a href="../cowboy_req.has_resp_body">cowboy_req:has_resp_body(3)</a> - Is there a response body?
+</li>
+<li><a href="../cowboy_req.inform">cowboy_req:inform(3)</a> - Send an informational response
+</li>
+<li><a href="../cowboy_req.reply">cowboy_req:reply(3)</a> - Send the response
+</li>
+<li><a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a> - Send the response headers
+</li>
+<li><a href="../cowboy_req.stream_body">cowboy_req:stream_body(3)</a> - Stream the response body
+</li>
+<li><a href="../cowboy_req.push">cowboy_req:push(3)</a> - Push a resource to the client
+</li>
+</ul>
<h2 id="_types">Types</h2>
-<div class="sectionbody">
-<div class="sect2">
<h3 id="_push_opts">push_opts()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">
+<pre><tt><b><font color="#000000">push_opts</font></b>() <font color="#990000">::</font> #{
+ <font color="#0000FF">method</font> <font color="#990000">=&gt;</font> <b><font color="#000080">binary</font></b>(), <i><font color="#9A1900">%% case sensitive</font></i>
+ <font color="#0000FF">scheme</font> <font color="#990000">=&gt;</font> <b><font color="#000080">binary</font></b>(), <i><font color="#9A1900">%% lowercase; case insensitive</font></i>
+ <font color="#0000FF">host</font> <font color="#990000">=&gt;</font> <b><font color="#000080">binary</font></b>(), <i><font color="#9A1900">%% lowercase; case insensitive</font></i>
+ <font color="#0000FF">port</font> <font color="#990000">=&gt;</font> <b><font color="#000000">inet:port_number</font></b>(),
+ <font color="#0000FF">qs</font> <font color="#990000">=&gt;</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case sensitive</font></i>
+}</tt></pre>
+</div></div>
+<p>Push options.</p>
+<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&apos;s URI.</p>
<h3 id="_read_body_opts">read_body_opts()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">
+<pre><tt><b><font color="#000000">read_body_opts</font></b>() <font color="#990000">::</font> #{
+ <b><font color="#000080">length</font></b> <font color="#990000">=&gt;</font> <b><font color="#000000">non_neg_integer</font></b>(),
+ <font color="#0000FF">period</font> <font color="#990000">=&gt;</font> <b><font color="#000000">non_neg_integer</font></b>(),
+ <font color="#0000FF">timeout</font> <font color="#990000">=&gt;</font> <b><font color="#000000">timeout</font></b>()
+}</tt></pre>
+</div></div>
+<p>Body reading options.</p>
+<p>The defaults are function-specific.</p>
<h3 id="_req">req()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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>()},
- <span style="color: #FF6600">sock</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>()},
- <span style="color: #FF6600">cert</span> <span style="color: #990000">:=</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>() | <span style="color: #000080">undefined</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
+<pre><tt><b><font color="#000000">req</font></b>() <font color="#990000">::</font> #{
+ <font color="#FF6600">method</font> <font color="#990000">:=</font> <b><font color="#000080">binary</font></b>(), <i><font color="#9A1900">%% case sensitive</font></i>
+ <font color="#FF6600">version</font> <font color="#990000">:=</font> <b><font color="#000000">cowboy:http_version</font></b>() | <b><font color="#000080">atom</font></b>(),
+ <font color="#FF6600">scheme</font> <font color="#990000">:=</font> <b><font color="#000080">binary</font></b>(), <i><font color="#9A1900">%% lowercase; case insensitive</font></i>
+ <font color="#FF6600">host</font> <font color="#990000">:=</font> <b><font color="#000080">binary</font></b>(), <i><font color="#9A1900">%% lowercase; case insensitive</font></i>
+ <font color="#FF6600">port</font> <font color="#990000">:=</font> <b><font color="#000000">inet:port_number</font></b>(),
+ <font color="#FF6600">path</font> <font color="#990000">:=</font> <b><font color="#000080">binary</font></b>(), <i><font color="#9A1900">%% case sensitive</font></i>
+ <font color="#FF6600">qs</font> <font color="#990000">:=</font> <b><font color="#000080">binary</font></b>(), <i><font color="#9A1900">%% case sensitive</font></i>
+ <font color="#FF6600">headers</font> <font color="#990000">:=</font> <b><font color="#000000">cowboy:http_headers</font></b>(),
+ <font color="#FF6600">peer</font> <font color="#990000">:=</font> {<b><font color="#000000">inet:ip_address</font></b>(), <b><font color="#000000">inet:port_number</font></b>()},
+ <font color="#FF6600">sock</font> <font color="#990000">:=</font> {<b><font color="#000000">inet:ip_address</font></b>(), <b><font color="#000000">inet:port_number</font></b>()},
+ <font color="#FF6600">cert</font> <font color="#990000">:=</font> <b><font color="#000080">binary</font></b>() | <font color="#000080">undefined</font>
+}</tt></pre>
+</div></div>
+<p>The Req object.</p>
+<p>Contains information about the request and response. While some fields are publicly documented, others aren&apos;t and shouldn&apos;t be used.</p>
+<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 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">
+<pre><tt><font color="#009900">Req</font>#{<font color="#009900">_myapp_auth_method</font> <font color="#990000">=&gt;</font> <font color="#FF6600">pubkey</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
<h3 id="_resp_body">resp_body()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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>}
+<pre><tt><b><font color="#000000">resp_body</font></b>() <font color="#990000">::</font> <b><font color="#000000">iodata</font></b>()
+ | {<font color="#FF6600">sendfile</font>, <font color="#009900">Offset</font>, <font color="#009900">Length</font>, <font color="#009900">Filename</font>}
-<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">non_neg_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
+<font color="#009900">Offset</font> <font color="#990000">::</font> <b><font color="#000000">non_neg_integer</font></b>()
+<font color="#009900">Length</font> <font color="#990000">::</font> <b><font color="#000000">non_neg_integer</font></b>()
+<font color="#009900">Filename</font> <font color="#990000">::</font> <b><font color="#000000">file:name_all</font></b>()</tt></pre>
+</div></div>
+<p>Response body.</p>
+<p>It can take two forms: the actual data to be sent or a tuple indicating which file to send.</p>
+<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 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>Note that the length must be greater than zero for any data
-to be sent. Cowboy will send an empty body when the length
-is zero.</p></div>
-</div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#993399">1</font><font color="#990000">&gt;</font> <font color="#009900">RespBody</font> <font color="#990000">=</font> [<font color="#FF0000">"Hello "</font>, [<font color="#990000">&lt;&lt;</font><font color="#FF0000">"world"</font><font color="#990000">&gt;&gt;</font>, <font color="#FF0000">$!</font>]]<font color="#990000">.</font>
+[<font color="#FF0000">"Hello "</font>,[<font color="#990000">&lt;&lt;</font><font color="#FF0000">"world"</font><font color="#990000">&gt;&gt;</font>,<font color="#993399">33</font>]]
+<font color="#993399">2</font><font color="#990000">&gt;</font> <b><font color="#000000">io:format</font></b>(<font color="#FF0000">"~s~n"</font>, [<font color="#009900">RespBody</font>])<font color="#990000">.</font>
+<font color="#009900">Hello</font> <font color="#FF6600">world</font><font color="#990000">!</font></tt></pre>
+</div></div>
+<p>Note that the length must be greater than zero for any data to be sent. Cowboy will send an empty body when the length is zero.</p>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="..">cowboy(7)</a></p></div>
-</div>
-</div>
+<p><a href="..">cowboy(7)</a></p>
+
diff --git a/docs/en/cowboy/2.1/manual/cowboy_rest/index.html b/docs/en/cowboy/2.1/manual/cowboy_rest/index.html
index 6ee7e059..ed98dd95 100644
--- a/docs/en/cowboy/2.1/manual/cowboy_rest/index.html
+++ b/docs/en/cowboy/2.1/manual/cowboy_rest/index.html
@@ -62,668 +62,475 @@
<h1 class="lined-header"><span>cowboy_rest(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_rest - REST handlers</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_rest - REST handlers</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The module <code>cowboy_rest</code> implements the HTTP state machine.</p></div>
-<div class="paragraph"><p>Implementing REST handlers is not enough to provide a REST
-interface; this interface must also follow the REST
-constraints including HATEOAS (hypermedia as the engine
-of application state).</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The module <code>cowboy_rest</code> implements the HTTP state machine.</p>
+<p>Implementing REST handlers is not enough to provide a REST interface; this interface must also follow the REST constraints including HATEOAS (hypermedia as the engine of application state).</p>
<h2 id="_callbacks">Callbacks</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>REST handlers implement the following interface:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
-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="color: #FF6600">cowboy_rest</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
-
-<span style="color: #009900">Callback</span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>)
- <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
- | {<span style="color: #FF6600">stop</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
- | {{<span style="color: #FF6600">switch_handler</span>, <span style="color: #009900">Module</span>}, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
- | {{<span style="color: #FF6600">switch_handler</span>, <span style="color: #009900">Module</span>, <span style="color: #009900">Opts</span>}, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
-
-<span style="font-weight: bold"><span style="color: #000000">terminate</span></span>(<span style="color: #009900">Reason</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> <span style="color: #FF6600">ok</span> <span style="font-style: italic"><span style="color: #9A1900">%% optional</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">State</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()
-<span style="color: #009900">Module</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">module</span></span>()
-<span style="color: #009900">Opts</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()
-<span style="color: #009900">Reason</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">normal</span></span>
- | {<span style="color: #FF6600">crash</span>, <span style="color: #FF6600">error</span> | <span style="font-weight: bold"><span style="color: #000080">exit</span></span> | <span style="font-weight: bold"><span style="color: #000080">throw</span></span>, <span style="font-weight: bold"><span style="color: #000000">any</span></span>()}
-
-<span style="color: #009900">Callback</span> <span style="color: #990000">-</span> <span style="color: #FF6600">see</span> <span style="color: #FF6600">below</span>
-<span style="color: #009900">Result</span> <span style="color: #990000">-</span> <span style="color: #FF6600">see</span> <span style="color: #FF6600">below</span>
-<span style="color: #009900">Default</span> <span style="color: #990000">-</span> <span style="color: #FF6600">see</span> <span style="color: #FF6600">below</span></tt></pre></div></div>
-<div class="paragraph"><p>The <code>init/2</code> callback is common to all handlers. To switch
-to the REST handler behavior, it must return <code>cowboy_rest</code>
-as the first element of the tuple.</p></div>
-<div class="paragraph"><p>The <code>Callback/2</code> above represents all the REST-specific
-callbacks. They are described in the following section
-of this manual. REST-specific callbacks differ by their
-name, semantics, result and default values. The default
-value is the one used when the callback has not been
-implemented. They otherwise all follow the same interface.</p></div>
-<div class="paragraph"><p>The <code>stop</code> tuple can be returned to stop REST processing.
-If no response was sent before then, Cowboy will send a
-<em>204 No Content</em>. The <code>stop</code> tuple can be returned from
-any callback, excluding <code>expires</code>, <code>generate_etag</code>,
-<code>last_modified</code> and <code>variances</code>.</p></div>
-<div class="paragraph"><p>A <code>switch_handler</code> tuple can be returned from these same
-callbacks to stop REST processing and switch to a different
-handler type. This is very useful to, for example, to stream
-the response body.</p></div>
-<div class="paragraph"><p>The optional <code>terminate/3</code> callback will ultimately be called
-with the reason for the termination of the handler.
-Cowboy will terminate the process right after this. There
-is no need to perform any cleanup in this callback.</p></div>
-<div class="paragraph"><p>The following terminate reasons are defined for loop handlers:</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-normal
-</dt>
-<dd>
-<p>
- The handler terminated normally.
-</p>
+<p>REST handlers implement the following interface:</p>
+<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><b><font color="#000000">init</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>)
+ <font color="#990000">-&gt;</font> {<font color="#FF6600">cowboy_rest</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
+
+<font color="#009900">Callback</font>(<font color="#009900">Req</font>, <font color="#009900">State</font>)
+ <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
+ | {<font color="#FF6600">stop</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
+ | {{<font color="#FF6600">switch_handler</font>, <font color="#009900">Module</font>}, <font color="#009900">Req</font>, <font color="#009900">State</font>}
+ | {{<font color="#FF6600">switch_handler</font>, <font color="#009900">Module</font>, <font color="#009900">Opts</font>}, <font color="#009900">Req</font>, <font color="#009900">State</font>}
+
+<b><font color="#000000">terminate</font></b>(<font color="#009900">Reason</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> <font color="#FF6600">ok</font> <i><font color="#9A1900">%% optional</font></i>
+
+<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()
+<font color="#009900">State</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()
+<font color="#009900">Module</font> <font color="#990000">::</font> <b><font color="#000000">module</font></b>()
+<font color="#009900">Opts</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()
+<font color="#009900">Reason</font> <font color="#990000">::</font> <b><font color="#000080">normal</font></b>
+ | {<font color="#FF6600">crash</font>, <font color="#FF6600">error</font> | <b><font color="#000080">exit</font></b> | <b><font color="#000080">throw</font></b>, <b><font color="#000000">any</font></b>()}
+
+<font color="#009900">Callback</font> <font color="#990000">-</font> <font color="#FF6600">see</font> <font color="#FF6600">below</font>
+<font color="#009900">Result</font> <font color="#990000">-</font> <font color="#FF6600">see</font> <font color="#FF6600">below</font>
+<font color="#009900">Default</font> <font color="#990000">-</font> <font color="#FF6600">see</font> <font color="#FF6600">below</font></tt></pre>
+</div></div>
+<p>The <code>init/2</code> callback is common to all handlers. To switch to the REST handler behavior, it must return <code>cowboy_rest</code> as the first element of the tuple.</p>
+<p>The <code>Callback/2</code> above represents all the REST-specific callbacks. They are described in the following section of this manual. REST-specific callbacks differ by their name, semantics, result and default values. The default value is the one used when the callback has not been implemented. They otherwise all follow the same interface.</p>
+<p>The <code>stop</code> tuple can be returned to stop REST processing. If no response was sent before then, Cowboy will send a <em>204 No Content</em>. The <code>stop</code> tuple can be returned from any callback, excluding <code>expires</code>, <code>generate_etag</code>, <code>last_modified</code> and <code>variances</code>.</p>
+<p>A <code>switch_handler</code> tuple can be returned from these same callbacks to stop REST processing and switch to a different handler type. This is very useful to, for example, to stream the response body.</p>
+<p>The optional <code>terminate/3</code> callback will ultimately be called with the reason for the termination of the handler. Cowboy will terminate the process right after this. There is no need to perform any cleanup in this callback.</p>
+<p>The following terminate reasons are defined for loop handlers:</p>
+<dl><dt>normal</dt>
+<dd><p>The handler terminated normally.</p>
</dd>
-<dt class="hdlist1">
-{crash, Class, Reason}
-</dt>
-<dd>
-<p>
- A crash occurred in the handler. <code>Class</code> and <code>Reason</code> can be
- used to obtain more information about the crash. The function
- <code>erlang:get_stacktrace/0</code> can also be called to obtain the
- stacktrace of the process when the crash occurred.
-</p>
+<dt>{crash, Class, Reason}</dt>
+<dd><p>A crash occurred in the handler. <code>Class</code> and <code>Reason</code> can be used to obtain more information about the crash. The function <code>erlang:get_stacktrace/0</code> can also be called to obtain the stacktrace of the process when the crash occurred.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_rest_callbacks">REST callbacks</h2>
-<div class="sectionbody">
-<div class="sect2">
<h3 id="_acceptcallback">AcceptCallback</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #009900">AcceptCallback</span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
-
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="color: #000080">true</span> | {<span style="color: #000080">true</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: #000080">false</span>}
-<span style="color: #009900">Default</span> <span style="color: #990000">-</span> <span style="color: #FF6600">crash</span></tt></pre></div></div>
-<div class="paragraph"><p>Process the request body.</p></div>
-<div class="paragraph"><p>This function should create or update the resource using the
-request body.</p></div>
-<div class="paragraph"><p>For PUT requests, the body is a representation of the resource
-that is being created or replaced.</p></div>
-<div class="paragraph"><p>For POST requests, the body is typically application-specific
-instructions on how to process the request, but it may also
-be a representation of the resource. When creating a new
-resource with POST at a different location, return <code>{true, URI}</code>
-with <code>URI</code> the new location.</p></div>
-<div class="paragraph"><p>For PATCH requests, the body is a series of instructions on
-how to update the resource. Patch files or JSON Patch are
-examples of such media types.</p></div>
-<div class="paragraph"><p>A response body may be sent. The appropriate media type, charset
-and language for the response can be retrieved from the Req
-object using the <code>media_type</code>, <code>charset</code> and <code>language</code> keys,
-respectively. The body can be set using
-<a href="../cowboy_req.set_resp_body">cowboy_req:set_resp_body(3)</a>.</p></div>
-</div>
-<div class="sect2">
+<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><font color="#009900">AcceptCallback</font>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
+
+<font color="#009900">Result</font> <font color="#990000">::</font> <font color="#000080">true</font> | {<font color="#000080">true</font>, <font color="#009900">URI</font> <font color="#990000">::</font> <b><font color="#000000">iodata</font></b>()} | <font color="#000080">false</font>}
+<font color="#009900">Default</font> <font color="#990000">-</font> <font color="#FF6600">crash</font></tt></pre>
+</div></div>
+<p>Process the request body.</p>
+<p>This function should create or update the resource using the request body.</p>
+<p>For PUT requests, the body is a representation of the resource that is being created or replaced.</p>
+<p>For POST requests, the body is typically application-specific instructions on how to process the request, but it may also be a representation of the resource. When creating a new resource with POST at a different location, return <code>{true, URI}</code> with <code>URI</code> the new location.</p>
+<p>For PATCH requests, the body is a series of instructions on how to update the resource. Patch files or JSON Patch are examples of such media types.</p>
+<p>A response body may be sent. The appropriate media type, charset and language for the response can be retrieved from the Req object using the <code>media_type</code>, <code>charset</code> and <code>language</code> keys, respectively. The body can be set using <a href="../cowboy_req.set_resp_body">cowboy_req:set_resp_body(3)</a>.</p>
<h3 id="_allowed_methods">allowed_methods</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">allowed_methods</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">allowed_methods</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</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: #009900">Default</span> <span style="color: #990000">::</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">"HEAD"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"OPTIONS"</span><span style="color: #990000">&gt;&gt;</span>]</tt></pre></div></div>
-<div class="paragraph"><p>Return the list of allowed methods.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> [<b><font color="#000080">binary</font></b>()] <i><font color="#9A1900">%% case sensitive</font></i>
+<font color="#009900">Default</font> <font color="#990000">::</font> [<font color="#990000">&lt;&lt;</font><font color="#FF0000">"GET"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"HEAD"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"OPTIONS"</font><font color="#990000">&gt;&gt;</font>]</tt></pre>
+</div></div>
+<p>Return the list of allowed methods.</p>
<h3 id="_allow_missing_post">allow_missing_post</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">allow_missing_post</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">allow_missing_post</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()
-<span style="color: #009900">Default</span> <span style="color: #990000">::</span> <span style="color: #000080">true</span></tt></pre></div></div>
-<div class="paragraph"><p>Return whether POST is allowed when the resource doesn&#8217;t exist.</p></div>
-<div class="paragraph"><p>Returning <code>true</code> here means that a new resource will be
-created. The URI for the newly created resource should be
-returned from the <code>AcceptCallback</code> function.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> <b><font color="#000000">boolean</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <font color="#000080">true</font></tt></pre>
+</div></div>
+<p>Return whether POST is allowed when the resource doesn&apos;t exist.</p>
+<p>Returning <code>true</code> here means that a new resource will be created. The URI for the newly created resource should be returned from the <code>AcceptCallback</code> function.</p>
<h3 id="_charsets_provided">charsets_provided</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">charsets_provided</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">charsets_provided</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</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: #009900">Default</span> <span style="color: #990000">-</span> <span style="color: #FF6600">skip</span> <span style="color: #FF6600">this</span> <span style="color: #FF6600">step</span></tt></pre></div></div>
-<div class="paragraph"><p>Return the list of charsets the resource provides in order
-of preference.</p></div>
-<div class="paragraph"><p>During content negotiation Cowboy will pick the most
-appropriate charset for the client. The client advertises
-charsets it prefers with the accept-charset header. When
-that header is missing, Cowboy picks the first charset
-from the resource.</p></div>
-<div class="paragraph"><p>Cowboy will add the negotiated <code>charset</code> to the Req object
-after this step completes:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<font color="#009900">Result</font> <font color="#990000">::</font> [<b><font color="#000080">binary</font></b>()] <i><font color="#9A1900">%% lowercase; case insensitive</font></i>
+<font color="#009900">Default</font> <font color="#990000">-</font> <font color="#FF6600">skip</font> <font color="#FF6600">this</font> <font color="#FF6600">step</font></tt></pre>
+</div></div>
+<p>Return the list of charsets the resource provides in order of preference.</p>
+<p>During content negotiation Cowboy will pick the most appropriate charset for the client. The client advertises charsets it prefers with the accept-charset header. When that header is missing, Cowboy picks the first charset from the resource.</p>
+<!-- @todo We should explain precisely how charsets are picked.-->
+<p>Cowboy will add the negotiated <code>charset</code> to the Req object after this step completes:</p>
+<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: #0000FF">charset</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>
-}</tt></pre></div></div>
-</div>
-<div class="sect2">
+<pre><tt><b><font color="#000000">req</font></b>() <font color="#990000">::</font> #{
+ <font color="#0000FF">charset</font> <font color="#990000">=&gt;</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% lowercase; case insensitive</font></i>
+}</tt></pre>
+</div></div>
<h3 id="_content_types_accepted">content_types_accepted</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
-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">content_types_accepted</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
-
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> [{<span style="font-weight: bold"><span style="color: #000080">binary</span></span>() | <span style="color: #009900">ParsedMime</span>, <span style="color: #009900">AcceptCallback</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">atom</span></span>()}]
-<span style="color: #009900">ParsedMime</span> <span style="color: #990000">::</span> {<span style="color: #009900">Type</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="color: #009900">SubType</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="color: #FF6600">'*'</span> | <span style="color: #009900">Params</span>}
-<span style="color: #009900">Params</span> <span style="color: #990000">::</span> [{<span style="color: #009900">Key</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="color: #009900">Value</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()}]
-
-<span style="color: #009900">Default</span> <span style="color: #990000">-</span> <span style="color: #FF6600">crash</span></tt></pre></div></div>
-<div class="paragraph"><p>Return the list of media types the resource accepts in
-order of preference.</p></div>
-<div class="paragraph"><p>A media type is made of different parts. The media type
-<code>text/html;charset=utf-8</code> is of type <code>text</code>, subtype <code>html</code>
-and has a single parameter <code>charset</code> with value <code>utf-8</code>.</p></div>
-<div class="paragraph"><p>Cowboy will match the content-type request header against
-the media types the server accepts and select the appropriate
-callback. When that header is missing, or when the server does not
-accept this media type, the request fails and an error response
-is returned. Cowboy will execute the callback immediately otherwise.</p></div>
-<div class="paragraph"><p>An empty parameters list <code>[]</code> means that no parameters will be
-accepted. When any parameter is acceptable, the tuple form
-should be used with parameters as the atom <code>'*'</code>.</p></div>
-<div class="paragraph"><p>Cowboy treats all parameters as case sensitive, except for the
-<code>charset</code> parameter, which is known to be case insensitive. You
-should therefore always provide the charset as a lowercase
-binary string.</p></div>
-</div>
-<div class="sect2">
+<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><b><font color="#000000">content_types_accepted</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
+
+<font color="#009900">Result</font> <font color="#990000">::</font> [{<b><font color="#000080">binary</font></b>() | <font color="#009900">ParsedMime</font>, <font color="#009900">AcceptCallback</font> <font color="#990000">::</font> <b><font color="#000080">atom</font></b>()}]
+<font color="#009900">ParsedMime</font> <font color="#990000">::</font> {<font color="#009900">Type</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">SubType</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#FF6600">'*'</font> | <font color="#009900">Params</font>}
+<font color="#009900">Params</font> <font color="#990000">::</font> [{<font color="#009900">Key</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()}]
+
+<font color="#009900">Default</font> <font color="#990000">-</font> <font color="#FF6600">crash</font></tt></pre>
+</div></div>
+<!-- @todo Case sensitivity of parsed mime content?-->
+<p>Return the list of media types the resource accepts in order of preference.</p>
+<p>A media type is made of different parts. The media type <code>text/html;charset=utf-8</code> is of type <code>text</code>, subtype <code>html</code> and has a single parameter <code>charset</code> with value <code>utf-8</code>.</p>
+<!-- @todo Cowboy needs to ignore the boundary parameter for-->
+<!-- multipart, as we never want to match against it. Or allow-->
+<!-- ignoring specific parameters at the very least.-->
+<p>Cowboy will match the content-type request header against the media types the server accepts and select the appropriate callback. When that header is missing, or when the server does not accept this media type, the request fails and an error response is returned. Cowboy will execute the callback immediately otherwise.</p>
+<!-- @todo We should explain precisely how media types are picked.-->
+<p>An empty parameters list <code>[]</code> means that no parameters will be accepted. When any parameter is acceptable, the tuple form should be used with parameters as the atom <code>&apos;*&apos;</code>.</p>
+<p>Cowboy treats all parameters as case sensitive, except for the <code>charset</code> parameter, which is known to be case insensitive. You should therefore always provide the charset as a lowercase binary string.</p>
+<!-- @todo Maybe this should be in the user guide instead.-->
+<!-- This function will be called for POST, PUT and PATCH requests.-->
+<!-- It is entirely possible to define different callbacks for different-->
+<!-- methods if the handling of the request differs. Simply verify-->
+<!-- what the method is with `cowboy_req:method/1` and return a-->
+<!-- different list for each methods.-->
<h3 id="_content_types_provided">content_types_provided</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
-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">content_types_provided</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
-
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> [{<span style="font-weight: bold"><span style="color: #000080">binary</span></span>() | <span style="color: #009900">ParsedMime</span>, <span style="color: #009900">ProvideCallback</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">atom</span></span>()}]
-<span style="color: #009900">ParsedMime</span> <span style="color: #990000">::</span> {<span style="color: #009900">Type</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="color: #009900">SubType</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="color: #FF6600">'*'</span> | <span style="color: #009900">Params</span>}
-<span style="color: #009900">Params</span> <span style="color: #990000">::</span> [{<span style="color: #009900">Key</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="color: #009900">Value</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()}]
-
-<span style="color: #009900">Default</span> <span style="color: #990000">-</span> [{{ <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"html"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #FF6600">'*'</span>}, <span style="color: #FF6600">to_html</span>}]</tt></pre></div></div>
-<div class="paragraph"><p>Return the list of media types the resource provides in
-order of preference.</p></div>
-<div class="paragraph"><p>A media type is made of different parts. The media type
-<code>text/html;charset=utf-8</code> is of type <code>text</code>, subtype <code>html</code>
-and has a single parameter <code>charset</code> with value <code>utf-8</code>.</p></div>
-<div class="paragraph"><p>During content negotiation Cowboy will pick the most appropriate
-media type for the client. The client advertises media types it
-prefers with the accept header. When that header is missing,
-the content negotiation fails and an error response is returned.</p></div>
-<div class="paragraph"><p>The callback given for the selected media type will be called
-at the end of the execution of GET and HEAD requests when a
-representation must be sent to the client.</p></div>
-<div class="paragraph"><p>An empty parameters list <code>[]</code> means that no parameters will be
-accepted. When any parameter is acceptable, the tuple form
-should be used with parameters as the atom <code>'*'</code>.</p></div>
-<div class="paragraph"><p>Cowboy treats all parameters as case sensitive, except for the
-<code>charset</code> parameter, which is known to be case insensitive. You
-should therefore always provide the charset as a lowercase
-binary string.</p></div>
-<div class="paragraph"><p>Cowboy will add the negotiated <code>media_type</code> to the Req object
-after this step completes:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
-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: #0000FF">media_type</span> <span style="color: #990000">=&gt;</span> <span style="color: #009900">ParsedMime</span>
-}</tt></pre></div></div>
-</div>
-<div class="sect2">
+<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><b><font color="#000000">content_types_provided</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
+
+<font color="#009900">Result</font> <font color="#990000">::</font> [{<b><font color="#000080">binary</font></b>() | <font color="#009900">ParsedMime</font>, <font color="#009900">ProvideCallback</font> <font color="#990000">::</font> <b><font color="#000080">atom</font></b>()}]
+<font color="#009900">ParsedMime</font> <font color="#990000">::</font> {<font color="#009900">Type</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">SubType</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#FF6600">'*'</font> | <font color="#009900">Params</font>}
+<font color="#009900">Params</font> <font color="#990000">::</font> [{<font color="#009900">Key</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()}]
+
+<font color="#009900">Default</font> <font color="#990000">-</font> [{{ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"html"</font><font color="#990000">&gt;&gt;</font>, <font color="#FF6600">'*'</font>}, <font color="#FF6600">to_html</font>}]</tt></pre>
+</div></div>
+<!-- @todo Case sensitivity of parsed mime content?-->
+<!-- @todo Space required for the time being: https://github.com/spf13/hugo/issues/2398-->
+<p>Return the list of media types the resource provides in order of preference.</p>
+<p>A media type is made of different parts. The media type <code>text/html;charset=utf-8</code> is of type <code>text</code>, subtype <code>html</code> and has a single parameter <code>charset</code> with value <code>utf-8</code>.</p>
+<!-- @todo Cowboy needs to ignore the boundary parameter for-->
+<!-- multipart, as we never want to match against it. Or allow-->
+<!-- ignoring specific parameters at the very least.-->
+<p>During content negotiation Cowboy will pick the most appropriate media type for the client. The client advertises media types it prefers with the accept header. When that header is missing, the content negotiation fails and an error response is returned.</p>
+<p>The callback given for the selected media type will be called at the end of the execution of GET and HEAD requests when a representation must be sent to the client.</p>
+<!-- @todo We should explain precisely how media types are picked.-->
+<p>An empty parameters list <code>[]</code> means that no parameters will be accepted. When any parameter is acceptable, the tuple form should be used with parameters as the atom <code>&apos;*&apos;</code>.</p>
+<p>Cowboy treats all parameters as case sensitive, except for the <code>charset</code> parameter, which is known to be case insensitive. You should therefore always provide the charset as a lowercase binary string.</p>
+<p>Cowboy will add the negotiated <code>media_type</code> to the Req object after this step completes:</p>
+<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><b><font color="#000000">req</font></b>() <font color="#990000">::</font> #{
+ <font color="#0000FF">media_type</font> <font color="#990000">=&gt;</font> <font color="#009900">ParsedMime</font>
+}</tt></pre>
+</div></div>
+<!-- @todo Case sensitivity of parsed mime content?-->
<h3 id="_delete_completed">delete_completed</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">delete_completed</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">delete_completed</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()
-<span style="color: #009900">Default</span> <span style="color: #990000">::</span> <span style="color: #000080">true</span></tt></pre></div></div>
-<div class="paragraph"><p>Return whether the resource has been fully deleted from the
-system, including from any internal cache.</p></div>
-<div class="paragraph"><p>Returning <code>false</code> will result in a <em>202 Accepted</em> response
-being sent instead of a <em>200 OK</em> or <em>204 No Content</em>.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> <b><font color="#000000">boolean</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <font color="#000080">true</font></tt></pre>
+</div></div>
+<p>Return whether the resource has been fully deleted from the system, including from any internal cache.</p>
+<p>Returning <code>false</code> will result in a <em>202 Accepted</em> response being sent instead of a <em>200 OK</em> or <em>204 No Content</em>.</p>
<h3 id="_delete_resource">delete_resource</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">delete_resource</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">delete_resource</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()
-<span style="color: #009900">Default</span> <span style="color: #990000">::</span> <span style="color: #000080">false</span></tt></pre></div></div>
-<div class="paragraph"><p>Delete the resource.</p></div>
-<div class="paragraph"><p>Cowboy will send an error response when this function
-returns <code>false</code>.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> <b><font color="#000000">boolean</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <font color="#000080">false</font></tt></pre>
+</div></div>
+<p>Delete the resource.</p>
+<p>Cowboy will send an error response when this function returns <code>false</code>.</p>
<h3 id="_expires">expires</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">expires</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">expires</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">calendar:datetime</span></span>() | <span style="font-weight: bold"><span style="color: #000080">binary</span></span>() | <span style="color: #000080">undefined</span>
-<span style="color: #009900">Default</span> <span style="color: #990000">::</span> <span style="color: #000080">undefined</span></tt></pre></div></div>
-<div class="paragraph"><p>Return the resource&#8217;s expiration date.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> <b><font color="#000000">calendar:datetime</font></b>() | <b><font color="#000080">binary</font></b>() | <font color="#000080">undefined</font>
+<font color="#009900">Default</font> <font color="#990000">::</font> <font color="#000080">undefined</font></tt></pre>
+</div></div>
+<p>Return the resource&apos;s expiration date.</p>
<h3 id="_forbidden">forbidden</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">forbidden</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">forbidden</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()
-<span style="color: #009900">Default</span> <span style="color: #990000">::</span> <span style="color: #000080">false</span></tt></pre></div></div>
-<div class="paragraph"><p>Return whether access to the resource is forbidden.</p></div>
-<div class="paragraph"><p>A <em>403 Forbidden</em> response will be sent if this
-function returns <code>true</code>. This status code means that
-access is forbidden regardless of authentication,
-and that the request shouldn&#8217;t be repeated.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> <b><font color="#000000">boolean</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <font color="#000080">false</font></tt></pre>
+</div></div>
+<p>Return whether access to the resource is forbidden.</p>
+<p>A <em>403 Forbidden</em> response will be sent if this function returns <code>true</code>. This status code means that access is forbidden regardless of authentication, and that the request shouldn&apos;t be repeated.</p>
<h3 id="_generate_etag">generate_etag</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">generate_etag</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">generate_etag</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>() | {<span style="color: #FF6600">weak</span> | <span style="color: #FF6600">strong</span>, <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()}
-<span style="color: #009900">Default</span> <span style="color: #990000">-</span> <span style="color: #FF6600">no</span> <span style="color: #FF6600">etag</span> <span style="color: #FF6600">value</span></tt></pre></div></div>
-<div class="paragraph"><p>Return the entity tag of the resource.</p></div>
-<div class="paragraph"><p>When a binary is returned, the value is automatically
-parsed to a tuple. The binary must be in the same
-format as the etag header, including quotes.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() | {<font color="#FF6600">weak</font> | <font color="#FF6600">strong</font>, <b><font color="#000080">binary</font></b>()}
+<font color="#009900">Default</font> <font color="#990000">-</font> <font color="#FF6600">no</font> <font color="#FF6600">etag</font> <font color="#FF6600">value</font></tt></pre>
+</div></div>
+<p>Return the entity tag of the resource.</p>
+<p>When a binary is returned, the value is automatically parsed to a tuple. The binary must be in the same format as the etag header, including quotes.</p>
<h3 id="_is_authorized">is_authorized</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">is_authorized</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">is_authorized</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="color: #000080">true</span> | {<span style="color: #000080">false</span>, <span style="color: #009900">AuthHeader</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>()}
-<span style="color: #009900">Default</span> <span style="color: #990000">-</span> <span style="color: #000080">true</span></tt></pre></div></div>
-<div class="paragraph"><p>Return whether the user is authorized to perform the action.</p></div>
-<div class="paragraph"><p>This function should be used to perform any necessary
-authentication of the user before attempting to perform
-any action on the resource.</p></div>
-<div class="paragraph"><p>When authentication fails, the <code>AuthHeader</code> value will
-be sent in the www-authenticate header for the
-<em>401 Unauthorized</em> response.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> <font color="#000080">true</font> | {<font color="#000080">false</font>, <font color="#009900">AuthHeader</font> <font color="#990000">::</font> <b><font color="#000000">iodata</font></b>()}
+<font color="#009900">Default</font> <font color="#990000">-</font> <font color="#000080">true</font></tt></pre>
+</div></div>
+<p>Return whether the user is authorized to perform the action.</p>
+<p>This function should be used to perform any necessary authentication of the user before attempting to perform any action on the resource.</p>
+<p>When authentication fails, the <code>AuthHeader</code> value will be sent in the www-authenticate header for the <em>401 Unauthorized</em> response.</p>
<h3 id="_is_conflict">is_conflict</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">is_conflict</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">is_conflict</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()
-<span style="color: #009900">Default</span> <span style="color: #990000">::</span> <span style="color: #000080">false</span></tt></pre></div></div>
-<div class="paragraph"><p>Return whether the PUT request results in a conflict.</p></div>
-<div class="paragraph"><p>A <em>409 Conflict</em> response is sent when <code>true</code>.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> <b><font color="#000000">boolean</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <font color="#000080">false</font></tt></pre>
+</div></div>
+<p>Return whether the PUT request results in a conflict.</p>
+<p>A <em>409 Conflict</em> response is sent when <code>true</code>.</p>
<h3 id="_known_methods">known_methods</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">known_methods</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">known_methods</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</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: #009900">Default</span> <span style="color: #990000">::</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">"HEAD"</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="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"PUT"</span><span style="color: #990000">&gt;&gt;</span>,
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"PATCH"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"DELETE"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"OPTIONS"</span><span style="color: #990000">&gt;&gt;</span>]</tt></pre></div></div>
-<div class="paragraph"><p>Return the list of known methods.</p></div>
-<div class="paragraph"><p>The full list of methods known by the server should be
-returned, regardless of their use in the resource.</p></div>
-<div class="paragraph"><p>The default value lists the methods Cowboy knows and
-implement in <code>cowboy_rest</code>.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> [<b><font color="#000080">binary</font></b>()] <i><font color="#9A1900">%% case sensitive</font></i>
+<font color="#009900">Default</font> <font color="#990000">::</font> [<font color="#990000">&lt;&lt;</font><font color="#FF0000">"GET"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"HEAD"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"POST"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"PUT"</font><font color="#990000">&gt;&gt;</font>,
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"PATCH"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"DELETE"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"OPTIONS"</font><font color="#990000">&gt;&gt;</font>]</tt></pre>
+</div></div>
+<p>Return the list of known methods.</p>
+<p>The full list of methods known by the server should be returned, regardless of their use in the resource.</p>
+<p>The default value lists the methods Cowboy knows and implement in <code>cowboy_rest</code>.</p>
<h3 id="_languages_provided">languages_provided</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">languages_provided</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">languages_provided</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</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: #009900">Default</span> <span style="color: #990000">-</span> <span style="color: #FF6600">skip</span> <span style="color: #FF6600">this</span> <span style="color: #FF6600">step</span></tt></pre></div></div>
-<div class="paragraph"><p>Return the list of languages the resource provides in order
-of preference.</p></div>
-<div class="paragraph"><p>During content negotiation Cowboy will pick the most
-appropriate language for the client. The client advertises
-languages it prefers with the accept-language header. When
-that header is missing, Cowboy picks the first language
-from the resource.</p></div>
-<div class="paragraph"><p>Cowboy will add the negotiated <code>language</code> to the Req object
-after this step completes:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<font color="#009900">Result</font> <font color="#990000">::</font> [<b><font color="#000080">binary</font></b>()] <i><font color="#9A1900">%% lowercase; case insensitive</font></i>
+<font color="#009900">Default</font> <font color="#990000">-</font> <font color="#FF6600">skip</font> <font color="#FF6600">this</font> <font color="#FF6600">step</font></tt></pre>
+</div></div>
+<p>Return the list of languages the resource provides in order of preference.</p>
+<p>During content negotiation Cowboy will pick the most appropriate language for the client. The client advertises languages it prefers with the accept-language header. When that header is missing, Cowboy picks the first language from the resource.</p>
+<!-- @todo We should explain precisely how languages are picked.-->
+<p>Cowboy will add the negotiated <code>language</code> to the Req object after this step completes:</p>
+<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: #0000FF">language</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>
-}</tt></pre></div></div>
-</div>
-<div class="sect2">
+<pre><tt><b><font color="#000000">req</font></b>() <font color="#990000">::</font> #{
+ <font color="#0000FF">language</font> <font color="#990000">=&gt;</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% lowercase; case insensitive</font></i>
+}</tt></pre>
+</div></div>
<h3 id="_last_modified">last_modified</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">last_modified</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">last_modified</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">calendar:datetime</span></span>()
-<span style="color: #009900">Default</span> <span style="color: #990000">-</span> <span style="color: #FF6600">no</span> <span style="color: #FF6600">last</span> <span style="color: #FF6600">modified</span> <span style="color: #FF6600">value</span></tt></pre></div></div>
-<div class="paragraph"><p>Return the resource&#8217;s last modification date.</p></div>
-<div class="paragraph"><p>This date will be used to test against the if-modified-since
-and if-unmodified-since headers, and sent as the last-modified
-header in the response to GET and HEAD requests.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> <b><font color="#000000">calendar:datetime</font></b>()
+<font color="#009900">Default</font> <font color="#990000">-</font> <font color="#FF6600">no</font> <font color="#FF6600">last</font> <font color="#FF6600">modified</font> <font color="#FF6600">value</font></tt></pre>
+</div></div>
+<p>Return the resource&apos;s last modification date.</p>
+<p>This date will be used to test against the if-modified-since and if-unmodified-since headers, and sent as the last-modified header in the response to GET and HEAD requests.</p>
<h3 id="_malformed_request">malformed_request</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">malformed_request</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">malformed_request</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()
-<span style="color: #009900">Default</span> <span style="color: #990000">::</span> <span style="color: #000080">false</span></tt></pre></div></div>
-<div class="paragraph"><p>Return whether the request is malformed.</p></div>
-<div class="paragraph"><p>A request is malformed when a component required by the
-resource is invalid. This may include the query string
-or individual headers. They should be parsed and validated
-in this function. The body should not be read at this point.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> <b><font color="#000000">boolean</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <font color="#000080">false</font></tt></pre>
+</div></div>
+<p>Return whether the request is malformed.</p>
+<p>A request is malformed when a component required by the resource is invalid. This may include the query string or individual headers. They should be parsed and validated in this function. The body should not be read at this point.</p>
<h3 id="_moved_permanently">moved_permanently</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">moved_permanently</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">moved_permanently</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> {<span style="color: #000080">true</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: #000080">false</span>
-<span style="color: #009900">Default</span> <span style="color: #990000">::</span> <span style="color: #000080">false</span></tt></pre></div></div>
-<div class="paragraph"><p>Return whether the resource was permanently moved, and
-what its new location is.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> {<font color="#000080">true</font>, <font color="#009900">URI</font> <font color="#990000">::</font> <b><font color="#000000">iodata</font></b>()} | <font color="#000080">false</font>
+<font color="#009900">Default</font> <font color="#990000">::</font> <font color="#000080">false</font></tt></pre>
+</div></div>
+<p>Return whether the resource was permanently moved, and what its new location is.</p>
<h3 id="_moved_temporarily">moved_temporarily</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">moved_temporarily</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">moved_temporarily</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> {<span style="color: #000080">true</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: #000080">false</span>
-<span style="color: #009900">Default</span> <span style="color: #990000">::</span> <span style="color: #000080">false</span></tt></pre></div></div>
-<div class="paragraph"><p>Return whether the resource was temporarily moved, and
-what its new location is.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> {<font color="#000080">true</font>, <font color="#009900">URI</font> <font color="#990000">::</font> <b><font color="#000000">iodata</font></b>()} | <font color="#000080">false</font>
+<font color="#009900">Default</font> <font color="#990000">::</font> <font color="#000080">false</font></tt></pre>
+</div></div>
+<p>Return whether the resource was temporarily moved, and what its new location is.</p>
<h3 id="_multiple_choices">multiple_choices</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
-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">multiple_choices</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
-
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()
-<span style="color: #009900">Default</span> <span style="color: #990000">::</span> <span style="color: #000080">false</span></tt></pre></div></div>
-<div class="paragraph"><p>Return whether the client should engage in reactive
-negotiation.</p></div>
-<div class="paragraph"><p>Return <code>true</code> when the server has multiple representations
-of a resource, each with their specific identifier, but is
-unable to determine which is best for the client. For
-example an image might have different sizes and the server
-is unable to determine the capabilities of the client.</p></div>
-<div class="paragraph"><p>When returning <code>true</code> the server should send a body with
-links to the different representations. If the server has
-a preferred representation it can send its link inside a
-location header.</p></div>
-</div>
-<div class="sect2">
+<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><b><font color="#000000">multiple_choices</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
+
+<font color="#009900">Result</font> <font color="#990000">::</font> <b><font color="#000000">boolean</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <font color="#000080">false</font></tt></pre>
+</div></div>
+<p>Return whether the client should engage in reactive negotiation.</p>
+<p>Return <code>true</code> when the server has multiple representations of a resource, each with their specific identifier, but is unable to determine which is best for the client. For example an image might have different sizes and the server is unable to determine the capabilities of the client.</p>
+<p>When returning <code>true</code> the server should send a body with links to the different representations. If the server has a preferred representation it can send its link inside a location header.</p>
<h3 id="_options">options</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">options</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}</tt></pre></div></div>
-<div class="paragraph"><p>Respond to an OPTIONS request.</p></div>
-<div class="paragraph"><p>The response should inform the client the communication
-options available for this resource. By default Cowboy
-will send a <em>200 OK</em> response with the allow header set.</p></div>
-</div>
-<div class="sect2">
+<pre><tt><b><font color="#000000">options</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}</tt></pre>
+</div></div>
+<p>Respond to an OPTIONS request.</p>
+<p>The response should inform the client the communication options available for this resource. By default Cowboy will send a <em>200 OK</em> response with the allow header set.</p>
<h3 id="_previously_existed">previously_existed</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">previously_existed</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">previously_existed</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()
-<span style="color: #009900">Default</span> <span style="color: #990000">::</span> <span style="color: #000080">false</span></tt></pre></div></div>
-<div class="paragraph"><p>Return whether the resource existed previously.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> <b><font color="#000000">boolean</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <font color="#000080">false</font></tt></pre>
+</div></div>
+<p>Return whether the resource existed previously.</p>
<h3 id="_providecallback">ProvideCallback</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">ProvideCallback</span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><font color="#009900">ProvideCallback</font>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:resp_body</span></span>()
-<span style="color: #009900">Default</span> <span style="color: #990000">-</span> <span style="color: #FF6600">crash</span></tt></pre></div></div>
-<div class="paragraph"><p>Return the response body.</p></div>
-<div class="paragraph"><p>The response body can be provided either as the actual data
-to be sent or a tuple indicating which file to send.</p></div>
-<div class="paragraph"><p>This function is called for both GET and HEAD requests. For
-the latter the body is not sent, however.</p></div>
-<div class="paragraph"><p>Note that there used to be a way to stream the response body.
-It was temporarily removed and will be added back in a later
-release.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:resp_body</font></b>()
+<font color="#009900">Default</font> <font color="#990000">-</font> <font color="#FF6600">crash</font></tt></pre>
+</div></div>
+<p>Return the response body.</p>
+<p>The response body can be provided either as the actual data to be sent or a tuple indicating which file to send.</p>
+<p>This function is called for both GET and HEAD requests. For the latter the body is not sent, however.</p>
+<!-- @todo Perhaps we can optimize HEAD requests and just-->
+<!-- allow calculating the length instead of returning the-->
+<!-- whole thing.-->
+<p>Note that there used to be a way to stream the response body. It was temporarily removed and will be added back in a later release.</p>
+<!-- @todo Add a way to switch to loop handler for streaming the body.-->
<h3 id="_resource_exists">resource_exists</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">resource_exists</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">resource_exists</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()
-<span style="color: #009900">Default</span> <span style="color: #990000">::</span> <span style="color: #000080">true</span></tt></pre></div></div>
-<div class="paragraph"><p>Return whether the resource exists.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> <b><font color="#000000">boolean</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <font color="#000080">true</font></tt></pre>
+</div></div>
+<p>Return whether the resource exists.</p>
<h3 id="_service_available">service_available</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">service_available</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">service_available</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()
-<span style="color: #009900">Default</span> <span style="color: #990000">::</span> <span style="color: #000080">true</span></tt></pre></div></div>
-<div class="paragraph"><p>Return whether the service is available.</p></div>
-<div class="paragraph"><p>A <em>503 Service Unavailable</em> response will be sent when this
-function returns <code>false</code>.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> <b><font color="#000000">boolean</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <font color="#000080">true</font></tt></pre>
+</div></div>
+<p>Return whether the service is available.</p>
+<p>A <em>503 Service Unavailable</em> response will be sent when this function returns <code>false</code>.</p>
<h3 id="_uri_too_long">uri_too_long</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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_too_long</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">uri_too_long</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()
-<span style="color: #009900">Default</span> <span style="color: #990000">::</span> <span style="color: #000080">false</span></tt></pre></div></div>
-<div class="paragraph"><p>Return whether the requested URI is too long.</p></div>
-<div class="paragraph"><p>This function can be used to further restrict the length
-of the URI for this specific resource.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> <b><font color="#000000">boolean</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <font color="#000080">false</font></tt></pre>
+</div></div>
+<p>Return whether the requested URI is too long.</p>
+<p>This function can be used to further restrict the length of the URI for this specific resource.</p>
<h3 id="_valid_content_headers">valid_content_headers</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">valid_content_headers</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">valid_content_headers</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()
-<span style="color: #009900">Default</span> <span style="color: #990000">::</span> <span style="color: #000080">true</span></tt></pre></div></div>
-<div class="paragraph"><p>Return whether the content headers are valid.</p></div>
-<div class="paragraph"><p>This callback can be used to reject requests that have
-invalid content header values, for example an unsupported
-content-encoding.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> <b><font color="#000000">boolean</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <font color="#000080">true</font></tt></pre>
+</div></div>
+<p>Return whether the content headers are valid.</p>
+<p>This callback can be used to reject requests that have invalid content header values, for example an unsupported content-encoding.</p>
<h3 id="_valid_entity_length">valid_entity_length</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">valid_entity_length</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">valid_entity_length</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()
-<span style="color: #009900">Default</span> <span style="color: #990000">::</span> <span style="color: #000080">true</span></tt></pre></div></div>
-<div class="paragraph"><p>Return whether the request body length is within acceptable boundaries.</p></div>
-<div class="paragraph"><p>A <em>413 Request Entity Too Large</em> response will be sent if this
-function returns <code>false</code>.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> <b><font color="#000000">boolean</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <font color="#000080">true</font></tt></pre>
+</div></div>
+<p>Return whether the request body length is within acceptable boundaries.</p>
+<p>A <em>413 Request Entity Too Large</em> response will be sent if this function returns <code>false</code>.</p>
<h3 id="_variances">variances</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">variances</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">variances</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</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 insensitive</span></span>
-<span style="color: #009900">Default</span> <span style="color: #990000">::</span> []</tt></pre></div></div>
-<div class="paragraph"><p>Return the list of request headers that affect the
-representation of the resource.</p></div>
-<div class="paragraph"><p>Cowboy automatically adds the accept, accept-charset and
-accept-language headers when necessary.</p></div>
-</div>
-</div>
-</div>
-<div class="sect1">
+<font color="#009900">Result</font> <font color="#990000">::</font> [<b><font color="#000080">binary</font></b>()] <i><font color="#9A1900">%% case insensitive</font></i>
+<font color="#009900">Default</font> <font color="#990000">::</font> []</tt></pre>
+</div></div>
+<p>Return the list of request headers that affect the representation of the resource.</p>
+<p>Cowboy automatically adds the accept, accept-charset and accept-language headers when necessary.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.1</strong>: The <code>switch_handler</code> return value was added.
-</p>
+<ul><li><strong>2.1</strong>: The <code>switch_handler</code> return value was added.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Behavior introduced.
-</p>
+<li><strong>1.0</strong>: Behavior introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="..">cowboy(7)</a>,
-<a href="../cowboy_handler">cowboy_handler(3)</a></p></div>
-</div>
-</div>
+<p><a href="..">cowboy(7)</a>, <a href="../cowboy_handler">cowboy_handler(3)</a></p>
+
diff --git a/docs/en/cowboy/2.1/manual/cowboy_router.compile/index.html b/docs/en/cowboy/2.1/manual/cowboy_router.compile/index.html
index abdeecbd..2eb79d71 100644
--- a/docs/en/cowboy/2.1/manual/cowboy_router.compile/index.html
+++ b/docs/en/cowboy/2.1/manual/cowboy_router.compile/index.html
@@ -62,87 +62,48 @@
<h1 class="lined-header"><span>cowboy_router:compile(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_router:compile - Compile routes to the resources</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_router:compile - Compile routes to the resources</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">compile</span></span>(<span style="font-weight: bold"><span style="color: #000000">cowboy_router:routes</span></span>()) <span style="color: #990000">-&gt;</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_router:dispatch_rules</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Compile routes to the resources.</p></div>
-<div class="paragraph"><p>Takes a human readable list of routes and transforms it
-into a form more efficient to process.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">compile</font></b>(<b><font color="#000000">cowboy_router:routes</font></b>()) <font color="#990000">-&gt;</font> <b><font color="#000000">cowboy_router:dispatch_rules</font></b>()</tt></pre>
+</div></div>
+<p>Compile routes to the resources.</p>
+<p>Takes a human readable list of routes and transforms it into a form more efficient to process.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Routes
-</dt>
-<dd>
-<p>
-Human readable list of routes.
-</p>
+<dl><dt>Routes</dt>
+<dd><p>Human readable list of routes.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>An opaque dispatch rules value is returned. This value
-must be given to Cowboy as a middleware environment value.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>An opaque dispatch rules value is returned. This value must be given to Cowboy as a middleware environment value.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<ul><li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Compile routes and start a listener</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Compile routes and start a listener</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">Dispatch</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_router:compile</span></span>([
- {<span style="color: #FF6600">'_'</span>, [
- {<span style="color: #FF0000">"/"</span>, <span style="color: #FF6600">toppage_h</span>, []},
- {<span style="color: #FF0000">"/[...], cowboy_static, {priv_dir, my_example_app, ""}}</span>
-<span style="color: #FF0000"> ]}</span>
-<span style="color: #FF0000">]),</span>
-
-<span style="color: #FF0000">{ok, _} = cowboy:start_clear(example, [{port, 8080}], #{</span>
-<span style="color: #FF0000"> env =&gt; #{dispatch =&gt; Dispatch}</span>
-<span style="color: #FF0000">}).</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Dispatch</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_router:compile</font></b>([
+ {<font color="#FF6600">'_'</font>, [
+ {<font color="#FF0000">"/"</font>, <font color="#FF6600">toppage_h</font>, []},
+ {<font color="#FF0000">"/[...], cowboy_static, {priv_dir, my_example_app, ""}}</font>
+<font color="#FF0000"> ]}</font>
+<font color="#FF0000">]),</font>
+
+<font color="#FF0000">{ok, _} = cowboy:start_clear(example, [{port, 8080}], #{</font>
+<font color="#FF0000"> env =&gt; #{dispatch =&gt; Dispatch}</font>
+<font color="#FF0000">}).</font></tt></pre>
+</div></div>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../cowboy_router">cowboy_router(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_router">cowboy_router(3)</a></p>
+
diff --git a/docs/en/cowboy/2.1/manual/cowboy_router/index.html b/docs/en/cowboy/2.1/manual/cowboy_router/index.html
index 9f7da3de..a6732ddf 100644
--- a/docs/en/cowboy/2.1/manual/cowboy_router/index.html
+++ b/docs/en/cowboy/2.1/manual/cowboy_router/index.html
@@ -62,110 +62,65 @@
<h1 class="lined-header"><span>cowboy_router(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_router - Router middleware</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_router - Router middleware</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <code>cowboy_router</code> middleware maps the requested host and
-path to the handler to be used for processing the request.</p></div>
-<div class="paragraph"><p>The router takes the <code>dispatch</code> rules as input from the
-middleware environment. Dispatch rules are generated by
-calling the
-<a href="../cowboy_router.compile">cowboy_router:compile(3)</a>
-function.</p></div>
-<div class="paragraph"><p>When a route matches, the router sets the <code>handler</code> and
-<code>handler_opts</code> middleware environment values containing
-the handler module and initial state, respectively.</p></div>
-<div class="paragraph"><p>The router will stop execution when no route matches.
-It will send a 400 response if no host was found, and
-a 404 response otherwise.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The <code>cowboy_router</code> middleware maps the requested host and path to the handler to be used for processing the request.</p>
+<p>The router takes the <code>dispatch</code> rules as input from the middleware environment. Dispatch rules are generated by calling the <a href="../cowboy_router.compile">cowboy_router:compile(3)</a> function.</p>
+<p>When a route matches, the router sets the <code>handler</code> and <code>handler_opts</code> middleware environment values containing the handler module and initial state, respectively.</p>
+<p>The router will stop execution when no route matches. It will send a 400 response if no host was found, and a 404 response otherwise.</p>
<h2 id="_exports">Exports</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../cowboy_router.compile">cowboy_router:compile(3)</a> - Compile routes to the resources
-</p>
+<ul><li><a href="../cowboy_router.compile">cowboy_router:compile(3)</a> - Compile routes to the resources
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_types">Types</h2>
-<div class="sectionbody">
-<div class="sect2">
<h3 id="_bindings">bindings()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">bindings</span></span>() <span style="color: #990000">::</span> #{<span style="font-weight: bold"><span style="color: #000080">atom</span></span>() <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>Bindings found during routing.</p></div>
-</div>
-<div class="sect2">
+<pre><tt><b><font color="#000000">bindings</font></b>() <font color="#990000">::</font> #{<b><font color="#000080">atom</font></b>() <font color="#990000">=&gt;</font> <b><font color="#000000">any</font></b>()}</tt></pre>
+</div></div>
+<p>Bindings found during routing.</p>
<h3 id="_dispatch_rules">dispatch_rules()</h3>
-<div class="paragraph"><p>Opaque type containing the compiled routes.</p></div>
-</div>
-<div class="sect2">
+<p>Opaque type containing the compiled routes.</p>
<h3 id="_routes">routes()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">routes</span></span>() <span style="color: #990000">=</span> [
- {<span style="color: #009900">Host</span>, <span style="color: #009900">PathList</span>} |
- {<span style="color: #009900">Host</span>, <span style="color: #009900">Fields</span>, <span style="color: #009900">PathList</span>}
+<pre><tt><b><font color="#000000">routes</font></b>() <font color="#990000">=</font> [
+ {<font color="#009900">Host</font>, <font color="#009900">PathList</font>} |
+ {<font color="#009900">Host</font>, <font color="#009900">Fields</font>, <font color="#009900">PathList</font>}
]
-<span style="color: #009900">PathList</span> <span style="color: #990000">::</span> [
- {<span style="color: #009900">Path</span>, <span style="color: #009900">Handler</span>, <span style="color: #009900">InitialState</span>} |
- {<span style="color: #009900">Path</span>, <span style="color: #009900">Fields</span>, <span style="color: #009900">Handler</span>, <span style="color: #009900">InitialState</span>}
+<font color="#009900">PathList</font> <font color="#990000">::</font> [
+ {<font color="#009900">Path</font>, <font color="#009900">Handler</font>, <font color="#009900">InitialState</font>} |
+ {<font color="#009900">Path</font>, <font color="#009900">Fields</font>, <font color="#009900">Handler</font>, <font color="#009900">InitialState</font>}
]
-<span style="color: #009900">Host</span> <span style="color: #990000">::</span> <span style="color: #FF6600">'_'</span> | <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>()
-<span style="color: #009900">Path</span> <span style="color: #990000">::</span> <span style="color: #FF6600">'_'</span> | <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>()
-<span style="color: #009900">Fields</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:fields</span></span>()
-<span style="color: #009900">Handler</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">module</span></span>()
-<span style="color: #009900">InitialState</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>Human readable list of routes to handlers.</p></div>
-<div class="paragraph"><p>Cowboy uses this list to map hosts and paths, optionally
-augmented with constraints applied to the bindings, to
-handler modules.</p></div>
-<div class="paragraph"><p>The syntax for routes is currently defined in the user guide.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Host</font> <font color="#990000">::</font> <font color="#FF6600">'_'</font> | <b><font color="#000000">iodata</font></b>()
+<font color="#009900">Path</font> <font color="#990000">::</font> <font color="#FF6600">'_'</font> | <b><font color="#000000">iodata</font></b>()
+<font color="#009900">Fields</font> <font color="#990000">::</font> <b><font color="#000000">cowboy:fields</font></b>()
+<font color="#009900">Handler</font> <font color="#990000">::</font> <b><font color="#000000">module</font></b>()
+<font color="#009900">InitialState</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()</tt></pre>
+</div></div>
+<p>Human readable list of routes to handlers.</p>
+<p>Cowboy uses this list to map hosts and paths, optionally augmented with constraints applied to the bindings, to handler modules.</p>
+<p>The syntax for routes is currently defined in the user guide.</p>
+<!-- @todo The syntax should probably be in this module,-->
+<!-- and the user guide show more practical examples.-->
<h3 id="_tokens">tokens()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">tokens</span></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>List of <code>host_info</code> and <code>path_info</code> tokens that were found
-using the <code>...</code> syntax.</p></div>
-</div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">tokens</font></b>() <font color="#990000">::</font> [<b><font color="#000080">binary</font></b>()]</tt></pre>
+</div></div>
+<p>List of <code>host_info</code> and <code>path_info</code> tokens that were found using the <code>...</code> syntax.</p>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="..">cowboy(7)</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>,
-<a href="../cowboy_req.path_info">cowboy_req:path_info(3)</a></p></div>
-</div>
-</div>
+<p><a href="..">cowboy(7)</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>, <a href="../cowboy_req.path_info">cowboy_req:path_info(3)</a></p>
+
diff --git a/docs/en/cowboy/2.1/manual/cowboy_static/index.html b/docs/en/cowboy/2.1/manual/cowboy_static/index.html
index b830e580..8ce3f0b1 100644
--- a/docs/en/cowboy/2.1/manual/cowboy_static/index.html
+++ b/docs/en/cowboy/2.1/manual/cowboy_static/index.html
@@ -62,175 +62,110 @@
<h1 class="lined-header"><span>cowboy_static(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_static - Static file handler</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_static - Static file handler</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The module <code>cowboy_static</code> implements file serving capabilities
-using the REST semantics provided by <code>cowboy_rest</code>.</p></div>
-<div class="paragraph"><p>The static file handler is a pre-written handler coming with
-Cowboy. To serve files, use it in your routes.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The module <code>cowboy_static</code> implements file serving capabilities using the REST semantics provided by <code>cowboy_rest</code>.</p>
+<p>The static file handler is a pre-written handler coming with Cowboy. To serve files, use it in your routes.</p>
<h2 id="_options">Options</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">opts</span></span>() <span style="color: #990000">::</span> {<span style="color: #FF6600">priv_file</span>, <span style="color: #009900">App</span>, <span style="color: #009900">Path</span>}
- | {<span style="color: #FF6600">priv_file</span>, <span style="color: #009900">App</span>, <span style="color: #009900">Path</span>, <span style="color: #009900">Extra</span>}
- | {<span style="color: #FF6600">file</span>, <span style="color: #009900">Path</span>}
- | {<span style="color: #FF6600">file</span>, <span style="color: #009900">Path</span>, <span style="color: #009900">Extra</span>}
- | {<span style="color: #FF6600">priv_dir</span>, <span style="color: #009900">App</span>, <span style="color: #009900">Path</span>}
- | {<span style="color: #FF6600">priv_dir</span>, <span style="color: #009900">App</span>, <span style="color: #009900">Path</span>, <span style="color: #009900">Extra</span>}
- | {<span style="color: #FF6600">dir</span>, <span style="color: #009900">Path</span>}
- | {<span style="color: #FF6600">dir</span>, <span style="color: #009900">Path</span>, <span style="color: #009900">Extra</span>}
-
-<span style="color: #009900">App</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">atom</span></span>()
-<span style="color: #009900">Path</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>() | <span style="font-weight: bold"><span style="color: #000000">string</span></span>()
-<span style="color: #009900">Extra</span> <span style="color: #990000">::</span> [<span style="color: #009900">Etag</span> | <span style="color: #009900">Mimetypes</span>]
-
-<span style="color: #009900">Etag</span> <span style="color: #990000">::</span> {<span style="color: #FF6600">etag</span>, <span style="font-weight: bold"><span style="color: #000000">module</span></span>(), <span style="font-weight: bold"><span style="color: #000080">function</span></span>()}
- | {<span style="color: #FF6600">etag</span>, <span style="color: #000080">false</span>}
-
-<span style="color: #009900">Mimetypes</span> <span style="color: #990000">::</span> {<span style="color: #FF6600">mimetypes</span>, <span style="font-weight: bold"><span style="color: #000000">module</span></span>(), <span style="font-weight: bold"><span style="color: #000080">function</span></span>()}
- | {<span style="color: #FF6600">mimetypes</span>, <span style="font-weight: bold"><span style="color: #000080">binary</span></span>() | <span style="color: #009900">ParsedMime</span>}
-
-<span style="color: #009900">ParsedMime</span> <span style="color: #990000">::</span> {<span style="color: #009900">Type</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="color: #009900">SubType</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="color: #009900">Params</span>}
-<span style="color: #009900">Params</span> <span style="color: #990000">::</span> [{<span style="color: #009900">Key</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="color: #009900">Value</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>Static handler configuration.</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-priv_file
-</dt>
-<dd>
-<p>
-Send a file.
-</p>
-<div class="paragraph"><p>The path is relative to the given application&#8217;s private
-directory.</p></div>
+<pre><tt><b><font color="#000000">opts</font></b>() <font color="#990000">::</font> {<font color="#FF6600">priv_file</font>, <font color="#009900">App</font>, <font color="#009900">Path</font>}
+ | {<font color="#FF6600">priv_file</font>, <font color="#009900">App</font>, <font color="#009900">Path</font>, <font color="#009900">Extra</font>}
+ | {<font color="#FF6600">file</font>, <font color="#009900">Path</font>}
+ | {<font color="#FF6600">file</font>, <font color="#009900">Path</font>, <font color="#009900">Extra</font>}
+ | {<font color="#FF6600">priv_dir</font>, <font color="#009900">App</font>, <font color="#009900">Path</font>}
+ | {<font color="#FF6600">priv_dir</font>, <font color="#009900">App</font>, <font color="#009900">Path</font>, <font color="#009900">Extra</font>}
+ | {<font color="#FF6600">dir</font>, <font color="#009900">Path</font>}
+ | {<font color="#FF6600">dir</font>, <font color="#009900">Path</font>, <font color="#009900">Extra</font>}
+
+<font color="#009900">App</font> <font color="#990000">::</font> <b><font color="#000080">atom</font></b>()
+<font color="#009900">Path</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() | <b><font color="#000000">string</font></b>()
+<font color="#009900">Extra</font> <font color="#990000">::</font> [<font color="#009900">Etag</font> | <font color="#009900">Mimetypes</font>]
+
+<font color="#009900">Etag</font> <font color="#990000">::</font> {<font color="#FF6600">etag</font>, <b><font color="#000000">module</font></b>(), <b><font color="#000080">function</font></b>()}
+ | {<font color="#FF6600">etag</font>, <font color="#000080">false</font>}
+
+<font color="#009900">Mimetypes</font> <font color="#990000">::</font> {<font color="#FF6600">mimetypes</font>, <b><font color="#000000">module</font></b>(), <b><font color="#000080">function</font></b>()}
+ | {<font color="#FF6600">mimetypes</font>, <b><font color="#000080">binary</font></b>() | <font color="#009900">ParsedMime</font>}
+
+<font color="#009900">ParsedMime</font> <font color="#990000">::</font> {<font color="#009900">Type</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">SubType</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">Params</font>}
+<font color="#009900">Params</font> <font color="#990000">::</font> [{<font color="#009900">Key</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()}]</tt></pre>
+</div></div>
+<p>Static handler configuration.</p>
+<dl><dt>priv_file</dt>
+<dd><p>Send a file.</p>
+<p>The path is relative to the given application&apos;s private directory.</p>
</dd>
-<dt class="hdlist1">
-file
-</dt>
-<dd>
-<p>
-Send a file.
-</p>
-<div class="paragraph"><p>The path is either absolute or relative to the Erlang node&#8217;s
-current directory.</p></div>
+<dt>file</dt>
+<dd><p>Send a file.</p>
+<p>The path is either absolute or relative to the Erlang node&apos;s current directory.</p>
</dd>
-<dt class="hdlist1">
-priv_dir
-</dt>
-<dd>
-<p>
-Recursively serve files from a directory.
-</p>
-<div class="paragraph"><p>The path is relative to the given application&#8217;s private
-directory.</p></div>
+<dt>priv_dir</dt>
+<dd><p>Recursively serve files from a directory.</p>
+<p>The path is relative to the given application&apos;s private directory.</p>
</dd>
-<dt class="hdlist1">
-dir
-</dt>
-<dd>
-<p>
-Recursively serve files from a directory.
-</p>
-<div class="paragraph"><p>The path is either absolute or relative to the Erlang node&#8217;s
-current directory.</p></div>
+<dt>dir</dt>
+<dd><p>Recursively serve files from a directory.</p>
+<p>The path is either absolute or relative to the Erlang node&apos;s current directory.</p>
</dd>
-</dl></div>
-<div class="paragraph"><p>The extra options allow you to define how the etag should be
-calculated and how the MIME type of files should be detected.</p></div>
-<div class="paragraph"><p>By default the static handler will generate an etag based
-on the size and modification time of the file. You may disable
-the etag entirely with <code>{etag, false}</code> or provide a module
-and function that will be called when needed:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+</dl>
+<p>The extra options allow you to define how the etag should be calculated and how the MIME type of files should be detected.</p>
+<p>By default the static handler will generate an etag based on the size and modification time of the file. You may disable the etag entirely with <code>{etag, false}</code> or provide a module and function that will be called when needed:</p>
+<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">generate_etag</span></span>(<span style="color: #009900">Path</span>, <span style="color: #009900">Size</span>, <span style="color: #009900">Mtime</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #FF6600">strong</span> | <span style="color: #FF6600">weak</span>, <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()}
-
-<span style="color: #009900">Path</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()
-<span style="color: #009900">Size</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>()
-<span style="color: #009900">Mtime</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">file:date_time</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>By default the static handler will detect Web-related MIME types
-by looking at the file extension. You can provide a specific
-MIME type that will always be used, or a module and function that
-will be called when needed:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">generate_etag</font></b>(<font color="#009900">Path</font>, <font color="#009900">Size</font>, <font color="#009900">Mtime</font>) <font color="#990000">-&gt;</font> {<font color="#FF6600">strong</font> | <font color="#FF6600">weak</font>, <b><font color="#000080">binary</font></b>()}
+
+<font color="#009900">Path</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()
+<font color="#009900">Size</font> <font color="#990000">::</font> <b><font color="#000000">non_neg_integer</font></b>()
+<font color="#009900">Mtime</font> <font color="#990000">::</font> <b><font color="#000000">file:date_time</font></b>()</tt></pre>
+</div></div>
+<p>By default the static handler will detect Web-related MIME types by looking at the file extension. You can provide a specific MIME type that will always be used, or a module and function that will be called when needed:</p>
+<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">detect_mimetype</span></span>(<span style="color: #009900">Path</span>) <span style="color: #990000">-&gt;</span> <span style="color: #009900">ParsedMime</span>
-
-<span style="color: #009900">Path</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()
-<span style="color: #009900">ParsedMime</span> <span style="color: #990000">::</span> {<span style="color: #009900">Type</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="color: #009900">SubType</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="color: #009900">Params</span>}
-<span style="color: #009900">Params</span> <span style="color: #990000">::</span> [{<span style="color: #009900">Key</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="color: #009900">Value</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>Cowboy comes with two such functions; the default function
-<code>cow_mimetypes:web/1</code>, and a second function generated from
-the Apache <em>mime.types</em> file, <code>cow_mimetypes:all/1</code>.</p></div>
-<div class="paragraph"><p>The MIME type function should return
-<code>{&lt;&lt;"application"&gt;&gt;, &lt;&lt;"octet-stream"&gt;&gt;, []}</code>
-when it fails to detect a file&#8217;s MIME type.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">detect_mimetype</font></b>(<font color="#009900">Path</font>) <font color="#990000">-&gt;</font> <font color="#009900">ParsedMime</font>
+
+<font color="#009900">Path</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()
+<font color="#009900">ParsedMime</font> <font color="#990000">::</font> {<font color="#009900">Type</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">SubType</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">Params</font>}
+<font color="#009900">Params</font> <font color="#990000">::</font> [{<font color="#009900">Key</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()}]</tt></pre>
+</div></div>
+<!-- @todo Case sensitivity of parsed mime content?-->
+<p>Cowboy comes with two such functions; the default function <code>cow_mimetypes:web/1</code>, and a second function generated from the Apache <em>mime.types</em> file, <code>cow_mimetypes:all/1</code>.</p>
+<p>The MIME type function should return <code>{&lt;&lt;&quot;application&quot;&gt;&gt;, &lt;&lt;&quot;octet-stream&quot;&gt;&gt;, []}</code> when it fails to detect a file&apos;s MIME type.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>1.0</strong>: Handler introduced.
-</p>
+<ul><li><strong>1.0</strong>: Handler introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Custom etag function</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Custom etag function</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">generate_etag</span></span>(<span style="color: #009900">Path</span>, <span style="color: #009900">Size</span>, <span style="color: #009900">Mtime</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">strong</span>, <span style="font-weight: bold"><span style="color: #000000">integer_to_binary</span></span>(
- <span style="font-weight: bold"><span style="color: #000000">erlang:phash2</span></span>({<span style="color: #009900">Path</span>, <span style="color: #009900">Size</span>, <span style="color: #009900">Mtime</span>}, <span style="color: #993399">16#ffffffff</span>))}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Custom MIME type function</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">generate_etag</font></b>(<font color="#009900">Path</font>, <font color="#009900">Size</font>, <font color="#009900">Mtime</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">strong</font>, <b><font color="#000000">integer_to_binary</font></b>(
+ <b><font color="#000000">erlang:phash2</font></b>({<font color="#009900">Path</font>, <font color="#009900">Size</font>, <font color="#009900">Mtime</font>}, <font color="#993399">16#ffffffff</font>))}<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Custom MIME type function</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">always_octet_stream</span></span>(<span style="color: #009900">_Path</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">filename:extension</span></span>(<span style="color: #009900">Path</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">".erl"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">-&gt;</span> {<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"plain"</span><span style="color: #990000">&gt;&gt;</span>, []};
- <span style="color: #990000">_</span> <span style="color: #990000">-&gt;</span> {<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"application"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"octet-stream"</span><span style="color: #990000">&gt;&gt;</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">
+<pre><tt><b><font color="#000000">always_octet_stream</font></b>(<font color="#009900">_Path</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">case</font></b> <b><font color="#000000">filename:extension</font></b>(<font color="#009900">Path</font>) <b><font color="#0000FF">of</font></b>
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">".erl"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">-&gt;</font> {<font color="#990000">&lt;&lt;</font><font color="#FF0000">"text"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"plain"</font><font color="#990000">&gt;&gt;</font>, []};
+ <font color="#990000">_</font> <font color="#990000">-&gt;</font> {<font color="#990000">&lt;&lt;</font><font color="#FF0000">"application"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"octet-stream"</font><font color="#990000">&gt;&gt;</font>, []}
+ <b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="..">cowboy(7)</a>,
-<a href="../cowboy_router">cowboy_router(3)</a></p></div>
-</div>
-</div>
+<p><a href="..">cowboy(7)</a>, <a href="../cowboy_router">cowboy_router(3)</a></p>
+
diff --git a/docs/en/cowboy/2.1/manual/cowboy_stream/index.html b/docs/en/cowboy/2.1/manual/cowboy_stream/index.html
index a4c41e30..52702c01 100644
--- a/docs/en/cowboy/2.1/manual/cowboy_stream/index.html
+++ b/docs/en/cowboy/2.1/manual/cowboy_stream/index.html
@@ -62,411 +62,282 @@
<h1 class="lined-header"><span>cowboy_stream(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_handler - Stream handlers</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_handler - Stream handlers</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The module <code>cowboy_stream</code> defines a callback interface
-and a protocol for handling HTTP streams.</p></div>
-<div class="paragraph"><p>An HTTP request and its associated response is called
-a stream. A connection may have many streams. In HTTP/1.1
-they are executed sequentially, while in HTTP/2 they are
-executed concurrently.</p></div>
-<div class="paragraph"><p>Cowboy calls the stream handler for nearly all events
-related to a stream. Exceptions vary depending on the
-protocol.</p></div>
-<div class="paragraph"><p>Extra care must be taken when implementing stream handlers
-to ensure compatibility. While some modification of the
-events and commands is allowed, it is generally not a good
-idea to completely omit them.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The module <code>cowboy_stream</code> defines a callback interface and a protocol for handling HTTP streams.</p>
+<p>An HTTP request and its associated response is called a stream. A connection may have many streams. In HTTP/1.1 they are executed sequentially, while in HTTP/2 they are executed concurrently.</p>
+<p>Cowboy calls the stream handler for nearly all events related to a stream. Exceptions vary depending on the protocol.</p>
+<p>Extra care must be taken when implementing stream handlers to ensure compatibility. While some modification of the events and commands is allowed, it is generally not a good idea to completely omit them.</p>
<h2 id="_callbacks">Callbacks</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Stream handlers must implement the following interface:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Stream handlers must implement the following interface:</p>
+<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">init</span></span>(<span style="color: #009900">StreamID</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">Opts</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Commands</span>, <span style="color: #009900">State</span>}
-<span style="font-weight: bold"><span style="color: #000000">data</span></span>(<span style="color: #009900">StreamID</span>, <span style="color: #009900">IsFin</span>, <span style="color: #009900">Data</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Commands</span>, <span style="color: #009900">State</span>}
-<span style="font-weight: bold"><span style="color: #000000">info</span></span>(<span style="color: #009900">StreamID</span>, <span style="color: #009900">Info</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Commands</span>, <span style="color: #009900">State</span>}
-<span style="font-weight: bold"><span style="color: #000000">terminate</span></span>(<span style="color: #009900">StreamID</span>, <span style="color: #009900">Reason</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()
-<span style="font-weight: bold"><span style="color: #000000">early_error</span></span>(<span style="color: #009900">StreamID</span>, <span style="color: #009900">Reason</span>, <span style="color: #009900">PartialReq</span>, <span style="color: #009900">Resp</span>, <span style="color: #009900">Opts</span>) <span style="color: #990000">-&gt;</span> <span style="color: #009900">Resp</span>
-
-<span style="color: #009900">StreamID</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_stream:streamid</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">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:opts</span></span>()
-<span style="color: #009900">Commands</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_stream:commands</span></span>()
-<span style="color: #009900">State</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()
-<span style="color: #009900">IsFin</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_stream:fin</span></span>()
-<span style="color: #009900">Data</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()
-<span style="color: #009900">Info</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()
-<span style="color: #009900">Reason</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_stream:reason</span></span>()
-<span style="color: #009900">PartialReq</span> <span style="color: #990000">-</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:req</span></span>(), <span style="color: #FF6600">except</span> <span style="color: #FF6600">all</span> <span style="color: #FF6600">fields</span> <span style="color: #FF6600">are</span> <span style="color: #FF6600">optional</span>
-<span style="color: #009900">Resp</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_stream:resp_command</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>HTTP/1.1 will initialize a stream only when the request-line
-and all headers have been received. When errors occur before
-that point Cowboy will call the callback <code>early_error/5</code>
-with a partial request, the error reason and the response
-Cowboy intends to send. All other events go throuh the
-stream handler using the normal callbacks.</p></div>
-<div class="paragraph"><p>HTTP/2 will initialize the stream when the <code>HEADERS</code> block has
-been fully received and decoded. Any protocol error occuring
-before that will not result in a response being sent and
-will therefore not go through the stream handler. In addition
-Cowboy may terminate streams without sending an HTTP response
-back.</p></div>
-<div class="paragraph"><p>The stream is initialized by calling <code>init/3</code>. All streams
-that are initialized will eventually be terminated by calling
-<code>terminate/3</code>.</p></div>
-<div class="paragraph"><p>When Cowboy receives data for the stream it will call <code>data/4</code>.
-The data given is the request body after any transfer decoding
-has been applied.</p></div>
-<div class="paragraph"><p>When Cowboy receives a message addressed to a stream, or when
-Cowboy needs to inform the stream handler that an internal
-event has occurred, it will call <code>info/3</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">StreamID</font>, <font color="#009900">Req</font>, <font color="#009900">Opts</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Commands</font>, <font color="#009900">State</font>}
+<b><font color="#000000">data</font></b>(<font color="#009900">StreamID</font>, <font color="#009900">IsFin</font>, <font color="#009900">Data</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Commands</font>, <font color="#009900">State</font>}
+<b><font color="#000000">info</font></b>(<font color="#009900">StreamID</font>, <font color="#009900">Info</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Commands</font>, <font color="#009900">State</font>}
+<b><font color="#000000">terminate</font></b>(<font color="#009900">StreamID</font>, <font color="#009900">Reason</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> <b><font color="#000000">any</font></b>()
+<b><font color="#000000">early_error</font></b>(<font color="#009900">StreamID</font>, <font color="#009900">Reason</font>, <font color="#009900">PartialReq</font>, <font color="#009900">Resp</font>, <font color="#009900">Opts</font>) <font color="#990000">-&gt;</font> <font color="#009900">Resp</font>
+
+<font color="#009900">StreamID</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_stream:streamid</font></b>()
+<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()
+<font color="#009900">Opts</font> <font color="#990000">::</font> <b><font color="#000000">cowboy:opts</font></b>()
+<font color="#009900">Commands</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_stream:commands</font></b>()
+<font color="#009900">State</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()
+<font color="#009900">IsFin</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_stream:fin</font></b>()
+<font color="#009900">Data</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()
+<font color="#009900">Info</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()
+<font color="#009900">Reason</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_stream:reason</font></b>()
+<font color="#009900">PartialReq</font> <font color="#990000">-</font> <b><font color="#000000">cowboy_req:req</font></b>(), <font color="#FF6600">except</font> <font color="#FF6600">all</font> <font color="#FF6600">fields</font> <font color="#FF6600">are</font> <font color="#FF6600">optional</font>
+<font color="#009900">Resp</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_stream:resp_command</font></b>()</tt></pre>
+</div></div>
+<p>HTTP/1.1 will initialize a stream only when the request-line and all headers have been received. When errors occur before that point Cowboy will call the callback <code>early_error/5</code> with a partial request, the error reason and the response Cowboy intends to send. All other events go throuh the stream handler using the normal callbacks.</p>
+<p>HTTP/2 will initialize the stream when the <code>HEADERS</code> block has been fully received and decoded. Any protocol error occuring before that will not result in a response being sent and will therefore not go through the stream handler. In addition Cowboy may terminate streams without sending an HTTP response back.</p>
+<p>The stream is initialized by calling <code>init/3</code>. All streams that are initialized will eventually be terminated by calling <code>terminate/3</code>.</p>
+<p>When Cowboy receives data for the stream it will call <code>data/4</code>. The data given is the request body after any transfer decoding has been applied.</p>
+<p>When Cowboy receives a message addressed to a stream, or when Cowboy needs to inform the stream handler that an internal event has occurred, it will call <code>info/3</code>.</p>
<h2 id="commands">Commands</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Stream handlers can return a list of commands to be executed
-from the <code>init/3</code>, <code>data/4</code> and <code>info/3</code> callbacks. In addition,
-the <code>early_error/5</code> callback must return a response command.</p></div>
-<div class="paragraph"><p>The following commands are defined:</p></div>
-<div class="sect2">
+<p>Stream handlers can return a list of commands to be executed from the <code>init/3</code>, <code>data/4</code> and <code>info/3</code> callbacks. In addition, the <code>early_error/5</code> callback must return a response command.</p>
+<!-- @todo We need a &apos;log&apos; command that would call error_logger.-->
+<!-- It&apos;s better than doing in the handlers directly because-->
+<!-- then we can have other stream handlers manipulate those logs.-->
+<!-- @todo We need a command to send a message so that other-->
+<!-- stream handlers can manipulate these messages if necessary.-->
+<p>The following commands are defined:</p>
<h3 id="response_command">response</h3>
-<div class="paragraph"><p>Send a response to the client.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Send a response to the client.</p>
+<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">response</span>, <span style="font-weight: bold"><span style="color: #000000">cowboy:http_status</span></span>(), <span style="font-weight: bold"><span style="color: #000000">cowboy:http_headers</span></span>(),
- <span style="font-weight: bold"><span style="color: #000000">cowboy_req:resp_body</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>No more data can be sent after this command.</p></div>
-</div>
-<div class="sect2">
+<pre><tt>{<font color="#FF6600">response</font>, <b><font color="#000000">cowboy:http_status</font></b>(), <b><font color="#000000">cowboy:http_headers</font></b>(),
+ <b><font color="#000000">cowboy_req:resp_body</font></b>()}</tt></pre>
+</div></div>
+<p>No more data can be sent after this command.</p>
<h3 id="headers_command">headers</h3>
-<div class="paragraph"><p>Initiate a response to the client.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Initiate a response to the client.</p>
+<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="font-weight: bold"><span style="color: #000000">cowboy:http_status</span></span>(), <span style="font-weight: bold"><span style="color: #000000">cowboy:http_headers</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>This initiates a response to the client. The stream
-will end when a data command with the <code>fin</code> flag is
-returned.</p></div>
-</div>
-<div class="sect2">
+<pre><tt>{<font color="#FF6600">headers</font>, <b><font color="#000000">cowboy:http_status</font></b>(), <b><font color="#000000">cowboy:http_headers</font></b>()}</tt></pre>
+</div></div>
+<p>This initiates a response to the client. The stream will end when a data command with the <code>fin</code> flag is returned.</p>
<h3 id="data_command">data</h3>
-<div class="paragraph"><p>Send data to the client.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Send data to the client.</p>
+<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">data</span>, <span style="font-weight: bold"><span style="color: #000000">fin</span></span>(), <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>()}</tt></pre></div></div>
-</div>
-<div class="sect2">
+<pre><tt>{<font color="#FF6600">data</font>, <b><font color="#000000">fin</font></b>(), <b><font color="#000000">iodata</font></b>()}</tt></pre>
+</div></div>
<h3 id="push_command">push</h3>
-<div class="paragraph"><p>Push a resource to the client.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Push a resource to the client.</p>
+<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">push</span>, <span style="color: #009900">Method</span>, <span style="color: #009900">Scheme</span>, <span style="color: #009900">Host</span>, <span style="font-weight: bold"><span style="color: #000000">inet:port_number</span></span>(),
- <span style="color: #009900">Path</span>, <span style="color: #009900">Qs</span>, <span style="font-weight: bold"><span style="color: #000000">cowboy:http_headers</span></span>()}
+<pre><tt>{<font color="#FF6600">push</font>, <font color="#009900">Method</font>, <font color="#009900">Scheme</font>, <font color="#009900">Host</font>, <b><font color="#000000">inet:port_number</font></b>(),
+ <font color="#009900">Path</font>, <font color="#009900">Qs</font>, <b><font color="#000000">cowboy:http_headers</font></b>()}
-<span style="color: #009900">Method</span> <span style="color: #990000">=</span> <span style="color: #009900">Scheme</span> <span style="color: #990000">=</span> <span style="color: #009900">Host</span> <span style="color: #990000">=</span> <span style="color: #009900">Path</span> <span style="color: #990000">=</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>The command will be ignored if the protocol does not provide
-any server push mechanism.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Method</font> <font color="#990000">=</font> <font color="#009900">Scheme</font> <font color="#990000">=</font> <font color="#009900">Host</font> <font color="#990000">=</font> <font color="#009900">Path</font> <font color="#990000">=</font> <font color="#009900">Qs</font> <font color="#990000">=</font> <b><font color="#000080">binary</font></b>()</tt></pre>
+</div></div>
+<p>The command will be ignored if the protocol does not provide any server push mechanism.</p>
<h3 id="_flow">flow</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">flow</span>, <span style="font-weight: bold"><span style="color: #000000">pos_integer</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>Request more data to be read from the request body. The
-exact behavior depends on the protocol.</p></div>
-</div>
-<div class="sect2">
+<pre><tt>{<font color="#FF6600">flow</font>, <b><font color="#000000">pos_integer</font></b>()}</tt></pre>
+</div></div>
+<p>Request more data to be read from the request body. The exact behavior depends on the protocol.</p>
<h3 id="_spawn">spawn</h3>
-<div class="paragraph"><p>Inform Cowboy that a process was spawned and should be
-supervised.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Inform Cowboy that a process was spawned and should be supervised.</p>
+<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: #000080">spawn</span></span>, <span style="font-weight: bold"><span style="color: #000080">pid</span></span>(), <span style="font-weight: bold"><span style="color: #000000">timeout</span></span>()}</tt></pre></div></div>
-</div>
-<div class="sect2">
+<pre><tt>{<b><font color="#000080">spawn</font></b>, <b><font color="#000080">pid</font></b>(), <b><font color="#000000">timeout</font></b>()}</tt></pre>
+</div></div>
<h3 id="_error_response">error_response</h3>
-<div class="paragraph"><p>Send an error response if no response was sent previously.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Send an error response if no response was sent previously.</p>
+<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">error_response</span>, <span style="font-weight: bold"><span style="color: #000000">cowboy:http_status</span></span>(), <span style="font-weight: bold"><span style="color: #000000">cowboy:http_headers</span></span>(), <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>()}</tt></pre></div></div>
-</div>
-<div class="sect2">
+<pre><tt>{<font color="#FF6600">error_response</font>, <b><font color="#000000">cowboy:http_status</font></b>(), <b><font color="#000000">cowboy:http_headers</font></b>(), <b><font color="#000000">iodata</font></b>()}</tt></pre>
+</div></div>
<h3 id="switch_protocol_command">switch_protocol</h3>
-<div class="paragraph"><p>Switch to a different protocol.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Switch to a different protocol.</p>
+<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">switch_protocol</span>, <span style="font-weight: bold"><span style="color: #000000">cowboy:http_headers</span></span>(), <span style="font-weight: bold"><span style="color: #000000">module</span></span>(), <span style="font-weight: bold"><span style="color: #000000">state</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>Contains the headers that will be sent in the 101 response,
-along with the module implementing the protocol we are
-switching to and its initial state.</p></div>
-</div>
-<div class="sect2">
+<pre><tt>{<font color="#FF6600">switch_protocol</font>, <b><font color="#000000">cowboy:http_headers</font></b>(), <b><font color="#000000">module</font></b>(), <b><font color="#000000">state</font></b>()}</tt></pre>
+</div></div>
+<p>Contains the headers that will be sent in the 101 response, along with the module implementing the protocol we are switching to and its initial state.</p>
<h3 id="_stop">stop</h3>
-<div class="paragraph"><p>Stop the stream.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Stop the stream.</p>
+<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">stop</span></tt></pre></div></div>
-<div class="paragraph"><p>While no more data can be sent after the <code>fin</code> flag was set,
-the stream is still tracked by Cowboy until it is stopped by
-the handler.</p></div>
-<div class="paragraph"><p>The behavior when stopping a stream for which no response
-has been sent will vary depending on the protocol. The stream
-will end successfully as far as the client is concerned.</p></div>
-<div class="paragraph"><p>To indicate that an error occurred, either use <code>error_response</code>
-before stopping, or use <code>internal_error</code>.</p></div>
-</div>
-<div class="sect2">
+<pre><tt><font color="#FF6600">stop</font></tt></pre>
+</div></div>
+<p>While no more data can be sent after the <code>fin</code> flag was set, the stream is still tracked by Cowboy until it is stopped by the handler.</p>
+<p>The behavior when stopping a stream for which no response has been sent will vary depending on the protocol. The stream will end successfully as far as the client is concerned.</p>
+<p>To indicate that an error occurred, either use <code>error_response</code> before stopping, or use <code>internal_error</code>.</p>
<h3 id="_internal_error">internal_error</h3>
-<div class="paragraph"><p>Stop the stream with an error.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Stop the stream with an error.</p>
+<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">internal_error</span>, <span style="color: #009900">Reason</span>, <span style="color: #009900">HumanReadable</span>}
-
-<span style="color: #009900">Reason</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()
-<span style="color: #009900">HumanReadable</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000080">atom</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>This command should be used when the stream cannot continue
-because of an internal error. An <code>error_response</code> command
-may be sent before that to advertise to the client why the
-stream is dropped.</p></div>
-</div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#FF6600">internal_error</font>, <font color="#009900">Reason</font>, <font color="#009900">HumanReadable</font>}
+
+<font color="#009900">Reason</font> <font color="#990000">=</font> <b><font color="#000000">any</font></b>()
+<font color="#009900">HumanReadable</font> <font color="#990000">=</font> <b><font color="#000080">atom</font></b>()</tt></pre>
+</div></div>
+<p>This command should be used when the stream cannot continue because of an internal error. An <code>error_response</code> command may be sent before that to advertise to the client why the stream is dropped.</p>
<h2 id="_predefined_events">Predefined events</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy will forward all messages sent to the stream to
-the <code>info/3</code> callback. To send a message to a stream,
-send a message to the connection process with the form
-<code>{{Pid, StreamID}, Msg}</code>. The connection process will
-then forward <code>Msg</code> to the stream handlers.</p></div>
-<div class="paragraph"><p>Cowboy will also forward the exit signals for the
-processes that the stream spawned.</p></div>
-<div class="sect2">
+<p>Cowboy will forward all messages sent to the stream to the <code>info/3</code> callback. To send a message to a stream, send a message to the connection process with the form <code>{{Pid, StreamID}, Msg}</code>. The connection process will then forward <code>Msg</code> to the stream handlers.</p>
+<p>Cowboy will also forward the exit signals for the processes that the stream spawned.</p>
<h3 id="_exit">EXIT</h3>
-<div class="paragraph"><p>A process spawned by this stream has exited.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<!-- info(_StreamID, {&apos;EXIT&apos;, Pid, normal}, State=#state{pid=Pid}) -&gt;-->
+<!-- info(_StreamID, {&apos;EXIT&apos;, Pid, {_Reason, [_, {cow_http_hd, _, _, _}|_]}}, State=#state{pid=Pid}) -&gt;-->
+<!-- info(StreamID, Exit = {&apos;EXIT&apos;, Pid, {Reason, Stacktrace}}, State=#state{ref=Ref, pid=Pid}) -&gt;-->
+<p>A process spawned by this stream has exited.</p>
+<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: #000080">'EXIT'</span>, <span style="font-weight: bold"><span style="color: #000080">pid</span></span>(), <span style="font-weight: bold"><span style="color: #000000">any</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>This is the raw exit message without any modification.</p></div>
-</div>
-<div class="sect2">
+<pre><tt>{<font color="#000080">'EXIT'</font>, <b><font color="#000080">pid</font></b>(), <b><font color="#000000">any</font></b>()}</tt></pre>
+</div></div>
+<p>This is the raw exit message without any modification.</p>
+<!-- === read_body-->
+<!-- -->
+<!-- //info(_StreamID, {read_body, Ref, Length, _},-->
+<!-- //info(StreamID, {read_body, Ref, Length, Period}, State) -&gt;-->
+<!-- -->
+<!-- TODO yeah I am not actually sure this one should be public just yet-->
+<!-- TODO if it is, then we probably shouldn&apos;t send a message directly,-->
+<!-- TODO but rather return a command that will end up sending the message-->
+<!-- -->
+<!-- TODO The problem being that no stream handler has access to that-->
+<!-- TODO message if we send it directly. So we should have a command-->
+<!-- TODO send_message or something that can be seen from all handlers.-->
+<!-- -->
+<!-- TODO The thing is that stream handlers can have 0 to N processes-->
+<!-- TODO so we have to make it easy to say which process should-->
+<!-- TODO receive the message, and perhaps *identify* which process-->
+<!-- TODO gets it?-->
<h3 id="_response">response</h3>
-<div class="paragraph"><p>Same as the <a href="../response_command">response command</a>.</p></div>
-<div class="paragraph"><p>Usually sent when the request process replies to the client.
-May also be sent by Cowboy internally.</p></div>
-</div>
-<div class="sect2">
+<p>Same as the <a href="../response_command">response command</a>.</p>
+<p>Usually sent when the request process replies to the client. May also be sent by Cowboy internally.</p>
<h3 id="_headers">headers</h3>
-<div class="paragraph"><p>Same as the <a href="../headers_command">headers command</a>.</p></div>
-<div class="paragraph"><p>Sent when the request process starts replying to the client.</p></div>
-</div>
-<div class="sect2">
+<p>Same as the <a href="../headers_command">headers command</a>.</p>
+<p>Sent when the request process starts replying to the client.</p>
<h3 id="_data">data</h3>
-<div class="paragraph"><p>Same as the <a href="../data_command">data command</a>.</p></div>
-<div class="paragraph"><p>Sent when the request process streams data to the client.</p></div>
-</div>
-<div class="sect2">
+<p>Same as the <a href="../data_command">data command</a>.</p>
+<p>Sent when the request process streams data to the client.</p>
<h3 id="_push">push</h3>
-<div class="paragraph"><p>Same as the <a href="../push_command">push command</a>.</p></div>
-<div class="paragraph"><p>Sent when the request process pushes a resource to the client.</p></div>
-</div>
-<div class="sect2">
+<p>Same as the <a href="../push_command">push command</a>.</p>
+<p>Sent when the request process pushes a resource to the client.</p>
<h3 id="_switch_protocol">switch_protocol</h3>
-<div class="paragraph"><p>Same as the <a href="../switch_protocol_command">switch_protocol command</a>.</p></div>
-<div class="paragraph"><p>Sent when switching to the HTTP/2 or Websocket protocol.</p></div>
-</div>
-</div>
-</div>
-<div class="sect1">
+<p>Same as the <a href="../switch_protocol_command">switch_protocol command</a>.</p>
+<!-- @todo Not done for HTTP/2 yet.-->
+<p>Sent when switching to the HTTP/2 or Websocket protocol.</p>
<h2 id="_exports">Exports</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The following function should be called by modules implementing
-stream handlers to execute the next stream handler in the list:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../cowboy_stream.init">cowboy_stream:init(3)</a> - Initialize a stream
-</p>
+<p>The following function should be called by modules implementing stream handlers to execute the next stream handler in the list:</p>
+<ul><li><a href="../cowboy_stream.init">cowboy_stream:init(3)</a> - Initialize a stream
</li>
-<li>
-<p>
-<a href="../cowboy_stream.data">cowboy_stream:data(3)</a> - Handle data for a stream
-</p>
+<li><a href="../cowboy_stream.data">cowboy_stream:data(3)</a> - Handle data for a stream
</li>
-<li>
-<p>
-<a href="../cowboy_stream.info">cowboy_stream:info(3)</a> - Handle a message for a stream
-</p>
+<li><a href="../cowboy_stream.info">cowboy_stream:info(3)</a> - Handle a message for a stream
</li>
-<li>
-<p>
-<a href="../cowboy_stream.terminate">cowboy_stream:terminate(3)</a> - Terminate a stream
-</p>
+<li><a href="../cowboy_stream.terminate">cowboy_stream:terminate(3)</a> - Terminate a stream
</li>
-<li>
-<p>
-<a href="../cowboy_stream.early_error">cowboy_stream:early_error(3)</a> - Handle an early error for a stream
-</p>
+<li><a href="../cowboy_stream.early_error">cowboy_stream:early_error(3)</a> - Handle an early error for a stream
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_types">Types</h2>
-<div class="sectionbody">
-<div class="sect2">
<h3 id="_commands">commands()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">commands</span></span>() <span style="color: #990000">::</span> [<span style="color: #009900">Command</span>]</tt></pre></div></div>
-<div class="paragraph"><p>See the <a href="../commands">list of commands</a> for details.</p></div>
-</div>
-<div class="sect2">
+<pre><tt><b><font color="#000000">commands</font></b>() <font color="#990000">::</font> [<font color="#009900">Command</font>]</tt></pre>
+</div></div>
+<p>See the <a href="../commands">list of commands</a> for details.</p>
<h3 id="_fin">fin()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">fin</span></span>() <span style="color: #990000">::</span> <span style="color: #FF6600">fin</span> | <span style="color: #FF6600">nofin</span></tt></pre></div></div>
-<div class="paragraph"><p>Used in commands and events to indicate that this is
-the end of the stream.</p></div>
-</div>
-<div class="sect2">
+<pre><tt><b><font color="#000000">fin</font></b>() <font color="#990000">::</font> <font color="#FF6600">fin</font> | <font color="#FF6600">nofin</font></tt></pre>
+</div></div>
+<p>Used in commands and events to indicate that this is the end of the stream.</p>
<h3 id="_partial_req">partial_req()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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: #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">version</span> <span style="color: #990000">=&gt;</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: #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">path</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">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>
- <span style="color: #0000FF">headers</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:http_headers</span></span>(),
- <span style="color: #0000FF">peer</span> <span style="color: #990000">=&gt;</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>Partial request information received when an early error is
-detected.</p></div>
-</div>
-<div class="sect2">
+<pre><tt><b><font color="#000000">req</font></b>() <font color="#990000">::</font> #{
+ <font color="#0000FF">method</font> <font color="#990000">=&gt;</font> <b><font color="#000080">binary</font></b>(), <i><font color="#9A1900">%% case sensitive</font></i>
+ <font color="#0000FF">version</font> <font color="#990000">=&gt;</font> <b><font color="#000000">cowboy:http_version</font></b>() | <b><font color="#000080">atom</font></b>(),
+ <font color="#0000FF">scheme</font> <font color="#990000">=&gt;</font> <b><font color="#000080">binary</font></b>(), <i><font color="#9A1900">%% lowercase; case insensitive</font></i>
+ <font color="#0000FF">host</font> <font color="#990000">=&gt;</font> <b><font color="#000080">binary</font></b>(), <i><font color="#9A1900">%% lowercase; case insensitive</font></i>
+ <font color="#0000FF">port</font> <font color="#990000">=&gt;</font> <b><font color="#000000">inet:port_number</font></b>(),
+ <font color="#0000FF">path</font> <font color="#990000">=&gt;</font> <b><font color="#000080">binary</font></b>(), <i><font color="#9A1900">%% case sensitive</font></i>
+ <font color="#0000FF">qs</font> <font color="#990000">=&gt;</font> <b><font color="#000080">binary</font></b>(), <i><font color="#9A1900">%% case sensitive</font></i>
+ <font color="#0000FF">headers</font> <font color="#990000">=&gt;</font> <b><font color="#000000">cowboy:http_headers</font></b>(),
+ <font color="#0000FF">peer</font> <font color="#990000">=&gt;</font> {<b><font color="#000000">inet:ip_address</font></b>(), <b><font color="#000000">inet:port_number</font></b>()}
+}</tt></pre>
+</div></div>
+<p>Partial request information received when an early error is detected.</p>
<h3 id="_reason">reason()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">reason</span></span>() <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">normal</span></span> | <span style="color: #FF6600">switch_protocol</span>
- | {<span style="color: #FF6600">internal_error</span>, <span style="color: #FF6600">timeout</span> | {<span style="color: #FF6600">error</span> | <span style="font-weight: bold"><span style="color: #000080">exit</span></span> | <span style="font-weight: bold"><span style="color: #000080">throw</span></span>, <span style="font-weight: bold"><span style="color: #000000">any</span></span>()}, <span style="color: #009900">HumanReadable</span>}
- | {<span style="color: #FF6600">socket_error</span>, <span style="color: #FF6600">closed</span> | <span style="font-weight: bold"><span style="color: #000080">atom</span></span>(), <span style="color: #009900">HumanReadable</span>}
- | {<span style="color: #FF6600">stream_error</span>, <span style="color: #009900">Error</span>, <span style="color: #009900">HumanReadable</span>}
- | {<span style="color: #FF6600">connection_error</span>, <span style="color: #009900">Error</span>, <span style="color: #009900">HumanReadable</span>}
- | {<span style="color: #FF6600">stop</span>, <span style="font-weight: bold"><span style="color: #000000">cow_http2:frame</span></span>(), <span style="color: #009900">HumanReadable</span>}
-
-<span style="color: #009900">Error</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000080">atom</span></span>()
-<span style="color: #009900">HumanReadable</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000080">atom</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Reason for the stream termination.</p></div>
-</div>
-<div class="sect2">
+<pre><tt><b><font color="#000000">reason</font></b>() <font color="#990000">::</font> <b><font color="#000080">normal</font></b> | <font color="#FF6600">switch_protocol</font>
+ | {<font color="#FF6600">internal_error</font>, <font color="#FF6600">timeout</font> | {<font color="#FF6600">error</font> | <b><font color="#000080">exit</font></b> | <b><font color="#000080">throw</font></b>, <b><font color="#000000">any</font></b>()}, <font color="#009900">HumanReadable</font>}
+ | {<font color="#FF6600">socket_error</font>, <font color="#FF6600">closed</font> | <b><font color="#000080">atom</font></b>(), <font color="#009900">HumanReadable</font>}
+ | {<font color="#FF6600">stream_error</font>, <font color="#009900">Error</font>, <font color="#009900">HumanReadable</font>}
+ | {<font color="#FF6600">connection_error</font>, <font color="#009900">Error</font>, <font color="#009900">HumanReadable</font>}
+ | {<font color="#FF6600">stop</font>, <b><font color="#000000">cow_http2:frame</font></b>(), <font color="#009900">HumanReadable</font>}
+
+<font color="#009900">Error</font> <font color="#990000">=</font> <b><font color="#000080">atom</font></b>()
+<font color="#009900">HumanReadable</font> <font color="#990000">=</font> <b><font color="#000080">atom</font></b>()</tt></pre>
+</div></div>
+<p>Reason for the stream termination.</p>
<h3 id="_resp_command">resp_command()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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_command</span></span>() <span style="color: #990000">::</span> {<span style="color: #FF6600">response</span>, <span style="font-weight: bold"><span style="color: #000000">cowboy:http_status</span></span>(),
- <span style="font-weight: bold"><span style="color: #000000">cowboy:http_headers</span></span>(), <span style="font-weight: bold"><span style="color: #000000">cowboy_req:resp_body</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>See the <a href="../response_command">response command</a> for details.</p></div>
-</div>
-<div class="sect2">
+<pre><tt><b><font color="#000000">resp_command</font></b>() <font color="#990000">::</font> {<font color="#FF6600">response</font>, <b><font color="#000000">cowboy:http_status</font></b>(),
+ <b><font color="#000000">cowboy:http_headers</font></b>(), <b><font color="#000000">cowboy_req:resp_body</font></b>()}</tt></pre>
+</div></div>
+<p>See the <a href="../response_command">response command</a> for details.</p>
<h3 id="_streamid">streamid()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">streamid</span></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>The identifier for this stream.</p></div>
-<div class="paragraph"><p>The identifier is unique over the connection process.
-It is possible to form a unique identifier node-wide and
-cluster-wide by wrapping it in a <code>{self(), StreamID}</code>
-tuple.</p></div>
-</div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">streamid</font></b>() <font color="#990000">::</font> <b><font color="#000000">any</font></b>()</tt></pre>
+</div></div>
+<p>The identifier for this stream.</p>
+<p>The identifier is unique over the connection process. It is possible to form a unique identifier node-wide and cluster-wide by wrapping it in a <code>{self(), StreamID}</code> tuple.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Module introduced.
-</p>
+<ul><li><strong>2.0</strong>: Module introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="..">cowboy(7)</a>,
-<a href="../cowboy_http">cowboy_http(3)</a>,
-<a href="../cowboy_http2">cowboy_http2(3)</a></p></div>
-</div>
-</div>
+<p><a href="..">cowboy(7)</a>, <a href="../cowboy_http">cowboy_http(3)</a>, <a href="../cowboy_http2">cowboy_http2(3)</a></p>
+
diff --git a/docs/en/cowboy/2.1/manual/cowboy_websocket/index.html b/docs/en/cowboy/2.1/manual/cowboy_websocket/index.html
index c7c9cef5..e4729fc1 100644
--- a/docs/en/cowboy/2.1/manual/cowboy_websocket/index.html
+++ b/docs/en/cowboy/2.1/manual/cowboy_websocket/index.html
@@ -62,295 +62,144 @@
<h1 class="lined-header"><span>cowboy_websocket(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_websocket - Websocket</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_websocket - Websocket</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The module <code>cowboy_websocket</code> implements Websocket
-as a Ranch protocol. It also defines a callback interface
-for handling Websocket connections.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The module <code>cowboy_websocket</code> implements Websocket as a Ranch protocol. It also defines a callback interface for handling Websocket connections.</p>
<h2 id="_callbacks">Callbacks</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Websocket handlers must implement the following callback
-interface:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Websocket handlers must implement the following callback interface:</p>
+<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">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_websocket</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
- | {<span style="color: #FF6600">cowboy_websocket</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>, <span style="color: #009900">Opts</span>}
-
-<span style="font-weight: bold"><span style="color: #000000">websocket_init</span></span>(<span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> <span style="color: #009900">CallResult</span> <span style="font-style: italic"><span style="color: #9A1900">%% optional</span></span>
-<span style="font-weight: bold"><span style="color: #000000">websocket_handle</span></span>(<span style="color: #009900">InFrame</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> <span style="color: #009900">CallResult</span>
-<span style="font-weight: bold"><span style="color: #000000">websocket_info</span></span>(<span style="color: #009900">Info</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> <span style="color: #009900">CallResult</span>
-
-<span style="font-weight: bold"><span style="color: #000000">terminate</span></span>(<span style="color: #009900">Reason</span>, <span style="color: #009900">PartialReq</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> <span style="color: #FF6600">ok</span> <span style="font-style: italic"><span style="color: #9A1900">%% optional</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">PartialReq</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">map</span></span>()
-<span style="color: #009900">State</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()
-<span style="color: #009900">Opts</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_websocket:opts</span></span>()
-<span style="color: #009900">InFrame</span> <span style="color: #990000">::</span> {<span style="color: #FF6600">text</span> | <span style="font-weight: bold"><span style="color: #000080">binary</span></span> | <span style="color: #FF6600">ping</span> | <span style="color: #FF6600">pong</span>, <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()}
-<span style="color: #009900">OutFrame</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cow_ws:frame</span></span>() <span style="font-style: italic"><span style="color: #9A1900">%% see types below</span></span>
-<span style="color: #009900">Info</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()
-
-<span style="color: #009900">CallResult</span> <span style="color: #990000">::</span> {<span style="color: #FF6600">ok</span>, <span style="color: #009900">State</span>}
- | {<span style="color: #FF6600">ok</span>, <span style="color: #009900">State</span>, <span style="color: #FF6600">hibernate</span>}
- | {<span style="color: #FF6600">reply</span>, <span style="color: #009900">OutFrame</span> | [<span style="color: #009900">OutFrame</span>], <span style="color: #009900">State</span>}
- | {<span style="color: #FF6600">reply</span>, <span style="color: #009900">OutFrame</span> | [<span style="color: #009900">OutFrame</span>], <span style="color: #009900">State</span>, <span style="color: #FF6600">hibernate</span>}
- | {<span style="color: #FF6600">stop</span>, <span style="color: #009900">State</span>}
-
-<span style="color: #009900">Reason</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">normal</span></span> | <span style="color: #FF6600">stop</span> | <span style="color: #FF6600">timeout</span>
- | <span style="color: #FF6600">remote</span> | {<span style="color: #FF6600">remote</span>, <span style="font-weight: bold"><span style="color: #000000">cow_ws:close_code</span></span>(), <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()}
- | {<span style="color: #FF6600">error</span>, <span style="color: #FF6600">badencoding</span> | <span style="color: #FF6600">badframe</span> | <span style="color: #FF6600">closed</span> | <span style="font-weight: bold"><span style="color: #000080">atom</span></span>()}
- | {<span style="color: #FF6600">crash</span>, <span style="color: #FF6600">error</span> | <span style="font-weight: bold"><span style="color: #000080">exit</span></span> | <span style="font-weight: bold"><span style="color: #000080">throw</span></span>, <span style="font-weight: bold"><span style="color: #000000">any</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>The <code>init/2</code> callback is common to all handlers. To upgrade
-the connection to Websocket, it must return <code>cowboy_websocket</code>
-as the first element of the tuple.</p></div>
-<div class="paragraph"><p>Any operation requiring the HTTP request must be done in the
-<code>init/2</code> function, as the Req object will not be available
-after it returns. Websocket sub-protocol selection should
-therefore be done in this function.</p></div>
-<div class="paragraph"><p>The optional <code>websocket_init/1</code> callback will be called once
-the connection has been upgraded to Websocket. It can be used
-to perform any required initialization of the handler.</p></div>
-<div class="paragraph"><p>Note that the <code>init/2</code> function does not run in the same
-process as the Websocket callbacks. Any Websocket-specific
-initialization must be done in <code>websocket_init/1</code>.</p></div>
-<div class="paragraph"><p>The <code>websocket_handle/2</code> callback will be called for every
-frame received. The <code>websocket_info/2</code> callback will be
-called for every Erlang message received.</p></div>
-<div class="paragraph"><p>All three Websocket callbacks may send one or more frames
-back to the client (by returning a <code>reply</code> tuple) or terminate
-the connection (by sending a <code>close</code> frame or returning a <code>stop</code>
-tuple).</p></div>
-<div class="paragraph"><p>The optional <code>terminate/3</code> callback will ultimately be called
-with the reason for the termination of the connection. This
-callback is common to all handlers. Note that Websocket will
-not provide the full Req object by default, to save memory.</p></div>
-<div class="paragraph"><p>Cowboy will terminate the process right after closing the
-Websocket connection. This means that there is no need to
-perform any cleanup in the <code>terminate/3</code> callback.</p></div>
-<div class="paragraph"><p>The following terminate reasons are defined for Websocket
-connections:</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-normal
-</dt>
-<dd>
-<p>
- The connection was closed normally before establishing a Websocket
- connection. This typically happens if an <code>ok</code> tuple is returned
- from the <code>init/2</code> callback.
-</p>
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>)
+ <font color="#990000">-&gt;</font> {<font color="#FF6600">cowboy_websocket</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
+ | {<font color="#FF6600">cowboy_websocket</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>, <font color="#009900">Opts</font>}
+
+<b><font color="#000000">websocket_init</font></b>(<font color="#009900">State</font>) <font color="#990000">-&gt;</font> <font color="#009900">CallResult</font> <i><font color="#9A1900">%% optional</font></i>
+<b><font color="#000000">websocket_handle</font></b>(<font color="#009900">InFrame</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> <font color="#009900">CallResult</font>
+<b><font color="#000000">websocket_info</font></b>(<font color="#009900">Info</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> <font color="#009900">CallResult</font>
+
+<b><font color="#000000">terminate</font></b>(<font color="#009900">Reason</font>, <font color="#009900">PartialReq</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> <font color="#FF6600">ok</font> <i><font color="#9A1900">%% optional</font></i>
+
+<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()
+<font color="#009900">PartialReq</font> <font color="#990000">::</font> <b><font color="#000000">map</font></b>()
+<font color="#009900">State</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()
+<font color="#009900">Opts</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_websocket:opts</font></b>()
+<font color="#009900">InFrame</font> <font color="#990000">::</font> {<font color="#FF6600">text</font> | <b><font color="#000080">binary</font></b> | <font color="#FF6600">ping</font> | <font color="#FF6600">pong</font>, <b><font color="#000080">binary</font></b>()}
+<font color="#009900">OutFrame</font> <font color="#990000">::</font> <b><font color="#000000">cow_ws:frame</font></b>() <i><font color="#9A1900">%% see types below</font></i>
+<font color="#009900">Info</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()
+
+<font color="#009900">CallResult</font> <font color="#990000">::</font> {<font color="#FF6600">ok</font>, <font color="#009900">State</font>}
+ | {<font color="#FF6600">ok</font>, <font color="#009900">State</font>, <font color="#FF6600">hibernate</font>}
+ | {<font color="#FF6600">reply</font>, <font color="#009900">OutFrame</font> | [<font color="#009900">OutFrame</font>], <font color="#009900">State</font>}
+ | {<font color="#FF6600">reply</font>, <font color="#009900">OutFrame</font> | [<font color="#009900">OutFrame</font>], <font color="#009900">State</font>, <font color="#FF6600">hibernate</font>}
+ | {<font color="#FF6600">stop</font>, <font color="#009900">State</font>}
+
+<font color="#009900">Reason</font> <font color="#990000">::</font> <b><font color="#000080">normal</font></b> | <font color="#FF6600">stop</font> | <font color="#FF6600">timeout</font>
+ | <font color="#FF6600">remote</font> | {<font color="#FF6600">remote</font>, <b><font color="#000000">cow_ws:close_code</font></b>(), <b><font color="#000080">binary</font></b>()}
+ | {<font color="#FF6600">error</font>, <font color="#FF6600">badencoding</font> | <font color="#FF6600">badframe</font> | <font color="#FF6600">closed</font> | <b><font color="#000080">atom</font></b>()}
+ | {<font color="#FF6600">crash</font>, <font color="#FF6600">error</font> | <b><font color="#000080">exit</font></b> | <b><font color="#000080">throw</font></b>, <b><font color="#000000">any</font></b>()}</tt></pre>
+</div></div>
+<p>The <code>init/2</code> callback is common to all handlers. To upgrade the connection to Websocket, it must return <code>cowboy_websocket</code> as the first element of the tuple.</p>
+<p>Any operation requiring the HTTP request must be done in the <code>init/2</code> function, as the Req object will not be available after it returns. Websocket sub-protocol selection should therefore be done in this function.</p>
+<p>The optional <code>websocket_init/1</code> callback will be called once the connection has been upgraded to Websocket. It can be used to perform any required initialization of the handler.</p>
+<p>Note that the <code>init/2</code> function does not run in the same process as the Websocket callbacks. Any Websocket-specific initialization must be done in <code>websocket_init/1</code>.</p>
+<p>The <code>websocket_handle/2</code> callback will be called for every frame received. The <code>websocket_info/2</code> callback will be called for every Erlang message received.</p>
+<p>All three Websocket callbacks may send one or more frames back to the client (by returning a <code>reply</code> tuple) or terminate the connection (by sending a <code>close</code> frame or returning a <code>stop</code> tuple).</p>
+<p>The optional <code>terminate/3</code> callback will ultimately be called with the reason for the termination of the connection. This callback is common to all handlers. Note that Websocket will not provide the full Req object by default, to save memory.</p>
+<p>Cowboy will terminate the process right after closing the Websocket connection. This means that there is no need to perform any cleanup in the <code>terminate/3</code> callback.</p>
+<p>The following terminate reasons are defined for Websocket connections:</p>
+<dl><dt>normal</dt>
+<dd><p>The connection was closed normally before establishing a Websocket connection. This typically happens if an <code>ok</code> tuple is returned from the <code>init/2</code> callback.</p>
</dd>
-<dt class="hdlist1">
-remote
-</dt>
-<dd>
-<p>
- The remote endpoint closed the connection without giving any
- further details.
-</p>
+<dt>remote</dt>
+<dd><p>The remote endpoint closed the connection without giving any further details.</p>
</dd>
-<dt class="hdlist1">
-{remote, Code, Payload}
-</dt>
-<dd>
-<p>
- The remote endpoint closed the connection with the given
- <code>Code</code> and <code>Payload</code> as the reason.
-</p>
+<dt>{remote, Code, Payload}</dt>
+<dd><p>The remote endpoint closed the connection with the given <code>Code</code> and <code>Payload</code> as the reason.</p>
</dd>
-<dt class="hdlist1">
-stop
-</dt>
-<dd>
-<p>
- The handler requested to close the connection, either by returning
- a <code>stop</code> tuple or by sending a <code>close</code> frame.
-</p>
+<dt>stop</dt>
+<dd><p>The handler requested to close the connection, either by returning a <code>stop</code> tuple or by sending a <code>close</code> frame.</p>
</dd>
-<dt class="hdlist1">
-timeout
-</dt>
-<dd>
-<p>
- The connection has been closed due to inactivity. The timeout
- value can be configured from <code>init/2</code>.
-</p>
+<dt>timeout</dt>
+<dd><p>The connection has been closed due to inactivity. The timeout value can be configured from <code>init/2</code>.</p>
</dd>
-<dt class="hdlist1">
-{crash, Class, Reason}
-</dt>
-<dd>
-<p>
- A crash occurred in the handler. <code>Class</code> and <code>Reason</code> can be
- used to obtain more information about the crash. The function
- <code>erlang:get_stacktrace/0</code> can also be called to obtain the
- stacktrace of the process when the crash occurred.
-</p>
+<dt>{crash, Class, Reason}</dt>
+<dd><p>A crash occurred in the handler. <code>Class</code> and <code>Reason</code> can be used to obtain more information about the crash. The function <code>erlang:get_stacktrace/0</code> can also be called to obtain the stacktrace of the process when the crash occurred.</p>
</dd>
-<dt class="hdlist1">
-{error, badencoding}
-</dt>
-<dd>
-<p>
- A text frame was sent by the client with invalid encoding. All
- text frames must be valid UTF-8.
-</p>
+<dt>{error, badencoding}</dt>
+<dd><p>A text frame was sent by the client with invalid encoding. All text frames must be valid UTF-8.</p>
</dd>
-<dt class="hdlist1">
-{error, badframe}
-</dt>
-<dd>
-<p>
- A protocol error has been detected.
-</p>
+<dt>{error, badframe}</dt>
+<dd><p>A protocol error has been detected.</p>
</dd>
-<dt class="hdlist1">
-{error, closed}
-</dt>
-<dd>
-<p>
- The socket has been closed brutally without a close frame being
- received first.
-</p>
+<dt>{error, closed}</dt>
+<dd><p>The socket has been closed brutally without a close frame being received first.</p>
</dd>
-<dt class="hdlist1">
-{error, Reason}
-</dt>
-<dd>
-<p>
- A socket error ocurred.
-</p>
+<dt>{error, Reason}</dt>
+<dd><p>A socket error ocurred.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_types">Types</h2>
-<div class="sectionbody">
-<div class="sect3">
<h4 id="_cow_ws_frame">cow_ws:frame()</h4>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">frame</span></span>() <span style="color: #990000">::</span> {<span style="color: #FF6600">text</span>, <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>()}
- | {<span style="font-weight: bold"><span style="color: #000080">binary</span></span>, <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>()}
- | <span style="color: #FF6600">ping</span> | {<span style="color: #FF6600">ping</span>, <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>()}
- | <span style="color: #FF6600">pong</span> | {<span style="color: #FF6600">pong</span>, <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>()}
- | <span style="color: #FF6600">close</span> | {<span style="color: #FF6600">close</span>, <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>()} | {<span style="color: #FF6600">close</span>, <span style="font-weight: bold"><span style="color: #000000">close_code</span></span>(), <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>()}
-
-<span style="font-weight: bold"><span style="color: #000000">close_code</span></span>() <span style="color: #990000">::</span> <span style="color: #993399">1000</span><span style="color: #990000">..</span><span style="color: #993399">1003</span> | <span style="color: #993399">1006</span><span style="color: #990000">..</span><span style="color: #993399">1011</span> | <span style="color: #993399">3000</span><span style="color: #990000">..</span><span style="color: #993399">4999</span></tt></pre></div></div>
-<div class="paragraph"><p>Websocket frames that can be sent as a response.</p></div>
-<div class="paragraph"><p>Note that there is no need to send pong frames back as
-Cowboy does it automatically for you.</p></div>
-</div>
-<div class="sect2">
+<pre><tt><b><font color="#000000">frame</font></b>() <font color="#990000">::</font> {<font color="#FF6600">text</font>, <b><font color="#000000">iodata</font></b>()}
+ | {<b><font color="#000080">binary</font></b>, <b><font color="#000000">iodata</font></b>()}
+ | <font color="#FF6600">ping</font> | {<font color="#FF6600">ping</font>, <b><font color="#000000">iodata</font></b>()}
+ | <font color="#FF6600">pong</font> | {<font color="#FF6600">pong</font>, <b><font color="#000000">iodata</font></b>()}
+ | <font color="#FF6600">close</font> | {<font color="#FF6600">close</font>, <b><font color="#000000">iodata</font></b>()} | {<font color="#FF6600">close</font>, <b><font color="#000000">close_code</font></b>(), <b><font color="#000000">iodata</font></b>()}
+
+<b><font color="#000000">close_code</font></b>() <font color="#990000">::</font> <font color="#993399">1000</font><font color="#990000">..</font><font color="#993399">1003</font> | <font color="#993399">1006</font><font color="#990000">..</font><font color="#993399">1011</font> | <font color="#993399">3000</font><font color="#990000">..</font><font color="#993399">4999</font></tt></pre>
+</div></div>
+<p>Websocket frames that can be sent as a response.</p>
+<p>Note that there is no need to send pong frames back as Cowboy does it automatically for you.</p>
<h3 id="_opts">opts()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">opts</span></span>() <span style="color: #990000">::</span> #{
- <span style="color: #0000FF">compress</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>(),
- <span style="color: #0000FF">idle_timeout</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">timeout</span></span>(),
- <span style="color: #0000FF">req_filter</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">fun</span></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">map</span></span>())
-}</tt></pre></div></div>
-<div class="paragraph"><p>Websocket handler options.</p></div>
-<div class="paragraph"><p>This configuration is passed to Cowboy from the <code>init/2</code>
-function:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">opts</font></b>() <font color="#990000">::</font> #{
+ <font color="#0000FF">compress</font> <font color="#990000">=&gt;</font> <b><font color="#000000">boolean</font></b>(),
+ <font color="#0000FF">idle_timeout</font> <font color="#990000">=&gt;</font> <b><font color="#000000">timeout</font></b>(),
+ <font color="#0000FF">req_filter</font> <font color="#990000">=&gt;</font> <b><font color="#0000FF">fun</font></b>((<b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <b><font color="#000000">map</font></b>())
+}</tt></pre>
+</div></div>
+<p>Websocket handler options.</p>
+<p>This configuration is passed to Cowboy from the <code>init/2</code> function:</p>
+<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">init</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- <span style="color: #009900">Opts</span> <span style="color: #990000">=</span> #{<span style="color: #0000FF">compress</span> <span style="color: #990000">=&gt;</span> <span style="color: #000080">true</span>},
- {<span style="color: #FF6600">cowboy_websocket</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>, <span style="color: #009900">Opts</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>The default value is given next to the option name:</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-compress (false)
-</dt>
-<dd>
-<p>
- Whether to enable the Websocket frame compression
- extension. Frames will only be compressed for the
- clients that support this extension.
-</p>
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ <font color="#009900">Opts</font> <font color="#990000">=</font> #{<font color="#0000FF">compress</font> <font color="#990000">=&gt;</font> <font color="#000080">true</font>},
+ {<font color="#FF6600">cowboy_websocket</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>, <font color="#009900">Opts</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>The default value is given next to the option name:</p>
+<dl><dt>compress (false)</dt>
+<dd><p>Whether to enable the Websocket frame compression extension. Frames will only be compressed for the clients that support this extension.</p>
</dd>
-<dt class="hdlist1">
-idle_timeout (60000)
-</dt>
-<dd>
-<p>
- Time in milliseconds that Cowboy will keep the
- connection open without receiving anything from
- the client.
-</p>
+<dt>idle_timeout (60000)</dt>
+<dd><p>Time in milliseconds that Cowboy will keep the connection open without receiving anything from the client.</p>
</dd>
-<dt class="hdlist1">
-req_filter
-</dt>
-<dd>
-<p>
- A function applied to the Req to compact it and
- only keep required information. The Req is only
- given back in the <code>terminate/3</code> callback. By default
- it keeps the method, version, URI components and peer
- information.
-</p>
+<dt>req_filter</dt>
+<dd><p>A function applied to the Req to compact it and only keep required information. The Req is only given back in the <code>terminate/3</code> callback. By default it keeps the method, version, URI components and peer information.</p>
</dd>
-</dl></div>
-</div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: The Req object is no longer passed to Websocket callbacks.
-</p>
+<ul><li><strong>2.0</strong>: The Req object is no longer passed to Websocket callbacks.
</li>
-<li>
-<p>
-<strong>2.0</strong>: The callback <code>websocket_terminate/3</code> was removed in favor of <code>terminate/3</code>.
-</p>
+<li><strong>2.0</strong>: The callback <code>websocket_terminate/3</code> was removed in favor of <code>terminate/3</code>.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Protocol introduced.
-</p>
+<li><strong>1.0</strong>: Protocol introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="..">cowboy(7)</a>,
-<a href="../cowboy_handler">cowboy_handler(3)</a>,
-<a href="../cowboy_http">cowboy_http(3)</a>,
-<a href="../cowboy_http2">cowboy_http2(3)</a></p></div>
-</div>
-</div>
+<p><a href="..">cowboy(7)</a>, <a href="../cowboy_handler">cowboy_handler(3)</a>, <a href="../cowboy_http">cowboy_http(3)</a>, <a href="../cowboy_http2">cowboy_http2(3)</a></p>
+
diff --git a/docs/en/cowboy/2.1/manual/http_status_codes/index.html b/docs/en/cowboy/2.1/manual/http_status_codes/index.html
index 99344691..2a947413 100644
--- a/docs/en/cowboy/2.1/manual/http_status_codes/index.html
+++ b/docs/en/cowboy/2.1/manual/http_status_codes/index.html
@@ -62,271 +62,92 @@
<h1 class="lined-header"><span>HTTP status codes(7)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>HTTP status codes - status codes used by Cowboy</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>HTTP status codes - status codes used by Cowboy</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This chapter aims to list all HTTP status codes that Cowboy
-may return, with details on the reasons why. The list given
-here only includes the replies that Cowboy sends, not user
-replies.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This chapter aims to list all HTTP status codes that Cowboy may return, with details on the reasons why. The list given here only includes the replies that Cowboy sends, not user replies.</p>
<h2 id="_100_continue">100 Continue</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>When the client sends an <code>expect: 100-continue</code> header,
-Cowboy automatically sends a this status code before
-trying to read the request body. This behavior can be
-disabled using the appropriate body option.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>When the client sends an <code>expect: 100-continue</code> header, Cowboy automatically sends a this status code before trying to read the request body. This behavior can be disabled using the appropriate body option.</p>
<h2 id="_101_switching_protocols">101 Switching Protocols</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This is the status code sent when switching to the
-Websocket protocol.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This is the status code sent when switching to the Websocket protocol.</p>
<h2 id="_200_ok">200 OK</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_201_created">201 Created</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_202_accepted">202 Accepted</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_204_no_content">204 No Content</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent when the processing of a request
-ends without any reply having been sent. It may also be
-sent by <code>cowboy_rest</code> under normal conditions.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent when the processing of a request ends without any reply having been sent. It may also be sent by <code>cowboy_rest</code> under normal conditions.</p>
<h2 id="_300_multiple_choices">300 Multiple Choices</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_301_moved_permanently">301 Moved Permanently</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_303_see_other">303 See Other</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_304_not_modified">304 Not Modified</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_307_temporary_redirect">307 Temporary Redirect</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_400_bad_request">400 Bad Request</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy will send this status code for any of the
-following reasons:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-Too many empty lines were sent before the request.
-</p>
+<p>Cowboy will send this status code for any of the following reasons:</p>
+<ul><li>Too many empty lines were sent before the request.
</li>
-<li>
-<p>
-The request-line could not be parsed.
-</p>
+<li>The request-line could not be parsed.
</li>
-<li>
-<p>
-Too many headers were sent.
-</p>
+<li>Too many headers were sent.
</li>
-<li>
-<p>
-A header name was too long.
-</p>
+<li>A header name was too long.
</li>
-<li>
-<p>
-A header value was too long.
-</p>
+<li>A header value was too long.
</li>
-<li>
-<p>
-The host header was missing from an HTTP/1.1 request.
-</p>
+<li>The host header was missing from an HTTP/1.1 request.
</li>
-<li>
-<p>
-The host header could not be parsed.
-</p>
+<li>The host header could not be parsed.
</li>
-<li>
-<p>
-The requested host was not found.
-</p>
+<li>The requested host was not found.
</li>
-<li>
-<p>
-The requested path could not be parsed.
-</p>
+<li>The requested path could not be parsed.
</li>
-<li>
-<p>
-The accept header could not be parsed when using REST.
-</p>
+<li>The accept header could not be parsed when using REST.
</li>
-<li>
-<p>
-REST under normal conditions.
-</p>
+<li>REST under normal conditions.
</li>
-<li>
-<p>
-A Websocket upgrade failed.
-</p>
+<li>A Websocket upgrade failed.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_401_unauthorized">401 Unauthorized</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_403_forbidden">403 Forbidden</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_404_not_found">404 Not Found</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent when the router successfully
-resolved the host but didn&#8217;t find a matching path for
-the request. It may also be sent by <code>cowboy_rest</code> under
-normal conditions.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent when the router successfully resolved the host but didn&apos;t find a matching path for the request. It may also be sent by <code>cowboy_rest</code> under normal conditions.</p>
<h2 id="_405_method_not_allowed">405 Method Not Allowed</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_406_not_acceptable">406 Not Acceptable</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_408_request_timeout">408 Request Timeout</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy will send this status code to the client if the
-client started to send a request, indicated by the
-request-line being received fully, but failed to send
-all headers in a reasonable time.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Cowboy will send this status code to the client if the client started to send a request, indicated by the request-line being received fully, but failed to send all headers in a reasonable time.</p>
<h2 id="_409_conflict">409 Conflict</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_410_gone">410 Gone</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_412_precondition_failed">412 Precondition Failed</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_413_request_entity_too_large">413 Request Entity Too Large</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_414_request_uri_too_long">414 Request-URI Too Long</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy will send this status code to the client if the
-request-line is too long. It may also be sent by
-<code>cowboy_rest</code> under normal conditions.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Cowboy will send this status code to the client if the request-line is too long. It may also be sent by <code>cowboy_rest</code> under normal conditions.</p>
<h2 id="_415_unsupported_media_type">415 Unsupported Media Type</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_500_internal_server_error">500 Internal Server Error</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent when a crash occurs in HTTP, loop
-or REST handlers, or when an invalid return value is
-returned. It may also be sent by <code>cowboy_rest</code> under
-normal conditions.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent when a crash occurs in HTTP, loop or REST handlers, or when an invalid return value is returned. It may also be sent by <code>cowboy_rest</code> under normal conditions.</p>
<h2 id="_501_not_implemented">501 Not Implemented</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_503_service_unavailable">503 Service Unavailable</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_505_http_version_not_supported">505 HTTP Version Not Supported</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy only supports the versions 1.0 and 1.1 of HTTP.
-In all other cases this status code is sent back to the
-client and the connection is closed.</p></div>
-</div>
-</div>
+<p>Cowboy only supports the versions 1.0 and 1.1 of HTTP. In all other cases this status code is sent back to the client and the connection is closed.</p>
+
diff --git a/docs/en/cowboy/2.1/manual/index.html b/docs/en/cowboy/2.1/manual/index.html
index 7ad969d9..5cd833a0 100644
--- a/docs/en/cowboy/2.1/manual/index.html
+++ b/docs/en/cowboy/2.1/manual/index.html
@@ -62,171 +62,77 @@
<h1 class="lined-header"><span>Cowboy Function Reference</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy - Small, fast, modern HTTP server for Erlang/OTP</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy - Small, fast, modern HTTP server for Erlang/OTP</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy is an HTTP server for Erlang/OTP with support for the
-HTTP/1.1, HTTP/2 and Websocket protocols.</p></div>
-<div class="paragraph"><p>Cowboy aims to provide a complete HTTP stack. This includes
-the implementation of the HTTP RFCs but also any directly
-related standards, like Websocket or Server-Sent Events.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Cowboy is an HTTP server for Erlang/OTP with support for the HTTP/1.1, HTTP/2 and Websocket protocols.</p>
+<p>Cowboy aims to provide a complete HTTP stack. This includes the implementation of the HTTP RFCs but also any directly related standards, like Websocket or Server-Sent Events.</p>
<h2 id="_modules">Modules</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Functions:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="cowboy">cowboy(3)</a> - Listener management
-</p>
+<p>Functions:</p>
+<ul><li><a href="cowboy">cowboy(3)</a> - Listener management
</li>
-<li>
-<p>
-<a href="cowboy_req">cowboy_req(3)</a> - Request and response
-</p>
+<li><a href="cowboy_req">cowboy_req(3)</a> - Request and response
</li>
-<li>
-<p>
-<a href="cowboy_router">cowboy_router(3)</a> - Router
-</p>
+<li><a href="cowboy_router">cowboy_router(3)</a> - Router
</li>
-<li>
-<p>
-<a href="cowboy_constraints">cowboy_constraints(3)</a> - Constraints
-</p>
+<li><a href="cowboy_constraints">cowboy_constraints(3)</a> - Constraints
</li>
-</ul></div>
-<div class="paragraph"><p>Protocols:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="cowboy_http">cowboy_http(3)</a> - HTTP/1.1
-</p>
+</ul>
+<p>Protocols:</p>
+<ul><li><a href="cowboy_http">cowboy_http(3)</a> - HTTP/1.1
</li>
-<li>
-<p>
-<a href="cowboy_http2">cowboy_http2(3)</a> - HTTP/2
-</p>
+<li><a href="cowboy_http2">cowboy_http2(3)</a> - HTTP/2
</li>
-<li>
-<p>
-<a href="cowboy_websocket">cowboy_websocket(3)</a> - Websocket
-</p>
+<li><a href="cowboy_websocket">cowboy_websocket(3)</a> - Websocket
</li>
-</ul></div>
-<div class="paragraph"><p>Handlers:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="cowboy_static">cowboy_static(3)</a> - Static file handler
-</p>
+</ul>
+<p>Handlers:</p>
+<ul><li><a href="cowboy_static">cowboy_static(3)</a> - Static file handler
</li>
-</ul></div>
-<div class="paragraph"><p>Behaviors:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="cowboy_handler">cowboy_handler(3)</a> - Plain HTTP handlers
-</p>
+</ul>
+<p>Behaviors:</p>
+<ul><li><a href="cowboy_handler">cowboy_handler(3)</a> - Plain HTTP handlers
</li>
-<li>
-<p>
-<a href="cowboy_loop">cowboy_loop(3)</a> - Loop handlers
-</p>
+<li><a href="cowboy_loop">cowboy_loop(3)</a> - Loop handlers
</li>
-<li>
-<p>
-<a href="cowboy_middleware">cowboy_middleware(3)</a> - Middlewares
-</p>
+<li><a href="cowboy_middleware">cowboy_middleware(3)</a> - Middlewares
</li>
-<li>
-<p>
-<a href="cowboy_rest">cowboy_rest(3)</a> - REST handlers
-</p>
+<li><a href="cowboy_rest">cowboy_rest(3)</a> - REST handlers
</li>
-<li>
-<p>
-<a href="cowboy_stream">cowboy_stream(3)</a> - Stream handlers
-</p>
+<li><a href="cowboy_stream">cowboy_stream(3)</a> - Stream handlers
</li>
-<li>
-<p>
-<a href="cowboy_websocket">cowboy_websocket(3)</a> - Websocket handlers
-</p>
+<li><a href="cowboy_websocket">cowboy_websocket(3)</a> - Websocket handlers
</li>
-</ul></div>
-<div class="paragraph"><p>Middlewares:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="cowboy_router">cowboy_router(3)</a> - Router middleware
-</p>
+</ul>
+<p>Middlewares:</p>
+<ul><li><a href="cowboy_router">cowboy_router(3)</a> - Router middleware
</li>
-<li>
-<p>
-<a href="cowboy_handler">cowboy_handler(3)</a> - Handler middleware
-</p>
+<li><a href="cowboy_handler">cowboy_handler(3)</a> - Handler middleware
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
+<!-- @todo http_status_codes is not linked to; what to do with it?-->
<h2 id="_dependencies">Dependencies</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="ranch_app">ranch(7)</a> - Socket acceptor pool for TCP protocols
-</p>
+<ul><li><a href="ranch_app">ranch(7)</a> - Socket acceptor pool for TCP protocols
</li>
-<li>
-<p>
-<a href="cowlib_app">cowlib(7)</a> - Support library for manipulating Web protocols
-</p>
+<li><a href="cowlib_app">cowlib(7)</a> - Support library for manipulating Web protocols
</li>
-<li>
-<p>
-ssl - Secure communication over sockets
-</p>
+<li>ssl - Secure communication over sockets
</li>
-<li>
-<p>
-crypto - Crypto functions
-</p>
+<li>crypto - Crypto functions
</li>
-</ul></div>
-<div class="paragraph"><p>All these applications must be started before the <code>cowboy</code>
-application. To start Cowboy and all dependencies at once:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+</ul>
+<p>All these applications must be started before the <code>cowboy</code> application. To start Cowboy and all dependencies at once:</p>
+<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">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">application:ensure_all_started</span></span>(<span style="color: #FF6600">cowboy</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">application:ensure_all_started</font></b>(<font color="#FF6600">cowboy</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_environment">Environment</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <code>cowboy</code> application does not define any application
-environment configuration parameters.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The <code>cowboy</code> application does not define any application environment configuration parameters.</p>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="ranch_app">ranch(7)</a>,
-<a href="cowlib_app">cowlib(7)</a></p></div>
-</div>
-</div>
+<p><a href="ranch_app">ranch(7)</a>, <a href="cowlib_app">cowlib(7)</a></p>
+
diff --git a/docs/en/cowboy/2.2/guide/constraints/index.html b/docs/en/cowboy/2.2/guide/constraints/index.html
index 39e56d64..8ec722ab 100644
--- a/docs/en/cowboy/2.2/guide/constraints/index.html
+++ b/docs/en/cowboy/2.2/guide/constraints/index.html
@@ -62,141 +62,86 @@
<h1 class="lined-header"><span>Constraints</span></h1>
-<div class="paragraph"><p>Constraints are validation and conversion functions applied
-to user input.</p></div>
-<div class="paragraph"><p>They are used in various places in Cowboy, including the
-router and the <code>cowboy_req</code> match functions.</p></div>
-<div class="sect1">
+<p>Constraints are validation and conversion functions applied to user input.</p>
+<p>They are used in various places in Cowboy, including the router and the <code>cowboy_req</code> match functions.</p>
<h2 id="_syntax">Syntax</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Constraints are provided as a list of fields. For each field
-in the list, specific constraints can be applied, as well as
-a default value if the field is missing.</p></div>
-<div class="paragraph"><p>A field can take the form of an atom <code>field</code>, a tuple with
-constraints <code>{field, Constraints}</code> or a tuple with constraints
-and a default value <code>{field, Constraints, Default}</code>.
-The <code>field</code> form indicates the field is mandatory.</p></div>
-<div class="paragraph"><p>Note that when used with the router, only the second form
-makes sense, as it does not use the default and the field
-is always defined.</p></div>
-<div class="paragraph"><p>Constraints for each field are provided as an ordered list
-of atoms or funs to apply. Built-in constraints are provided
-as atoms, while custom constraints are provided as funs.</p></div>
-<div class="paragraph"><p>When multiple constraints are provided, they are applied in
-the order given. If the value has been modified by a constraint
-then the next one receives the new value.</p></div>
-<div class="paragraph"><p>For example, the following constraints will first validate
-and convert the field <code>my_value</code> to an integer, and then
-check that the integer is positive:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Constraints are provided as a list of fields. For each field in the list, specific constraints can be applied, as well as a default value if the field is missing.</p>
+<p>A field can take the form of an atom <code>field</code>, a tuple with constraints <code>{field, Constraints}</code> or a tuple with constraints and a default value <code>{field, Constraints, Default}</code>. The <code>field</code> form indicates the field is mandatory.</p>
+<p>Note that when used with the router, only the second form makes sense, as it does not use the default and the field is always defined.</p>
+<p>Constraints for each field are provided as an ordered list of atoms or funs to apply. Built-in constraints are provided as atoms, while custom constraints are provided as funs.</p>
+<p>When multiple constraints are provided, they are applied in the order given. If the value has been modified by a constraint then the next one receives the new value.</p>
+<p>For example, the following constraints will first validate and convert the field <code>my_value</code> to an integer, and then check that the integer is positive:</p>
+<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">PositiveFun</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">fun</span></span>
- (<span style="color: #990000">_</span>, <span style="color: #009900">V</span>) <span style="font-weight: bold"><span style="color: #0000FF">when</span></span> <span style="color: #009900">V</span> <span style="color: #990000">&gt;</span> <span style="color: #993399">0</span> <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">V</span>};
- (<span style="color: #990000">_</span>, <span style="color: #990000">_</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">error</span>, <span style="color: #FF6600">not_positive</span>}
-<span style="font-weight: bold"><span style="color: #0000FF">end</span></span>,
-{<span style="color: #FF6600">my_value</span>, [<span style="color: #FF6600">int</span>, <span style="color: #009900">PositiveFun</span>]}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>We ignore the first fun argument in this snippet. We shouldn&#8217;t.
-We will simply learn what it is later in this chapter.</p></div>
-<div class="paragraph"><p>When there&#8217;s only one constraint, it can be provided directly
-without wrapping it into a list:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">PositiveFun</font> <font color="#990000">=</font> <b><font color="#0000FF">fun</font></b>
+ (<font color="#990000">_</font>, <font color="#009900">V</font>) <b><font color="#0000FF">when</font></b> <font color="#009900">V</font> <font color="#990000">&gt;</font> <font color="#993399">0</font> <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <font color="#009900">V</font>};
+ (<font color="#990000">_</font>, <font color="#990000">_</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">error</font>, <font color="#FF6600">not_positive</font>}
+<b><font color="#0000FF">end</font></b>,
+{<font color="#FF6600">my_value</font>, [<font color="#FF6600">int</font>, <font color="#009900">PositiveFun</font>]}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>We ignore the first fun argument in this snippet. We shouldn&apos;t. We will simply learn what it is later in this chapter.</p>
+<p>When there&apos;s only one constraint, it can be provided directly without wrapping it into a list:</p>
+<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">my_value</span>, <span style="color: #FF6600">int</span>}</tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#FF6600">my_value</font>, <font color="#FF6600">int</font>}</tt></pre>
+</div></div>
<h2 id="_built_in_constraints">Built-in constraints</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Built-in constraints are specified as an atom:</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"> Constraint </th>
-<th align="left" valign="top"> Description</th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td align="left" valign="top"><p class="table">int</p></td>
-<td align="left" valign="top"><p class="table">Converts binary value to integer.</p></td>
+<p>Built-in constraints are specified as an atom:</p>
+<table rules="all" width="100%" frame="border"
+ cellspacing="0" cellpadding="4">
+<thead><tr><th>Constraint</th>
+<th>Description</th>
+</tr></thead><tbody><tr><td>int</td>
+<td>Converts binary value to integer.</td>
</tr>
-<tr>
-<td align="left" valign="top"><p class="table">nonempty</p></td>
-<td align="left" valign="top"><p class="table">Ensures the binary value is non-empty.</p></td>
+<tr><td>nonempty</td>
+<td>Ensures the binary value is non-empty.</td>
</tr>
-</tbody>
-</table>
-</div>
-</div>
-</div>
-<div class="sect1">
+</tbody></table>
<h2 id="_custom_constraints">Custom constraints</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Custom constraints are specified as a fun. This fun takes
-two arguments. The first argument indicates the operation
-to be performed, and the second is the value. What the
-value is and what must be returned depends on the operation.</p></div>
-<div class="paragraph"><p>Cowboy currently defines three operations. The operation
-used for validating and converting user input is the <code>forward</code>
-operation.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Custom constraints are specified as a fun. This fun takes two arguments. The first argument indicates the operation to be performed, and the second is the value. What the value is and what must be returned depends on the operation.</p>
+<p>Cowboy currently defines three operations. The operation used for validating and converting user input is the <code>forward</code> operation.</p>
+<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">int</span></span>(<span style="color: #FF6600">forward</span>, <span style="color: #009900">Value</span>) <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #0000FF">try</span></span>
- {<span style="color: #FF6600">ok</span>, <span style="font-weight: bold"><span style="color: #000000">binary_to_integer</span></span>(<span style="color: #009900">Value</span>)}
- <span style="font-weight: bold"><span style="color: #0000FF">catch</span></span> <span style="color: #990000">_:_</span> <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">error</span>, <span style="color: #FF6600">not_an_integer</span>}
- <span style="font-weight: bold"><span style="color: #0000FF">end</span></span>;</tt></pre></div></div>
-<div class="paragraph"><p>The value must be returned even if it is not converted
-by the constraint.</p></div>
-<div class="paragraph"><p>The <code>reverse</code> operation does the opposite: it
-takes a converted value and changes it back to what the
-user input would have been.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">int</font></b>(<font color="#FF6600">forward</font>, <font color="#009900">Value</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">try</font></b>
+ {<font color="#FF6600">ok</font>, <b><font color="#000000">binary_to_integer</font></b>(<font color="#009900">Value</font>)}
+ <b><font color="#0000FF">catch</font></b> <font color="#990000">_:_</font> <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">error</font>, <font color="#FF6600">not_an_integer</font>}
+ <b><font color="#0000FF">end</font></b>;</tt></pre>
+</div></div>
+<p>The value must be returned even if it is not converted by the constraint.</p>
+<p>The <code>reverse</code> operation does the opposite: it takes a converted value and changes it back to what the user input would have been.</p>
+<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">int</span></span>(<span style="color: #FF6600">reverse</span>, <span style="color: #009900">Value</span>) <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #0000FF">try</span></span>
- {<span style="color: #FF6600">ok</span>, <span style="font-weight: bold"><span style="color: #000000">integer_to_binary</span></span>(<span style="color: #009900">Value</span>)}
- <span style="font-weight: bold"><span style="color: #0000FF">catch</span></span> <span style="color: #990000">_:_</span> <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">error</span>, <span style="color: #FF6600">not_an_integer</span>}
- <span style="font-weight: bold"><span style="color: #0000FF">end</span></span>;</tt></pre></div></div>
-<div class="paragraph"><p>Finally, the <code>format_error</code> operation takes an error
-returned by any other operation and returns a formatted
-human-readable error message.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">int</font></b>(<font color="#FF6600">reverse</font>, <font color="#009900">Value</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">try</font></b>
+ {<font color="#FF6600">ok</font>, <b><font color="#000000">integer_to_binary</font></b>(<font color="#009900">Value</font>)}
+ <b><font color="#0000FF">catch</font></b> <font color="#990000">_:_</font> <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">error</font>, <font color="#FF6600">not_an_integer</font>}
+ <b><font color="#0000FF">end</font></b>;</tt></pre>
+</div></div>
+<p>Finally, the <code>format_error</code> operation takes an error returned by any other operation and returns a formatted human-readable error message.</p>
+<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">int</span></span>(<span style="color: #FF6600">format_error</span>, {<span style="color: #FF6600">not_an_integer</span>, <span style="color: #009900">Value</span>}) <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #000000">io_lib:format</span></span>(<span style="color: #FF0000">"The value ~p is not an integer."</span>, [<span style="color: #009900">Value</span>])<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Notice that for this case you get both the error and
-the value that was given to the constraint that produced
-this error.</p></div>
-<div class="paragraph"><p>Cowboy will not catch exceptions coming from constraint
-functions. They should be written to not emit any exceptions.</p></div>
-</div>
-</div>
+<pre><tt><b><font color="#000000">int</font></b>(<font color="#FF6600">format_error</font>, {<font color="#FF6600">not_an_integer</font>, <font color="#009900">Value</font>}) <font color="#990000">-&gt;</font>
+ <b><font color="#000000">io_lib:format</font></b>(<font color="#FF0000">"The value ~p is not an integer."</font>, [<font color="#009900">Value</font>])<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Notice that for this case you get both the error and the value that was given to the constraint that produced this error.</p>
+<p>Cowboy will not catch exceptions coming from constraint functions. They should be written to not emit any exceptions.</p>
+
diff --git a/docs/en/cowboy/2.2/guide/cookies/index.html b/docs/en/cowboy/2.2/guide/cookies/index.html
index 39863979..e545d2e5 100644
--- a/docs/en/cowboy/2.2/guide/cookies/index.html
+++ b/docs/en/cowboy/2.2/guide/cookies/index.html
@@ -62,144 +62,103 @@
<h1 class="lined-header"><span>Using cookies</span></h1>
-<div class="paragraph"><p>Cookies are a mechanism allowing applications to maintain
-state on top of the stateless HTTP protocol.</p></div>
-<div class="paragraph"><p>Cookies are a name/value store where the names and values are
-stored in plain text. They expire either after a delay
-or when the browser closes. They can be configured on a
-specific domain name or path, and restricted to secure
-resources (sent or downloaded over HTTPS), or restricted
-to the server (disallowing access from client-side scripts).</p></div>
-<div class="paragraph"><p>Cookie names are de facto case sensitive.</p></div>
-<div class="paragraph"><p>Cookies are stored client-side and sent with every subsequent
-request that matches the domain and path for which they were
-stored, until they expire. This can create a non-negligible
-cost.</p></div>
-<div class="paragraph"><p>Cookies should not be considered secure. They are stored on
-the user&#8217;s computer in plain text, and can be read by any
-program. They can also be read by proxies when using clear
-connections. Always validate the value before using it,
-and never store any sensitive information inside it.</p></div>
-<div class="paragraph"><p>Cookies set by the server are only available in requests
-following the client reception of the response containing
-them.</p></div>
-<div class="paragraph"><p>Cookies may be sent repeatedly. This is often useful to
-update the expiration time and avoid losing a cookie.</p></div>
-<div class="sect1">
+<p>Cookies are a mechanism allowing applications to maintain state on top of the stateless HTTP protocol.</p>
+<p>Cookies are a name/value store where the names and values are stored in plain text. They expire either after a delay or when the browser closes. They can be configured on a specific domain name or path, and restricted to secure resources (sent or downloaded over HTTPS), or restricted to the server (disallowing access from client-side scripts).</p>
+<p>Cookie names are de facto case sensitive.</p>
+<p>Cookies are stored client-side and sent with every subsequent request that matches the domain and path for which they were stored, until they expire. This can create a non-negligible cost.</p>
+<p>Cookies should not be considered secure. They are stored on the user&apos;s computer in plain text, and can be read by any program. They can also be read by proxies when using clear connections. Always validate the value before using it, and never store any sensitive information inside it.</p>
+<p>Cookies set by the server are only available in requests following the client reception of the response containing them.</p>
+<p>Cookies may be sent repeatedly. This is often useful to update the expiration time and avoid losing a cookie.</p>
<h2 id="_setting_cookies">Setting cookies</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>By default cookies are defined for the duration of the session:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>By default cookies are defined for the duration of the session:</p>
+<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">SessionID</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">generate_session_id</span></span>(),
-<span style="color: #009900">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_cookie</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"sessionid"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">SessionID</span>, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>They can also be set for a duration in seconds:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">SessionID</font> <font color="#990000">=</font> <b><font color="#000000">generate_session_id</font></b>(),
+<font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_cookie</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"sessionid"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">SessionID</font>, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>They can also be set for a duration in seconds:</p>
+<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">SessionID</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">generate_session_id</span></span>(),
-<span style="color: #009900">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_cookie</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"sessionid"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">SessionID</span>, <span style="color: #009900">Req0</span>,
- #{<span style="color: #0000FF">max_age</span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">3600</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>To delete cookies, set <code>max_age</code> to 0:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">SessionID</font> <font color="#990000">=</font> <b><font color="#000000">generate_session_id</font></b>(),
+<font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_cookie</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"sessionid"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">SessionID</font>, <font color="#009900">Req0</font>,
+ #{<font color="#0000FF">max_age</font> <font color="#990000">=&gt;</font> <font color="#993399">3600</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>To delete cookies, set <code>max_age</code> to 0:</p>
+<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">SessionID</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">generate_session_id</span></span>(),
-<span style="color: #009900">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_cookie</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"sessionid"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">SessionID</span>, <span style="color: #009900">Req0</span>,
- #{<span style="color: #0000FF">max_age</span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">0</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>To restrict cookies to a specific domain and path, the options
-of the same name can be used:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">SessionID</font> <font color="#990000">=</font> <b><font color="#000000">generate_session_id</font></b>(),
+<font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_cookie</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"sessionid"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">SessionID</font>, <font color="#009900">Req0</font>,
+ #{<font color="#0000FF">max_age</font> <font color="#990000">=&gt;</font> <font color="#993399">0</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>To restrict cookies to a specific domain and path, the options of the same name can be used:</p>
+<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">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_cookie</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"inaccount"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"1"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req0</span>,
- #{<span style="color: #0000FF">domain</span> <span style="color: #990000">=&gt;</span> <span style="color: #FF0000">"my.example.org"</span>, <span style="color: #0000FF">path</span> <span style="color: #990000">=&gt;</span> <span style="color: #FF0000">"/account"</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Cookies will be sent with requests to this domain and all
-its subdomains, and to resources on this path or deeper
-in the path hierarchy.</p></div>
-<div class="paragraph"><p>To restrict cookies to secure channels (typically resources
-available over HTTPS):</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_cookie</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"inaccount"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"1"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req0</font>,
+ #{<font color="#0000FF">domain</font> <font color="#990000">=&gt;</font> <font color="#FF0000">"my.example.org"</font>, <font color="#0000FF">path</font> <font color="#990000">=&gt;</font> <font color="#FF0000">"/account"</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Cookies will be sent with requests to this domain and all its subdomains, and to resources on this path or deeper in the path hierarchy.</p>
+<p>To restrict cookies to secure channels (typically resources available over HTTPS):</p>
+<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">SessionID</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">generate_session_id</span></span>(),
-<span style="color: #009900">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_cookie</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"sessionid"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">SessionID</span>, <span style="color: #009900">Req0</span>,
- #{<span style="color: #0000FF">secure</span> <span style="color: #990000">=&gt;</span> <span style="color: #000080">true</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>To prevent client-side scripts from accessing a cookie:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">SessionID</font> <font color="#990000">=</font> <b><font color="#000000">generate_session_id</font></b>(),
+<font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_cookie</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"sessionid"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">SessionID</font>, <font color="#009900">Req0</font>,
+ #{<font color="#0000FF">secure</font> <font color="#990000">=&gt;</font> <font color="#000080">true</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>To prevent client-side scripts from accessing a cookie:</p>
+<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">SessionID</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">generate_session_id</span></span>(),
-<span style="color: #009900">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_cookie</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"sessionid"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">SessionID</span>, <span style="color: #009900">Req0</span>,
- #{<span style="color: #0000FF">http_only</span> <span style="color: #990000">=&gt;</span> <span style="color: #000080">true</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Cookies may also be set client-side, for example using
-Javascript.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">SessionID</font> <font color="#990000">=</font> <b><font color="#000000">generate_session_id</font></b>(),
+<font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_cookie</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"sessionid"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">SessionID</font>, <font color="#009900">Req0</font>,
+ #{<font color="#0000FF">http_only</font> <font color="#990000">=&gt;</font> <font color="#000080">true</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Cookies may also be set client-side, for example using Javascript.</p>
<h2 id="_reading_cookies">Reading cookies</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The client only ever sends back the cookie name and value.
-All other options that can be set are never sent back.</p></div>
-<div class="paragraph"><p>Cowboy provides two functions for reading cookies. Both
-involve parsing the cookie header(s) and so should not
-be called repeatedly.</p></div>
-<div class="paragraph"><p>You can get all cookies as a key/value list:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The client only ever sends back the cookie name and value. All other options that can be set are never sent back.</p>
+<p>Cowboy provides two functions for reading cookies. Both involve parsing the cookie header(s) and so should not be called repeatedly.</p>
+<p>You can get all cookies as a key/value list:</p>
+<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">Cookies</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:parse_cookies</span></span>(<span style="color: #009900">Req</span>),
-{<span style="color: #990000">_</span>, <span style="color: #009900">Lang</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">lists:keyfind</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"lang"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #993399">1</span>, <span style="color: #009900">Cookies</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Or you can perform a match against cookies and retrieve
-only the ones you need, while at the same time doing
-any required post processing using <a href="../constraints">constraints</a>.
-This function returns a map:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Cookies</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:parse_cookies</font></b>(<font color="#009900">Req</font>),
+{<font color="#990000">_</font>, <font color="#009900">Lang</font>} <font color="#990000">=</font> <b><font color="#000000">lists:keyfind</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"lang"</font><font color="#990000">&gt;&gt;</font>, <font color="#993399">1</font>, <font color="#009900">Cookies</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Or you can perform a match against cookies and retrieve only the ones you need, while at the same time doing any required post processing using <a href="../constraints">constraints</a>. This function returns a map:</p>
+<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">id</span> <span style="color: #990000">:=</span> <span style="color: #009900">ID</span>, <span style="color: #FF6600">lang</span> <span style="color: #990000">:=</span> <span style="color: #009900">Lang</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:match_cookies</span></span>([<span style="color: #FF6600">id</span>, <span style="color: #FF6600">lang</span>], <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>You can use constraints to validate the values while matching
-them. The following snippet will crash if the <code>id</code> cookie is
-not an integer number or if the <code>lang</code> cookie is empty. Additionally
-the <code>id</code> cookie value will be converted to an integer term:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>#{<font color="#FF6600">id</font> <font color="#990000">:=</font> <font color="#009900">ID</font>, <font color="#FF6600">lang</font> <font color="#990000">:=</font> <font color="#009900">Lang</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:match_cookies</font></b>([<font color="#FF6600">id</font>, <font color="#FF6600">lang</font>], <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>You can use constraints to validate the values while matching them. The following snippet will crash if the <code>id</code> cookie is not an integer number or if the <code>lang</code> cookie is empty. Additionally the <code>id</code> cookie value will be converted to an integer term:</p>
+<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">CookiesMap</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:match_cookies</span></span>([{<span style="color: #FF6600">id</span>, <span style="color: #FF6600">int</span>}, {<span style="color: #FF6600">lang</span>, <span style="color: #FF6600">nonempty</span>}], <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Note that if two cookies share the same name, then the map value
-will be a list of the two cookie values.</p></div>
-<div class="paragraph"><p>A default value can be provided. The default will be used
-if the <code>lang</code> cookie is not found. It will not be used if
-the cookie is found but has an empty value:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">CookiesMap</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:match_cookies</font></b>([{<font color="#FF6600">id</font>, <font color="#FF6600">int</font>}, {<font color="#FF6600">lang</font>, <font color="#FF6600">nonempty</font>}], <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Note that if two cookies share the same name, then the map value will be a list of the two cookie values.</p>
+<p>A default value can be provided. The default will be used if the <code>lang</code> cookie is not found. It will not be used if the cookie is found but has an empty value:</p>
+<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">lang</span> <span style="color: #990000">:=</span> <span style="color: #009900">Lang</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:match_cookies</span></span>([{<span style="color: #FF6600">lang</span>, [], <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"en-US"</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="paragraph"><p>If no default is provided and the value is missing, an
-exception is thrown.</p></div>
-</div>
-</div>
+<pre><tt>#{<font color="#FF6600">lang</font> <font color="#990000">:=</font> <font color="#009900">Lang</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:match_cookies</font></b>([{<font color="#FF6600">lang</font>, [], <font color="#990000">&lt;&lt;</font><font color="#FF0000">"en-US"</font><font color="#990000">&gt;&gt;</font>}], <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>If no default is provided and the value is missing, an exception is thrown.</p>
+
diff --git a/docs/en/cowboy/2.2/guide/erlang_web/index.html b/docs/en/cowboy/2.2/guide/erlang_web/index.html
index 23d64428..5804baf9 100644
--- a/docs/en/cowboy/2.2/guide/erlang_web/index.html
+++ b/docs/en/cowboy/2.2/guide/erlang_web/index.html
@@ -62,194 +62,52 @@
<h1 class="lined-header"><span>Erlang and the Web</span></h1>
-<div class="paragraph"><p>Erlang is the ideal platform for writing Web applications.
-Its features are a perfect match for the requirements of
-modern Web applications.</p></div>
-<div class="sect1">
+<p>Erlang is the ideal platform for writing Web applications. Its features are a perfect match for the requirements of modern Web applications.</p>
<h2 id="_the_web_is_concurrent">The Web is concurrent</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>When you access a website there is little concurrency
-involved. A few connections are opened and requests
-are sent through these connections. Then the web page
-is displayed on your screen. Your browser will only
-open up to 4 or 8 connections to the server, depending
-on your settings. This isn&#8217;t much.</p></div>
-<div class="paragraph"><p>But think about it. You are not the only one accessing
-the server at the same time. There can be hundreds, if
-not thousands, if not millions of connections to the
-same server at the same time.</p></div>
-<div class="paragraph"><p>Even today a lot of systems used in production haven&#8217;t
-solved the C10K problem (ten thousand concurrent connections).
-And the ones who did are trying hard to get to the next
-step, C100K, and are pretty far from it.</p></div>
-<div class="paragraph"><p>Erlang meanwhile has no problem handling millions of
-connections. At the time of writing there are application
-servers written in Erlang that can handle more than two
-million connections on a single server in a real production
-application, with spare memory and CPU!</p></div>
-<div class="paragraph"><p>The Web is concurrent, and Erlang is a language designed
-for concurrency, so it is a perfect match.</p></div>
-<div class="paragraph"><p>Of course, various platforms need to scale beyond a few
-million connections. This is where Erlang&#8217;s built-in
-distribution mechanisms come in. If one server isn&#8217;t
-enough, add more! Erlang allows you to use the same code
-for talking to local processes or to processes in other
-parts of your cluster, which means you can scale very
-quickly if the need arises.</p></div>
-<div class="paragraph"><p>The Web has large userbases, and the Erlang platform was
-designed to work in a distributed setting, so it is a
-perfect match.</p></div>
-<div class="paragraph"><p>Or is it? Surely you can find solutions to handle that many
-concurrent connections with your favorite language&#8230; But all
-these solutions will break down in the next few years. Why?
-Firstly because servers don&#8217;t get any more powerful, they
-instead get a lot more cores and memory. This is only useful
-if your application can use them properly, and Erlang is
-light-years away from anything else in that area. Secondly,
-today your computer and your phone are online, tomorrow your
-watch, goggles, bike, car, fridge and tons of other devices
-will also connect to various applications on the Internet.</p></div>
-<div class="paragraph"><p>Only Erlang is prepared to deal with what&#8217;s coming.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>When you access a website there is little concurrency involved. A few connections are opened and requests are sent through these connections. Then the web page is displayed on your screen. Your browser will only open up to 4 or 8 connections to the server, depending on your settings. This isn&apos;t much.</p>
+<p>But think about it. You are not the only one accessing the server at the same time. There can be hundreds, if not thousands, if not millions of connections to the same server at the same time.</p>
+<p>Even today a lot of systems used in production haven&apos;t solved the C10K problem (ten thousand concurrent connections). And the ones who did are trying hard to get to the next step, C100K, and are pretty far from it.</p>
+<p>Erlang meanwhile has no problem handling millions of connections. At the time of writing there are application servers written in Erlang that can handle more than two million connections on a single server in a real production application, with spare memory and CPU!</p>
+<p>The Web is concurrent, and Erlang is a language designed for concurrency, so it is a perfect match.</p>
+<p>Of course, various platforms need to scale beyond a few million connections. This is where Erlang&apos;s built-in distribution mechanisms come in. If one server isn&apos;t enough, add more! Erlang allows you to use the same code for talking to local processes or to processes in other parts of your cluster, which means you can scale very quickly if the need arises.</p>
+<p>The Web has large userbases, and the Erlang platform was designed to work in a distributed setting, so it is a perfect match.</p>
+<p>Or is it? Surely you can find solutions to handle that many concurrent connections with your favorite language... But all these solutions will break down in the next few years. Why? Firstly because servers don&apos;t get any more powerful, they instead get a lot more cores and memory. This is only useful if your application can use them properly, and Erlang is light-years away from anything else in that area. Secondly, today your computer and your phone are online, tomorrow your watch, goggles, bike, car, fridge and tons of other devices will also connect to various applications on the Internet.</p>
+<p>Only Erlang is prepared to deal with what&apos;s coming.</p>
<h2 id="_the_web_is_soft_real_time">The Web is soft real time</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>What does soft real time mean, you ask? It means we want the
-operations done as quickly as possible, and in the case of
-web applications, it means we want the data propagated fast.</p></div>
-<div class="paragraph"><p>In comparison, hard real time has a similar meaning, but also
-has a hard time constraint, for example an operation needs to
-be done in under N milliseconds otherwise the system fails
-entirely.</p></div>
-<div class="paragraph"><p>Users aren&#8217;t that needy yet, they just want to get access
-to their content in a reasonable delay, and they want the
-actions they make to register at most a few seconds after
-they submitted them, otherwise they&#8217;ll start worrying about
-whether it successfully went through.</p></div>
-<div class="paragraph"><p>The Web is soft real time because taking longer to perform an
-operation would be seen as bad quality of service.</p></div>
-<div class="paragraph"><p>Erlang is a soft real time system. It will always run
-processes fairly, a little at a time, switching to another
-process after a while and preventing a single process to
-steal resources from all others. This means that Erlang
-can guarantee stable low latency of operations.</p></div>
-<div class="paragraph"><p>Erlang provides the guarantees that the soft real time Web
-requires.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>What does soft real time mean, you ask? It means we want the operations done as quickly as possible, and in the case of web applications, it means we want the data propagated fast.</p>
+<p>In comparison, hard real time has a similar meaning, but also has a hard time constraint, for example an operation needs to be done in under N milliseconds otherwise the system fails entirely.</p>
+<p>Users aren&apos;t that needy yet, they just want to get access to their content in a reasonable delay, and they want the actions they make to register at most a few seconds after they submitted them, otherwise they&apos;ll start worrying about whether it successfully went through.</p>
+<p>The Web is soft real time because taking longer to perform an operation would be seen as bad quality of service.</p>
+<p>Erlang is a soft real time system. It will always run processes fairly, a little at a time, switching to another process after a while and preventing a single process to steal resources from all others. This means that Erlang can guarantee stable low latency of operations.</p>
+<p>Erlang provides the guarantees that the soft real time Web requires.</p>
<h2 id="_the_web_is_asynchronous">The Web is asynchronous</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Long ago, the Web was synchronous because HTTP was synchronous.
-You fired a request, and then waited for a response. Not anymore.
-It all began when XmlHttpRequest started being used. It allowed
-the client to perform asynchronous calls to the server.</p></div>
-<div class="paragraph"><p>Then Websocket appeared and allowed both the server and the client
-to send data to the other endpoint completely asynchronously. The
-data is contained within frames and no response is necessary.</p></div>
-<div class="paragraph"><p>Erlang processes work the same. They send each other data contained
-within messages and then continue running without needing a response.
-They tend to spend most of their time inactive, waiting for a new
-message, and the Erlang VM happily activate them when one is received.</p></div>
-<div class="paragraph"><p>It is therefore quite easy to imagine Erlang being good at receiving
-Websocket frames, which may come in at unpredictable times, pass the
-data to the responsible processes which are always ready waiting for
-new messages, and perform the operations required by only activating
-the required parts of the system.</p></div>
-<div class="paragraph"><p>The more recent Web technologies, like Websocket of course, but also
-HTTP/2.0, are all fully asynchronous protocols. The concept
-of requests and responses is retained of course, but anything could
-be sent in between, by both the client or the browser, and the
-responses could also be received in a completely different order.</p></div>
-<div class="paragraph"><p>Erlang is by nature asynchronous and really good at it thanks to the
-great engineering that has been done in the VM over the years. It&#8217;s
-only natural that it&#8217;s so good at dealing with the asynchronous Web.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Long ago, the Web was synchronous because HTTP was synchronous. You fired a request, and then waited for a response. Not anymore. It all began when XmlHttpRequest started being used. It allowed the client to perform asynchronous calls to the server.</p>
+<p>Then Websocket appeared and allowed both the server and the client to send data to the other endpoint completely asynchronously. The data is contained within frames and no response is necessary.</p>
+<p>Erlang processes work the same. They send each other data contained within messages and then continue running without needing a response. They tend to spend most of their time inactive, waiting for a new message, and the Erlang VM happily activate them when one is received.</p>
+<p>It is therefore quite easy to imagine Erlang being good at receiving Websocket frames, which may come in at unpredictable times, pass the data to the responsible processes which are always ready waiting for new messages, and perform the operations required by only activating the required parts of the system.</p>
+<p>The more recent Web technologies, like Websocket of course, but also HTTP/2.0, are all fully asynchronous protocols. The concept of requests and responses is retained of course, but anything could be sent in between, by both the client or the browser, and the responses could also be received in a completely different order.</p>
+<p>Erlang is by nature asynchronous and really good at it thanks to the great engineering that has been done in the VM over the years. It&apos;s only natural that it&apos;s so good at dealing with the asynchronous Web.</p>
<h2 id="_the_web_is_omnipresent">The Web is omnipresent</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The Web has taken a very important part of our lives. We&#8217;re
-connected at all times, when we&#8217;re on our phone, using our computer,
-passing time using a tablet while in the bathroom&#8230; And this
-isn&#8217;t going to slow down, every single device at home or on us
-will be connected.</p></div>
-<div class="paragraph"><p>All these devices are always connected. And with the number of
-alternatives to give you access to the content you seek, users
-tend to not stick around when problems arise. Users today want
-their applications to be always available and if it&#8217;s having
-too many issues they just move on.</p></div>
-<div class="paragraph"><p>Despite this, when developers choose a product to use for building
-web applications, their only concern seems to be "Is it fast?",
-and they look around for synthetic benchmarks showing which one
-is the fastest at sending "Hello world" with only a handful
-concurrent connections. Web benchmarks haven&#8217;t been representative
-of reality in a long time, and are drifting further away as
-time goes on.</p></div>
-<div class="paragraph"><p>What developers should really ask themselves is "Can I service
-all my users with no interruption?" and they&#8217;d find that they have
-two choices. They can either hope for the best, or they can use
-Erlang.</p></div>
-<div class="paragraph"><p>Erlang is built for fault tolerance. When writing code in any other
-language, you have to check all the return values and act accordingly
-to avoid any unforeseen issues. If you&#8217;re lucky, you won&#8217;t miss
-anything important. When writing Erlang code, you can just check
-the success condition and ignore all errors. If an error happens,
-the Erlang process crashes and is then restarted by a special
-process called a supervisor.</p></div>
-<div class="paragraph"><p>Erlang developers thus have no need to fear unhandled
-errors, and can focus on handling only the errors that should
-give some feedback to the user and let the system take care of
-the rest. This also has the advantage of allowing them to write
-a lot less code, and let them sleep at night.</p></div>
-<div class="paragraph"><p>Erlang&#8217;s fault tolerance oriented design is the first piece of
-what makes it the best choice for the omnipresent, always available
-Web.</p></div>
-<div class="paragraph"><p>The second piece is Erlang&#8217;s built-in distribution. Distribution
-is a key part of building a fault tolerant system, because it
-allows you to handle bigger failures, like a whole server going
-down, or even a data center entirely.</p></div>
-<div class="paragraph"><p>Fault tolerance and distribution are important today, and will be
-vital in the future of the Web. Erlang is ready.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The Web has taken a very important part of our lives. We&apos;re connected at all times, when we&apos;re on our phone, using our computer, passing time using a tablet while in the bathroom... And this isn&apos;t going to slow down, every single device at home or on us will be connected.</p>
+<p>All these devices are always connected. And with the number of alternatives to give you access to the content you seek, users tend to not stick around when problems arise. Users today want their applications to be always available and if it&apos;s having too many issues they just move on.</p>
+<p>Despite this, when developers choose a product to use for building web applications, their only concern seems to be &quot;Is it fast?&quot;, and they look around for synthetic benchmarks showing which one is the fastest at sending &quot;Hello world&quot; with only a handful concurrent connections. Web benchmarks haven&apos;t been representative of reality in a long time, and are drifting further away as time goes on.</p>
+<p>What developers should really ask themselves is &quot;Can I service all my users with no interruption?&quot; and they&apos;d find that they have two choices. They can either hope for the best, or they can use Erlang.</p>
+<p>Erlang is built for fault tolerance. When writing code in any other language, you have to check all the return values and act accordingly to avoid any unforeseen issues. If you&apos;re lucky, you won&apos;t miss anything important. When writing Erlang code, you can just check the success condition and ignore all errors. If an error happens, the Erlang process crashes and is then restarted by a special process called a supervisor.</p>
+<p>Erlang developers thus have no need to fear unhandled errors, and can focus on handling only the errors that should give some feedback to the user and let the system take care of the rest. This also has the advantage of allowing them to write a lot less code, and let them sleep at night.</p>
+<p>Erlang&apos;s fault tolerance oriented design is the first piece of what makes it the best choice for the omnipresent, always available Web.</p>
+<p>The second piece is Erlang&apos;s built-in distribution. Distribution is a key part of building a fault tolerant system, because it allows you to handle bigger failures, like a whole server going down, or even a data center entirely.</p>
+<p>Fault tolerance and distribution are important today, and will be vital in the future of the Web. Erlang is ready.</p>
<h2 id="_learn_erlang">Learn Erlang</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>If you are new to Erlang, you may want to grab a book or
-two to get started. Those are my recommendations as the
-author of Cowboy.</p></div>
-<div class="sect3">
+<p>If you are new to Erlang, you may want to grab a book or two to get started. Those are my recommendations as the author of Cowboy.</p>
<h4 id="_the_erlanger_playbook">The Erlanger Playbook</h4>
-<div class="paragraph"><p>The Erlanger Playbook is an ebook I am currently writing,
-which covers a number of different topics from code to
-documentation to testing Erlang applications. It also has
-an Erlang section where it covers directly the building
-blocks and patterns, rather than details like the syntax.</p></div>
-<div class="paragraph"><p>You can most likely read it as a complete beginner, but
-you will need a companion book to make the most of it.
-Buy it from the <a href="https://ninenines.eu">Nine Nines website</a>.</p></div>
-</div>
-<div class="sect3">
+<p>The Erlanger Playbook is an ebook I am currently writing, which covers a number of different topics from code to documentation to testing Erlang applications. It also has an Erlang section where it covers directly the building blocks and patterns, rather than details like the syntax.</p>
+<p>You can most likely read it as a complete beginner, but you will need a companion book to make the most of it. Buy it from the <a href="https://ninenines.eu">Nine Nines website</a>.</p>
<h4 id="_programming_erlang">Programming Erlang</h4>
-<div class="paragraph"><p>This book is from one of the creator of Erlang, Joe
-Armstrong. It provides a very good explanation of what
-Erlang is and why it is so. It serves as a very good
-introduction to the language and platform.</p></div>
-<div class="paragraph"><p>The book is <a href="http://pragprog.com/book/jaerlang2/programming-erlang">Programming Erlang</a>,
-and it also features a chapter on Cowboy.</p></div>
-</div>
-<div class="sect3">
+<p>This book is from one of the creator of Erlang, Joe Armstrong. It provides a very good explanation of what Erlang is and why it is so. It serves as a very good introduction to the language and platform.</p>
+<p>The book is <a href="http://pragprog.com/book/jaerlang2/programming-erlang">Programming Erlang</a>, and it also features a chapter on Cowboy.</p>
<h4 id="_learn_you_some_erlang_for_great_good">Learn You Some Erlang for Great Good!</h4>
-<div class="paragraph"><p><a href="http://learnyousomeerlang.com">LYSE</a> is a much more complete
-book covering many aspects of Erlang, while also providing
-stories and humor. Be warned: it&#8217;s pretty verbose. It comes
-with a free online version and a more refined paper and
-ebook version.</p></div>
-</div>
-</div>
-</div>
+<p><a href="http://learnyousomeerlang.com">LYSE</a> is a much more complete book covering many aspects of Erlang, while also providing stories and humor. Be warned: it&apos;s pretty verbose. It comes with a free online version and a more refined paper and ebook version.</p>
+
diff --git a/docs/en/cowboy/2.2/guide/flow_diagram/index.html b/docs/en/cowboy/2.2/guide/flow_diagram/index.html
index ed22d419..303c739a 100644
--- a/docs/en/cowboy/2.2/guide/flow_diagram/index.html
+++ b/docs/en/cowboy/2.2/guide/flow_diagram/index.html
@@ -62,113 +62,30 @@
<h1 class="lined-header"><span>Flow diagram</span></h1>
-<div class="paragraph"><p>Cowboy is a lightweight HTTP server with support for HTTP/1.1,
-HTTP/2 and Websocket.</p></div>
-<div class="paragraph"><p>It is built on top of Ranch. Please see the Ranch guide for more
-information about how the network connections are handled.</p></div>
-<div class="sect1">
+<p>Cowboy is a lightweight HTTP server with support for HTTP/1.1, HTTP/2 and Websocket.</p>
+<p>It is built on top of Ranch. Please see the Ranch guide for more information about how the network connections are handled.</p>
<h2 id="_overview">Overview</h2>
-<div class="sectionbody">
-<div class="imageblock">
-<div class="content">
-<img src="../http_req_resp.png" alt="HTTP request/response flowchart" />
-</div>
-</div>
-<div class="paragraph"><p>As you can see on the diagram, the client
-begins by connecting to the server. This step is handled
-by a Ranch acceptor, which is a process dedicated to
-accepting new connections.</p></div>
-<div class="paragraph"><p>After Ranch accepts a new connection, whether it is an
-HTTP/1.1 or HTTP/2 connection, Cowboy starts receiving
-requests and handling them.</p></div>
-<div class="paragraph"><p>In HTTP/1.1 all requests come sequentially. In HTTP/2
-the requests may arrive and be processed concurrently.</p></div>
-<div class="paragraph"><p>When a request comes in, Cowboy creates a stream, which
-is a set of request/response and all the events associated
-with them. The protocol code in Cowboy defers the handling
-of these streams to stream handler modules. When you
-configure Cowboy you may define one or more module that
-will receive all events associated with a stream, including
-the request, response, bodies, Erlang messages and more.</p></div>
-<div class="paragraph"><p>By default Cowboy comes configured with a stream handler
-called <code>cowboy_stream_h</code>. This stream handler will create
-a new process for every request coming in, and then
-communicate with this process to read the body or send
-a response back. The request process executes middlewares
-which, by default, including the router and then the
-execution of handlers. Like stream handlers, middlewares
-may also be customized.</p></div>
-<div class="paragraph"><p>A response may be sent at almost any point in this
-diagram. If the response must be sent before the stream
-is initialized (because an error occurred early, for
-example) then stream handlers receive a special event
-indicating this error.</p></div>
-</div>
-</div>
-<div class="sect1">
+<img src="../http_req_resp.png" alt="HTTP request/response flowchart"/><p>As you can see on the diagram, the client begins by connecting to the server. This step is handled by a Ranch acceptor, which is a process dedicated to accepting new connections.</p>
+<p>After Ranch accepts a new connection, whether it is an HTTP/1.1 or HTTP/2 connection, Cowboy starts receiving requests and handling them.</p>
+<p>In HTTP/1.1 all requests come sequentially. In HTTP/2 the requests may arrive and be processed concurrently.</p>
+<p>When a request comes in, Cowboy creates a stream, which is a set of request/response and all the events associated with them. The protocol code in Cowboy defers the handling of these streams to stream handler modules. When you configure Cowboy you may define one or more module that will receive all events associated with a stream, including the request, response, bodies, Erlang messages and more.</p>
+<p>By default Cowboy comes configured with a stream handler called <code>cowboy_stream_h</code>. This stream handler will create a new process for every request coming in, and then communicate with this process to read the body or send a response back. The request process executes middlewares which, by default, including the router and then the execution of handlers. Like stream handlers, middlewares may also be customized.</p>
+<p>A response may be sent at almost any point in this diagram. If the response must be sent before the stream is initialized (because an error occurred early, for example) then stream handlers receive a special event indicating this error.</p>
<h2 id="_protocol_specific_headers">Protocol-specific headers</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy takes care of protocol-specific headers and prevents
-you from sending them manually. For HTTP/1.1 this includes
-the <code>transfer-encoding</code> and <code>connection</code> headers. For HTTP/2
-this includes the colon headers like <code>:status</code>.</p></div>
-<div class="paragraph"><p>Cowboy will also remove protocol-specific headers from
-requests before passing them to stream handlers. Cowboy
-tries to hide the implementation details of all protocols
-as well as possible.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Cowboy takes care of protocol-specific headers and prevents you from sending them manually. For HTTP/1.1 this includes the <code>transfer-encoding</code> and <code>connection</code> headers. For HTTP/2 this includes the colon headers like <code>:status</code>.</p>
+<p>Cowboy will also remove protocol-specific headers from requests before passing them to stream handlers. Cowboy tries to hide the implementation details of all protocols as well as possible.</p>
<h2 id="_number_of_processes_per_connection">Number of processes per connection</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>By default, Cowboy will use one process per connection,
-plus one process per set of request/response (called a
-stream, internally).</p></div>
-<div class="paragraph"><p>The reason it creates a new process for every request is due
-to the requirements of HTTP/2 where requests are executed
-concurrently and independently from the connection. The
-frames from the different requests end up interleaved on
-the single TCP connection.</p></div>
-<div class="paragraph"><p>The request processes are never reused. There is therefore
-no need to perform any cleanup after the response has been
-sent. The process will terminate and Erlang/OTP will reclaim
-all memory at once.</p></div>
-<div class="paragraph"><p>Cowboy ultimately does not require more than one process
-per connection. It is possible to interact with the connection
-directly from a stream handler, a low level interface to Cowboy.
-They are executed from within the connection process, and can
-handle the incoming requests and send responses. This is however
-not recommended in normal circumstances, as a stream handler
-taking too long to execute could have a negative impact on
-concurrent requests or the state of the connection itself.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>By default, Cowboy will use one process per connection, plus one process per set of request/response (called a stream, internally).</p>
+<p>The reason it creates a new process for every request is due to the requirements of HTTP/2 where requests are executed concurrently and independently from the connection. The frames from the different requests end up interleaved on the single TCP connection.</p>
+<p>The request processes are never reused. There is therefore no need to perform any cleanup after the response has been sent. The process will terminate and Erlang/OTP will reclaim all memory at once.</p>
+<p>Cowboy ultimately does not require more than one process per connection. It is possible to interact with the connection directly from a stream handler, a low level interface to Cowboy. They are executed from within the connection process, and can handle the incoming requests and send responses. This is however not recommended in normal circumstances, as a stream handler taking too long to execute could have a negative impact on concurrent requests or the state of the connection itself.</p>
<h2 id="_date_header">Date header</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Because querying for the current date and time can be expensive,
-Cowboy generates one <em>Date</em> header value every second, shares it
-to all other processes, which then simply copy it in the response.
-This allows compliance with HTTP/1.1 with no actual performance loss.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Because querying for the current date and time can be expensive, Cowboy generates one <em>Date</em> header value every second, shares it to all other processes, which then simply copy it in the response. This allows compliance with HTTP/1.1 with no actual performance loss.</p>
<h2 id="_binaries">Binaries</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy makes extensive use of binaries.</p></div>
-<div class="paragraph"><p>Binaries are more efficient than lists for representing
-strings because they take less memory space. Processing
-performance can vary depending on the operation. Binaries
-are known for generally getting a great boost if the code
-is compiled natively. Please see the HiPE documentation
-for more details.</p></div>
-<div class="paragraph"><p>Binaries may end up being shared between processes. This
-can lead to some large memory usage when one process keeps
-the binary data around forever without freeing it. If you
-see some weird memory usage in your application, this might
-be the cause.</p></div>
-</div>
-</div>
+<p>Cowboy makes extensive use of binaries.</p>
+<p>Binaries are more efficient than lists for representing strings because they take less memory space. Processing performance can vary depending on the operation. Binaries are known for generally getting a great boost if the code is compiled natively. Please see the HiPE documentation for more details.</p>
+<p>Binaries may end up being shared between processes. This can lead to some large memory usage when one process keeps the binary data around forever without freeing it. If you see some weird memory usage in your application, this might be the cause.</p>
+
diff --git a/docs/en/cowboy/2.2/guide/getting_started/index.html b/docs/en/cowboy/2.2/guide/getting_started/index.html
index dfbd7282..56a1205f 100644
--- a/docs/en/cowboy/2.2/guide/getting_started/index.html
+++ b/docs/en/cowboy/2.2/guide/getting_started/index.html
@@ -62,161 +62,104 @@
<h1 class="lined-header"><span>Getting started</span></h1>
-<div class="paragraph"><p>Erlang is more than a language, it is also an operating system
-for your applications. Erlang developers rarely write standalone
-modules, they write libraries or applications, and then bundle
-those into what is called a release. A release contains the
-Erlang VM plus all applications required to run the node, so
-it can be pushed to production directly.</p></div>
-<div class="paragraph"><p>This chapter walks you through all the steps of setting up
-Cowboy, writing your first application and generating your first
-release. At the end of this chapter you should know everything
-you need to push your first Cowboy application to production.</p></div>
-<div class="sect1">
+<p>Erlang is more than a language, it is also an operating system for your applications. Erlang developers rarely write standalone modules, they write libraries or applications, and then bundle those into what is called a release. A release contains the Erlang VM plus all applications required to run the node, so it can be pushed to production directly.</p>
+<p>This chapter walks you through all the steps of setting up Cowboy, writing your first application and generating your first release. At the end of this chapter you should know everything you need to push your first Cowboy application to production.</p>
<h2 id="_prerequisites">Prerequisites</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>We are going to use the <a href="https://github.com/ninenines/erlang.mk">Erlang.mk</a>
-build system. If you are using Windows, please check the
-<a href="http://erlang.mk/guide/installation.html">Installation instructions</a>
-to get your environment setup before you continue.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>We are going to use the <a href="https://github.com/ninenines/erlang.mk">Erlang.mk</a> build system. If you are using Windows, please check the <a href="http://erlang.mk/guide/installation.html">Installation instructions</a> to get your environment setup before you continue.</p>
<h2 id="_bootstrap">Bootstrap</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>First, let&#8217;s create the directory for our application.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>First, let&apos;s create the directory for our application.</p>
+<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 hello_erlang
-$ cd hello_erlang</tt></pre></div></div>
-<div class="paragraph"><p>Then we need to download Erlang.mk. Either use the following
-command or download it manually.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+$ cd hello_erlang</tt></pre>
+</div></div>
+<p>Then we need to download Erlang.mk. Either use the following command or download it manually.</p>
+<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>$ wget 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>We can now bootstrap our application. Since we are going to generate
-a release, we will also bootstrap it at the same time.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>$ wget https<font color="#990000">:</font>//erlang<font color="#990000">.</font>mk/erlang<font color="#990000">.</font>mk</tt></pre>
+</div></div>
+<p>We can now bootstrap our application. Since we are going to generate a release, we will also bootstrap it at the same time.</p>
+<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 -f erlang<span style="color: #990000">.</span>mk bootstrap bootstrap-rel</tt></pre></div></div>
-<div class="paragraph"><p>This creates a Makefile, a base application, and the release files
-necessary for creating the release. We can already build and start
-this release.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>$ make -f erlang<font color="#990000">.</font>mk bootstrap bootstrap-rel</tt></pre>
+</div></div>
+<p>This creates a Makefile, a base application, and the release files necessary for creating the release. We can already build and start this release.</p>
+<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 run
-<span style="color: #990000">...</span>
-<span style="color: #990000">(</span>hello_erlang@<span style="color: #993399">127.0</span><span style="color: #990000">.</span><span style="color: #993399">0.1</span><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>Entering the command <code>i().</code> will show the running processes, including
-one called <code>hello_erlang_sup</code>. This is the supervisor for our
-application.</p></div>
-<div class="paragraph"><p>The release currently does nothing. In the rest of this chapter we
-will add Cowboy as a dependency and write a simple "Hello world!"
-handler.</p></div>
-</div>
-</div>
-<div class="sect1">
+<font color="#990000">...</font>
+<font color="#990000">(</font>hello_erlang@<font color="#993399">127.0</font><font color="#990000">.</font><font color="#993399">0.1</font><font color="#990000">)</font><font color="#993399">1</font><font color="#990000">&gt;</font></tt></pre>
+</div></div>
+<p>Entering the command <code>i().</code> will show the running processes, including one called <code>hello_erlang_sup</code>. This is the supervisor for our application.</p>
+<p>The release currently does nothing. In the rest of this chapter we will add Cowboy as a dependency and write a simple &quot;Hello world!&quot; handler.</p>
<h2 id="_cowboy_setup">Cowboy setup</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>We will modify the <em>Makefile</em> to tell the build system it needs to
-fetch and compile Cowboy:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>We will modify the <em>Makefile</em> to tell the build system it needs to fetch and compile Cowboy:</p>
+<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">PROJECT =</span> hello_erlang
+<pre><tt><font color="#009900">PROJECT =</font> hello_erlang
-<span style="color: #009900">DEPS =</span> cowboy
-<span style="color: #009900">dep_cowboy_commit =</span> 2.2.2
+<font color="#009900">DEPS =</font> cowboy
+<font color="#009900">dep_cowboy_commit =</font> 2.2.2
-<span style="color: #009900">DEP_PLUGINS =</span> cowboy
+<font color="#009900">DEP_PLUGINS =</font> cowboy
-include erlang.mk</tt></pre></div></div>
-<div class="paragraph"><p>We also tell the build system to load the plugins Cowboy provides.
-These include predefined templates that we will use soon.</p></div>
-<div class="paragraph"><p>If you do <code>make run</code> now, Cowboy will be included in the release
-and started automatically. This is not enough however, as Cowboy
-doesn&#8217;t do anything by default. We still need to tell Cowboy to
-listen for connections.</p></div>
-</div>
-</div>
-<div class="sect1">
+include erlang.mk</tt></pre>
+</div></div>
+<p>We also tell the build system to load the plugins Cowboy provides. These include predefined templates that we will use soon.</p>
+<p>If you do <code>make run</code> now, Cowboy will be included in the release and started automatically. This is not enough however, as Cowboy doesn&apos;t do anything by default. We still need to tell Cowboy to listen for connections.</p>
<h2 id="_listening_for_connections">Listening for connections</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>First we define the routes that Cowboy will use to map requests
-to handler modules, and then we start the listener. This is best
-done at application startup.</p></div>
-<div class="paragraph"><p>Open the <em>src/hello_erlang_app.erl</em> file and add the necessary
-code to the <code>start/2</code> function to make it look like this:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>First we define the routes that Cowboy will use to map requests to handler modules, and then we start the listener. This is best done at application startup.</p>
+<p>Open the <em>src/hello_erlang_app.erl</em> file and add the necessary code to the <code>start/2</code> function to make it look like this:</p>
+<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">start</span></span>(<span style="color: #009900">_Type</span>, <span style="color: #009900">_Args</span>) <span style="color: #990000">-&gt;</span>
- <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: #FF6600">'_'</span>, [{<span style="color: #FF0000">"/"</span>, <span style="color: #FF6600">hello_handler</span>, []}]}
+<pre><tt><b><font color="#000000">start</font></b>(<font color="#009900">_Type</font>, <font color="#009900">_Args</font>) <font color="#990000">-&gt;</font>
+ <font color="#009900">Dispatch</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_router:compile</font></b>([
+ {<font color="#FF6600">'_'</font>, [{<font color="#FF0000">"/"</font>, <font color="#FF6600">hello_handler</font>, []}]}
]),
- {<span style="color: #FF6600">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:start_clear</span></span>(<span style="color: #FF6600">my_http_listener</span>,
- [{<span style="color: #FF6600">port</span>, <span style="color: #993399">8080</span>}],
- #{<span style="color: #0000FF">env</span> <span style="color: #990000">=&gt;</span> #{<span style="color: #0000FF">dispatch</span> <span style="color: #990000">=&gt;</span> <span style="color: #009900">Dispatch</span>}}
+ {<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy:start_clear</font></b>(<font color="#FF6600">my_http_listener</font>,
+ [{<font color="#FF6600">port</font>, <font color="#993399">8080</font>}],
+ #{<font color="#0000FF">env</font> <font color="#990000">=&gt;</font> #{<font color="#0000FF">dispatch</font> <font color="#990000">=&gt;</font> <font color="#009900">Dispatch</font>}}
),
- <span style="font-weight: bold"><span style="color: #000000">hello_erlang_sup:start_link</span></span>()<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Routes are explained in details in the <a href="../routing">Routing</a>
-chapter. For this tutorial we map the path <code>/</code> to the handler
-module <code>hello_handler</code>. This module doesn&#8217;t exist yet.</p></div>
-<div class="paragraph"><p>Build and start the release, then open <a href="http://localhost:8080">http://localhost:8080</a>
-in your browser. You will get a 500 error because the module is missing.
-Any other URL, like <a href="http://localhost:8080/test">http://localhost:8080/test</a>, will result in a
-404 error.</p></div>
-</div>
-</div>
-<div class="sect1">
+ <b><font color="#000000">hello_erlang_sup:start_link</font></b>()<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Routes are explained in details in the <a href="../routing">Routing</a> chapter. For this tutorial we map the path <code>/</code> to the handler module <code>hello_handler</code>. This module doesn&apos;t exist yet.</p>
+<p>Build and start the release, then open <a href="http://localhost:8080">http://localhost:8080</a> in your browser. You will get a 500 error because the module is missing. Any other URL, like <a href="http://localhost:8080/test">http://localhost:8080/test</a>, will result in a 404 error.</p>
<h2 id="_handling_requests">Handling requests</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy features different kinds of handlers, including REST
-and Websocket handlers. For this tutorial we will use a plain
-HTTP handler.</p></div>
-<div class="paragraph"><p>Generate a handler from a template:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Cowboy features different kinds of handlers, including REST and Websocket handlers. For this tutorial we will use a plain HTTP handler.</p>
+<p>Generate a handler from a template:</p>
+<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 new <span style="color: #009900">t</span><span style="color: #990000">=</span>cowboy<span style="color: #990000">.</span>http <span style="color: #009900">n</span><span style="color: #990000">=</span>hello_handler</tt></pre></div></div>
-<div class="paragraph"><p>Then, open the <em>src/hello_handler.erl</em> file and modify
-the <code>init/2</code> function like this to send a reply.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>$ make new <font color="#009900">t</font><font color="#990000">=</font>cowboy<font color="#990000">.</font>http <font color="#009900">n</font><font color="#990000">=</font>hello_handler</tt></pre>
+</div></div>
+<p>Then, open the <em>src/hello_handler.erl</em> file and modify the <code>init/2</code> function like this to send a reply.</p>
+<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">init</span></span>(<span style="color: #009900">Req0</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">200</span>,
- #{<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/plain"</span><span style="color: #990000">&gt;&gt;</span>},
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Hello Erlang!"</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="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>What the above code does is send a 200 OK reply, with the
-Content-type header set to <code>text/plain</code> and the response
-body set to <code>Hello Erlang!</code>.</p></div>
-<div class="paragraph"><p>If you run the release and open <a href="http://localhost:8080">http://localhost:8080</a>
-in your browser, you should get a nice <code>Hello Erlang!</code> displayed!</p></div>
-</div>
-</div>
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req0</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ <font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:reply</font></b>(<font color="#993399">200</font>,
+ #{<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/plain"</font><font color="#990000">&gt;&gt;</font>},
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"Hello Erlang!"</font><font color="#990000">&gt;&gt;</font>,
+ <font color="#009900">Req0</font>),
+ {<font color="#FF6600">ok</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>What the above code does is send a 200 OK reply, with the Content-type header set to <code>text/plain</code> and the response body set to <code>Hello Erlang!</code>.</p>
+<p>If you run the release and open <a href="http://localhost:8080">http://localhost:8080</a> in your browser, you should get a nice <code>Hello Erlang!</code> displayed!</p>
+
diff --git a/docs/en/cowboy/2.2/guide/handlers/index.html b/docs/en/cowboy/2.2/guide/handlers/index.html
index 843d05f8..5b957f51 100644
--- a/docs/en/cowboy/2.2/guide/handlers/index.html
+++ b/docs/en/cowboy/2.2/guide/handlers/index.html
@@ -62,91 +62,57 @@
<h1 class="lined-header"><span>Handlers</span></h1>
-<div class="paragraph"><p>Handlers are Erlang modules that handle HTTP requests.</p></div>
-<div class="sect1">
+<p>Handlers are Erlang modules that handle HTTP requests.</p>
<h2 id="_plain_http_handlers">Plain HTTP handlers</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The most basic handler in Cowboy implements the mandatory
-<code>init/2</code> callback, manipulates the request, optionally
-sends a response and then returns.</p></div>
-<div class="paragraph"><p>This callback receives the <a href="../req">Req object</a> and the initial
-state defined in the <a href="../routing">router configuration</a>.</p></div>
-<div class="paragraph"><p>A handler that does nothing would look like this:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The most basic handler in Cowboy implements the mandatory <code>init/2</code> callback, manipulates the request, optionally sends a response and then returns.</p>
+<p>This callback receives the <a href="../req">Req object</a> and the initial state defined in the <a href="../routing">router configuration</a>.</p>
+<p>A handler that does nothing would look like this:</p>
+<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">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">ok</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Despite sending no reply, a <code>204 No Content</code> response will be
-sent to the client, as Cowboy makes sure that a response is
-sent for every request.</p></div>
-<div class="paragraph"><p>We need to use the Req object to reply.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Despite sending no reply, a <code>204 No Content</code> response will be sent to the client, as Cowboy makes sure that a response is sent for every request.</p>
+<p>We need to use the Req object to reply.</p>
+<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">init</span></span>(<span style="color: #009900">Req0</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">200</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/plain"</span><span style="color: #990000">&gt;&gt;</span>
- }, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Hello World!"</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="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Cowboy will immediately send a response when <code>cowboy:reply/4</code>
-is called.</p></div>
-<div class="paragraph"><p>We then return a 3-tuple. <code>ok</code> means that the handler ran
-successfully. We also give the modified Req back to Cowboy.</p></div>
-<div class="paragraph"><p>The last value of the tuple is a state that will be used
-in every subsequent callbacks to this handler. Plain HTTP
-handlers only have one additional callback, the optional
-and rarely used <code>terminate/3</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req0</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ <font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:reply</font></b>(<font color="#993399">200</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/plain"</font><font color="#990000">&gt;&gt;</font>
+ }, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"Hello World!"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req0</font>),
+ {<font color="#FF6600">ok</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Cowboy will immediately send a response when <code>cowboy:reply/4</code> is called.</p>
+<p>We then return a 3-tuple. <code>ok</code> means that the handler ran successfully. We also give the modified Req back to Cowboy.</p>
+<p>The last value of the tuple is a state that will be used in every subsequent callbacks to this handler. Plain HTTP handlers only have one additional callback, the optional and rarely used <code>terminate/3</code>.</p>
<h2 id="_other_handlers">Other handlers</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <code>init/2</code> callback can also be used to inform Cowboy
-that this is a different kind of handler and that Cowboy
-should switch to it. To do this you simply need to return
-the module name of the handler type you want to switch to.</p></div>
-<div class="paragraph"><p>Cowboy comes with three handler types you can switch to:
-<a href="../rest_handlers">cowboy_rest</a>, <a href="#ws_handlers">cowboy_websocket</a>
-and <a href="../loop_handlers">cowboy_loop</a>. In addition to those you
-can define your own handler types.</p></div>
-<div class="paragraph"><p>Switching is simple. Instead of returning <code>ok</code>, you simply
-return the name of the handler type you want to use. The
-following snippet switches to a Websocket handler:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The <code>init/2</code> callback can also be used to inform Cowboy that this is a different kind of handler and that Cowboy should switch to it. To do this you simply need to return the module name of the handler type you want to switch to.</p>
+<p>Cowboy comes with three handler types you can switch to: <a href="../rest_handlers">cowboy_rest</a>, <a href="../ws_handlers">cowboy_websocket</a> and <a href="../loop_handlers">cowboy_loop</a>. In addition to those you can define your own handler types.</p>
+<p>Switching is simple. Instead of returning <code>ok</code>, you simply return the name of the handler type you want to use. The following snippet switches to a Websocket handler:</p>
+<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">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_websocket</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">
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">cowboy_websocket</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_cleaning_up">Cleaning up</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>All handler types provide the optional <code>terminate/3</code> callback.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>All handler types provide the optional <code>terminate/3</code> callback.</p>
+<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">terminate</span></span>(<span style="color: #009900">_Reason</span>, <span style="color: #009900">_Req</span>, <span style="color: #009900">_State</span>) <span style="color: #990000">-&gt;</span>
- <span style="color: #FF6600">ok</span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>This callback is strictly reserved for any required cleanup.
-You cannot send a response from this function. There is no
-other return value.</p></div>
-<div class="paragraph"><p>This callback is optional because it is rarely necessary.
-Cleanup should be done in separate processes directly (by
-monitoring the handler process to detect when it exits).</p></div>
-<div class="paragraph"><p>Cowboy does not reuse processes for different requests. The
-process will terminate soon after this call returns.</p></div>
-</div>
-</div>
+<pre><tt><b><font color="#000000">terminate</font></b>(<font color="#009900">_Reason</font>, <font color="#009900">_Req</font>, <font color="#009900">_State</font>) <font color="#990000">-&gt;</font>
+ <font color="#FF6600">ok</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>This callback is strictly reserved for any required cleanup. You cannot send a response from this function. There is no other return value.</p>
+<p>This callback is optional because it is rarely necessary. Cleanup should be done in separate processes directly (by monitoring the handler process to detect when it exits).</p>
+<p>Cowboy does not reuse processes for different requests. The process will terminate soon after this call returns.</p>
+
diff --git a/docs/en/cowboy/2.2/guide/index.html b/docs/en/cowboy/2.2/guide/index.html
index 1e7db9f3..9547fadd 100644
--- a/docs/en/cowboy/2.2/guide/index.html
+++ b/docs/en/cowboy/2.2/guide/index.html
@@ -62,214 +62,85 @@
<h1 class="lined-header"><span>Cowboy User Guide</span></h1>
-<div class="sect1">
+<!-- REST: where should i handle bindings? init, probably. qs? in media type functions-->
+<!-- REST: explain how a module per media type is good; module may be shared between client/server-->
<h2 id="_rationale">Rationale</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="modern_web/">The modern Web</a>
-</p>
+<ul><li><a href="modern_web/">The modern Web</a>
</li>
-<li>
-<p>
-<a href="erlang_web/">Erlang and the Web</a>
-</p>
+<li><a href="erlang_web/">Erlang and the Web</a>
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_introduction">Introduction</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="introduction/">Introduction</a>
-</p>
+<ul><li><a href="introduction/">Introduction</a>
</li>
-<li>
-<p>
-<a href="getting_started/">Getting started</a>
-</p>
+<li><a href="getting_started/">Getting started</a>
</li>
-<li>
-<p>
-<a href="flow_diagram/">Flow diagram</a>
-</p>
+<li><a href="flow_diagram/">Flow diagram</a>
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_configuration">Configuration</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="listeners/">Listeners</a>
-</p>
+<ul><li><a href="listeners/">Listeners</a>
</li>
-<li>
-<p>
-<a href="routing/">Routing</a>
-</p>
+<li><a href="routing/">Routing</a>
</li>
-<li>
-<p>
-<a href="constraints/">Constraints</a>
-</p>
+<li><a href="constraints/">Constraints</a>
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_handlers">Handlers</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="handlers/">Handlers</a>
-</p>
+<ul><li><a href="handlers/">Handlers</a>
</li>
-<li>
-<p>
-<a href="loop_handlers/">Loop handlers</a>
-</p>
+<li><a href="loop_handlers/">Loop handlers</a>
</li>
-<li>
-<p>
-<a href="static_files/">Static files</a>
-</p>
+<li><a href="static_files/">Static files</a>
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_request_and_response">Request and response</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="req/">Request details</a>
-</p>
+<ul><li><a href="req/">Request details</a>
</li>
-<li>
-<p>
-<a href="req_body/">Reading the request body</a>
-</p>
+<li><a href="req_body/">Reading the request body</a>
</li>
-<li>
-<p>
-<a href="resp/">Sending a response</a>
-</p>
+<li><a href="resp/">Sending a response</a>
</li>
-<li>
-<p>
-<a href="cookies/">Using cookies</a>
-</p>
+<li><a href="cookies/">Using cookies</a>
</li>
-<li>
-<p>
-<a href="multipart/">Multipart</a>
-</p>
+<li><a href="multipart/">Multipart</a>
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_rest">REST</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="rest_principles/">REST principles</a>
-</p>
+<ul><li><a href="rest_principles/">REST principles</a>
</li>
-<li>
-<p>
-<a href="rest_handlers/">Handling REST requests</a>
-</p>
+<li><a href="rest_handlers/">Handling REST requests</a>
</li>
-<li>
-<p>
-<a href="rest_flowcharts/">REST flowcharts</a>
-</p>
+<li><a href="rest_flowcharts/">REST flowcharts</a>
</li>
-<li>
-<p>
-<a href="resource_design/">Designing a resource handler</a>
-</p>
+<li><a href="resource_design/">Designing a resource handler</a>
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_websocket">Websocket</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="ws_protocol/">The Websocket protocol</a>
-</p>
+<ul><li><a href="ws_protocol/">The Websocket protocol</a>
</li>
-<li>
-<p>
-<a href="ws_handlers/">Websocket handlers</a>
-</p>
+<li><a href="ws_handlers/">Websocket handlers</a>
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_advanced">Advanced</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="streams/">Streams</a>
-</p>
+<ul><li><a href="streams/">Streams</a>
</li>
-<li>
-<p>
-<a href="middlewares/">Middlewares</a>
-</p>
+<li><a href="middlewares/">Middlewares</a>
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_additional_information">Additional information</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="migrating_from_2.2/">Changes since Cowboy 2.2</a>
-</p>
+<ul><li><a href="migrating_from_2.2/">Changes since Cowboy 2.2</a>
</li>
-<li>
-<p>
-<a href="migrating_from_2.1/">Migrating from Cowboy 2.1 to 2.2</a>
-</p>
+<li><a href="migrating_from_2.1/">Migrating from Cowboy 2.1 to 2.2</a>
</li>
-<li>
-<p>
-<a href="migrating_from_2.0/">Migrating from Cowboy 2.0 to 2.1</a>
-</p>
+<li><a href="migrating_from_2.0/">Migrating from Cowboy 2.0 to 2.1</a>
</li>
-<li>
-<p>
-<a href="migrating_from_1.0/">Migrating from Cowboy 1.0 to 2.0</a>
-</p>
+<li><a href="migrating_from_1.0/">Migrating from Cowboy 1.0 to 2.0</a>
</li>
-<li>
-<p>
-<a href="specs/">HTTP and other specifications</a>
-</p>
+<li><a href="specs/">HTTP and other specifications</a>
</li>
-</ul></div>
-</div>
-</div>
+</ul>
+
diff --git a/docs/en/cowboy/2.2/guide/introduction/index.html b/docs/en/cowboy/2.2/guide/introduction/index.html
index 62e0310c..08a9d172 100644
--- a/docs/en/cowboy/2.2/guide/introduction/index.html
+++ b/docs/en/cowboy/2.2/guide/introduction/index.html
@@ -62,79 +62,40 @@
<h1 class="lined-header"><span>Introduction</span></h1>
-<div class="paragraph"><p>Cowboy is a small, fast and modern HTTP server for Erlang/OTP.</p></div>
-<div class="paragraph"><p>Cowboy aims to provide a complete <a href="../modern_web">modern Web stack</a>.
-This includes HTTP/1.1, HTTP/2, Websocket, Server-Sent Events and
-Webmachine-based REST.</p></div>
-<div class="paragraph"><p>Cowboy comes with functions for introspection and tracing, enabling
-developers to know precisely what is happening at any time. Its modular
-design also easily enable developers to add instrumentation.</p></div>
-<div class="paragraph"><p>Cowboy is a high quality project. It has a small code base, is very
-efficient (both in latency and memory use) and can easily be embedded
-in another application.</p></div>
-<div class="paragraph"><p>Cowboy is clean Erlang code. It includes hundreds of tests and its code
-is fully compliant with the Dialyzer. It is also well documented and
-features a Function Reference, a User Guide and numerous Tutorials.</p></div>
-<div class="sect1">
+<p>Cowboy is a small, fast and modern HTTP server for Erlang/OTP.</p>
+<p>Cowboy aims to provide a complete <a href="../modern_web">modern Web stack</a>. This includes HTTP/1.1, HTTP/2, Websocket, Server-Sent Events and Webmachine-based REST.</p>
+<p>Cowboy comes with functions for introspection and tracing, enabling developers to know precisely what is happening at any time. Its modular design also easily enable developers to add instrumentation.</p>
+<p>Cowboy is a high quality project. It has a small code base, is very efficient (both in latency and memory use) and can easily be embedded in another application.</p>
+<p>Cowboy is clean Erlang code. It includes hundreds of tests and its code is fully compliant with the Dialyzer. It is also well documented and features a Function Reference, a User Guide and numerous Tutorials.</p>
<h2 id="_prerequisites">Prerequisites</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Beginner Erlang knowledge is recommended for reading this guide.</p></div>
-<div class="paragraph"><p>Knowledge of the HTTP protocol is recommended but not required, as it
-will be detailed throughout the guide.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Beginner Erlang knowledge is recommended for reading this guide.</p>
+<p>Knowledge of the HTTP protocol is recommended but not required, as it will be detailed throughout the guide.</p>
<h2 id="_supported_platforms">Supported platforms</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy is tested and supported on Linux, FreeBSD, Windows and OSX.</p></div>
-<div class="paragraph"><p>Cowboy has been reported to work on other platforms, but we make no
-guarantee that the experience will be safe and smooth. You are advised
-to perform the necessary testing and security audits prior to deploying
-on other platforms.</p></div>
-<div class="paragraph"><p>Cowboy is developed for Erlang/OTP 19.0 and newer.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Cowboy is tested and supported on Linux, FreeBSD, Windows and OSX.</p>
+<p>Cowboy has been reported to work on other platforms, but we make no guarantee that the experience will be safe and smooth. You are advised to perform the necessary testing and security audits prior to deploying on other platforms.</p>
+<p>Cowboy is developed for Erlang/OTP 19.0 and newer.</p>
<h2 id="_license">License</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy uses the ISC License.</p></div>
-<div class="listingblock">
-<div class="content">
-<pre><code>Copyright (c) 2011-2017, Loïc Hoguin &lt;[email protected]&gt;
+<p>Cowboy uses the ISC License.</p>
+<div class="listingblock"><div class="content"><pre>Copyright (c) 2011-2017, Loïc Hoguin &lt;[email protected]&gt;
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+THE SOFTWARE IS PROVIDED &quot;AS IS&quot; AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.</code></pre>
-</div></div>
-</div>
-</div>
-<div class="sect1">
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.</pre></div></div>
<h2 id="_versioning">Versioning</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy uses <a href="http://semver.org/">Semantic Versioning 2.0.0</a>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Cowboy uses <a href="http://semver.org/">Semantic Versioning 2.0.0</a>.</p>
<h2 id="_conventions">Conventions</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>In the HTTP protocol, the method name is case sensitive. All standard
-method names are uppercase.</p></div>
-<div class="paragraph"><p>Header names are case insensitive. When using HTTP/1.1, Cowboy converts
-all the request header names to lowercase. HTTP/2 requires clients to
-send them as lowercase. Any other header name is expected to be provided
-lowercased, including when querying information about the request or
-when sending responses.</p></div>
-<div class="paragraph"><p>The same applies to any other case insensitive value.</p></div>
-</div>
-</div>
+<p>In the HTTP protocol, the method name is case sensitive. All standard method names are uppercase.</p>
+<p>Header names are case insensitive. When using HTTP/1.1, Cowboy converts all the request header names to lowercase. HTTP/2 requires clients to send them as lowercase. Any other header name is expected to be provided lowercased, including when querying information about the request or when sending responses.</p>
+<p>The same applies to any other case insensitive value.</p>
+
diff --git a/docs/en/cowboy/2.2/guide/listeners/index.html b/docs/en/cowboy/2.2/guide/listeners/index.html
index 7768b145..4c107966 100644
--- a/docs/en/cowboy/2.2/guide/listeners/index.html
+++ b/docs/en/cowboy/2.2/guide/listeners/index.html
@@ -62,109 +62,61 @@
<h1 class="lined-header"><span>Listeners</span></h1>
-<div class="paragraph"><p>A listener is a set of processes that listens on a port for
-new connections. Incoming connections get handled by Cowboy.
-Depending on the connection handshake, one or another protocol
-may be used.</p></div>
-<div class="paragraph"><p>This chapter is specific to Cowboy. Please refer to the
-<a href="https://ninenines.eu/docs/en/ranch/1.3/guide/listeners/">Ranch User Guide</a>
-for more information about listeners.</p></div>
-<div class="paragraph"><p>Cowboy provides two types of listeners: one listening for
-clear TCP connections, and one listening for secure TLS
-connections. Both of them support the HTTP/1.1 and HTTP/2
-protocols.</p></div>
-<div class="sect1">
+<p>A listener is a set of processes that listens on a port for new connections. Incoming connections get handled by Cowboy. Depending on the connection handshake, one or another protocol may be used.</p>
+<p>This chapter is specific to Cowboy. Please refer to the <a href="https://ninenines.eu/docs/en/ranch/1.3/guide/listeners/">Ranch User Guide</a> for more information about listeners.</p>
+<p>Cowboy provides two types of listeners: one listening for clear TCP connections, and one listening for secure TLS connections. Both of them support the HTTP/1.1 and HTTP/2 protocols.</p>
<h2 id="_clear_tcp_listener">Clear TCP listener</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The clear TCP listener will accept connections on the
-given port. A typical HTTP server would listen on port 80.
-Port 80 requires special permissions on most platforms
-however so a common alternative is port 8080.</p></div>
-<div class="paragraph"><p>The following snippet starts listening for connections
-on port 8080:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The clear TCP listener will accept connections on the given port. A typical HTTP server would listen on port 80. Port 80 requires special permissions on most platforms however so a common alternative is port 8080.</p>
+<p>The following snippet starts listening for connections on port 8080:</p>
+<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">start</span></span>(<span style="color: #009900">_Type</span>, <span style="color: #009900">_Args</span>) <span style="color: #990000">-&gt;</span>
- <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: #FF6600">'_'</span>, [{<span style="color: #FF0000">"/"</span>, <span style="color: #FF6600">hello_handler</span>, []}]}
+<pre><tt><b><font color="#000000">start</font></b>(<font color="#009900">_Type</font>, <font color="#009900">_Args</font>) <font color="#990000">-&gt;</font>
+ <font color="#009900">Dispatch</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_router:compile</font></b>([
+ {<font color="#FF6600">'_'</font>, [{<font color="#FF0000">"/"</font>, <font color="#FF6600">hello_handler</font>, []}]}
]),
- {<span style="color: #FF6600">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:start_clear</span></span>(<span style="color: #FF6600">my_http_listener</span>,
- [{<span style="color: #FF6600">port</span>, <span style="color: #993399">8080</span>}],
- #{<span style="color: #0000FF">env</span> <span style="color: #990000">=&gt;</span> #{<span style="color: #0000FF">dispatch</span> <span style="color: #990000">=&gt;</span> <span style="color: #009900">Dispatch</span>}}
+ {<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy:start_clear</font></b>(<font color="#FF6600">my_http_listener</font>,
+ [{<font color="#FF6600">port</font>, <font color="#993399">8080</font>}],
+ #{<font color="#0000FF">env</font> <font color="#990000">=&gt;</font> #{<font color="#0000FF">dispatch</font> <font color="#990000">=&gt;</font> <font color="#009900">Dispatch</font>}}
),
- <span style="font-weight: bold"><span style="color: #000000">hello_erlang_sup:start_link</span></span>()<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>The <a href="../getting_started">Getting Started</a> chapter uses a
-clear TCP listener.</p></div>
-<div class="paragraph"><p>Clients connecting to Cowboy on the clear listener port are
-expected to use either HTTP/1.1 or HTTP/2.</p></div>
-<div class="paragraph"><p>Cowboy supports both methods of initiating a clear
-HTTP/2 connection: through the Upgrade mechanism
-(<a href="https://tools.ietf.org/html/rfc7540#section-3.2">RFC 7540 3.2</a>)
-or by sending the preface directly
-(<a href="https://tools.ietf.org/html/rfc7540#section-3.4">RFC 7540 3.4</a>).</p></div>
-<div class="paragraph"><p>Compatibility with HTTP/1.0 is provided by Cowboy&#8217;s HTTP/1.1
-implementation.</p></div>
-</div>
-</div>
-<div class="sect1">
+ <b><font color="#000000">hello_erlang_sup:start_link</font></b>()<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>The <a href="../getting_started">Getting Started</a> chapter uses a clear TCP listener.</p>
+<p>Clients connecting to Cowboy on the clear listener port are expected to use either HTTP/1.1 or HTTP/2.</p>
+<p>Cowboy supports both methods of initiating a clear HTTP/2 connection: through the Upgrade mechanism (<a href="https://tools.ietf.org/html/rfc7540#section-3.2">RFC 7540 3.2</a>) or by sending the preface directly (<a href="https://tools.ietf.org/html/rfc7540#section-3.4">RFC 7540 3.4</a>).</p>
+<p>Compatibility with HTTP/1.0 is provided by Cowboy&apos;s HTTP/1.1 implementation.</p>
<h2 id="_secure_tls_listener">Secure TLS listener</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The secure TLS listener will accept connections on the
-given port. A typical HTTPS server would listen on port 443.
-Port 443 requires special permissions on most platforms
-however so a common alternative is port 8443.</p></div>
-<div class="paragraph"><p>The function provided by Cowboy will ensure that the TLS
-options given are following the HTTP/2 RFC with regards
-to security. For example some TLS extensions or ciphers
-may be disabled. This also applies to HTTP/1.1 connections
-on this listener. If this is not desirable, Ranch can be
-used directly to setup a custom listener.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The secure TLS listener will accept connections on the given port. A typical HTTPS server would listen on port 443. Port 443 requires special permissions on most platforms however so a common alternative is port 8443.</p>
+<!-- @todo Make a complete list of restrictions.-->
+<p>The function provided by Cowboy will ensure that the TLS options given are following the HTTP/2 RFC with regards to security. For example some TLS extensions or ciphers may be disabled. This also applies to HTTP/1.1 connections on this listener. If this is not desirable, Ranch can be used directly to setup a custom listener.</p>
+<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">start</span></span>(<span style="color: #009900">_Type</span>, <span style="color: #009900">_Args</span>) <span style="color: #990000">-&gt;</span>
- <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: #FF6600">'_'</span>, [{<span style="color: #FF0000">"/"</span>, <span style="color: #FF6600">hello_handler</span>, []}]}
+<pre><tt><b><font color="#000000">start</font></b>(<font color="#009900">_Type</font>, <font color="#009900">_Args</font>) <font color="#990000">-&gt;</font>
+ <font color="#009900">Dispatch</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_router:compile</font></b>([
+ {<font color="#FF6600">'_'</font>, [{<font color="#FF0000">"/"</font>, <font color="#FF6600">hello_handler</font>, []}]}
]),
- {<span style="color: #FF6600">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:start_tls</span></span>(<span style="color: #FF6600">my_http_listener</span>,
+ {<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy:start_tls</font></b>(<font color="#FF6600">my_http_listener</font>,
[
- {<span style="color: #FF6600">port</span>, <span style="color: #993399">8443</span>},
- {<span style="color: #FF6600">certfile</span>, <span style="color: #FF0000">"/path/to/certfile"</span>},
- {<span style="color: #FF6600">keyfile</span>, <span style="color: #FF0000">"/path/to/keyfile"</span>}
+ {<font color="#FF6600">port</font>, <font color="#993399">8443</font>},
+ {<font color="#FF6600">certfile</font>, <font color="#FF0000">"/path/to/certfile"</font>},
+ {<font color="#FF6600">keyfile</font>, <font color="#FF0000">"/path/to/keyfile"</font>}
],
- #{<span style="color: #0000FF">env</span> <span style="color: #990000">=&gt;</span> #{<span style="color: #0000FF">dispatch</span> <span style="color: #990000">=&gt;</span> <span style="color: #009900">Dispatch</span>}}
+ #{<font color="#0000FF">env</font> <font color="#990000">=&gt;</font> #{<font color="#0000FF">dispatch</font> <font color="#990000">=&gt;</font> <font color="#009900">Dispatch</font>}}
),
- <span style="font-weight: bold"><span style="color: #000000">hello_erlang_sup:start_link</span></span>()<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Clients connecting to Cowboy on the secure listener are
-expected to use the ALPN TLS extension to indicate what
-protocols they understand. Cowboy always prefers HTTP/2
-over HTTP/1.1 when both are supported. When neither are
-supported by the client, or when the ALPN extension was
-missing, Cowboy expects HTTP/1.1 to be used.</p></div>
-<div class="paragraph"><p>Cowboy also advertises HTTP/2 support through the older
-NPN TLS extension for compatibility. Note however that
-this support will likely not be enabled by default when
-Cowboy 2.0 gets released.</p></div>
-<div class="paragraph"><p>Compatibility with HTTP/1.0 is provided by Cowboy&#8217;s HTTP/1.1
-implementation.</p></div>
-</div>
-</div>
-<div class="sect1">
+ <b><font color="#000000">hello_erlang_sup:start_link</font></b>()<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Clients connecting to Cowboy on the secure listener are expected to use the ALPN TLS extension to indicate what protocols they understand. Cowboy always prefers HTTP/2 over HTTP/1.1 when both are supported. When neither are supported by the client, or when the ALPN extension was missing, Cowboy expects HTTP/1.1 to be used.</p>
+<p>Cowboy also advertises HTTP/2 support through the older NPN TLS extension for compatibility. Note however that this support will likely not be enabled by default when Cowboy 2.0 gets released.</p>
+<p>Compatibility with HTTP/1.0 is provided by Cowboy&apos;s HTTP/1.1 implementation.</p>
<h2 id="_protocol_configuration">Protocol configuration</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The HTTP/1.1 and HTTP/2 protocols share the same semantics;
-only their framing differs. The first is a text protocol and
-the second a binary protocol.</p></div>
-<div class="paragraph"><p>Cowboy doesn&#8217;t separate the configuration for HTTP/1.1 and
-HTTP/2. Everything goes into the same map. Many options are
-shared.</p></div>
-</div>
-</div>
+<p>The HTTP/1.1 and HTTP/2 protocols share the same semantics; only their framing differs. The first is a text protocol and the second a binary protocol.</p>
+<p>Cowboy doesn&apos;t separate the configuration for HTTP/1.1 and HTTP/2. Everything goes into the same map. Many options are shared.</p>
+<!-- @todo Describe good to know options for both protocols?-->
+<!-- Maybe do that in separate chapters?-->
+
diff --git a/docs/en/cowboy/2.2/guide/loop_handlers/index.html b/docs/en/cowboy/2.2/guide/loop_handlers/index.html
index 8c3b3f8d..f6eff9d7 100644
--- a/docs/en/cowboy/2.2/guide/loop_handlers/index.html
+++ b/docs/en/cowboy/2.2/guide/loop_handlers/index.html
@@ -62,131 +62,72 @@
<h1 class="lined-header"><span>Loop handlers</span></h1>
-<div class="paragraph"><p>Loop handlers are a special kind of HTTP handlers used when the
-response can not be sent right away. The handler enters instead
-a receive loop waiting for the right message before it can send
-a response.</p></div>
-<div class="paragraph"><p>Loop handlers are used for requests where a response might not
-be immediately available, but where you would like to keep the
-connection open for a while in case the response arrives. The
-most known example of such practice is known as long polling.</p></div>
-<div class="paragraph"><p>Loop handlers can also be used for requests where a response is
-partially available and you need to stream the response body
-while the connection is open. The most known example of such
-practice is server-sent events.</p></div>
-<div class="paragraph"><p>While the same can be accomplished using plain HTTP handlers,
-it is recommended to use loop handlers because they are well-tested
-and allow using built-in features like hibernation and timeouts.</p></div>
-<div class="paragraph"><p>Loop handlers essentially wait for one or more Erlang messages
-and feed these messages to the <code>info/3</code> callback. It also features
-the <code>init/2</code> and <code>terminate/3</code> callbacks which work the same as
-for plain HTTP handlers.</p></div>
-<div class="sect1">
+<p>Loop handlers are a special kind of HTTP handlers used when the response can not be sent right away. The handler enters instead a receive loop waiting for the right message before it can send a response.</p>
+<p>Loop handlers are used for requests where a response might not be immediately available, but where you would like to keep the connection open for a while in case the response arrives. The most known example of such practice is known as long polling.</p>
+<p>Loop handlers can also be used for requests where a response is partially available and you need to stream the response body while the connection is open. The most known example of such practice is server-sent events.</p>
+<p>While the same can be accomplished using plain HTTP handlers, it is recommended to use loop handlers because they are well-tested and allow using built-in features like hibernation and timeouts.</p>
+<p>Loop handlers essentially wait for one or more Erlang messages and feed these messages to the <code>info/3</code> callback. It also features the <code>init/2</code> and <code>terminate/3</code> callbacks which work the same as for plain HTTP handlers.</p>
<h2 id="_initialization">Initialization</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <code>init/2</code> function must return a <code>cowboy_loop</code> tuple to enable
-loop handler behavior. This tuple may optionally contain
-a timeout value and/or the atom <code>hibernate</code> to make the
-process enter hibernation until a message is received.</p></div>
-<div class="paragraph"><p>This snippet enables the loop handler:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The <code>init/2</code> function must return a <code>cowboy_loop</code> tuple to enable loop handler behavior. This tuple may optionally contain a timeout value and/or the atom <code>hibernate</code> to make the process enter hibernation until a message is received.</p>
+<p>This snippet enables the loop handler:</p>
+<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">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_loop</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>This also makes the process hibernate:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">cowboy_loop</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>This also makes the process hibernate:</p>
+<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">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_loop</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>, <span style="color: #FF6600">hibernate</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">cowboy_loop</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>, <font color="#FF6600">hibernate</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_receive_loop">Receive loop</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Once initialized, Cowboy will wait for messages to arrive
-in the process' mailbox. When a message arrives, Cowboy
-calls the <code>info/3</code> function with the message, the Req object
-and the handler&#8217;s state.</p></div>
-<div class="paragraph"><p>The following snippet sends a reply when it receives a
-<code>reply</code> message from another process, or waits for another
-message otherwise.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Once initialized, Cowboy will wait for messages to arrive in the process&apos; mailbox. When a message arrives, Cowboy calls the <code>info/3</code> function with the message, the Req object and the handler&apos;s state.</p>
+<p>The following snippet sends a reply when it receives a <code>reply</code> message from another process, or waits for another message otherwise.</p>
+<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">info</span></span>({<span style="color: #FF6600">reply</span>, <span style="color: #009900">Body</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: #000000">cowboy_req:reply</span></span>(<span style="color: #993399">200</span>, #{}, <span style="color: #009900">Body</span>, <span style="color: #009900">Req</span>),
- {<span style="color: #FF6600">stop</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>};
-<span style="font-weight: bold"><span style="color: #000000">info</span></span>(<span style="color: #009900">_Msg</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>, <span style="color: #FF6600">hibernate</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Do note that the <code>reply</code> tuple here may be any message
-and is simply an example.</p></div>
-<div class="paragraph"><p>This callback may perform any necessary operation including
-sending all or parts of a reply, and will subsequently
-return a tuple indicating if more messages are to be expected.</p></div>
-<div class="paragraph"><p>The callback may also choose to do nothing at all and just
-skip the message received.</p></div>
-<div class="paragraph"><p>If a reply is sent, then the <code>stop</code> tuple should be returned.
-This will instruct Cowboy to end the request.</p></div>
-<div class="paragraph"><p>Otherwise an <code>ok</code> tuple should be returned.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">info</font></b>({<font color="#FF6600">reply</font>, <font color="#009900">Body</font>}, <font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#000000">cowboy_req:reply</font></b>(<font color="#993399">200</font>, #{}, <font color="#009900">Body</font>, <font color="#009900">Req</font>),
+ {<font color="#FF6600">stop</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>};
+<b><font color="#000000">info</font></b>(<font color="#009900">_Msg</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>, <font color="#FF6600">hibernate</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Do note that the <code>reply</code> tuple here may be any message and is simply an example.</p>
+<p>This callback may perform any necessary operation including sending all or parts of a reply, and will subsequently return a tuple indicating if more messages are to be expected.</p>
+<p>The callback may also choose to do nothing at all and just skip the message received.</p>
+<p>If a reply is sent, then the <code>stop</code> tuple should be returned. This will instruct Cowboy to end the request.</p>
+<p>Otherwise an <code>ok</code> tuple should be returned.</p>
<h2 id="_streaming_loop">Streaming loop</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Another common case well suited for loop handlers is
-streaming data received in the form of Erlang messages.
-This can be done by initiating a chunked reply in the
-<code>init/2</code> callback and then using <code>cowboy_req:chunk/2</code>
-every time a message is received.</p></div>
-<div class="paragraph"><p>The following snippet does exactly that. As you can see
-a chunk is sent every time an <code>event</code> message is received,
-and the loop is stopped by sending an <code>eof</code> message.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Another common case well suited for loop handlers is streaming data received in the form of Erlang messages. This can be done by initiating a chunked reply in the <code>init/2</code> callback and then using <code>cowboy_req:chunk/2</code> every time a message is received.</p>
+<p>The following snippet does exactly that. As you can see a chunk is sent every time an <code>event</code> message is received, and the loop is stopped by sending an <code>eof</code> message.</p>
+<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">init</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- <span style="color: #009900">Req2</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_reply</span></span>(<span style="color: #993399">200</span>, <span style="color: #009900">Req</span>),
- {<span style="color: #FF6600">cowboy_loop</span>, <span style="color: #009900">Req2</span>, <span style="color: #009900">State</span>}<span style="color: #990000">.</span>
-
-<span style="font-weight: bold"><span style="color: #000000">info</span></span>(<span style="color: #FF6600">eof</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">stop</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>};
-<span style="font-weight: bold"><span style="color: #000000">info</span></span>({<span style="color: #FF6600">event</span>, <span style="color: #009900">Data</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: #000000">cowboy_req:stream_body</span></span>(<span style="color: #009900">Data</span>, <span style="color: #FF6600">nofin</span>, <span style="color: #009900">Req</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">info</span></span>(<span style="color: #009900">_Msg</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">ok</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">
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ <font color="#009900">Req2</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:stream_reply</font></b>(<font color="#993399">200</font>, <font color="#009900">Req</font>),
+ {<font color="#FF6600">cowboy_loop</font>, <font color="#009900">Req2</font>, <font color="#009900">State</font>}<font color="#990000">.</font>
+
+<b><font color="#000000">info</font></b>(<font color="#FF6600">eof</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">stop</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>};
+<b><font color="#000000">info</font></b>({<font color="#FF6600">event</font>, <font color="#009900">Data</font>}, <font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#000000">cowboy_req:stream_body</font></b>(<font color="#009900">Data</font>, <font color="#FF6600">nofin</font>, <font color="#009900">Req</font>),
+ {<font color="#FF6600">ok</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>};
+<b><font color="#000000">info</font></b>(<font color="#009900">_Msg</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_cleaning_up">Cleaning up</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>It is recommended that you set the connection header to
-<code>close</code> when replying, as this process may be reused for
-a subsequent request.</p></div>
-<div class="paragraph"><p>Please refer to the <a href="../handlers">Handlers chapter</a>
-for general instructions about cleaning up.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>It is recommended that you set the connection header to <code>close</code> when replying, as this process may be reused for a subsequent request.</p>
+<p>Please refer to the <a href="../handlers">Handlers chapter</a> for general instructions about cleaning up.</p>
<h2 id="_hibernate">Hibernate</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>To save memory, you may hibernate the process in between
-messages received. This is done by returning the atom
-<code>hibernate</code> as part of the <code>loop</code> tuple callbacks normally
-return. Just add the atom at the end and Cowboy will hibernate
-accordingly.</p></div>
-</div>
-</div>
+<p>To save memory, you may hibernate the process in between messages received. This is done by returning the atom <code>hibernate</code> as part of the <code>loop</code> tuple callbacks normally return. Just add the atom at the end and Cowboy will hibernate accordingly.</p>
+
diff --git a/docs/en/cowboy/2.2/guide/middlewares/index.html b/docs/en/cowboy/2.2/guide/middlewares/index.html
index 2d473e24..28d76671 100644
--- a/docs/en/cowboy/2.2/guide/middlewares/index.html
+++ b/docs/en/cowboy/2.2/guide/middlewares/index.html
@@ -62,92 +62,38 @@
<h1 class="lined-header"><span>Middlewares</span></h1>
-<div class="paragraph"><p>Cowboy delegates the request processing to middleware components.
-By default, two middlewares are defined, for the routing and handling
-of the request, as is detailed in most of this guide.</p></div>
-<div class="paragraph"><p>Middlewares give you complete control over how requests are to be
-processed. You can add your own middlewares to the mix or completely
-change the chain of middlewares as needed.</p></div>
-<div class="paragraph"><p>Cowboy will execute all middlewares in the given order, unless one
-of them decides to stop processing.</p></div>
-<div class="sect1">
+<p>Cowboy delegates the request processing to middleware components. By default, two middlewares are defined, for the routing and handling of the request, as is detailed in most of this guide.</p>
+<p>Middlewares give you complete control over how requests are to be processed. You can add your own middlewares to the mix or completely change the chain of middlewares as needed.</p>
+<p>Cowboy will execute all middlewares in the given order, unless one of them decides to stop processing.</p>
<h2 id="_usage">Usage</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Middlewares only need to implement a single callback: <code>execute/2</code>.
-It is defined in the <code>cowboy_middleware</code> behavior.</p></div>
-<div class="paragraph"><p>This callback has two arguments. The first is the <code>Req</code> object.
-The second is the environment.</p></div>
-<div class="paragraph"><p>Middlewares can return one of three different values:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<code>{ok, Req, Env}</code> to continue the request processing
-</p>
+<p>Middlewares only need to implement a single callback: <code>execute/2</code>. It is defined in the <code>cowboy_middleware</code> behavior.</p>
+<p>This callback has two arguments. The first is the <code>Req</code> object. The second is the environment.</p>
+<p>Middlewares can return one of three different values:</p>
+<ul><li><code>{ok, Req, Env}</code> to continue the request processing
</li>
-<li>
-<p>
-<code>{suspend, Module, Function, Args}</code> to hibernate
-</p>
+<li><code>{suspend, Module, Function, Args}</code> to hibernate
</li>
-<li>
-<p>
-<code>{stop, Req}</code> to stop processing and move on to the next request
-</p>
+<li><code>{stop, Req}</code> to stop processing and move on to the next request
</li>
-</ul></div>
-<div class="paragraph"><p>Of note is that when hibernating, processing will resume on the given
-MFA, discarding all previous stacktrace. Make sure you keep the <code>Req</code>
-and <code>Env</code> in the arguments of this MFA for later use.</p></div>
-<div class="paragraph"><p>If an error happens during middleware processing, Cowboy will not try
-to send an error back to the socket, the process will just crash. It
-is up to the middleware to make sure that a reply is sent if something
-goes wrong.</p></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
+<p>Of note is that when hibernating, processing will resume on the given MFA, discarding all previous stacktrace. Make sure you keep the <code>Req</code> and <code>Env</code> in the arguments of this MFA for later use.</p>
+<p>If an error happens during middleware processing, Cowboy will not try to send an error back to the socket, the process will just crash. It is up to the middleware to make sure that a reply is sent if something goes wrong.</p>
<h2 id="_configuration">Configuration</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The middleware environment is defined as the <code>env</code> protocol option.
-In the previous chapters we saw it briefly when we needed to pass
-the routing information. It is a list of tuples with the first
-element being an atom and the second any Erlang term.</p></div>
-<div class="paragraph"><p>Two values in the environment are reserved:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<code>listener</code> contains the name of the listener
-</p>
+<p>The middleware environment is defined as the <code>env</code> protocol option. In the previous chapters we saw it briefly when we needed to pass the routing information. It is a list of tuples with the first element being an atom and the second any Erlang term.</p>
+<p>Two values in the environment are reserved:</p>
+<ul><li><code>listener</code> contains the name of the listener
</li>
-<li>
-<p>
-<code>result</code> contains the result of the processing
-</p>
+<li><code>result</code> contains the result of the processing
</li>
-</ul></div>
-<div class="paragraph"><p>The <code>listener</code> value is always defined. The <code>result</code> value can be
-set by any middleware. If set to anything other than <code>ok</code>, Cowboy
-will not process any subsequent requests on this connection.</p></div>
-<div class="paragraph"><p>The middlewares that come with Cowboy may define or require other
-environment values to perform.</p></div>
-<div class="paragraph"><p>You can update the environment by calling the <code>cowboy:set_env/3</code>
-convenience function, adding or replacing a value in the environment.</p></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
+<p>The <code>listener</code> value is always defined. The <code>result</code> value can be set by any middleware. If set to anything other than <code>ok</code>, Cowboy will not process any subsequent requests on this connection.</p>
+<p>The middlewares that come with Cowboy may define or require other environment values to perform.</p>
+<p>You can update the environment by calling the <code>cowboy:set_env/3</code> convenience function, adding or replacing a value in the environment.</p>
<h2 id="_routing_middleware">Routing middleware</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The routing middleware requires the <code>dispatch</code> value. If routing
-succeeds, it will put the handler name and options in the <code>handler</code>
-and <code>handler_opts</code> values of the environment, respectively.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The routing middleware requires the <code>dispatch</code> value. If routing succeeds, it will put the handler name and options in the <code>handler</code> and <code>handler_opts</code> values of the environment, respectively.</p>
<h2 id="_handler_middleware">Handler middleware</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The handler middleware requires the <code>handler</code> and <code>handler_opts</code>
-values. It puts the result of the request handling into <code>result</code>.</p></div>
-</div>
-</div>
+<p>The handler middleware requires the <code>handler</code> and <code>handler_opts</code> values. It puts the result of the request handling into <code>result</code>.</p>
+
diff --git a/docs/en/cowboy/2.2/guide/migrating_from_1.0/index.html b/docs/en/cowboy/2.2/guide/migrating_from_1.0/index.html
index 9b15e77f..a0100863 100644
--- a/docs/en/cowboy/2.2/guide/migrating_from_1.0/index.html
+++ b/docs/en/cowboy/2.2/guide/migrating_from_1.0/index.html
@@ -62,388 +62,120 @@
<h1 class="lined-header"><span>Migrating from Cowboy 1.0 to 2.0</span></h1>
-<div class="paragraph"><p>A lot has changed between Cowboy 1.0 and 2.0. The <code>cowboy_req</code>
-interface in particular has seen a massive revamp. Hooks are
-gone, their functionality can now be achieved via stream
-handlers.</p></div>
-<div class="paragraph"><p>The documentation has seen great work, in particular the
-manual. Each module and each function now has its own dedicated
-manual page with full details and examples.</p></div>
-<div class="sect1">
+<p>A lot has changed between Cowboy 1.0 and 2.0. The <code>cowboy_req</code> interface in particular has seen a massive revamp. Hooks are gone, their functionality can now be achieved via stream handlers.</p>
+<p>The documentation has seen great work, in particular the manual. Each module and each function now has its own dedicated manual page with full details and examples.</p>
<h2 id="_compatibility">Compatibility</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Compatibility with Erlang/OTP R16, 17 and 18 has been dropped.
-Erlang/OTP 19.0 or above is required. It is non-trivial to
-make Cowboy 2.0 work with older Erlang/OTP versions.</p></div>
-<div class="paragraph"><p>Cowboy 2.0 is not compatible with Cowlib versions older than
-2.0. It should be compatible with Ranch 1.0 or above, however
-it has not been tested with Ranch versions older than 1.4.</p></div>
-<div class="paragraph"><p>Cowboy 2.0 is tested on Arch Linux, Ubuntu, FreeBSD, Windows
-and OSX. It is tested with every point release (latest patch
-release) and also with HiPE on the most recent release.</p></div>
-<div class="paragraph"><p>Cowboy 2.0 now comes with Erlang.mk templates.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Compatibility with Erlang/OTP R16, 17 and 18 has been dropped. Erlang/OTP 19.0 or above is required. It is non-trivial to make Cowboy 2.0 work with older Erlang/OTP versions.</p>
+<p>Cowboy 2.0 is not compatible with Cowlib versions older than 2.0. It should be compatible with Ranch 1.0 or above, however it has not been tested with Ranch versions older than 1.4.</p>
+<p>Cowboy 2.0 is tested on Arch Linux, Ubuntu, FreeBSD, Windows and OSX. It is tested with every point release (latest patch release) and also with HiPE on the most recent release.</p>
+<p>Cowboy 2.0 now comes with Erlang.mk templates.</p>
<h2 id="_features_added">Features added</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-The HTTP/2 protocol is now supported.
-</p>
-</li>
-<li>
-<p>
-Cowboy no longer uses only one process per connection.
- It now uses one process per connection plus one process
- per request by default. This is necessary for HTTP/2.
- There might be a slight drop in performance for HTTP/1.1
- connections due to this change.
-</p>
-</li>
-<li>
-<p>
-Cowboy internals have largely been reworked in order to
- support HTTP/2. This opened the way to stream handlers,
- which are a chain of modules that are called whenever
- something happens relating to a request/response.
-</p>
-</li>
-<li>
-<p>
-The <code>cowboy_stream_h</code> stream handler has been added.
- It provides most of Cowboy&#8217;s default behavior.
-</p>
-</li>
-<li>
-<p>
-The <code>cowboy_compress_h</code> stream handler has been added.
- It compresses responses when possible. It&#8217;s worth noting
- that it compresses in more cases than Cowboy 1.0 ever did.
-</p>
-</li>
-<li>
-<p>
-Because of the many changes in the internals of Cowboy,
- many options have been added or modified. Of note is that
- the Websocket options are now given per handler rather
- than for the entire listener.
-</p>
-</li>
-<li>
-<p>
-Websocket permessage-deflate compression is now supported
- via the <code>compress</code> option.
-</p>
-</li>
-<li>
-<p>
-Static file handlers will now correctly find files found
- in <em>.ez</em> archives.
-</p>
-</li>
-<li>
-<p>
-Constraints have been generalized and are now used not only
- in the router but also in some <code>cowboy_req</code> functions. Their
- interface has also been modified to allow for reverse
- operations and formatting of errors.
-</p>
-</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+<ul><li>The HTTP/2 protocol is now supported.
+</li>
+<li>Cowboy no longer uses only one process per connection. It now uses one process per connection plus one process per request by default. This is necessary for HTTP/2. There might be a slight drop in performance for HTTP/1.1 connections due to this change.
+</li>
+<li>Cowboy internals have largely been reworked in order to support HTTP/2. This opened the way to stream handlers, which are a chain of modules that are called whenever something happens relating to a request/response.
+</li>
+<li>The <code>cowboy_stream_h</code> stream handler has been added. It provides most of Cowboy&apos;s default behavior.
+</li>
+<li>The <code>cowboy_compress_h</code> stream handler has been added. It compresses responses when possible. It&apos;s worth noting that it compresses in more cases than Cowboy 1.0 ever did.
+</li>
+<li>Because of the many changes in the internals of Cowboy, many options have been added or modified. Of note is that the Websocket options are now given per handler rather than for the entire listener.
+</li>
+<li>Websocket permessage-deflate compression is now supported via the <code>compress</code> option.
+</li>
+<li>Static file handlers will now correctly find files found in <em>.ez</em> archives.
+</li>
+<li>Constraints have been generalized and are now used not only in the router but also in some <code>cowboy_req</code> functions. Their interface has also been modified to allow for reverse operations and formatting of errors.
+</li>
+</ul>
<h2 id="_features_removed">Features removed</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-SPDY support has been removed. Use HTTP/2 instead.
-</p>
-</li>
-<li>
-<p>
-Hooks have been removed. Use <a href="../streams">stream handlers</a> instead.
-</p>
-</li>
-<li>
-<p>
-The undocumented <code>waiting_stream</code> hack has been removed.
- It allowed disabling chunked transfer-encoding for HTTP/1.1.
- It has no equivalent in Cowboy 2.0. Open a ticket if necessary.
-</p>
-</li>
-<li>
-<p>
-Sub protocols still exist, but their interface has largely changed
- and they are no longer documented for the time being.
-</p>
-</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+<ul><li>SPDY support has been removed. Use HTTP/2 instead.
+</li>
+<li>Hooks have been removed. Use <a href="../streams">stream handlers</a> instead.
+</li>
+<li>The undocumented <code>waiting_stream</code> hack has been removed. It allowed disabling chunked transfer-encoding for HTTP/1.1. It has no equivalent in Cowboy 2.0. Open a ticket if necessary.
+</li>
+<li>Sub protocols still exist, but their interface has largely changed and they are no longer documented for the time being.
+</li>
+</ul>
<h2 id="_changed_behaviors">Changed behaviors</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-The handler behaviors have been renamed and are now <code>cowboy_handler</code>,
- <code>cowboy_loop</code>, <code>cowboy_rest</code> and <code>cowboy_websocket</code>.
-</p>
-</li>
-<li>
-<p>
-Plain HTTP, loop, REST and Websocket handlers have had their
- init and terminate callbacks unified. They now all use the
- <code>init/2</code> and <code>terminate/3</code> callbacks. The latter is now optional.
- The terminate reason has now been documented for all handlers.
-</p>
-</li>
-<li>
-<p>
-The tuple returned to switch to a different handler type has
- changed. It now takes the form <code>{Module, Req, State}</code> or
- <code>{Module, Req, State, Opts}</code>, where <code>Opts</code> is a map of options
- to configure the handler. The timeout and hibernate options
- must now be specified using this map, where applicable.
-</p>
-</li>
-<li>
-<p>
-All behaviors that used to accept <code>halt</code> or <code>shutdown</code> tuples
- as a return value no longer do so. The return value is now
- a <code>stop</code> tuple, consistent across Cowboy.
-</p>
-</li>
-<li>
-<p>
-Middlewares can no longer return an <code>error</code> tuple. They have
- to send the response and return a <code>stop</code> tuple instead.
-</p>
-</li>
-<li>
-<p>
-The <code>known_content_type</code> REST handler callback has been removed
- as it was found unnecessary.
-</p>
-</li>
-<li>
-<p>
-Websocket handlers have both the normal <code>init/2</code> and
- an optional <code>websocket_init/1</code> function. The reason for
- that exception is that the <code>websocket_*</code> callbacks execute
- in a separate process from the <code>init/2</code> callback, and it
- was therefore not obvious how timers or monitors should
- be setup properly. They are effectively initializing the
- handler before and after the HTTP/1.1 upgrade.
-</p>
-</li>
-<li>
-<p>
-Websocket handlers can now send frames directly from
- <code>websocket_init/1</code>. The frames will be sent immediately
- after the handshake.
-</p>
-</li>
-<li>
-<p>
-Websocket handler callbacks no longer receive the Req
- argument. The <code>init/2</code> callback still receives it and
- can be used to extract relevant information. The <code>terminate/3</code>
- callback, if implemented, may still receive the Req
- (see next bullet point).
-</p>
-</li>
-<li>
-<p>
-Websocket handlers have a new <code>req_filter</code> option that
- can be used to customize how much information should be
- discarded from the Req object after the handshake. Note
- that the Req object is only available in <code>terminate/3</code>
- past that point.
-</p>
-</li>
-<li>
-<p>
-Websocket handlers have their timeout default changed
- from infinity to 60 seconds.
-</p>
-</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+<ul><li>The handler behaviors have been renamed and are now <code>cowboy_handler</code>, <code>cowboy_loop</code>, <code>cowboy_rest</code> and <code>cowboy_websocket</code>.
+</li>
+<li>Plain HTTP, loop, REST and Websocket handlers have had their init and terminate callbacks unified. They now all use the <code>init/2</code> and <code>terminate/3</code> callbacks. The latter is now optional. The terminate reason has now been documented for all handlers.
+</li>
+<li>The tuple returned to switch to a different handler type has changed. It now takes the form <code>{Module, Req, State}</code> or <code>{Module, Req, State, Opts}</code>, where <code>Opts</code> is a map of options to configure the handler. The timeout and hibernate options must now be specified using this map, where applicable.
+</li>
+<li>All behaviors that used to accept <code>halt</code> or <code>shutdown</code> tuples as a return value no longer do so. The return value is now a <code>stop</code> tuple, consistent across Cowboy.
+</li>
+<li>Middlewares can no longer return an <code>error</code> tuple. They have to send the response and return a <code>stop</code> tuple instead.
+</li>
+<li>The <code>known_content_type</code> REST handler callback has been removed as it was found unnecessary.
+</li>
+<li>Websocket handlers have both the normal <code>init/2</code> and an optional <code>websocket_init/1</code> function. The reason for that exception is that the <code>websocket_*</code> callbacks execute in a separate process from the <code>init/2</code> callback, and it was therefore not obvious how timers or monitors should be setup properly. They are effectively initializing the handler before and after the HTTP/1.1 upgrade.
+</li>
+<li>Websocket handlers can now send frames directly from <code>websocket_init/1</code>. The frames will be sent immediately after the handshake.
+</li>
+<li>Websocket handler callbacks no longer receive the Req argument. The <code>init/2</code> callback still receives it and can be used to extract relevant information. The <code>terminate/3</code> callback, if implemented, may still receive the Req (see next bullet point).
+</li>
+<li>Websocket handlers have a new <code>req_filter</code> option that can be used to customize how much information should be discarded from the Req object after the handshake. Note that the Req object is only available in <code>terminate/3</code> past that point.
+</li>
+<li>Websocket handlers have their timeout default changed from infinity to 60 seconds.
+</li>
+</ul>
<h2 id="_new_functions">New functions</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-The <code>cowboy_req:scheme/1</code> function has been added.
-</p>
-</li>
-<li>
-<p>
-The <code>cowboy_req:uri/1,2</code> function has been added, replacing the
- less powerful functions <code>cowboy_req:url/1</code> and <code>cowboy_req:host_url/1</code>.
-</p>
-</li>
-<li>
-<p>
-The functions <code>cowboy_req:match_qs/2</code> and <code>cowboy_req:match_cookies/2</code>
- allow matching query string and cookies against constraints.
-</p>
-</li>
-<li>
-<p>
-The function <code>cowboy_req:set_resp_cookie/3</code> has been added to
- complement <code>cowboy_req:set_resp_cookie/4</code>.
-</p>
-</li>
-<li>
-<p>
-The functions <code>cowboy_req:resp_header/2,3</code> and <code>cowboy_req:resp_headers/1</code>
- have been added. They can be used to retrieve response headers
- that were previously set.
-</p>
-</li>
-<li>
-<p>
-The function <code>cowboy_req:set_resp_headers/2</code> has been added. It
- allows setting many response headers at once.
-</p>
-</li>
-<li>
-<p>
-The functions <code>cowboy_req:push/3,4</code> can be used to push resources
- for protocols that support it (by default only HTTP/2).
-</p>
-</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+<ul><li>The <code>cowboy_req:scheme/1</code> function has been added.
+</li>
+<li>The <code>cowboy_req:uri/1,2</code> function has been added, replacing the less powerful functions <code>cowboy_req:url/1</code> and <code>cowboy_req:host_url/1</code>.
+</li>
+<li>The functions <code>cowboy_req:match_qs/2</code> and <code>cowboy_req:match_cookies/2</code> allow matching query string and cookies against constraints.
+</li>
+<li>The function <code>cowboy_req:set_resp_cookie/3</code> has been added to complement <code>cowboy_req:set_resp_cookie/4</code>.
+</li>
+<li>The functions <code>cowboy_req:resp_header/2,3</code> and <code>cowboy_req:resp_headers/1</code> have been added. They can be used to retrieve response headers that were previously set.
+</li>
+<li>The function <code>cowboy_req:set_resp_headers/2</code> has been added. It allows setting many response headers at once.
+</li>
+<li>The functions <code>cowboy_req:push/3,4</code> can be used to push resources for protocols that support it (by default only HTTP/2).
+</li>
+</ul>
<h2 id="_changed_functions">Changed functions</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-The <code>cowboy:start_http/4</code> function was renamed to <code>cowboy:start_clear/3</code>.
-</p>
-</li>
-<li>
-<p>
-The <code>cowboy:start_https/4</code> function was renamed to <code>cowboy:start_tls/3</code>.
-</p>
-</li>
-<li>
-<p>
-Most, if not all, functions in the <code>cowboy_req</code> module have been modified.
- Please consult the changelog of each individual functions. The changes
- are mainly about simplifying and clarifying the interface. The Req is no
- longer returned when not necessary, maps are used wherever possible,
- and some functions have been renamed.
-</p>
-</li>
-<li>
-<p>
-The position of the <code>Opts</code> argument for <code>cowboy_req:set_resp_cookie/4</code>
- has changed to improve consistency. It is now the last argument.
-</p>
-</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+<ul><li>The <code>cowboy:start_http/4</code> function was renamed to <code>cowboy:start_clear/3</code>.
+</li>
+<li>The <code>cowboy:start_https/4</code> function was renamed to <code>cowboy:start_tls/3</code>.
+</li>
+<li>Most, if not all, functions in the <code>cowboy_req</code> module have been modified. Please consult the changelog of each individual functions. The changes are mainly about simplifying and clarifying the interface. The Req is no longer returned when not necessary, maps are used wherever possible, and some functions have been renamed.
+</li>
+<li>The position of the <code>Opts</code> argument for <code>cowboy_req:set_resp_cookie/4</code> has changed to improve consistency. It is now the last argument.
+</li>
+</ul>
<h2 id="_removed_functions">Removed functions</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-The functions <code>cowboy_req:url/1</code> and <code>cowboy_req:host_url/1</code> have been
- removed in favor of the new function <code>cowboy_req:uri/1,2</code>.
-</p>
-</li>
-<li>
-<p>
-The functions <code>cowboy_req:meta/2,3</code> and <code>cowboy_req:set_meta/3</code> have
- been removed. The Req object is now a public map, therefore they became
- unnecessary.
-</p>
-</li>
-<li>
-<p>
-The functions <code>cowboy_req:set_resp_body_fun/2,3</code> have been removed.
- For sending files, the function <code>cowboy_req:set_resp_body/2</code> can now
- take a sendfile tuple.
-</p>
-</li>
-<li>
-<p>
-Remove many undocumented functions from <code>cowboy_req</code>, including the
- functions <code>cowboy_req:get/2</code> and <code>cowboy_req:set/3</code>.
-</p>
-</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+<ul><li>The functions <code>cowboy_req:url/1</code> and <code>cowboy_req:host_url/1</code> have been removed in favor of the new function <code>cowboy_req:uri/1,2</code>.
+</li>
+<li>The functions <code>cowboy_req:meta/2,3</code> and <code>cowboy_req:set_meta/3</code> have been removed. The Req object is now a public map, therefore they became unnecessary.
+</li>
+<li>The functions <code>cowboy_req:set_resp_body_fun/2,3</code> have been removed. For sending files, the function <code>cowboy_req:set_resp_body/2</code> can now take a sendfile tuple.
+</li>
+<li>Remove many undocumented functions from <code>cowboy_req</code>, including the functions <code>cowboy_req:get/2</code> and <code>cowboy_req:set/3</code>.
+</li>
+</ul>
<h2 id="_other_changes">Other changes</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-The correct percent-decoding algorithm is now used for path elements
- during routing. It will no longer decode <code>+</code> characters.
-</p>
-</li>
-<li>
-<p>
-The router will now properly handle path segments <code>.</code> and <code>..</code>.
-</p>
-</li>
-<li>
-<p>
-Routing behavior has changed for URIs containing latin1 characters.
- They are no longer allowed. URIs are expected to be in UTF-8 once
- they are percent-decoded.
-</p>
-</li>
-<li>
-<p>
-Clients that send multiple headers of the same name
- will have the values of those headers concatenated into a
- comma-separated list. This is of special importance in the
- case of the content-type header, as previously only the
- first value was used in the <code>content_types_accepted/2</code> step
- in REST handlers.
-</p>
-</li>
-<li>
-<p>
-Etag comparison in REST handlers has been fixed. Some requests may
- now fail when they succeeded in the past.
-</p>
-</li>
-<li>
-<p>
-The <code>If-*-Since</code> headers are now ignored in REST handlers if
- the corresponding <code>If*-Match</code> header exist. The former is
- largely a backward compatible header and this shouldn&#8217;t create
- any issue. The new behavior follows the current RFCs more closely.
-</p>
-</li>
-<li>
-<p>
-The static file handler has been improved to handle more special
- characters on systems that accept them.
-</p>
-</li>
-</ul></div>
-</div>
-</div>
+<ul><li>The correct percent-decoding algorithm is now used for path elements during routing. It will no longer decode <code>+</code> characters.
+</li>
+<li>The router will now properly handle path segments <code>.</code> and <code>..</code>.
+</li>
+<li>Routing behavior has changed for URIs containing latin1 characters. They are no longer allowed. URIs are expected to be in UTF-8 once they are percent-decoded.
+</li>
+<li>Clients that send multiple headers of the same name will have the values of those headers concatenated into a comma-separated list. This is of special importance in the case of the content-type header, as previously only the first value was used in the <code>content_types_accepted/2</code> step in REST handlers.
+</li>
+<li>Etag comparison in REST handlers has been fixed. Some requests may now fail when they succeeded in the past.
+</li>
+<li>The <code>If-*-Since</code> headers are now ignored in REST handlers if the corresponding <code>If*-Match</code> header exist. The former is largely a backward compatible header and this shouldn&apos;t create any issue. The new behavior follows the current RFCs more closely.
+</li>
+<li>The static file handler has been improved to handle more special characters on systems that accept them.
+</li>
+</ul>
+
diff --git a/docs/en/cowboy/2.2/guide/migrating_from_2.0/index.html b/docs/en/cowboy/2.2/guide/migrating_from_2.0/index.html
index b8c27361..f32a168c 100644
--- a/docs/en/cowboy/2.2/guide/migrating_from_2.0/index.html
+++ b/docs/en/cowboy/2.2/guide/migrating_from_2.0/index.html
@@ -62,188 +62,55 @@
<h1 class="lined-header"><span>Migrating from Cowboy 2.0 to 2.1</span></h1>
-<div class="paragraph"><p>Cowboy 2.1 focused on adding features that were temporarily
-removed in Cowboy 2.0. A number of bugs found in the 2.0
-release were also fixed.</p></div>
-<div class="sect1">
+<p>Cowboy 2.1 focused on adding features that were temporarily removed in Cowboy 2.0. A number of bugs found in the 2.0 release were also fixed.</p>
<h2 id="_features_added">Features added</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-It is now possible to obtain the client TLS certificate
- and the local IP/port for the connection from the Req object.
-</p>
+<ul><li>It is now possible to obtain the client TLS certificate and the local IP/port for the connection from the Req object.
</li>
-<li>
-<p>
-Informational responses (1XX responses) can now be sent.
- They must be sent before initiating the final response.
-</p>
+<li>Informational responses (1XX responses) can now be sent. They must be sent before initiating the final response.
</li>
-<li>
-<p>
-The <code>expect: 100-continue</code> header is now handled
- automatically. The 100 response will be sent on the
- first <code>cowboy_req:read_body/2,3,4</code> call. This only applies
- when using the default <code>cowboy_stream_h</code> stream handler.
-</p>
+<li>The <code>expect: 100-continue</code> header is now handled automatically. The 100 response will be sent on the first <code>cowboy_req:read_body/2,3,4</code> call. This only applies when using the default <code>cowboy_stream_h</code> stream handler.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_experimental_features_added">Experimental features added</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Experimental features are previews of features that will be
-added in a future release. They are not documented and their
-interface may change at any time. You are welcome to try them
-and provide feedback.</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-The <code>cowboy_metrics_h</code> stream handler can be used to
- extract metrics out of Cowboy. It must be used first in
- the list of stream handlers, and will record all events
- related to requests, responses and spawned processes.
- When the stream terminates it will pass this information
- to a user-defined callback.
-</p>
+<p>Experimental features are previews of features that will be added in a future release. They are not documented and their interface may change at any time. You are welcome to try them and provide feedback.</p>
+<ul><li>The <code>cowboy_metrics_h</code> stream handler can be used to extract metrics out of Cowboy. It must be used first in the list of stream handlers, and will record all events related to requests, responses and spawned processes. When the stream terminates it will pass this information to a user-defined callback.
</li>
-<li>
-<p>
-The <code>cowboy_tracer_h</code> stream handler can be used to setup
- automatic tracing of specific requests. You can conditionally
- enable tracing based on a function, header, path or any other
- element from the request and the trace will apply to the
- entire connection and any processes created by it. This is
- meant to be used for debugging both in tests and production.
-</p>
+<li>The <code>cowboy_tracer_h</code> stream handler can be used to setup automatic tracing of specific requests. You can conditionally enable tracing based on a function, header, path or any other element from the request and the trace will apply to the entire connection and any processes created by it. This is meant to be used for debugging both in tests and production.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_changed_behaviors">Changed behaviors</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-The <code>cowboy_rest</code> handler now implements a mechanism for
- switching to a different type of handler from any callback
- where <code>stop</code> is also allowed. Switch by returning
- <code>{switch_handler, Module}</code> or <code>{switch_handler, Module, Opts}</code>.
- This is especially useful for switching to <code>cowboy_loop</code>
- for streaming the request or response body.
-</p>
+<ul><li>The <code>cowboy_rest</code> handler now implements a mechanism for switching to a different type of handler from any callback where <code>stop</code> is also allowed. Switch by returning <code>{switch_handler, Module}</code> or <code>{switch_handler, Module, Opts}</code>. This is especially useful for switching to <code>cowboy_loop</code> for streaming the request or response body.
</li>
-<li>
-<p>
-REST callbacks that do not allow <code>stop</code> as a return value
- are now explicitly listed in the documentation.
-</p>
+<li>REST callbacks that do not allow <code>stop</code> as a return value are now explicitly listed in the documentation.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_new_functions">New functions</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-The function <code>cowboy_req:sock/1</code> returns the IP/port
- of the local socket.
-</p>
+<ul><li>The function <code>cowboy_req:sock/1</code> returns the IP/port of the local socket.
</li>
-<li>
-<p>
-The function <code>cowboy_req:cert/1</code> returns the client
- TLS certificate or <code>undefined</code> if it isn&#8217;t available.
-</p>
+<li>The function <code>cowboy_req:cert/1</code> returns the client TLS certificate or <code>undefined</code> if it isn&apos;t available.
</li>
-<li>
-<p>
-The function <code>cowboy_req:inform/2,3</code> sends an
- informational response.
-</p>
+<li>The function <code>cowboy_req:inform/2,3</code> sends an informational response.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_bugs_fixed">Bugs fixed</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-Ensure HTTP/2 connections are not closed prematurely
- when the user code does not read the request body.
-</p>
+<ul><li>Ensure HTTP/2 connections are not closed prematurely when the user code does not read the request body.
</li>
-<li>
-<p>
-Ensure HTTP/1.1 streams are not terminated too early.
- Their behavior is now consistent with the HTTP/2 code
- where the stream handler is only terminated when the
- <code>stop</code> command is returned.
-</p>
+<li>Ensure HTTP/1.1 streams are not terminated too early. Their behavior is now consistent with the HTTP/2 code where the stream handler is only terminated when the <code>stop</code> command is returned.
</li>
-<li>
-<p>
-Sending zero-sized data from stream handlers or from
- <code>cowboy_req:stream_body/3</code> could lead to issues with
- HTTP/1.1. This has been fixed.
-</p>
+<li>Sending zero-sized data from stream handlers or from <code>cowboy_req:stream_body/3</code> could lead to issues with HTTP/1.1. This has been fixed.
</li>
-<li>
-<p>
-The final chunk sent by Cowboy when it terminates a
- chunked body after the handler process exits was not
- passed through stream handlers, which could lead to
- issues when <code>cowboy_compress_h</code> was being used. This
- is now corrected.
-</p>
+<li>The final chunk sent by Cowboy when it terminates a chunked body after the handler process exits was not passed through stream handlers, which could lead to issues when <code>cowboy_compress_h</code> was being used. This is now corrected.
</li>
-<li>
-<p>
-The stream handler state was discarded in some cases
- where Cowboy had to send a response or response data
- automatically when ending a stream. This has now
- been corrected.
-</p>
+<li>The stream handler state was discarded in some cases where Cowboy had to send a response or response data automatically when ending a stream. This has now been corrected.
</li>
-<li>
-<p>
-The stream handler callback <code>terminate/3</code> will now be
- called when switching to another protocol using the
- command <code>switch_protocol</code>. This doesn&#8217;t apply when
- doing upgrades to HTTP/2 as those occur before the
- stream is initialized.
-</p>
+<li>The stream handler callback <code>terminate/3</code> will now be called when switching to another protocol using the command <code>switch_protocol</code>. This doesn&apos;t apply when doing upgrades to HTTP/2 as those occur before the stream is initialized.
</li>
-<li>
-<p>
-Cowlib has been updated to 2.0.1 to fix an issue with
- Websocket compression when using Erlang/OTP 20.1. Note
- that at the time of writing all 20.1 versions (from
- 20.1 to 20.1.4) have issues when compression is enabled.
- It is expected to work properly from 20.1.5 onward. In
- the meantime it is recommended to run the plain 20.1
- release and disable Websocket compression, or use a
- release before 20.1.
-</p>
+<li>Cowlib has been updated to 2.0.1 to fix an issue with Websocket compression when using Erlang/OTP 20.1. Note that at the time of writing all 20.1 versions (from 20.1 to 20.1.4) have issues when compression is enabled. It is expected to work properly from 20.1.5 onward. In the meantime it is recommended to run the plain 20.1 release and disable Websocket compression, or use a release before 20.1.
</li>
-<li>
-<p>
-Cowboy will no longer crash when the <code>cowboy_clock</code>
- process is not running. This can happen when Cowboy
- is being restarted during upgrades, for example.
-</p>
+<li>Cowboy will no longer crash when the <code>cowboy_clock</code> process is not running. This can happen when Cowboy is being restarted during upgrades, for example.
</li>
-</ul></div>
-</div>
-</div>
+</ul>
+
diff --git a/docs/en/cowboy/2.2/guide/migrating_from_2.1/index.html b/docs/en/cowboy/2.2/guide/migrating_from_2.1/index.html
index 1115964c..3f62d4a9 100644
--- a/docs/en/cowboy/2.2/guide/migrating_from_2.1/index.html
+++ b/docs/en/cowboy/2.2/guide/migrating_from_2.1/index.html
@@ -62,203 +62,66 @@
<h1 class="lined-header"><span>Migrating from Cowboy 2.1 to 2.2</span></h1>
-<div class="paragraph"><p>Cowboy 2.2 focused on adding features required for writing
-gRPC servers and on completing test suites for the core
-HTTP RFCs, fixing many bugs along the way.</p></div>
-<div class="sect1">
+<p>Cowboy 2.2 focused on adding features required for writing gRPC servers and on completing test suites for the core HTTP RFCs, fixing many bugs along the way.</p>
<h2 id="_features_added">Features added</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-Add support for sending trailers at the end of response bodies.
- Trailers are additional header fields that may be sent after the
- body to add more information to the response. Their usage is
- required in gRPC servers. They are optional and may be discarded
- in other scenarios (for example if the request goes through an
- HTTP/1.0 proxy, as HTTP/1.0 does not support trailers).
-</p>
+<ul><li>Add support for sending trailers at the end of response bodies. Trailers are additional header fields that may be sent after the body to add more information to the response. Their usage is required in gRPC servers. They are optional and may be discarded in other scenarios (for example if the request goes through an HTTP/1.0 proxy, as HTTP/1.0 does not support trailers).
</li>
-<li>
-<p>
-The <code>max_skip_body_length</code> option was added to <code>cowboy_http</code>.
- It controls how much of a request body Cowboy is willing to skip
- when the handler did not touch it. If the remaining body size is
- too large Cowboy instead closes the connection. It defaults to 1MB.
-</p>
+<li>The <code>max_skip_body_length</code> option was added to <code>cowboy_http</code>. It controls how much of a request body Cowboy is willing to skip when the handler did not touch it. If the remaining body size is too large Cowboy instead closes the connection. It defaults to 1MB.
</li>
-<li>
-<p>
-The CONNECT and TRACE methods are now rejected as they are
- currently not implemented and must be handled differently than
- other methods. They will be implemented in a future release.
-</p>
+<li>The CONNECT and TRACE methods are now rejected as they are currently not implemented and must be handled differently than other methods. They will be implemented in a future release.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_new_functions">New functions</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-The function <code>stream_trailers/2</code> has been added. It terminates
- a stream and adds trailer fields at the end of the response. A
- corresponding stream handler command <code>{trailers, Trailers}</code>
- has also been added.
-</p>
+<ul><li>The function <code>stream_trailers/2</code> has been added. It terminates a stream and adds trailer fields at the end of the response. A corresponding stream handler command <code>{trailers, Trailers}</code> has also been added.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_bugs_fixed">Bugs fixed</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-Test suites for the core HTTP RFCs RFC7230, RFC7231 and RFC7540
- have been completed. Many of the bugs listed here were fixed as
- a result of this work.
-</p>
+<ul><li>Test suites for the core HTTP RFCs RFC7230, RFC7231 and RFC7540 have been completed. Many of the bugs listed here were fixed as a result of this work.
</li>
-<li>
-<p>
-Many HTTP/2 edge cases when clients are misbehaving have been
- corrected. This includes many cases where the request is malformed
- (for example when a pseudo-header is present twice).
-</p>
+<li>Many HTTP/2 edge cases when clients are misbehaving have been corrected. This includes many cases where the request is malformed (for example when a pseudo-header is present twice).
</li>
-<li>
-<p>
-When the HTTP/2 SETTINGS_INITIAL_WINDOW_SIZE value changes,
- Cowboy now properly updates the flow control windows.
-</p>
+<li>When the HTTP/2 SETTINGS_INITIAL_WINDOW_SIZE value changes, Cowboy now properly updates the flow control windows.
</li>
-<li>
-<p>
-HTTP/2 could mistakenly log stray messages that actually were
- expected. This is no longer the case.
-</p>
+<li>HTTP/2 could mistakenly log stray messages that actually were expected. This is no longer the case.
</li>
-<li>
-<p>
-We no longer send a GOAWAY frame when the HTTP/2 preface is invalid.
-</p>
+<li>We no longer send a GOAWAY frame when the HTTP/2 preface is invalid.
</li>
-<li>
-<p>
-Some values in the Req object of pushed requests were in the
- wrong type. They are now the expected binary instead of iolist.
-</p>
+<li>Some values in the Req object of pushed requests were in the wrong type. They are now the expected binary instead of iolist.
</li>
-<li>
-<p>
-A response body was sometimes sent in response to HEAD requests
- when using HTTP/2. The body is now ignored.
-</p>
+<li>A response body was sometimes sent in response to HEAD requests when using HTTP/2. The body is now ignored.
</li>
-<li>
-<p>
-The <code>max_headers</code> option for <code>cowboy_http</code> was not always respected
- depending on the contents of the buffer. The limit is now strict.
-</p>
+<li>The <code>max_headers</code> option for <code>cowboy_http</code> was not always respected depending on the contents of the buffer. The limit is now strict.
</li>
-<li>
-<p>
-When an early error occurred on the HTTP/1.1 request line, the
- partial Req given to stream handlers was missing the <code>ref</code> and
- <code>peer</code> information. This has been corrected.
-</p>
+<li>When an early error occurred on the HTTP/1.1 request line, the partial Req given to stream handlers was missing the <code>ref</code> and <code>peer</code> information. This has been corrected.
</li>
-<li>
-<p>
-Absolute URIs with a userinfo component, or without an authority
- component, are now properly rejected for HTTP/1.0 and HTTP/1.1.
-</p>
+<li>Absolute URIs with a userinfo component, or without an authority component, are now properly rejected for HTTP/1.0 and HTTP/1.1.
</li>
-<li>
-<p>
-Whitespace is no longer allowed in header lines before the colon.
-</p>
+<li>Whitespace is no longer allowed in header lines before the colon.
</li>
-<li>
-<p>
-408 responses to HTTP/1.1 requests now properly include a
- connection: close header indicating that we are going to
- close the connection. This header will also be sent for
- other early errors resulting in the closing of the connection.
-</p>
+<li>408 responses to HTTP/1.1 requests now properly include a connection: close header indicating that we are going to close the connection. This header will also be sent for other early errors resulting in the closing of the connection.
</li>
-<li>
-<p>
-When both the transfer-encoding and content-length headers are
- sent in an HTTP/1.1 request, the transfer-encoding now takes
- precedence over the content-length header and the latter is
- removed from the Req object.
-</p>
+<li>When both the transfer-encoding and content-length headers are sent in an HTTP/1.1 request, the transfer-encoding now takes precedence over the content-length header and the latter is removed from the Req object.
</li>
-<li>
-<p>
-A 400 response is now returned when the transfer-encoding
- header is invalid or contains any transfer-coding other
- than chunked.
-</p>
+<li>A 400 response is now returned when the transfer-encoding header is invalid or contains any transfer-coding other than chunked.
</li>
-<li>
-<p>
-Invalid chunk sizes are now rejected immediately.
-</p>
+<li>Invalid chunk sizes are now rejected immediately.
</li>
-<li>
-<p>
-Chunk extensions are now limited to 129 characters. They are
- not used in practice and are still ignored by Cowboy. The limit
- is not configurable.
-</p>
+<li>Chunk extensions are now limited to 129 characters. They are not used in practice and are still ignored by Cowboy. The limit is not configurable.
</li>
-<li>
-<p>
-The final chunk was mistakenly sent in responses to HEAD
- requests. This is now corrected.
-</p>
+<li>The final chunk was mistakenly sent in responses to HEAD requests. This is now corrected.
</li>
-<li>
-<p>
-<code>OPTIONS *</code> requests were broken in Cowboy 2.0. They are now
- working again. Both the routing and <code>cowboy_req:uri/1,2</code> have
- been corrected.
-</p>
+<li><code>OPTIONS *</code> requests were broken in Cowboy 2.0. They are now working again. Both the routing and <code>cowboy_req:uri/1,2</code> have been corrected.
</li>
-<li>
-<p>
-204 responses no longer include a content-length header.
-</p>
+<li>204 responses no longer include a content-length header.
</li>
-<li>
-<p>
-A packet could be lost when switching to Websocket or any
- other protocol via the <code>switch_protocol</code> command. This is
- now fixed.
-</p>
+<li>A packet could be lost when switching to Websocket or any other protocol via the <code>switch_protocol</code> command. This is now fixed.
</li>
-<li>
-<p>
-A 426 response will now be sent when a handler requires
- the client to upgrade to Websocket and the request did not
- include the required headers.
-</p>
+<li>A 426 response will now be sent when a handler requires the client to upgrade to Websocket and the request did not include the required headers.
</li>
-<li>
-<p>
-Both experimental stream handlers <code>cowboy_metrics_h</code> and
- <code>cowboy_tracer_h</code> received a number of fixes and improvements.
-</p>
+<li>Both experimental stream handlers <code>cowboy_metrics_h</code> and <code>cowboy_tracer_h</code> received a number of fixes and improvements.
</li>
-</ul></div>
-</div>
-</div>
+</ul>
+
diff --git a/docs/en/cowboy/2.2/guide/migrating_from_2.2/index.html b/docs/en/cowboy/2.2/guide/migrating_from_2.2/index.html
index 20c0b89c..bf42330c 100644
--- a/docs/en/cowboy/2.2/guide/migrating_from_2.2/index.html
+++ b/docs/en/cowboy/2.2/guide/migrating_from_2.2/index.html
@@ -62,48 +62,20 @@
<h1 class="lined-header"><span>Changes since Cowboy 2.2</span></h1>
-<div class="paragraph"><p>The following patch versions were released since Cowboy 2.2:</p></div>
-<div class="sect1">
+<p>The following patch versions were released since Cowboy 2.2:</p>
<h2 id="_cowboy_2_2_2">Cowboy 2.2.2</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-While fixing the miscount in the previous patch release an
- issue was introduced where HTTP/2 bodies could be sent out
- of orders when using iolists. This has been corrected.
-</p>
+<ul><li>While fixing the miscount in the previous patch release an issue was introduced where HTTP/2 bodies could be sent out of orders when using iolists. This has been corrected.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_cowboy_2_2_1">Cowboy 2.2.1</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-Colons are now allowed within path segments in routes provided
- to <code>cowboy_router:compile/1</code> as long as they are not the first
- character of the path segment.
-</p>
+<ul><li>Colons are now allowed within path segments in routes provided to <code>cowboy_router:compile/1</code> as long as they are not the first character of the path segment.
</li>
-<li>
-<p>
-The <code>cowboy_req:delete_resp_header/2</code> function will no longer
- crash when no response header was set before calling it.
-</p>
+<li>The <code>cowboy_req:delete_resp_header/2</code> function will no longer crash when no response header was set before calling it.
</li>
-<li>
-<p>
-A miscount of the output HTTP/2 flow control window has been
- fixed. It prevented sending the response body fully with some
- clients. The issue only affected response bodies sent as iolists.
-</p>
+<li>A miscount of the output HTTP/2 flow control window has been fixed. It prevented sending the response body fully with some clients. The issue only affected response bodies sent as iolists.
</li>
-</ul></div>
-</div>
-</div>
+</ul>
+
diff --git a/docs/en/cowboy/2.2/guide/modern_web/index.html b/docs/en/cowboy/2.2/guide/modern_web/index.html
index 6a48b79b..4cda7790 100644
--- a/docs/en/cowboy/2.2/guide/modern_web/index.html
+++ b/docs/en/cowboy/2.2/guide/modern_web/index.html
@@ -62,115 +62,38 @@
<h1 class="lined-header"><span>The modern Web</span></h1>
-<div class="paragraph"><p>Cowboy is a server for the modern Web. This chapter explains
-what it means and details all the standards involved.</p></div>
-<div class="paragraph"><p>Cowboy supports all the standards listed in this document.</p></div>
-<div class="sect1">
+<p>Cowboy is a server for the modern Web. This chapter explains what it means and details all the standards involved.</p>
+<p>Cowboy supports all the standards listed in this document.</p>
<h2 id="_http_2">HTTP/2</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>HTTP/2 is the most efficient protocol for consuming Web
-services. It enables clients to keep a connection open
-for long periods of time; to send requests concurrently;
-to reduce the size of requests through HTTP headers
-compression; and more. The protocol is binary, greatly
-reducing the resources needed to parse it.</p></div>
-<div class="paragraph"><p>HTTP/2 also enables the server to push messages to the
-client. This can be used for various purposes, including
-the sending of related resources before the client requests
-them, in an effort to reduce latency. This can also be used
-to enable bidirectional communication.</p></div>
-<div class="paragraph"><p>Cowboy provides transparent support for HTTP/2. Clients
-that know it can use it; others fall back to HTTP/1.1
-automatically.</p></div>
-<div class="paragraph"><p>HTTP/2 is compatible with the HTTP/1.1 semantics.</p></div>
-<div class="paragraph"><p>HTTP/2 is defined by RFC 7540 and RFC 7541.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>HTTP/2 is the most efficient protocol for consuming Web services. It enables clients to keep a connection open for long periods of time; to send requests concurrently; to reduce the size of requests through HTTP headers compression; and more. The protocol is binary, greatly reducing the resources needed to parse it.</p>
+<p>HTTP/2 also enables the server to push messages to the client. This can be used for various purposes, including the sending of related resources before the client requests them, in an effort to reduce latency. This can also be used to enable bidirectional communication.</p>
+<p>Cowboy provides transparent support for HTTP/2. Clients that know it can use it; others fall back to HTTP/1.1 automatically.</p>
+<p>HTTP/2 is compatible with the HTTP/1.1 semantics.</p>
+<p>HTTP/2 is defined by RFC 7540 and RFC 7541.</p>
<h2 id="_http_1_1">HTTP/1.1</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>HTTP/1.1 is the previous version of the HTTP protocol.
-The protocol itself is text-based and suffers from numerous
-issues and limitations. In particular it is not possible
-to execute requests concurrently (though pipelining is
-sometimes possible), and it&#8217;s also sometimes difficult
-to detect that a client disconnected.</p></div>
-<div class="paragraph"><p>HTTP/1.1 does provide very good semantics for interacting
-with Web services. It defines the standard methods, headers
-and status codes used by HTTP/1.1 and HTTP/2 clients and
-servers.</p></div>
-<div class="paragraph"><p>HTTP/1.1 also defines compatibility with an older version
-of the protocol, HTTP/1.0, which was never really standardized
-across implementations.</p></div>
-<div class="paragraph"><p>The core of HTTP/1.1 is defined by RFC 7230, RFC 7231,
-RFC 7232, RFC 7233, RFC 7234 and RFC 7235. Numerous RFCs
-and other specifications exist defining additional HTTP
-methods, status codes, headers or semantics.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>HTTP/1.1 is the previous version of the HTTP protocol. The protocol itself is text-based and suffers from numerous issues and limitations. In particular it is not possible to execute requests concurrently (though pipelining is sometimes possible), and it&apos;s also sometimes difficult to detect that a client disconnected.</p>
+<p>HTTP/1.1 does provide very good semantics for interacting with Web services. It defines the standard methods, headers and status codes used by HTTP/1.1 and HTTP/2 clients and servers.</p>
+<p>HTTP/1.1 also defines compatibility with an older version of the protocol, HTTP/1.0, which was never really standardized across implementations.</p>
+<p>The core of HTTP/1.1 is defined by RFC 7230, RFC 7231, RFC 7232, RFC 7233, RFC 7234 and RFC 7235. Numerous RFCs and other specifications exist defining additional HTTP methods, status codes, headers or semantics.</p>
<h2 id="_websocket">Websocket</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../ws_protocol">Websocket</a> is a protocol built on top of HTTP/1.1
-that provides a two-ways communication channel between the client and
-the server. Communication is asynchronous and can occur concurrently.</p></div>
-<div class="paragraph"><p>It consists of a Javascript object allowing setting up a
-Websocket connection to the server, and a binary based
-protocol for sending data to the server or the client.</p></div>
-<div class="paragraph"><p>Websocket connections can transfer either UTF-8 encoded text
-data or binary data. The protocol also includes support for
-implementing a ping/pong mechanism, allowing the server and
-the client to have more confidence that the connection is still
-alive.</p></div>
-<div class="paragraph"><p>A Websocket connection can be used to transfer any kind of data,
-small or big, text or binary. Because of this Websocket is
-sometimes used for communication between systems.</p></div>
-<div class="paragraph"><p>Websocket messages have no semantics on their own. Websocket
-is closer to TCP in that aspect, and requires you to design
-and implement your own protocol on top of it; or adapt an
-existing protocol to Websocket.</p></div>
-<div class="paragraph"><p>Cowboy provides an interface known as <a href="../ws_handlers">Websocket handlers</a>
-that gives complete control over a Websocket connection.</p></div>
-<div class="paragraph"><p>The Websocket protocol is defined by RFC 6455.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p><a href="../ws_protocol">Websocket</a> is a protocol built on top of HTTP/1.1 that provides a two-ways communication channel between the client and the server. Communication is asynchronous and can occur concurrently.</p>
+<p>It consists of a Javascript object allowing setting up a Websocket connection to the server, and a binary based protocol for sending data to the server or the client.</p>
+<p>Websocket connections can transfer either UTF-8 encoded text data or binary data. The protocol also includes support for implementing a ping/pong mechanism, allowing the server and the client to have more confidence that the connection is still alive.</p>
+<p>A Websocket connection can be used to transfer any kind of data, small or big, text or binary. Because of this Websocket is sometimes used for communication between systems.</p>
+<p>Websocket messages have no semantics on their own. Websocket is closer to TCP in that aspect, and requires you to design and implement your own protocol on top of it; or adapt an existing protocol to Websocket.</p>
+<p>Cowboy provides an interface known as <a href="../ws_handlers">Websocket handlers</a> that gives complete control over a Websocket connection.</p>
+<p>The Websocket protocol is defined by RFC 6455.</p>
<h2 id="_long_lived_requests">Long-lived requests</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy provides an interface that can be used to support
-long-polling or to stream large amounts of data reliably,
-including using Server-Sent Events.</p></div>
-<div class="paragraph"><p>Long-polling is a mechanism in which the client performs
-a request which may not be immediately answered by the
-server. It allows clients to request resources that may
-not currently exist, but are expected to be created soon,
-and which will be returned as soon as they are.</p></div>
-<div class="paragraph"><p>Long-polling is essentially a hack, but it is widely used
-to overcome limitations on older clients and servers.</p></div>
-<div class="paragraph"><p>Server-Sent Events is a small protocol defined as a media
-type, <code>text/event-stream</code>, along with a new HTTP header,
-<code>Last-Event-ID</code>. It is defined in the EventSource W3C
-specification.</p></div>
-<div class="paragraph"><p>Cowboy provides an interface known as <a href="../loop_handlers">loop handlers</a>
-that facilitates the implementation of long-polling or stream
-mechanisms. It works regardless of the underlying protocol.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Cowboy provides an interface that can be used to support long-polling or to stream large amounts of data reliably, including using Server-Sent Events.</p>
+<p>Long-polling is a mechanism in which the client performs a request which may not be immediately answered by the server. It allows clients to request resources that may not currently exist, but are expected to be created soon, and which will be returned as soon as they are.</p>
+<p>Long-polling is essentially a hack, but it is widely used to overcome limitations on older clients and servers.</p>
+<p>Server-Sent Events is a small protocol defined as a media type, <code>text/event-stream</code>, along with a new HTTP header, <code>Last-Event-ID</code>. It is defined in the EventSource W3C specification.</p>
+<p>Cowboy provides an interface known as <a href="../loop_handlers">loop handlers</a> that facilitates the implementation of long-polling or stream mechanisms. It works regardless of the underlying protocol.</p>
<h2 id="_rest">REST</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../rest_principles">REST, or REpresentational State Transfer</a>,
-is a style of architecture for loosely connected distributed
-systems. It can easily be implemented on top of HTTP.</p></div>
-<div class="paragraph"><p>REST is essentially a set of constraints to be followed.
-Many of these constraints are purely architectural and
-solved by simply using HTTP. Some constraints must be
-explicitly followed by the developer.</p></div>
-<div class="paragraph"><p>Cowboy provides an interface known as <a href="../rest_handlers">REST handlers</a>
-that simplifies the implementation of a REST API on top of
-the HTTP protocol.</p></div>
-</div>
-</div>
+<p><a href="../rest_principles">REST, or REpresentational State Transfer</a>, is a style of architecture for loosely connected distributed systems. It can easily be implemented on top of HTTP.</p>
+<p>REST is essentially a set of constraints to be followed. Many of these constraints are purely architectural and solved by simply using HTTP. Some constraints must be explicitly followed by the developer.</p>
+<p>Cowboy provides an interface known as <a href="../rest_handlers">REST handlers</a> that simplifies the implementation of a REST API on top of the HTTP protocol.</p>
+
diff --git a/docs/en/cowboy/2.2/guide/multipart/index.html b/docs/en/cowboy/2.2/guide/multipart/index.html
index f3097664..9e8494e2 100644
--- a/docs/en/cowboy/2.2/guide/multipart/index.html
+++ b/docs/en/cowboy/2.2/guide/multipart/index.html
@@ -62,169 +62,107 @@
<h1 class="lined-header"><span>Multipart requests</span></h1>
-<div class="paragraph"><p>Multipart originates from MIME, an Internet standard that
-extends the format of emails.</p></div>
-<div class="paragraph"><p>A multipart message is a list of parts. A part contains
-headers and a body. The body of the parts may be
-of any media type, and contain text or binary data.
-It is possible for parts to contain a multipart media
-type.</p></div>
-<div class="paragraph"><p>In the context of HTTP, multipart is most often used
-with the <code>multipart/form-data</code> media type. It is what
-browsers use to upload files through HTML forms.</p></div>
-<div class="paragraph"><p>The <code>multipart/byteranges</code> is also common. It is the
-media type used to send arbitrary bytes from a resource,
-enabling clients to resume downloads.</p></div>
-<div class="sect1">
+<p>Multipart originates from MIME, an Internet standard that extends the format of emails.</p>
+<p>A multipart message is a list of parts. A part contains headers and a body. The body of the parts may be of any media type, and contain text or binary data. It is possible for parts to contain a multipart media type.</p>
+<p>In the context of HTTP, multipart is most often used with the <code>multipart/form-data</code> media type. It is what browsers use to upload files through HTML forms.</p>
+<p>The <code>multipart/byteranges</code> is also common. It is the media type used to send arbitrary bytes from a resource, enabling clients to resume downloads.</p>
<h2 id="_form_data">Form-data</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>In the normal case, when a form is submitted, the
-browser will use the <code>application/x-www-form-urlencoded</code>
-content-type. This type is just a list of keys and
-values and is therefore not fit for uploading files.</p></div>
-<div class="paragraph"><p>That&#8217;s where the <code>multipart/form-data</code> content-type
-comes in. When the form is configured to use this
-content-type, the browser will create a multipart
-message where each part corresponds to a field on
-the form. For files, it also adds some metadata in
-the part headers, like the file name.</p></div>
-<div class="paragraph"><p>A form with a text input, a file input and a select
-choice box will result in a multipart message with
-three parts, one for each field.</p></div>
-<div class="paragraph"><p>The browser does its best to determine the media type
-of the files it sends this way, but you should not
-rely on it for determining the contents of the file.
-Proper investigation of the contents is recommended.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>In the normal case, when a form is submitted, the browser will use the <code>application/x-www-form-urlencoded</code> content-type. This type is just a list of keys and values and is therefore not fit for uploading files.</p>
+<p>That&apos;s where the <code>multipart/form-data</code> content-type comes in. When the form is configured to use this content-type, the browser will create a multipart message where each part corresponds to a field on the form. For files, it also adds some metadata in the part headers, like the file name.</p>
+<p>A form with a text input, a file input and a select choice box will result in a multipart message with three parts, one for each field.</p>
+<p>The browser does its best to determine the media type of the files it sends this way, but you should not rely on it for determining the contents of the file. Proper investigation of the contents is recommended.</p>
<h2 id="_checking_for_multipart_messages">Checking for multipart messages</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The content-type header indicates the presence of
-a multipart message:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The content-type header indicates the presence of a multipart message:</p>
+<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">&lt;&lt;</span><span style="color: #FF0000">"multipart"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"form-data"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">_</span>}
- <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:parse_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#990000">&lt;&lt;</font><font color="#FF0000">"multipart"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"form-data"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">_</font>}
+ <font color="#990000">=</font> <b><font color="#000000">cowboy_req:parse_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_reading_a_multipart_message">Reading a multipart message</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy provides two sets of functions for reading
-request bodies as multipart messages.</p></div>
-<div class="paragraph"><p>The <code>cowboy_req:read_part/1,2</code> functions return the
-next part&#8217;s headers, if any.</p></div>
-<div class="paragraph"><p>The <code>cowboy_req:read_part_body/1,2</code> functions return
-the current part&#8217;s body. For large bodies you may
-need to call the function multiple times.</p></div>
-<div class="paragraph"><p>To read a multipart message you need to iterate over
-all its parts:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Cowboy provides two sets of functions for reading request bodies as multipart messages.</p>
+<p>The <code>cowboy_req:read_part/1,2</code> functions return the next part&apos;s headers, if any.</p>
+<p>The <code>cowboy_req:read_part_body/1,2</code> functions return the current part&apos;s body. For large bodies you may need to call the function multiple times.</p>
+<p>To read a multipart message you need to iterate over all its parts:</p>
+<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">multipart</span></span>(<span style="color: #009900">Req0</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">cowboy_req:read_part</span></span>(<span style="color: #009900">Req0</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">_Headers</span>, <span style="color: #009900">Req1</span>} <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">_Body</span>, <span style="color: #009900">Req</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="font-weight: bold"><span style="color: #000000">multipart</span></span>(<span style="color: #009900">Req</span>);
- {<span style="color: #FF6600">done</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">-&gt;</span>
- <span style="color: #009900">Req</span>
- <span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>When part bodies are too large, Cowboy will return
-a <code>more</code> tuple, and allow you to loop until the part
-body has been fully read.</p></div>
-<div class="paragraph"><p>The function <code>cow_multipart:form_data/1</code> can be used
-to quickly obtain information about a part from a
-<code>multipart/form-data</code> message. The function returns
-a <code>data</code> or a <code>file</code> tuple depending on whether this
-is a normal field or a file being uploaded.</p></div>
-<div class="paragraph"><p>The following snippet will use this function and
-use different strategies depending on whether the
-part is a file:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">multipart</font></b>(<font color="#009900">Req0</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">case</font></b> <b><font color="#000000">cowboy_req:read_part</font></b>(<font color="#009900">Req0</font>) <b><font color="#0000FF">of</font></b>
+ {<font color="#FF6600">ok</font>, <font color="#009900">_Headers</font>, <font color="#009900">Req1</font>} <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <font color="#009900">_Body</font>, <font color="#009900">Req</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:read_part_body</font></b>(<font color="#009900">Req1</font>),
+ <b><font color="#000000">multipart</font></b>(<font color="#009900">Req</font>);
+ {<font color="#FF6600">done</font>, <font color="#009900">Req</font>} <font color="#990000">-&gt;</font>
+ <font color="#009900">Req</font>
+ <b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>When part bodies are too large, Cowboy will return a <code>more</code> tuple, and allow you to loop until the part body has been fully read.</p>
+<p>The function <code>cow_multipart:form_data/1</code> can be used to quickly obtain information about a part from a <code>multipart/form-data</code> message. The function returns a <code>data</code> or a <code>file</code> tuple depending on whether this is a normal field or a file being uploaded.</p>
+<p>The following snippet will use this function and use different strategies depending on whether the part is a file:</p>
+<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">multipart</span></span>(<span style="color: #009900">Req0</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">cowboy_req:read_part</span></span>(<span style="color: #009900">Req0</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Headers</span>, <span style="color: #009900">Req1</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: #0000FF">case</span></span> <span style="font-weight: bold"><span style="color: #000000">cow_multipart:form_data</span></span>(<span style="color: #009900">Headers</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
- {<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: #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>);
- {<span style="color: #FF6600">done</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">-&gt;</span>
- <span style="color: #009900">Req</span>
- <span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span>
-
-<span style="font-weight: bold"><span style="color: #000000">stream_file</span></span>(<span style="color: #009900">Req0</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">cowboy_req:read_part_body</span></span>(<span style="color: #009900">Req0</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">_LastBodyChunk</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">-&gt;</span>
- <span style="color: #009900">Req</span>;
- {<span style="color: #FF6600">more</span>, <span style="color: #009900">_BodyChunk</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #000000">stream_file</span></span>(<span style="color: #009900">Req</span>)
- <span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Both the part header and body reading functions can take
-options that will be given to the request body reading
-functions. By default, <code>cowboy_req:read_part/1</code> reads
-up to 64KB for up to 5 seconds. <code>cowboy_req:read_part_body/1</code>
-has the same defaults as <code>cowboy_req:read_body/1</code>.</p></div>
-<div class="paragraph"><p>To change the defaults for part headers:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">multipart</font></b>(<font color="#009900">Req0</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">case</font></b> <b><font color="#000000">cowboy_req:read_part</font></b>(<font color="#009900">Req0</font>) <b><font color="#0000FF">of</font></b>
+ {<font color="#FF6600">ok</font>, <font color="#009900">Headers</font>, <font color="#009900">Req1</font>} <font color="#990000">-&gt;</font>
+ <font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#0000FF">case</font></b> <b><font color="#000000">cow_multipart:form_data</font></b>(<font color="#009900">Headers</font>) <b><font color="#0000FF">of</font></b>
+ {<font color="#FF6600">data</font>, <font color="#009900">_FieldName</font>} <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <font color="#009900">_Body</font>, <font color="#009900">Req2</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:read_part_body</font></b>(<font color="#009900">Req1</font>),
+ <font color="#009900">Req2</font>;
+ {<font color="#FF6600">file</font>, <font color="#009900">_FieldName</font>, <font color="#009900">_Filename</font>, <font color="#009900">_CType</font>} <font color="#990000">-&gt;</font>
+ <b><font color="#000000">stream_file</font></b>(<font color="#009900">Req1</font>)
+ <b><font color="#0000FF">end</font></b>,
+ <b><font color="#000000">multipart</font></b>(<font color="#009900">Req</font>);
+ {<font color="#FF6600">done</font>, <font color="#009900">Req</font>} <font color="#990000">-&gt;</font>
+ <font color="#009900">Req</font>
+ <b><font color="#0000FF">end</font></b><font color="#990000">.</font>
+
+<b><font color="#000000">stream_file</font></b>(<font color="#009900">Req0</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">case</font></b> <b><font color="#000000">cowboy_req:read_part_body</font></b>(<font color="#009900">Req0</font>) <b><font color="#0000FF">of</font></b>
+ {<font color="#FF6600">ok</font>, <font color="#009900">_LastBodyChunk</font>, <font color="#009900">Req</font>} <font color="#990000">-&gt;</font>
+ <font color="#009900">Req</font>;
+ {<font color="#FF6600">more</font>, <font color="#009900">_BodyChunk</font>, <font color="#009900">Req</font>} <font color="#990000">-&gt;</font>
+ <b><font color="#000000">stream_file</font></b>(<font color="#009900">Req</font>)
+ <b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Both the part header and body reading functions can take options that will be given to the request body reading functions. By default, <code>cowboy_req:read_part/1</code> reads up to 64KB for up to 5 seconds. <code>cowboy_req:read_part_body/1</code> has the same defaults as <code>cowboy_req:read_body/1</code>.</p>
+<p>To change the defaults for part headers:</p>
+<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">cowboy_req:read_part</span></span>(<span style="color: #009900">Req</span>, #{<span style="font-weight: bold"><span style="color: #000080">length</span></span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">128000</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>And for part bodies:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">cowboy_req:read_part</font></b>(<font color="#009900">Req</font>, #{<b><font color="#000080">length</font></b> <font color="#990000">=&gt;</font> <font color="#993399">128000</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>And for part bodies:</p>
+<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">cowboy_req:read_part_body</span></span>(<span style="color: #009900">Req</span>, #{<span style="font-weight: bold"><span style="color: #000080">length</span></span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">1000000</span>, <span style="color: #0000FF">period</span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">7000</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">cowboy_req:read_part_body</font></b>(<font color="#009900">Req</font>, #{<b><font color="#000080">length</font></b> <font color="#990000">=&gt;</font> <font color="#993399">1000000</font>, <font color="#0000FF">period</font> <font color="#990000">=&gt;</font> <font color="#993399">7000</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_skipping_unwanted_parts">Skipping unwanted parts</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Part bodies do not have to be read. Cowboy will automatically
-skip it when you request the next part&#8217;s body.</p></div>
-<div class="paragraph"><p>The following snippet reads all part headers and skips
-all bodies:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Part bodies do not have to be read. Cowboy will automatically skip it when you request the next part&apos;s body.</p>
+<p>The following snippet reads all part headers and skips all bodies:</p>
+<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">multipart</span></span>(<span style="color: #009900">Req0</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">cowboy_req:read_part</span></span>(<span style="color: #009900">Req0</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">_Headers</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #000000">multipart</span></span>(<span style="color: #009900">Req</span>);
- {<span style="color: #FF6600">done</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">-&gt;</span>
- <span style="color: #009900">Req</span>
- <span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Similarly, if you start reading the body and it ends up
-being too big, you can simply continue with the next part.
-Cowboy will automatically skip what remains.</p></div>
-<div class="paragraph"><p>While Cowboy can skip part bodies automatically, the read
-rate is not configurable. Depending on your application
-you may want to skip manually, in particular if you observe
-poor performance while skipping.</p></div>
-<div class="paragraph"><p>You do not have to read all parts either. You can stop
-reading as soon as you find the data you need.</p></div>
-</div>
-</div>
+<pre><tt><b><font color="#000000">multipart</font></b>(<font color="#009900">Req0</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">case</font></b> <b><font color="#000000">cowboy_req:read_part</font></b>(<font color="#009900">Req0</font>) <b><font color="#0000FF">of</font></b>
+ {<font color="#FF6600">ok</font>, <font color="#009900">_Headers</font>, <font color="#009900">Req</font>} <font color="#990000">-&gt;</font>
+ <b><font color="#000000">multipart</font></b>(<font color="#009900">Req</font>);
+ {<font color="#FF6600">done</font>, <font color="#009900">Req</font>} <font color="#990000">-&gt;</font>
+ <font color="#009900">Req</font>
+ <b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Similarly, if you start reading the body and it ends up being too big, you can simply continue with the next part. Cowboy will automatically skip what remains.</p>
+<p>While Cowboy can skip part bodies automatically, the read rate is not configurable. Depending on your application you may want to skip manually, in particular if you observe poor performance while skipping.</p>
+<p>You do not have to read all parts either. You can stop reading as soon as you find the data you need.</p>
+<!-- @todo Cover the building of multipart messages.-->
+
diff --git a/docs/en/cowboy/2.2/guide/req/index.html b/docs/en/cowboy/2.2/guide/req/index.html
index d8025446..97e2a55d 100644
--- a/docs/en/cowboy/2.2/guide/req/index.html
+++ b/docs/en/cowboy/2.2/guide/req/index.html
@@ -62,407 +62,283 @@
<h1 class="lined-header"><span>The Req object</span></h1>
-<div class="paragraph"><p>The Req object is a variable used for obtaining information
-about a request, read its body or send a response.</p></div>
-<div class="paragraph"><p>It is not really an object in the object-oriented sense.
-It is a simple map that can be directly accessed or
-used when calling functions from the <code>cowboy_req</code> module.</p></div>
-<div class="paragraph"><p>The Req object is the subject of a few different chapters.
-In this chapter we will learn about the Req object and
-look at how to retrieve information about the request.</p></div>
-<div class="sect1">
+<p>The Req object is a variable used for obtaining information about a request, read its body or send a response.</p>
+<p>It is not really an object in the object-oriented sense. It is a simple map that can be directly accessed or used when calling functions from the <code>cowboy_req</code> module.</p>
+<p>The Req object is the subject of a few different chapters. In this chapter we will learn about the Req object and look at how to retrieve information about the request.</p>
<h2 id="_direct_access">Direct access</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The Req map contains a number of fields which are documented
-and can be accessed directly. They are the fields that have
-a direct mapping to HTTP: the request <code>method</code>; the HTTP
-<code>version</code> used; the effective URI components <code>scheme</code>,
-<code>host</code>, <code>port</code>, <code>path</code> and <code>qs</code>; the request <code>headers</code>;
-and the connection <code>peer</code> address and port.</p></div>
-<div class="paragraph"><p>Note that the <code>version</code> field can be used to determine
-whether a connection is using HTTP/2.</p></div>
-<div class="paragraph"><p>To access a field, you can simply match in the function
-head. The following example sends a simple "Hello world!"
-response when the <code>method</code> is GET, and a 405 error
-otherwise.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The Req map contains a number of fields which are documented and can be accessed directly. They are the fields that have a direct mapping to HTTP: the request <code>method</code>; the HTTP <code>version</code> used; the effective URI components <code>scheme</code>, <code>host</code>, <code>port</code>, <code>path</code> and <code>qs</code>; the request <code>headers</code>; and the connection <code>peer</code> address and port.</p>
+<p>Note that the <code>version</code> field can be used to determine whether a connection is using HTTP/2.</p>
+<p>To access a field, you can simply match in the function head. The following example sends a simple &quot;Hello world!&quot; response when the <code>method</code> is GET, and a 405 error otherwise.</p>
+<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">init</span></span>(<span style="color: #009900">Req0</span><span style="color: #990000">=</span>#{<span style="color: #FF6600">method</span> <span style="color: #990000">:=</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"GET"</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">200</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/plain"</span><span style="color: #990000">&gt;&gt;</span>
- }, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Hello world!"</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">Req0</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">405</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"allow"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"GET"</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="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Any other field is internal and should not be accessed.
-They may change in future releases, including maintenance
-releases, without notice.</p></div>
-<div class="paragraph"><p>Modifying the Req object, while allowed, is not recommended
-unless strictly necessary. If adding new fields, make sure
-to namespace the field names so that no conflict can occur
-with future Cowboy updates or third party projects.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req0</font><font color="#990000">=</font>#{<font color="#FF6600">method</font> <font color="#990000">:=</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"GET"</font><font color="#990000">&gt;&gt;</font>}, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ <font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:reply</font></b>(<font color="#993399">200</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/plain"</font><font color="#990000">&gt;&gt;</font>
+ }, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"Hello world!"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req0</font>),
+ {<font color="#FF6600">ok</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>};
+<b><font color="#000000">init</font></b>(<font color="#009900">Req0</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ <font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:reply</font></b>(<font color="#993399">405</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"allow"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"GET"</font><font color="#990000">&gt;&gt;</font>
+ }, <font color="#009900">Req0</font>),
+ {<font color="#FF6600">ok</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Any other field is internal and should not be accessed. They may change in future releases, including maintenance releases, without notice.</p>
+<p>Modifying the Req object, while allowed, is not recommended unless strictly necessary. If adding new fields, make sure to namespace the field names so that no conflict can occur with future Cowboy updates or third party projects.</p>
+<!-- @todo There are currently no tests for direct access.-->
<h2 id="_introduction_to_the_cowboy_req_interface">Introduction to the cowboy_req interface</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Functions in the <code>cowboy_req</code> module provide access to
-the request information but also various operations that
-are common when dealing with HTTP requests.</p></div>
-<div class="paragraph"><p>All the functions that begin with a verb indicate an action.
-Other functions simply return the corresponding value
-(sometimes that value does need to be built, but the
-cost of the operation is equivalent to retrieving a value).</p></div>
-<div class="paragraph"><p>Some of the <code>cowboy_req</code> functions return an updated Req
-object. They are the read, reply, set and delete functions.
-While ignoring the returned Req will not cause incorrect
-behavior for some of them, it is highly recommended to
-always keep and use the last returned Req object. The
-manual for <code>cowboy_req</code> details these functions and what
-modifications are done to the Req object.</p></div>
-<div class="paragraph"><p>Some of the calls to <code>cowboy_req</code> have side effects. This
-is the case of the read and reply functions. Cowboy reads
-the request body or replies immediately when the function
-is called.</p></div>
-<div class="paragraph"><p>All functions will crash if something goes wrong. There
-is usually no need to catch these errors, Cowboy will
-send the appropriate 4xx or 5xx response depending on
-where the crash occurred.</p></div>
-</div>
-</div>
-<div class="sect1">
+<!-- @todo Link to cowboy_req manual-->
+<p>Functions in the <code>cowboy_req</code> module provide access to the request information but also various operations that are common when dealing with HTTP requests.</p>
+<p>All the functions that begin with a verb indicate an action. Other functions simply return the corresponding value (sometimes that value does need to be built, but the cost of the operation is equivalent to retrieving a value).</p>
+<p>Some of the <code>cowboy_req</code> functions return an updated Req object. They are the read, reply, set and delete functions. While ignoring the returned Req will not cause incorrect behavior for some of them, it is highly recommended to always keep and use the last returned Req object. The manual for <code>cowboy_req</code> details these functions and what modifications are done to the Req object.</p>
+<p>Some of the calls to <code>cowboy_req</code> have side effects. This is the case of the read and reply functions. Cowboy reads the request body or replies immediately when the function is called.</p>
+<p>All functions will crash if something goes wrong. There is usually no need to catch these errors, Cowboy will send the appropriate 4xx or 5xx response depending on where the crash occurred.</p>
<h2 id="_request_method">Request method</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The request method can be retrieved directly:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The request method can be retrieved directly:</p>
+<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 class="paragraph"><p>Or using a function:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>#{<font color="#FF6600">method</font> <font color="#990000">:=</font> <font color="#009900">Method</font>} <font color="#990000">=</font> <font color="#009900">Req</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Or using a function:</p>
+<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">Method</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="paragraph"><p>The method is a case sensitive binary string. Standard
-methods include GET, HEAD, OPTIONS, PATCH, POST, PUT
-or DELETE.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Method</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:method</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>The method is a case sensitive binary string. Standard methods include GET, HEAD, OPTIONS, PATCH, POST, PUT or DELETE.</p>
<h2 id="_http_version">HTTP version</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The HTTP version is informational. It does not indicate that
-the client implements the protocol well or fully.</p></div>
-<div class="paragraph"><p>There is typically no need to change behavior based on the
-HTTP version: Cowboy already does it for you.</p></div>
-<div class="paragraph"><p>It can be useful in some cases, though. For example, one may
-want to redirect HTTP/1.1 clients to use Websocket, while HTTP/2
-clients keep using HTTP/2.</p></div>
-<div class="paragraph"><p>The HTTP version can be retrieved directly:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The HTTP version is informational. It does not indicate that the client implements the protocol well or fully.</p>
+<p>There is typically no need to change behavior based on the HTTP version: Cowboy already does it for you.</p>
+<p>It can be useful in some cases, though. For example, one may want to redirect HTTP/1.1 clients to use Websocket, while HTTP/2 clients keep using HTTP/2.</p>
+<p>The HTTP version can be retrieved directly:</p>
+<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 class="paragraph"><p>Or using a function:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>#{<font color="#FF6600">version</font> <font color="#990000">:=</font> <font color="#009900">Version</font>} <font color="#990000">=</font> <font color="#009900">Req</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Or using a function:</p>
+<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">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 class="paragraph"><p>Cowboy defines the <code>'HTTP/1.0'</code>, <code>'HTTP/1.1'</code> and <code>'HTTP/2'</code>
-versions. Custom protocols can define their own values as
-atoms.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Version</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:version</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Cowboy defines the <code>&apos;HTTP/1.0&apos;</code>, <code>&apos;HTTP/1.1&apos;</code> and <code>&apos;HTTP/2&apos;</code> versions. Custom protocols can define their own values as atoms.</p>
<h2 id="_effective_request_uri">Effective request URI</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The scheme, host, port, path and query string components
-of the effective request URI can all be retrieved directly:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The scheme, host, port, path and query string components of the effective request URI can all be retrieved directly:</p>
+<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: #FF6600">host</span> <span style="color: #990000">:=</span> <span style="color: #009900">Host</span>,
- <span style="color: #FF6600">port</span> <span style="color: #990000">:=</span> <span style="color: #009900">Port</span>,
- <span style="color: #FF6600">path</span> <span style="color: #990000">:=</span> <span style="color: #009900">Path</span>,
- <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 class="paragraph"><p>Or using the related functions:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+ <font color="#FF6600">scheme</font> <font color="#990000">:=</font> <font color="#009900">Scheme</font>,
+ <font color="#FF6600">host</font> <font color="#990000">:=</font> <font color="#009900">Host</font>,
+ <font color="#FF6600">port</font> <font color="#990000">:=</font> <font color="#009900">Port</font>,
+ <font color="#FF6600">path</font> <font color="#990000">:=</font> <font color="#009900">Path</font>,
+ <font color="#FF6600">qs</font> <font color="#990000">:=</font> <font color="#009900">Qs</font>
+} <font color="#990000">=</font> <font color="#009900">Req</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Or using the related functions:</p>
+<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">Scheme</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:scheme</span></span>(<span style="color: #009900">Req</span>),
-<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: #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: #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>
-<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 class="paragraph"><p>The scheme and host are lowercased case insensitive binary
-strings. The port is an integer representing the port number.
-The path and query string are case sensitive binary strings.</p></div>
-<div class="paragraph"><p>Cowboy defines only the <code>&lt;&lt;"http"&gt;&gt;</code> and <code>&lt;&lt;"https"&gt;&gt;</code> schemes.
-They are chosen so that the scheme will only be <code>&lt;&lt;"https"&gt;&gt;</code>
-for requests on secure HTTP/1.1 or HTTP/2 connections.</p></div>
-<div class="paragraph"><p>The effective request URI itself can be reconstructed with
-the <code>cowboy_req:uri/1,2</code> function. By default, an absolute
-URI is returned:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Scheme</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:scheme</font></b>(<font color="#009900">Req</font>),
+<font color="#009900">Host</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:host</font></b>(<font color="#009900">Req</font>),
+<font color="#009900">Port</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:port</font></b>(<font color="#009900">Req</font>),
+<font color="#009900">Path</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:path</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font>
+<font color="#009900">Qs</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:qs</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>The scheme and host are lowercased case insensitive binary strings. The port is an integer representing the port number. The path and query string are case sensitive binary strings.</p>
+<p>Cowboy defines only the <code>&lt;&lt;&quot;http&quot;&gt;&gt;</code> and <code>&lt;&lt;&quot;https&quot;&gt;&gt;</code> schemes. They are chosen so that the scheme will only be <code>&lt;&lt;&quot;https&quot;&gt;&gt;</code> for requests on secure HTTP/1.1 or HTTP/2 connections.</p>
+<!-- @todo Is that tested well?-->
+<p>The effective request URI itself can be reconstructed with the <code>cowboy_req:uri/1,2</code> function. By default, an absolute URI is returned:</p>
+<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-style: italic"><span style="color: #9A1900">%% </span></span><span style="text-decoration: underline"><span style="color: #0000FF">scheme://host</span></span><span style="font-style: italic"><span style="color: #9A1900">[:port]/path[?qs]</span></span>
-<span style="color: #009900">URI</span> <span style="color: #990000">=</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 class="paragraph"><p>Options are available to either disable or replace some
-or all of the components. Various URIs or URI formats can
-be generated this way, including the origin form:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><i><font color="#9A1900">%% </font></i><u><font color="#0000FF">scheme://host</font></u><i><font color="#9A1900">[:port]/path[?qs]</font></i>
+<font color="#009900">URI</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:uri</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Options are available to either disable or replace some or all of the components. Various URIs or URI formats can be generated this way, including the origin form:</p>
+<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-style: italic"><span style="color: #9A1900">%% /path[?qs]</span></span>
-<span style="color: #009900">URI</span> <span style="color: #990000">=</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="paragraph"><p>The protocol relative form:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><i><font color="#9A1900">%% /path[?qs]</font></i>
+<font color="#009900">URI</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:uri</font></b>(<font color="#009900">Req</font>, #{<font color="#0000FF">host</font> <font color="#990000">=&gt;</font> <font color="#000080">undefined</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>The protocol relative form:</p>
+<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-style: italic"><span style="color: #9A1900">%% //host[:port]/path[?qs]</span></span>
-<span style="color: #009900">URI</span> <span style="color: #990000">=</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="paragraph"><p>The absolute URI without a query string:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><i><font color="#9A1900">%% //host[:port]/path[?qs]</font></i>
+<font color="#009900">URI</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:uri</font></b>(<font color="#009900">Req</font>, #{<font color="#0000FF">scheme</font> <font color="#990000">=&gt;</font> <font color="#000080">undefined</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>The absolute URI without a query string:</p>
+<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">URI</span> <span style="color: #990000">=</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">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="paragraph"><p>A different host:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">URI</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:uri</font></b>(<font color="#009900">Req</font>, #{<font color="#0000FF">qs</font> <font color="#990000">=&gt;</font> <font color="#000080">undefined</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>A different host:</p>
+<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">URI</span> <span style="color: #990000">=</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: #990000">&lt;&lt;</span><span style="color: #FF0000">"example.org"</span><span style="color: #990000">&gt;&gt;</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>And any other combination.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">URI</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:uri</font></b>(<font color="#009900">Req</font>, #{<font color="#0000FF">host</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"example.org"</font><font color="#990000">&gt;&gt;</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>And any other combination.</p>
<h2 id="_bindings">Bindings</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Bindings are the host and path components that you chose
-to extract when defining the routes of your application.
-They are only available after the routing.</p></div>
-<div class="paragraph"><p>Cowboy provides functions to retrieve one or all bindings.</p></div>
-<div class="paragraph"><p>To retrieve a single value:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Bindings are the host and path components that you chose to extract when defining the routes of your application. They are only available after the routing.</p>
+<p>Cowboy provides functions to retrieve one or all bindings.</p>
+<p>To retrieve a single value:</p>
+<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">Value</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:binding</span></span>(<span style="color: #FF6600">userid</span>, <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>When attempting to retrieve a value that was not bound,
-<code>undefined</code> will be returned. A different default value
-can be provided:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Value</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:binding</font></b>(<font color="#FF6600">userid</font>, <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>When attempting to retrieve a value that was not bound, <code>undefined</code> will be returned. A different default value can be provided:</p>
+<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">Value</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:binding</span></span>(<span style="color: #FF6600">userid</span>, <span style="color: #009900">Req</span>, <span style="color: #993399">42</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>To retrieve everything that was bound:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Value</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:binding</font></b>(<font color="#FF6600">userid</font>, <font color="#009900">Req</font>, <font color="#993399">42</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>To retrieve everything that was bound:</p>
+<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">Bindings</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:bindings</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>They are returned as a map, with keys being atoms.</p></div>
-<div class="paragraph"><p>The Cowboy router also allows you to capture many host
-or path segments at once using the <code>...</code> qualifier.</p></div>
-<div class="paragraph"><p>To retrieve the segments captured from the host name:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Bindings</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:bindings</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>They are returned as a map, with keys being atoms.</p>
+<p>The Cowboy router also allows you to capture many host or path segments at once using the <code>...</code> qualifier.</p>
+<p>To retrieve the segments captured from the host name:</p>
+<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">HostInfo</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:host_info</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>And the path segments:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">HostInfo</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:host_info</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>And the path segments:</p>
+<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">PathInfo</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:path_info</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Cowboy will return <code>undefined</code> if <code>...</code> was not used
-in the route.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">PathInfo</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:path_info</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Cowboy will return <code>undefined</code> if <code>...</code> was not used in the route.</p>
<h2 id="_query_parameters">Query parameters</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy provides two functions to access query parameters.
-You can use the first to get the entire list of parameters.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Cowboy provides two functions to access query parameters. You can use the first to get the entire list of parameters.</p>
+<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">QsVals</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:parse_qs</span></span>(<span style="color: #009900">Req</span>),
-{<span style="color: #990000">_</span>, <span style="color: #009900">Lang</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">lists:keyfind</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"lang"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #993399">1</span>, <span style="color: #009900">QsVals</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Cowboy will only parse the query string, and not do any
-transformation. This function may therefore return duplicates,
-or parameter names without an associated value. The order of
-the list returned is undefined.</p></div>
-<div class="paragraph"><p>When a query string is <code>key=1&amp;key=2</code>, the list returned will
-contain two parameters of name <code>key</code>.</p></div>
-<div class="paragraph"><p>The same is true when trying to use the PHP-style suffix <code>[]</code>.
-When a query string is <code>key[]=1&amp;key[]=2</code>, the list returned will
-contain two parameters of name <code>key[]</code>.</p></div>
-<div class="paragraph"><p>When a query string is simply <code>key</code>, Cowboy will return the
-list <code>[{&lt;&lt;"key"&gt;&gt;, true}]</code>, using <code>true</code> to indicate that the
-parameter <code>key</code> was defined, but with no value.</p></div>
-<div class="paragraph"><p>The second function Cowboy provides allows you to match out
-only the parameters you are interested in, and at the same
-time do any post processing you require using <a href="../constraints">constraints</a>.
-This function returns a map.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">QsVals</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:parse_qs</font></b>(<font color="#009900">Req</font>),
+{<font color="#990000">_</font>, <font color="#009900">Lang</font>} <font color="#990000">=</font> <b><font color="#000000">lists:keyfind</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"lang"</font><font color="#990000">&gt;&gt;</font>, <font color="#993399">1</font>, <font color="#009900">QsVals</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Cowboy will only parse the query string, and not do any transformation. This function may therefore return duplicates, or parameter names without an associated value. The order of the list returned is undefined.</p>
+<p>When a query string is <code>key=1&amp;key=2</code>, the list returned will contain two parameters of name <code>key</code>.</p>
+<p>The same is true when trying to use the PHP-style suffix <code>[]</code>. When a query string is <code>key[]=1&amp;key[]=2</code>, the list returned will contain two parameters of name <code>key[]</code>.</p>
+<p>When a query string is simply <code>key</code>, Cowboy will return the list <code>[{&lt;&lt;&quot;key&quot;&gt;&gt;, true}]</code>, using <code>true</code> to indicate that the parameter <code>key</code> was defined, but with no value.</p>
+<p>The second function Cowboy provides allows you to match out only the parameters you are interested in, and at the same time do any post processing you require using <a href="../constraints">constraints</a>. This function returns a map.</p>
+<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">id</span> <span style="color: #990000">:=</span> <span style="color: #009900">ID</span>, <span style="color: #FF6600">lang</span> <span style="color: #990000">:=</span> <span style="color: #009900">Lang</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:match_qs</span></span>([<span style="color: #FF6600">id</span>, <span style="color: #FF6600">lang</span>], <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Constraints can be applied automatically. The following
-snippet will crash when the <code>id</code> parameter is not an integer,
-or when the <code>lang</code> parameter is empty. At the same time, the
-value for <code>id</code> will be converted to an integer term:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>#{<font color="#FF6600">id</font> <font color="#990000">:=</font> <font color="#009900">ID</font>, <font color="#FF6600">lang</font> <font color="#990000">:=</font> <font color="#009900">Lang</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:match_qs</font></b>([<font color="#FF6600">id</font>, <font color="#FF6600">lang</font>], <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Constraints can be applied automatically. The following snippet will crash when the <code>id</code> parameter is not an integer, or when the <code>lang</code> parameter is empty. At the same time, the value for <code>id</code> will be converted to an integer term:</p>
+<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">QsMap</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:match_qs</span></span>([{<span style="color: #FF6600">id</span>, <span style="color: #FF6600">int</span>}, {<span style="color: #FF6600">lang</span>, <span style="color: #FF6600">nonempty</span>}], <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>A default value may also be provided. The default will be used
-if the <code>lang</code> key is not found. It will not be used if
-the key is found but has an empty value.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">QsMap</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:match_qs</font></b>([{<font color="#FF6600">id</font>, <font color="#FF6600">int</font>}, {<font color="#FF6600">lang</font>, <font color="#FF6600">nonempty</font>}], <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>A default value may also be provided. The default will be used if the <code>lang</code> key is not found. It will not be used if the key is found but has an empty value.</p>
+<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">lang</span> <span style="color: #990000">:=</span> <span style="color: #009900">Lang</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:match_qs</span></span>([{<span style="color: #FF6600">lang</span>, [], <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"en-US"</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="paragraph"><p>If no default is provided and the value is missing, the
-query string is deemed invalid and the process will crash.</p></div>
-<div class="paragraph"><p>When the query string is <code>key=1&amp;key=2</code>, the value for <code>key</code>
-will be the list <code>[1, 2]</code>. Parameter names do not need to
-include the PHP-style suffix. Constraints may be used to
-ensure that only one value was passed through.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>#{<font color="#FF6600">lang</font> <font color="#990000">:=</font> <font color="#009900">Lang</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:match_qs</font></b>([{<font color="#FF6600">lang</font>, [], <font color="#990000">&lt;&lt;</font><font color="#FF0000">"en-US"</font><font color="#990000">&gt;&gt;</font>}], <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>If no default is provided and the value is missing, the query string is deemed invalid and the process will crash.</p>
+<p>When the query string is <code>key=1&amp;key=2</code>, the value for <code>key</code> will be the list <code>[1, 2]</code>. Parameter names do not need to include the PHP-style suffix. Constraints may be used to ensure that only one value was passed through.</p>
<h2 id="_headers">Headers</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Header values can be retrieved either as a binary string
-or parsed into a more meaningful representation.</p></div>
-<div class="paragraph"><p>The get the raw value:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Header values can be retrieved either as a binary string or parsed into a more meaningful representation.</p>
+<p>The get the raw value:</p>
+<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">HeaderVal</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-type"</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="paragraph"><p>Cowboy expects all header names to be provided as lowercase
-binary strings. This is true for both requests and responses,
-regardless of the underlying protocol.</p></div>
-<div class="paragraph"><p>When the header is missing from the request, <code>undefined</code>
-will be returned. A different default can be provided:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">HeaderVal</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Cowboy expects all header names to be provided as lowercase binary strings. This is true for both requests and responses, regardless of the underlying protocol.</p>
+<p>When the header is missing from the request, <code>undefined</code> will be returned. A different default can be provided:</p>
+<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">HeaderVal</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-type"</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">"text/plain"</span><span style="color: #990000">&gt;&gt;</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>All headers can be retrieved at once, either directly:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">HeaderVal</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/plain"</font><font color="#990000">&gt;&gt;</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>All headers can be retrieved at once, either directly:</p>
+<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">AllHeaders</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>Or using a function:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>#{<font color="#FF6600">headers</font> <font color="#990000">:=</font> <font color="#009900">AllHeaders</font>} <font color="#990000">=</font> <font color="#009900">Req</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Or using a function:</p>
+<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">AllHeaders</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 class="paragraph"><p>Cowboy provides equivalent functions to parse individual
-headers. There is no function to parse all headers at once.</p></div>
-<div class="paragraph"><p>To parse a specific header:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">AllHeaders</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:headers</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Cowboy provides equivalent functions to parse individual headers. There is no function to parse all headers at once.</p>
+<p>To parse a specific header:</p>
+<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">ParsedVal</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:parse_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</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="paragraph"><p>An exception will be thrown if it doesn&#8217;t know how to parse the
-given header, or if the value is invalid. The list of known headers
-and default values can be found in the manual.</p></div>
-<div class="paragraph"><p>When the header is missing, <code>undefined</code> is returned. You can
-change the default value. Note that it should be the parsed value
-directly:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">ParsedVal</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:parse_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>An exception will be thrown if it doesn&apos;t know how to parse the given header, or if the value is invalid. The list of known headers and default values can be found in the manual.</p>
+<p>When the header is missing, <code>undefined</code> is returned. You can change the default value. Note that it should be the parsed value directly:</p>
+<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">ParsedVal</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:parse_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</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">"text"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"plain"</span><span style="color: #990000">&gt;&gt;</span>, []})<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">ParsedVal</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:parse_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>,
+ {<font color="#990000">&lt;&lt;</font><font color="#FF0000">"text"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"plain"</font><font color="#990000">&gt;&gt;</font>, []})<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_peer">Peer</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The peer address and port number for the connection can be
-retrieved either directly or using a function.</p></div>
-<div class="paragraph"><p>To retrieve the peer directly:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The peer address and port number for the connection can be retrieved either directly or using a function.</p>
+<p>To retrieve the peer directly:</p>
+<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 class="paragraph"><p>And using a function:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>#{<font color="#FF6600">peer</font> <font color="#990000">:=</font> {<font color="#009900">IP</font>, <font color="#009900">Port</font>}} <font color="#990000">=</font> <font color="#009900">Req</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>And using a function:</p>
+<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">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 class="paragraph"><p>Note that the peer corresponds to the remote end of the
-connection to the server, which may or may not be the
-client itself. It may also be a proxy or a gateway.</p></div>
-</div>
-</div>
+<pre><tt>{<font color="#009900">IP</font>, <font color="#009900">Port</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:peer</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Note that the peer corresponds to the remote end of the connection to the server, which may or may not be the client itself. It may also be a proxy or a gateway.</p>
+
diff --git a/docs/en/cowboy/2.2/guide/req_body/index.html b/docs/en/cowboy/2.2/guide/req_body/index.html
index 5289d5ea..f1725a55 100644
--- a/docs/en/cowboy/2.2/guide/req_body/index.html
+++ b/docs/en/cowboy/2.2/guide/req_body/index.html
@@ -62,144 +62,93 @@
<h1 class="lined-header"><span>Reading the request body</span></h1>
-<div class="paragraph"><p>The request body can be read using the Req object.</p></div>
-<div class="paragraph"><p>Cowboy will not attempt to read the body until requested.
-You need to call the body reading functions in order to
-retrieve it.</p></div>
-<div class="paragraph"><p>Cowboy will not cache the body, it is therefore only
-possible to read it once.</p></div>
-<div class="paragraph"><p>You are not required to read it, however. If a body is
-present and was not read, Cowboy will either cancel or
-skip its download, depending on the protocol.</p></div>
-<div class="paragraph"><p>Cowboy provides functions for reading the body raw,
-and read and parse form urlencoded or <a href="../multipart">multipart bodies</a>.
-The latter is covered in its own chapter.</p></div>
-<div class="sect1">
+<p>The request body can be read using the Req object.</p>
+<p>Cowboy will not attempt to read the body until requested. You need to call the body reading functions in order to retrieve it.</p>
+<p>Cowboy will not cache the body, it is therefore only possible to read it once.</p>
+<p>You are not required to read it, however. If a body is present and was not read, Cowboy will either cancel or skip its download, depending on the protocol.</p>
+<p>Cowboy provides functions for reading the body raw, and read and parse form urlencoded or <a href="../multipart">multipart bodies</a>. The latter is covered in its own chapter.</p>
<h2 id="_request_body_presence">Request body presence</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Not all requests come with a body. You can check for
-the presence of a request body with this function:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Not all requests come with a body. You can check for the presence of a request body with this function:</p>
+<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">cowboy_req:has_body</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>It returns <code>true</code> if there is a body; <code>false</code> otherwise.</p></div>
-<div class="paragraph"><p>In practice, this function is rarely used. When the
-method is <code>POST</code>, <code>PUT</code> or <code>PATCH</code>, the request body
-is often required by the application, which should
-just attempt to read it directly.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">cowboy_req:has_body</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>It returns <code>true</code> if there is a body; <code>false</code> otherwise.</p>
+<p>In practice, this function is rarely used. When the method is <code>POST</code>, <code>PUT</code> or <code>PATCH</code>, the request body is often required by the application, which should just attempt to read it directly.</p>
<h2 id="_request_body_length">Request body length</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>You can obtain the length of the body:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>You can obtain the length of the body:</p>
+<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">Length</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:body_length</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Note that the length may not be known in advance. In
-that case <code>undefined</code> will be returned. This can happen
-with HTTP/1.1&#8217;s chunked transfer-encoding, or HTTP/2
-when no content-length was provided.</p></div>
-<div class="paragraph"><p>Cowboy will update the body length in the Req object
-once the body has been read completely. A length will
-always be returned when attempting to call this function
-after reading the body completely.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Length</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:body_length</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Note that the length may not be known in advance. In that case <code>undefined</code> will be returned. This can happen with HTTP/1.1&apos;s chunked transfer-encoding, or HTTP/2 when no content-length was provided.</p>
+<p>Cowboy will update the body length in the Req object once the body has been read completely. A length will always be returned when attempting to call this function after reading the body completely.</p>
<h2 id="_reading_the_body">Reading the body</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>You can read the entire body with one function call:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>You can read the entire body with one function call:</p>
+<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">ok</span>, <span style="color: #009900">Data</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:read_body</span></span>(<span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Cowboy returns an <code>ok</code> tuple when the body has been
-read fully.</p></div>
-<div class="paragraph"><p>By default, Cowboy will attempt to read up to 8MB
-of data, for up to 15 seconds. The call will return
-once Cowboy has read at least 8MB of data, or at
-the end of the 15 seconds period.</p></div>
-<div class="paragraph"><p>These values can be customized. For example, to read
-only up to 1MB for up to 5 seconds:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#009900">Data</font>, <font color="#009900">Req</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:read_body</font></b>(<font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Cowboy returns an <code>ok</code> tuple when the body has been read fully.</p>
+<p>By default, Cowboy will attempt to read up to 8MB of data, for up to 15 seconds. The call will return once Cowboy has read at least 8MB of data, or at the end of the 15 seconds period.</p>
+<p>These values can be customized. For example, to read only up to 1MB for up to 5 seconds:</p>
+<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">ok</span>, <span style="color: #009900">Data</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:read_body</span></span>(<span style="color: #009900">Req0</span>,
- #{<span style="font-weight: bold"><span style="color: #000080">length</span></span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">1000000</span>, <span style="color: #0000FF">period</span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">5000</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>You may also disable the length limit:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#009900">Data</font>, <font color="#009900">Req</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:read_body</font></b>(<font color="#009900">Req0</font>,
+ #{<b><font color="#000080">length</font></b> <font color="#990000">=&gt;</font> <font color="#993399">1000000</font>, <font color="#0000FF">period</font> <font color="#990000">=&gt;</font> <font color="#993399">5000</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>You may also disable the length limit:</p>
+<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">ok</span>, <span style="color: #009900">Data</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:read_body</span></span>(<span style="color: #009900">Req0</span>, #{<span style="font-weight: bold"><span style="color: #000080">length</span></span> <span style="color: #990000">=&gt;</span> <span style="color: #FF6600">infinity</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>This makes the function wait 15 seconds and return with
-whatever arrived during that period. This is not
-recommended for public facing applications.</p></div>
-<div class="paragraph"><p>These two options can effectively be used to control
-the rate of transmission of the request body.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#009900">Data</font>, <font color="#009900">Req</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:read_body</font></b>(<font color="#009900">Req0</font>, #{<b><font color="#000080">length</font></b> <font color="#990000">=&gt;</font> <font color="#FF6600">infinity</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>This makes the function wait 15 seconds and return with whatever arrived during that period. This is not recommended for public facing applications.</p>
+<p>These two options can effectively be used to control the rate of transmission of the request body.</p>
<h2 id="_streaming_the_body">Streaming the body</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>When the body is too large, the first call will return
-a <code>more</code> tuple instead of <code>ok</code>. You can call the
-function again to read more of the body, reading
-it one chunk at a time.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>When the body is too large, the first call will return a <code>more</code> tuple instead of <code>ok</code>. You can call the function again to read more of the body, reading it one chunk at a time.</p>
+<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_to_console</span></span>(<span style="color: #009900">Req0</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">cowboy_req:read_body</span></span>(<span style="color: #009900">Req0</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Data</span>, <span style="color: #009900">Req</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"</span>, [<span style="color: #009900">Data</span>]),
- <span style="color: #009900">Req</span>;
- {<span style="color: #FF6600">more</span>, <span style="color: #009900">Data</span>, <span style="color: #009900">Req</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"</span>, [<span style="color: #009900">Data</span>]),
- <span style="font-weight: bold"><span style="color: #000000">read_body_to_console</span></span>(<span style="color: #009900">Req</span>)
- <span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>The <code>length</code> and <code>period</code> options can also be used.
-They need to be passed for every call.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">read_body_to_console</font></b>(<font color="#009900">Req0</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">case</font></b> <b><font color="#000000">cowboy_req:read_body</font></b>(<font color="#009900">Req0</font>) <b><font color="#0000FF">of</font></b>
+ {<font color="#FF6600">ok</font>, <font color="#009900">Data</font>, <font color="#009900">Req</font>} <font color="#990000">-&gt;</font>
+ <b><font color="#000000">io:format</font></b>(<font color="#FF0000">"~s"</font>, [<font color="#009900">Data</font>]),
+ <font color="#009900">Req</font>;
+ {<font color="#FF6600">more</font>, <font color="#009900">Data</font>, <font color="#009900">Req</font>} <font color="#990000">-&gt;</font>
+ <b><font color="#000000">io:format</font></b>(<font color="#FF0000">"~s"</font>, [<font color="#009900">Data</font>]),
+ <b><font color="#000000">read_body_to_console</font></b>(<font color="#009900">Req</font>)
+ <b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>The <code>length</code> and <code>period</code> options can also be used. They need to be passed for every call.</p>
<h2 id="_reading_a_form_urlencoded_body">Reading a form urlencoded body</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy provides a convenient function for reading and
-parsing bodies sent as application/x-www-form-urlencoded.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Cowboy provides a convenient function for reading and parsing bodies sent as application/x-www-form-urlencoded.</p>
+<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">ok</span>, <span style="color: #009900">KeyValues</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:read_urlencoded_body</span></span>(<span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>This function returns a list of key/values, exactly like
-the function <code>cowboy_req:parse_qs/1</code>.</p></div>
-<div class="paragraph"><p>The defaults for this function are different. Cowboy will
-read for up to 64KB and up to 5 seconds. They can be modified:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#009900">KeyValues</font>, <font color="#009900">Req</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:read_urlencoded_body</font></b>(<font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>This function returns a list of key/values, exactly like the function <code>cowboy_req:parse_qs/1</code>.</p>
+<p>The defaults for this function are different. Cowboy will read for up to 64KB and up to 5 seconds. They can be modified:</p>
+<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">ok</span>, <span style="color: #009900">KeyValues</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:read_urlencoded_body</span></span>(<span style="color: #009900">Req0</span>,
- #{<span style="font-weight: bold"><span style="color: #000080">length</span></span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">4096</span>, <span style="color: #0000FF">period</span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">3000</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#009900">KeyValues</font>, <font color="#009900">Req</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:read_urlencoded_body</font></b>(<font color="#009900">Req0</font>,
+ #{<b><font color="#000080">length</font></b> <font color="#990000">=&gt;</font> <font color="#993399">4096</font>, <font color="#0000FF">period</font> <font color="#990000">=&gt;</font> <font color="#993399">3000</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+
diff --git a/docs/en/cowboy/2.2/guide/resource_design/index.html b/docs/en/cowboy/2.2/guide/resource_design/index.html
index 9914fd18..a2f559ed 100644
--- a/docs/en/cowboy/2.2/guide/resource_design/index.html
+++ b/docs/en/cowboy/2.2/guide/resource_design/index.html
@@ -62,213 +62,66 @@
<h1 class="lined-header"><span>Designing a resource handler</span></h1>
-<div class="paragraph"><p>This chapter aims to provide you with a list of questions
-you must answer in order to write a good resource handler.
-It is meant to be usable as a step by step guide.</p></div>
-<div class="sect1">
+<p>This chapter aims to provide you with a list of questions you must answer in order to write a good resource handler. It is meant to be usable as a step by step guide.</p>
<h2 id="_the_service">The service</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Can the service become unavailable, and when it does, can
-we detect it? For example, database connectivity problems
-may be detected early. We may also have planned outages
-of all or parts of the system. Implement the
-<code>service_available</code> callback.</p></div>
-<div class="paragraph"><p>What HTTP methods does the service implement? Do we need
-more than the standard OPTIONS, HEAD, GET, PUT, POST,
-PATCH and DELETE? Are we not using one of those at all?
-Implement the <code>known_methods</code> callback.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Can the service become unavailable, and when it does, can we detect it? For example, database connectivity problems may be detected early. We may also have planned outages of all or parts of the system. Implement the <code>service_available</code> callback.</p>
+<p>What HTTP methods does the service implement? Do we need more than the standard OPTIONS, HEAD, GET, PUT, POST, PATCH and DELETE? Are we not using one of those at all? Implement the <code>known_methods</code> callback.</p>
<h2 id="_type_of_resource_handler">Type of resource handler</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Am I writing a handler for a collection of resources,
-or for a single resource?</p></div>
-<div class="paragraph"><p>The semantics for each of these are quite different.
-You should not mix collection and single resource in
-the same handler.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Am I writing a handler for a collection of resources, or for a single resource?</p>
+<p>The semantics for each of these are quite different. You should not mix collection and single resource in the same handler.</p>
<h2 id="_collection_handler">Collection handler</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Skip this section if you are not doing a collection.</p></div>
-<div class="paragraph"><p>Is the collection hardcoded or dynamic? For example,
-if you use the route <code>/users</code> for the collection of
-users then the collection is hardcoded; if you use
-<code>/forums/:category</code> for the collection of threads
-then it isn&#8217;t. When the collection is hardcoded you
-can safely assume the resource always exists.</p></div>
-<div class="paragraph"><p>What methods should I implement?</p></div>
-<div class="paragraph"><p>OPTIONS is used to get some information about the
-collection. It is recommended to allow it even if you
-do not implement it, as Cowboy has a default
-implementation built-in.</p></div>
-<div class="paragraph"><p>HEAD and GET are used to retrieve the collection.
-If you allow GET, also allow HEAD as there&#8217;s no extra
-work required to make it work.</p></div>
-<div class="paragraph"><p>POST is used to create a new resource inside the
-collection. Creating a resource by using POST on
-the collection is useful when resources may be
-created before knowing their URI, usually because
-parts of it are generated dynamically. A common
-case is some kind of auto incremented integer
-identifier.</p></div>
-<div class="paragraph"><p>The next methods are more rarely allowed.</p></div>
-<div class="paragraph"><p>PUT is used to create a new collection (when
-the collection isn&#8217;t hardcoded), or replace
-the entire collection.</p></div>
-<div class="paragraph"><p>DELETE is used to delete the entire collection.</p></div>
-<div class="paragraph"><p>PATCH is used to modify the collection using
-instructions given in the request body. A PATCH
-operation is atomic. The PATCH operation may
-be used for such things as reordering; adding,
-modifying or deleting parts of the collection.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Skip this section if you are not doing a collection.</p>
+<p>Is the collection hardcoded or dynamic? For example, if you use the route <code>/users</code> for the collection of users then the collection is hardcoded; if you use <code>/forums/:category</code> for the collection of threads then it isn&apos;t. When the collection is hardcoded you can safely assume the resource always exists.</p>
+<p>What methods should I implement?</p>
+<p>OPTIONS is used to get some information about the collection. It is recommended to allow it even if you do not implement it, as Cowboy has a default implementation built-in.</p>
+<p>HEAD and GET are used to retrieve the collection. If you allow GET, also allow HEAD as there&apos;s no extra work required to make it work.</p>
+<p>POST is used to create a new resource inside the collection. Creating a resource by using POST on the collection is useful when resources may be created before knowing their URI, usually because parts of it are generated dynamically. A common case is some kind of auto incremented integer identifier.</p>
+<p>The next methods are more rarely allowed.</p>
+<p>PUT is used to create a new collection (when the collection isn&apos;t hardcoded), or replace the entire collection.</p>
+<p>DELETE is used to delete the entire collection.</p>
+<p>PATCH is used to modify the collection using instructions given in the request body. A PATCH operation is atomic. The PATCH operation may be used for such things as reordering; adding, modifying or deleting parts of the collection.</p>
<h2 id="_single_resource_handler">Single resource handler</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Skip this section if you are doing a collection.</p></div>
-<div class="paragraph"><p>What methods should I implement?</p></div>
-<div class="paragraph"><p>OPTIONS is used to get some information about the
-resource. It is recommended to allow it even if you
-do not implement it, as Cowboy has a default
-implementation built-in.</p></div>
-<div class="paragraph"><p>HEAD and GET are used to retrieve the resource.
-If you allow GET, also allow HEAD as there&#8217;s no extra
-work required to make it work.</p></div>
-<div class="paragraph"><p>POST is used to update the resource.</p></div>
-<div class="paragraph"><p>PUT is used to create a new resource (when it doesn&#8217;t
-already exist) or replace the resource.</p></div>
-<div class="paragraph"><p>DELETE is used to delete the resource.</p></div>
-<div class="paragraph"><p>PATCH is used to modify the resource using
-instructions given in the request body. A PATCH
-operation is atomic. The PATCH operation may
-be used for adding, removing or modifying specific
-values in the resource.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Skip this section if you are doing a collection.</p>
+<p>What methods should I implement?</p>
+<p>OPTIONS is used to get some information about the resource. It is recommended to allow it even if you do not implement it, as Cowboy has a default implementation built-in.</p>
+<p>HEAD and GET are used to retrieve the resource. If you allow GET, also allow HEAD as there&apos;s no extra work required to make it work.</p>
+<p>POST is used to update the resource.</p>
+<p>PUT is used to create a new resource (when it doesn&apos;t already exist) or replace the resource.</p>
+<p>DELETE is used to delete the resource.</p>
+<p>PATCH is used to modify the resource using instructions given in the request body. A PATCH operation is atomic. The PATCH operation may be used for adding, removing or modifying specific values in the resource.</p>
<h2 id="_the_resource">The resource</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Following the above discussion, implement the
-<code>allowed_methods</code> callback.</p></div>
-<div class="paragraph"><p>Does the resource always exist? If it may not, implement
-the <code>resource_exists</code> callback.</p></div>
-<div class="paragraph"><p>Do I need to authenticate the client before they can
-access the resource? What authentication mechanisms
-should I provide? This may include form-based, token-based
-(in the URL or a cookie), HTTP basic, HTTP digest,
-SSL certificate or any other form of authentication.
-Implement the <code>is_authorized</code> callback.</p></div>
-<div class="paragraph"><p>Do I need fine-grained access control? How do I determine
-that they are authorized access? Handle that in your
-<code>is_authorized</code> callback.</p></div>
-<div class="paragraph"><p>Can access to a resource be forbidden regardless of access
-being authorized? A simple example of that is censorship
-of a resource. Implement the <code>forbidden</code> callback.</p></div>
-<div class="paragraph"><p>Are there any constraints on the length of the resource URI?
-For example, the URI may be used as a key in storage and may
-have a limit in length. Implement <code>uri_too_long</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Following the above discussion, implement the <code>allowed_methods</code> callback.</p>
+<p>Does the resource always exist? If it may not, implement the <code>resource_exists</code> callback.</p>
+<p>Do I need to authenticate the client before they can access the resource? What authentication mechanisms should I provide? This may include form-based, token-based (in the URL or a cookie), HTTP basic, HTTP digest, SSL certificate or any other form of authentication. Implement the <code>is_authorized</code> callback.</p>
+<p>Do I need fine-grained access control? How do I determine that they are authorized access? Handle that in your <code>is_authorized</code> callback.</p>
+<p>Can access to a resource be forbidden regardless of access being authorized? A simple example of that is censorship of a resource. Implement the <code>forbidden</code> callback.</p>
+<p>Are there any constraints on the length of the resource URI? For example, the URI may be used as a key in storage and may have a limit in length. Implement <code>uri_too_long</code>.</p>
<h2 id="_representations">Representations</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>What media types do I provide? If text based, what charsets
-are provided? What languages do I provide?</p></div>
-<div class="paragraph"><p>Implement the mandatory <code>content_types_provided</code>. Prefix
-the callbacks with <code>to_</code> for clarity. For example, <code>to_html</code>
-or <code>to_text</code>.</p></div>
-<div class="paragraph"><p>Implement the <code>languages_provided</code> or <code>charsets_provided</code>
-callbacks if applicable.</p></div>
-<div class="paragraph"><p>Is there any other header that may make the representation
-of the resource vary? Implement the <code>variances</code> callback.</p></div>
-<div class="paragraph"><p>Depending on your choices for caching content, you may
-want to implement one or more of the <code>generate_etag</code>,
-<code>last_modified</code> and <code>expires</code> callbacks.</p></div>
-<div class="paragraph"><p>Do I want the user or user agent to actively choose a
-representation available? Send a list of available
-representations in the response body and implement
-the <code>multiple_choices</code> callback.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>What media types do I provide? If text based, what charsets are provided? What languages do I provide?</p>
+<p>Implement the mandatory <code>content_types_provided</code>. Prefix the callbacks with <code>to_</code> for clarity. For example, <code>to_html</code> or <code>to_text</code>.</p>
+<p>Implement the <code>languages_provided</code> or <code>charsets_provided</code> callbacks if applicable.</p>
+<p>Is there any other header that may make the representation of the resource vary? Implement the <code>variances</code> callback.</p>
+<p>Depending on your choices for caching content, you may want to implement one or more of the <code>generate_etag</code>, <code>last_modified</code> and <code>expires</code> callbacks.</p>
+<p>Do I want the user or user agent to actively choose a representation available? Send a list of available representations in the response body and implement the <code>multiple_choices</code> callback.</p>
<h2 id="_redirections">Redirections</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Do I need to keep track of what resources were deleted?
-For example, you may have a mechanism where moving a
-resource leaves a redirect link to its new location.
-Implement the <code>previously_existed</code> callback.</p></div>
-<div class="paragraph"><p>Was the resource moved, and is the move temporary? If
-it is explicitly temporary, for example due to maintenance,
-implement the <code>moved_temporarily</code> callback. Otherwise,
-implement the <code>moved_permanently</code> callback.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Do I need to keep track of what resources were deleted? For example, you may have a mechanism where moving a resource leaves a redirect link to its new location. Implement the <code>previously_existed</code> callback.</p>
+<p>Was the resource moved, and is the move temporary? If it is explicitly temporary, for example due to maintenance, implement the <code>moved_temporarily</code> callback. Otherwise, implement the <code>moved_permanently</code> callback.</p>
<h2 id="_the_request">The request</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Do you need to read the query string? Individual headers?
-Implement <code>malformed_request</code> and do all the parsing and
-validation in this function. Note that the body should not
-be read at this point.</p></div>
-<div class="paragraph"><p>May there be a request body? Will I know its size?
-What&#8217;s the maximum size of the request body I&#8217;m willing
-to accept? Implement <code>valid_entity_length</code>.</p></div>
-<div class="paragraph"><p>Finally, take a look at the sections corresponding to the
-methods you are implementing.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Do you need to read the query string? Individual headers? Implement <code>malformed_request</code> and do all the parsing and validation in this function. Note that the body should not be read at this point.</p>
+<p>May there be a request body? Will I know its size? What&apos;s the maximum size of the request body I&apos;m willing to accept? Implement <code>valid_entity_length</code>.</p>
+<p>Finally, take a look at the sections corresponding to the methods you are implementing.</p>
<h2 id="_options_method">OPTIONS method</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy by default will send back a list of allowed methods.
-Do I need to add more information to the response? Implement
-the <code>options</code> method.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Cowboy by default will send back a list of allowed methods. Do I need to add more information to the response? Implement the <code>options</code> method.</p>
<h2 id="_get_and_head_methods">GET and HEAD methods</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>If you implement the methods GET and/or HEAD, you must
-implement one <code>ProvideResource</code> callback for each
-content-type returned by the <code>content_types_provided</code>
-callback.</p></div>
-</div>
-</div>
-<div class="sect1">
-<h2 id="_put_post_and_patch_methods">PUT, POST and PATCH methods</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>If you implement the methods PUT, POST and/or PATCH,
-you must implement the <code>content_types_accepted</code> callback,
-and one <code>AcceptCallback</code> callback for each content-type
-it returns. Prefix the <code>AcceptCallback</code> callback names
-with <code>from_</code> for clarity. For example, <code>from_html</code> or
-<code>from_json</code>.</p></div>
-<div class="paragraph"><p>Do we want to allow the POST method to create individual
-resources directly through their URI (like PUT)? Implement
-the <code>allow_missing_post</code> callback. It is recommended to
-explicitly use PUT in these cases instead.</p></div>
-<div class="paragraph"><p>May there be conflicts when using PUT to create or replace
-a resource? Do we want to make sure that two updates around
-the same time are not cancelling one another? Implement the
-<code>is_conflict</code> callback.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>If you implement the methods GET and/or HEAD, you must implement one <code>ProvideResource</code> callback for each content-type returned by the <code>content_types_provided</code> callback.</p>
+<h2 id="_put__post_and_patch_methods">PUT, POST and PATCH methods</h2>
+<p>If you implement the methods PUT, POST and/or PATCH, you must implement the <code>content_types_accepted</code> callback, and one <code>AcceptCallback</code> callback for each content-type it returns. Prefix the <code>AcceptCallback</code> callback names with <code>from_</code> for clarity. For example, <code>from_html</code> or <code>from_json</code>.</p>
+<p>Do we want to allow the POST method to create individual resources directly through their URI (like PUT)? Implement the <code>allow_missing_post</code> callback. It is recommended to explicitly use PUT in these cases instead.</p>
+<p>May there be conflicts when using PUT to create or replace a resource? Do we want to make sure that two updates around the same time are not cancelling one another? Implement the <code>is_conflict</code> callback.</p>
<h2 id="_delete_methods">DELETE methods</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>If you implement the method DELETE, you must implement
-the <code>delete_resource</code> callback.</p></div>
-<div class="paragraph"><p>When <code>delete_resource</code> returns, is the resource completely
-removed from the server, including from any caching service?
-If not, and/or if the deletion is asynchronous and we have
-no way of knowing it has been completed yet, implement the
-<code>delete_completed</code> callback.</p></div>
-</div>
-</div>
+<p>If you implement the method DELETE, you must implement the <code>delete_resource</code> callback.</p>
+<p>When <code>delete_resource</code> returns, is the resource completely removed from the server, including from any caching service? If not, and/or if the deletion is asynchronous and we have no way of knowing it has been completed yet, implement the <code>delete_completed</code> callback.</p>
+
diff --git a/docs/en/cowboy/2.2/guide/resp/index.html b/docs/en/cowboy/2.2/guide/resp/index.html
index 0f728866..6fbbd78a 100644
--- a/docs/en/cowboy/2.2/guide/resp/index.html
+++ b/docs/en/cowboy/2.2/guide/resp/index.html
@@ -62,374 +62,250 @@
<h1 class="lined-header"><span>Sending a response</span></h1>
-<div class="paragraph"><p>The response must be sent using the Req object.</p></div>
-<div class="paragraph"><p>Cowboy provides two different ways of sending responses:
-either directly or by streaming the body. Response headers
-and body may be set in advance. The response is sent as
-soon as one of the reply or stream reply function is
-called.</p></div>
-<div class="paragraph"><p>Cowboy also provides a simplified interface for sending
-files. It can also send only specific parts of a file.</p></div>
-<div class="paragraph"><p>While only one response is allowed for every request,
-HTTP/2 introduced a mechanism that allows the server
-to push additional resources related to the response.
-This chapter also describes how this feature works in
-Cowboy.</p></div>
-<div class="sect1">
+<p>The response must be sent using the Req object.</p>
+<p>Cowboy provides two different ways of sending responses: either directly or by streaming the body. Response headers and body may be set in advance. The response is sent as soon as one of the reply or stream reply function is called.</p>
+<p>Cowboy also provides a simplified interface for sending files. It can also send only specific parts of a file.</p>
+<p>While only one response is allowed for every request, HTTP/2 introduced a mechanism that allows the server to push additional resources related to the response. This chapter also describes how this feature works in Cowboy.</p>
<h2 id="_reply">Reply</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy provides three functions for sending the entire reply,
-depending on whether you need to set headers and body. In all
-cases, Cowboy will add any headers required by the protocol
-(for example the date header will always be sent).</p></div>
-<div class="paragraph"><p>When you need to set only the status code,
-use <code>cowboy_req:reply/2</code>:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Cowboy provides three functions for sending the entire reply, depending on whether you need to set headers and body. In all cases, Cowboy will add any headers required by the protocol (for example the date header will always be sent).</p>
+<p>When you need to set only the status code, use <code>cowboy_req:reply/2</code>:</p>
+<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">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">200</span>, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>When you need to set response headers at the same time,
-use <code>cowboy_req:reply/3</code>:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:reply</font></b>(<font color="#993399">200</font>, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>When you need to set response headers at the same time, use <code>cowboy_req:reply/3</code>:</p>
+<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">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">303</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="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"https://ninenines.eu"</span><span style="color: #990000">&gt;&gt;</span>
-}, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Note that the header name must always be a lowercase
-binary.</p></div>
-<div class="paragraph"><p>When you also need to set the response body,
-use <code>cowboy_req:reply/4</code>:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:reply</font></b>(<font color="#993399">303</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"location"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"https://ninenines.eu"</font><font color="#990000">&gt;&gt;</font>
+}, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Note that the header name must always be a lowercase binary.</p>
+<p>When you also need to set the response body, use <code>cowboy_req:reply/4</code>:</p>
+<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">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">200</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/plain"</span><span style="color: #990000">&gt;&gt;</span>
-}, <span style="color: #FF0000">"Hello world!"</span>, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>You should always set the content-type header when the
-response has a body. There is however no need to set
-the content-length header; Cowboy does it automatically.</p></div>
-<div class="paragraph"><p>The response body and the header values must be either
-a binary or an iolist. An iolist is a list containing
-binaries, characters, strings or other iolists. This
-allows you to build a response from different parts
-without having to do any concatenation:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:reply</font></b>(<font color="#993399">200</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/plain"</font><font color="#990000">&gt;&gt;</font>
+}, <font color="#FF0000">"Hello world!"</font>, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>You should always set the content-type header when the response has a body. There is however no need to set the content-length header; Cowboy does it automatically.</p>
+<p>The response body and the header values must be either a binary or an iolist. An iolist is a list containing binaries, characters, strings or other iolists. This allows you to build a response from different parts without having to do any concatenation:</p>
+<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">Title</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"Hello world!"</span>,
-<span style="color: #009900">Body</span> <span style="color: #990000">=</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Hats off!"</span><span style="color: #990000">&gt;&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">200</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/html"</span><span style="color: #990000">&gt;&gt;</span>
-}, [<span style="color: #FF0000">"&lt;html&gt;&lt;head&gt;&lt;title&gt;"</span>, <span style="color: #009900">Title</span>, <span style="color: #FF0000">"&lt;/title&gt;&lt;/head&gt;"</span>,
- <span style="color: #FF0000">"&lt;body&gt;&lt;p&gt;"</span>, <span style="color: #009900">Body</span>, <span style="color: #FF0000">"&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;"</span>], <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>This method of building responses is more efficient than
-concatenating. Behind the scenes, each element of the list
-is simply a pointer, and those pointers are used directly
-when writing to the socket.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Title</font> <font color="#990000">=</font> <font color="#FF0000">"Hello world!"</font>,
+<font color="#009900">Body</font> <font color="#990000">=</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"Hats off!"</font><font color="#990000">&gt;&gt;</font>,
+<font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:reply</font></b>(<font color="#993399">200</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/html"</font><font color="#990000">&gt;&gt;</font>
+}, [<font color="#FF0000">"&lt;html&gt;&lt;head&gt;&lt;title&gt;"</font>, <font color="#009900">Title</font>, <font color="#FF0000">"&lt;/title&gt;&lt;/head&gt;"</font>,
+ <font color="#FF0000">"&lt;body&gt;&lt;p&gt;"</font>, <font color="#009900">Body</font>, <font color="#FF0000">"&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;"</font>], <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>This method of building responses is more efficient than concatenating. Behind the scenes, each element of the list is simply a pointer, and those pointers are used directly when writing to the socket.</p>
<h2 id="_stream_reply">Stream reply</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy provides two functions for initiating a response,
-and an additional function for streaming the response body.
-Cowboy will add any required headers to the response.</p></div>
-<div class="paragraph"><p>When you need to set only the status code,
-use <code>cowboy_req:stream_reply/2</code>:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Cowboy provides two functions for initiating a response, and an additional function for streaming the response body. Cowboy will add any required headers to the response.</p>
+<!-- @todo For HTTP/1.1 Cowboy should probably not use chunked transfer-encoding if the content-length is set.-->
+<p>When you need to set only the status code, use <code>cowboy_req:stream_reply/2</code>:</p>
+<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">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_reply</span></span>(<span style="color: #993399">200</span>, <span style="color: #009900">Req0</span>),
-
-<span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_body</span></span>(<span style="color: #FF0000">"Hello..."</span>, <span style="color: #FF6600">nofin</span>, <span style="color: #009900">Req</span>),
-<span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_body</span></span>(<span style="color: #FF0000">"chunked..."</span>, <span style="color: #FF6600">nofin</span>, <span style="color: #009900">Req</span>),
-<span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_body</span></span>(<span style="color: #FF0000">"world!!"</span>, <span style="color: #FF6600">fin</span>, <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>The second argument to <code>cowboy_req:stream_body/3</code> indicates
-whether this data terminates the body. Use <code>fin</code> for the
-final flag, and <code>nofin</code> otherwise.</p></div>
-<div class="paragraph"><p>This snippet does not set a content-type header. This is
-not recommended. All responses with a body should have
-a content-type. The header can be set beforehand, or
-using the <code>cowboy_req:stream_reply/3</code>:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:stream_reply</font></b>(<font color="#993399">200</font>, <font color="#009900">Req0</font>),
+
+<b><font color="#000000">cowboy_req:stream_body</font></b>(<font color="#FF0000">"Hello..."</font>, <font color="#FF6600">nofin</font>, <font color="#009900">Req</font>),
+<b><font color="#000000">cowboy_req:stream_body</font></b>(<font color="#FF0000">"chunked..."</font>, <font color="#FF6600">nofin</font>, <font color="#009900">Req</font>),
+<b><font color="#000000">cowboy_req:stream_body</font></b>(<font color="#FF0000">"world!!"</font>, <font color="#FF6600">fin</font>, <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>The second argument to <code>cowboy_req:stream_body/3</code> indicates whether this data terminates the body. Use <code>fin</code> for the final flag, and <code>nofin</code> otherwise.</p>
+<p>This snippet does not set a content-type header. This is not recommended. All responses with a body should have a content-type. The header can be set beforehand, or using the <code>cowboy_req:stream_reply/3</code>:</p>
+<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">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_reply</span></span>(<span style="color: #993399">200</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/html"</span><span style="color: #990000">&gt;&gt;</span>
-}, <span style="color: #009900">Req0</span>),
-
-<span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_body</span></span>(<span style="color: #FF0000">"&lt;html&gt;&lt;head&gt;Hello world!&lt;/head&gt;"</span>, <span style="color: #FF6600">nofin</span>, <span style="color: #009900">Req</span>),
-<span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_body</span></span>(<span style="color: #FF0000">"&lt;body&gt;&lt;p&gt;Hats off!&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;"</span>, <span style="color: #FF6600">fin</span>, <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>HTTP provides a few different ways to stream response bodies.
-Cowboy will select the most appropriate one based on the HTTP
-version and the request and response headers.</p></div>
-<div class="paragraph"><p>While not required by any means, it is recommended that you
-set the content-length header in the response if you know it
-in advance. This will ensure that the best response method
-is selected and help clients understand when the response
-is fully received.</p></div>
-<div class="paragraph"><p>Cowboy also provides a function to send response trailers.
-Response trailers are semantically equivalent to the headers
-you send in the response, only they are sent at the end.
-This is especially useful to attach information to the
-response that could not be generated until the response
-body was fully generated.</p></div>
-<div class="paragraph"><p>Trailer fields must be listed in the trailer header. Any
-field not listed might be dropped by the client or an intermediary.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:stream_reply</font></b>(<font color="#993399">200</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/html"</font><font color="#990000">&gt;&gt;</font>
+}, <font color="#009900">Req0</font>),
+
+<b><font color="#000000">cowboy_req:stream_body</font></b>(<font color="#FF0000">"&lt;html&gt;&lt;head&gt;Hello world!&lt;/head&gt;"</font>, <font color="#FF6600">nofin</font>, <font color="#009900">Req</font>),
+<b><font color="#000000">cowboy_req:stream_body</font></b>(<font color="#FF0000">"&lt;body&gt;&lt;p&gt;Hats off!&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;"</font>, <font color="#FF6600">fin</font>, <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>HTTP provides a few different ways to stream response bodies. Cowboy will select the most appropriate one based on the HTTP version and the request and response headers.</p>
+<p>While not required by any means, it is recommended that you set the content-length header in the response if you know it in advance. This will ensure that the best response method is selected and help clients understand when the response is fully received.</p>
+<p>Cowboy also provides a function to send response trailers. Response trailers are semantically equivalent to the headers you send in the response, only they are sent at the end. This is especially useful to attach information to the response that could not be generated until the response body was fully generated.</p>
+<p>Trailer fields must be listed in the trailer header. Any field not listed might be dropped by the client or an intermediary.</p>
+<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">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_reply</span></span>(<span style="color: #993399">200</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/html"</span><span style="color: #990000">&gt;&gt;</span>,
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"trailer"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"expires, content-md5"</span><span style="color: #990000">&gt;&gt;</span>
-}, <span style="color: #009900">Req0</span>),
-
-<span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_body</span></span>(<span style="color: #FF0000">"&lt;html&gt;&lt;head&gt;Hello world!&lt;/head&gt;"</span>, <span style="color: #FF6600">nofin</span>, <span style="color: #009900">Req</span>),
-<span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_body</span></span>(<span style="color: #FF0000">"&lt;body&gt;&lt;p&gt;Hats off!&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;"</span>, <span style="color: #FF6600">nofin</span>, <span style="color: #009900">Req</span>),
-
-<span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_trailers</span></span>(#{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"expires"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Sun, 10 Dec 2017 19:13:47 GMT"</span><span style="color: #990000">&gt;&gt;</span>,
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-md5"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"c6081d20ff41a42ce17048ed1c0345e2"</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="paragraph"><p>The stream ends with trailers. It is no longer possible to
-send data after sending trailers. You cannot send trailers
-after setting the <code>fin</code> flag when streaming the body.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:stream_reply</font></b>(<font color="#993399">200</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/html"</font><font color="#990000">&gt;&gt;</font>,
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"trailer"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"expires, content-md5"</font><font color="#990000">&gt;&gt;</font>
+}, <font color="#009900">Req0</font>),
+
+<b><font color="#000000">cowboy_req:stream_body</font></b>(<font color="#FF0000">"&lt;html&gt;&lt;head&gt;Hello world!&lt;/head&gt;"</font>, <font color="#FF6600">nofin</font>, <font color="#009900">Req</font>),
+<b><font color="#000000">cowboy_req:stream_body</font></b>(<font color="#FF0000">"&lt;body&gt;&lt;p&gt;Hats off!&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;"</font>, <font color="#FF6600">nofin</font>, <font color="#009900">Req</font>),
+
+<b><font color="#000000">cowboy_req:stream_trailers</font></b>(#{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"expires"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"Sun, 10 Dec 2017 19:13:47 GMT"</font><font color="#990000">&gt;&gt;</font>,
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-md5"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"c6081d20ff41a42ce17048ed1c0345e2"</font><font color="#990000">&gt;&gt;</font>
+}, <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>The stream ends with trailers. It is no longer possible to send data after sending trailers. You cannot send trailers after setting the <code>fin</code> flag when streaming the body.</p>
<h2 id="_preset_response_headers">Preset response headers</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy provides functions to set response headers without
-immediately sending them. They are stored in the Req object
-and sent as part of the response when a reply function is
-called.</p></div>
-<div class="paragraph"><p>To set response headers:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Cowboy provides functions to set response headers without immediately sending them. They are stored in the Req object and sent as part of the response when a reply function is called.</p>
+<p>To set response headers:</p>
+<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">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"allow"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #FF0000">"GET"</span>, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Header names must be a lowercase binary.</p></div>
-<div class="paragraph"><p>Do not use this function for setting cookies. Refer to
-the <a href="../cookies">Cookies</a> chapter for more information.</p></div>
-<div class="paragraph"><p>To check if a response header has already been set:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"allow"</font><font color="#990000">&gt;&gt;</font>, <font color="#FF0000">"GET"</font>, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Header names must be a lowercase binary.</p>
+<p>Do not use this function for setting cookies. Refer to the <a href="../cookies">Cookies</a> chapter for more information.</p>
+<p>To check if a response header has already been set:</p>
+<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">cowboy_req:has_resp_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"allow"</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="paragraph"><p>It returns <code>true</code> if the header was set, <code>false</code> otherwise.</p></div>
-<div class="paragraph"><p>To delete a response header that was set previously:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">cowboy_req:has_resp_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"allow"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>It returns <code>true</code> if the header was set, <code>false</code> otherwise.</p>
+<p>To delete a response header that was set previously:</p>
+<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">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:delete_resp_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"allow"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:delete_resp_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"allow"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_overriding_headers">Overriding headers</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>As Cowboy provides different ways of setting response
-headers and body, clashes may occur, so it&#8217;s important
-to understand what happens when a header is set twice.</p></div>
-<div class="paragraph"><p>Headers come from five different origins:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-Protocol-specific headers (for example HTTP/1.1&#8217;s connection header)
-</p>
+<p>As Cowboy provides different ways of setting response headers and body, clashes may occur, so it&apos;s important to understand what happens when a header is set twice.</p>
+<p>Headers come from five different origins:</p>
+<ul><li>Protocol-specific headers (for example HTTP/1.1&apos;s connection header)
</li>
-<li>
-<p>
-Other required headers (for example the date header)
-</p>
+<li>Other required headers (for example the date header)
</li>
-<li>
-<p>
-Preset headers
-</p>
+<li>Preset headers
</li>
-<li>
-<p>
-Headers given to the reply function
-</p>
+<li>Headers given to the reply function
</li>
-<li>
-<p>
-Set-cookie headers
-</p>
+<li>Set-cookie headers
</li>
-</ul></div>
-<div class="paragraph"><p>Cowboy does not allow overriding protocol-specific headers.</p></div>
-<div class="paragraph"><p>Set-cookie headers will always be appended at the end of
-the list of headers before sending the response.</p></div>
-<div class="paragraph"><p>Headers given to the reply function will always override
-preset headers and required headers. If a header is found
-in two or three of these, then the one in the reply function
-is picked and the others are dropped.</p></div>
-<div class="paragraph"><p>Similarly, preset headers will always override required
-headers.</p></div>
-<div class="paragraph"><p>To illustrate, look at the following snippet. Cowboy by
-default sends the server header with the value "Cowboy".
-We can override it:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+</ul>
+<p>Cowboy does not allow overriding protocol-specific headers.</p>
+<p>Set-cookie headers will always be appended at the end of the list of headers before sending the response.</p>
+<p>Headers given to the reply function will always override preset headers and required headers. If a header is found in two or three of these, then the one in the reply function is picked and the others are dropped.</p>
+<p>Similarly, preset headers will always override required headers.</p>
+<p>To illustrate, look at the following snippet. Cowboy by default sends the server header with the value &quot;Cowboy&quot;. We can override it:</p>
+<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">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">200</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"server"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"yaws"</span><span style="color: #990000">&gt;&gt;</span>
-}, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:reply</font></b>(<font color="#993399">200</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"server"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"yaws"</font><font color="#990000">&gt;&gt;</font>
+}, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_preset_response_body">Preset response body</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy provides functions to set the response body without
-immediately sending it. It is stored in the Req object and
-sent when the reply function is called.</p></div>
-<div class="paragraph"><p>To set the response body:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Cowboy provides functions to set the response body without immediately sending it. It is stored in the Req object and sent when the reply function is called.</p>
+<p>To set the response body:</p>
+<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">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_body</span></span>(<span style="color: #FF0000">"Hello world!"</span>, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>To check if a response body has already been set:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_body</font></b>(<font color="#FF0000">"Hello world!"</font>, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<!-- @todo Yeah we probably should add that function that-->
+<!-- also sets the content-type at the same time...-->
+<p>To check if a response body has already been set:</p>
+<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">cowboy_req:has_resp_body</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>It returns <code>true</code> if the body was set and is non-empty,
-<code>false</code> otherwise.</p></div>
-<div class="paragraph"><p>The preset response body is only sent if the reply function
-used is <code>cowboy_req:reply/2</code> or <code>cowboy_req:reply/3</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">cowboy_req:has_resp_body</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>It returns <code>true</code> if the body was set and is non-empty, <code>false</code> otherwise.</p>
+<!-- @todo We probably should also have a function that-->
+<!-- properly removes the response body, including any-->
+<!-- content-* headers.-->
+<p>The preset response body is only sent if the reply function used is <code>cowboy_req:reply/2</code> or <code>cowboy_req:reply/3</code>.</p>
<h2 id="_sending_files">Sending files</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy provides a shortcut for sending files. When
-using <code>cowboy_req:reply/4</code>, or when presetting the
-response header, you can give a <code>sendfile</code> tuple to
-Cowboy:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Cowboy provides a shortcut for sending files. When using <code>cowboy_req:reply/4</code>, or when presetting the response header, you can give a <code>sendfile</code> tuple to Cowboy:</p>
+<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">sendfile</span>, <span style="color: #009900">Offset</span>, <span style="color: #009900">Length</span>, <span style="color: #009900">Filename</span>}</tt></pre></div></div>
-<div class="paragraph"><p>Depending on the values for <code>Offset</code> or <code>Length</code>, the
-entire file may be sent, or just a part of it.</p></div>
-<div class="paragraph"><p>The length is required even for sending the entire file.
-Cowboy sends it in the content-length header.</p></div>
-<div class="paragraph"><p>To send a file while replying:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>{<font color="#FF6600">sendfile</font>, <font color="#009900">Offset</font>, <font color="#009900">Length</font>, <font color="#009900">Filename</font>}</tt></pre>
+</div></div>
+<p>Depending on the values for <code>Offset</code> or <code>Length</code>, the entire file may be sent, or just a part of it.</p>
+<p>The length is required even for sending the entire file. Cowboy sends it in the content-length header.</p>
+<p>To send a file while replying:</p>
+<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">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">200</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #FF0000">"image/png"</span>
-}, {<span style="color: #FF6600">sendfile</span>, <span style="color: #993399">0</span>, <span style="color: #993399">12345</span>, <span style="color: #FF0000">"path/to/logo.png"</span>}, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:reply</font></b>(<font color="#993399">200</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#FF0000">"image/png"</font>
+}, {<font color="#FF6600">sendfile</font>, <font color="#993399">0</font>, <font color="#993399">12345</font>, <font color="#FF0000">"path/to/logo.png"</font>}, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<!-- @todo An example of presetting a file would be useful,-->
+<!-- but let&apos;s wait for the function that can set the-->
+<!-- content-type at the same time.-->
+<!-- @todo What about streaming many files? For example-->
+<!-- it should be possible to build a tar file on the fly-->
+<!-- while still using sendfile. Another example could be-->
+<!-- proper support for multipart byte ranges. Yet another-->
+<!-- example would be automatic concatenation of CSS or JS-->
+<!-- files.-->
<h2 id="_informational_responses">Informational responses</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy allows you to send informational responses.</p></div>
-<div class="paragraph"><p>Informational responses are responses that have a status
-code between 100 and 199. Any number can be sent before
-the proper response. Sending an informational response
-does not change the behavior of the proper response, and
-clients are expected to ignore any informational response
-they do not understand.</p></div>
-<div class="paragraph"><p>The following snippet sends a 103 informational response
-with some headers that are expected to be in the final
-response.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Cowboy allows you to send informational responses.</p>
+<p>Informational responses are responses that have a status code between 100 and 199. Any number can be sent before the proper response. Sending an informational response does not change the behavior of the proper response, and clients are expected to ignore any informational response they do not understand.</p>
+<p>The following snippet sends a 103 informational response with some headers that are expected to be in the final response.</p>
+<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">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:inform</span></span>(<span style="color: #993399">103</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"link"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"&lt;/style.css&gt;; rel=preload; as=style"</span><span style="color: #990000">&gt;&gt;</span>,
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"link"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"&lt;/script.js&gt;; rel=preload; as=script"</span><span style="color: #990000">&gt;&gt;</span>
-}, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:inform</font></b>(<font color="#993399">103</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"link"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"&lt;/style.css&gt;; rel=preload; as=style"</font><font color="#990000">&gt;&gt;</font>,
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"link"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"&lt;/script.js&gt;; rel=preload; as=script"</font><font color="#990000">&gt;&gt;</font>
+}, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_push">Push</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The HTTP/2 protocol introduced the ability to push resources
-related to the one sent in the response. Cowboy provides two
-functions for that purpose: <code>cowboy_req:push/3,4</code>.</p></div>
-<div class="paragraph"><p>Push is only available for HTTP/2. Cowboy will automatically
-ignore push requests if the protocol doesn&#8217;t support it.</p></div>
-<div class="paragraph"><p>The push function must be called before any of the reply
-functions. Doing otherwise will result in a crash.</p></div>
-<div class="paragraph"><p>To push a resource, you need to provide the same information
-as a client performing a request would. This includes the
-HTTP method, the URI and any necessary request headers.</p></div>
-<div class="paragraph"><p>Cowboy by default only requires you to give the path to
-the resource and the request headers. The rest of the URI
-is taken from the current request (excluding the query
-string, set to empty) and the method is GET by default.</p></div>
-<div class="paragraph"><p>The following snippet pushes a CSS file that is linked to
-in the response:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The HTTP/2 protocol introduced the ability to push resources related to the one sent in the response. Cowboy provides two functions for that purpose: <code>cowboy_req:push/3,4</code>.</p>
+<p>Push is only available for HTTP/2. Cowboy will automatically ignore push requests if the protocol doesn&apos;t support it.</p>
+<p>The push function must be called before any of the reply functions. Doing otherwise will result in a crash.</p>
+<p>To push a resource, you need to provide the same information as a client performing a request would. This includes the HTTP method, the URI and any necessary request headers.</p>
+<p>Cowboy by default only requires you to give the path to the resource and the request headers. The rest of the URI is taken from the current request (excluding the query string, set to empty) and the method is GET by default.</p>
+<p>The following snippet pushes a CSS file that is linked to in the response:</p>
+<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">cowboy_req:push</span></span>(<span style="color: #FF0000">"/static/style.css"</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"accept"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/css"</span><span style="color: #990000">&gt;&gt;</span>
-}, <span style="color: #009900">Req0</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">200</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/html"</span><span style="color: #990000">&gt;&gt;</span>
-}, [<span style="color: #FF0000">"&lt;html&gt;&lt;head&gt;&lt;title&gt;My web page&lt;/title&gt;"</span>,
- <span style="color: #FF0000">"&lt;link rel='stylesheet' type='text/css' href='/static/style.css'&gt;"</span>,
- <span style="color: #FF0000">"&lt;body&gt;&lt;p&gt;Welcome to Erlang!&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;"</span>], <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>To override the method, scheme, host, port or query string,
-simply pass in a fourth argument. The following snippet
-uses a different host name:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">cowboy_req:push</font></b>(<font color="#FF0000">"/static/style.css"</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"accept"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/css"</font><font color="#990000">&gt;&gt;</font>
+}, <font color="#009900">Req0</font>),
+<font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:reply</font></b>(<font color="#993399">200</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/html"</font><font color="#990000">&gt;&gt;</font>
+}, [<font color="#FF0000">"&lt;html&gt;&lt;head&gt;&lt;title&gt;My web page&lt;/title&gt;"</font>,
+ <font color="#FF0000">"&lt;link rel='stylesheet' type='text/css' href='/static/style.css'&gt;"</font>,
+ <font color="#FF0000">"&lt;body&gt;&lt;p&gt;Welcome to Erlang!&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;"</font>], <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>To override the method, scheme, host, port or query string, simply pass in a fourth argument. The following snippet uses a different host name:</p>
+<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">cowboy_req:push</span></span>(<span style="color: #FF0000">"/static/style.css"</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"accept"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/css"</span><span style="color: #990000">&gt;&gt;</span>
-}, #{<span style="color: #0000FF">host</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"cdn.example.org"</span><span style="color: #990000">&gt;&gt;</span>}, <span style="color: #009900">Req</span>),</tt></pre></div></div>
-<div class="paragraph"><p>Pushed resources don&#8217;t have to be files. As long as the push
-request is cacheable, safe and does not include a body, the
-resource can be pushed.</p></div>
-<div class="paragraph"><p>Under the hood, Cowboy handles pushed requests the same as
-normal requests: a different process is created which will
-ultimately send a response to the client.</p></div>
-</div>
-</div>
+<pre><tt><b><font color="#000000">cowboy_req:push</font></b>(<font color="#FF0000">"/static/style.css"</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"accept"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/css"</font><font color="#990000">&gt;&gt;</font>
+}, #{<font color="#0000FF">host</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"cdn.example.org"</font><font color="#990000">&gt;&gt;</font>}, <font color="#009900">Req</font>),</tt></pre>
+</div></div>
+<p>Pushed resources don&apos;t have to be files. As long as the push request is cacheable, safe and does not include a body, the resource can be pushed.</p>
+<p>Under the hood, Cowboy handles pushed requests the same as normal requests: a different process is created which will ultimately send a response to the client.</p>
+
diff --git a/docs/en/cowboy/2.2/guide/rest_flowcharts/index.html b/docs/en/cowboy/2.2/guide/rest_flowcharts/index.html
index 58e0269d..8d526fe4 100644
--- a/docs/en/cowboy/2.2/guide/rest_flowcharts/index.html
+++ b/docs/en/cowboy/2.2/guide/rest_flowcharts/index.html
@@ -62,244 +62,64 @@
<h1 class="lined-header"><span>REST flowcharts</span></h1>
-<div class="paragraph"><p>This chapter will explain the REST handler state machine through
-a number of different diagrams.</p></div>
-<div class="paragraph"><p>There are four main paths that requests may follow. One for the
-method OPTIONS; one for the methods GET and HEAD; one for the
-methods PUT, POST and PATCH; and one for the method DELETE.</p></div>
-<div class="paragraph"><p>All paths start with the "Start" diagram, and all paths excluding
-the OPTIONS path go through the "Content negotiation" diagram
-and optionally the "Conditional requests" diagram if the resource
-exists.</p></div>
-<div class="paragraph"><p>The red squares refer to another diagram. The light green squares
-indicate a response. Other squares may be either a callback or a
-question answered by Cowboy itself. Green arrows tend to indicate
-the default behavior if the callback is undefined.</p></div>
-<div class="sect1">
+<p>This chapter will explain the REST handler state machine through a number of different diagrams.</p>
+<p>There are four main paths that requests may follow. One for the method OPTIONS; one for the methods GET and HEAD; one for the methods PUT, POST and PATCH; and one for the method DELETE.</p>
+<p>All paths start with the &quot;Start&quot; diagram, and all paths excluding the OPTIONS path go through the &quot;Content negotiation&quot; diagram and optionally the &quot;Conditional requests&quot; diagram if the resource exists.</p>
+<p>The red squares refer to another diagram. The light green squares indicate a response. Other squares may be either a callback or a question answered by Cowboy itself. Green arrows tend to indicate the default behavior if the callback is undefined.</p>
<h2 id="_start">Start</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>All requests start from here.</p></div>
-<div class="imageblock">
-<div class="content">
-<img src="../rest_start.png" alt="REST starting flowchart" />
-</div>
-</div>
-<div class="paragraph"><p>A series of callbacks are called in succession to perform
-a general checkup of the service, the request line and
-request headers.</p></div>
-<div class="paragraph"><p>The request body, if any, is not expected to have been
-received for any of these steps. It is only processed
-at the end of the "PUT, POST and PATCH methods" diagram,
-when all conditions have been met.</p></div>
-<div class="paragraph"><p>The <code>known_methods</code> and <code>allowed_methods</code> callbacks
-return a list of methods. Cowboy then checks if the request
-method is in the list, and stops otherwise.</p></div>
-<div class="paragraph"><p>The <code>is_authorized</code> callback may be used to check that
-access to the resource is authorized. Authentication
-may also be performed as needed. When authorization is
-denied, the return value from the callback must include
-a challenge applicable to the requested resource, which
-will be sent back to the client in the www-authenticate
-header.</p></div>
-<div class="paragraph"><p>This diagram is immediately followed by either the
-"OPTIONS method" diagram when the request method is
-OPTIONS, or the "Content negotiation" diagram otherwise.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>All requests start from here.</p>
+<img src="../rest_start.png" alt="REST starting flowchart"/><p>A series of callbacks are called in succession to perform a general checkup of the service, the request line and request headers.</p>
+<p>The request body, if any, is not expected to have been received for any of these steps. It is only processed at the end of the &quot;PUT, POST and PATCH methods&quot; diagram, when all conditions have been met.</p>
+<p>The <code>known_methods</code> and <code>allowed_methods</code> callbacks return a list of methods. Cowboy then checks if the request method is in the list, and stops otherwise.</p>
+<p>The <code>is_authorized</code> callback may be used to check that access to the resource is authorized. Authentication may also be performed as needed. When authorization is denied, the return value from the callback must include a challenge applicable to the requested resource, which will be sent back to the client in the www-authenticate header.</p>
+<p>This diagram is immediately followed by either the &quot;OPTIONS method&quot; diagram when the request method is OPTIONS, or the &quot;Content negotiation&quot; diagram otherwise.</p>
<h2 id="_options_method">OPTIONS method</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This diagram only applies to OPTIONS requests.</p></div>
-<div class="imageblock">
-<div class="content">
-<img src="../rest_options.png" alt="REST OPTIONS method flowchart" />
-</div>
-</div>
-<div class="paragraph"><p>The <code>options</code> callback may be used to add information
-about the resource, such as media types or languages
-provided; allowed methods; any extra information. A
-response body may also be set, although clients should
-not be expected to read it.</p></div>
-<div class="paragraph"><p>If the <code>options</code> callback is not defined, Cowboy will
-send a response containing the list of allowed methods
-by default.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This diagram only applies to OPTIONS requests.</p>
+<img src="../rest_options.png" alt="REST OPTIONS method flowchart"/><p>The <code>options</code> callback may be used to add information about the resource, such as media types or languages provided; allowed methods; any extra information. A response body may also be set, although clients should not be expected to read it.</p>
+<p>If the <code>options</code> callback is not defined, Cowboy will send a response containing the list of allowed methods by default.</p>
<h2 id="_content_negotiation">Content negotiation</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This diagram applies to all request methods other than
-OPTIONS. It is executed right after the "Start" diagram
-is completed.</p></div>
-<div class="imageblock">
-<div class="content">
-<img src="../rest_conneg.png" alt="REST content negotiation flowchart" />
-</div>
-</div>
-<div class="paragraph"><p>The purpose of these steps is to determine an appropriate
-representation to be sent back to the client.</p></div>
-<div class="paragraph"><p>The request may contain any of the accept header; the
-accept-language header; or the accept-charset header.
-When present, Cowboy will parse the headers and then
-call the corresponding callback to obtain the list
-of provided content-type, language or charset for this
-resource. It then automatically select the best match
-based on the request.</p></div>
-<div class="paragraph"><p>If a callback is not defined, Cowboy will select the
-content-type, language or charset that the client
-prefers.</p></div>
-<div class="paragraph"><p>The <code>content_types_provided</code> also returns the name of
-a callback for every content-type it accepts. This
-callback will only be called at the end of the
-"GET and HEAD methods" diagram, when all conditions
-have been met.</p></div>
-<div class="paragraph"><p>The selected content-type, language and charset are
-saved as meta values in the Req object. You <strong>should</strong>
-use the appropriate representation if you set a
-response body manually (alongside an error code,
-for example).</p></div>
-<div class="paragraph"><p>This diagram is immediately followed by
-the "GET and HEAD methods" diagram,
-the "PUT, POST and PATCH methods" diagram,
-or the "DELETE method" diagram, depending on the
-method.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This diagram applies to all request methods other than OPTIONS. It is executed right after the &quot;Start&quot; diagram is completed.</p>
+<img src="../rest_conneg.png" alt="REST content negotiation flowchart"/><p>The purpose of these steps is to determine an appropriate representation to be sent back to the client.</p>
+<p>The request may contain any of the accept header; the accept-language header; or the accept-charset header. When present, Cowboy will parse the headers and then call the corresponding callback to obtain the list of provided content-type, language or charset for this resource. It then automatically select the best match based on the request.</p>
+<p>If a callback is not defined, Cowboy will select the content-type, language or charset that the client prefers.</p>
+<p>The <code>content_types_provided</code> also returns the name of a callback for every content-type it accepts. This callback will only be called at the end of the &quot;GET and HEAD methods&quot; diagram, when all conditions have been met.</p>
+<p>The selected content-type, language and charset are saved as meta values in the Req object. You <strong>should</strong> use the appropriate representation if you set a response body manually (alongside an error code, for example).</p>
+<p>This diagram is immediately followed by the &quot;GET and HEAD methods&quot; diagram, the &quot;PUT, POST and PATCH methods&quot; diagram, or the &quot;DELETE method&quot; diagram, depending on the method.</p>
<h2 id="_get_and_head_methods">GET and HEAD methods</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This diagram only applies to GET and HEAD requests.</p></div>
-<div class="paragraph"><p>For a description of the <code>cond</code> step, please see
-the "Conditional requests" diagram.</p></div>
-<div class="imageblock">
-<div class="content">
-<img src="../rest_get_head.png" alt="REST GET/HEAD methods flowchart" />
-</div>
-</div>
-<div class="paragraph"><p>When the resource exists, and the conditional steps
-succeed, the resource can be retrieved.</p></div>
-<div class="paragraph"><p>Cowboy prepares the response by first retrieving
-metadata about the representation, then by calling
-the <code>ProvideResource</code> callback. This is the callback
-you defined for each content-types you returned from
-<code>content_types_provided</code>. This callback returns the body
-that will be sent back to the client, or a fun if the
-body must be streamed.</p></div>
-<div class="paragraph"><p>When the resource does not exist, Cowboy will figure out
-whether the resource existed previously, and if so whether
-it was moved elsewhere in order to redirect the client to
-the new URI.</p></div>
-<div class="paragraph"><p>The <code>moved_permanently</code> and <code>moved_temporarily</code> callbacks
-must return the new location of the resource if it was in
-fact moved.</p></div>
-</div>
-</div>
-<div class="sect1">
-<h2 id="_put_post_and_patch_methods">PUT, POST and PATCH methods</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This diagram only applies to PUT, POST and PATCH requests.</p></div>
-<div class="paragraph"><p>For a description of the <code>cond</code> step, please see
-the "Conditional requests" diagram.</p></div>
-<div class="imageblock">
-<div class="content">
-<img src="../rest_put_post_patch.png" alt="REST PUT/POST/PATCH methods flowchart" />
-</div>
-</div>
-<div class="paragraph"><p>When the resource exists, first the conditional steps
-are executed. When that succeeds, and the method is PUT,
-Cowboy will call the <code>is_conflict</code> callback. This function
-can be used to prevent potential race conditions, by locking
-the resource for example.</p></div>
-<div class="paragraph"><p>Then all three methods reach the <code>content_types_accepted</code>
-step that we will describe in a few paragraphs.</p></div>
-<div class="paragraph"><p>When the resource does not exist, and the method is PUT,
-Cowboy will check for conflicts and then move on to the
-<code>content_types_accepted</code> step. For other methods, Cowboy
-will figure out whether the resource existed previously,
-and if so whether it was moved elsewhere. If the resource
-is truly non-existent, the method is POST and the call
-for <code>allow_missing_post</code> returns <code>true</code>, then Cowboy will
-move on to the <code>content_types_accepted</code> step. Otherwise
-the request processing ends there.</p></div>
-<div class="paragraph"><p>The <code>moved_permanently</code> and <code>moved_temporarily</code> callbacks
-must return the new location of the resource if it was in
-fact moved.</p></div>
-<div class="paragraph"><p>The <code>content_types_accepted</code> returns a list of
-content-types it accepts, but also the name of a callback
-for each of them. Cowboy will select the appropriate
-callback for processing the request body and call it.</p></div>
-<div class="paragraph"><p>This callback may return one of three different return
-values.</p></div>
-<div class="paragraph"><p>If an error occurred while processing the request body,
-it must return <code>false</code> and Cowboy will send an
-appropriate error response.</p></div>
-<div class="paragraph"><p>If the method is POST, then you may return <code>true</code> with
-an URI of where the resource has been created. This is
-especially useful for writing handlers for collections.</p></div>
-<div class="paragraph"><p>Otherwise, return <code>true</code> to indicate success. Cowboy
-will select the appropriate response to be sent depending
-on whether a resource has been created, rather than
-modified, and on the availability of a location header
-or a body in the response.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This diagram only applies to GET and HEAD requests.</p>
+<p>For a description of the <code>cond</code> step, please see the &quot;Conditional requests&quot; diagram.</p>
+<img src="../rest_get_head.png" alt="REST GET/HEAD methods flowchart"/><p>When the resource exists, and the conditional steps succeed, the resource can be retrieved.</p>
+<p>Cowboy prepares the response by first retrieving metadata about the representation, then by calling the <code>ProvideResource</code> callback. This is the callback you defined for each content-types you returned from <code>content_types_provided</code>. This callback returns the body that will be sent back to the client, or a fun if the body must be streamed.</p>
+<p>When the resource does not exist, Cowboy will figure out whether the resource existed previously, and if so whether it was moved elsewhere in order to redirect the client to the new URI.</p>
+<p>The <code>moved_permanently</code> and <code>moved_temporarily</code> callbacks must return the new location of the resource if it was in fact moved.</p>
+<h2 id="_put__post_and_patch_methods">PUT, POST and PATCH methods</h2>
+<p>This diagram only applies to PUT, POST and PATCH requests.</p>
+<p>For a description of the <code>cond</code> step, please see the &quot;Conditional requests&quot; diagram.</p>
+<img src="../rest_put_post_patch.png" alt="REST PUT/POST/PATCH methods flowchart"/><p>When the resource exists, first the conditional steps are executed. When that succeeds, and the method is PUT, Cowboy will call the <code>is_conflict</code> callback. This function can be used to prevent potential race conditions, by locking the resource for example.</p>
+<p>Then all three methods reach the <code>content_types_accepted</code> step that we will describe in a few paragraphs.</p>
+<p>When the resource does not exist, and the method is PUT, Cowboy will check for conflicts and then move on to the <code>content_types_accepted</code> step. For other methods, Cowboy will figure out whether the resource existed previously, and if so whether it was moved elsewhere. If the resource is truly non-existent, the method is POST and the call for <code>allow_missing_post</code> returns <code>true</code>, then Cowboy will move on to the <code>content_types_accepted</code> step. Otherwise the request processing ends there.</p>
+<p>The <code>moved_permanently</code> and <code>moved_temporarily</code> callbacks must return the new location of the resource if it was in fact moved.</p>
+<p>The <code>content_types_accepted</code> returns a list of content-types it accepts, but also the name of a callback for each of them. Cowboy will select the appropriate callback for processing the request body and call it.</p>
+<p>This callback may return one of three different return values.</p>
+<p>If an error occurred while processing the request body, it must return <code>false</code> and Cowboy will send an appropriate error response.</p>
+<p>If the method is POST, then you may return <code>true</code> with an URI of where the resource has been created. This is especially useful for writing handlers for collections.</p>
+<p>Otherwise, return <code>true</code> to indicate success. Cowboy will select the appropriate response to be sent depending on whether a resource has been created, rather than modified, and on the availability of a location header or a body in the response.</p>
<h2 id="_delete_method">DELETE method</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This diagram only applies to DELETE requests.</p></div>
-<div class="paragraph"><p>For a description of the <code>cond</code> step, please see
-the "Conditional requests" diagram.</p></div>
-<div class="imageblock">
-<div class="content">
-<img src="../rest_delete.png" alt="REST DELETE method flowchart" />
-</div>
-</div>
-<div class="paragraph"><p>When the resource exists, and the conditional steps
-succeed, the resource can be deleted.</p></div>
-<div class="paragraph"><p>Deleting the resource is a two steps process. First
-the callback <code>delete_resource</code> is executed. Use this
-callback to delete the resource.</p></div>
-<div class="paragraph"><p>Because the resource may be cached, you must also
-delete all cached representations of this resource
-in the system. This operation may take a while though,
-so you may return before it finished.</p></div>
-<div class="paragraph"><p>Cowboy will then call the <code>delete_completed</code> callback.
-If you know that the resource has been completely
-deleted from your system, including from caches, then
-you can return <code>true</code>. If any doubts persist, return
-<code>false</code>. Cowboy will assume <code>true</code> by default.</p></div>
-<div class="paragraph"><p>To finish, Cowboy checks if you set a response body,
-and depending on that, sends the appropriate response.</p></div>
-<div class="paragraph"><p>When the resource does not exist, Cowboy will figure out
-whether the resource existed previously, and if so whether
-it was moved elsewhere in order to redirect the client to
-the new URI.</p></div>
-<div class="paragraph"><p>The <code>moved_permanently</code> and <code>moved_temporarily</code> callbacks
-must return the new location of the resource if it was in
-fact moved.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This diagram only applies to DELETE requests.</p>
+<p>For a description of the <code>cond</code> step, please see the &quot;Conditional requests&quot; diagram.</p>
+<img src="../rest_delete.png" alt="REST DELETE method flowchart"/><p>When the resource exists, and the conditional steps succeed, the resource can be deleted.</p>
+<p>Deleting the resource is a two steps process. First the callback <code>delete_resource</code> is executed. Use this callback to delete the resource.</p>
+<p>Because the resource may be cached, you must also delete all cached representations of this resource in the system. This operation may take a while though, so you may return before it finished.</p>
+<p>Cowboy will then call the <code>delete_completed</code> callback. If you know that the resource has been completely deleted from your system, including from caches, then you can return <code>true</code>. If any doubts persist, return <code>false</code>. Cowboy will assume <code>true</code> by default.</p>
+<p>To finish, Cowboy checks if you set a response body, and depending on that, sends the appropriate response.</p>
+<p>When the resource does not exist, Cowboy will figure out whether the resource existed previously, and if so whether it was moved elsewhere in order to redirect the client to the new URI.</p>
+<p>The <code>moved_permanently</code> and <code>moved_temporarily</code> callbacks must return the new location of the resource if it was in fact moved.</p>
<h2 id="_conditional_requests">Conditional requests</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This diagram applies to all request methods other than
-OPTIONS. It is executed right after the <code>resource_exists</code>
-callback, when the resource exists.</p></div>
-<div class="imageblock">
-<div class="content">
-<img src="../rest_cond.png" alt="REST conditional requests flowchart" />
-</div>
-</div>
-<div class="paragraph"><p>A request becomes conditional when it includes either of
-the if-match header; the if-unmodified-since header; the
-if-none-match header; or the if-modified-since header.</p></div>
-<div class="paragraph"><p>If the condition fails, the request ends immediately
-without any retrieval or modification of the resource.</p></div>
-<div class="paragraph"><p>The <code>generate_etag</code> and <code>last_modified</code> are called as
-needed. Cowboy will only call them once and then cache
-the results for subsequent use.</p></div>
-</div>
-</div>
+<p>This diagram applies to all request methods other than OPTIONS. It is executed right after the <code>resource_exists</code> callback, when the resource exists.</p>
+<img src="../rest_cond.png" alt="REST conditional requests flowchart"/><p>A request becomes conditional when it includes either of the if-match header; the if-unmodified-since header; the if-none-match header; or the if-modified-since header.</p>
+<p>If the condition fails, the request ends immediately without any retrieval or modification of the resource.</p>
+<p>The <code>generate_etag</code> and <code>last_modified</code> are called as needed. Cowboy will only call them once and then cache the results for subsequent use.</p>
+
diff --git a/docs/en/cowboy/2.2/guide/rest_handlers/index.html b/docs/en/cowboy/2.2/guide/rest_handlers/index.html
index b0f3881f..a629d473 100644
--- a/docs/en/cowboy/2.2/guide/rest_handlers/index.html
+++ b/docs/en/cowboy/2.2/guide/rest_handlers/index.html
@@ -62,287 +62,162 @@
<h1 class="lined-header"><span>REST handlers</span></h1>
-<div class="paragraph"><p>REST is implemented in Cowboy as a sub protocol. The request
-is handled as a state machine with many optional callbacks
-describing the resource and modifying the machine&#8217;s behavior.</p></div>
-<div class="paragraph"><p>The REST handler is the recommended way to handle HTTP requests.</p></div>
-<div class="sect1">
+<p>REST is implemented in Cowboy as a sub protocol. The request is handled as a state machine with many optional callbacks describing the resource and modifying the machine&apos;s behavior.</p>
+<p>The REST handler is the recommended way to handle HTTP requests.</p>
<h2 id="_initialization">Initialization</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>First, the <code>init/2</code> callback is called. This callback is common
-to all handlers. To use REST for the current request, this function
-must return a <code>cowboy_rest</code> tuple.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>First, the <code>init/2</code> callback is called. This callback is common to all handlers. To use REST for the current request, this function must return a <code>cowboy_rest</code> tuple.</p>
+<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">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 class="paragraph"><p>Cowboy will then switch to the REST protocol and start executing
-the state machine.</p></div>
-<div class="paragraph"><p>After reaching the end of the flowchart, the <code>terminate/3</code> callback
-will be called if it is defined.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">cowboy_rest</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Cowboy will then switch to the REST protocol and start executing the state machine.</p>
+<p>After reaching the end of the flowchart, the <code>terminate/3</code> callback will be called if it is defined.</p>
<h2 id="_methods">Methods</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The REST component has code for handling the following HTTP methods:
-HEAD, GET, POST, PATCH, PUT, DELETE and OPTIONS.</p></div>
-<div class="paragraph"><p>Other methods can be accepted, however they have no specific callback
-defined for them at this time.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The REST component has code for handling the following HTTP methods: HEAD, GET, POST, PATCH, PUT, DELETE and OPTIONS.</p>
+<p>Other methods can be accepted, however they have no specific callback defined for them at this time.</p>
<h2 id="_callbacks">Callbacks</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>All callbacks are optional. Some may become mandatory depending
-on what other defined callbacks return. The various flowcharts
-in the next chapter should be a useful to determine which callbacks
-you need.</p></div>
-<div class="paragraph"><p>All callbacks take two arguments, the Req object and the State,
-and return a three-element tuple of the form <code>{Value, Req, State}</code>.</p></div>
-<div class="paragraph"><p>Nearly all callbacks can also return <code>{stop, Req, State}</code> to
-stop execution of the request, and
-<code>{{switch_handler, Module}, Req, State}</code> or
-<code>{{switch_handler, Module, Opts}, Req, State}</code> to switch to
-a different handler type. The exceptions are <code>expires</code>
-<code>generate_etag</code>, <code>last_modified</code> and <code>variances</code>.</p></div>
-<div class="paragraph"><p>The following table summarizes the callbacks and their default values.
-If the callback isn&#8217;t defined, then the default value will be used.
-Please look at the flowcharts to find out the result of each return
-value.</p></div>
-<div class="paragraph"><p>In the following table, "skip" means the callback is entirely skipped
-if it is undefined, moving directly to the next step. Similarly,
-"none" means there is no default value for this callback.</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"> Callback name </th>
-<th align="center" valign="top"> Default value</th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td align="left" valign="top"><p class="table">allowed_methods</p></td>
-<td align="center" valign="top"><p class="table"><code>[&lt;&lt;"GET"&gt;&gt;, &lt;&lt;"HEAD"&gt;&gt;, &lt;&lt;"OPTIONS"&gt;&gt;]</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">allow_missing_post</p></td>
-<td align="center" valign="top"><p class="table"><code>true</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">charsets_provided</p></td>
-<td align="center" valign="top"><p class="table">skip</p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">content_types_accepted</p></td>
-<td align="center" valign="top"><p class="table">none</p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">content_types_provided</p></td>
-<td align="center" valign="top"><p class="table"><code>[{{ &lt;&lt;"text"&gt;&gt;, &lt;&lt;"html"&gt;&gt;, '*'}, to_html}]</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">delete_completed</p></td>
-<td align="center" valign="top"><p class="table"><code>true</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">delete_resource</p></td>
-<td align="center" valign="top"><p class="table"><code>false</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">expires</p></td>
-<td align="center" valign="top"><p class="table"><code>undefined</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">forbidden</p></td>
-<td align="center" valign="top"><p class="table"><code>false</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">generate_etag</p></td>
-<td align="center" valign="top"><p class="table"><code>undefined</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">is_authorized</p></td>
-<td align="center" valign="top"><p class="table"><code>true</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">is_conflict</p></td>
-<td align="center" valign="top"><p class="table"><code>false</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">known_methods</p></td>
-<td align="center" valign="top"><p class="table"><code>[&lt;&lt;"GET"&gt;&gt;, &lt;&lt;"HEAD"&gt;&gt;, &lt;&lt;"POST"&gt;&gt;, &lt;&lt;"PUT"&gt;&gt;, &lt;&lt;"PATCH"&gt;&gt;, &lt;&lt;"DELETE"&gt;&gt;, &lt;&lt;"OPTIONS"&gt;&gt;]</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">languages_provided</p></td>
-<td align="center" valign="top"><p class="table">skip</p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">last_modified</p></td>
-<td align="center" valign="top"><p class="table"><code>undefined</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">malformed_request</p></td>
-<td align="center" valign="top"><p class="table"><code>false</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">moved_permanently</p></td>
-<td align="center" valign="top"><p class="table"><code>false</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">moved_temporarily</p></td>
-<td align="center" valign="top"><p class="table"><code>false</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">multiple_choices</p></td>
-<td align="center" valign="top"><p class="table"><code>false</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">options</p></td>
-<td align="center" valign="top"><p class="table"><code>ok</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">previously_existed</p></td>
-<td align="center" valign="top"><p class="table"><code>false</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">resource_exists</p></td>
-<td align="center" valign="top"><p class="table"><code>true</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">service_available</p></td>
-<td align="center" valign="top"><p class="table"><code>true</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">uri_too_long</p></td>
-<td align="center" valign="top"><p class="table"><code>false</code></p></td>
+<p>All callbacks are optional. Some may become mandatory depending on what other defined callbacks return. The various flowcharts in the next chapter should be a useful to determine which callbacks you need.</p>
+<p>All callbacks take two arguments, the Req object and the State, and return a three-element tuple of the form <code>{Value, Req, State}</code>.</p>
+<p>Nearly all callbacks can also return <code>{stop, Req, State}</code> to stop execution of the request, and <code>{{switch_handler, Module}, Req, State}</code> or <code>{{switch_handler, Module, Opts}, Req, State}</code> to switch to a different handler type. The exceptions are <code>expires</code> <code>generate_etag</code>, <code>last_modified</code> and <code>variances</code>.</p>
+<p>The following table summarizes the callbacks and their default values. If the callback isn&apos;t defined, then the default value will be used. Please look at the flowcharts to find out the result of each return value.</p>
+<p>In the following table, &quot;skip&quot; means the callback is entirely skipped if it is undefined, moving directly to the next step. Similarly, &quot;none&quot; means there is no default value for this callback.</p>
+<table rules="all" width="100%" frame="border"
+ cellspacing="0" cellpadding="4">
+<thead><tr><th>Callback name</th>
+<th>Default value</th>
+</tr></thead><tbody><tr><td>allowed_methods</td>
+<td><code>[&lt;&lt;&quot;GET&quot;&gt;&gt;, &lt;&lt;&quot;HEAD&quot;&gt;&gt;, &lt;&lt;&quot;OPTIONS&quot;&gt;&gt;]</code></td>
</tr>
-<tr>
-<td align="left" valign="top"><p class="table">valid_content_headers</p></td>
-<td align="center" valign="top"><p class="table"><code>true</code></p></td>
+<tr><td>allow_missing_post</td>
+<td><code>true</code></td>
</tr>
-<tr>
-<td align="left" valign="top"><p class="table">valid_entity_length</p></td>
-<td align="center" valign="top"><p class="table"><code>true</code></p></td>
+<tr><td>charsets_provided</td>
+<td>skip</td>
</tr>
-<tr>
-<td align="left" valign="top"><p class="table">variances</p></td>
-<td align="center" valign="top"><p class="table"><code>[]</code></p></td>
+<tr><td>content_types_accepted</td>
+<td>none</td>
</tr>
-</tbody>
-</table>
-</div>
-<div class="paragraph"><p>As you can see, Cowboy tries to move on with the request whenever
-possible by using well thought out default values.</p></div>
-<div class="paragraph"><p>In addition to these, there can be any number of user-defined
-callbacks that are specified through <code>content_types_accepted/2</code>
-and <code>content_types_provided/2</code>. They can take any name, however
-it is recommended to use a separate prefix for the callbacks of
-each function. For example, <code>from_html</code> and <code>to_html</code> indicate
-in the first case that we&#8217;re accepting a resource given as HTML,
-and in the second case that we send one as HTML.</p></div>
-</div>
-</div>
-<div class="sect1">
+<tr><td>content_types_provided</td>
+<td><code>[{{ &lt;&lt;&quot;text&quot;&gt;&gt;, &lt;&lt;&quot;html&quot;&gt;&gt;, &apos;*&apos;}, to_html}]</code></td>
+</tr>
+<tr><td>delete_completed</td>
+<td><code>true</code></td>
+</tr>
+<tr><td>delete_resource</td>
+<td><code>false</code></td>
+</tr>
+<tr><td>expires</td>
+<td><code>undefined</code></td>
+</tr>
+<tr><td>forbidden</td>
+<td><code>false</code></td>
+</tr>
+<tr><td>generate_etag</td>
+<td><code>undefined</code></td>
+</tr>
+<tr><td>is_authorized</td>
+<td><code>true</code></td>
+</tr>
+<tr><td>is_conflict</td>
+<td><code>false</code></td>
+</tr>
+<tr><td>known_methods</td>
+<td><code>[&lt;&lt;&quot;GET&quot;&gt;&gt;, &lt;&lt;&quot;HEAD&quot;&gt;&gt;, &lt;&lt;&quot;POST&quot;&gt;&gt;, &lt;&lt;&quot;PUT&quot;&gt;&gt;, &lt;&lt;&quot;PATCH&quot;&gt;&gt;, &lt;&lt;&quot;DELETE&quot;&gt;&gt;, &lt;&lt;&quot;OPTIONS&quot;&gt;&gt;]</code></td>
+</tr>
+<tr><td>languages_provided</td>
+<td>skip</td>
+</tr>
+<tr><td>last_modified</td>
+<td><code>undefined</code></td>
+</tr>
+<tr><td>malformed_request</td>
+<td><code>false</code></td>
+</tr>
+<tr><td>moved_permanently</td>
+<td><code>false</code></td>
+</tr>
+<tr><td>moved_temporarily</td>
+<td><code>false</code></td>
+</tr>
+<tr><td>multiple_choices</td>
+<td><code>false</code></td>
+</tr>
+<tr><td>options</td>
+<td><code>ok</code></td>
+</tr>
+<tr><td>previously_existed</td>
+<td><code>false</code></td>
+</tr>
+<tr><td>resource_exists</td>
+<td><code>true</code></td>
+</tr>
+<tr><td>service_available</td>
+<td><code>true</code></td>
+</tr>
+<tr><td>uri_too_long</td>
+<td><code>false</code></td>
+</tr>
+<tr><td>valid_content_headers</td>
+<td><code>true</code></td>
+</tr>
+<tr><td>valid_entity_length</td>
+<td><code>true</code></td>
+</tr>
+<tr><td>variances</td>
+<td><code>[]</code></td>
+</tr>
+</tbody></table>
+<p>As you can see, Cowboy tries to move on with the request whenever possible by using well thought out default values.</p>
+<p>In addition to these, there can be any number of user-defined callbacks that are specified through <code>content_types_accepted/2</code> and <code>content_types_provided/2</code>. They can take any name, however it is recommended to use a separate prefix for the callbacks of each function. For example, <code>from_html</code> and <code>to_html</code> indicate in the first case that we&apos;re accepting a resource given as HTML, and in the second case that we send one as HTML.</p>
<h2 id="_meta_data">Meta data</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy will set informative values to the Req object at various
-points of the execution. You can retrieve them by matching the
-Req object directly. The values are defined in the following table:</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"> Key </th>
-<th align="left" valign="top"> Details</th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td align="left" valign="top"><p class="table">media_type</p></td>
-<td align="left" valign="top"><p class="table">The content-type negotiated for the response entity.</p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">language</p></td>
-<td align="left" valign="top"><p class="table">The language negotiated for the response entity.</p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">charset</p></td>
-<td align="left" valign="top"><p class="table">The charset negotiated for the response entity.</p></td>
-</tr>
-</tbody>
-</table>
-</div>
-<div class="paragraph"><p>They can be used to send a proper body with the response to a
-request that used a method other than HEAD or GET.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Cowboy will set informative values to the Req object at various points of the execution. You can retrieve them by matching the Req object directly. The values are defined in the following table:</p>
+<table rules="all" width="100%" frame="border"
+ cellspacing="0" cellpadding="4">
+<thead><tr><th>Key</th>
+<th>Details</th>
+</tr></thead><tbody><tr><td>media_type</td>
+<td>The content-type negotiated for the response entity.</td>
+</tr>
+<tr><td>language</td>
+<td>The language negotiated for the response entity.</td>
+</tr>
+<tr><td>charset</td>
+<td>The charset negotiated for the response entity.</td>
+</tr>
+</tbody></table>
+<p>They can be used to send a proper body with the response to a request that used a method other than HEAD or GET.</p>
<h2 id="_response_headers">Response headers</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy will set response headers automatically over the execution
-of the REST code. They are listed in the following table.</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="left" valign="top"> Details</th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td align="left" valign="top"><p class="table">content-language</p></td>
-<td align="left" valign="top"><p class="table">Language used in the response body</p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">content-type</p></td>
-<td align="left" valign="top"><p class="table">Media type and charset of the response body</p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">etag</p></td>
-<td align="left" valign="top"><p class="table">Etag of the resource</p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">expires</p></td>
-<td align="left" valign="top"><p class="table">Expiration date of the resource</p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">last-modified</p></td>
-<td align="left" valign="top"><p class="table">Last modification date for the resource</p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">location</p></td>
-<td align="left" valign="top"><p class="table">Relative or absolute URI to the requested resource</p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">vary</p></td>
-<td align="left" valign="top"><p class="table">List of headers that may change the representation of the resource</p></td>
-</tr>
-</tbody>
-</table>
-</div>
-</div>
-</div>
+<p>Cowboy will set response headers automatically over the execution of the REST code. They are listed in the following table.</p>
+<table rules="all" width="100%" frame="border"
+ cellspacing="0" cellpadding="4">
+<thead><tr><th>Header name</th>
+<th>Details</th>
+</tr></thead><tbody><tr><td>content-language</td>
+<td>Language used in the response body</td>
+</tr>
+<tr><td>content-type</td>
+<td>Media type and charset of the response body</td>
+</tr>
+<tr><td>etag</td>
+<td>Etag of the resource</td>
+</tr>
+<tr><td>expires</td>
+<td>Expiration date of the resource</td>
+</tr>
+<tr><td>last-modified</td>
+<td>Last modification date for the resource</td>
+</tr>
+<tr><td>location</td>
+<td>Relative or absolute URI to the requested resource</td>
+</tr>
+<tr><td>vary</td>
+<td>List of headers that may change the representation of the resource</td>
+</tr>
+</tbody></table>
+
diff --git a/docs/en/cowboy/2.2/guide/rest_principles/index.html b/docs/en/cowboy/2.2/guide/rest_principles/index.html
index 8ada8c49..7c16c752 100644
--- a/docs/en/cowboy/2.2/guide/rest_principles/index.html
+++ b/docs/en/cowboy/2.2/guide/rest_principles/index.html
@@ -62,153 +62,38 @@
<h1 class="lined-header"><span>REST principles</span></h1>
-<div class="paragraph"><p>This chapter will attempt to define the concepts behind REST
-and explain what makes a service RESTful.</p></div>
-<div class="paragraph"><p>REST is often confused with performing a distinct operation
-depending on the HTTP method, while using more than the GET
-and POST methods. That&#8217;s highly misguided at best.</p></div>
-<div class="paragraph"><p>We will first attempt to define REST and will look at what
-it means in the context of HTTP and the Web.
-For a more in-depth explanation of REST, you can read
-<a href="http://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm">Roy T. Fielding&#8217;s dissertation</a>
-as it does a great job explaining where it comes from and
-what it achieves.</p></div>
-<div class="sect1">
+<p>This chapter will attempt to define the concepts behind REST and explain what makes a service RESTful.</p>
+<p>REST is often confused with performing a distinct operation depending on the HTTP method, while using more than the GET and POST methods. That&apos;s highly misguided at best.</p>
+<p>We will first attempt to define REST and will look at what it means in the context of HTTP and the Web. For a more in-depth explanation of REST, you can read <a href="http://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm">Roy T. Fielding&apos;s dissertation</a> as it does a great job explaining where it comes from and what it achieves.</p>
<h2 id="_rest_architecture">REST architecture</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>REST is a <strong>client-server</strong> architecture. The client and the server
-both have a different set of concerns. The server stores and/or
-manipulates information and makes it available to the user in
-an efficient manner. The client takes that information and
-displays it to the user and/or uses it to perform subsequent
-requests for information. This separation of concerns allows both
-the client and the server to evolve independently as it only
-requires that the interface stays the same.</p></div>
-<div class="paragraph"><p>REST is <strong>stateless</strong>. That means the communication between the
-client and the server always contains all the information needed
-to perform the request. There is no session state in the server,
-it is kept entirely on the client&#8217;s side. If access to a resource
-requires authentication, then the client needs to authenticate
-itself with every request.</p></div>
-<div class="paragraph"><p>REST is <strong>cacheable</strong>. The client, the server and any intermediary
-components can all cache resources in order to improve performance.</p></div>
-<div class="paragraph"><p>REST provides a <strong>uniform interface</strong> between components. This
-simplifies the architecture, as all components follow the same
-rules to speak to one another. It also makes it easier to understand
-the interactions between the different components of the system.
-A number of constraints are required to achieve this. They are
-covered in the rest of the chapter.</p></div>
-<div class="paragraph"><p>REST is a <strong>layered system</strong>. Individual components cannot see
-beyond the immediate layer with which they are interacting. This
-means that a client connecting to an intermediate component, like
-a proxy, has no knowledge of what lies beyond. This allows
-components to be independent and thus easily replaceable or
-extendable.</p></div>
-<div class="paragraph"><p>REST optionally provides <strong>code on demand</strong>. Code may be downloaded
-to extend client functionality. This is optional however because
-the client may not be able to download or run this code, and so
-a REST component cannot rely on it being executed.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>REST is a <strong>client-server</strong> architecture. The client and the server both have a different set of concerns. The server stores and/or manipulates information and makes it available to the user in an efficient manner. The client takes that information and displays it to the user and/or uses it to perform subsequent requests for information. This separation of concerns allows both the client and the server to evolve independently as it only requires that the interface stays the same.</p>
+<p>REST is <strong>stateless</strong>. That means the communication between the client and the server always contains all the information needed to perform the request. There is no session state in the server, it is kept entirely on the client&apos;s side. If access to a resource requires authentication, then the client needs to authenticate itself with every request.</p>
+<p>REST is <strong>cacheable</strong>. The client, the server and any intermediary components can all cache resources in order to improve performance.</p>
+<p>REST provides a <strong>uniform interface</strong> between components. This simplifies the architecture, as all components follow the same rules to speak to one another. It also makes it easier to understand the interactions between the different components of the system. A number of constraints are required to achieve this. They are covered in the rest of the chapter.</p>
+<p>REST is a <strong>layered system</strong>. Individual components cannot see beyond the immediate layer with which they are interacting. This means that a client connecting to an intermediate component, like a proxy, has no knowledge of what lies beyond. This allows components to be independent and thus easily replaceable or extendable.</p>
+<p>REST optionally provides <strong>code on demand</strong>. Code may be downloaded to extend client functionality. This is optional however because the client may not be able to download or run this code, and so a REST component cannot rely on it being executed.</p>
<h2 id="_resources_and_resource_identifiers">Resources and resource identifiers</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A resource is an abstract concept. In a REST system, any information
-that can be named may be a resource. This includes documents, images,
-a collection of resources and any other information. Any information
-that can be the target of an hypertext link can be a resource.</p></div>
-<div class="paragraph"><p>A resource is a conceptual mapping to a set of entities. The set of
-entities evolves over time; a resource doesn&#8217;t. For example, a resource
-can map to "users who have logged in this past month" and another
-to "all users". At some point in time they may map to the same set of
-entities, because all users logged in this past month. But they are
-still different resources. Similarly, if nobody logged in recently,
-then the first resource may map to the empty set. This resource exists
-regardless of the information it maps to.</p></div>
-<div class="paragraph"><p>Resources are identified by uniform resource identifiers, also known
-as URIs. Sometimes internationalized resource identifiers, or IRIs,
-may also be used, but these can be directly translated into a URI.</p></div>
-<div class="paragraph"><p>In practice we will identify two kinds of resources. Individual
-resources map to a set of one element, for example "user Joe".
-Collection of resources map to a set of 0 to N elements,
-for example "all users".</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>A resource is an abstract concept. In a REST system, any information that can be named may be a resource. This includes documents, images, a collection of resources and any other information. Any information that can be the target of an hypertext link can be a resource.</p>
+<p>A resource is a conceptual mapping to a set of entities. The set of entities evolves over time; a resource doesn&apos;t. For example, a resource can map to &quot;users who have logged in this past month&quot; and another to &quot;all users&quot;. At some point in time they may map to the same set of entities, because all users logged in this past month. But they are still different resources. Similarly, if nobody logged in recently, then the first resource may map to the empty set. This resource exists regardless of the information it maps to.</p>
+<p>Resources are identified by uniform resource identifiers, also known as URIs. Sometimes internationalized resource identifiers, or IRIs, may also be used, but these can be directly translated into a URI.</p>
+<p>In practice we will identify two kinds of resources. Individual resources map to a set of one element, for example &quot;user Joe&quot;. Collection of resources map to a set of 0 to N elements, for example &quot;all users&quot;.</p>
<h2 id="_resource_representations">Resource representations</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The representation of a resource is a sequence of bytes associated
-with metadata.</p></div>
-<div class="paragraph"><p>The metadata comes as a list of key-value pairs, where the name
-corresponds to a standard that defines the value&#8217;s structure and
-semantics. With HTTP, the metadata comes in the form of request
-or response headers. The headers' structure and semantics are well
-defined in the HTTP standard. Metadata includes representation
-metadata, resource metadata and control data.</p></div>
-<div class="paragraph"><p>The representation metadata gives information about the
-representation, such as its media type, the date of last
-modification, or even a checksum.</p></div>
-<div class="paragraph"><p>Resource metadata could be link to related resources or
-information about additional representations of the resource.</p></div>
-<div class="paragraph"><p>Control data allows parameterizing the request or response.
-For example, we may only want the representation returned if
-it is more recent than the one we have in cache. Similarly,
-we may want to instruct the client about how it should cache
-the representation. This isn&#8217;t restricted to caching. We may,
-for example, want to store a new representation of a resource
-only if it wasn&#8217;t modified since we first retrieved it.</p></div>
-<div class="paragraph"><p>The data format of a representation is also known as the media
-type. Some media types are intended for direct rendering to the
-user, while others are intended for automated processing. The
-media type is a key component of the REST architecture.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The representation of a resource is a sequence of bytes associated with metadata.</p>
+<p>The metadata comes as a list of key-value pairs, where the name corresponds to a standard that defines the value&apos;s structure and semantics. With HTTP, the metadata comes in the form of request or response headers. The headers&apos; structure and semantics are well defined in the HTTP standard. Metadata includes representation metadata, resource metadata and control data.</p>
+<p>The representation metadata gives information about the representation, such as its media type, the date of last modification, or even a checksum.</p>
+<p>Resource metadata could be link to related resources or information about additional representations of the resource.</p>
+<p>Control data allows parameterizing the request or response. For example, we may only want the representation returned if it is more recent than the one we have in cache. Similarly, we may want to instruct the client about how it should cache the representation. This isn&apos;t restricted to caching. We may, for example, want to store a new representation of a resource only if it wasn&apos;t modified since we first retrieved it.</p>
+<p>The data format of a representation is also known as the media type. Some media types are intended for direct rendering to the user, while others are intended for automated processing. The media type is a key component of the REST architecture.</p>
<h2 id="_self_descriptive_messages">Self-descriptive messages</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Messages must be self-descriptive. That means that the data
-format of a representation must always come with its media
-type (and similarly requesting a resource involves choosing
-the media type of the representation returned). If you are
-sending HTML, then you must say it is HTML by sending the
-media type with the representation. In HTTP this is done
-using the content-type header.</p></div>
-<div class="paragraph"><p>The media type is often an IANA registered media type, like
-<code>text/html</code> or <code>image/png</code>, but does not need to be. Exactly
-two things are important for respecting this constraint: that
-the media type is well specified, and that the sender and
-recipient agree about what the media type refers to.</p></div>
-<div class="paragraph"><p>This means that you can create your own media types, like
-<code>application/x-mine</code>, and that as long as you write the
-specifications for it and that both endpoints agree about
-it then the constraint is respected.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Messages must be self-descriptive. That means that the data format of a representation must always come with its media type (and similarly requesting a resource involves choosing the media type of the representation returned). If you are sending HTML, then you must say it is HTML by sending the media type with the representation. In HTTP this is done using the content-type header.</p>
+<p>The media type is often an IANA registered media type, like <code>text/html</code> or <code>image/png</code>, but does not need to be. Exactly two things are important for respecting this constraint: that the media type is well specified, and that the sender and recipient agree about what the media type refers to.</p>
+<p>This means that you can create your own media types, like <code>application/x-mine</code>, and that as long as you write the specifications for it and that both endpoints agree about it then the constraint is respected.</p>
<h2 id="_hypermedia_as_the_engine_of_application_state">Hypermedia as the engine of application state</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The last constraint is generally where services that claim
-to be RESTful fail. Interactions with a server must be
-entirely driven by hypermedia. The client does not need
-any prior knowledge of the service in order to use it,
-other than an entry point and of course basic understanding
-of the media type of the representations, at the very least
-enough to find and identify hyperlinks and link relations.</p></div>
-<div class="paragraph"><p>To give a simple example, if your service only works with
-the <code>application/json</code> media type then this constraint
-cannot be respected (as there are no concept of links in
-JSON) and thus your service isn&#8217;t RESTful. This is the case
-for the majority of self-proclaimed REST services.</p></div>
-<div class="paragraph"><p>On the other hand if you create a JSON based media type
-that has a concept of links and link relations, then
-your service might be RESTful.</p></div>
-<div class="paragraph"><p>Respecting this constraint means that the entirety of the
-service becomes self-discoverable, not only the resources
-in it, but also the operations you can perform on it. This
-makes clients very thin as there is no need to implement
-anything specific to the service to operate on it.</p></div>
-</div>
-</div>
+<p>The last constraint is generally where services that claim to be RESTful fail. Interactions with a server must be entirely driven by hypermedia. The client does not need any prior knowledge of the service in order to use it, other than an entry point and of course basic understanding of the media type of the representations, at the very least enough to find and identify hyperlinks and link relations.</p>
+<p>To give a simple example, if your service only works with the <code>application/json</code> media type then this constraint cannot be respected (as there are no concept of links in JSON) and thus your service isn&apos;t RESTful. This is the case for the majority of self-proclaimed REST services.</p>
+<p>On the other hand if you create a JSON based media type that has a concept of links and link relations, then your service might be RESTful.</p>
+<p>Respecting this constraint means that the entirety of the service becomes self-discoverable, not only the resources in it, but also the operations you can perform on it. This makes clients very thin as there is no need to implement anything specific to the service to operate on it.</p>
+
diff --git a/docs/en/cowboy/2.2/guide/routing/index.html b/docs/en/cowboy/2.2/guide/routing/index.html
index 441d911c..d393f6c2 100644
--- a/docs/en/cowboy/2.2/guide/routing/index.html
+++ b/docs/en/cowboy/2.2/guide/routing/index.html
@@ -62,261 +62,181 @@
<h1 class="lined-header"><span>Routing</span></h1>
-<div class="paragraph"><p>Cowboy does nothing by default.</p></div>
-<div class="paragraph"><p>To make Cowboy useful, you need to map URIs to Erlang modules that will
-handle the requests. This is called routing.</p></div>
-<div class="paragraph"><p>When Cowboy receives a request, it tries to match the requested host and
-path to the configured routes. When there&#8217;s a match, the route&#8217;s
-associated handler is executed.</p></div>
-<div class="paragraph"><p>Routes need to be compiled before they can be used by Cowboy.
-The result of the compilation is the dispatch rules.</p></div>
-<div class="sect1">
+<p>Cowboy does nothing by default.</p>
+<p>To make Cowboy useful, you need to map URIs to Erlang modules that will handle the requests. This is called routing.</p>
+<p>When Cowboy receives a request, it tries to match the requested host and path to the configured routes. When there&apos;s a match, the route&apos;s associated handler is executed.</p>
+<p>Routes need to be compiled before they can be used by Cowboy. The result of the compilation is the dispatch rules.</p>
<h2 id="_syntax">Syntax</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The general structure for the routes is defined as follow.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The general structure for the routes is defined as follow.</p>
+<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">Routes</span> <span style="color: #990000">=</span> [<span style="color: #009900">Host1</span>, <span style="color: #009900">Host2</span>, <span style="color: #990000">...</span> <span style="color: #009900">HostN</span>]<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Each host contains matching rules for the host along with optional
-constraints, and a list of routes for the path component.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Routes</font> <font color="#990000">=</font> [<font color="#009900">Host1</font>, <font color="#009900">Host2</font>, <font color="#990000">...</font> <font color="#009900">HostN</font>]<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Each host contains matching rules for the host along with optional constraints, and a list of routes for the path component.</p>
+<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">Host1</span> <span style="color: #990000">=</span> {<span style="color: #009900">HostMatch</span>, <span style="color: #009900">PathsList</span>}<span style="color: #990000">.</span>
-<span style="color: #009900">Host2</span> <span style="color: #990000">=</span> {<span style="color: #009900">HostMatch</span>, <span style="color: #009900">Constraints</span>, <span style="color: #009900">PathsList</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>The list of routes for the path component is defined similar to the
-list of hosts.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Host1</font> <font color="#990000">=</font> {<font color="#009900">HostMatch</font>, <font color="#009900">PathsList</font>}<font color="#990000">.</font>
+<font color="#009900">Host2</font> <font color="#990000">=</font> {<font color="#009900">HostMatch</font>, <font color="#009900">Constraints</font>, <font color="#009900">PathsList</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>The list of routes for the path component is defined similar to the list of hosts.</p>
+<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">PathsList</span> <span style="color: #990000">=</span> [<span style="color: #009900">Path1</span>, <span style="color: #009900">Path2</span>, <span style="color: #990000">...</span> <span style="color: #009900">PathN</span>]<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Finally, each path contains matching rules for the path along with
-optional constraints, and gives us the handler module to be used
-along with its initial state.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">PathsList</font> <font color="#990000">=</font> [<font color="#009900">Path1</font>, <font color="#009900">Path2</font>, <font color="#990000">...</font> <font color="#009900">PathN</font>]<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Finally, each path contains matching rules for the path along with optional constraints, and gives us the handler module to be used along with its initial state.</p>
+<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">Path1</span> <span style="color: #990000">=</span> {<span style="color: #009900">PathMatch</span>, <span style="color: #009900">Handler</span>, <span style="color: #009900">InitialState</span>}<span style="color: #990000">.</span>
-<span style="color: #009900">Path2</span> <span style="color: #990000">=</span> {<span style="color: #009900">PathMatch</span>, <span style="color: #009900">Constraints</span>, <span style="color: #009900">Handler</span>, <span style="color: #009900">InitialState</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Continue reading to learn more about the match syntax and the optional
-constraints.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Path1</font> <font color="#990000">=</font> {<font color="#009900">PathMatch</font>, <font color="#009900">Handler</font>, <font color="#009900">InitialState</font>}<font color="#990000">.</font>
+<font color="#009900">Path2</font> <font color="#990000">=</font> {<font color="#009900">PathMatch</font>, <font color="#009900">Constraints</font>, <font color="#009900">Handler</font>, <font color="#009900">InitialState</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Continue reading to learn more about the match syntax and the optional constraints.</p>
<h2 id="_match_syntax">Match syntax</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The match syntax is used to associate host names and paths with their
-respective handlers.</p></div>
-<div class="paragraph"><p>The match syntax is the same for host and path with a few subtleties.
-Indeed, the segments separator is different, and the host is matched
-starting from the last segment going to the first. All examples will
-feature both host and path match rules and explain the differences
-when encountered.</p></div>
-<div class="paragraph"><p>Excluding special values that we will explain at the end of this section,
-the simplest match value is a host or a path. It can be given as either
-a <code>string()</code> or a <code>binary()</code>.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The match syntax is used to associate host names and paths with their respective handlers.</p>
+<p>The match syntax is the same for host and path with a few subtleties. Indeed, the segments separator is different, and the host is matched starting from the last segment going to the first. All examples will feature both host and path match rules and explain the differences when encountered.</p>
+<p>Excluding special values that we will explain at the end of this section, the simplest match value is a host or a path. It can be given as either a <code>string()</code> or a <code>binary()</code>.</p>
+<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">PathMatch1</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"/"</span><span style="color: #990000">.</span>
-<span style="color: #009900">PathMatch2</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"/path/to/resource"</span><span style="color: #990000">.</span>
-
-<span style="color: #009900">HostMatch1</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"cowboy.example.org"</span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>As you can see, all paths defined this way must start with a slash
-character. Note that these two paths are identical as far as routing
-is concerned.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">PathMatch1</font> <font color="#990000">=</font> <font color="#FF0000">"/"</font><font color="#990000">.</font>
+<font color="#009900">PathMatch2</font> <font color="#990000">=</font> <font color="#FF0000">"/path/to/resource"</font><font color="#990000">.</font>
+
+<font color="#009900">HostMatch1</font> <font color="#990000">=</font> <font color="#FF0000">"cowboy.example.org"</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>As you can see, all paths defined this way must start with a slash character. Note that these two paths are identical as far as routing is concerned.</p>
+<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">PathMatch2</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"/path/to/resource"</span><span style="color: #990000">.</span>
-<span style="color: #009900">PathMatch3</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"/path/to/resource/"</span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Hosts with and without a trailing dot are equivalent for routing.
-Similarly, hosts with and without a leading dot are also equivalent.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">PathMatch2</font> <font color="#990000">=</font> <font color="#FF0000">"/path/to/resource"</font><font color="#990000">.</font>
+<font color="#009900">PathMatch3</font> <font color="#990000">=</font> <font color="#FF0000">"/path/to/resource/"</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Hosts with and without a trailing dot are equivalent for routing. Similarly, hosts with and without a leading dot are also equivalent.</p>
+<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">HostMatch1</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"cowboy.example.org"</span><span style="color: #990000">.</span>
-<span style="color: #009900">HostMatch2</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"cowboy.example.org."</span><span style="color: #990000">.</span>
-<span style="color: #009900">HostMatch3</span> <span style="color: #990000">=</span> <span style="color: #FF0000">".cowboy.example.org"</span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>It is possible to extract segments of the host and path and to store
-the values in the <code>Req</code> object for later use. We call these kind of
-values bindings.</p></div>
-<div class="paragraph"><p>The syntax for bindings is very simple. A segment that begins with
-the <code>:</code> character means that what follows until the end of the segment
-is the name of the binding in which the segment value will be stored.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">HostMatch1</font> <font color="#990000">=</font> <font color="#FF0000">"cowboy.example.org"</font><font color="#990000">.</font>
+<font color="#009900">HostMatch2</font> <font color="#990000">=</font> <font color="#FF0000">"cowboy.example.org."</font><font color="#990000">.</font>
+<font color="#009900">HostMatch3</font> <font color="#990000">=</font> <font color="#FF0000">".cowboy.example.org"</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>It is possible to extract segments of the host and path and to store the values in the <code>Req</code> object for later use. We call these kind of values bindings.</p>
+<p>The syntax for bindings is very simple. A segment that begins with the <code>:</code> character means that what follows until the end of the segment is the name of the binding in which the segment value will be stored.</p>
+<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">PathMatch</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"/hats/:name/prices"</span><span style="color: #990000">.</span>
-<span style="color: #009900">HostMatch</span> <span style="color: #990000">=</span> <span style="color: #FF0000">":subdomain.example.org"</span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>If these two end up matching when routing, you will end up with two
-bindings defined, <code>subdomain</code> and <code>name</code>, each containing the
-segment value where they were defined. For example, the URL
-<code>http://test.example.org/hats/wild_cowboy_legendary/prices</code> will
-result in having the value <code>test</code> bound to the name <code>subdomain</code>
-and the value <code>wild_cowboy_legendary</code> bound to the name <code>name</code>.
-They can later be retrieved using <code>cowboy_req:binding/{2,3}</code>. The
-binding name must be given as an atom.</p></div>
-<div class="paragraph"><p>There is a special binding name you can use to mimic the underscore
-variable in Erlang. Any match against the <code>_</code> binding will succeed
-but the data will be discarded. This is especially useful for
-matching against many domain names in one go.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">PathMatch</font> <font color="#990000">=</font> <font color="#FF0000">"/hats/:name/prices"</font><font color="#990000">.</font>
+<font color="#009900">HostMatch</font> <font color="#990000">=</font> <font color="#FF0000">":subdomain.example.org"</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>If these two end up matching when routing, you will end up with two bindings defined, <code>subdomain</code> and <code>name</code>, each containing the segment value where they were defined. For example, the URL <code>http://test.example.org/hats/wild_cowboy_legendary/prices</code> will result in having the value <code>test</code> bound to the name <code>subdomain</code> and the value <code>wild_cowboy_legendary</code> bound to the name <code>name</code>. They can later be retrieved using <code>cowboy_req:binding/{2,3}</code>. The binding name must be given as an atom.</p>
+<p>There is a special binding name you can use to mimic the underscore variable in Erlang. Any match against the <code>_</code> binding will succeed but the data will be discarded. This is especially useful for matching against many domain names in one go.</p>
+<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">HostMatch</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"ninenines.:_"</span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Similarly, it is possible to have optional segments. Anything
-between brackets is optional.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">HostMatch</font> <font color="#990000">=</font> <font color="#FF0000">"ninenines.:_"</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Similarly, it is possible to have optional segments. Anything between brackets is optional.</p>
+<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">PathMatch</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"/hats/[page/:number]"</span><span style="color: #990000">.</span>
-<span style="color: #009900">HostMatch</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"[www.]ninenines.eu"</span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>You can also have imbricated optional segments.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">PathMatch</font> <font color="#990000">=</font> <font color="#FF0000">"/hats/[page/:number]"</font><font color="#990000">.</font>
+<font color="#009900">HostMatch</font> <font color="#990000">=</font> <font color="#FF0000">"[www.]ninenines.eu"</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>You can also have imbricated optional segments.</p>
+<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">PathMatch</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"/hats/[page/[:number]]"</span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>You can retrieve the rest of the host or path using <code>[...]</code>.
-In the case of hosts it will match anything before, in the case
-of paths anything after the previously matched segments. It is
-a special case of optional segments, in that it can have
-zero, one or many segments. You can then find the segments using
-<code>cowboy_req:host_info/1</code> and <code>cowboy_req:path_info/1</code> respectively.
-They will be represented as a list of segments.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">PathMatch</font> <font color="#990000">=</font> <font color="#FF0000">"/hats/[page/[:number]]"</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>You can retrieve the rest of the host or path using <code>[...]</code>. In the case of hosts it will match anything before, in the case of paths anything after the previously matched segments. It is a special case of optional segments, in that it can have zero, one or many segments. You can then find the segments using <code>cowboy_req:host_info/1</code> and <code>cowboy_req:path_info/1</code> respectively. They will be represented as a list of segments.</p>
+<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">PathMatch</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"/hats/[...]"</span><span style="color: #990000">.</span>
-<span style="color: #009900">HostMatch</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"[...]ninenines.eu"</span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>If a binding appears twice in the routing rules, then the match
-will succeed only if they share the same value. This copies the
-Erlang pattern matching behavior.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">PathMatch</font> <font color="#990000">=</font> <font color="#FF0000">"/hats/[...]"</font><font color="#990000">.</font>
+<font color="#009900">HostMatch</font> <font color="#990000">=</font> <font color="#FF0000">"[...]ninenines.eu"</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>If a binding appears twice in the routing rules, then the match will succeed only if they share the same value. This copies the Erlang pattern matching behavior.</p>
+<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">PathMatch</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"/hats/:name/:name"</span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>This is also true when an optional segment is present. In this
-case the two values must be identical only if the segment is
-available.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">PathMatch</font> <font color="#990000">=</font> <font color="#FF0000">"/hats/:name/:name"</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>This is also true when an optional segment is present. In this case the two values must be identical only if the segment is available.</p>
+<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">PathMatch</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"/hats/:name/[:name]"</span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>If a binding is defined in both the host and path, then they must
-also share the same value.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">PathMatch</font> <font color="#990000">=</font> <font color="#FF0000">"/hats/:name/[:name]"</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>If a binding is defined in both the host and path, then they must also share the same value.</p>
+<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">PathMatch</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"/:user/[...]"</span><span style="color: #990000">.</span>
-<span style="color: #009900">HostMatch</span> <span style="color: #990000">=</span> <span style="color: #FF0000">":user.github.com"</span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Finally, there are two special match values that can be used. The
-first is the atom <code>'_'</code> which will match any host or path.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">PathMatch</font> <font color="#990000">=</font> <font color="#FF0000">"/:user/[...]"</font><font color="#990000">.</font>
+<font color="#009900">HostMatch</font> <font color="#990000">=</font> <font color="#FF0000">":user.github.com"</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Finally, there are two special match values that can be used. The first is the atom <code>&apos;_&apos;</code> which will match any host or path.</p>
+<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">PathMatch</span> <span style="color: #990000">=</span> <span style="color: #FF6600">'_'</span><span style="color: #990000">.</span>
-<span style="color: #009900">HostMatch</span> <span style="color: #990000">=</span> <span style="color: #FF6600">'_'</span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>The second is the special host match <code>"*"</code> which will match the
-wildcard path, generally used alongside the <code>OPTIONS</code> method.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">PathMatch</font> <font color="#990000">=</font> <font color="#FF6600">'_'</font><font color="#990000">.</font>
+<font color="#009900">HostMatch</font> <font color="#990000">=</font> <font color="#FF6600">'_'</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>The second is the special host match <code>&quot;*&quot;</code> which will match the wildcard path, generally used alongside the <code>OPTIONS</code> method.</p>
+<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">HostMatch</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"*"</span><span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">HostMatch</font> <font color="#990000">=</font> <font color="#FF0000">"*"</font><font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_constraints">Constraints</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>After the matching has completed, the resulting bindings can be tested
-against a set of constraints. Constraints are only tested when the
-binding is defined. They run in the order you defined them. The match
-will succeed only if they all succeed. If the match fails, then Cowboy
-tries the next route in the list.</p></div>
-<div class="paragraph"><p>The format used for constraints is the same as match functions in
-<code>cowboy_req</code>: they are provided as a list of fields which may have
-one or more constraints. While the router accepts the same format,
-it will skip fields with no constraints and will also ignore default
-values, if any.</p></div>
-<div class="paragraph"><p>Read more about <a href="../constraints">constraints</a>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>After the matching has completed, the resulting bindings can be tested against a set of constraints. Constraints are only tested when the binding is defined. They run in the order you defined them. The match will succeed only if they all succeed. If the match fails, then Cowboy tries the next route in the list.</p>
+<p>The format used for constraints is the same as match functions in <code>cowboy_req</code>: they are provided as a list of fields which may have one or more constraints. While the router accepts the same format, it will skip fields with no constraints and will also ignore default values, if any.</p>
+<p>Read more about <a href="../constraints">constraints</a>.</p>
<h2 id="_compilation">Compilation</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The routes must be compiled before Cowboy can use them. The compilation
-step normalizes the routes to simplify the code and speed up the
-execution, but the routes are still looked up one by one in the end.
-Faster compilation strategies could be to compile the routes directly
-to Erlang code, but would require heavier dependencies.</p></div>
-<div class="paragraph"><p>To compile routes, just call the appropriate function:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The routes must be compiled before Cowboy can use them. The compilation step normalizes the routes to simplify the code and speed up the execution, but the routes are still looked up one by one in the end. Faster compilation strategies could be to compile the routes directly to Erlang code, but would require heavier dependencies.</p>
+<p>To compile routes, just call the appropriate function:</p>
+<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">Dispatch</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_router:compile</span></span>([
- <span style="font-style: italic"><span style="color: #9A1900">%% {HostMatch, list({PathMatch, Handler, InitialState})}</span></span>
- {<span style="color: #FF6600">'_'</span>, [{<span style="color: #FF6600">'_'</span>, <span style="color: #FF6600">my_handler</span>, #{}}]}
+<pre><tt><font color="#009900">Dispatch</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_router:compile</font></b>([
+ <i><font color="#9A1900">%% {HostMatch, list({PathMatch, Handler, InitialState})}</font></i>
+ {<font color="#FF6600">'_'</font>, [{<font color="#FF6600">'_'</font>, <font color="#FF6600">my_handler</font>, #{}}]}
]),
-<span style="font-style: italic"><span style="color: #9A1900">%% Name, NbAcceptors, TransOpts, ProtoOpts</span></span>
-<span style="font-weight: bold"><span style="color: #000000">cowboy:start_clear</span></span>(<span style="color: #FF6600">my_http_listener</span>,
- [{<span style="color: #FF6600">port</span>, <span style="color: #993399">8080</span>}],
- #{<span style="color: #0000FF">env</span> <span style="color: #990000">=&gt;</span> #{<span style="color: #0000FF">dispatch</span> <span style="color: #990000">=&gt;</span> <span style="color: #009900">Dispatch</span>}}
-)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<i><font color="#9A1900">%% Name, NbAcceptors, TransOpts, ProtoOpts</font></i>
+<b><font color="#000000">cowboy:start_clear</font></b>(<font color="#FF6600">my_http_listener</font>,
+ [{<font color="#FF6600">port</font>, <font color="#993399">8080</font>}],
+ #{<font color="#0000FF">env</font> <font color="#990000">=&gt;</font> #{<font color="#0000FF">dispatch</font> <font color="#990000">=&gt;</font> <font color="#009900">Dispatch</font>}}
+)<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_live_update">Live update</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>You can use the <code>cowboy:set_env/3</code> function for updating the dispatch
-list used by routing. This will apply to all new connections accepted
-by the listener:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>You can use the <code>cowboy:set_env/3</code> function for updating the dispatch list used by routing. This will apply to all new connections accepted by the listener:</p>
+<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">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>
+<pre><tt><font color="#009900">Dispatch</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_router:compile</font></b>(<font color="#009900">Routes</font>),
+<b><font color="#000000">cowboy:set_env</font></b>(<font color="#FF6600">my_http_listener</font>, <font color="#FF6600">dispatch</font>, <font color="#009900">Dispatch</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Note that you need to compile the routes again before updating.</p>
+
diff --git a/docs/en/cowboy/2.2/guide/specs/index.html b/docs/en/cowboy/2.2/guide/specs/index.html
index 0cfcdcf2..265d1a3a 100644
--- a/docs/en/cowboy/2.2/guide/specs/index.html
+++ b/docs/en/cowboy/2.2/guide/specs/index.html
@@ -62,844 +62,339 @@
<h1 class="lined-header"><span>HTTP and other specifications</span></h1>
-<div class="paragraph"><p>This chapter intends to list all the specification documents
-for or related to HTTP.</p></div>
-<div class="sect1">
+<p>This chapter intends to list all the specification documents for or related to HTTP.</p>
<h2 id="_http">HTTP</h2>
-<div class="sectionbody">
-<div class="sect3">
<h4 id="_iana_registries">IANA Registries</h4>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="https://www.iana.org/assignments/http-methods/http-methods.xhtml">HTTP Method Registry</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml">HTTP Status Code Registry</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.iana.org/assignments/message-headers/message-headers.xhtml">Message Headers</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.iana.org/assignments/http-parameters/http-parameters.xhtml">HTTP Parameters</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.iana.org/assignments/http-alt-svc-parameters/http-alt-svc-parameters.xhtml">HTTP Alt-Svc Parameter Registry</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.iana.org/assignments/http-authschemes/http-authschemes.xhtml">HTTP Authentication Scheme Registry</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.iana.org/assignments/http-cache-directives/http-cache-directives.xhtml">HTTP Cache Directive Registry</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.iana.org/assignments/http-dig-alg/http-dig-alg.xhtml">HTTP Digest Algorithm Values</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.iana.org/assignments/hoba-device-identifiers/hoba-device-identifiers.xhtml">HTTP Origin-Bound Authentication Device Identifier Types</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.iana.org/assignments/http-upgrade-tokens/http-upgrade-tokens.xhtml">HTTP Upgrade Token Registry</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.iana.org/assignments/http-warn-codes/http-warn-codes.xhtml">HTTP Warn Codes</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.iana.org/assignments/http2-parameters/http2-parameters.xhtml">HTTP/2 Parameters</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.ietf.org/assignments/websocket/websocket.xml">WebSocket Protocol Registries</a>
-</p>
-</li>
-</ul></div>
-</div>
-<div class="sect3">
+<ul><li><a href="https://www.iana.org/assignments/http-methods/http-methods.xhtml">HTTP Method Registry</a>
+</li>
+<li><a href="https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml">HTTP Status Code Registry</a>
+</li>
+<li><a href="https://www.iana.org/assignments/message-headers/message-headers.xhtml">Message Headers</a>
+</li>
+<li><a href="https://www.iana.org/assignments/http-parameters/http-parameters.xhtml">HTTP Parameters</a>
+</li>
+<li><a href="https://www.iana.org/assignments/http-alt-svc-parameters/http-alt-svc-parameters.xhtml">HTTP Alt-Svc Parameter Registry</a>
+</li>
+<li><a href="https://www.iana.org/assignments/http-authschemes/http-authschemes.xhtml">HTTP Authentication Scheme Registry</a>
+</li>
+<li><a href="https://www.iana.org/assignments/http-cache-directives/http-cache-directives.xhtml">HTTP Cache Directive Registry</a>
+</li>
+<li><a href="https://www.iana.org/assignments/http-dig-alg/http-dig-alg.xhtml">HTTP Digest Algorithm Values</a>
+</li>
+<li><a href="https://www.iana.org/assignments/hoba-device-identifiers/hoba-device-identifiers.xhtml">HTTP Origin-Bound Authentication Device Identifier Types</a>
+</li>
+<li><a href="https://www.iana.org/assignments/http-upgrade-tokens/http-upgrade-tokens.xhtml">HTTP Upgrade Token Registry</a>
+</li>
+<li><a href="https://www.iana.org/assignments/http-warn-codes/http-warn-codes.xhtml">HTTP Warn Codes</a>
+</li>
+<li><a href="https://www.iana.org/assignments/http2-parameters/http2-parameters.xhtml">HTTP/2 Parameters</a>
+</li>
+<li><a href="https://www.ietf.org/assignments/websocket/websocket.xml">WebSocket Protocol Registries</a>
+</li>
+</ul>
<h4 id="_current">Current</h4>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="http://www.w3.org/TR/cors/">CORS</a>: Cross-Origin Resource Sharing
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/CSP2/">CSP2</a>: Content Security Policy Level 2
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/tracking-dnt/">DNT</a>: Tracking Preference Expression (DNT)
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/eventsource/">eventsource</a>: Server-Sent Events
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.w3.org/TR/html4/interact/forms.html#h-17.13.4">Form content types</a>: Form content types
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.w3.org/TR/preload/">Preload</a>: Preload
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm">REST</a>: Fielding&#8217;s Dissertation
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc1945">RFC 1945</a>: HTTP/1.0
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc1951">RFC 1951</a>: DEFLATE Compressed Data Format Specification version 1.3
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc1952">RFC 1952</a>: GZIP file format specification version 4.3
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc2046#section-5.1">RFC 2046</a>: Multipart media type (in MIME Part Two: Media Types)
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc2295">RFC 2295</a>: Transparent Content Negotiation in HTTP
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc2296">RFC 2296</a>: HTTP Remote Variant Selection Algorithm: RVSA/1.0
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc2817">RFC 2817</a>: Upgrading to TLS Within HTTP/1.1
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc2818">RFC 2818</a>: HTTP Over TLS
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc3230">RFC 3230</a>: Instance Digests in HTTP
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc4559">RFC 4559</a>: SPNEGO-based Kerberos and NTLM HTTP Authentication in Microsoft Windows
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc5789">RFC 5789</a>: PATCH Method for HTTP
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc5843">RFC 5843</a>: Additional Hash Algorithms for HTTP Instance Digests
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc5861">RFC 5861</a>: HTTP Cache-Control Extensions for Stale Content
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc5988">RFC 5988</a>: Web Linking
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6265">RFC 6265</a>: HTTP State Management Mechanism
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6266">RFC 6266</a>: Use of the Content-Disposition Header Field
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6454">RFC 6454</a>: The Web Origin Concept
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6455">RFC 6455</a>: The WebSocket Protocol
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6585">RFC 6585</a>: Additional HTTP Status Codes
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6750">RFC 6750</a>: The OAuth 2.0 Authorization Framework: Bearer Token Usage
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6797">RFC 6797</a>: HTTP Strict Transport Security (HSTS)
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6903">RFC 6903</a>: Additional Link Relation Types
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7034">RFC 7034</a>: HTTP Header Field X-Frame-Options
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7089">RFC 7089</a>: Time-Based Access to Resource States: Memento
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7230">RFC 7230</a>: HTTP/1.1 Message Syntax and Routing
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7231">RFC 7231</a>: HTTP/1.1 Semantics and Content
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>: HTTP/1.1 Conditional Requests
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7233">RFC 7233</a>: HTTP/1.1 Range Requests
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7234">RFC 7234</a>: HTTP/1.1 Caching
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7235">RFC 7235</a>: HTTP/1.1 Authentication
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7239">RFC 7239</a>: Forwarded HTTP Extension
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7240">RFC 7240</a>: Prefer Header for HTTP
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7469">RFC 7469</a>: Public Key Pinning Extension for HTTP
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7486">RFC 7486</a>: HTTP Origin-Bound Authentication (HOBA)
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7538">RFC 7538</a>: HTTP Status Code 308 (Permanent Redirect)
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7540">RFC 7540</a>: Hypertext Transfer Protocol Version 2 (HTTP/2)
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7541">RFC 7541</a>: HPACK: Header Compression for HTTP/2
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7578">RFC 7578</a>: Returning Values from Forms: multipart/form-data
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7615">RFC 7615</a>: HTTP Authentication-Info and Proxy-Authentication-Info Response Header Fields
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7616">RFC 7616</a>: HTTP Digest Access Authentication
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7617">RFC 7617</a>: The <em>Basic</em> HTTP Authentication Scheme
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7639">RFC 7639</a>: The ALPN HTTP Header Field
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7692">RFC 7692</a>: Compression Extensions for WebSocket
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7694">RFC 7694</a>: HTTP Client-Initiated Content-Encoding
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7725">RFC 7725</a>: An HTTP Status Code to Report Legal Obstacles
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7804">RFC 7804</a>: Salted Challenge Response HTTP Authentication Mechanism
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7838">RFC 7838</a>: HTTP Alternative Services
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7932">RFC 7932</a>: Brotli Compressed Data Format
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7936">RFC 7936</a>: Clarifying Registry Procedures for the WebSocket Subprotocol Name Registry
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc8053">RFC 8053</a>: HTTP Authentication Extensions for Interactive Clients
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc8164">RFC 8164</a>: Opportunistic Security for HTTP/2
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc8187">RFC 8187</a>: Indicating Character Encoding and Language for HTTP Header Field Parameters
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc8188">RFC 8188</a>: Encrypted Content-Encoding for HTTP
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc8246">RFC 8246</a>: HTTP Immutable Responses
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc8297">RFC 8297</a>: An HTTP Status Code for Indicating Hints
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.w3.org/TR/webmention/">Webmention</a>: Webmention
-</p>
-</li>
-</ul></div>
-</div>
-<div class="sect3">
+<ul><li><a href="http://www.w3.org/TR/cors/">CORS</a>: Cross-Origin Resource Sharing
+</li>
+<li><a href="http://www.w3.org/TR/CSP2/">CSP2</a>: Content Security Policy Level 2
+</li>
+<li><a href="http://www.w3.org/TR/tracking-dnt/">DNT</a>: Tracking Preference Expression (DNT)
+</li>
+<li><a href="http://www.w3.org/TR/eventsource/">eventsource</a>: Server-Sent Events
+</li>
+<li><a href="https://www.w3.org/TR/html4/interact/forms.html#h-17.13.4">Form content types</a>: Form content types
+</li>
+<li><a href="https://www.w3.org/TR/preload/">Preload</a>: Preload
+</li>
+<li><a href="http://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm">REST</a>: Fielding&apos;s Dissertation
+</li>
+<li><a href="https://tools.ietf.org/html/rfc1945">RFC 1945</a>: HTTP/1.0
+</li>
+<li><a href="https://tools.ietf.org/html/rfc1951">RFC 1951</a>: DEFLATE Compressed Data Format Specification version 1.3
+</li>
+<li><a href="https://tools.ietf.org/html/rfc1952">RFC 1952</a>: GZIP file format specification version 4.3
+</li>
+<li><a href="https://tools.ietf.org/html/rfc2046#section-5.1">RFC 2046</a>: Multipart media type (in MIME Part Two: Media Types)
+</li>
+<li><a href="https://tools.ietf.org/html/rfc2295">RFC 2295</a>: Transparent Content Negotiation in HTTP
+</li>
+<li><a href="https://tools.ietf.org/html/rfc2296">RFC 2296</a>: HTTP Remote Variant Selection Algorithm: RVSA/1.0
+</li>
+<li><a href="https://tools.ietf.org/html/rfc2817">RFC 2817</a>: Upgrading to TLS Within HTTP/1.1
+</li>
+<li><a href="https://tools.ietf.org/html/rfc2818">RFC 2818</a>: HTTP Over TLS
+</li>
+<li><a href="https://tools.ietf.org/html/rfc3230">RFC 3230</a>: Instance Digests in HTTP
+</li>
+<li><a href="https://tools.ietf.org/html/rfc4559">RFC 4559</a>: SPNEGO-based Kerberos and NTLM HTTP Authentication in Microsoft Windows
+</li>
+<li><a href="https://tools.ietf.org/html/rfc5789">RFC 5789</a>: PATCH Method for HTTP
+</li>
+<li><a href="https://tools.ietf.org/html/rfc5843">RFC 5843</a>: Additional Hash Algorithms for HTTP Instance Digests
+</li>
+<li><a href="https://tools.ietf.org/html/rfc5861">RFC 5861</a>: HTTP Cache-Control Extensions for Stale Content
+</li>
+<li><a href="https://tools.ietf.org/html/rfc5988">RFC 5988</a>: Web Linking
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6265">RFC 6265</a>: HTTP State Management Mechanism
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6266">RFC 6266</a>: Use of the Content-Disposition Header Field
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6454">RFC 6454</a>: The Web Origin Concept
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6455">RFC 6455</a>: The WebSocket Protocol
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6585">RFC 6585</a>: Additional HTTP Status Codes
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6750">RFC 6750</a>: The OAuth 2.0 Authorization Framework: Bearer Token Usage
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6797">RFC 6797</a>: HTTP Strict Transport Security (HSTS)
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6903">RFC 6903</a>: Additional Link Relation Types
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7034">RFC 7034</a>: HTTP Header Field X-Frame-Options
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7089">RFC 7089</a>: Time-Based Access to Resource States: Memento
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7230">RFC 7230</a>: HTTP/1.1 Message Syntax and Routing
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7231">RFC 7231</a>: HTTP/1.1 Semantics and Content
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>: HTTP/1.1 Conditional Requests
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7233">RFC 7233</a>: HTTP/1.1 Range Requests
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7234">RFC 7234</a>: HTTP/1.1 Caching
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7235">RFC 7235</a>: HTTP/1.1 Authentication
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7239">RFC 7239</a>: Forwarded HTTP Extension
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7240">RFC 7240</a>: Prefer Header for HTTP
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7469">RFC 7469</a>: Public Key Pinning Extension for HTTP
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7486">RFC 7486</a>: HTTP Origin-Bound Authentication (HOBA)
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7538">RFC 7538</a>: HTTP Status Code 308 (Permanent Redirect)
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7540">RFC 7540</a>: Hypertext Transfer Protocol Version 2 (HTTP/2)
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7541">RFC 7541</a>: HPACK: Header Compression for HTTP/2
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7578">RFC 7578</a>: Returning Values from Forms: multipart/form-data
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7615">RFC 7615</a>: HTTP Authentication-Info and Proxy-Authentication-Info Response Header Fields
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7616">RFC 7616</a>: HTTP Digest Access Authentication
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7617">RFC 7617</a>: The <em>Basic</em> HTTP Authentication Scheme
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7639">RFC 7639</a>: The ALPN HTTP Header Field
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7692">RFC 7692</a>: Compression Extensions for WebSocket
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7694">RFC 7694</a>: HTTP Client-Initiated Content-Encoding
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7725">RFC 7725</a>: An HTTP Status Code to Report Legal Obstacles
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7804">RFC 7804</a>: Salted Challenge Response HTTP Authentication Mechanism
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7838">RFC 7838</a>: HTTP Alternative Services
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7932">RFC 7932</a>: Brotli Compressed Data Format
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7936">RFC 7936</a>: Clarifying Registry Procedures for the WebSocket Subprotocol Name Registry
+</li>
+<li><a href="https://tools.ietf.org/html/rfc8053">RFC 8053</a>: HTTP Authentication Extensions for Interactive Clients
+</li>
+<li><a href="https://tools.ietf.org/html/rfc8164">RFC 8164</a>: Opportunistic Security for HTTP/2
+</li>
+<li><a href="https://tools.ietf.org/html/rfc8187">RFC 8187</a>: Indicating Character Encoding and Language for HTTP Header Field Parameters
+</li>
+<li><a href="https://tools.ietf.org/html/rfc8188">RFC 8188</a>: Encrypted Content-Encoding for HTTP
+</li>
+<li><a href="https://tools.ietf.org/html/rfc8246">RFC 8246</a>: HTTP Immutable Responses
+</li>
+<li><a href="https://tools.ietf.org/html/rfc8297">RFC 8297</a>: An HTTP Status Code for Indicating Hints
+</li>
+<li><a href="https://www.w3.org/TR/webmention/">Webmention</a>: Webmention
+</li>
+</ul>
<h4 id="_upcoming">Upcoming</h4>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="https://www.w3.org/TR/csp-cookies/">Content Security Policy: Cookie Controls</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.w3.org/TR/csp-embedded-enforcement/">Content Security Policy: Embedded Enforcement</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.w3.org/TR/CSP3/">Content Security Policy Level 3</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.w3.org/TR/csp-pinning/">Content Security Policy Pinning</a>
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/referrer-policy/">Referrer Policy</a>
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/UISecurity/">User Interface Security Directives for Content Security Policy</a>
-</p>
-</li>
-</ul></div>
-</div>
-<div class="sect3">
+<ul><li><a href="https://www.w3.org/TR/csp-cookies/">Content Security Policy: Cookie Controls</a>
+</li>
+<li><a href="https://www.w3.org/TR/csp-embedded-enforcement/">Content Security Policy: Embedded Enforcement</a>
+</li>
+<li><a href="https://www.w3.org/TR/CSP3/">Content Security Policy Level 3</a>
+</li>
+<li><a href="https://www.w3.org/TR/csp-pinning/">Content Security Policy Pinning</a>
+</li>
+<li><a href="http://www.w3.org/TR/referrer-policy/">Referrer Policy</a>
+</li>
+<li><a href="http://www.w3.org/TR/UISecurity/">User Interface Security Directives for Content Security Policy</a>
+</li>
+</ul>
<h4 id="_informative">Informative</h4>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="http://www.w3.org/TR/webarch/">Architecture of the World Wide Web</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc2936">RFC 2936</a>: HTTP MIME Type Handler Detection
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc2964">RFC 2964</a>: Use of HTTP State Management
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc3143">RFC 3143</a>: Known HTTP Proxy/Caching Problems
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6202">RFC 6202</a>: Known Issues and Best Practices for the Use of Long Polling and Streaming in Bidirectional HTTP
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6838">RFC 6838</a>: Media Type Specifications and Registration Procedures
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7478">RFC 7478</a>: Web Real-Time Communication Use Cases and Requirements
-</p>
-</li>
-</ul></div>
-</div>
-<div class="sect3">
+<ul><li><a href="http://www.w3.org/TR/webarch/">Architecture of the World Wide Web</a>
+</li>
+<li><a href="https://tools.ietf.org/html/rfc2936">RFC 2936</a>: HTTP MIME Type Handler Detection
+</li>
+<li><a href="https://tools.ietf.org/html/rfc2964">RFC 2964</a>: Use of HTTP State Management
+</li>
+<li><a href="https://tools.ietf.org/html/rfc3143">RFC 3143</a>: Known HTTP Proxy/Caching Problems
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6202">RFC 6202</a>: Known Issues and Best Practices for the Use of Long Polling and Streaming in Bidirectional HTTP
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6838">RFC 6838</a>: Media Type Specifications and Registration Procedures
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7478">RFC 7478</a>: Web Real-Time Communication Use Cases and Requirements
+</li>
+</ul>
<h4 id="_related">Related</h4>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="http://www.w3.org/TR/app-uri/">app: URL Scheme</a>
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/beacon/">Beacon</a>
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/FileAPI/">File API</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc8030">Generic Event Delivery Using HTTP Push</a>
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/capability-urls/">Good Practices for Capability URLs</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://html.spec.whatwg.org/multipage/">HTML Living Standard</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://developers.whatwg.org/">HTML Living Standard for Web developers</a>
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/html401/">HTML4.01</a>
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/html5/">HTML5</a>
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/html51/">HTML5.1</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.w3.org/TR/html52/">HTML5.2</a>
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/media-frags/">Media Fragments URI 1.0</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6690">RFC 6690</a>: Constrained RESTful Environments (CoRE) Link Format
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7807">RFC 7807</a>: Problem Details for HTTP APIs
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6906">RFC 6906</a>: The <em>profile</em> Link Relation Type
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/SRI/">Subresource Integrity</a>
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/tracking-compliance/">Tracking Compliance and Scope</a>
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/media-frags-reqs/">Use cases and requirements for Media Fragments</a>
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/webrtc/">WebRTC 1.0: Real-time Communication Between Browsers</a>
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/websockets/">Websocket API</a>
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/XMLHttpRequest/">XMLHttpRequest Level 1</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://xhr.spec.whatwg.org/">XMLHttpRequest Living Standard</a>
-</p>
-</li>
-</ul></div>
-</div>
-<div class="sect3">
+<ul><li><a href="http://www.w3.org/TR/app-uri/">app: URL Scheme</a>
+</li>
+<li><a href="http://www.w3.org/TR/beacon/">Beacon</a>
+</li>
+<li><a href="http://www.w3.org/TR/FileAPI/">File API</a>
+</li>
+<li><a href="https://tools.ietf.org/html/rfc8030">Generic Event Delivery Using HTTP Push</a>
+</li>
+<li><a href="http://www.w3.org/TR/capability-urls/">Good Practices for Capability URLs</a>
+</li>
+<li><a href="https://html.spec.whatwg.org/multipage/">HTML Living Standard</a>
+</li>
+<li><a href="https://developers.whatwg.org/">HTML Living Standard for Web developers</a>
+</li>
+<li><a href="http://www.w3.org/TR/html401/">HTML4.01</a>
+</li>
+<li><a href="http://www.w3.org/TR/html5/">HTML5</a>
+</li>
+<li><a href="http://www.w3.org/TR/html51/">HTML5.1</a>
+</li>
+<li><a href="https://www.w3.org/TR/html52/">HTML5.2</a>
+</li>
+<li><a href="http://www.w3.org/TR/media-frags/">Media Fragments URI 1.0</a>
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6690">RFC 6690</a>: Constrained RESTful Environments (CoRE) Link Format
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7807">RFC 7807</a>: Problem Details for HTTP APIs
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6906">RFC 6906</a>: The <em>profile</em> Link Relation Type
+</li>
+<li><a href="http://www.w3.org/TR/SRI/">Subresource Integrity</a>
+</li>
+<li><a href="http://www.w3.org/TR/tracking-compliance/">Tracking Compliance and Scope</a>
+</li>
+<li><a href="http://www.w3.org/TR/media-frags-reqs/">Use cases and requirements for Media Fragments</a>
+</li>
+<li><a href="http://www.w3.org/TR/webrtc/">WebRTC 1.0: Real-time Communication Between Browsers</a>
+</li>
+<li><a href="http://www.w3.org/TR/websockets/">Websocket API</a>
+</li>
+<li><a href="http://www.w3.org/TR/XMLHttpRequest/">XMLHttpRequest Level 1</a>
+</li>
+<li><a href="https://xhr.spec.whatwg.org/">XMLHttpRequest Living Standard</a>
+</li>
+</ul>
<h4 id="_seemingly_obsolete">Seemingly obsolete</h4>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc2227">RFC 2227</a>: Simple Hit-Metering and Usage-Limiting for HTTP
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc2310">RFC 2310</a>: The Safe Response Header Field
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc2324">RFC 2324</a>: Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0)
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc2660">RFC 2660</a>: The Secure HyperText Transfer Protocol
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc2774">RFC 2774</a>: An HTTP Extension Framework
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc2965">RFC 2965</a>: HTTP State Management Mechanism (Cookie2)
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc3229">RFC 3229</a>: Delta encoding in HTTP
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7168">RFC 7168</a>: The Hyper Text Coffee Pot Control Protocol for Tea Efflux Appliances (HTCPCP-TEA)
-</p>
-</li>
-<li>
-<p>
-<a href="http://dev.chromium.org/spdy/spdy-protocol">SPDY</a>: SPDY Protocol
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/draft-tyoshino-hybi-websocket-perframe-deflate-06">x-webkit-deflate-frame</a>: Deprecated Websocket compression
-</p>
-</li>
-</ul></div>
-</div>
-</div>
-</div>
-<div class="sect1">
+<ul><li><a href="https://tools.ietf.org/html/rfc2227">RFC 2227</a>: Simple Hit-Metering and Usage-Limiting for HTTP
+</li>
+<li><a href="https://tools.ietf.org/html/rfc2310">RFC 2310</a>: The Safe Response Header Field
+</li>
+<li><a href="https://tools.ietf.org/html/rfc2324">RFC 2324</a>: Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0)
+</li>
+<li><a href="https://tools.ietf.org/html/rfc2660">RFC 2660</a>: The Secure HyperText Transfer Protocol
+</li>
+<li><a href="https://tools.ietf.org/html/rfc2774">RFC 2774</a>: An HTTP Extension Framework
+</li>
+<li><a href="https://tools.ietf.org/html/rfc2965">RFC 2965</a>: HTTP State Management Mechanism (Cookie2)
+</li>
+<li><a href="https://tools.ietf.org/html/rfc3229">RFC 3229</a>: Delta encoding in HTTP
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7168">RFC 7168</a>: The Hyper Text Coffee Pot Control Protocol for Tea Efflux Appliances (HTCPCP-TEA)
+</li>
+<li><a href="http://dev.chromium.org/spdy/spdy-protocol">SPDY</a>: SPDY Protocol
+</li>
+<li><a href="https://tools.ietf.org/html/draft-tyoshino-hybi-websocket-perframe-deflate-06">x-webkit-deflate-frame</a>: Deprecated Websocket compression
+</li>
+</ul>
<h2 id="_url">URL</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc3986">RFC 3986</a>: URI Generic Syntax
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6570">RFC 6570</a>: URI Template
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6874">RFC 6874</a>: Representing IPv6 Zone Identifiers in Address Literals and URIs
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7320">RFC 7320</a>: URI Design and Ownership
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/url-1/">URL</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://url.spec.whatwg.org/">URL Living Standard</a>
-</p>
-</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+<ul><li><a href="https://tools.ietf.org/html/rfc3986">RFC 3986</a>: URI Generic Syntax
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6570">RFC 6570</a>: URI Template
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6874">RFC 6874</a>: Representing IPv6 Zone Identifiers in Address Literals and URIs
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7320">RFC 7320</a>: URI Design and Ownership
+</li>
+<li><a href="http://www.w3.org/TR/url-1/">URL</a>
+</li>
+<li><a href="https://url.spec.whatwg.org/">URL Living Standard</a>
+</li>
+</ul>
<h2 id="_webdav">WebDAV</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc3253">RFC 3253</a>: Versioning Extensions to WebDAV
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc3648">RFC 3648</a>: WebDAV Ordered Collections Protocol
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc3744">RFC 3744</a>: WebDAV Access Control Protocol
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc4316">RFC 4316</a>: Datatypes for WebDAV Properties
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc4331">RFC 4331</a>: Quota and Size Properties for DAV Collections
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc4437">RFC 4437</a>: WebDAV Redirect Reference Resources
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc4709">RFC 4709</a>: Mounting WebDAV Servers
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc4791">RFC 4791</a>: Calendaring Extensions to WebDAV (CalDAV)
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc4918">RFC 4918</a>: HTTP Extensions for WebDAV
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc5323">RFC 5323</a>: WebDAV SEARCH
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc5397">RFC 5397</a>: WebDAV Current Principal Extension
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc5689">RFC 5689</a>: Extended MKCOL for WebDAV
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc5842">RFC 5842</a>: Binding Extensions to WebDAV
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc5995">RFC 5995</a>: Using POST to Add Members to WebDAV Collections
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6352">RFC 6352</a>: CardDAV: vCard Extensions to WebDAV
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6578">RFC 6578</a>: Collection Synchronization for WebDAV
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6638">RFC 6638</a>: Scheduling Extensions to CalDAV
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6764">RFC 6764</a>: Locating Services for Calendaring Extensions to WebDAV (CalDAV) and vCard Extensions to WebDAV (CardDAV)
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7809">RFC 7809</a>: Calendaring Extensions to WebDAV (CalDAV): Time Zones by Reference
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7953">RFC 7953</a>: Calendar Availability
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc8144">RFC 8144</a>: Use of the Prefer Header Field in WebDAV
-</p>
-</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+<ul><li><a href="https://tools.ietf.org/html/rfc3253">RFC 3253</a>: Versioning Extensions to WebDAV
+</li>
+<li><a href="https://tools.ietf.org/html/rfc3648">RFC 3648</a>: WebDAV Ordered Collections Protocol
+</li>
+<li><a href="https://tools.ietf.org/html/rfc3744">RFC 3744</a>: WebDAV Access Control Protocol
+</li>
+<li><a href="https://tools.ietf.org/html/rfc4316">RFC 4316</a>: Datatypes for WebDAV Properties
+</li>
+<li><a href="https://tools.ietf.org/html/rfc4331">RFC 4331</a>: Quota and Size Properties for DAV Collections
+</li>
+<li><a href="https://tools.ietf.org/html/rfc4437">RFC 4437</a>: WebDAV Redirect Reference Resources
+</li>
+<li><a href="https://tools.ietf.org/html/rfc4709">RFC 4709</a>: Mounting WebDAV Servers
+</li>
+<li><a href="https://tools.ietf.org/html/rfc4791">RFC 4791</a>: Calendaring Extensions to WebDAV (CalDAV)
+</li>
+<li><a href="https://tools.ietf.org/html/rfc4918">RFC 4918</a>: HTTP Extensions for WebDAV
+</li>
+<li><a href="https://tools.ietf.org/html/rfc5323">RFC 5323</a>: WebDAV SEARCH
+</li>
+<li><a href="https://tools.ietf.org/html/rfc5397">RFC 5397</a>: WebDAV Current Principal Extension
+</li>
+<li><a href="https://tools.ietf.org/html/rfc5689">RFC 5689</a>: Extended MKCOL for WebDAV
+</li>
+<li><a href="https://tools.ietf.org/html/rfc5842">RFC 5842</a>: Binding Extensions to WebDAV
+</li>
+<li><a href="https://tools.ietf.org/html/rfc5995">RFC 5995</a>: Using POST to Add Members to WebDAV Collections
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6352">RFC 6352</a>: CardDAV: vCard Extensions to WebDAV
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6578">RFC 6578</a>: Collection Synchronization for WebDAV
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6638">RFC 6638</a>: Scheduling Extensions to CalDAV
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6764">RFC 6764</a>: Locating Services for Calendaring Extensions to WebDAV (CalDAV) and vCard Extensions to WebDAV (CardDAV)
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7809">RFC 7809</a>: Calendaring Extensions to WebDAV (CalDAV): Time Zones by Reference
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7953">RFC 7953</a>: Calendar Availability
+</li>
+<li><a href="https://tools.ietf.org/html/rfc8144">RFC 8144</a>: Use of the Prefer Header Field in WebDAV
+</li>
+</ul>
<h2 id="_coap">CoAP</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7252">RFC 7252</a>: The Constrained Application Protocol (CoAP)
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7390">RFC 7390</a>: Group Communication for CoAP
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7641">RFC 7641</a>: Observing Resources in CoAP
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7650">RFC 7650</a>: A CoAP Usage for REsource LOcation And Discovery (RELOAD)
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7959">RFC 7959</a>: Block-Wise Transfers in CoAP
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7967">RFC 7967</a>: CoAP Option for No Server Response
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc8075">RFC 8075</a>: Guidelines for Mapping Implementations: HTTP to CoAP
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc8132">RFC 8132</a>: PATCH and FETCH Methods for CoAP
-</p>
-</li>
-</ul></div>
-</div>
-</div>
+<ul><li><a href="https://tools.ietf.org/html/rfc7252">RFC 7252</a>: The Constrained Application Protocol (CoAP)
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7390">RFC 7390</a>: Group Communication for CoAP
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7641">RFC 7641</a>: Observing Resources in CoAP
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7650">RFC 7650</a>: A CoAP Usage for REsource LOcation And Discovery (RELOAD)
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7959">RFC 7959</a>: Block-Wise Transfers in CoAP
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7967">RFC 7967</a>: CoAP Option for No Server Response
+</li>
+<li><a href="https://tools.ietf.org/html/rfc8075">RFC 8075</a>: Guidelines for Mapping Implementations: HTTP to CoAP
+</li>
+<li><a href="https://tools.ietf.org/html/rfc8132">RFC 8132</a>: PATCH and FETCH Methods for CoAP
+</li>
+</ul>
+
diff --git a/docs/en/cowboy/2.2/guide/static_files/index.html b/docs/en/cowboy/2.2/guide/static_files/index.html
index e1de8a17..8de517c1 100644
--- a/docs/en/cowboy/2.2/guide/static_files/index.html
+++ b/docs/en/cowboy/2.2/guide/static_files/index.html
@@ -62,173 +62,101 @@
<h1 class="lined-header"><span>Static files</span></h1>
-<div class="paragraph"><p>Cowboy comes with a ready to use handler for serving static
-files. It is provided as a convenience for serving files
-during development.</p></div>
-<div class="paragraph"><p>For systems in production, consider using one of the many
-Content Distribution Network (CDN) available on the market,
-as they are the best solution for serving files.</p></div>
-<div class="paragraph"><p>The static handler can serve either one file or all files
-from a given directory. The etag generation and mime types
-can be configured.</p></div>
-<div class="sect1">
+<p>Cowboy comes with a ready to use handler for serving static files. It is provided as a convenience for serving files during development.</p>
+<p>For systems in production, consider using one of the many Content Distribution Network (CDN) available on the market, as they are the best solution for serving files.</p>
+<p>The static handler can serve either one file or all files from a given directory. The etag generation and mime types can be configured.</p>
<h2 id="_serve_one_file">Serve one file</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>You can use the static handler to serve one specific file
-from an application&#8217;s private directory. This is particularly
-useful to serve an <em>index.html</em> file when the client requests
-the <code>/</code> path, for example. The path configured is relative
-to the given application&#8217;s private directory.</p></div>
-<div class="paragraph"><p>The following rule will serve the file <em>static/index.html</em>
-from the application <code>my_app</code>'s priv directory whenever the
-path <code>/</code> is accessed:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>You can use the static handler to serve one specific file from an application&apos;s private directory. This is particularly useful to serve an <em>index.html</em> file when the client requests the <code>/</code> path, for example. The path configured is relative to the given application&apos;s private directory.</p>
+<p>The following rule will serve the file <em>static/index.html</em> from the application <code>my_app</code>&apos;s priv directory whenever the path <code>/</code> is accessed:</p>
+<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: #FF0000">"/"</span>, <span style="color: #FF6600">cowboy_static</span>, {<span style="color: #FF6600">priv_file</span>, <span style="color: #FF6600">my_app</span>, <span style="color: #FF0000">"static/index.html"</span>}}</tt></pre></div></div>
-<div class="paragraph"><p>You can also specify the absolute path to a file, or the
-path to the file relative to the current directory:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>{<font color="#FF0000">"/"</font>, <font color="#FF6600">cowboy_static</font>, {<font color="#FF6600">priv_file</font>, <font color="#FF6600">my_app</font>, <font color="#FF0000">"static/index.html"</font>}}</tt></pre>
+</div></div>
+<p>You can also specify the absolute path to a file, or the path to the file relative to the current directory:</p>
+<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: #FF0000">"/"</span>, <span style="color: #FF6600">cowboy_static</span>, {<span style="color: #FF6600">file</span>, <span style="color: #FF0000">"/var/www/index.html"</span>}}</tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#FF0000">"/"</font>, <font color="#FF6600">cowboy_static</font>, {<font color="#FF6600">file</font>, <font color="#FF0000">"/var/www/index.html"</font>}}</tt></pre>
+</div></div>
<h2 id="_serve_all_files_from_a_directory">Serve all files from a directory</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>You can also use the static handler to serve all files that
-can be found in the configured directory. The handler will
-use the <code>path_info</code> information to resolve the file location,
-which means that your route must end with a <code>[...]</code> pattern
-for it to work. All files are served, including the ones that
-may be found in subfolders.</p></div>
-<div class="paragraph"><p>You can specify the directory relative to an application&#8217;s
-private directory.</p></div>
-<div class="paragraph"><p>The following rule will serve any file found in the application
-<code>my_app</code>'s priv directory inside the <code>static/assets</code> folder
-whenever the requested path begins with <code>/assets/</code>:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>You can also use the static handler to serve all files that can be found in the configured directory. The handler will use the <code>path_info</code> information to resolve the file location, which means that your route must end with a <code>[...]</code> pattern for it to work. All files are served, including the ones that may be found in subfolders.</p>
+<p>You can specify the directory relative to an application&apos;s private directory.</p>
+<p>The following rule will serve any file found in the application <code>my_app</code>&apos;s priv directory inside the <code>static/assets</code> folder whenever the requested path begins with <code>/assets/</code>:</p>
+<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: #FF0000">"/assets/[...]"</span>, <span style="color: #FF6600">cowboy_static</span>, {<span style="color: #FF6600">priv_dir</span>, <span style="color: #FF6600">my_app</span>, <span style="color: #FF0000">"static/assets"</span>}}</tt></pre></div></div>
-<div class="paragraph"><p>You can also specify the absolute path to the directory or
-set it relative to the current directory:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>{<font color="#FF0000">"/assets/[...]"</font>, <font color="#FF6600">cowboy_static</font>, {<font color="#FF6600">priv_dir</font>, <font color="#FF6600">my_app</font>, <font color="#FF0000">"static/assets"</font>}}</tt></pre>
+</div></div>
+<p>You can also specify the absolute path to the directory or set it relative to the current directory:</p>
+<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: #FF0000">"/assets/[...]"</span>, <span style="color: #FF6600">cowboy_static</span>, {<span style="color: #FF6600">dir</span>, <span style="color: #FF0000">"/var/www/assets"</span>}}</tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#FF0000">"/assets/[...]"</font>, <font color="#FF6600">cowboy_static</font>, {<font color="#FF6600">dir</font>, <font color="#FF0000">"/var/www/assets"</font>}}</tt></pre>
+</div></div>
<h2 id="_customize_the_mimetype_detection">Customize the mimetype detection</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>By default, Cowboy will attempt to recognize the mimetype
-of your static files by looking at the extension.</p></div>
-<div class="paragraph"><p>You can override the function that figures out the mimetype
-of the static files. It can be useful when Cowboy is missing
-a mimetype you need to handle, or when you want to reduce
-the list to make lookups faster. You can also give a
-hard-coded mimetype that will be used unconditionally.</p></div>
-<div class="paragraph"><p>Cowboy comes with two functions built-in. The default
-function only handles common file types used when building
-Web applications. The other function is an extensive list
-of hundreds of mimetypes that should cover almost any need
-you may have. You can of course create your own function.</p></div>
-<div class="paragraph"><p>To use the default function, you should not have to configure
-anything, as it is the default. If you insist, though, the
-following will do the job:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>By default, Cowboy will attempt to recognize the mimetype of your static files by looking at the extension.</p>
+<p>You can override the function that figures out the mimetype of the static files. It can be useful when Cowboy is missing a mimetype you need to handle, or when you want to reduce the list to make lookups faster. You can also give a hard-coded mimetype that will be used unconditionally.</p>
+<p>Cowboy comes with two functions built-in. The default function only handles common file types used when building Web applications. The other function is an extensive list of hundreds of mimetypes that should cover almost any need you may have. You can of course create your own function.</p>
+<p>To use the default function, you should not have to configure anything, as it is the default. If you insist, though, the following will do the job:</p>
+<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: #FF0000">"/assets/[...]"</span>, <span style="color: #FF6600">cowboy_static</span>, {<span style="color: #FF6600">priv_dir</span>, <span style="color: #FF6600">my_app</span>, <span style="color: #FF0000">"static/assets"</span>,
- [{<span style="color: #FF6600">mimetypes</span>, <span style="color: #FF6600">cow_mimetypes</span>, <span style="color: #FF6600">web</span>}]}}</tt></pre></div></div>
-<div class="paragraph"><p>As you can see, there is an optional field that may contain
-a list of less used options, like mimetypes or etag. All option
-types have this optional field.</p></div>
-<div class="paragraph"><p>To use the function that will detect almost any mimetype,
-the following configuration will do:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>{<font color="#FF0000">"/assets/[...]"</font>, <font color="#FF6600">cowboy_static</font>, {<font color="#FF6600">priv_dir</font>, <font color="#FF6600">my_app</font>, <font color="#FF0000">"static/assets"</font>,
+ [{<font color="#FF6600">mimetypes</font>, <font color="#FF6600">cow_mimetypes</font>, <font color="#FF6600">web</font>}]}}</tt></pre>
+</div></div>
+<p>As you can see, there is an optional field that may contain a list of less used options, like mimetypes or etag. All option types have this optional field.</p>
+<p>To use the function that will detect almost any mimetype, the following configuration will do:</p>
+<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: #FF0000">"/assets/[...]"</span>, <span style="color: #FF6600">cowboy_static</span>, {<span style="color: #FF6600">priv_dir</span>, <span style="color: #FF6600">my_app</span>, <span style="color: #FF0000">"static/assets"</span>,
- [{<span style="color: #FF6600">mimetypes</span>, <span style="color: #FF6600">cow_mimetypes</span>, <span style="color: #FF6600">all</span>}]}}</tt></pre></div></div>
-<div class="paragraph"><p>You probably noticed the pattern by now. The configuration
-expects a module and a function name, so you can use any
-of your own functions instead:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>{<font color="#FF0000">"/assets/[...]"</font>, <font color="#FF6600">cowboy_static</font>, {<font color="#FF6600">priv_dir</font>, <font color="#FF6600">my_app</font>, <font color="#FF0000">"static/assets"</font>,
+ [{<font color="#FF6600">mimetypes</font>, <font color="#FF6600">cow_mimetypes</font>, <font color="#FF6600">all</font>}]}}</tt></pre>
+</div></div>
+<p>You probably noticed the pattern by now. The configuration expects a module and a function name, so you can use any of your own functions instead:</p>
+<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: #FF0000">"/assets/[...]"</span>, <span style="color: #FF6600">cowboy_static</span>, {<span style="color: #FF6600">priv_dir</span>, <span style="color: #FF6600">my_app</span>, <span style="color: #FF0000">"static/assets"</span>,
- [{<span style="color: #FF6600">mimetypes</span>, <span style="color: #009900">Module</span>, <span style="color: #009900">Function</span>}]}}</tt></pre></div></div>
-<div class="paragraph"><p>The function that performs the mimetype detection receives
-a single argument that is the path to the file on disk. It
-is recommended to return the mimetype in tuple form, although
-a binary string is also allowed (but will require extra
-processing). If the function can&#8217;t figure out the mimetype,
-then it should return <code>{&lt;&lt;"application"&gt;&gt;, &lt;&lt;"octet-stream"&gt;&gt;, []}</code>.</p></div>
-<div class="paragraph"><p>When the static handler fails to find the extension,
-it will send the file as <code>application/octet-stream</code>.
-A browser receiving such file will attempt to download it
-directly to disk.</p></div>
-<div class="paragraph"><p>Finally, the mimetype can be hard-coded for all files.
-This is especially useful in combination with the <code>file</code>
-and <code>priv_file</code> options as it avoids needless computation:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>{<font color="#FF0000">"/assets/[...]"</font>, <font color="#FF6600">cowboy_static</font>, {<font color="#FF6600">priv_dir</font>, <font color="#FF6600">my_app</font>, <font color="#FF0000">"static/assets"</font>,
+ [{<font color="#FF6600">mimetypes</font>, <font color="#009900">Module</font>, <font color="#009900">Function</font>}]}}</tt></pre>
+</div></div>
+<p>The function that performs the mimetype detection receives a single argument that is the path to the file on disk. It is recommended to return the mimetype in tuple form, although a binary string is also allowed (but will require extra processing). If the function can&apos;t figure out the mimetype, then it should return <code>{&lt;&lt;&quot;application&quot;&gt;&gt;, &lt;&lt;&quot;octet-stream&quot;&gt;&gt;, []}</code>.</p>
+<p>When the static handler fails to find the extension, it will send the file as <code>application/octet-stream</code>. A browser receiving such file will attempt to download it directly to disk.</p>
+<p>Finally, the mimetype can be hard-coded for all files. This is especially useful in combination with the <code>file</code> and <code>priv_file</code> options as it avoids needless computation:</p>
+<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: #FF0000">"/"</span>, <span style="color: #FF6600">cowboy_static</span>, {<span style="color: #FF6600">priv_file</span>, <span style="color: #FF6600">my_app</span>, <span style="color: #FF0000">"static/index.html"</span>,
- [{<span style="color: #FF6600">mimetypes</span>, {<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"html"</span><span style="color: #990000">&gt;&gt;</span>, []}}]}}</tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#FF0000">"/"</font>, <font color="#FF6600">cowboy_static</font>, {<font color="#FF6600">priv_file</font>, <font color="#FF6600">my_app</font>, <font color="#FF0000">"static/index.html"</font>,
+ [{<font color="#FF6600">mimetypes</font>, {<font color="#990000">&lt;&lt;</font><font color="#FF0000">"text"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"html"</font><font color="#990000">&gt;&gt;</font>, []}}]}}</tt></pre>
+</div></div>
<h2 id="_generate_an_etag">Generate an etag</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>By default, the static handler will generate an etag header
-value based on the size and modified time. This solution
-can not be applied to all systems though. It would perform
-rather poorly over a cluster of nodes, for example, as the
-file metadata will vary from server to server, giving a
-different etag on each server.</p></div>
-<div class="paragraph"><p>You can however change the way the etag is calculated:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>By default, the static handler will generate an etag header value based on the size and modified time. This solution can not be applied to all systems though. It would perform rather poorly over a cluster of nodes, for example, as the file metadata will vary from server to server, giving a different etag on each server.</p>
+<p>You can however change the way the etag is calculated:</p>
+<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: #FF0000">"/assets/[...]"</span>, <span style="color: #FF6600">cowboy_static</span>, {<span style="color: #FF6600">priv_dir</span>, <span style="color: #FF6600">my_app</span>, <span style="color: #FF0000">"static/assets"</span>,
- [{<span style="color: #FF6600">etag</span>, <span style="color: #009900">Module</span>, <span style="color: #009900">Function</span>}]}}</tt></pre></div></div>
-<div class="paragraph"><p>This function will receive three arguments: the path to the
-file on disk, the size of the file and the last modification
-time. In a distributed setup, you would typically use the
-file path to retrieve an etag value that is identical across
-all your servers.</p></div>
-<div class="paragraph"><p>You can also completely disable etag handling:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>{<font color="#FF0000">"/assets/[...]"</font>, <font color="#FF6600">cowboy_static</font>, {<font color="#FF6600">priv_dir</font>, <font color="#FF6600">my_app</font>, <font color="#FF0000">"static/assets"</font>,
+ [{<font color="#FF6600">etag</font>, <font color="#009900">Module</font>, <font color="#009900">Function</font>}]}}</tt></pre>
+</div></div>
+<p>This function will receive three arguments: the path to the file on disk, the size of the file and the last modification time. In a distributed setup, you would typically use the file path to retrieve an etag value that is identical across all your servers.</p>
+<p>You can also completely disable etag handling:</p>
+<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: #FF0000">"/assets/[...]"</span>, <span style="color: #FF6600">cowboy_static</span>, {<span style="color: #FF6600">priv_dir</span>, <span style="color: #FF6600">my_app</span>, <span style="color: #FF0000">"static/assets"</span>,
- [{<span style="color: #FF6600">etag</span>, <span style="color: #000080">false</span>}]}}</tt></pre></div></div>
-</div>
-</div>
+<pre><tt>{<font color="#FF0000">"/assets/[...]"</font>, <font color="#FF6600">cowboy_static</font>, {<font color="#FF6600">priv_dir</font>, <font color="#FF6600">my_app</font>, <font color="#FF0000">"static/assets"</font>,
+ [{<font color="#FF6600">etag</font>, <font color="#000080">false</font>}]}}</tt></pre>
+</div></div>
+
diff --git a/docs/en/cowboy/2.2/guide/streams/index.html b/docs/en/cowboy/2.2/guide/streams/index.html
index a5a1e9a4..c4758381 100644
--- a/docs/en/cowboy/2.2/guide/streams/index.html
+++ b/docs/en/cowboy/2.2/guide/streams/index.html
@@ -62,61 +62,23 @@
<h1 class="lined-header"><span>Streams</span></h1>
-<div class="paragraph"><p>A stream is the set of messages that form an HTTP
-request/response pair.</p></div>
-<div class="paragraph"><p>The term stream comes from HTTP/2. In Cowboy, it is
-also used when talking about HTTP/1.1 or HTTP/1.0.
-It should not be confused with streaming the request
-or response body.</p></div>
-<div class="paragraph"><p>All versions of HTTP allow clients to initiate
-streams. HTTP/2 is the only one also allowing servers,
-through its server push feature. Both client and
-server-initiated streams go through the same process
-in Cowboy.</p></div>
-<div class="sect1">
+<p>A stream is the set of messages that form an HTTP request/response pair.</p>
+<p>The term stream comes from HTTP/2. In Cowboy, it is also used when talking about HTTP/1.1 or HTTP/1.0. It should not be confused with streaming the request or response body.</p>
+<p>All versions of HTTP allow clients to initiate streams. HTTP/2 is the only one also allowing servers, through its server push feature. Both client and server-initiated streams go through the same process in Cowboy.</p>
<h2 id="_stream_handlers">Stream handlers</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Stream handlers must implement five different callbacks.
-Four of them are directly related; one is special.</p></div>
-<div class="paragraph"><p>All callbacks receives the stream ID as first argument.</p></div>
-<div class="paragraph"><p>Most of them can return a list of commands to be executed
-by Cowboy. When callbacks are chained, it is possible to
-intercept and modify these commands. This can be useful
-for modifying responses for example.</p></div>
-<div class="paragraph"><p>The <code>init/3</code> callback is invoked when a new request
-comes in. It receives the Req object and the protocol options
-for this listener.</p></div>
-<div class="paragraph"><p>The <code>data/4</code> callback is invoked when data from the request
-body is received. It receives both this data and a flag
-indicating whether more is to be expected.</p></div>
-<div class="paragraph"><p>The <code>info/3</code> callback is invoked when an Erlang message is
-received for this stream. They will typically be messages
-sent by the request process.</p></div>
-<div class="paragraph"><p>Finally the <code>terminate/3</code> callback is invoked with the
-terminate reason for the stream. The return value is ignored.
-Note that as with all terminate callbacks in Erlang, there
-is no strong guarantee that it will be called.</p></div>
-<div class="paragraph"><p>The special callback <code>early_error/5</code> is called when an error
-occurs before the request headers were fully received and
-Cowboy is sending a response. It receives the partial Req
-object, the error reason, the protocol options and the response
-Cowboy will send. This response must be returned, possibly
-modified.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Stream handlers must implement five different callbacks. Four of them are directly related; one is special.</p>
+<p>All callbacks receives the stream ID as first argument.</p>
+<p>Most of them can return a list of commands to be executed by Cowboy. When callbacks are chained, it is possible to intercept and modify these commands. This can be useful for modifying responses for example.</p>
+<p>The <code>init/3</code> callback is invoked when a new request comes in. It receives the Req object and the protocol options for this listener.</p>
+<p>The <code>data/4</code> callback is invoked when data from the request body is received. It receives both this data and a flag indicating whether more is to be expected.</p>
+<p>The <code>info/3</code> callback is invoked when an Erlang message is received for this stream. They will typically be messages sent by the request process.</p>
+<p>Finally the <code>terminate/3</code> callback is invoked with the terminate reason for the stream. The return value is ignored. Note that as with all terminate callbacks in Erlang, there is no strong guarantee that it will be called.</p>
+<p>The special callback <code>early_error/5</code> is called when an error occurs before the request headers were fully received and Cowboy is sending a response. It receives the partial Req object, the error reason, the protocol options and the response Cowboy will send. This response must be returned, possibly modified.</p>
<h2 id="_built_in_handlers">Built-in handlers</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy comes with two handlers.</p></div>
-<div class="paragraph"><p><code>cowboy_stream_h</code> is the default stream handler.
-It is the core of much of the functionality of Cowboy.
-All chains of stream handlers should call it last.</p></div>
-<div class="paragraph"><p><code>cowboy_compress_h</code> will automatically compress
-responses when possible. It is not enabled by default.
-It is a good example for writing your own handlers
-that will modify responses.</p></div>
-</div>
-</div>
+<p>Cowboy comes with two handlers.</p>
+<p><code>cowboy_stream_h</code> is the default stream handler. It is the core of much of the functionality of Cowboy. All chains of stream handlers should call it last.</p>
+<p><code>cowboy_compress_h</code> will automatically compress responses when possible. It is not enabled by default. It is a good example for writing your own handlers that will modify responses.</p>
+
diff --git a/docs/en/cowboy/2.2/guide/ws_handlers/index.html b/docs/en/cowboy/2.2/guide/ws_handlers/index.html
index 0ffb5420..ab587d37 100644
--- a/docs/en/cowboy/2.2/guide/ws_handlers/index.html
+++ b/docs/en/cowboy/2.2/guide/ws_handlers/index.html
@@ -62,271 +62,171 @@
<h1 class="lined-header"><span>Websocket handlers</span></h1>
-<div class="paragraph"><p>Websocket handlers provide an interface for upgrading HTTP/1.1
-connections to Websocket and sending or receiving frames on
-the Websocket connection.</p></div>
-<div class="paragraph"><p>As Websocket connections are established through the HTTP/1.1
-upgrade mechanism, Websocket handlers need to be able to first
-receive the HTTP request for the upgrade, before switching to
-Websocket and taking over the connection. They can then receive
-or send Websocket frames, handle incoming Erlang messages or
-close the connection.</p></div>
-<div class="sect1">
+<p>Websocket handlers provide an interface for upgrading HTTP/1.1 connections to Websocket and sending or receiving frames on the Websocket connection.</p>
+<p>As Websocket connections are established through the HTTP/1.1 upgrade mechanism, Websocket handlers need to be able to first receive the HTTP request for the upgrade, before switching to Websocket and taking over the connection. They can then receive or send Websocket frames, handle incoming Erlang messages or close the connection.</p>
<h2 id="_upgrade">Upgrade</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <code>init/2</code> callback is called when the request is received.
-To establish a Websocket connection, you must switch to the
-<code>cowboy_websocket</code> module:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The <code>init/2</code> callback is called when the request is received. To establish a Websocket connection, you must switch to the <code>cowboy_websocket</code> module:</p>
+<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">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_websocket</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Cowboy will perform the Websocket handshake immediately. Note
-that the handshake will fail if the client did not request an
-upgrade to Websocket.</p></div>
-<div class="paragraph"><p>The Req object becomes unavailable after this function returns.
-Any information required for proper execution of the Websocket
-handler must be saved in the state.</p></div>
-</div>
-</div>
-<div class="sect1">
-<h2 id="_subprotocol">Subprotocol</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The client may provide a list of Websocket subprotocols it
-supports in the sec-websocket-protocol header. The server <strong>must</strong>
-select one of them and send it back to the client or the
-handshake will fail.</p></div>
-<div class="paragraph"><p>For example, a client could understand both STOMP and MQTT over
-Websocket, and provide the header:</p></div>
-<div class="listingblock">
-<div class="content">
-<pre><code>sec-websocket-protocol: v12.stomp, mqtt</code></pre>
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">cowboy_websocket</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
</div></div>
-<div class="paragraph"><p>If the server only understands MQTT it can return:</p></div>
-<div class="listingblock">
-<div class="content">
-<pre><code>sec-websocket-protocol: mqtt</code></pre>
-</div></div>
-<div class="paragraph"><p>This selection must be done in <code>init/2</code>. An example usage could
-be:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Cowboy will perform the Websocket handshake immediately. Note that the handshake will fail if the client did not request an upgrade to Websocket.</p>
+<p>The Req object becomes unavailable after this function returns. Any information required for proper execution of the Websocket handler must be saved in the state.</p>
+<h2 id="_subprotocol">Subprotocol</h2>
+<p>The client may provide a list of Websocket subprotocols it supports in the sec-websocket-protocol header. The server <strong>must</strong> select one of them and send it back to the client or the handshake will fail.</p>
+<p>For example, a client could understand both STOMP and MQTT over Websocket, and provide the header:</p>
+<div class="listingblock"><div class="content"><pre>sec-websocket-protocol: v12.stomp, mqtt</pre></div></div>
+<p>If the server only understands MQTT it can return:</p>
+<div class="listingblock"><div class="content"><pre>sec-websocket-protocol: mqtt</pre></div></div>
+<p>This selection must be done in <code>init/2</code>. An example usage could be:</p>
+<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">init</span></span>(<span style="color: #009900">Req0</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">cowboy_req:parse_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"sec-websocket-protocol"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req0</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
- <span style="color: #000080">undefined</span> <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">cowboy_websocket</span>, <span style="color: #009900">Req0</span>, <span style="color: #009900">State</span>};
- <span style="color: #009900">Subprotocols</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:keymember</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"mqtt"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #993399">1</span>, <span style="color: #009900">Subprotocols</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="color: #009900">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"sec-websocket-protocol"</span><span style="color: #990000">&gt;&gt;</span>,
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"mqtt"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req0</span>),
- {<span style="color: #FF6600">cowboy_websocket</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="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">400</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: #0000FF">end</span></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">
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req0</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">case</font></b> <b><font color="#000000">cowboy_req:parse_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"sec-websocket-protocol"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req0</font>) <b><font color="#0000FF">of</font></b>
+ <font color="#000080">undefined</font> <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">cowboy_websocket</font>, <font color="#009900">Req0</font>, <font color="#009900">State</font>};
+ <font color="#009900">Subprotocols</font> <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">case</font></b> <b><font color="#000000">lists:keymember</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"mqtt"</font><font color="#990000">&gt;&gt;</font>, <font color="#993399">1</font>, <font color="#009900">Subprotocols</font>) <b><font color="#0000FF">of</font></b>
+ <font color="#000080">true</font> <font color="#990000">-&gt;</font>
+ <font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"sec-websocket-protocol"</font><font color="#990000">&gt;&gt;</font>,
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"mqtt"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req0</font>),
+ {<font color="#FF6600">cowboy_websocket</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>};
+ <font color="#000080">false</font> <font color="#990000">-&gt;</font>
+ <font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:reply</font></b>(<font color="#993399">400</font>, <font color="#009900">Req0</font>),
+ {<font color="#FF6600">ok</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
+ <b><font color="#0000FF">end</font></b>
+ <b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_post_upgrade_initialization">Post-upgrade initialization</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy has separate processes for handling the connection
-and requests. Because Websocket takes over the connection,
-the Websocket protocol handling occurs in a different
-process than the request handling.</p></div>
-<div class="paragraph"><p>This is reflected in the different callbacks Websocket
-handlers have. The <code>init/2</code> callback is called from the
-temporary request process and the <code>websocket_</code> callbacks
-from the connection process.</p></div>
-<div class="paragraph"><p>This means that some initialization cannot be done from
-<code>init/2</code>. Anything that would require the current pid,
-or be tied to the current pid, will not work as intended.
-The optional <code>websocket_init/1</code> can be used instead:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Cowboy has separate processes for handling the connection and requests. Because Websocket takes over the connection, the Websocket protocol handling occurs in a different process than the request handling.</p>
+<p>This is reflected in the different callbacks Websocket handlers have. The <code>init/2</code> callback is called from the temporary request process and the <code>websocket_</code> callbacks from the connection process.</p>
+<p>This means that some initialization cannot be done from <code>init/2</code>. Anything that would require the current pid, or be tied to the current pid, will not work as intended. The optional <code>websocket_init/1</code> can be used instead:</p>
+<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">websocket_init</span></span>(<span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #000000">erlang:start_timer</span></span>(<span style="color: #993399">1000</span>, <span style="font-weight: bold"><span style="color: #000080">self</span></span>(), <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Hello!"</span><span style="color: #990000">&gt;&gt;</span>),
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">State</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>All Websocket callbacks share the same return values. This
-means that we can send frames to the client right after
-the upgrade:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">websocket_init</font></b>(<font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#000000">erlang:start_timer</font></b>(<font color="#993399">1000</font>, <b><font color="#000080">self</font></b>(), <font color="#990000">&lt;&lt;</font><font color="#FF0000">"Hello!"</font><font color="#990000">&gt;&gt;</font>),
+ {<font color="#FF6600">ok</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>All Websocket callbacks share the same return values. This means that we can send frames to the client right after the upgrade:</p>
+<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">websocket_init</span></span>(<span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">reply</span>, {<span style="color: #FF6600">text</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Hello!"</span><span style="color: #990000">&gt;&gt;</span>}, <span style="color: #009900">State</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">websocket_init</font></b>(<font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">reply</font>, {<font color="#FF6600">text</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"Hello!"</font><font color="#990000">&gt;&gt;</font>}, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_receiving_frames">Receiving frames</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy will call <code>websocket_handle/2</code> whenever a text, binary,
-ping or pong frame arrives from the client.</p></div>
-<div class="paragraph"><p>The handler can handle or ignore the frames. It can also
-send frames back to the client or stop the connection.</p></div>
-<div class="paragraph"><p>The following snippet echoes back any text frame received and
-ignores all others:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Cowboy will call <code>websocket_handle/2</code> whenever a text, binary, ping or pong frame arrives from the client.</p>
+<p>The handler can handle or ignore the frames. It can also send frames back to the client or stop the connection.</p>
+<p>The following snippet echoes back any text frame received and ignores all others:</p>
+<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">websocket_handle</span></span>(<span style="color: #009900">Frame</span> <span style="color: #990000">=</span> {<span style="color: #FF6600">text</span>, <span style="color: #990000">_</span>}, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">reply</span>, <span style="color: #009900">Frame</span>, <span style="color: #009900">State</span>};
-<span style="font-weight: bold"><span style="color: #000000">websocket_handle</span></span>(<span style="color: #009900">_Frame</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">State</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Note that ping and pong frames require no action from the
-handler as Cowboy will automatically reply to ping frames.
-They are provided for informative purposes only.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">websocket_handle</font></b>(<font color="#009900">Frame</font> <font color="#990000">=</font> {<font color="#FF6600">text</font>, <font color="#990000">_</font>}, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">reply</font>, <font color="#009900">Frame</font>, <font color="#009900">State</font>};
+<b><font color="#000000">websocket_handle</font></b>(<font color="#009900">_Frame</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Note that ping and pong frames require no action from the handler as Cowboy will automatically reply to ping frames. They are provided for informative purposes only.</p>
<h2 id="_receiving_erlang_messages">Receiving Erlang messages</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy will call <code>websocket_info/2</code> whenever an Erlang message
-arrives.</p></div>
-<div class="paragraph"><p>The handler can handle or ignore the messages. It can also
-send frames to the client or stop the connection.</p></div>
-<div class="paragraph"><p>The following snippet forwards log messages to the client
-and ignores all others:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Cowboy will call <code>websocket_info/2</code> whenever an Erlang message arrives.</p>
+<p>The handler can handle or ignore the messages. It can also send frames to the client or stop the connection.</p>
+<p>The following snippet forwards log messages to the client and ignores all others:</p>
+<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">websocket_info</span></span>({<span style="font-weight: bold"><span style="color: #000080">log</span></span>, <span style="color: #009900">Text</span>}, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">reply</span>, {<span style="color: #FF6600">text</span>, <span style="color: #009900">Text</span>}, <span style="color: #009900">State</span>};
-<span style="font-weight: bold"><span style="color: #000000">websocket_info</span></span>(<span style="color: #009900">_Info</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">State</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">websocket_info</font></b>({<b><font color="#000080">log</font></b>, <font color="#009900">Text</font>}, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">reply</font>, {<font color="#FF6600">text</font>, <font color="#009900">Text</font>}, <font color="#009900">State</font>};
+<b><font color="#000000">websocket_info</font></b>(<font color="#009900">_Info</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_sending_frames">Sending frames</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>All <code>websocket_</code> callbacks share return values. They may
-send zero, one or many frames to the client.</p></div>
-<div class="paragraph"><p>To send nothing, just return an ok tuple:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<!-- @todo This will be deprecated and eventually replaced with a-->
+<!-- {Commands, State} interface that allows providing more-->
+<!-- functionality easily.-->
+<p>All <code>websocket_</code> callbacks share return values. They may send zero, one or many frames to the client.</p>
+<p>To send nothing, just return an ok tuple:</p>
+<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">websocket_info</span></span>(<span style="color: #009900">_Info</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">State</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>To send one frame, return a reply tuple with the frame to send:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">websocket_info</font></b>(<font color="#009900">_Info</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>To send one frame, return a reply tuple with the frame to send:</p>
+<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">websocket_info</span></span>(<span style="color: #009900">_Info</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">reply</span>, {<span style="color: #FF6600">text</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Hello!"</span><span style="color: #990000">&gt;&gt;</span>}, <span style="color: #009900">State</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>You can send frames of any type: text, binary, ping, pong
-or close frames.</p></div>
-<div class="paragraph"><p>To send many frames at once, return a reply tuple with the
-list of frames to send:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">websocket_info</font></b>(<font color="#009900">_Info</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">reply</font>, {<font color="#FF6600">text</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"Hello!"</font><font color="#990000">&gt;&gt;</font>}, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>You can send frames of any type: text, binary, ping, pong or close frames.</p>
+<p>To send many frames at once, return a reply tuple with the list of frames to send:</p>
+<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">websocket_info</span></span>(<span style="color: #009900">_Info</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">reply</span>, [
- {<span style="color: #FF6600">text</span>, <span style="color: #FF0000">"Hello"</span>},
- {<span style="color: #FF6600">text</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"world!"</span><span style="color: #990000">&gt;&gt;</span>},
- {<span style="font-weight: bold"><span style="color: #000080">binary</span></span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #993399">0</span><span style="color: #990000">:</span><span style="color: #993399">8000</span><span style="color: #990000">&gt;&gt;</span>}
- ], <span style="color: #009900">State</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>They are sent in the given order.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">websocket_info</font></b>(<font color="#009900">_Info</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">reply</font>, [
+ {<font color="#FF6600">text</font>, <font color="#FF0000">"Hello"</font>},
+ {<font color="#FF6600">text</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"world!"</font><font color="#990000">&gt;&gt;</font>},
+ {<b><font color="#000080">binary</font></b>, <font color="#990000">&lt;&lt;</font><font color="#993399">0</font><font color="#990000">:</font><font color="#993399">8000</font><font color="#990000">&gt;&gt;</font>}
+ ], <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>They are sent in the given order.</p>
<h2 id="_keeping_the_connection_alive">Keeping the connection alive</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy will automatically respond to ping frames sent by
-the client. They are still forwarded to the handler for
-informative purposes, but no further action is required.</p></div>
-<div class="paragraph"><p>Cowboy does not send ping frames itself. The handler can
-do it if required. A better solution in most cases is to
-let the client handle pings. Doing it from the handler
-would imply having an additional timer per connection and
-this can be a considerable cost for servers that need to
-handle large numbers of connections.</p></div>
-<div class="paragraph"><p>Cowboy can be configured to close idle connections
-automatically. It is highly recommended to configure
-a timeout here, to avoid having processes linger longer
-than needed.</p></div>
-<div class="paragraph"><p>The <code>init/2</code> callback can set the timeout to be used
-for the connection. For example, this would make Cowboy
-close connections idle for more than 30 seconds:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Cowboy will automatically respond to ping frames sent by the client. They are still forwarded to the handler for informative purposes, but no further action is required.</p>
+<p>Cowboy does not send ping frames itself. The handler can do it if required. A better solution in most cases is to let the client handle pings. Doing it from the handler would imply having an additional timer per connection and this can be a considerable cost for servers that need to handle large numbers of connections.</p>
+<p>Cowboy can be configured to close idle connections automatically. It is highly recommended to configure a timeout here, to avoid having processes linger longer than needed.</p>
+<p>The <code>init/2</code> callback can set the timeout to be used for the connection. For example, this would make Cowboy close connections idle for more than 30 seconds:</p>
+<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">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_websocket</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>, #{
- <span style="color: #0000FF">idle_timeout</span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">30000</span>}}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>This value cannot be changed once it is set. It defaults to
-<code>60000</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">cowboy_websocket</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>, #{
+ <font color="#0000FF">idle_timeout</font> <font color="#990000">=&gt;</font> <font color="#993399">30000</font>}}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>This value cannot be changed once it is set. It defaults to <code>60000</code>.</p>
<h2 id="_saving_memory">Saving memory</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The Websocket connection process can be set to hibernate
-after the callback returns.</p></div>
-<div class="paragraph"><p>Simply add an <code>hibernate</code> field to the ok or reply tuples:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The Websocket connection process can be set to hibernate after the callback returns.</p>
+<p>Simply add an <code>hibernate</code> field to the ok or reply tuples:</p>
+<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">websocket_init</span></span>(<span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">State</span>, <span style="color: #FF6600">hibernate</span>}<span style="color: #990000">.</span>
-
-<span style="font-weight: bold"><span style="color: #000000">websocket_handle</span></span>(<span style="color: #009900">_Frame</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">State</span>, <span style="color: #FF6600">hibernate</span>}<span style="color: #990000">.</span>
-
-<span style="font-weight: bold"><span style="color: #000000">websocket_info</span></span>(<span style="color: #009900">_Info</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">reply</span>, {<span style="color: #FF6600">text</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Hello!"</span><span style="color: #990000">&gt;&gt;</span>}, <span style="color: #009900">State</span>, <span style="color: #FF6600">hibernate</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>It is highly recommended to write your handlers with
-hibernate enabled, as this allows to greatly reduce the
-memory usage. Do note however that an increase in the
-CPU usage or latency can be observed instead, in particular
-for the more busy connections.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">websocket_init</font></b>(<font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <font color="#009900">State</font>, <font color="#FF6600">hibernate</font>}<font color="#990000">.</font>
+
+<b><font color="#000000">websocket_handle</font></b>(<font color="#009900">_Frame</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <font color="#009900">State</font>, <font color="#FF6600">hibernate</font>}<font color="#990000">.</font>
+
+<b><font color="#000000">websocket_info</font></b>(<font color="#009900">_Info</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">reply</font>, {<font color="#FF6600">text</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"Hello!"</font><font color="#990000">&gt;&gt;</font>}, <font color="#009900">State</font>, <font color="#FF6600">hibernate</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>It is highly recommended to write your handlers with hibernate enabled, as this allows to greatly reduce the memory usage. Do note however that an increase in the CPU usage or latency can be observed instead, in particular for the more busy connections.</p>
<h2 id="_closing_the_connection">Closing the connection</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The connection can be closed at any time, either by telling
-Cowboy to stop it or by sending a close frame.</p></div>
-<div class="paragraph"><p>To tell Cowboy to close the connection, use a stop tuple:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The connection can be closed at any time, either by telling Cowboy to stop it or by sending a close frame.</p>
+<p>To tell Cowboy to close the connection, use a stop tuple:</p>
+<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">websocket_info</span></span>(<span style="color: #009900">_Info</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">stop</span>, <span style="color: #009900">State</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Sending a <code>close</code> frame will immediately initiate the closing
-of the Websocket connection. Note that when sending a list of
-frames that include a close frame, any frame found after the
-close frame will not be sent.</p></div>
-</div>
-</div>
+<pre><tt><b><font color="#000000">websocket_info</font></b>(<font color="#009900">_Info</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">stop</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Sending a <code>close</code> frame will immediately initiate the closing of the Websocket connection. Note that when sending a list of frames that include a close frame, any frame found after the close frame will not be sent.</p>
+
diff --git a/docs/en/cowboy/2.2/guide/ws_protocol/index.html b/docs/en/cowboy/2.2/guide/ws_protocol/index.html
index 2ce9b79f..24ec7873 100644
--- a/docs/en/cowboy/2.2/guide/ws_protocol/index.html
+++ b/docs/en/cowboy/2.2/guide/ws_protocol/index.html
@@ -62,70 +62,22 @@
<h1 class="lined-header"><span>The Websocket protocol</span></h1>
-<div class="paragraph"><p>This chapter explains what Websocket is and why it is
-a vital component of soft realtime Web applications.</p></div>
-<div class="sect1">
+<p>This chapter explains what Websocket is and why it is a vital component of soft realtime Web applications.</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Websocket is an extension to HTTP that emulates plain TCP
-connections between the client, typically a Web browser,
-and the server. It uses the HTTP Upgrade mechanism to
-establish the connection.</p></div>
-<div class="paragraph"><p>Websocket connections are fully asynchronous, unlike
-HTTP/1.1 (synchronous) and HTTP/2 (asynchronous, but the
-server can only initiate streams in response to requests).
-With Websocket, the client and the server can both send
-frames at any time without any restriction. It is closer
-to TCP than any of the HTTP protocols.</p></div>
-<div class="paragraph"><p>Websocket is an IETF standard. Cowboy supports the standard
-and all drafts that were previously implemented by browsers,
-excluding the initial flawed draft sometimes known as
-"version 0".</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Websocket is an extension to HTTP that emulates plain TCP connections between the client, typically a Web browser, and the server. It uses the HTTP Upgrade mechanism to establish the connection.</p>
+<p>Websocket connections are fully asynchronous, unlike HTTP/1.1 (synchronous) and HTTP/2 (asynchronous, but the server can only initiate streams in response to requests). With Websocket, the client and the server can both send frames at any time without any restriction. It is closer to TCP than any of the HTTP protocols.</p>
+<p>Websocket is an IETF standard. Cowboy supports the standard and all drafts that were previously implemented by browsers, excluding the initial flawed draft sometimes known as &quot;version 0&quot;.</p>
<h2 id="_websocket_vs_http_2">Websocket vs HTTP/2</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>For a few years Websocket was the only way to have a
-bidirectional asynchronous connection with the server.
-This changed when HTTP/2 was introduced. While HTTP/2
-requires the client to first perform a request before
-the server can push data, this is only a minor restriction
-as the client can do so just as it connects.</p></div>
-<div class="paragraph"><p>Websocket was designed as a kind-of-TCP channel to a
-server. It only defines the framing and connection
-management and lets the developer implement a protocol
-on top of it. For example you could implement IRC over
-Websocket and use a Javascript IRC client to speak to
-the server.</p></div>
-<div class="paragraph"><p>HTTP/2 on the other hand is just an improvement over
-the HTTP/1.1 connection and request/response mechanism.
-It has the same semantics as HTTP/1.1.</p></div>
-<div class="paragraph"><p>If all you need is to access an HTTP API, then HTTP/2
-should be your first choice. On the other hand, if what
-you need is a different protocol, then you can use
-Websocket to implement it.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>For a few years Websocket was the only way to have a bidirectional asynchronous connection with the server. This changed when HTTP/2 was introduced. While HTTP/2 requires the client to first perform a request before the server can push data, this is only a minor restriction as the client can do so just as it connects.</p>
+<p>Websocket was designed as a kind-of-TCP channel to a server. It only defines the framing and connection management and lets the developer implement a protocol on top of it. For example you could implement IRC over Websocket and use a Javascript IRC client to speak to the server.</p>
+<p>HTTP/2 on the other hand is just an improvement over the HTTP/1.1 connection and request/response mechanism. It has the same semantics as HTTP/1.1.</p>
+<p>If all you need is to access an HTTP API, then HTTP/2 should be your first choice. On the other hand, if what you need is a different protocol, then you can use Websocket to implement it.</p>
<h2 id="_implementation">Implementation</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy implements Websocket as a protocol upgrade. Once the
-upgrade is performed from the <code>init/2</code> callback, Cowboy
-switches to Websocket. Please consult the next chapter for
-more information on initiating and handling Websocket
-connections.</p></div>
-<div class="paragraph"><p>The implementation of Websocket in Cowboy is validated using
-the Autobahn test suite, which is an extensive suite of tests
-covering all aspects of the protocol. Cowboy passes the
-suite with 100% success, including all optional tests.</p></div>
-<div class="paragraph"><p>Cowboy&#8217;s Websocket implementation also includes the
-permessage-deflate and x-webkit-deflate-frame compression
-extensions.</p></div>
-<div class="paragraph"><p>Cowboy will automatically use compression when the
-<code>compress</code> option is returned from the <code>init/2</code> function.</p></div>
-</div>
-</div>
+<p>Cowboy implements Websocket as a protocol upgrade. Once the upgrade is performed from the <code>init/2</code> callback, Cowboy switches to Websocket. Please consult the next chapter for more information on initiating and handling Websocket connections.</p>
+<p>The implementation of Websocket in Cowboy is validated using the Autobahn test suite, which is an extensive suite of tests covering all aspects of the protocol. Cowboy passes the suite with 100% success, including all optional tests.</p>
+<p>Cowboy&apos;s Websocket implementation also includes the permessage-deflate and x-webkit-deflate-frame compression extensions.</p>
+<p>Cowboy will automatically use compression when the <code>compress</code> option is returned from the <code>init/2</code> function.</p>
+
diff --git a/docs/en/cowboy/2.2/manual/cowboy.set_env/index.html b/docs/en/cowboy/2.2/manual/cowboy.set_env/index.html
index 4433f10b..455075c0 100644
--- a/docs/en/cowboy/2.2/manual/cowboy.set_env/index.html
+++ b/docs/en/cowboy/2.2/manual/cowboy.set_env/index.html
@@ -62,117 +62,59 @@
<h1 class="lined-header"><span>cowboy:set_env(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy:set_env - Update a listener&#8217;s environment value</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy:set_env - Update a listener&apos;s environment value</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">set_env</span></span>(<span style="color: #009900">Name</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">ranch:ref</span></span>(),
- <span style="color: #009900">Key</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">atom</span></span>(),
- <span style="color: #009900">Value</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>())
- <span style="color: #990000">-&gt;</span> <span style="color: #FF6600">ok</span></tt></pre></div></div>
-<div class="paragraph"><p>Set or update an environment value for a previously started
-listener.</p></div>
-<div class="paragraph"><p>This is most useful for updating the routes dynamically,
-without having to restart the listener.</p></div>
-<div class="paragraph"><p>The new value will only be available to new connections.
-Pre-existing connections will still use the old value.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">set_env</font></b>(<font color="#009900">Name</font> <font color="#990000">::</font> <b><font color="#000000">ranch:ref</font></b>(),
+ <font color="#009900">Key</font> <font color="#990000">::</font> <b><font color="#000080">atom</font></b>(),
+ <font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>())
+ <font color="#990000">-&gt;</font> <font color="#FF6600">ok</font></tt></pre>
+</div></div>
+<p>Set or update an environment value for a previously started listener.</p>
+<p>This is most useful for updating the routes dynamically, without having to restart the listener.</p>
+<p>The new value will only be available to new connections. Pre-existing connections will still use the old value.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Name
-</dt>
-<dd>
-<p>
-The name of the listener to update.
-</p>
-<div class="paragraph"><p>The name of the listener is the first argument given to the
-<a href="../cowboy.start_clear">cowboy:start_clear(3)</a>,
-<a href="../cowboy.start_tls">cowboy:start_tls(3)</a> or
-<a href="../ranch.start_listener">ranch:start_listener(3)</a> function.</p></div>
+<dl><dt>Name</dt>
+<dd><p>The name of the listener to update.</p>
+<p>The name of the listener is the first argument given to the <a href="../cowboy.start_clear">cowboy:start_clear(3)</a>, <a href="../cowboy.start_tls">cowboy:start_tls(3)</a> or <a href="../ranch.start_listener">ranch:start_listener(3)</a> function.</p>
</dd>
-<dt class="hdlist1">
-Key
-</dt>
-<dd>
-<p>
-The key in the environment map. Common keys include <code>dispatch</code>
-and <code>middlewares</code>.
-</p>
+<dt>Key</dt>
+<dd><p>The key in the environment map. Common keys include <code>dispatch</code> and <code>middlewares</code>.</p>
</dd>
-<dt class="hdlist1">
-Value
-</dt>
-<dd>
-<p>
-The new value.
-</p>
-<div class="paragraph"><p>The type of the value differs depending on the key.</p></div>
+<dt>Value</dt>
+<dd><p>The new value.</p>
+<p>The type of the value differs depending on the key.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The atom <code>ok</code> is returned on success.</p></div>
-<div class="paragraph"><p>An <code>exit:badarg</code> exception is thrown when the listener does
-not exist.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The atom <code>ok</code> is returned on success.</p>
+<p>An <code>exit:badarg</code> exception is thrown when the listener does not exist.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<ul><li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Update a listener&#8217;s routes</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Update a listener&apos;s routes</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">Dispatch</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_router:compile</span></span>([
- {<span style="color: #FF6600">'_'</span>, [
- {<span style="color: #FF0000">"/"</span>, <span style="color: #FF6600">toppage_h</span>, []},
- {<span style="color: #FF0000">"/ws"</span>, <span style="color: #FF6600">websocket_h</span>, []}
+<pre><tt><font color="#009900">Dispatch</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_router:compile</font></b>([
+ {<font color="#FF6600">'_'</font>, [
+ {<font color="#FF0000">"/"</font>, <font color="#FF6600">toppage_h</font>, []},
+ {<font color="#FF0000">"/ws"</font>, <font color="#FF6600">websocket_h</font>, []}
]}
]),
-<span style="font-weight: bold"><span style="color: #000000">cowboy:set_env</span></span>(<span style="color: #FF6600">example</span>, <span style="color: #FF6600">dispatch</span>, <span style="color: #009900">Dispatch</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<b><font color="#000000">cowboy:set_env</font></b>(<font color="#FF6600">example</font>, <font color="#FF6600">dispatch</font>, <font color="#009900">Dispatch</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../cowboy">cowboy(3)</a>,
-<a href="../cowboy.start_clear">cowboy:start_clear(3)</a>,
-<a href="../cowboy.start_tls">cowboy:start_tls(3)</a>,
-<a href="../ranch.set_protocol_options">ranch:set_protocol_options(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy">cowboy(3)</a>, <a href="../cowboy.start_clear">cowboy:start_clear(3)</a>, <a href="../cowboy.start_tls">cowboy:start_tls(3)</a>, <a href="../ranch.set_protocol_options">ranch:set_protocol_options(3)</a></p>
+
diff --git a/docs/en/cowboy/2.2/manual/cowboy.start_clear/index.html b/docs/en/cowboy/2.2/manual/cowboy.start_clear/index.html
index 0893ad36..0aa7db74 100644
--- a/docs/en/cowboy/2.2/manual/cowboy.start_clear/index.html
+++ b/docs/en/cowboy/2.2/manual/cowboy.start_clear/index.html
@@ -62,148 +62,77 @@
<h1 class="lined-header"><span>cowboy:start_clear(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy:start_clear - Listen for connections using plain TCP</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy:start_clear - Listen for connections using plain TCP</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">start_clear</span></span>(<span style="color: #009900">Name</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">ranch:ref</span></span>(),
- <span style="color: #009900">TransportOpts</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">ranch_tcp:opts</span></span>(),
- <span style="color: #009900">ProtocolOpts</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">opts</span></span>())
- <span style="color: #990000">-&gt;</span> {<span style="color: #FF6600">ok</span>, <span style="color: #009900">ListenerPid</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">pid</span></span>()}
- | {<span style="color: #FF6600">error</span>, <span style="font-weight: bold"><span style="color: #000000">any</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>Start listening for connections over a clear TCP channel.</p></div>
-<div class="paragraph"><p>Both HTTP/1.1 and HTTP/2 are supported on this listener.
-HTTP/2 has two methods of establishing a connection over
-a clear TCP channel. Both the upgrade and the prior knowledge
-methods are supported.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">start_clear</font></b>(<font color="#009900">Name</font> <font color="#990000">::</font> <b><font color="#000000">ranch:ref</font></b>(),
+ <font color="#009900">TransportOpts</font> <font color="#990000">::</font> <b><font color="#000000">ranch_tcp:opts</font></b>(),
+ <font color="#009900">ProtocolOpts</font> <font color="#990000">::</font> <b><font color="#000000">opts</font></b>())
+ <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <font color="#009900">ListenerPid</font> <font color="#990000">::</font> <b><font color="#000080">pid</font></b>()}
+ | {<font color="#FF6600">error</font>, <b><font color="#000000">any</font></b>()}</tt></pre>
+</div></div>
+<p>Start listening for connections over a clear TCP channel.</p>
+<p>Both HTTP/1.1 and HTTP/2 are supported on this listener. HTTP/2 has two methods of establishing a connection over a clear TCP channel. Both the upgrade and the prior knowledge methods are supported.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Name
-</dt>
-<dd>
-<p>
-The listener name is used to refer to this listener in
-future calls, for example when stopping it or when
-updating the routes defined.
-</p>
-<div class="paragraph"><p>It can be any Erlang term. An atom is generally good enough,
-for example <code>api</code>, <code>my_app_clear</code> or <code>my_app_tls</code>.</p></div>
+<dl><dt>Name</dt>
+<dd><p>The listener name is used to refer to this listener in future calls, for example when stopping it or when updating the routes defined.</p>
+<p>It can be any Erlang term. An atom is generally good enough, for example <code>api</code>, <code>my_app_clear</code> or <code>my_app_tls</code>.</p>
</dd>
-<dt class="hdlist1">
-TransportOpts
-</dt>
-<dd>
-<p>
-The transport options are where the TCP options, including
-the listener&#8217;s port number, are defined. Transport options
-are provided as a list of keys and values, for example
-<code>[{port, 8080}]</code>.
-</p>
-<div class="paragraph"><p>The available options are documented in the
-<a href="../ranch_tcp">ranch_tcp(3)</a> manual.</p></div>
+<dt>TransportOpts</dt>
+<dd><p>The transport options are where the TCP options, including the listener&apos;s port number, are defined. Transport options are provided as a list of keys and values, for example <code>[{port, 8080}]</code>.</p>
+<p>The available options are documented in the <a href="../ranch_tcp">ranch_tcp(3)</a> manual.</p>
</dd>
-<dt class="hdlist1">
-ProtocolOpts
-</dt>
-<dd>
-<p>
-The protocol options are in a map containing all the options for
-the different protocols that may be involved when connecting
-to the listener, including HTTP/1.1 and HTTP/2.
-</p>
-<div class="paragraph"><p>The HTTP/1.1 options are documented in the
-<a href="../cowboy_http">cowboy_http(3)</a> manual;
-and the HTTP/2 options in
-<a href="../cowboy_http2">cowboy_http2(3)</a>.</p></div>
+<dt>ProtocolOpts</dt>
+<dd><p>The protocol options are in a map containing all the options for the different protocols that may be involved when connecting to the listener, including HTTP/1.1 and HTTP/2.</p>
+<p>The HTTP/1.1 options are documented in the <a href="../cowboy_http">cowboy_http(3)</a> manual; and the HTTP/2 options in <a href="../cowboy_http2">cowboy_http2(3)</a>.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>An ok tuple is returned on success. It contains the pid of
-the top-level supervisor for the listener.</p></div>
-<div class="paragraph"><p>An error tuple is returned on error. The error reason may
-be any Erlang term.</p></div>
-<div class="paragraph"><p>A common error is <code>eaddrinuse</code>. It indicates that the port
-configured for Cowboy is already in use.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>An ok tuple is returned on success. It contains the pid of the top-level supervisor for the listener.</p>
+<p>An error tuple is returned on error. The error reason may be any Erlang term.</p>
+<p>A common error is <code>eaddrinuse</code>. It indicates that the port configured for Cowboy is already in use.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: HTTP/2 support added.
-</p>
+<ul><li><strong>2.0</strong>: HTTP/2 support added.
</li>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced. Replaces <code>cowboy:start_http/4</code>.
-</p>
+<li><strong>2.0</strong>: Function introduced. Replaces <code>cowboy:start_http/4</code>.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Start a listener</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Start a listener</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">Dispatch</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_router:compile</span></span>([
- {<span style="color: #FF6600">'_'</span>, [
- {<span style="color: #FF0000">"/"</span>, <span style="color: #FF6600">toppage_h</span>, []}
+<pre><tt><font color="#009900">Dispatch</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_router:compile</font></b>([
+ {<font color="#FF6600">'_'</font>, [
+ {<font color="#FF0000">"/"</font>, <font color="#FF6600">toppage_h</font>, []}
]}
]),
-{<span style="color: #FF6600">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:start_clear</span></span>(<span style="color: #FF6600">example</span>, [{<span style="color: #FF6600">port</span>, <span style="color: #993399">8080</span>}], #{
- <span style="color: #0000FF">env</span> <span style="color: #990000">=&gt;</span> #{<span style="color: #0000FF">dispatch</span> <span style="color: #990000">=&gt;</span> <span style="color: #009900">Dispatch</span>}
-})<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Start a listener on a random port</div>
-<div class="content"><!-- Generator: GNU source-highlight
+{<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy:start_clear</font></b>(<font color="#FF6600">example</font>, [{<font color="#FF6600">port</font>, <font color="#993399">8080</font>}], #{
+ <font color="#0000FF">env</font> <font color="#990000">=&gt;</font> #{<font color="#0000FF">dispatch</font> <font color="#990000">=&gt;</font> <font color="#009900">Dispatch</font>}
+})<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Start a listener on a random port</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">Name</span> <span style="color: #990000">=</span> <span style="color: #FF6600">example</span>,
+<pre><tt><font color="#009900">Name</font> <font color="#990000">=</font> <font color="#FF6600">example</font>,
-{<span style="color: #FF6600">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:start_clear</span></span>(<span style="color: #009900">Name</span>, [], #{
- <span style="color: #0000FF">env</span> <span style="color: #990000">=&gt;</span> #{<span style="color: #0000FF">dispatch</span> <span style="color: #990000">=&gt;</span> <span style="color: #009900">Dispatch</span>}
+{<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy:start_clear</font></b>(<font color="#009900">Name</font>, [], #{
+ <font color="#0000FF">env</font> <font color="#990000">=&gt;</font> #{<font color="#0000FF">dispatch</font> <font color="#990000">=&gt;</font> <font color="#009900">Dispatch</font>}
}),
-<span style="color: #009900">Port</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">ranch:get_port</span></span>(<span style="color: #009900">Name</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<font color="#009900">Port</font> <font color="#990000">=</font> <b><font color="#000000">ranch:get_port</font></b>(<font color="#009900">Name</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../cowboy">cowboy(3)</a>,
-<a href="../cowboy.start_tls">cowboy:start_tls(3)</a>,
-<a href="../cowboy.stop_listener">cowboy:stop_listener(3)</a>,
-<a href="../ranch">ranch(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy">cowboy(3)</a>, <a href="../cowboy.start_tls">cowboy:start_tls(3)</a>, <a href="../cowboy.stop_listener">cowboy:stop_listener(3)</a>, <a href="../ranch">ranch(3)</a></p>
+
diff --git a/docs/en/cowboy/2.2/manual/cowboy.start_tls/index.html b/docs/en/cowboy/2.2/manual/cowboy.start_tls/index.html
index cfac1e63..71a6cffe 100644
--- a/docs/en/cowboy/2.2/manual/cowboy.start_tls/index.html
+++ b/docs/en/cowboy/2.2/manual/cowboy.start_tls/index.html
@@ -62,153 +62,82 @@
<h1 class="lined-header"><span>cowboy:start_tls(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy:start_tls - Listen for connections using TLS</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy:start_tls - Listen for connections using TLS</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">start_tls</span></span>(<span style="color: #009900">Name</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">ranch:ref</span></span>(),
- <span style="color: #009900">TransportOpts</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">ranch_ssl:opts</span></span>(),
- <span style="color: #009900">ProtocolOpts</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">opts</span></span>())
- <span style="color: #990000">-&gt;</span> {<span style="color: #FF6600">ok</span>, <span style="color: #009900">ListenerPid</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">pid</span></span>()}
- | {<span style="color: #FF6600">error</span>, <span style="font-weight: bold"><span style="color: #000000">any</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>Start listening for connections over a secure TLS channel.</p></div>
-<div class="paragraph"><p>Both HTTP/1.1 and HTTP/2 are supported on this listener.
-The ALPN TLS extension must be used to initiate an HTTP/2
-connection.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">start_tls</font></b>(<font color="#009900">Name</font> <font color="#990000">::</font> <b><font color="#000000">ranch:ref</font></b>(),
+ <font color="#009900">TransportOpts</font> <font color="#990000">::</font> <b><font color="#000000">ranch_ssl:opts</font></b>(),
+ <font color="#009900">ProtocolOpts</font> <font color="#990000">::</font> <b><font color="#000000">opts</font></b>())
+ <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <font color="#009900">ListenerPid</font> <font color="#990000">::</font> <b><font color="#000080">pid</font></b>()}
+ | {<font color="#FF6600">error</font>, <b><font color="#000000">any</font></b>()}</tt></pre>
+</div></div>
+<p>Start listening for connections over a secure TLS channel.</p>
+<p>Both HTTP/1.1 and HTTP/2 are supported on this listener. The ALPN TLS extension must be used to initiate an HTTP/2 connection.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Name
-</dt>
-<dd>
-<p>
-The listener name is used to refer to this listener in
-future calls, for example when stopping it or when
-updating the routes defined.
-</p>
-<div class="paragraph"><p>It can be any Erlang term. An atom is generally good enough,
-for example <code>api</code>, <code>my_app_clear</code> or <code>my_app_tls</code>.</p></div>
+<dl><dt>Name</dt>
+<dd><p>The listener name is used to refer to this listener in future calls, for example when stopping it or when updating the routes defined.</p>
+<p>It can be any Erlang term. An atom is generally good enough, for example <code>api</code>, <code>my_app_clear</code> or <code>my_app_tls</code>.</p>
</dd>
-<dt class="hdlist1">
-TransportOpts
-</dt>
-<dd>
-<p>
-The transport options are where the TCP options, including
-the listener&#8217;s port number, are defined. They also contain
-the TLS options, like the server&#8217;s certificate. Transport options
-are provided as a list of keys and values, for example
-<code>[{port, 8443}, {certfile, "path/to/cert.pem"}]</code>.
-</p>
-<div class="paragraph"><p>The available options are documented in the
-<a href="../ranch_ssl">ranch_ssl(3)</a> manual.</p></div>
+<dt>TransportOpts</dt>
+<dd><p>The transport options are where the TCP options, including the listener&apos;s port number, are defined. They also contain the TLS options, like the server&apos;s certificate. Transport options are provided as a list of keys and values, for example <code>[{port, 8443}, {certfile, &quot;path/to/cert.pem&quot;}]</code>.</p>
+<p>The available options are documented in the <a href="../ranch_ssl">ranch_ssl(3)</a> manual.</p>
</dd>
-<dt class="hdlist1">
-ProtocolOpts
-</dt>
-<dd>
-<p>
-The protocol options are in a map containing all the options for
-the different protocols that may be involved when connecting
-to the listener, including HTTP/1.1 and HTTP/2.
-</p>
-<div class="paragraph"><p>The HTTP/1.1 options are documented in the
-<a href="../cowboy_http">cowboy_http(3)</a> manual;
-and the HTTP/2 options in
-<a href="../cowboy_http2">cowboy_http2(3)</a>.</p></div>
+<dt>ProtocolOpts</dt>
+<dd><p>The protocol options are in a map containing all the options for the different protocols that may be involved when connecting to the listener, including HTTP/1.1 and HTTP/2.</p>
+<p>The HTTP/1.1 options are documented in the <a href="../cowboy_http">cowboy_http(3)</a> manual; and the HTTP/2 options in <a href="../cowboy_http2">cowboy_http2(3)</a>.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>An ok tuple is returned on success. It contains the pid of
-the top-level supervisor for the listener.</p></div>
-<div class="paragraph"><p>An error tuple is returned on error. The error reason may
-be any Erlang term.</p></div>
-<div class="paragraph"><p>A common error is <code>eaddrinuse</code>. It indicates that the port
-configured for Cowboy is already in use.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>An ok tuple is returned on success. It contains the pid of the top-level supervisor for the listener.</p>
+<p>An error tuple is returned on error. The error reason may be any Erlang term.</p>
+<p>A common error is <code>eaddrinuse</code>. It indicates that the port configured for Cowboy is already in use.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: HTTP/2 support added.
-</p>
+<ul><li><strong>2.0</strong>: HTTP/2 support added.
</li>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced. Replaces <code>cowboy:start_https/4</code>.
-</p>
+<li><strong>2.0</strong>: Function introduced. Replaces <code>cowboy:start_https/4</code>.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Start a listener</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Start a listener</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">Dispatch</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_router:compile</span></span>([
- {<span style="color: #FF6600">'_'</span>, [
- {<span style="color: #FF0000">"/"</span>, <span style="color: #FF6600">toppage_h</span>, []}
+<pre><tt><font color="#009900">Dispatch</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_router:compile</font></b>([
+ {<font color="#FF6600">'_'</font>, [
+ {<font color="#FF0000">"/"</font>, <font color="#FF6600">toppage_h</font>, []}
]}
]),
-{<span style="color: #FF6600">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:start_tls</span></span>(<span style="color: #FF6600">example</span>, [
- {<span style="color: #FF6600">port</span>, <span style="color: #993399">8443</span>},
- {<span style="color: #FF6600">cert</span>, <span style="color: #FF0000">"path/to/cert.pem"</span>}
+{<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy:start_tls</font></b>(<font color="#FF6600">example</font>, [
+ {<font color="#FF6600">port</font>, <font color="#993399">8443</font>},
+ {<font color="#FF6600">cert</font>, <font color="#FF0000">"path/to/cert.pem"</font>}
], #{
- <span style="color: #0000FF">env</span> <span style="color: #990000">=&gt;</span> #{<span style="color: #0000FF">dispatch</span> <span style="color: #990000">=&gt;</span> <span style="color: #009900">Dispatch</span>}
-})<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Start a listener on a random port</div>
-<div class="content"><!-- Generator: GNU source-highlight
+ <font color="#0000FF">env</font> <font color="#990000">=&gt;</font> #{<font color="#0000FF">dispatch</font> <font color="#990000">=&gt;</font> <font color="#009900">Dispatch</font>}
+})<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Start a listener on a random port</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">Name</span> <span style="color: #990000">=</span> <span style="color: #FF6600">example</span>,
+<pre><tt><font color="#009900">Name</font> <font color="#990000">=</font> <font color="#FF6600">example</font>,
-{<span style="color: #FF6600">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:start_tls</span></span>(<span style="color: #009900">Name</span>, [
- {<span style="color: #FF6600">cert</span>, <span style="color: #FF0000">"path/to/cert.pem"</span>}
+{<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy:start_tls</font></b>(<font color="#009900">Name</font>, [
+ {<font color="#FF6600">cert</font>, <font color="#FF0000">"path/to/cert.pem"</font>}
], #{
- <span style="color: #0000FF">env</span> <span style="color: #990000">=&gt;</span> #{<span style="color: #0000FF">dispatch</span> <span style="color: #990000">=&gt;</span> <span style="color: #009900">Dispatch</span>}
+ <font color="#0000FF">env</font> <font color="#990000">=&gt;</font> #{<font color="#0000FF">dispatch</font> <font color="#990000">=&gt;</font> <font color="#009900">Dispatch</font>}
}),
-<span style="color: #009900">Port</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">ranch:get_port</span></span>(<span style="color: #009900">Name</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<font color="#009900">Port</font> <font color="#990000">=</font> <b><font color="#000000">ranch:get_port</font></b>(<font color="#009900">Name</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../cowboy">cowboy(3)</a>,
-<a href="../cowboy.start_clear">cowboy:start_clear(3)</a>,
-<a href="../cowboy.stop_listener">cowboy:stop_listener(3)</a>,
-<a href="../ranch">ranch(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy">cowboy(3)</a>, <a href="../cowboy.start_clear">cowboy:start_clear(3)</a>, <a href="../cowboy.stop_listener">cowboy:stop_listener(3)</a>, <a href="../ranch">ranch(3)</a></p>
+
diff --git a/docs/en/cowboy/2.2/manual/cowboy.stop_listener/index.html b/docs/en/cowboy/2.2/manual/cowboy.stop_listener/index.html
index 253f9b08..4941b0b3 100644
--- a/docs/en/cowboy/2.2/manual/cowboy.stop_listener/index.html
+++ b/docs/en/cowboy/2.2/manual/cowboy.stop_listener/index.html
@@ -62,87 +62,42 @@
<h1 class="lined-header"><span>cowboy:stop_listener(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy:stop_listener - Stop the given listener</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy:stop_listener - Stop the given listener</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">stop_listener</span></span>(<span style="color: #009900">Name</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">ranch:ref</span></span>())
- <span style="color: #990000">-&gt;</span> <span style="color: #FF6600">ok</span> | {<span style="color: #FF6600">error</span>, <span style="color: #FF6600">not_found</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Stop a previously started listener.</p></div>
-<div class="paragraph"><p>Alias of <a href="../ranch.stop_listener">ranch:stop_listener(3)</a>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">stop_listener</font></b>(<font color="#009900">Name</font> <font color="#990000">::</font> <b><font color="#000000">ranch:ref</font></b>())
+ <font color="#990000">-&gt;</font> <font color="#FF6600">ok</font> | {<font color="#FF6600">error</font>, <font color="#FF6600">not_found</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Stop a previously started listener.</p>
+<p>Alias of <a href="../ranch.stop_listener">ranch:stop_listener(3)</a>.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Name
-</dt>
-<dd>
-<p>
-The name of the listener to be stopped.
-</p>
-<div class="paragraph"><p>The name of the listener is the first argument given to the
-<a href="../cowboy.start_clear">cowboy:start_clear(3)</a>,
-<a href="../cowboy.start_tls">cowboy:start_tls(3)</a> or
-<a href="../ranch.start_listener">ranch:start_listener(3)</a> function.</p></div>
+<dl><dt>Name</dt>
+<dd><p>The name of the listener to be stopped.</p>
+<p>The name of the listener is the first argument given to the <a href="../cowboy.start_clear">cowboy:start_clear(3)</a>, <a href="../cowboy.start_tls">cowboy:start_tls(3)</a> or <a href="../ranch.start_listener">ranch:start_listener(3)</a> function.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The atom <code>ok</code> is returned on success.</p></div>
-<div class="paragraph"><p>The <code>{error, not_found}</code> tuple is returned when the listener
-does not exist.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The atom <code>ok</code> is returned on success.</p>
+<p>The <code>{error, not_found}</code> tuple is returned when the listener does not exist.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<ul><li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Stop a listener</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Stop a listener</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: #0000FF">ok</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:stop_listener</span></span>(<span style="color: #FF6600">example</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#0000FF">ok</font> <font color="#990000">=</font> <b><font color="#000000">cowboy:stop_listener</font></b>(<font color="#FF6600">example</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../cowboy">cowboy(3)</a>,
-<a href="../cowboy.start_clear">cowboy:start_clear(3)</a>,
-<a href="../cowboy.start_tls">cowboy:start_tls(3)</a>,
-<a href="../ranch">ranch(3)</a>,
-<a href="../ranch.start_listener">ranch:start_listener(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy">cowboy(3)</a>, <a href="../cowboy.start_clear">cowboy:start_clear(3)</a>, <a href="../cowboy.start_tls">cowboy:start_tls(3)</a>, <a href="../ranch">ranch(3)</a>, <a href="../ranch.start_listener">ranch:start_listener(3)</a></p>
+
diff --git a/docs/en/cowboy/2.2/manual/cowboy/index.html b/docs/en/cowboy/2.2/manual/cowboy/index.html
index f75e2b17..e2805b79 100644
--- a/docs/en/cowboy/2.2/manual/cowboy/index.html
+++ b/docs/en/cowboy/2.2/manual/cowboy/index.html
@@ -62,129 +62,76 @@
<h1 class="lined-header"><span>cowboy(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy - HTTP server</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy - HTTP server</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The module <code>cowboy</code> provides convenience functions for
-manipulating Ranch listeners.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The module <code>cowboy</code> provides convenience functions for manipulating Ranch listeners.</p>
<h2 id="_exports">Exports</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../cowboy.start_clear">cowboy:start_clear(3)</a> - Listen for connections using plain TCP
-</p>
+<ul><li><a href="../cowboy.start_clear">cowboy:start_clear(3)</a> - Listen for connections using plain TCP
</li>
-<li>
-<p>
-<a href="../cowboy.start_tls">cowboy:start_tls(3)</a> - Listen for connections using TLS
-</p>
+<li><a href="../cowboy.start_tls">cowboy:start_tls(3)</a> - Listen for connections using TLS
</li>
-<li>
-<p>
-<a href="../cowboy.stop_listener">cowboy:stop_listener(3)</a> - Stop the given listener
-</p>
+<li><a href="../cowboy.stop_listener">cowboy:stop_listener(3)</a> - Stop the given listener
</li>
-<li>
-<p>
-<a href="../cowboy.set_env">cowboy:set_env(3)</a> - Update a listener&#8217;s environment value
-</p>
+<li><a href="../cowboy.set_env">cowboy:set_env(3)</a> - Update a listener&apos;s environment value
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_types">Types</h2>
-<div class="sectionbody">
-<div class="sect2">
<h3 id="_fields">fields()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">fields</span></span>() <span style="color: #990000">::</span> [<span style="color: #009900">Name</span>
- | {<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">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>
-<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
-<a href="../cowboy_req">cowboy_req(3)</a>.</p></div>
-</div>
-<div class="sect2">
+<pre><tt><b><font color="#000000">fields</font></b>() <font color="#990000">::</font> [<font color="#009900">Name</font>
+ | {<font color="#009900">Name</font>, <font color="#009900">Constraints</font>}
+ | {<font color="#009900">Name</font>, <font color="#009900">Constraints</font>, <font color="#009900">Default</font>}]
+
+<font color="#009900">Name</font> <font color="#990000">::</font> <b><font color="#000080">atom</font></b>()
+<font color="#009900">Constraints</font> <font color="#990000">::</font> <font color="#009900">Constraint</font> | [<font color="#009900">Constraint</font>]
+<font color="#009900">Constraint</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_constraints:constraint</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()</tt></pre>
+</div></div>
+<p>Fields description for match operations.</p>
+<p>This type is used in <a href="../cowboy_router">cowboy_router(3)</a> for matching bindings and in the match functions found in <a href="../cowboy_req">cowboy_req(3)</a>.</p>
<h3 id="_http_headers">http_headers()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">http_headers</span></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: #000000">iodata</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>HTTP headers.</p></div>
-</div>
-<div class="sect2">
+<pre><tt><b><font color="#000000">http_headers</font></b>() <font color="#990000">::</font> #{<b><font color="#000080">binary</font></b>() <font color="#990000">=&gt;</font> <b><font color="#000000">iodata</font></b>()}</tt></pre>
+</div></div>
+<p>HTTP headers.</p>
<h3 id="_http_status">http_status()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">http_status</span></span>() <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>() | <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>HTTP response status.</p></div>
-<div class="paragraph"><p>A binary status can be used to set a reason phrase. Note
-however that HTTP/2 only sends the status code and drops
-the reason phrase entirely.</p></div>
-</div>
-<div class="sect2">
+<pre><tt><b><font color="#000000">http_status</font></b>() <font color="#990000">::</font> <b><font color="#000000">non_neg_integer</font></b>() | <b><font color="#000080">binary</font></b>()</tt></pre>
+</div></div>
+<p>HTTP response status.</p>
+<p>A binary status can be used to set a reason phrase. Note however that HTTP/2 only sends the status code and drops the reason phrase entirely.</p>
<h3 id="_http_version">http_version()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">http_version</span></span>() <span style="color: #990000">::</span> <span style="color: #FF6600">'HTTP/2'</span> | <span style="color: #FF6600">'HTTP/1.1'</span> | <span style="color: #FF6600">'HTTP/1.0'</span></tt></pre></div></div>
-<div class="paragraph"><p>HTTP version.</p></div>
-<div class="paragraph"><p>Note that semantically, HTTP/1.1 and HTTP/2 are equivalent.</p></div>
-</div>
-<div class="sect2">
+<pre><tt><b><font color="#000000">http_version</font></b>() <font color="#990000">::</font> <font color="#FF6600">'HTTP/2'</font> | <font color="#FF6600">'HTTP/1.1'</font> | <font color="#FF6600">'HTTP/1.0'</font></tt></pre>
+</div></div>
+<p>HTTP version.</p>
+<p>Note that semantically, HTTP/1.1 and HTTP/2 are equivalent.</p>
<h3 id="_opts">opts()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">opts</span></span>() <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">map</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Options for the HTTP/1.1, HTTP/2 and Websocket protocols.</p></div>
-<div class="paragraph"><p>The protocol options are in a map containing all the options for
-the different protocols that may be involved when connecting
-to the listener, including HTTP/1.1 and HTTP/2.</p></div>
-<div class="paragraph"><p>The HTTP/1.1 options are documented in the
-<a href="../cowboy_http">cowboy_http(3)</a> manual
-and the HTTP/2 options in
-<a href="../cowboy_http2">cowboy_http2(3)</a>.</p></div>
-</div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">opts</font></b>() <font color="#990000">::</font> <b><font color="#000000">map</font></b>()</tt></pre>
+</div></div>
+<p>Options for the HTTP/1.1, HTTP/2 and Websocket protocols.</p>
+<p>The protocol options are in a map containing all the options for the different protocols that may be involved when connecting to the listener, including HTTP/1.1 and HTTP/2.</p>
+<p>The HTTP/1.1 options are documented in the <a href="../cowboy_http">cowboy_http(3)</a> manual and the HTTP/2 options in <a href="../cowboy_http2">cowboy_http2(3)</a>.</p>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="..">cowboy(7)</a>,
-<a href="../ranch">ranch(3)</a></p></div>
-</div>
-</div>
+<p><a href="..">cowboy(7)</a>, <a href="../ranch">ranch(3)</a></p>
+
diff --git a/docs/en/cowboy/2.2/manual/cowboy_app/index.html b/docs/en/cowboy/2.2/manual/cowboy_app/index.html
index 3f1d1e1e..b09e4cbd 100644
--- a/docs/en/cowboy/2.2/manual/cowboy_app/index.html
+++ b/docs/en/cowboy/2.2/manual/cowboy_app/index.html
@@ -62,171 +62,77 @@
<h1 class="lined-header"><span>cowboy(7)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy - Small, fast, modern HTTP server for Erlang/OTP</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy - Small, fast, modern HTTP server for Erlang/OTP</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy is an HTTP server for Erlang/OTP with support for the
-HTTP/1.1, HTTP/2 and Websocket protocols.</p></div>
-<div class="paragraph"><p>Cowboy aims to provide a complete HTTP stack. This includes
-the implementation of the HTTP RFCs but also any directly
-related standards, like Websocket or Server-Sent Events.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Cowboy is an HTTP server for Erlang/OTP with support for the HTTP/1.1, HTTP/2 and Websocket protocols.</p>
+<p>Cowboy aims to provide a complete HTTP stack. This includes the implementation of the HTTP RFCs but also any directly related standards, like Websocket or Server-Sent Events.</p>
<h2 id="_modules">Modules</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Functions:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../cowboy">cowboy(3)</a> - Listener management
-</p>
+<p>Functions:</p>
+<ul><li><a href="../cowboy">cowboy(3)</a> - Listener management
</li>
-<li>
-<p>
-<a href="../cowboy_req">cowboy_req(3)</a> - Request and response
-</p>
+<li><a href="../cowboy_req">cowboy_req(3)</a> - Request and response
</li>
-<li>
-<p>
-<a href="../cowboy_router">cowboy_router(3)</a> - Router
-</p>
+<li><a href="../cowboy_router">cowboy_router(3)</a> - Router
</li>
-<li>
-<p>
-<a href="../cowboy_constraints">cowboy_constraints(3)</a> - Constraints
-</p>
+<li><a href="../cowboy_constraints">cowboy_constraints(3)</a> - Constraints
</li>
-</ul></div>
-<div class="paragraph"><p>Protocols:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../cowboy_http">cowboy_http(3)</a> - HTTP/1.1
-</p>
+</ul>
+<p>Protocols:</p>
+<ul><li><a href="../cowboy_http">cowboy_http(3)</a> - HTTP/1.1
</li>
-<li>
-<p>
-<a href="../cowboy_http2">cowboy_http2(3)</a> - HTTP/2
-</p>
+<li><a href="../cowboy_http2">cowboy_http2(3)</a> - HTTP/2
</li>
-<li>
-<p>
-<a href="../cowboy_websocket">cowboy_websocket(3)</a> - Websocket
-</p>
+<li><a href="../cowboy_websocket">cowboy_websocket(3)</a> - Websocket
</li>
-</ul></div>
-<div class="paragraph"><p>Handlers:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../cowboy_static">cowboy_static(3)</a> - Static file handler
-</p>
+</ul>
+<p>Handlers:</p>
+<ul><li><a href="../cowboy_static">cowboy_static(3)</a> - Static file handler
</li>
-</ul></div>
-<div class="paragraph"><p>Behaviors:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../cowboy_handler">cowboy_handler(3)</a> - Plain HTTP handlers
-</p>
+</ul>
+<p>Behaviors:</p>
+<ul><li><a href="../cowboy_handler">cowboy_handler(3)</a> - Plain HTTP handlers
</li>
-<li>
-<p>
-<a href="../cowboy_loop">cowboy_loop(3)</a> - Loop handlers
-</p>
+<li><a href="../cowboy_loop">cowboy_loop(3)</a> - Loop handlers
</li>
-<li>
-<p>
-<a href="../cowboy_middleware">cowboy_middleware(3)</a> - Middlewares
-</p>
+<li><a href="../cowboy_middleware">cowboy_middleware(3)</a> - Middlewares
</li>
-<li>
-<p>
-<a href="../cowboy_rest">cowboy_rest(3)</a> - REST handlers
-</p>
+<li><a href="../cowboy_rest">cowboy_rest(3)</a> - REST handlers
</li>
-<li>
-<p>
-<a href="../cowboy_stream">cowboy_stream(3)</a> - Stream handlers
-</p>
+<li><a href="../cowboy_stream">cowboy_stream(3)</a> - Stream handlers
</li>
-<li>
-<p>
-<a href="../cowboy_websocket">cowboy_websocket(3)</a> - Websocket handlers
-</p>
+<li><a href="../cowboy_websocket">cowboy_websocket(3)</a> - Websocket handlers
</li>
-</ul></div>
-<div class="paragraph"><p>Middlewares:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../cowboy_router">cowboy_router(3)</a> - Router middleware
-</p>
+</ul>
+<p>Middlewares:</p>
+<ul><li><a href="../cowboy_router">cowboy_router(3)</a> - Router middleware
</li>
-<li>
-<p>
-<a href="../cowboy_handler">cowboy_handler(3)</a> - Handler middleware
-</p>
+<li><a href="../cowboy_handler">cowboy_handler(3)</a> - Handler middleware
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
+<!-- @todo http_status_codes is not linked to; what to do with it?-->
<h2 id="_dependencies">Dependencies</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../ranch">ranch(7)</a> - Socket acceptor pool for TCP protocols
-</p>
+<ul><li><a href="../ranch">ranch(7)</a> - Socket acceptor pool for TCP protocols
</li>
-<li>
-<p>
-<a href="../cowlib">cowlib(7)</a> - Support library for manipulating Web protocols
-</p>
+<li><a href="../cowlib">cowlib(7)</a> - Support library for manipulating Web protocols
</li>
-<li>
-<p>
-ssl - Secure communication over sockets
-</p>
+<li>ssl - Secure communication over sockets
</li>
-<li>
-<p>
-crypto - Crypto functions
-</p>
+<li>crypto - Crypto functions
</li>
-</ul></div>
-<div class="paragraph"><p>All these applications must be started before the <code>cowboy</code>
-application. To start Cowboy and all dependencies at once:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+</ul>
+<p>All these applications must be started before the <code>cowboy</code> application. To start Cowboy and all dependencies at once:</p>
+<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">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">application:ensure_all_started</span></span>(<span style="color: #FF6600">cowboy</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">application:ensure_all_started</font></b>(<font color="#FF6600">cowboy</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_environment">Environment</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <code>cowboy</code> application does not define any application
-environment configuration parameters.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The <code>cowboy</code> application does not define any application environment configuration parameters.</p>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../ranch">ranch(7)</a>,
-<a href="../cowlib">cowlib(7)</a></p></div>
-</div>
-</div>
+<p><a href="../ranch">ranch(7)</a>, <a href="../cowlib">cowlib(7)</a></p>
+
diff --git a/docs/en/cowboy/2.2/manual/cowboy_constraints.int/index.html b/docs/en/cowboy/2.2/manual/cowboy_constraints.int/index.html
index 7b943d1b..f2274322 100644
--- a/docs/en/cowboy/2.2/manual/cowboy_constraints.int/index.html
+++ b/docs/en/cowboy/2.2/manual/cowboy_constraints.int/index.html
@@ -62,92 +62,52 @@
<h1 class="lined-header"><span>cowboy_constraints:int(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_constraints:int - Integer constraint</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_constraints:int - Integer constraint</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Constraint functions implement a number of different operations.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Constraint functions implement a number of different operations.</p>
+<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">int</span></span>(<span style="color: #FF6600">forward</span>, <span style="color: #009900">Bin</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Int</span>} | {<span style="color: #FF6600">error</span>, <span style="color: #FF6600">not_an_integer</span>}
+<pre><tt><b><font color="#000000">int</font></b>(<font color="#FF6600">forward</font>, <font color="#009900">Bin</font>) <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <font color="#009900">Int</font>} | {<font color="#FF6600">error</font>, <font color="#FF6600">not_an_integer</font>}
-<span style="color: #009900">Bin</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()
-<span style="color: #009900">Int</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">integer</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Validate and convert the text representation of an integer.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<font color="#009900">Bin</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()
+<font color="#009900">Int</font> <font color="#990000">::</font> <b><font color="#000080">integer</font></b>()</tt></pre>
+</div></div>
+<p>Validate and convert the text representation of an integer.</p>
+<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">int</span></span>(<span style="color: #FF6600">reverse</span>, <span style="color: #009900">Int</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Bin</span>} | {<span style="color: #FF6600">error</span>, <span style="color: #FF6600">not_an_integer</span>}</tt></pre></div></div>
-<div class="paragraph"><p>Convert an integer back to its text representation.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">int</font></b>(<font color="#FF6600">reverse</font>, <font color="#009900">Int</font>) <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <font color="#009900">Bin</font>} | {<font color="#FF6600">error</font>, <font color="#FF6600">not_an_integer</font>}</tt></pre>
+</div></div>
+<p>Convert an integer back to its text representation.</p>
+<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">int</span></span>(<span style="color: #FF6600">format_error</span>, <span style="color: #009900">Error</span>) <span style="color: #990000">-&gt;</span> <span style="color: #009900">HumanReadable</span>
+<pre><tt><b><font color="#000000">int</font></b>(<font color="#FF6600">format_error</font>, <font color="#009900">Error</font>) <font color="#990000">-&gt;</font> <font color="#009900">HumanReadable</font>
-<span style="color: #009900">Error</span> <span style="color: #990000">::</span> {<span style="color: #FF6600">not_an_integer</span>, <span style="color: #009900">Bin</span> | <span style="color: #009900">Int</span>}
-<span style="color: #009900">HumanReadable</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">iolist</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Generate a human-readable error message.</p></div>
-</div>
-</div>
-<div class="sect1">
+<font color="#009900">Error</font> <font color="#990000">::</font> {<font color="#FF6600">not_an_integer</font>, <font color="#009900">Bin</font> | <font color="#009900">Int</font>}
+<font color="#009900">HumanReadable</font> <font color="#990000">::</font> <b><font color="#000000">iolist</font></b>()</tt></pre>
+</div></div>
+<p>Generate a human-readable error message.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Arguments vary depending on the operation. Constraint
-functions always take the operation type as first argument,
-and the value as second argument.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Arguments vary depending on the operation. Constraint functions always take the operation type as first argument, and the value as second argument.</p>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The return value varies depending on the operation.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The return value varies depending on the operation.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Interface modified to allow for a variety of operations.
-</p>
+<ul><li><strong>2.0</strong>: Interface modified to allow for a variety of operations.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Constraint introduced.
-</p>
+<li><strong>1.0</strong>: Constraint introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This function is not meant to be called directly.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This function is not meant to be called directly.</p>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../cowboy_constraints">cowboy_constraints(3)</a>,
-<a href="../cowboy_constraints.nonempty">cowboy_constraints:nonempty(3)</a>,
-<a href="../cowboy_router">cowboy_router(3)</a>,
-<a href="../cowboy_req.match_cookies">cowboy_req:match_cookies(3)</a>,
-<a href="../cowboy_req.match_qs">cowboy_req:match_qs(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_constraints">cowboy_constraints(3)</a>, <a href="../cowboy_constraints.nonempty">cowboy_constraints:nonempty(3)</a>, <a href="../cowboy_router">cowboy_router(3)</a>, <a href="../cowboy_req.match_cookies">cowboy_req:match_cookies(3)</a>, <a href="../cowboy_req.match_qs">cowboy_req:match_qs(3)</a></p>
+
diff --git a/docs/en/cowboy/2.2/manual/cowboy_constraints.nonempty/index.html b/docs/en/cowboy/2.2/manual/cowboy_constraints.nonempty/index.html
index facd0167..b287ca1a 100644
--- a/docs/en/cowboy/2.2/manual/cowboy_constraints.nonempty/index.html
+++ b/docs/en/cowboy/2.2/manual/cowboy_constraints.nonempty/index.html
@@ -62,91 +62,51 @@
<h1 class="lined-header"><span>cowboy_constraints:nonempty(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_constraints:nonempty - Non-empty constraint</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_constraints:nonempty - Non-empty constraint</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Constraint functions implement a number of different operations.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Constraint functions implement a number of different operations.</p>
+<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">nonempty</span></span>(<span style="color: #FF6600">forward</span> | <span style="color: #FF6600">reverse</span>, <span style="color: #990000">&lt;&lt;&gt;&gt;</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #FF6600">error</span>, <span style="color: #FF6600">empty</span>}</tt></pre></div></div>
-<div class="paragraph"><p>Reject empty values.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">nonempty</font></b>(<font color="#FF6600">forward</font> | <font color="#FF6600">reverse</font>, <font color="#990000">&lt;&lt;&gt;&gt;</font>) <font color="#990000">-&gt;</font> {<font color="#FF6600">error</font>, <font color="#FF6600">empty</font>}</tt></pre>
+</div></div>
+<p>Reject empty values.</p>
+<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">nonempty</span></span>(<span style="color: #FF6600">forward</span> | <span style="color: #FF6600">reverse</span>, <span style="color: #009900">Bin</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Bin</span>}
+<pre><tt><b><font color="#000000">nonempty</font></b>(<font color="#FF6600">forward</font> | <font color="#FF6600">reverse</font>, <font color="#009900">Bin</font>) <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <font color="#009900">Bin</font>}
-<span style="color: #009900">Bin</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>Accept any other binary values.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<font color="#009900">Bin</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()</tt></pre>
+</div></div>
+<p>Accept any other binary values.</p>
+<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">nonempty</span></span>(<span style="color: #FF6600">format_error</span>, <span style="color: #009900">Error</span>) <span style="color: #990000">-&gt;</span> <span style="color: #009900">HumanReadable</span>
+<pre><tt><b><font color="#000000">nonempty</font></b>(<font color="#FF6600">format_error</font>, <font color="#009900">Error</font>) <font color="#990000">-&gt;</font> <font color="#009900">HumanReadable</font>
-<span style="color: #009900">Error</span> <span style="color: #990000">::</span> {<span style="color: #FF6600">empty</span>, <span style="color: #009900">Bin</span>}
-<span style="color: #009900">HumanReadable</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">iolist</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Generate a human-readable error message.</p></div>
-</div>
-</div>
-<div class="sect1">
+<font color="#009900">Error</font> <font color="#990000">::</font> {<font color="#FF6600">empty</font>, <font color="#009900">Bin</font>}
+<font color="#009900">HumanReadable</font> <font color="#990000">::</font> <b><font color="#000000">iolist</font></b>()</tt></pre>
+</div></div>
+<p>Generate a human-readable error message.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Arguments vary depending on the operation. Constraint
-functions always take the operation type as first argument,
-and the value as second argument.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Arguments vary depending on the operation. Constraint functions always take the operation type as first argument, and the value as second argument.</p>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The return value varies depending on the operation.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The return value varies depending on the operation.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Interface modified to allow for a variety of operations.
-</p>
+<ul><li><strong>2.0</strong>: Interface modified to allow for a variety of operations.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Constraint introduced.
-</p>
+<li><strong>1.0</strong>: Constraint introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This function is not meant to be called directly.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This function is not meant to be called directly.</p>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../cowboy_constraints">cowboy_constraints(3)</a>,
-<a href="../cowboy_constraints.int">cowboy_constraints:int(3)</a>,
-<a href="../cowboy_router">cowboy_router(3)</a>,
-<a href="../cowboy_req.match_cookies">cowboy_req:match_cookies(3)</a>,
-<a href="../cowboy_req.match_qs">cowboy_req:match_qs(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_constraints">cowboy_constraints(3)</a>, <a href="../cowboy_constraints.int">cowboy_constraints:int(3)</a>, <a href="../cowboy_router">cowboy_router(3)</a>, <a href="../cowboy_req.match_cookies">cowboy_req:match_cookies(3)</a>, <a href="../cowboy_req.match_qs">cowboy_req:match_qs(3)</a></p>
+
diff --git a/docs/en/cowboy/2.2/manual/cowboy_constraints/index.html b/docs/en/cowboy/2.2/manual/cowboy_constraints/index.html
index 98a7305d..d5005eff 100644
--- a/docs/en/cowboy/2.2/manual/cowboy_constraints/index.html
+++ b/docs/en/cowboy/2.2/manual/cowboy_constraints/index.html
@@ -62,84 +62,43 @@
<h1 class="lined-header"><span>cowboy_constraints(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_constraints - Constraints</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_constraints - Constraints</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The module <code>cowboy_constraints</code> defines the built-in
-constraints in Cowboy and provides an interface for
-manipulating these constraints.</p></div>
-<div class="paragraph"><p>Constraints are functions that define what type of
-input is allowed. They are used throughout Cowboy,
-from the router to query strings to cookies.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The module <code>cowboy_constraints</code> defines the built-in constraints in Cowboy and provides an interface for manipulating these constraints.</p>
+<p>Constraints are functions that define what type of input is allowed. They are used throughout Cowboy, from the router to query strings to cookies.</p>
<h2 id="_exports">Exports</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Built-in constraints:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../cowboy_constraints.int">cowboy_constraints:int(3)</a> - Integer constraint
-</p>
+<p>Built-in constraints:</p>
+<ul><li><a href="../cowboy_constraints.int">cowboy_constraints:int(3)</a> - Integer constraint
</li>
-<li>
-<p>
-<a href="../cowboy_constraints.nonempty">cowboy_constraints:nonempty(3)</a> - Non-empty constraint
-</p>
+<li><a href="../cowboy_constraints.nonempty">cowboy_constraints:nonempty(3)</a> - Non-empty constraint
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_types">Types</h2>
-<div class="sectionbody">
-<div class="sect2">
<h3 id="_constraint">constraint()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">constraint</span></span>() <span style="color: #990000">::</span> <span style="color: #FF6600">int</span> | <span style="color: #FF6600">nonempty</span> | <span style="font-weight: bold"><span style="color: #0000FF">fun</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>A constraint function.</p></div>
-<div class="paragraph"><p>The atom constraints are built-in, see the corresponding
-function in the exports list above.</p></div>
-</div>
-<div class="sect2">
+<pre><tt><b><font color="#000000">constraint</font></b>() <font color="#990000">::</font> <font color="#FF6600">int</font> | <font color="#FF6600">nonempty</font> | <b><font color="#0000FF">fun</font></b>()</tt></pre>
+</div></div>
+<p>A constraint function.</p>
+<p>The atom constraints are built-in, see the corresponding function in the exports list above.</p>
<h3 id="_reason">reason()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">reason</span></span>() <span style="color: #990000">::</span> {<span style="font-weight: bold"><span style="color: #000000">constraint</span></span>(), <span style="color: #009900">Reason</span>, <span style="color: #009900">Value</span>}
-
-<span style="color: #009900">Reason</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()
-<span style="color: #009900">Value</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>Reason for the constraint failure.</p></div>
-<div class="paragraph"><p>It includes the constraint function in question,
-a machine-readable error reason and the value that
-made the constraint fail.</p></div>
-</div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">reason</font></b>() <font color="#990000">::</font> {<b><font color="#000000">constraint</font></b>(), <font color="#009900">Reason</font>, <font color="#009900">Value</font>}
+
+<font color="#009900">Reason</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()
+<font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()</tt></pre>
+</div></div>
+<p>Reason for the constraint failure.</p>
+<p>It includes the constraint function in question, a machine-readable error reason and the value that made the constraint fail.</p>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="..">cowboy(7)</a>,
-<a href="../cowboy">cowboy(3)</a>,
-<a href="../cowboy_router">cowboy_router(3)</a>,
-<a href="../cowboy_req.match_cookies">cowboy_req:match_cookies(3)</a>,
-<a href="../cowboy_req.match_qs">cowboy_req:match_qs(3)</a></p></div>
-</div>
-</div>
+<p><a href="..">cowboy(7)</a>, <a href="../cowboy">cowboy(3)</a>, <a href="../cowboy_router">cowboy_router(3)</a>, <a href="../cowboy_req.match_cookies">cowboy_req:match_cookies(3)</a>, <a href="../cowboy_req.match_qs">cowboy_req:match_qs(3)</a></p>
+
diff --git a/docs/en/cowboy/2.2/manual/cowboy_handler.terminate/index.html b/docs/en/cowboy/2.2/manual/cowboy_handler.terminate/index.html
index 5337a771..e5898676 100644
--- a/docs/en/cowboy/2.2/manual/cowboy_handler.terminate/index.html
+++ b/docs/en/cowboy/2.2/manual/cowboy_handler.terminate/index.html
@@ -62,109 +62,54 @@
<h1 class="lined-header"><span>cowboy_handler:terminate(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_handler:terminate - Terminate the handler</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_handler:terminate - Terminate the handler</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">terminate</span></span>(<span style="color: #009900">Reason</span>, <span style="color: #009900">PartialReq</span>, <span style="color: #009900">State</span>, <span style="color: #009900">Handler</span>) <span style="color: #990000">-&gt;</span> <span style="color: #FF6600">ok</span>
-
-<span style="color: #009900">Reason</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()
-<span style="color: #009900">PartialReq</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">map</span></span>()
-<span style="color: #009900">State</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()
-<span style="color: #009900">Handler</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">module</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Call the optional terminate callback if it is defined.</p></div>
-<div class="paragraph"><p>Make sure to use this function at the end of the execution
-of modules that implement custom handler behaviors.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">terminate</font></b>(<font color="#009900">Reason</font>, <font color="#009900">PartialReq</font>, <font color="#009900">State</font>, <font color="#009900">Handler</font>) <font color="#990000">-&gt;</font> <font color="#FF6600">ok</font>
+
+<font color="#009900">Reason</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()
+<font color="#009900">PartialReq</font> <font color="#990000">::</font> <b><font color="#000000">map</font></b>()
+<font color="#009900">State</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()
+<font color="#009900">Handler</font> <font color="#990000">::</font> <b><font color="#000000">module</font></b>()</tt></pre>
+</div></div>
+<p>Call the optional terminate callback if it is defined.</p>
+<p>Make sure to use this function at the end of the execution of modules that implement custom handler behaviors.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Reason
-</dt>
-<dd>
-<p>
-Reason for termination.
-</p>
+<dl><dt>Reason</dt>
+<dd><p>Reason for termination.</p>
</dd>
-<dt class="hdlist1">
-PartialReq
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
-<div class="paragraph"><p>It is possible to remove fields from the Req object to save memory
-when the handler has no concept of requests/responses. The only
-requirement is that a map is provided.</p></div>
+<dt>PartialReq</dt>
+<dd><p>The Req object.</p>
+<p>It is possible to remove fields from the Req object to save memory when the handler has no concept of requests/responses. The only requirement is that a map is provided.</p>
</dd>
-<dt class="hdlist1">
-State
-</dt>
-<dd>
-<p>
-Handler state.
-</p>
+<dt>State</dt>
+<dd><p>Handler state.</p>
</dd>
-<dt class="hdlist1">
-Handler
-</dt>
-<dd>
-<p>
-Handler module.
-</p>
+<dt>Handler</dt>
+<dd><p>Handler module.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The atom <code>ok</code> is always returned. It can be safely ignored.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The atom <code>ok</code> is always returned. It can be safely ignored.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced.
-</p>
+<ul><li><strong>2.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Terminate a handler normally</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Terminate a handler normally</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">cowboy_handler:terminate</span></span>(<span style="font-weight: bold"><span style="color: #000080">normal</span></span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>, <span style="color: #009900">Handler</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">cowboy_handler:terminate</font></b>(<b><font color="#000080">normal</font></b>, <font color="#009900">Req</font>, <font color="#009900">State</font>, <font color="#009900">Handler</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../cowboy_handler">cowboy_handler(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_handler">cowboy_handler(3)</a></p>
+
diff --git a/docs/en/cowboy/2.2/manual/cowboy_handler/index.html b/docs/en/cowboy/2.2/manual/cowboy_handler/index.html
index 20503948..4556212d 100644
--- a/docs/en/cowboy/2.2/manual/cowboy_handler/index.html
+++ b/docs/en/cowboy/2.2/manual/cowboy_handler/index.html
@@ -62,96 +62,46 @@
<h1 class="lined-header"><span>cowboy_handler(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_handler - Plain HTTP handlers</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_handler - Plain HTTP handlers</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <code>cowboy_handler</code> middleware executes the handler selected
-by the router or any other preceding middleware.</p></div>
-<div class="paragraph"><p>This middleware takes the handler module and initial state
-from the <code>handler</code> and <code>handler_opts</code> environment values,
-respectively. On completion, it adds a <code>result</code> value to
-the middleware environment, containing the return value
-of the <code>terminate/3</code> callback (if defined) and <code>ok</code> otherwise.</p></div>
-<div class="paragraph"><p>This module also defines a callback interface for handling
-HTTP requests.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The <code>cowboy_handler</code> middleware executes the handler selected by the router or any other preceding middleware.</p>
+<p>This middleware takes the handler module and initial state from the <code>handler</code> and <code>handler_opts</code> environment values, respectively. On completion, it adds a <code>result</code> value to the middleware environment, containing the return value of the <code>terminate/3</code> callback (if defined) and <code>ok</code> otherwise.</p>
+<p>This module also defines a callback interface for handling HTTP requests.</p>
<h2 id="_callbacks">Callbacks</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Plain HTTP handlers implement the following interface:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Plain HTTP handlers implement the following interface:</p>
+<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">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">ok</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
-
-<span style="font-weight: bold"><span style="color: #000000">terminate</span></span>(<span style="color: #009900">Reason</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> <span style="color: #FF6600">ok</span> <span style="font-style: italic"><span style="color: #9A1900">%% optional</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">State</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()
-<span style="color: #009900">Reason</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">normal</span></span>
- | {<span style="color: #FF6600">crash</span>, <span style="color: #FF6600">error</span> | <span style="font-weight: bold"><span style="color: #000080">exit</span></span> | <span style="font-weight: bold"><span style="color: #000080">throw</span></span>, <span style="font-weight: bold"><span style="color: #000000">any</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>These two callbacks are common to all handlers.</p></div>
-<div class="paragraph"><p>Plain HTTP handlers do all their work in the <code>init/2</code>
-callback. Returning <code>ok</code> terminates the handler. If no
-response is sent, Cowboy will send a <code>204 No Content</code>.</p></div>
-<div class="paragraph"><p>The optional <code>terminate/3</code> callback will ultimately be called
-with the reason for the termination of the handler.
-Cowboy will terminate the process right after this. There
-is no need to perform any cleanup in this callback.</p></div>
-<div class="paragraph"><p>The following terminate reasons are defined for plain HTTP
-handlers:</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-normal
-</dt>
-<dd>
-<p>
- The connection was closed normally.
-</p>
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
+
+<b><font color="#000000">terminate</font></b>(<font color="#009900">Reason</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> <font color="#FF6600">ok</font> <i><font color="#9A1900">%% optional</font></i>
+
+<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()
+<font color="#009900">State</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()
+<font color="#009900">Reason</font> <font color="#990000">::</font> <b><font color="#000080">normal</font></b>
+ | {<font color="#FF6600">crash</font>, <font color="#FF6600">error</font> | <b><font color="#000080">exit</font></b> | <b><font color="#000080">throw</font></b>, <b><font color="#000000">any</font></b>()}</tt></pre>
+</div></div>
+<p>These two callbacks are common to all handlers.</p>
+<p>Plain HTTP handlers do all their work in the <code>init/2</code> callback. Returning <code>ok</code> terminates the handler. If no response is sent, Cowboy will send a <code>204 No Content</code>.</p>
+<p>The optional <code>terminate/3</code> callback will ultimately be called with the reason for the termination of the handler. Cowboy will terminate the process right after this. There is no need to perform any cleanup in this callback.</p>
+<p>The following terminate reasons are defined for plain HTTP handlers:</p>
+<dl><dt>normal</dt>
+<dd><p>The connection was closed normally.</p>
</dd>
-<dt class="hdlist1">
-{crash, Class, Reason}
-</dt>
-<dd>
-<p>
- A crash occurred in the handler. <code>Class</code> and <code>Reason</code> can be
- used to obtain more information about the crash. The function
- <code>erlang:get_stacktrace/0</code> can also be called to obtain the
- stacktrace of the process when the crash occurred.
-</p>
+<dt>{crash, Class, Reason}</dt>
+<dd><p>A crash occurred in the handler. <code>Class</code> and <code>Reason</code> can be used to obtain more information about the crash. The function <code>erlang:get_stacktrace/0</code> can also be called to obtain the stacktrace of the process when the crash occurred.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_exports">Exports</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The following function should be called by modules implementing
-custom handlers to execute the optional terminate callback:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../cowboy_handler.terminate">cowboy_handler:terminate(3)</a> - Terminate the handler
-</p>
+<p>The following function should be called by modules implementing custom handlers to execute the optional terminate callback:</p>
+<ul><li><a href="../cowboy_handler.terminate">cowboy_handler:terminate(3)</a> - Terminate the handler
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="..">cowboy(7)</a></p></div>
-</div>
-</div>
+<p><a href="..">cowboy(7)</a></p>
+
diff --git a/docs/en/cowboy/2.2/manual/cowboy_http/index.html b/docs/en/cowboy/2.2/manual/cowboy_http/index.html
index b5dd9044..5b8550d6 100644
--- a/docs/en/cowboy/2.2/manual/cowboy_http/index.html
+++ b/docs/en/cowboy/2.2/manual/cowboy_http/index.html
@@ -62,255 +62,116 @@
<h1 class="lined-header"><span>cowboy_http(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_http - HTTP/1.1</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_http - HTTP/1.1</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The module <code>cowboy_http</code> implements HTTP/1.1 and HTTP/1.0
-as a Ranch protocol.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The module <code>cowboy_http</code> implements HTTP/1.1 and HTTP/1.0 as a Ranch protocol.</p>
<h2 id="_options">Options</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<!-- @todo Might be worth moving cowboy_clear/tls/stream_h options-->
+<!-- to their respective manual, when they are added.-->
+<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">opts</span></span>() <span style="color: #990000">::</span> #{
- <span style="color: #0000FF">connection_type</span> <span style="color: #990000">=&gt;</span> <span style="color: #FF6600">worker</span> | <span style="color: #FF6600">supervisor</span>,
- <span style="color: #0000FF">env</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_middleware:env</span></span>(),
- <span style="color: #0000FF">idle_timeout</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">timeout</span></span>(),
- <span style="color: #0000FF">inactivity_timeout</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">timeout</span></span>(),
- <span style="color: #0000FF">max_empty_lines</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">max_header_name_length</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">max_header_value_length</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">max_headers</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">max_keepalive</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">max_method_length</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">max_request_line_length</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">max_skip_body_length</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">middlewares</span> <span style="color: #990000">=&gt;</span> [<span style="font-weight: bold"><span style="color: #000000">module</span></span>()],
- <span style="color: #0000FF">request_timeout</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">timeout</span></span>(),
- <span style="color: #000080">shutdown</span><span style="color: #009900">_timeout</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">timeout</span></span>(),
- <span style="color: #0000FF">stream_handlers</span> <span style="color: #990000">=&gt;</span> [<span style="font-weight: bold"><span style="color: #000000">module</span></span>()]
-}</tt></pre></div></div>
-<div class="paragraph"><p>Configuration for the HTTP/1.1 protocol.</p></div>
-<div class="paragraph"><p>This configuration is passed to Cowboy when starting listeners
-using <code>cowboy:start_clear/3</code> or <code>cowboy:start_tls/3</code> functions.</p></div>
-<div class="paragraph"><p>It can be updated without restarting listeners using the
-Ranch functions <code>ranch:get_protocol_options/1</code> and
-<code>ranch:set_protocol_options/2</code>.</p></div>
-<div class="paragraph"><p>The default value is given next to the option name:</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-connection_type (supervisor)
-</dt>
-<dd>
-<p>
- Whether the connection process also acts as a supervisor.
-</p>
-</dd>
-<dt class="hdlist1">
-env (#{})
-</dt>
-<dd>
-<p>
- Middleware environment.
-</p>
-</dd>
-<dt class="hdlist1">
-idle_timeout (60000)
-</dt>
-<dd>
-<p>
- Time in ms with no data received before Cowboy closes the connection.
-</p>
-</dd>
-<dt class="hdlist1">
-inactivity_timeout (300000)
-</dt>
-<dd>
-<p>
- Time in ms with nothing received at all before Cowboy closes the connection.
-</p>
-</dd>
-<dt class="hdlist1">
-max_empty_lines (5)
-</dt>
-<dd>
-<p>
- Maximum number of empty lines before a request.
-</p>
-</dd>
-<dt class="hdlist1">
-max_header_name_length (64)
-</dt>
-<dd>
-<p>
- Maximum length of header names.
-</p>
-</dd>
-<dt class="hdlist1">
-max_header_value_length (4096)
-</dt>
-<dd>
-<p>
- Maximum length of header values.
-</p>
-</dd>
-<dt class="hdlist1">
-max_headers (100)
-</dt>
-<dd>
-<p>
- Maximum number of headers allowed per request.
-</p>
-</dd>
-<dt class="hdlist1">
-max_keepalive (100)
-</dt>
-<dd>
-<p>
- Maximum number of requests allowed per connection.
-</p>
-</dd>
-<dt class="hdlist1">
-max_method_length (32)
-</dt>
-<dd>
-<p>
- Maximum length of the method.
-</p>
-</dd>
-<dt class="hdlist1">
-max_request_line_length (8000)
-</dt>
-<dd>
-<p>
- Maximum length of the request line.
-</p>
-</dd>
-<dt class="hdlist1">
-max_skip_body_length (1000000)
-</dt>
-<dd>
-<p>
- Maximum length Cowboy is willing to skip when the user code did not read the body fully.
- When the remaining length is too large or unknown Cowboy will close the connection.
-</p>
-</dd>
-<dt class="hdlist1">
-middlewares ([cowboy_router, cowboy_handler])
-</dt>
-<dd>
-<p>
- Middlewares to run for every request.
-</p>
-</dd>
-<dt class="hdlist1">
-request_timeout (5000)
-</dt>
-<dd>
-<p>
- Time in ms with no requests before Cowboy closes the connection.
-</p>
-</dd>
-<dt class="hdlist1">
-shutdown_timeout (5000)
-</dt>
-<dd>
-<p>
- Time in ms Cowboy will wait for child processes to shut down before killing them.
-</p>
-</dd>
-<dt class="hdlist1">
-stream_handlers ([cowboy_stream_h])
-</dt>
-<dd>
-<p>
- Ordered list of stream handlers that will handle all stream events.
-</p>
-</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">opts</font></b>() <font color="#990000">::</font> #{
+ <font color="#0000FF">connection_type</font> <font color="#990000">=&gt;</font> <font color="#FF6600">worker</font> | <font color="#FF6600">supervisor</font>,
+ <font color="#0000FF">env</font> <font color="#990000">=&gt;</font> <b><font color="#000000">cowboy_middleware:env</font></b>(),
+ <font color="#0000FF">idle_timeout</font> <font color="#990000">=&gt;</font> <b><font color="#000000">timeout</font></b>(),
+ <font color="#0000FF">inactivity_timeout</font> <font color="#990000">=&gt;</font> <b><font color="#000000">timeout</font></b>(),
+ <font color="#0000FF">max_empty_lines</font> <font color="#990000">=&gt;</font> <b><font color="#000000">non_neg_integer</font></b>(),
+ <font color="#0000FF">max_header_name_length</font> <font color="#990000">=&gt;</font> <b><font color="#000000">non_neg_integer</font></b>(),
+ <font color="#0000FF">max_header_value_length</font> <font color="#990000">=&gt;</font> <b><font color="#000000">non_neg_integer</font></b>(),
+ <font color="#0000FF">max_headers</font> <font color="#990000">=&gt;</font> <b><font color="#000000">non_neg_integer</font></b>(),
+ <font color="#0000FF">max_keepalive</font> <font color="#990000">=&gt;</font> <b><font color="#000000">non_neg_integer</font></b>(),
+ <font color="#0000FF">max_method_length</font> <font color="#990000">=&gt;</font> <b><font color="#000000">non_neg_integer</font></b>(),
+ <font color="#0000FF">max_request_line_length</font> <font color="#990000">=&gt;</font> <b><font color="#000000">non_neg_integer</font></b>(),
+ <font color="#0000FF">max_skip_body_length</font> <font color="#990000">=&gt;</font> <b><font color="#000000">non_neg_integer</font></b>(),
+ <font color="#0000FF">middlewares</font> <font color="#990000">=&gt;</font> [<b><font color="#000000">module</font></b>()],
+ <font color="#0000FF">request_timeout</font> <font color="#990000">=&gt;</font> <b><font color="#000000">timeout</font></b>(),
+ <font color="#000080">shutdown</font><font color="#009900">_timeout</font> <font color="#990000">=&gt;</font> <b><font color="#000000">timeout</font></b>(),
+ <font color="#0000FF">stream_handlers</font> <font color="#990000">=&gt;</font> [<b><font color="#000000">module</font></b>()]
+}</tt></pre>
+</div></div>
+<p>Configuration for the HTTP/1.1 protocol.</p>
+<p>This configuration is passed to Cowboy when starting listeners using <code>cowboy:start_clear/3</code> or <code>cowboy:start_tls/3</code> functions.</p>
+<p>It can be updated without restarting listeners using the Ranch functions <code>ranch:get_protocol_options/1</code> and <code>ranch:set_protocol_options/2</code>.</p>
+<p>The default value is given next to the option name:</p>
+<dl><dt>connection_type (supervisor)</dt>
+<dd><p>Whether the connection process also acts as a supervisor.</p>
+</dd>
+<dt>env (#{})</dt>
+<dd><p>Middleware environment.</p>
+</dd>
+<dt>idle_timeout (60000)</dt>
+<dd><p>Time in ms with no data received before Cowboy closes the connection.</p>
+</dd>
+<dt>inactivity_timeout (300000)</dt>
+<dd><p>Time in ms with nothing received at all before Cowboy closes the connection.</p>
+</dd>
+<dt>max_empty_lines (5)</dt>
+<dd><p>Maximum number of empty lines before a request.</p>
+</dd>
+<dt>max_header_name_length (64)</dt>
+<dd><p>Maximum length of header names.</p>
+</dd>
+<dt>max_header_value_length (4096)</dt>
+<dd><p>Maximum length of header values.</p>
+</dd>
+<dt>max_headers (100)</dt>
+<dd><p>Maximum number of headers allowed per request.</p>
+</dd>
+<dt>max_keepalive (100)</dt>
+<dd><p>Maximum number of requests allowed per connection.</p>
+</dd>
+<dt>max_method_length (32)</dt>
+<dd><p>Maximum length of the method.</p>
+</dd>
+<dt>max_request_line_length (8000)</dt>
+<dd><p>Maximum length of the request line.</p>
+</dd>
+<dt>max_skip_body_length (1000000)</dt>
+<dd><p>Maximum length Cowboy is willing to skip when the user code did not read the body fully. When the remaining length is too large or unknown Cowboy will close the connection.</p>
+</dd>
+<dt>middlewares ([cowboy_router, cowboy_handler])</dt>
+<dd><p>Middlewares to run for every request.</p>
+</dd>
+<dt>request_timeout (5000)</dt>
+<dd><p>Time in ms with no requests before Cowboy closes the connection.</p>
+</dd>
+<dt>shutdown_timeout (5000)</dt>
+<dd><p>Time in ms Cowboy will wait for child processes to shut down before killing them.</p>
+</dd>
+<dt>stream_handlers ([cowboy_stream_h])</dt>
+<dd><p>Ordered list of stream handlers that will handle all stream events.</p>
+</dd>
+</dl>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.2</strong>: The <code>max_skip_body_length</code> option was added.
-</p>
+<ul><li><strong>2.2</strong>: The <code>max_skip_body_length</code> option was added.
</li>
-<li>
-<p>
-<strong>2.0</strong>: The <code>timeout</code> option was renamed <code>request_timeout</code>.
-</p>
+<li><strong>2.0</strong>: The <code>timeout</code> option was renamed <code>request_timeout</code>.
</li>
-<li>
-<p>
-<strong>2.0</strong>: The <code>idle_timeout</code>, <code>inactivity_timeout</code> and <code>shutdown_timeout</code> options were added.
-</p>
+<li><strong>2.0</strong>: The <code>idle_timeout</code>, <code>inactivity_timeout</code> and <code>shutdown_timeout</code> options were added.
</li>
-<li>
-<p>
-<strong>2.0</strong>: The <code>max_method_length</code> option was added.
-</p>
+<li><strong>2.0</strong>: The <code>max_method_length</code> option was added.
</li>
-<li>
-<p>
-<strong>2.0</strong>: The <code>max_request_line_length</code> default was increased from 4096 to 8000.
-</p>
+<li><strong>2.0</strong>: The <code>max_request_line_length</code> default was increased from 4096 to 8000.
</li>
-<li>
-<p>
-<strong>2.0</strong>: The <code>connection_type</code> option was added.
-</p>
+<li><strong>2.0</strong>: The <code>connection_type</code> option was added.
</li>
-<li>
-<p>
-<strong>2.0</strong>: The <code>env</code> option is now a map instead of a proplist.
-</p>
+<li><strong>2.0</strong>: The <code>env</code> option is now a map instead of a proplist.
</li>
-<li>
-<p>
-<strong>2.0</strong>: The <code>stream_handlers</code> option was added.
-</p>
+<li><strong>2.0</strong>: The <code>stream_handlers</code> option was added.
</li>
-<li>
-<p>
-<strong>2.0</strong>: The <code>compress</code> option was removed in favor of the <code>cowboy_compress_h</code> stream handler.
-</p>
+<li><strong>2.0</strong>: The <code>compress</code> option was removed in favor of the <code>cowboy_compress_h</code> stream handler.
</li>
-<li>
-<p>
-<strong>2.0</strong>: Options are now a map instead of a proplist.
-</p>
+<li><strong>2.0</strong>: Options are now a map instead of a proplist.
</li>
-<li>
-<p>
-<strong>2.0</strong>: Protocol introduced. Replaces <code>cowboy_protocol</code>.
-</p>
+<li><strong>2.0</strong>: Protocol introduced. Replaces <code>cowboy_protocol</code>.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="..">cowboy(7)</a>,
-<a href="../cowboy_http2">cowboy_http2(3)</a>,
-<a href="../cowboy_websocket">cowboy_websocket(3)</a></p></div>
-</div>
-</div>
+<p><a href="..">cowboy(7)</a>, <a href="../cowboy_http2">cowboy_http2(3)</a>, <a href="../cowboy_websocket">cowboy_websocket(3)</a></p>
+
diff --git a/docs/en/cowboy/2.2/manual/cowboy_http2/index.html b/docs/en/cowboy/2.2/manual/cowboy_http2/index.html
index 46bfd807..e93e2e4c 100644
--- a/docs/en/cowboy/2.2/manual/cowboy_http2/index.html
+++ b/docs/en/cowboy/2.2/manual/cowboy_http2/index.html
@@ -62,123 +62,60 @@
<h1 class="lined-header"><span>cowboy_http2(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_http2 - HTTP/2</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_http2 - HTTP/2</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The module <code>cowboy_http2</code> implements HTTP/2
-as a Ranch protocol.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The module <code>cowboy_http2</code> implements HTTP/2 as a Ranch protocol.</p>
<h2 id="_options">Options</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<!-- @todo Might be worth moving cowboy_clear/tls/stream_h options-->
+<!-- to their respective manual, when they are added.-->
+<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">opts</span></span>() <span style="color: #990000">::</span> #{
- <span style="color: #0000FF">connection_type</span> <span style="color: #990000">=&gt;</span> <span style="color: #FF6600">worker</span> | <span style="color: #FF6600">supervisor</span>,
- <span style="color: #0000FF">env</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_middleware:env</span></span>(),
- <span style="color: #0000FF">inactivity_timeout</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">timeout</span></span>(),
- <span style="color: #0000FF">middlewares</span> <span style="color: #990000">=&gt;</span> [<span style="font-weight: bold"><span style="color: #000000">module</span></span>()],
- <span style="color: #0000FF">preface_timeout</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">timeout</span></span>(),
- <span style="color: #000080">shutdown</span><span style="color: #009900">_timeout</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">timeout</span></span>(),
- <span style="color: #0000FF">stream_handlers</span> <span style="color: #990000">=&gt;</span> [<span style="font-weight: bold"><span style="color: #000000">module</span></span>()]
-}</tt></pre></div></div>
-<div class="paragraph"><p>Configuration for the HTTP/2 protocol.</p></div>
-<div class="paragraph"><p>This configuration is passed to Cowboy when starting listeners
-using <code>cowboy:start_clear/3</code> or <code>cowboy:start_tls/3</code> functions.</p></div>
-<div class="paragraph"><p>It can be updated without restarting listeners using the
-Ranch functions <code>ranch:get_protocol_options/1</code> and
-<code>ranch:set_protocol_options/2</code>.</p></div>
-<div class="paragraph"><p>The default value is given next to the option name:</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-connection_type (supervisor)
-</dt>
-<dd>
-<p>
- Whether the connection process also acts as a supervisor.
-</p>
+<pre><tt><b><font color="#000000">opts</font></b>() <font color="#990000">::</font> #{
+ <font color="#0000FF">connection_type</font> <font color="#990000">=&gt;</font> <font color="#FF6600">worker</font> | <font color="#FF6600">supervisor</font>,
+ <font color="#0000FF">env</font> <font color="#990000">=&gt;</font> <b><font color="#000000">cowboy_middleware:env</font></b>(),
+ <font color="#0000FF">inactivity_timeout</font> <font color="#990000">=&gt;</font> <b><font color="#000000">timeout</font></b>(),
+ <font color="#0000FF">middlewares</font> <font color="#990000">=&gt;</font> [<b><font color="#000000">module</font></b>()],
+ <font color="#0000FF">preface_timeout</font> <font color="#990000">=&gt;</font> <b><font color="#000000">timeout</font></b>(),
+ <font color="#000080">shutdown</font><font color="#009900">_timeout</font> <font color="#990000">=&gt;</font> <b><font color="#000000">timeout</font></b>(),
+ <font color="#0000FF">stream_handlers</font> <font color="#990000">=&gt;</font> [<b><font color="#000000">module</font></b>()]
+}</tt></pre>
+</div></div>
+<p>Configuration for the HTTP/2 protocol.</p>
+<p>This configuration is passed to Cowboy when starting listeners using <code>cowboy:start_clear/3</code> or <code>cowboy:start_tls/3</code> functions.</p>
+<p>It can be updated without restarting listeners using the Ranch functions <code>ranch:get_protocol_options/1</code> and <code>ranch:set_protocol_options/2</code>.</p>
+<p>The default value is given next to the option name:</p>
+<dl><dt>connection_type (supervisor)</dt>
+<dd><p>Whether the connection process also acts as a supervisor.</p>
</dd>
-<dt class="hdlist1">
-env (#{})
-</dt>
-<dd>
-<p>
- Middleware environment.
-</p>
+<dt>env (#{})</dt>
+<dd><p>Middleware environment.</p>
</dd>
-<dt class="hdlist1">
-inactivity_timeout (300000)
-</dt>
-<dd>
-<p>
- Time in ms with nothing received at all before Cowboy closes the connection.
-</p>
+<dt>inactivity_timeout (300000)</dt>
+<dd><p>Time in ms with nothing received at all before Cowboy closes the connection.</p>
</dd>
-<dt class="hdlist1">
-middlewares ([cowboy_router, cowboy_handler])
-</dt>
-<dd>
-<p>
- Middlewares to run for every request.
-</p>
+<dt>middlewares ([cowboy_router, cowboy_handler])</dt>
+<dd><p>Middlewares to run for every request.</p>
</dd>
-<dt class="hdlist1">
-preface_timeout (5000)
-</dt>
-<dd>
-<p>
- Time in ms Cowboy is willing to wait for the connection preface.
-</p>
+<dt>preface_timeout (5000)</dt>
+<dd><p>Time in ms Cowboy is willing to wait for the connection preface.</p>
</dd>
-<dt class="hdlist1">
-shutdown_timeout (5000)
-</dt>
-<dd>
-<p>
- Time in ms Cowboy will wait for child processes to shut down before killing them.
-</p>
+<dt>shutdown_timeout (5000)</dt>
+<dd><p>Time in ms Cowboy will wait for child processes to shut down before killing them.</p>
</dd>
-<dt class="hdlist1">
-stream_handlers ([cowboy_stream_h])
-</dt>
-<dd>
-<p>
- Ordered list of stream handlers that will handle all stream events.
-</p>
+<dt>stream_handlers ([cowboy_stream_h])</dt>
+<dd><p>Ordered list of stream handlers that will handle all stream events.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Protocol introduced.
-</p>
+<ul><li><strong>2.0</strong>: Protocol introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="..">cowboy(7)</a>,
-<a href="../cowboy_http">cowboy_http(3)</a>,
-<a href="../cowboy_websocket">cowboy_websocket(3)</a></p></div>
-</div>
-</div>
+<p><a href="..">cowboy(7)</a>, <a href="../cowboy_http">cowboy_http(3)</a>, <a href="../cowboy_websocket">cowboy_websocket(3)</a></p>
+
diff --git a/docs/en/cowboy/2.2/manual/cowboy_loop/index.html b/docs/en/cowboy/2.2/manual/cowboy_loop/index.html
index ac091fb4..22c782de 100644
--- a/docs/en/cowboy/2.2/manual/cowboy_loop/index.html
+++ b/docs/en/cowboy/2.2/manual/cowboy_loop/index.html
@@ -62,120 +62,60 @@
<h1 class="lined-header"><span>cowboy_loop(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_loop - Loop handlers</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_loop - Loop handlers</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The module <code>cowboy_loop</code> defines a callback interface for
-long running HTTP connections.</p></div>
-<div class="paragraph"><p>You should switch to this behavior for long polling,
-server-sent events and similar long-running requests.</p></div>
-<div class="paragraph"><p>There are generally two usage patterns:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-Loop until receiving a specific message, then send
- a response and stop execution (for example long polling);
-</p>
+<p>The module <code>cowboy_loop</code> defines a callback interface for long running HTTP connections.</p>
+<p>You should switch to this behavior for long polling, server-sent events and similar long-running requests.</p>
+<p>There are generally two usage patterns:</p>
+<ul><li>Loop until receiving a specific message, then send a response and stop execution (for example long polling);
</li>
-<li>
-<p>
-Or initiate a response in <code>init/2</code> and stream the
- body in <code>info/3</code> as necessary (for example server-sent events).
-</p>
+<li>Or initiate a response in <code>init/2</code> and stream the body in <code>info/3</code> as necessary (for example server-sent events).
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_callbacks">Callbacks</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Loop handlers implement the following interface:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Loop handlers implement the following interface:</p>
+<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">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_loop</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
- | {<span style="color: #FF6600">cowboy_loop</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>, <span style="color: #FF6600">hibernate</span>}
-
-<span style="font-weight: bold"><span style="color: #000000">info</span></span>(<span style="color: #009900">Info</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>)
- <span style="color: #990000">-&gt;</span> {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
- | {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>, <span style="color: #FF6600">hibernate</span>}
- | {<span style="color: #FF6600">stop</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
-
-<span style="font-weight: bold"><span style="color: #000000">terminate</span></span>(<span style="color: #009900">Reason</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> <span style="color: #FF6600">ok</span> <span style="font-style: italic"><span style="color: #9A1900">%% optional</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">State</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()
-<span style="color: #009900">Info</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()
-<span style="color: #009900">Reason</span> <span style="color: #990000">::</span> <span style="color: #FF6600">stop</span>
- | {<span style="color: #FF6600">crash</span>, <span style="color: #FF6600">error</span> | <span style="font-weight: bold"><span style="color: #000080">exit</span></span> | <span style="font-weight: bold"><span style="color: #000080">throw</span></span>, <span style="font-weight: bold"><span style="color: #000000">any</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>The <code>init/2</code> callback is common to all handlers. To switch
-to the loop behavior, it must return <code>cowboy_loop</code> as the
-first element of the tuple.</p></div>
-<div class="paragraph"><p>The <code>info/3</code> callback will be called for every Erlang message
-received. It may choose to continue the receive loop or stop
-it.</p></div>
-<div class="paragraph"><p>The optional <code>terminate/3</code> callback will ultimately be called
-with the reason for the termination of the handler.
-Cowboy will terminate the process right after this. There
-is no need to perform any cleanup in this callback.</p></div>
-<div class="paragraph"><p>The following terminate reasons are defined for loop handlers:</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-stop
-</dt>
-<dd>
-<p>
- The handler requested to close the connection by returning
- a <code>stop</code> tuple.
-</p>
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>)
+ <font color="#990000">-&gt;</font> {<font color="#FF6600">cowboy_loop</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
+ | {<font color="#FF6600">cowboy_loop</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>, <font color="#FF6600">hibernate</font>}
+
+<b><font color="#000000">info</font></b>(<font color="#009900">Info</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>)
+ <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
+ | {<font color="#FF6600">ok</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>, <font color="#FF6600">hibernate</font>}
+ | {<font color="#FF6600">stop</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
+
+<b><font color="#000000">terminate</font></b>(<font color="#009900">Reason</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> <font color="#FF6600">ok</font> <i><font color="#9A1900">%% optional</font></i>
+
+<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()
+<font color="#009900">State</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()
+<font color="#009900">Info</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()
+<font color="#009900">Reason</font> <font color="#990000">::</font> <font color="#FF6600">stop</font>
+ | {<font color="#FF6600">crash</font>, <font color="#FF6600">error</font> | <b><font color="#000080">exit</font></b> | <b><font color="#000080">throw</font></b>, <b><font color="#000000">any</font></b>()}</tt></pre>
+</div></div>
+<p>The <code>init/2</code> callback is common to all handlers. To switch to the loop behavior, it must return <code>cowboy_loop</code> as the first element of the tuple.</p>
+<p>The <code>info/3</code> callback will be called for every Erlang message received. It may choose to continue the receive loop or stop it.</p>
+<p>The optional <code>terminate/3</code> callback will ultimately be called with the reason for the termination of the handler. Cowboy will terminate the process right after this. There is no need to perform any cleanup in this callback.</p>
+<p>The following terminate reasons are defined for loop handlers:</p>
+<dl><dt>stop</dt>
+<dd><p>The handler requested to close the connection by returning a <code>stop</code> tuple.</p>
</dd>
-<dt class="hdlist1">
-{crash, Class, Reason}
-</dt>
-<dd>
-<p>
- A crash occurred in the handler. <code>Class</code> and <code>Reason</code> can be
- used to obtain more information about the crash. The function
- <code>erlang:get_stacktrace/0</code> can also be called to obtain the
- stacktrace of the process when the crash occurred.
-</p>
+<dt>{crash, Class, Reason}</dt>
+<dd><p>A crash occurred in the handler. <code>Class</code> and <code>Reason</code> can be used to obtain more information about the crash. The function <code>erlang:get_stacktrace/0</code> can also be called to obtain the stacktrace of the process when the crash occurred.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Loop handlers no longer need to handle overflow/timeouts.
-</p>
+<ul><li><strong>2.0</strong>: Loop handlers no longer need to handle overflow/timeouts.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Behavior introduced.
-</p>
+<li><strong>1.0</strong>: Behavior introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="..">cowboy(7)</a>,
-<a href="../cowboy_handler">cowboy_handler(3)</a></p></div>
-</div>
-</div>
+<p><a href="..">cowboy(7)</a>, <a href="../cowboy_handler">cowboy_handler(3)</a></p>
+
diff --git a/docs/en/cowboy/2.2/manual/cowboy_middleware/index.html b/docs/en/cowboy/2.2/manual/cowboy_middleware/index.html
index 063d9d98..fcd1acaa 100644
--- a/docs/en/cowboy/2.2/manual/cowboy_middleware/index.html
+++ b/docs/en/cowboy/2.2/manual/cowboy_middleware/index.html
@@ -62,115 +62,56 @@
<h1 class="lined-header"><span>cowboy_middleware(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_middleware - Middlewares</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_middleware - Middlewares</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The module <code>cowboy_middleware</code> defines a callback interface for
-Cowboy middlewares.</p></div>
-<div class="paragraph"><p>Middlewares process the request sequentially in the order they
-are configured.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The module <code>cowboy_middleware</code> defines a callback interface for Cowboy middlewares.</p>
+<p>Middlewares process the request sequentially in the order they are configured.</p>
<h2 id="_callbacks">Callbacks</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Middlewares implement the following interface:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Middlewares implement the following interface:</p>
+<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">execute</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">Env</span>)
- <span style="color: #990000">-&gt;</span> {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">Env</span>}
- | {<span style="color: #FF6600">suspend</span>, <span style="font-weight: bold"><span style="color: #000000">module</span></span>(), <span style="font-weight: bold"><span style="color: #000080">atom</span></span>(), [<span style="font-weight: bold"><span style="color: #000000">any</span></span>()]}
- | {<span style="color: #FF6600">stop</span>, <span style="color: #009900">Req</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">Env</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_middleware:env</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>The <code>execute/2</code> is the only callback that needs to be
-implemented. It must execute the middleware and return
-with instructions for Cowboy.</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-ok
-</dt>
-<dd>
-<p>
-Cowboy should continue processing the request using the
-returned Req object and environment.
-</p>
+<pre><tt><b><font color="#000000">execute</font></b>(<font color="#009900">Req</font>, <font color="#009900">Env</font>)
+ <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <font color="#009900">Req</font>, <font color="#009900">Env</font>}
+ | {<font color="#FF6600">suspend</font>, <b><font color="#000000">module</font></b>(), <b><font color="#000080">atom</font></b>(), [<b><font color="#000000">any</font></b>()]}
+ | {<font color="#FF6600">stop</font>, <font color="#009900">Req</font>}
+
+<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()
+<font color="#009900">Env</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_middleware:env</font></b>()</tt></pre>
+</div></div>
+<p>The <code>execute/2</code> is the only callback that needs to be implemented. It must execute the middleware and return with instructions for Cowboy.</p>
+<dl><dt>ok</dt>
+<dd><p>Cowboy should continue processing the request using the returned Req object and environment.</p>
</dd>
-<dt class="hdlist1">
-suspend
-</dt>
-<dd>
-<p>
-Cowboy will hibernate the process. When resuming, Cowboy
-will apply the returned module, function and arguments.
-</p>
+<dt>suspend</dt>
+<dd><p>Cowboy will hibernate the process. When resuming, Cowboy will apply the returned module, function and arguments.</p>
</dd>
-<dt class="hdlist1">
-stop
-</dt>
-<dd>
-<p>
-Cowboy will stop middleware execution. No other middleware
-will be executed. This effectively ends the processing of
-the request.
-</p>
+<dt>stop</dt>
+<dd><p>Cowboy will stop middleware execution. No other middleware will be executed. This effectively ends the processing of the request.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_types">Types</h2>
-<div class="sectionbody">
-<div class="sect2">
<h3 id="_env">env()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">env</span></span>() <span style="color: #990000">::</span> #{<span style="font-weight: bold"><span style="color: #000080">atom</span></span>() <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>Middleware environment.</p></div>
-<div class="paragraph"><p>A new environment is created for every request. The initial
-environment contained the user configured environment values
-(like <code>dispatch</code> for example) plus the <code>listener</code> value which
-contains the name of the listener for this connection.</p></div>
-<div class="paragraph"><p>Middlewares may modify the environment as necessary.</p></div>
-</div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">env</font></b>() <font color="#990000">::</font> #{<b><font color="#000080">atom</font></b>() <font color="#990000">=&gt;</font> <b><font color="#000000">any</font></b>()}</tt></pre>
+</div></div>
+<p>Middleware environment.</p>
+<p>A new environment is created for every request. The initial environment contained the user configured environment values (like <code>dispatch</code> for example) plus the <code>listener</code> value which contains the name of the listener for this connection.</p>
+<p>Middlewares may modify the environment as necessary.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: The <code>env</code> type is now a map instead of a proplist.
-</p>
+<ul><li><strong>2.0</strong>: The <code>env</code> type is now a map instead of a proplist.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Behavior introduced.
-</p>
+<li><strong>1.0</strong>: Behavior introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="..">cowboy(7)</a></p></div>
-</div>
-</div>
+<p><a href="..">cowboy(7)</a></p>
+
diff --git a/docs/en/cowboy/2.2/manual/cowboy_req.binding/index.html b/docs/en/cowboy/2.2/manual/cowboy_req.binding/index.html
index d588558e..ec5d9b34 100644
--- a/docs/en/cowboy/2.2/manual/cowboy_req.binding/index.html
+++ b/docs/en/cowboy/2.2/manual/cowboy_req.binding/index.html
@@ -62,116 +62,60 @@
<h1 class="lined-header"><span>cowboy_req:binding(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:binding - Access a value bound from the route</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:binding - Access a value bound from the route</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">binding</span></span>(<span style="color: #009900">Name</span>, <span style="color: #009900">Req</span>) <span style="color: #990000">-&gt;</span> <span style="font-weight: bold"><span style="color: #000000">binding</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">binding</span></span>(<span style="color: #009900">Name</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: #000000">any</span></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">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">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>Return the value for the given binding.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">binding</font></b>(<font color="#009900">Name</font>, <font color="#009900">Req</font>) <font color="#990000">-&gt;</font> <b><font color="#000000">binding</font></b>(<font color="#009900">Name</font>, <font color="#009900">Req</font>, <font color="#000080">undefined</font>)
+<b><font color="#000000">binding</font></b>(<font color="#009900">Name</font>, <font color="#009900">Req</font>, <font color="#009900">Default</font>) <font color="#990000">-&gt;</font> <b><font color="#000000">any</font></b>() | <font color="#009900">Default</font>
+
+<font color="#009900">Name</font> <font color="#990000">::</font> <b><font color="#000080">atom</font></b>()
+<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()</tt></pre>
+</div></div>
+<p>Return the value for the given binding.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Name
-</dt>
-<dd>
-<p>
-Desired binding name as an atom.
-</p>
+<dl><dt>Name</dt>
+<dd><p>Desired binding name as an atom.</p>
</dd>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-<dt class="hdlist1">
-Default
-</dt>
-<dd>
-<p>
-Default value returned when the binding is missing.
-</p>
+<dt>Default</dt>
+<dd><p>Default value returned when the binding is missing.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>By default the value is a case sensitive binary string, however
-constraints may change the type of this value (for example
-automatically converting numbers to integer).</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>By default the value is a case sensitive binary string, however constraints may change the type of this value (for example automatically converting numbers to integer).</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Only the value is returned, it is no longer wrapped in a tuple.
-</p>
+<ul><li><strong>2.0</strong>: Only the value is returned, it is no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Get the username from the path</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Get the username from the 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="font-style: italic"><span style="color: #9A1900">%% Route is "/users/:user"</span></span>
-<span style="color: #009900">Username</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:binding</span></span>(<span style="color: #FF6600">user</span>, <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Get the branch name, with a default</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><i><font color="#9A1900">%% Route is "/users/:user"</font></i>
+<font color="#009900">Username</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:binding</font></b>(<font color="#FF6600">user</font>, <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Get the branch name, with a default</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">%% Route is "/log[/:branch]"</span></span>
-<span style="color: #009900">Branch</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:binding</span></span>(<span style="color: #FF6600">branch</span>, <span style="color: #009900">Req</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"master"</span><span style="color: #990000">&gt;&gt;</span>)</tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><i><font color="#9A1900">%% Route is "/log[/:branch]"</font></i>
+<font color="#009900">Branch</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:binding</font></b>(<font color="#FF6600">branch</font>, <font color="#009900">Req</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"master"</font><font color="#990000">&gt;&gt;</font>)</tt></pre>
+</div></div>
<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.bindings">cowboy_req:bindings(3)</a>,
-<a href="../cowboy_req.host_info">cowboy_req:host_info(3)</a>,
-<a href="../cowboy_req.path_info">cowboy_req:path_info(3)</a>,
-<a href="../cowboy_router">cowboy_router(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.bindings">cowboy_req:bindings(3)</a>, <a href="../cowboy_req.host_info">cowboy_req:host_info(3)</a>, <a href="../cowboy_req.path_info">cowboy_req:path_info(3)</a>, <a href="../cowboy_router">cowboy_router(3)</a></p>
+
diff --git a/docs/en/cowboy/2.2/manual/cowboy_req.bindings/index.html b/docs/en/cowboy/2.2/manual/cowboy_req.bindings/index.html
index 5a869543..c767fc26 100644
--- a/docs/en/cowboy/2.2/manual/cowboy_req.bindings/index.html
+++ b/docs/en/cowboy/2.2/manual/cowboy_req.bindings/index.html
@@ -62,86 +62,40 @@
<h1 class="lined-header"><span>cowboy_req:bindings(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:bindings - Access all values bound from the route</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:bindings - Access all values bound from the route</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">bindings</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_router:bindings</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Return a map containing all bindings.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">bindings</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <b><font color="#000000">cowboy_router:bindings</font></b>()</tt></pre>
+</div></div>
+<p>Return a map containing all bindings.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>By default values are case sensitive binary strings, however
-constraints may change the type of this value (for example
-automatically converting numbers to integer).</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>By default values are case sensitive binary strings, however constraints may change the type of this value (for example automatically converting numbers to integer).</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Only the values are returned, they are no longer wrapped in a tuple.
-</p>
+<ul><li><strong>2.0</strong>: Only the values are returned, they are no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Get all bindings</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Get all bindings</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">Bindings</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:bindings</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Bindings</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:bindings</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.host_info">cowboy_req:host_info(3)</a>,
-<a href="../cowboy_req.path_info">cowboy_req:path_info(3)</a>,
-<a href="../cowboy_router">cowboy_router(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.binding">cowboy_req:binding(3)</a>, <a href="../cowboy_req.host_info">cowboy_req:host_info(3)</a>, <a href="../cowboy_req.path_info">cowboy_req:path_info(3)</a>, <a href="../cowboy_router">cowboy_router(3)</a></p>
+
diff --git a/docs/en/cowboy/2.2/manual/cowboy_req.body_length/index.html b/docs/en/cowboy/2.2/manual/cowboy_req.body_length/index.html
index 824bf4e1..9d9ee111 100644
--- a/docs/en/cowboy/2.2/manual/cowboy_req.body_length/index.html
+++ b/docs/en/cowboy/2.2/manual/cowboy_req.body_length/index.html
@@ -62,89 +62,41 @@
<h1 class="lined-header"><span>cowboy_req:body_length(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:body_length - Body length</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:body_length - Body length</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">body_length</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: #000080">undefined</span> | <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Return the length of the request body.</p></div>
-<div class="paragraph"><p>The length is not always known before reading the body.
-In those cases Cowboy will return <code>undefined</code>. The body
-length is available after the body has been fully read.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">body_length</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <font color="#000080">undefined</font> | <b><font color="#000000">non_neg_integer</font></b>()</tt></pre>
+</div></div>
+<p>Return the length of the request body.</p>
+<p>The length is not always known before reading the body. In those cases Cowboy will return <code>undefined</code>. The body length is available after the body has been fully read.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The length of the request body, or <code>undefined</code> if it is
-not known.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The length of the request body, or <code>undefined</code> if it is not known.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Only the length is returned, it is no longer wrapped in a tuple.
-</p>
+<ul><li><strong>2.0</strong>: Only the length is returned, it is no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Get the body length</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Get the body length</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:body_length</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Length</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:body_length</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.has_body">cowboy_req:has_body(3)</a>,
-<a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a>,
-<a href="../cowboy_req.read_urlencoded_body">cowboy_req:read_urlencoded_body(3)</a>,
-<a href="../cowboy_req.read_part">cowboy_req:read_part(3)</a>,
-<a href="../cowboy_req.read_part_body">cowboy_req:read_part_body(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.has_body">cowboy_req:has_body(3)</a>, <a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a>, <a href="../cowboy_req.read_urlencoded_body">cowboy_req:read_urlencoded_body(3)</a>, <a href="../cowboy_req.read_part">cowboy_req:read_part(3)</a>, <a href="../cowboy_req.read_part_body">cowboy_req:read_part_body(3)</a></p>
+
diff --git a/docs/en/cowboy/2.2/manual/cowboy_req.cert/index.html b/docs/en/cowboy/2.2/manual/cowboy_req.cert/index.html
index 4aac5b14..b156f21b 100644
--- a/docs/en/cowboy/2.2/manual/cowboy_req.cert/index.html
+++ b/docs/en/cowboy/2.2/manual/cowboy_req.cert/index.html
@@ -62,104 +62,60 @@
<h1 class="lined-header"><span>cowboy_req:cert(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:cert - Client TLS certificate</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:cert - Client TLS certificate</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">cert</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: #000080">binary</span></span>() | <span style="color: #000080">undefined</span></tt></pre></div></div>
-<div class="paragraph"><p>Return the peer&#8217;s TLS certificate.</p></div>
-<div class="paragraph"><p>Using the default configuration this function will always return
-<code>undefined</code>. You need to explicitly configure Cowboy to request
-the client certificate. To do this you need to set the <code>verify</code>
-transport option to <code>verify_peer</code>:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">cert</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <b><font color="#000080">binary</font></b>() | <font color="#000080">undefined</font></tt></pre>
+</div></div>
+<p>Return the peer&apos;s TLS certificate.</p>
+<p>Using the default configuration this function will always return <code>undefined</code>. You need to explicitly configure Cowboy to request the client certificate. To do this you need to set the <code>verify</code> transport option to <code>verify_peer</code>:</p>
+<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">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:start_tls</span></span>(<span style="color: #FF6600">example</span>, [
- {<span style="color: #FF6600">port</span>, <span style="color: #993399">8443</span>},
- {<span style="color: #FF6600">cert</span>, <span style="color: #FF0000">"path/to/cert.pem"</span>},
- {<span style="color: #FF6600">verify</span>, <span style="color: #FF6600">verify_peer</span>}
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy:start_tls</font></b>(<font color="#FF6600">example</font>, [
+ {<font color="#FF6600">port</font>, <font color="#993399">8443</font>},
+ {<font color="#FF6600">cert</font>, <font color="#FF0000">"path/to/cert.pem"</font>},
+ {<font color="#FF6600">verify</font>, <font color="#FF6600">verify_peer</font>}
], #{
- <span style="color: #0000FF">env</span> <span style="color: #990000">=&gt;</span> #{<span style="color: #0000FF">dispatch</span> <span style="color: #990000">=&gt;</span> <span style="color: #009900">Dispatch</span>}
-})<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>You may also want to customize the <code>verify_fun</code> function. Please
-consult the <code>ssl</code> application&#8217;s manual for more details.</p></div>
-<div class="paragraph"><p>TCP connections do not allow a certificate and this function
-will therefore always return <code>undefined</code>.</p></div>
-<div class="paragraph"><p>The certificate can also be obtained using pattern matching:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+ <font color="#0000FF">env</font> <font color="#990000">=&gt;</font> #{<font color="#0000FF">dispatch</font> <font color="#990000">=&gt;</font> <font color="#009900">Dispatch</font>}
+})<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>You may also want to customize the <code>verify_fun</code> function. Please consult the <code>ssl</code> application&apos;s manual for more details.</p>
+<p>TCP connections do not allow a certificate and this function will therefore always return <code>undefined</code>.</p>
+<p>The certificate can also be obtained using pattern matching:</p>
+<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">cert</span> <span style="color: #990000">:=</span> <span style="color: #009900">Cert</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">
+<pre><tt>#{<font color="#FF6600">cert</font> <font color="#990000">:=</font> <font color="#009900">Cert</font>} <font color="#990000">=</font> <font color="#009900">Req</font><font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The client TLS certificate.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The client TLS certificate.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.1</strong>: Function introduced.
-</p>
+<ul><li><strong>2.1</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Get the client TLS certificate.</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Get the client TLS certificate.</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">Cert</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:cert</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Cert</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:cert</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.peer">cowboy_req:peer(3)</a>,
-<a href="../cowboy_req.sock">cowboy_req:sock(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.peer">cowboy_req:peer(3)</a>, <a href="../cowboy_req.sock">cowboy_req:sock(3)</a></p>
+
diff --git a/docs/en/cowboy/2.2/manual/cowboy_req.delete_resp_header/index.html b/docs/en/cowboy/2.2/manual/cowboy_req.delete_resp_header/index.html
index e1832768..fa8761cc 100644
--- a/docs/en/cowboy/2.2/manual/cowboy_req.delete_resp_header/index.html
+++ b/docs/en/cowboy/2.2/manual/cowboy_req.delete_resp_header/index.html
@@ -62,95 +62,45 @@
<h1 class="lined-header"><span>cowboy_req:delete_resp_header(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:delete_resp_header - Delete a response header</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:delete_resp_header - Delete a response header</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">delete_resp_header</span></span>(<span style="color: #009900">Name</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">Req</span>
+<pre><tt><b><font color="#000000">delete_resp_header</font></b>(<font color="#009900">Name</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <font color="#009900">Req</font>
-<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="font-style: italic"><span style="color: #9A1900">%% lowercase; case insensitive</span></span></tt></pre></div></div>
-<div class="paragraph"><p>Delete the given response 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>
-</div>
-<div class="sect1">
+<font color="#009900">Name</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% lowercase; case insensitive</font></i></tt></pre>
+</div></div>
+<p>Delete the given response header.</p>
+<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>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Name
-</dt>
-<dd>
-<p>
-Header name as a lowercase binary string.
-</p>
+<dl><dt>Name</dt>
+<dd><p>Header name as a lowercase binary string.</p>
</dd>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A new Req object is returned.</p></div>
-<div class="paragraph"><p>The returned Req object must be used from that point onward,
-otherwise the header will still be sent in the response.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>A new Req object is returned.</p>
+<p>The returned Req object must be used from that point onward, otherwise the header will still be sent in the response.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<ul><li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Remove the content-type header from the response</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Remove the content-type header from the response</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: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:delete_resp_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req0</span>),</tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:delete_resp_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req0</font>),</tt></pre>
+</div></div>
<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.set_resp_header">cowboy_req:set_resp_header(3)</a>,
-<a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a>,
-<a href="../cowboy_req.has_resp_header">cowboy_req:has_resp_header(3)</a>,
-<a href="../cowboy_req.resp_header">cowboy_req:resp_header(3)</a>,
-<a href="../cowboy_req.resp_headers">cowboy_req:resp_headers(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a>, <a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a>, <a href="../cowboy_req.has_resp_header">cowboy_req:has_resp_header(3)</a>, <a href="../cowboy_req.resp_header">cowboy_req:resp_header(3)</a>, <a href="../cowboy_req.resp_headers">cowboy_req:resp_headers(3)</a></p>
+
diff --git a/docs/en/cowboy/2.2/manual/cowboy_req.has_body/index.html b/docs/en/cowboy/2.2/manual/cowboy_req.has_body/index.html
index 4f737a14..85936e6d 100644
--- a/docs/en/cowboy/2.2/manual/cowboy_req.has_body/index.html
+++ b/docs/en/cowboy/2.2/manual/cowboy_req.has_body/index.html
@@ -62,80 +62,38 @@
<h1 class="lined-header"><span>cowboy_req:has_body(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:has_body - Is there a request body?</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:has_body - Is there a request body?</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">has_body</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">boolean</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Return whether the request has a body.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">has_body</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <b><font color="#000000">boolean</font></b>()</tt></pre>
+</div></div>
+<p>Return whether the request has a body.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A boolean indicating whether the request has a body.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>A boolean indicating whether the request has a body.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<ul><li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Ensure the request has a body</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Ensure the request has a body</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: #000080">true</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:has_body</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#000080">true</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:has_body</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.body_length">cowboy_req:body_length(3)</a>,
-<a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a>,
-<a href="../cowboy_req.read_urlencoded_body">cowboy_req:read_urlencoded_body(3)</a>,
-<a href="../cowboy_req.read_part">cowboy_req:read_part(3)</a>,
-<a href="../cowboy_req.read_part_body">cowboy_req:read_part_body(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.body_length">cowboy_req:body_length(3)</a>, <a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a>, <a href="../cowboy_req.read_urlencoded_body">cowboy_req:read_urlencoded_body(3)</a>, <a href="../cowboy_req.read_part">cowboy_req:read_part(3)</a>, <a href="../cowboy_req.read_part_body">cowboy_req:read_part_body(3)</a></p>
+
diff --git a/docs/en/cowboy/2.2/manual/cowboy_req.has_resp_body/index.html b/docs/en/cowboy/2.2/manual/cowboy_req.has_resp_body/index.html
index 9ff21d91..3507755d 100644
--- a/docs/en/cowboy/2.2/manual/cowboy_req.has_resp_body/index.html
+++ b/docs/en/cowboy/2.2/manual/cowboy_req.has_resp_body/index.html
@@ -62,82 +62,43 @@
<h1 class="lined-header"><span>cowboy_req:has_resp_body(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:has_resp_body - Is there a response body?</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:has_resp_body - Is there a response body?</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">has_resp_body</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">boolean</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Return whether a response body has been set.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">has_resp_body</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <b><font color="#000000">boolean</font></b>()</tt></pre>
+</div></div>
+<p>Return whether a response body has been set.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A boolean indicating whether a response body has been set.</p></div>
-<div class="paragraph"><p>This function will return <code>false</code> when an empty response
-body has been set.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>A boolean indicating whether a response body has been set.</p>
+<p>This function will return <code>false</code> when an empty response body has been set.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<ul><li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Check whether a body has been set</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Check whether a body has been set</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: #000080">false</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:has_resp_body</span></span>(<span style="color: #009900">Req0</span>),
-<span style="color: #009900">Req1</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_body</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Hello!"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req0</span>),
-<span style="color: #000080">true</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:has_resp_body</span></span>(<span style="color: #009900">Req1</span>),
-<span style="color: #009900">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_body</span></span>(<span style="color: #990000">&lt;&lt;&gt;&gt;</span>, <span style="color: #009900">Req1</span>),
-<span style="color: #000080">false</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:has_resp_body</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#000080">false</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:has_resp_body</font></b>(<font color="#009900">Req0</font>),
+<font color="#009900">Req1</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_body</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"Hello!"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req0</font>),
+<font color="#000080">true</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:has_resp_body</font></b>(<font color="#009900">Req1</font>),
+<font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_body</font></b>(<font color="#990000">&lt;&lt;&gt;&gt;</font>, <font color="#009900">Req1</font>),
+<font color="#000080">false</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:has_resp_body</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.set_resp_body">cowboy_req:set_resp_body(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.set_resp_body">cowboy_req:set_resp_body(3)</a></p>
+
diff --git a/docs/en/cowboy/2.2/manual/cowboy_req.has_resp_header/index.html b/docs/en/cowboy/2.2/manual/cowboy_req.has_resp_header/index.html
index 5b00ff74..779880de 100644
--- a/docs/en/cowboy/2.2/manual/cowboy_req.has_resp_header/index.html
+++ b/docs/en/cowboy/2.2/manual/cowboy_req.has_resp_header/index.html
@@ -62,95 +62,46 @@
<h1 class="lined-header"><span>cowboy_req:has_resp_header(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:has_resp_header - Is the given response header set?</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:has_resp_header - Is the given response header set?</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">has_resp_header</span></span>(<span style="color: #009900">Name</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">boolean</span></span>()
+<pre><tt><b><font color="#000000">has_resp_header</font></b>(<font color="#009900">Name</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <b><font color="#000000">boolean</font></b>()
-<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="font-style: italic"><span style="color: #9A1900">%% lowercase; case insensitive</span></span></tt></pre></div></div>
-<div class="paragraph"><p>Return whether the given response header has been set.</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>
-</div>
-<div class="sect1">
+<font color="#009900">Name</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% lowercase; case insensitive</font></i></tt></pre>
+</div></div>
+<p>Return whether the given response header has been set.</p>
+<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>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Name
-</dt>
-<dd>
-<p>
-Header name as a lowercase binary string.
-</p>
+<dl><dt>Name</dt>
+<dd><p>Header name as a lowercase binary string.</p>
</dd>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A boolean indicating whether the given response header has been set.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>A boolean indicating whether the given response header has been set.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<ul><li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Check whether the content-type header has been set</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Check whether the content-type header has been set</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: #000080">false</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:has_resp_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req0</span>),
-<span style="color: #009900">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/html"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req0</span>),
-<span style="color: #000080">true</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:has_resp_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#000080">false</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:has_resp_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req0</font>),
+<font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/html"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req0</font>),
+<font color="#000080">true</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:has_resp_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.set_resp_header">cowboy_req:set_resp_header(3)</a>,
-<a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a>,
-<a href="../cowboy_req.resp_header">cowboy_req:resp_header(3)</a>,
-<a href="../cowboy_req.resp_headers">cowboy_req:resp_headers(3)</a>,
-<a href="../cowboy_req.delete_resp_header">cowboy_req:delete_resp_header(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a>, <a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a>, <a href="../cowboy_req.resp_header">cowboy_req:resp_header(3)</a>, <a href="../cowboy_req.resp_headers">cowboy_req:resp_headers(3)</a>, <a href="../cowboy_req.delete_resp_header">cowboy_req:delete_resp_header(3)</a></p>
+
diff --git a/docs/en/cowboy/2.2/manual/cowboy_req.header/index.html b/docs/en/cowboy/2.2/manual/cowboy_req.header/index.html
index b2048ccd..cc90c29d 100644
--- a/docs/en/cowboy/2.2/manual/cowboy_req.header/index.html
+++ b/docs/en/cowboy/2.2/manual/cowboy_req.header/index.html
@@ -62,122 +62,67 @@
<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">
+<p>cowboy_req:header - HTTP header</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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: #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: #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">Name</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: #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">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>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
+<pre><tt><b><font color="#000000">header</font></b>(<font color="#009900">Name</font>, <font color="#009900">Req</font>) <font color="#990000">-&gt;</font> <b><font color="#000000">header</font></b>(<font color="#009900">Name</font>, <font color="#009900">Req</font>, <font color="#000080">undefined</font>)
+<b><font color="#000000">header</font></b>(<font color="#009900">Name</font>, <font color="#009900">Req</font>, <font color="#009900">Default</font>) <font color="#990000">-&gt;</font> <b><font color="#000080">binary</font></b>() | <font color="#009900">Default</font>
+
+<font color="#009900">Name</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% lowercase; case insensitive</font></i>
+<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()</tt></pre>
+</div></div>
+<p>Return the value for the given HTTP header.</p>
+<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>
+<p>Headers can also be obtained using pattern matching:</p>
+<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">
+<pre><tt>#{<font color="#FF6600">headers</font> <font color="#990000">:=</font> #{<font color="#009900">Name</font> <font color="#990000">:=</font> <font color="#009900">Value</font>}} <font color="#990000">=</font> <font color="#009900">Req</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Note that this snippet will crash if the header is missing.</p>
<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 lowercase binary string.
-</p>
+<dl><dt>Name</dt>
+<dd><p>Desired HTTP header name as a lowercase binary string.</p>
</dd>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dt>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>
+<dt>Default</dt>
+<dd><p>Default value returned when the header is missing.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<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">
+<p>The header value is returned as a binary string. When the header is missing, the default argument is returned.</p>
<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>
+<ul><li><strong>2.0</strong>: Only the header value is returned, it is no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<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
+<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
+<pre><tt><font color="#009900">Accept</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"accept"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>)<font color="#990000">.</font></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">
+<pre><tt><font color="#009900">Length</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-length"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"0"</font><font color="#990000">&gt;&gt;</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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>
+<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>
+
diff --git a/docs/en/cowboy/2.2/manual/cowboy_req.headers/index.html b/docs/en/cowboy/2.2/manual/cowboy_req.headers/index.html
index 3a052774..805bcbbb 100644
--- a/docs/en/cowboy/2.2/manual/cowboy_req.headers/index.html
+++ b/docs/en/cowboy/2.2/manual/cowboy_req.headers/index.html
@@ -62,90 +62,47 @@
<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">
+<p>cowboy_req:headers - HTTP headers</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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
+<pre><tt><b><font color="#000000">headers</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <b><font color="#000000">cowboy:http_headers</font></b>()</tt></pre>
+</div></div>
+<p>Return all request headers.</p>
+<p>Request headers can also be obtained using pattern matching:</p>
+<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">
+<pre><tt>#{<font color="#FF6600">headers</font> <font color="#990000">:=</font> <font color="#009900">Headers</font>} <font color="#990000">=</font> <font color="#009900">Req</font><font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<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">
+<p>Headers are returned as a map with keys being lowercase binary strings, and values as binary strings.</p>
<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>
+<ul><li><strong>2.0</strong>: Only the headers are returned, they are no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<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
+<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">
+<pre><tt><font color="#009900">Headers</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:headers</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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>
+<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>
+
diff --git a/docs/en/cowboy/2.2/manual/cowboy_req.host/index.html b/docs/en/cowboy/2.2/manual/cowboy_req.host/index.html
index 4d2f2c33..525c2138 100644
--- a/docs/en/cowboy/2.2/manual/cowboy_req.host/index.html
+++ b/docs/en/cowboy/2.2/manual/cowboy_req.host/index.html
@@ -62,91 +62,47 @@
<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">
+<p>cowboy_req:host - URI host name</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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
+<pre><tt><b><font color="#000000">host</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <font color="#009900">Host</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()</tt></pre>
+</div></div>
+<p>Return the host name of the effective request URI.</p>
+<p>The host name can also be obtained using pattern matching:</p>
+<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">
+<pre><tt>#{<font color="#FF6600">host</font> <font color="#990000">:=</font> <font color="#009900">Host</font>} <font color="#990000">=</font> <font color="#009900">Req</font><font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<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">
+<p>The host name is returned as a lowercase binary string. It is case insensitive.</p>
<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>
+<ul><li><strong>2.0</strong>: Only the host name is returned, it is no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<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
+<div class="listingblock"><div class="title">Get the effective request URI&apos;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">
+<pre><tt><font color="#009900">Host</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:host</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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>
+<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>
+
diff --git a/docs/en/cowboy/2.2/manual/cowboy_req.host_info/index.html b/docs/en/cowboy/2.2/manual/cowboy_req.host_info/index.html
index 2a7c3f44..d48eed1f 100644
--- a/docs/en/cowboy/2.2/manual/cowboy_req.host_info/index.html
+++ b/docs/en/cowboy/2.2/manual/cowboy_req.host_info/index.html
@@ -62,87 +62,41 @@
<h1 class="lined-header"><span>cowboy_req:host_info(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:host_info - Access the route&#8217;s heading host segments</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:host_info - Access the route&apos;s heading host segments</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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_info</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_router:tokens</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Return the tokens for the heading host segments.</p></div>
-<div class="paragraph"><p>This is the part of the host name that was matched using
-the <code>...</code> notation.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">host_info</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <b><font color="#000000">cowboy_router:tokens</font></b>()</tt></pre>
+</div></div>
+<p>Return the tokens for the heading host segments.</p>
+<p>This is the part of the host name that was matched using the <code>...</code> notation.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The tokens are returned as a list of case insensitive
-binary strings.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The tokens are returned as a list of case insensitive binary strings.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Only the tokens are returned, they are no longer wrapped in a tuple.
-</p>
+<ul><li><strong>2.0</strong>: Only the tokens are returned, they are no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Get the host_info tokens</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Get the host_info tokens</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">HostInfo</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:host_info</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">HostInfo</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:host_info</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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>,
-<a href="../cowboy_router">cowboy_router(3)</a></p></div>
-</div>
-</div>
+<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>, <a href="../cowboy_router">cowboy_router(3)</a></p>
+
diff --git a/docs/en/cowboy/2.2/manual/cowboy_req.inform/index.html b/docs/en/cowboy/2.2/manual/cowboy_req.inform/index.html
index e4a2af7b..e3a18497 100644
--- a/docs/en/cowboy/2.2/manual/cowboy_req.inform/index.html
+++ b/docs/en/cowboy/2.2/manual/cowboy_req.inform/index.html
@@ -62,125 +62,66 @@
<h1 class="lined-header"><span>cowboy_req:inform(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:inform - Send an informational response</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:inform - Send an informational response</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">inform</span></span>(<span style="color: #009900">Status</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">inform</span></span>(<span style="color: #009900">StatusCode</span>, #{}, <span style="color: #009900">Req</span>)
-
-<span style="font-weight: bold"><span style="color: #000000">inform</span></span>(<span style="color: #009900">Status</span>, <span style="color: #009900">Headers</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: #FF6600">ok</span>
-
-<span style="color: #009900">Status</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:http_status</span></span>()
-<span style="color: #009900">Headers</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:http_headers</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Send an informational response.</p></div>
-<div class="paragraph"><p>Informational responses use a status code between 100 and 199.
-They cannot include a body. This function will not use any
-of the previously set headers. All headers to be sent must
-be given directly.</p></div>
-<div class="paragraph"><p>Any number of informational responses can be sent as long as
-they are sent before the proper response. Attempting to use
-this function after sending a normal response will result
-in an error.</p></div>
-<div class="paragraph"><p>The header names must be given as lowercase binary strings.
-While header names are case insensitive, Cowboy requires them
-to be given as lowercase to function properly.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">inform</font></b>(<font color="#009900">Status</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> <b><font color="#000000">inform</font></b>(<font color="#009900">StatusCode</font>, #{}, <font color="#009900">Req</font>)
+
+<b><font color="#000000">inform</font></b>(<font color="#009900">Status</font>, <font color="#009900">Headers</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> <font color="#FF6600">ok</font>
+
+<font color="#009900">Status</font> <font color="#990000">::</font> <b><font color="#000000">cowboy:http_status</font></b>()
+<font color="#009900">Headers</font> <font color="#990000">::</font> <b><font color="#000000">cowboy:http_headers</font></b>()</tt></pre>
+</div></div>
+<p>Send an informational response.</p>
+<p>Informational responses use a status code between 100 and 199. They cannot include a body. This function will not use any of the previously set headers. All headers to be sent must be given directly.</p>
+<p>Any number of informational responses can be sent as long as they are sent before the proper response. Attempting to use this function after sending a normal response will result in an error.</p>
+<p>The header names must be given as lowercase binary strings. While header names are case insensitive, Cowboy requires them to be given as lowercase to function properly.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Status
-</dt>
-<dd>
-<p>
-The status code for the response.
-</p>
+<dl><dt>Status</dt>
+<dd><p>The status code for the response.</p>
</dd>
-<dt class="hdlist1">
-Headers
-</dt>
-<dd>
-<p>
-The response headers.
-</p>
+<dt>Headers</dt>
+<dd><p>The response headers.</p>
</dd>
-</dl></div>
-<div class="paragraph"><p>Header names must be given as lowercase binary strings.</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+</dl>
+<p>Header names must be given as lowercase binary strings.</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The atom <code>ok</code> is always returned. It can be safely ignored.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The atom <code>ok</code> is always returned. It can be safely ignored.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.1</strong>: Function introduced.
-</p>
+<ul><li><strong>2.1</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Send an informational response</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Send an informational response</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: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:inform</span></span>(<span style="color: #993399">102</span>, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Send an informational response with headers</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:inform</font></b>(<font color="#993399">102</font>, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Send an informational response with 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">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:inform</span></span>(<span style="color: #993399">103</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"link"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"&lt;/style.css&gt;; rel=preload; as=style"</span><span style="color: #990000">&gt;&gt;</span>,
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"link"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"&lt;/script.js&gt;; rel=preload; as=script"</span><span style="color: #990000">&gt;&gt;</span>
-}, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:inform</font></b>(<font color="#993399">103</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"link"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"&lt;/style.css&gt;; rel=preload; as=style"</font><font color="#990000">&gt;&gt;</font>,
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"link"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"&lt;/script.js&gt;; rel=preload; as=script"</font><font color="#990000">&gt;&gt;</font>
+}, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.reply">cowboy_req:reply(3)</a>,
-<a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a>,
-<a href="../cowboy_req.push">cowboy_req:push(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.reply">cowboy_req:reply(3)</a>, <a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a>, <a href="../cowboy_req.push">cowboy_req:push(3)</a></p>
+
diff --git a/docs/en/cowboy/2.2/manual/cowboy_req.match_cookies/index.html b/docs/en/cowboy/2.2/manual/cowboy_req.match_cookies/index.html
index cbf262b2..c1d6a1ca 100644
--- a/docs/en/cowboy/2.2/manual/cowboy_req.match_cookies/index.html
+++ b/docs/en/cowboy/2.2/manual/cowboy_req.match_cookies/index.html
@@ -62,123 +62,67 @@
<h1 class="lined-header"><span>cowboy_req:match_cookies(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:match_cookies - Match cookies against constraints</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:match_cookies - Match cookies against constraints</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">match_cookies</span></span>(<span style="color: #009900">Fields</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:fields</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: #000080">atom</span></span>() <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>Parse the cookies and match specific values against
-constraints.</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>
-<div class="sect1">
+<pre><tt><b><font color="#000000">match_cookies</font></b>(<font color="#009900">Fields</font> <font color="#990000">::</font> <b><font color="#000000">cowboy:fields</font></b>(), <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> #{<b><font color="#000080">atom</font></b>() <font color="#990000">=&gt;</font> <b><font color="#000000">any</font></b>()}</tt></pre>
+</div></div>
+<p>Parse the cookies and match specific values against constraints.</p>
+<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>
+<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>
+<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>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Fields
-</dt>
-<dd>
-<p>
-Cookies to retrieve.
-</p>
-<div class="paragraph"><p>See <a href="../cowboy">cowboy(3)</a> for a complete description.</p></div>
+<dl><dt>Fields</dt>
+<dd><p>Cookies to retrieve.</p>
+<p>See <a href="../cowboy">cowboy(3)</a> for a complete description.</p>
</dd>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Desired values are returned as a map. The key is the atom
-that was given in the list of fields, and the value is the
-optionally converted value after applying constraints.</p></div>
-<div class="paragraph"><p>The map contains the same keys that were given in the fields.</p></div>
-<div class="paragraph"><p>An exception is triggered when the match fails.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Desired values are returned as a map. The key is the atom that was given in the list of fields, and the value is the optionally converted value after applying constraints.</p>
+<p>The map contains the same keys that were given in the fields.</p>
+<p>An exception is triggered when the match fails.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced.
-</p>
+<ul><li><strong>2.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Match fields</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Match fields</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">%% ID and Lang are binaries.</span></span>
-#{<span style="color: #FF6600">id</span> <span style="color: #990000">:=</span> <span style="color: #009900">ID</span>, <span style="color: #FF6600">lang</span> <span style="color: #990000">:=</span> <span style="color: #009900">Lang</span>}
- <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:match_cookies</span></span>([<span style="color: #FF6600">id</span>, <span style="color: #FF6600">lang</span>], <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Match fields and apply constraints</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><i><font color="#9A1900">%% ID and Lang are binaries.</font></i>
+#{<font color="#FF6600">id</font> <font color="#990000">:=</font> <font color="#009900">ID</font>, <font color="#FF6600">lang</font> <font color="#990000">:=</font> <font color="#009900">Lang</font>}
+ <font color="#990000">=</font> <b><font color="#000000">cowboy_req:match_cookies</font></b>([<font color="#FF6600">id</font>, <font color="#FF6600">lang</font>], <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Match fields and apply constraints</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">%% ID is an integer and Lang a non-empty binary.</span></span>
-#{<span style="color: #FF6600">id</span> <span style="color: #990000">:=</span> <span style="color: #009900">ID</span>, <span style="color: #FF6600">lang</span> <span style="color: #990000">:=</span> <span style="color: #009900">Lang</span>}
- <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:match_cookies</span></span>([{<span style="color: #FF6600">id</span>, <span style="color: #FF6600">int</span>}, {<span style="color: #FF6600">lang</span>, <span style="color: #FF6600">nonempty</span>}], <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Match fields with default values</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><i><font color="#9A1900">%% ID is an integer and Lang a non-empty binary.</font></i>
+#{<font color="#FF6600">id</font> <font color="#990000">:=</font> <font color="#009900">ID</font>, <font color="#FF6600">lang</font> <font color="#990000">:=</font> <font color="#009900">Lang</font>}
+ <font color="#990000">=</font> <b><font color="#000000">cowboy_req:match_cookies</font></b>([{<font color="#FF6600">id</font>, <font color="#FF6600">int</font>}, {<font color="#FF6600">lang</font>, <font color="#FF6600">nonempty</font>}], <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Match fields with default values</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: #FF6600">lang</span> <span style="color: #990000">:=</span> <span style="color: #009900">Lang</span>}
- <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:match_cookies</span></span>([{<span style="color: #FF6600">lang</span>, [], <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"en-US"</span><span style="color: #990000">&gt;&gt;</span>}], <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>#{<font color="#FF6600">lang</font> <font color="#990000">:=</font> <font color="#009900">Lang</font>}
+ <font color="#990000">=</font> <b><font color="#000000">cowboy_req:match_cookies</font></b>([{<font color="#FF6600">lang</font>, [], <font color="#990000">&lt;&lt;</font><font color="#FF0000">"en-US"</font><font color="#990000">&gt;&gt;</font>}], <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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_cookies">cowboy_req:parse_cookies(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.parse_cookies">cowboy_req:parse_cookies(3)</a></p>
+
diff --git a/docs/en/cowboy/2.2/manual/cowboy_req.match_qs/index.html b/docs/en/cowboy/2.2/manual/cowboy_req.match_qs/index.html
index 3cd4cc12..e9f94995 100644
--- a/docs/en/cowboy/2.2/manual/cowboy_req.match_qs/index.html
+++ b/docs/en/cowboy/2.2/manual/cowboy_req.match_qs/index.html
@@ -62,123 +62,67 @@
<h1 class="lined-header"><span>cowboy_req:match_qs(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:match_qs - Match the query string against constraints</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:match_qs - Match the query string against constraints</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">match_qs</span></span>(<span style="color: #009900">Fields</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:fields</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: #000080">atom</span></span>() <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>Parse the query string and match specific values against
-constraints.</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>
-<div class="sect1">
+<pre><tt><b><font color="#000000">match_qs</font></b>(<font color="#009900">Fields</font> <font color="#990000">::</font> <b><font color="#000000">cowboy:fields</font></b>(), <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> #{<b><font color="#000080">atom</font></b>() <font color="#990000">=&gt;</font> <b><font color="#000000">any</font></b>()}</tt></pre>
+</div></div>
+<p>Parse the query string and match specific values against constraints.</p>
+<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>
+<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>
+<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>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Fields
-</dt>
-<dd>
-<p>
-Fields to retrieve from the query string.
-</p>
-<div class="paragraph"><p>See <a href="../cowboy">cowboy(3)</a> for a complete description.</p></div>
+<dl><dt>Fields</dt>
+<dd><p>Fields to retrieve from the query string.</p>
+<p>See <a href="../cowboy">cowboy(3)</a> for a complete description.</p>
</dd>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Desired values are returned as a map. The key is the atom
-that was given in the list of fields, and the value is the
-optionally converted value after applying constraints.</p></div>
-<div class="paragraph"><p>The map contains the same keys that were given in the fields.</p></div>
-<div class="paragraph"><p>An exception is triggered when the match fails.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Desired values are returned as a map. The key is the atom that was given in the list of fields, and the value is the optionally converted value after applying constraints.</p>
+<p>The map contains the same keys that were given in the fields.</p>
+<p>An exception is triggered when the match fails.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced.
-</p>
+<ul><li><strong>2.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Match fields</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Match fields</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">%% ID and Lang are binaries.</span></span>
-#{<span style="color: #FF6600">id</span> <span style="color: #990000">:=</span> <span style="color: #009900">ID</span>, <span style="color: #FF6600">lang</span> <span style="color: #990000">:=</span> <span style="color: #009900">Lang</span>}
- <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:match_qs</span></span>([<span style="color: #FF6600">id</span>, <span style="color: #FF6600">lang</span>], <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Match fields and apply constraints</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><i><font color="#9A1900">%% ID and Lang are binaries.</font></i>
+#{<font color="#FF6600">id</font> <font color="#990000">:=</font> <font color="#009900">ID</font>, <font color="#FF6600">lang</font> <font color="#990000">:=</font> <font color="#009900">Lang</font>}
+ <font color="#990000">=</font> <b><font color="#000000">cowboy_req:match_qs</font></b>([<font color="#FF6600">id</font>, <font color="#FF6600">lang</font>], <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Match fields and apply constraints</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">%% ID is an integer and Lang a non-empty binary.</span></span>
-#{<span style="color: #FF6600">id</span> <span style="color: #990000">:=</span> <span style="color: #009900">ID</span>, <span style="color: #FF6600">lang</span> <span style="color: #990000">:=</span> <span style="color: #009900">Lang</span>}
- <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:match_qs</span></span>([{<span style="color: #FF6600">id</span>, <span style="color: #FF6600">int</span>}, {<span style="color: #FF6600">lang</span>, <span style="color: #FF6600">nonempty</span>}], <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Match fields with default values</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><i><font color="#9A1900">%% ID is an integer and Lang a non-empty binary.</font></i>
+#{<font color="#FF6600">id</font> <font color="#990000">:=</font> <font color="#009900">ID</font>, <font color="#FF6600">lang</font> <font color="#990000">:=</font> <font color="#009900">Lang</font>}
+ <font color="#990000">=</font> <b><font color="#000000">cowboy_req:match_qs</font></b>([{<font color="#FF6600">id</font>, <font color="#FF6600">int</font>}, {<font color="#FF6600">lang</font>, <font color="#FF6600">nonempty</font>}], <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Match fields with default values</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: #FF6600">lang</span> <span style="color: #990000">:=</span> <span style="color: #009900">Lang</span>}
- <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:match_qs</span></span>([{<span style="color: #FF6600">lang</span>, [], <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"en-US"</span><span style="color: #990000">&gt;&gt;</span>}], <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>#{<font color="#FF6600">lang</font> <font color="#990000">:=</font> <font color="#009900">Lang</font>}
+ <font color="#990000">=</font> <b><font color="#000000">cowboy_req:match_qs</font></b>([{<font color="#FF6600">lang</font>, [], <font color="#990000">&lt;&lt;</font><font color="#FF0000">"en-US"</font><font color="#990000">&gt;&gt;</font>}], <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.qs">cowboy_req:qs(3)</a>,
-<a href="../cowboy_req.parse_qs">cowboy_req:parse_qs(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.qs">cowboy_req:qs(3)</a>, <a href="../cowboy_req.parse_qs">cowboy_req:parse_qs(3)</a></p>
+
diff --git a/docs/en/cowboy/2.2/manual/cowboy_req.method/index.html b/docs/en/cowboy/2.2/manual/cowboy_req.method/index.html
index e15d0453..0fcc31a9 100644
--- a/docs/en/cowboy/2.2/manual/cowboy_req.method/index.html
+++ b/docs/en/cowboy/2.2/manual/cowboy_req.method/index.html
@@ -62,100 +62,58 @@
<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">
+<p>cowboy_req:method - HTTP method</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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
+<pre><tt><b><font color="#000000">method</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <font color="#009900">Method</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()</tt></pre>
+</div></div>
+<p>Return the request&apos;s HTTP method.</p>
+<p>The method can also be obtained using pattern matching:</p>
+<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">
+<pre><tt>#{<font color="#FF6600">method</font> <font color="#990000">:=</font> <font color="#009900">Method</font>} <font color="#990000">=</font> <font color="#009900">Req</font><font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<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">
+<p>The request&apos;s HTTP method is returned as a binary string. While methods are case sensitive, standard methods are always uppercase.</p>
<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>
+<ul><li><strong>2.0</strong>: Only the method is returned, it is no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<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
+<div class="listingblock"><div class="title">Ensure the request&apos;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
+<pre><tt><font color="#990000">&lt;&lt;</font><font color="#FF0000">"GET"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:method</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></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">
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">case</font></b> <b><font color="#000000">lists:member</font></b>(<b><font color="#000000">cowboy_req:method</font></b>(<font color="#009900">Req</font>), [<font color="#990000">&lt;&lt;</font><font color="#FF0000">"GET"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"POST"</font><font color="#990000">&gt;&gt;</font>]) <b><font color="#0000FF">of</font></b>
+ <font color="#000080">true</font> <font color="#990000">-&gt;</font> <b><font color="#000000">handle</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>);
+ <font color="#000080">false</font> <font color="#990000">-&gt;</font> <b><font color="#000000">method_not_allowed</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>)
+ <b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
<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>
+<p><a href="../cowboy_req">cowboy_req(3)</a></p>
+
diff --git a/docs/en/cowboy/2.2/manual/cowboy_req.parse_cookies/index.html b/docs/en/cowboy/2.2/manual/cowboy_req.parse_cookies/index.html
index 5eacfb94..8a4b082d 100644
--- a/docs/en/cowboy/2.2/manual/cowboy_req.parse_cookies/index.html
+++ b/docs/en/cowboy/2.2/manual/cowboy_req.parse_cookies/index.html
@@ -62,91 +62,47 @@
<h1 class="lined-header"><span>cowboy_req:parse_cookies(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:parse_cookies - Parse cookie headers</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:parse_cookies - Parse cookie headers</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">parse_cookies</span></span>(<span style="color: #009900">Req</span>) <span style="color: #990000">-&gt;</span> [{<span style="color: #009900">Name</span>, <span style="color: #009900">Value</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="font-style: italic"><span style="color: #9A1900">%% case sensitive</span></span>
-<span style="color: #009900">Value</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></tt></pre></div></div>
-<div class="paragraph"><p>Parse cookie headers.</p></div>
-<div class="paragraph"><p>Alias for <a href="../cowboy_req.parse_header">cowboy_req:parse_header(<a href="#cookie">[cookie]</a>, Req)</a>.</p></div>
-<div class="paragraph"><p>When the cookie header is missing, <code>[]</code> is returned.</p></div>
-<div class="paragraph"><p>While an empty cookie header is not valid, some clients do
-send it. Cowboy will in this case also return <code>[]</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">parse_cookies</font></b>(<font color="#009900">Req</font>) <font color="#990000">-&gt;</font> [{<font color="#009900">Name</font>, <font color="#009900">Value</font>}]
+
+<font color="#009900">Name</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case sensitive</font></i>
+<font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case sensitive</font></i></tt></pre>
+</div></div>
+<p>Parse cookie headers.</p>
+<p>Alias for <a href="../cowboy_req.parse_header">cowboy_req:parse_header(&lt;&lt;&quot;cookie&quot;&gt;&gt;, Req)</a>.</p>
+<p>When the cookie header is missing, <code>[]</code> is returned.</p>
+<p>While an empty cookie header is not valid, some clients do send it. Cowboy will in this case also return <code>[]</code>.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The cookies are returned as a list of key/values. Keys and
-values are case sensitive binary strings.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The cookies are returned as a list of key/values. Keys and values are case sensitive binary strings.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Only the parsed header value is returned, it is no longer wrapped in a tuple.
-</p>
+<ul><li><strong>2.0</strong>: Only the parsed header value is returned, it is no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced. Replaces <code>cookie/2,3</code> and <code>cookies/1</code>.
-</p>
+<li><strong>2.0</strong>: Function introduced. Replaces <code>cookie/2,3</code> and <code>cookies/1</code>.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Look for a specific cookie</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Look for a specific cookie</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">Cookies</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:parse_cookies</span></span>(<span style="color: #009900">Req</span>),
-{<span style="color: #990000">_</span>, <span style="color: #009900">Token</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">lists:keyfind</span></span>(<span style="color: #FF6600">token</span>, <span style="color: #993399">1</span>, <span style="color: #009900">Cookies</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Cookies</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:parse_cookies</font></b>(<font color="#009900">Req</font>),
+{<font color="#990000">_</font>, <font color="#009900">Token</font>} <font color="#990000">=</font> <b><font color="#000000">lists:keyfind</font></b>(<font color="#FF6600">token</font>, <font color="#993399">1</font>, <font color="#009900">Cookies</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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_header">cowboy_req:parse_header(3)</a>,
-<a href="../cowboy_req.match_cookies">cowboy_req:match_cookies(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.parse_header">cowboy_req:parse_header(3)</a>, <a href="../cowboy_req.match_cookies">cowboy_req:match_cookies(3)</a></p>
+
diff --git a/docs/en/cowboy/2.2/manual/cowboy_req.parse_header/index.html b/docs/en/cowboy/2.2/manual/cowboy_req.parse_header/index.html
index 50ff77c6..786a1dde 100644
--- a/docs/en/cowboy/2.2/manual/cowboy_req.parse_header/index.html
+++ b/docs/en/cowboy/2.2/manual/cowboy_req.parse_header/index.html
@@ -62,283 +62,218 @@
<h1 class="lined-header"><span>cowboy_req:parse_header(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:parse_header - Parse the given HTTP header</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:parse_header - Parse the given HTTP header</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">parse_header</span></span>(<span style="color: #009900">Name</span>, <span style="color: #009900">Req</span>) <span style="color: #990000">-&gt;</span> <span style="color: #009900">ParsedValue</span> | <span style="color: #009900">Default</span>
-<span style="font-weight: bold"><span style="color: #000000">parse_header</span></span>(<span style="color: #009900">Name</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">Default</span>) <span style="color: #990000">-&gt;</span> <span style="color: #009900">ParsedValue</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">binary</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">ParsedValue</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">any</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>Parse 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>The type of the parsed value varies depending on
-the header. Similarly, the default value when calling
-<code>cowboy_req:parse_header/2</code> differs depending on the
-header.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">parse_header</font></b>(<font color="#009900">Name</font>, <font color="#009900">Req</font>) <font color="#990000">-&gt;</font> <font color="#009900">ParsedValue</font> | <font color="#009900">Default</font>
+<b><font color="#000000">parse_header</font></b>(<font color="#009900">Name</font>, <font color="#009900">Req</font>, <font color="#009900">Default</font>) <font color="#990000">-&gt;</font> <font color="#009900">ParsedValue</font> | <font color="#009900">Default</font>
+
+<font color="#009900">Name</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()
+<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()
+<font color="#009900">ParsedValue</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()</tt></pre>
+</div></div>
+<p>Parse the given HTTP header.</p>
+<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>
+<p>The type of the parsed value varies depending on the header. Similarly, the default value when calling <code>cowboy_req:parse_header/2</code> differs depending on the header.</p>
<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 lowercase binary string.
-</p>
+<dl><dt>Name</dt>
+<dd><p>Desired HTTP header name as a lowercase binary string.</p>
</dd>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dt>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>
+<dt>Default</dt>
+<dd><p>Default value returned when the header is missing.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The parsed header value varies depending on the header.
-When the header is missing, the default argument is returned.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The parsed header value varies depending on the header. When the header is missing, the default argument is returned.</p>
<h2 id="_headers">Headers</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The following snippets detail the types returned by the
-different headers. Unless mentioned otherwise, the
-default value when the header is missing will be <code>undefined</code>:</p></div>
-<div class="listingblock">
-<div class="title">accept</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The following snippets detail the types returned by the different headers. Unless mentioned otherwise, the default value when the header is missing will be <code>undefined</code>:</p>
+<div class="listingblock"><div class="title">accept</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">parse_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">-&gt;</span> [{{<span style="color: #009900">Type</span>, <span style="color: #009900">SubType</span>, <span style="color: #009900">Params</span>}, <span style="color: #009900">Quality</span>, <span style="color: #009900">AcceptExt</span>}]
-
-<span style="color: #009900">Type</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 insensitive</span></span>
-<span style="color: #009900">SubType</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 insensitive</span></span>
-<span style="color: #009900">Params</span> <span style="color: #990000">::</span> [{<span style="color: #009900">Key</span>, <span style="color: #009900">Value</span>}]
-<span style="color: #009900">Quality</span> <span style="color: #990000">::</span> <span style="color: #993399">0</span><span style="color: #990000">..</span><span style="color: #993399">1000</span>
-<span style="color: #009900">AcceptExt</span> <span style="color: #990000">::</span> [<span style="color: #009900">Key</span> | {<span style="color: #009900">Key</span>, <span style="color: #009900">Value</span>}]
-<span style="color: #009900">Key</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 insensitive</span></span>
-<span style="color: #009900">Value</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></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">accept-charset, accept-encoding and accept-language</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">parse_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"accept"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>)
+ <font color="#990000">-&gt;</font> [{{<font color="#009900">Type</font>, <font color="#009900">SubType</font>, <font color="#009900">Params</font>}, <font color="#009900">Quality</font>, <font color="#009900">AcceptExt</font>}]
+
+<font color="#009900">Type</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case insensitive</font></i>
+<font color="#009900">SubType</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case insensitive</font></i>
+<font color="#009900">Params</font> <font color="#990000">::</font> [{<font color="#009900">Key</font>, <font color="#009900">Value</font>}]
+<font color="#009900">Quality</font> <font color="#990000">::</font> <font color="#993399">0</font><font color="#990000">..</font><font color="#993399">1000</font>
+<font color="#009900">AcceptExt</font> <font color="#990000">::</font> [<font color="#009900">Key</font> | {<font color="#009900">Key</font>, <font color="#009900">Value</font>}]
+<font color="#009900">Key</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case insensitive</font></i>
+<font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case sensitive</font></i></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">accept-charset, accept-encoding and accept-language</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">parse_header</span></span>(<span style="color: #009900">Name</span>, <span style="color: #009900">Req</span>) <span style="color: #990000">-&gt;</span> [{<span style="color: #009900">Value</span>, <span style="color: #009900">Quality</span>}]
-
-<span style="color: #009900">Name</span> <span style="color: #990000">::</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"accept-charset"</span><span style="color: #990000">&gt;&gt;</span>
- | <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"accept-encoding"</span><span style="color: #990000">&gt;&gt;</span>
- | <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"accept-language"</span><span style="color: #990000">&gt;&gt;</span>
-<span style="color: #009900">Value</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 insensitive</span></span>
-<span style="color: #009900">Quality</span> <span style="color: #990000">::</span> <span style="color: #993399">0</span><span style="color: #990000">..</span><span style="color: #993399">1000</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">authorization</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">parse_header</font></b>(<font color="#009900">Name</font>, <font color="#009900">Req</font>) <font color="#990000">-&gt;</font> [{<font color="#009900">Value</font>, <font color="#009900">Quality</font>}]
+
+<font color="#009900">Name</font> <font color="#990000">::</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"accept-charset"</font><font color="#990000">&gt;&gt;</font>
+ | <font color="#990000">&lt;&lt;</font><font color="#FF0000">"accept-encoding"</font><font color="#990000">&gt;&gt;</font>
+ | <font color="#990000">&lt;&lt;</font><font color="#FF0000">"accept-language"</font><font color="#990000">&gt;&gt;</font>
+<font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case insensitive</font></i>
+<font color="#009900">Quality</font> <font color="#990000">::</font> <font color="#993399">0</font><font color="#990000">..</font><font color="#993399">1000</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">authorization</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">parse_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"authorization"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req</span>)
- <span style="color: #990000">-&gt;</span> {<span style="color: #FF6600">basic</span>, <span style="color: #009900">Username</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="color: #009900">Password</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()}
- | {<span style="color: #FF6600">bearer</span>, <span style="color: #009900">Token</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()}
- | {<span style="color: #FF6600">digest</span>, [{<span style="color: #009900">Key</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="color: #009900">Value</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()}]}</tt></pre></div></div>
-<div class="listingblock">
-<div class="title">content-length</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">parse_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"authorization"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>)
+ <font color="#990000">-&gt;</font> {<font color="#FF6600">basic</font>, <font color="#009900">Username</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">Password</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()}
+ | {<font color="#FF6600">bearer</font>, <font color="#009900">Token</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()}
+ | {<font color="#FF6600">digest</font>, [{<font color="#009900">Key</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()}]}</tt></pre>
+</div></div>
+<!-- @todo Currently also parses connection. Do we want this? Should it be documented? Use case?-->
+<div class="listingblock"><div class="title">content-length</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">parse_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">-&gt;</span> <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>When the content-length header is missing, <code>0</code> is returned.</p></div>
-<div class="listingblock">
-<div class="title">content-type</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">parse_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-length"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>) <font color="#990000">-&gt;</font> <b><font color="#000000">non_neg_integer</font></b>()</tt></pre>
+</div></div>
+<p>When the content-length header is missing, <code>0</code> is returned.</p>
+<div class="listingblock"><div class="title">content-type</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">parse_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req</span>)
- <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Type</span>, <span style="color: #009900">SubType</span>, <span style="color: #009900">Params</span>}
-
-<span style="color: #009900">Type</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 insensitive</span></span>
-<span style="color: #009900">SubType</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 insensitive</span></span>
-<span style="color: #009900">Params</span> <span style="color: #990000">::</span> [{<span style="color: #009900">Key</span>, <span style="color: #009900">Value</span>}]
-<span style="color: #009900">Key</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 insensitive</span></span>
-<span style="color: #009900">Value</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></tt></pre></div></div>
-<div class="paragraph"><p>Note that the value for the charset parameter is case insensitive
-and returned as a lowercase binary string.</p></div>
-<div class="listingblock">
-<div class="title">cookie</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">parse_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>)
+ <font color="#990000">-&gt;</font> {<font color="#009900">Type</font>, <font color="#009900">SubType</font>, <font color="#009900">Params</font>}
+
+<font color="#009900">Type</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case insensitive</font></i>
+<font color="#009900">SubType</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case insensitive</font></i>
+<font color="#009900">Params</font> <font color="#990000">::</font> [{<font color="#009900">Key</font>, <font color="#009900">Value</font>}]
+<font color="#009900">Key</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case insensitive</font></i>
+<font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case sensitive;</font></i></tt></pre>
+</div></div>
+<p>Note that the value for the charset parameter is case insensitive and returned as a lowercase binary string.</p>
+<div class="listingblock"><div class="title">cookie</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">parse_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"cookie"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req</span>) <span style="color: #990000">-&gt;</span> [{<span style="color: #009900">Name</span>, <span style="color: #009900">Value</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="font-style: italic"><span style="color: #9A1900">%% case sensitive</span></span>
-<span style="color: #009900">Value</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></tt></pre></div></div>
-<div class="paragraph"><p>When the cookie header is missing, <code>[]</code> is returned.</p></div>
-<div class="paragraph"><p>While an empty cookie header is not valid, some clients do
-send it. Cowboy will in this case also return <code>[]</code>.</p></div>
-<div class="listingblock">
-<div class="title">expect</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">parse_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"cookie"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>) <font color="#990000">-&gt;</font> [{<font color="#009900">Name</font>, <font color="#009900">Value</font>}]
+
+<font color="#009900">Name</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case sensitive</font></i>
+<font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case sensitive</font></i></tt></pre>
+</div></div>
+<p>When the cookie header is missing, <code>[]</code> is returned.</p>
+<p>While an empty cookie header is not valid, some clients do send it. Cowboy will in this case also return <code>[]</code>.</p>
+<div class="listingblock"><div class="title">expect</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">parse_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"expect"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req</span>) <span style="color: #990000">-&gt;</span> <span style="color: #FF6600">continue</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">if-match and if-none-match</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">parse_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"expect"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>) <font color="#990000">-&gt;</font> <font color="#FF6600">continue</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">if-match and if-none-match</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">parse_header</span></span>(<span style="color: #009900">Name</span>, <span style="color: #009900">Req</span>)
- <span style="color: #990000">-&gt;</span> <span style="color: #FF6600">'*'</span> | [{<span style="color: #FF6600">weak</span> | <span style="color: #FF6600">strong</span>, <span style="color: #009900">OpaqueTag</span>}]
-
-<span style="color: #009900">Name</span> <span style="color: #990000">::</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"if-match"</span><span style="color: #990000">&gt;&gt;</span>
- | <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"if-none-match"</span><span style="color: #990000">&gt;&gt;</span>
-<span style="color: #009900">OpaqueTag</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></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">if-modified-since and if-unmodified-since</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">parse_header</font></b>(<font color="#009900">Name</font>, <font color="#009900">Req</font>)
+ <font color="#990000">-&gt;</font> <font color="#FF6600">'*'</font> | [{<font color="#FF6600">weak</font> | <font color="#FF6600">strong</font>, <font color="#009900">OpaqueTag</font>}]
+
+<font color="#009900">Name</font> <font color="#990000">::</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"if-match"</font><font color="#990000">&gt;&gt;</font>
+ | <font color="#990000">&lt;&lt;</font><font color="#FF0000">"if-none-match"</font><font color="#990000">&gt;&gt;</font>
+<font color="#009900">OpaqueTag</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case sensitive</font></i></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">if-modified-since and if-unmodified-since</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">parse_header</span></span>(<span style="color: #009900">Name</span>, <span style="color: #009900">Req</span>) <span style="color: #990000">-&gt;</span> <span style="font-weight: bold"><span style="color: #000000">calendar:datetime</span></span>()</tt></pre></div></div>
-<div class="listingblock">
-<div class="title">range</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">parse_header</font></b>(<font color="#009900">Name</font>, <font color="#009900">Req</font>) <font color="#990000">-&gt;</font> <b><font color="#000000">calendar:datetime</font></b>()</tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">range</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">parse_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"range"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">From</span>, <span style="color: #009900">To</span>} | <span style="color: #009900">Final</span>
-
-<span style="color: #009900">From</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>()
-<span style="color: #009900">To</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>() | <span style="color: #FF6600">infinity</span>
-<span style="color: #009900">Final</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">neg_integer</span></span>()</tt></pre></div></div>
-<div class="listingblock">
-<div class="title">sec-websocket-extensions</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">parse_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"range"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>) <font color="#990000">-&gt;</font> {<font color="#009900">From</font>, <font color="#009900">To</font>} | <font color="#009900">Final</font>
+
+<font color="#009900">From</font> <font color="#990000">::</font> <b><font color="#000000">non_neg_integer</font></b>()
+<font color="#009900">To</font> <font color="#990000">::</font> <b><font color="#000000">non_neg_integer</font></b>() | <font color="#FF6600">infinity</font>
+<font color="#009900">Final</font> <font color="#990000">::</font> <b><font color="#000000">neg_integer</font></b>()</tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">sec-websocket-extensions</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">parse_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"sec-websocket-extensions"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req</span>)
- <span style="color: #990000">-&gt;</span> [{<span style="color: #009900">Extension</span>, <span style="color: #009900">Params</span>}]
-
-<span style="color: #009900">Extension</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: #009900">Params</span> <span style="color: #990000">::</span> [<span style="color: #009900">Key</span> | {<span style="color: #009900">Key</span>, <span style="color: #009900">Value</span>}]
-<span style="color: #009900">Key</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: #009900">Value</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></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">sec-websocket-protocol and upgrade</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">parse_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"sec-websocket-extensions"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>)
+ <font color="#990000">-&gt;</font> [{<font color="#009900">Extension</font>, <font color="#009900">Params</font>}]
+
+<font color="#009900">Extension</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case sensitive</font></i>
+<font color="#009900">Params</font> <font color="#990000">::</font> [<font color="#009900">Key</font> | {<font color="#009900">Key</font>, <font color="#009900">Value</font>}]
+<font color="#009900">Key</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case sensitive</font></i>
+<font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case sensitive</font></i></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">sec-websocket-protocol and upgrade</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">parse_header</span></span>(<span style="color: #009900">Name</span>, <span style="color: #009900">Req</span>) <span style="color: #990000">-&gt;</span> [<span style="color: #009900">Token</span>]
-
-<span style="color: #009900">Name</span> <span style="color: #990000">::</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"sec-websocket-protocol"</span><span style="color: #990000">&gt;&gt;</span>
- | <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"upgrade"</span><span style="color: #990000">&gt;&gt;</span>
-<span style="color: #009900">Token</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 insensitive</span></span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">x-forwarded-for</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">parse_header</font></b>(<font color="#009900">Name</font>, <font color="#009900">Req</font>) <font color="#990000">-&gt;</font> [<font color="#009900">Token</font>]
+
+<font color="#009900">Name</font> <font color="#990000">::</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"sec-websocket-protocol"</font><font color="#990000">&gt;&gt;</font>
+ | <font color="#990000">&lt;&lt;</font><font color="#FF0000">"upgrade"</font><font color="#990000">&gt;&gt;</font>
+<font color="#009900">Token</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case insensitive</font></i></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">x-forwarded-for</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">parse_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"x-forwarded-for"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req</span>) <span style="color: #990000">-&gt;</span> [<span style="color: #009900">Token</span>]
+<pre><tt><b><font color="#000000">parse_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"x-forwarded-for"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>) <font color="#990000">-&gt;</font> [<font color="#009900">Token</font>]
-<span style="color: #009900">Token</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></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Unknown headers</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<font color="#009900">Token</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case sensitive</font></i></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Unknown 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="font-weight: bold"><span style="color: #000000">parse_header</span></span>(<span style="color: #990000">_</span>, <span style="color: #009900">Req</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #000080">undefined</span>, <span style="color: #009900">RawValue</span>}</tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">parse_header</font></b>(<font color="#990000">_</font>, <font color="#009900">Req</font>) <font color="#990000">-&gt;</font> {<font color="#000080">undefined</font>, <font color="#009900">RawValue</font>}</tt></pre>
+</div></div>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Only the parsed header value is returned, it is no longer wrapped in a tuple.
-</p>
+<ul><li><strong>2.0</strong>: Only the parsed header value is returned, it is no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Parse the accept header with a custom default value</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Parse the accept header with a custom 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="font-style: italic"><span style="color: #9A1900">%% Accept everything when header is missing.</span></span>
-<span style="color: #009900">Accept</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:parse_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">&lt;&lt;</span><span style="color: #FF0000">"*"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"*"</span><span style="color: #990000">&gt;&gt;</span>, []}, <span style="color: #993399">1000</span>, []}])<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Parse the content-length header</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><i><font color="#9A1900">%% Accept everything when header is missing.</font></i>
+<font color="#009900">Accept</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:parse_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"accept"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>,
+ [{{ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"*"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"*"</font><font color="#990000">&gt;&gt;</font>, []}, <font color="#993399">1000</font>, []}])<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Parse the content-length 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">%% Default content-length is 0.</span></span>
-<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">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><i><font color="#9A1900">%% Default content-length is 0.</font></i>
+<font color="#009900">Length</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-length"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.headers">cowboy_req:headers(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.header">cowboy_req:header(3)</a>, <a href="../cowboy_req.headers">cowboy_req:headers(3)</a></p>
+
diff --git a/docs/en/cowboy/2.2/manual/cowboy_req.parse_qs/index.html b/docs/en/cowboy/2.2/manual/cowboy_req.parse_qs/index.html
index c84422d6..83448f19 100644
--- a/docs/en/cowboy/2.2/manual/cowboy_req.parse_qs/index.html
+++ b/docs/en/cowboy/2.2/manual/cowboy_req.parse_qs/index.html
@@ -62,117 +62,55 @@
<h1 class="lined-header"><span>cowboy_req:parse_qs(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:parse_qs - Parse the query string</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:parse_qs - Parse the query string</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">parse_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">Key</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="color: #009900">Value</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>() | <span style="color: #000080">true</span>}]</tt></pre></div></div>
-<div class="paragraph"><p>Parse the query string as a list of key/value pairs.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">parse_qs</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> [{<font color="#009900">Key</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() | <font color="#000080">true</font>}]</tt></pre>
+</div></div>
+<p>Parse the query string as a list of key/value pairs.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The parsed query string is returned as a list of key/value pairs.
-The key is a binary string. The value is either a binary string,
-or the atom <code>true</code>. Both key and value are case sensitive.</p></div>
-<div class="paragraph"><p>The atom <code>true</code> is returned when a key is present in the query
-string without a value. For example, in the following URIs
-the key <code>&lt;&lt;"edit"&gt;&gt;</code> will always have the value <code>true</code>:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<code>/posts/42?edit</code>
-</p>
+<p>The parsed query string is returned as a list of key/value pairs. The key is a binary string. The value is either a binary string, or the atom <code>true</code>. Both key and value are case sensitive.</p>
+<p>The atom <code>true</code> is returned when a key is present in the query string without a value. For example, in the following URIs the key <code>&lt;&lt;&quot;edit&quot;&gt;&gt;</code> will always have the value <code>true</code>:</p>
+<ul><li><code>/posts/42?edit</code>
</li>
-<li>
-<p>
-<code>/posts/42?edit&amp;exclusive=1</code>
-</p>
+<li><code>/posts/42?edit&amp;exclusive=1</code>
</li>
-<li>
-<p>
-<code>/posts/42?exclusive=1&amp;edit</code>
-</p>
+<li><code>/posts/42?exclusive=1&amp;edit</code>
</li>
-<li>
-<p>
-<code>/posts/42?exclusive=1&amp;edit&amp;from=web</code>
-</p>
+<li><code>/posts/42?exclusive=1&amp;edit&amp;from=web</code>
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: The parsed value is not longer cached in the Req object.
-</p>
+<ul><li><strong>2.0</strong>: The parsed value is not longer cached in the Req object.
</li>
-<li>
-<p>
-<strong>2.0</strong>: Only the parsed query string is returned, it is no longer wrapped in a tuple.
-</p>
+<li><strong>2.0</strong>: Only the parsed query string is returned, it is no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced. Replaces <code>qs_val/1</code> and <code>qs_vals/1</code>.
-</p>
+<li><strong>2.0</strong>: Function introduced. Replaces <code>qs_val/1</code> and <code>qs_vals/1</code>.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Parse the query string and convert the keys to atoms</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Parse the query string and convert the keys to atoms</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">ParsedQs</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:parse_qs</span></span>(<span style="color: #009900">Req</span>),
-<span style="color: #009900">AtomsQs</span> <span style="color: #990000">=</span> [{<span style="font-weight: bold"><span style="color: #000000">binary_to_existing_atom</span></span>(<span style="color: #009900">K</span>, <span style="color: #FF6600">latin1</span>), <span style="color: #009900">V</span>}
- || {<span style="color: #009900">K</span>, <span style="color: #009900">V</span>} <span style="color: #990000">&lt;-</span> <span style="color: #009900">ParsedQs</span>]<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">ParsedQs</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:parse_qs</font></b>(<font color="#009900">Req</font>),
+<font color="#009900">AtomsQs</font> <font color="#990000">=</font> [{<b><font color="#000000">binary_to_existing_atom</font></b>(<font color="#009900">K</font>, <font color="#FF6600">latin1</font>), <font color="#009900">V</font>}
+ || {<font color="#009900">K</font>, <font color="#009900">V</font>} <font color="#990000">&lt;-</font> <font color="#009900">ParsedQs</font>]<font color="#990000">.</font></tt></pre>
+</div></div>
<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.qs">cowboy_req:qs(3)</a>,
-<a href="../cowboy_req.match_qs">cowboy_req:match_qs(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.qs">cowboy_req:qs(3)</a>, <a href="../cowboy_req.match_qs">cowboy_req:match_qs(3)</a></p>
+
diff --git a/docs/en/cowboy/2.2/manual/cowboy_req.path/index.html b/docs/en/cowboy/2.2/manual/cowboy_req.path/index.html
index 90c16d36..b4219182 100644
--- a/docs/en/cowboy/2.2/manual/cowboy_req.path/index.html
+++ b/docs/en/cowboy/2.2/manual/cowboy_req.path/index.html
@@ -62,90 +62,47 @@
<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">
+<p>cowboy_req:path - URI path</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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
+<pre><tt><b><font color="#000000">path</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <font color="#009900">Path</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()</tt></pre>
+</div></div>
+<p>Return the path of the effective request URI.</p>
+<p>The path can also be obtained using pattern matching:</p>
+<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">
+<pre><tt>#{<font color="#FF6600">path</font> <font color="#990000">:=</font> <font color="#009900">Path</font>} <font color="#990000">=</font> <font color="#009900">Req</font><font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<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">
+<p>The path is returned as a binary string. It is case sensitive.</p>
<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>
+<ul><li><strong>2.0</strong>: Only the path is returned, it is no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<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
+<div class="listingblock"><div class="title">Get the effective request URI&apos;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">
+<pre><tt><font color="#009900">Path</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:path</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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>
+<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>
+
diff --git a/docs/en/cowboy/2.2/manual/cowboy_req.path_info/index.html b/docs/en/cowboy/2.2/manual/cowboy_req.path_info/index.html
index 1b37b068..7aa33df4 100644
--- a/docs/en/cowboy/2.2/manual/cowboy_req.path_info/index.html
+++ b/docs/en/cowboy/2.2/manual/cowboy_req.path_info/index.html
@@ -62,87 +62,41 @@
<h1 class="lined-header"><span>cowboy_req:path_info(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:path_info - Access the route&#8217;s trailing path segments</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:path_info - Access the route&apos;s trailing path segments</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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_info</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_router:tokens</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Return the tokens for the trailing path segments.</p></div>
-<div class="paragraph"><p>This is the part of the host name that was matched using
-the <code>...</code> notation.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">path_info</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <b><font color="#000000">cowboy_router:tokens</font></b>()</tt></pre>
+</div></div>
+<p>Return the tokens for the trailing path segments.</p>
+<p>This is the part of the host name that was matched using the <code>...</code> notation.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The tokens are returned as a list of case sensitive
-binary strings.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The tokens are returned as a list of case sensitive binary strings.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Only the tokens are returned, they are no longer wrapped in a tuple.
-</p>
+<ul><li><strong>2.0</strong>: Only the tokens are returned, they are no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Get the path_info tokens</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Get the path_info tokens</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">PathInfo</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:path_info</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">PathInfo</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:path_info</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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>,
-<a href="../cowboy_router">cowboy_router(3)</a></p></div>
-</div>
-</div>
+<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>, <a href="../cowboy_router">cowboy_router(3)</a></p>
+
diff --git a/docs/en/cowboy/2.2/manual/cowboy_req.peer/index.html b/docs/en/cowboy/2.2/manual/cowboy_req.peer/index.html
index 398e38d7..c57fdc74 100644
--- a/docs/en/cowboy/2.2/manual/cowboy_req.peer/index.html
+++ b/docs/en/cowboy/2.2/manual/cowboy_req.peer/index.html
@@ -62,98 +62,51 @@
<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">
+<p>cowboy_req:peer - Peer address and port</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">Info</span>
+<pre><tt><b><font color="#000000">peer</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <font color="#009900">Info</font>
-<span style="color: #009900">Info</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 information can also be obtained using pattern matching:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<font color="#009900">Info</font> <font color="#990000">::</font> {<b><font color="#000000">inet:ip_address</font></b>(), <b><font color="#000000">inet:port_number</font></b>()}</tt></pre>
+</div></div>
+<p>Return the peer&apos;s IP address and port number.</p>
+<p>The peer information can also be obtained using pattern matching:</p>
+<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">
+<pre><tt>#{<font color="#FF6600">peer</font> <font color="#990000">:=</font> {<font color="#009900">IP</font>, <font color="#009900">Port</font>}} <font color="#990000">=</font> <font color="#009900">Req</font><font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<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">
+<p>The peer&apos;s IP address and port number.</p>
+<p>The peer is not necessarily the client&apos;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>
+<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>
<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>
+<ul><li><strong>2.0</strong>: Only the peer is returned, it is no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<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
+<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">
+<pre><tt>{<font color="#009900">IP</font>, <font color="#009900">Port</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:peer</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.sock">cowboy_req:sock(3)</a>,
-<a href="../cowboy_req.cert">cowboy_req:cert(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.sock">cowboy_req:sock(3)</a>, <a href="../cowboy_req.cert">cowboy_req:cert(3)</a></p>
+
diff --git a/docs/en/cowboy/2.2/manual/cowboy_req.port/index.html b/docs/en/cowboy/2.2/manual/cowboy_req.port/index.html
index 93e0a841..d673b554 100644
--- a/docs/en/cowboy/2.2/manual/cowboy_req.port/index.html
+++ b/docs/en/cowboy/2.2/manual/cowboy_req.port/index.html
@@ -62,90 +62,48 @@
<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">
+<p>cowboy_req:port - URI port number</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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
+<pre><tt><b><font color="#000000">port</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <font color="#009900">Port</font> <font color="#990000">::</font> <b><font color="#000000">inet:port_number</font></b>()</tt></pre>
+</div></div>
+<p>Return the port number of the effective request URI.</p>
+<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>
+<p>The port number can also be obtained using pattern matching:</p>
+<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">
+<pre><tt>#{<font color="#FF6600">port</font> <font color="#990000">:=</font> <font color="#009900">Port</font>} <font color="#990000">=</font> <font color="#009900">Req</font><font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<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">
+<p>The port number is returned as an integer.</p>
<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>
+<ul><li><strong>2.0</strong>: Only the port number is returned, it is no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<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
+<div class="listingblock"><div class="title">Get the effective request URI&apos;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">
+<pre><tt><font color="#009900">Port</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:port</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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>
+<p><a href="../cowboy_req">cowboy_req(3)</a></p>
+
diff --git a/docs/en/cowboy/2.2/manual/cowboy_req.push/index.html b/docs/en/cowboy/2.2/manual/cowboy_req.push/index.html
index 15621773..b896b53b 100644
--- a/docs/en/cowboy/2.2/manual/cowboy_req.push/index.html
+++ b/docs/en/cowboy/2.2/manual/cowboy_req.push/index.html
@@ -62,142 +62,74 @@
<h1 class="lined-header"><span>cowboy_req:push(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:push - Push a resource to the client</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:push - Push a resource to the client</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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</span></span>(<span style="color: #009900">Path</span>, <span style="color: #009900">Headers</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">push</span></span>(<span style="color: #009900">Path</span>, <span style="color: #009900">Headers</span>, <span style="color: #009900">Req</span>, #{})
-
-<span style="font-weight: bold"><span style="color: #000000">push</span></span>(<span style="color: #009900">Path</span>, <span style="color: #009900">Headers</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: #FF6600">ok</span>
-
-<span style="color: #009900">Path</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>() <span style="font-style: italic"><span style="color: #9A1900">%% case sensitive</span></span>
-<span style="color: #009900">Headers</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:http_headers</span></span>()
-<span style="color: #009900">Opts</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:push_opts</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Push a resource to the client.</p></div>
-<div class="paragraph"><p>Cowboy handles push requests the same way as if they came
-from the client, including the creation of a request handling
-process, routing and middlewares and so on.</p></div>
-<div class="paragraph"><p>This function does nothing when the HTTP/1.1 protocol is
-used. You may call it safely without first checking whether
-the connection uses HTTP/2.</p></div>
-<div class="paragraph"><p>The header names must be given as lowercase binary strings.
-While header names are case insensitive, Cowboy requires them
-to be given as lowercase to function properly.</p></div>
-<div class="paragraph"><p>Note that the headers must be the headers the client is expected
-to send if it were to perform the request. They are therefore
-request headers, and not response headers.</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. You can override them by passing options.</p></div>
-<div class="paragraph"><p>It is not possible to push resources after sending a response.
-Any attempt will result in an error.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">push</font></b>(<font color="#009900">Path</font>, <font color="#009900">Headers</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> <b><font color="#000000">push</font></b>(<font color="#009900">Path</font>, <font color="#009900">Headers</font>, <font color="#009900">Req</font>, #{})
+
+<b><font color="#000000">push</font></b>(<font color="#009900">Path</font>, <font color="#009900">Headers</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>(), <font color="#009900">Opts</font>)
+ <font color="#990000">-&gt;</font> <font color="#FF6600">ok</font>
+
+<font color="#009900">Path</font> <font color="#990000">::</font> <b><font color="#000000">iodata</font></b>() <i><font color="#9A1900">%% case sensitive</font></i>
+<font color="#009900">Headers</font> <font color="#990000">::</font> <b><font color="#000000">cowboy:http_headers</font></b>()
+<font color="#009900">Opts</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:push_opts</font></b>()</tt></pre>
+</div></div>
+<p>Push a resource to the client.</p>
+<p>Cowboy handles push requests the same way as if they came from the client, including the creation of a request handling process, routing and middlewares and so on.</p>
+<p>This function does nothing when the HTTP/1.1 protocol is used. You may call it safely without first checking whether the connection uses HTTP/2.</p>
+<p>The header names must be given as lowercase binary strings. While header names are case insensitive, Cowboy requires them to be given as lowercase to function properly.</p>
+<p>Note that the headers must be the headers the client is expected to send if it were to perform the request. They are therefore request headers, and not response headers.</p>
+<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&apos;s URI. You can override them by passing options.</p>
+<p>It is not possible to push resources after sending a response. Any attempt will result in an error.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Path
-</dt>
-<dd>
-<p>
-The status code for the response.
-</p>
+<dl><dt>Path</dt>
+<dd><p>The status code for the response.</p>
</dd>
-<dt class="hdlist1">
-Headers
-</dt>
-<dd>
-<p>
-The response headers.
-</p>
+<dt>Headers</dt>
+<dd><p>The response headers.</p>
</dd>
-</dl></div>
-<div class="paragraph"><p>Header names must be given as lowercase binary strings.</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+</dl>
+<p>Header names must be given as lowercase binary strings.</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-<dt class="hdlist1">
-Opts
-</dt>
-<dd>
-<p>
-Customize the HTTP method or the URI scheme, host, port
-or query string.
-</p>
+<dt>Opts</dt>
+<dd><p>Customize the HTTP method or the URI scheme, host, port or query string.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The atom <code>ok</code> is always returned. It can be safely ignored.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The atom <code>ok</code> is always returned. It can be safely ignored.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced.
-</p>
+<ul><li><strong>2.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Push a resource</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Push a resource</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">cowboy_req:push</span></span>(<span style="color: #FF0000">"/static/style.css"</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"accept"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/css"</span><span style="color: #990000">&gt;&gt;</span>
-}, <span style="color: #009900">Req</span>),</tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Push a resource with a custom host</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">cowboy_req:push</font></b>(<font color="#FF0000">"/static/style.css"</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"accept"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/css"</font><font color="#990000">&gt;&gt;</font>
+}, <font color="#009900">Req</font>),</tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Push a resource with a custom host</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">cowboy_req:push</span></span>(<span style="color: #FF0000">"/static/style.css"</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"accept"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/css"</span><span style="color: #990000">&gt;&gt;</span>
-}, #{<span style="color: #0000FF">host</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"cdn.example.org"</span><span style="color: #990000">&gt;&gt;</span>}, <span style="color: #009900">Req</span>),</tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">cowboy_req:push</font></b>(<font color="#FF0000">"/static/style.css"</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"accept"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/css"</font><font color="#990000">&gt;&gt;</font>
+}, #{<font color="#0000FF">host</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"cdn.example.org"</font><font color="#990000">&gt;&gt;</font>}, <font color="#009900">Req</font>),</tt></pre>
+</div></div>
<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.inform">cowboy_req:inform(3)</a>,
-<a href="../cowboy_req.reply">cowboy_req:reply(3)</a>,
-<a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.inform">cowboy_req:inform(3)</a>, <a href="../cowboy_req.reply">cowboy_req:reply(3)</a>, <a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a></p>
+
diff --git a/docs/en/cowboy/2.2/manual/cowboy_req.qs/index.html b/docs/en/cowboy/2.2/manual/cowboy_req.qs/index.html
index e4d52bab..13c577db 100644
--- a/docs/en/cowboy/2.2/manual/cowboy_req.qs/index.html
+++ b/docs/en/cowboy/2.2/manual/cowboy_req.qs/index.html
@@ -62,89 +62,47 @@
<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">
+<p>cowboy_req:qs - URI query string</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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
+<pre><tt><b><font color="#000000">qs</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <font color="#009900">Qs</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()</tt></pre>
+</div></div>
+<p>Return the query string of the effective request URI.</p>
+<p>The query string can also be obtained using pattern matching:</p>
+<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">
+<pre><tt>#{<font color="#FF6600">qs</font> <font color="#990000">:=</font> <font color="#009900">Qs</font>} <font color="#990000">=</font> <font color="#009900">Req</font><font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<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">
+<p>The query string is returned as a binary string. It is case sensitive.</p>
<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>
+<ul><li><strong>2.0</strong>: Only the query string is returned, it is no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<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
+<div class="listingblock"><div class="title">Get the effective request URI&apos;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">
+<pre><tt><font color="#009900">Qs</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:qs</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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>
+<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>
+
diff --git a/docs/en/cowboy/2.2/manual/cowboy_req.read_body/index.html b/docs/en/cowboy/2.2/manual/cowboy_req.read_body/index.html
index 830c6c10..4330cee2 100644
--- a/docs/en/cowboy/2.2/manual/cowboy_req.read_body/index.html
+++ b/docs/en/cowboy/2.2/manual/cowboy_req.read_body/index.html
@@ -62,143 +62,72 @@
<h1 class="lined-header"><span>cowboy_req:read_body(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:read_body - Read the request body</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:read_body - Read the request body</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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</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">read_body</span></span>(<span style="color: #009900">Req</span>, #{})
-
-<span style="font-weight: bold"><span style="color: #000000">read_body</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: #FF6600">ok</span>, <span style="color: #009900">Data</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: #FF6600">more</span>, <span style="color: #009900">Data</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">Opts</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:read_body_opts</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Read the request body.</p></div>
-<div class="paragraph"><p>This function reads a chunk of the request body. A <code>more</code> tuple
-is returned when more data remains to be read. Call the function
-repeatedly until an <code>ok</code> tuple is returned to read the entire body.</p></div>
-<div class="paragraph"><p>An <code>ok</code> tuple with empty data is returned when the request has no body,
-or when calling this function again after the body has already
-been read. It is therefore safe to call this function directly.
-Note that the body can only be read once.</p></div>
-<div class="paragraph"><p>This function reads the request body from the connection process.
-The connection process is responsible for reading from the socket.
-The exact behavior varies depending on the protocol.</p></div>
-<div class="paragraph"><p>The options therefore are only related to the communication
-between the request process and the connection process.</p></div>
-<div class="paragraph"><p>Cowboy will automatically handle protocol details including
-the expect header, chunked transfer-encoding and others.</p></div>
-<div class="paragraph"><p>Once the body has been read fully, Cowboy sets the content-length
-header if it was not previously provided.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">read_body</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> <b><font color="#000000">read_body</font></b>(<font color="#009900">Req</font>, #{})
+
+<b><font color="#000000">read_body</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>(), <font color="#009900">Opts</font>)
+ <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <font color="#009900">Data</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">Req</font>}
+ | {<font color="#FF6600">more</font>, <font color="#009900">Data</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">Req</font>}
+
+<font color="#009900">Opts</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:read_body_opts</font></b>()</tt></pre>
+</div></div>
+<p>Read the request body.</p>
+<p>This function reads a chunk of the request body. A <code>more</code> tuple is returned when more data remains to be read. Call the function repeatedly until an <code>ok</code> tuple is returned to read the entire body.</p>
+<p>An <code>ok</code> tuple with empty data is returned when the request has no body, or when calling this function again after the body has already been read. It is therefore safe to call this function directly. Note that the body can only be read once.</p>
+<p>This function reads the request body from the connection process. The connection process is responsible for reading from the socket. The exact behavior varies depending on the protocol.</p>
+<p>The options therefore are only related to the communication between the request process and the connection process.</p>
+<p>Cowboy will automatically handle protocol details including the expect header, chunked transfer-encoding and others.</p>
+<p>Once the body has been read fully, Cowboy sets the content-length header if it was not previously provided.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-<dt class="hdlist1">
-Opts
-</dt>
-<dd>
-<p>
-A map of body reading options.
-</p>
-<div class="paragraph"><p>The <code>length</code> option can be used to request smaller or bigger
-chunks of data to be sent. It is a best effort approach, Cowboy
-may send more data than configured on occasions. It defaults
-to 8MB.</p></div>
-<div class="paragraph"><p>The <code>period</code> indicates how long the connection process will wait
-before it provides us with the data it received. It defaults
-to 15 seconds.</p></div>
-<div class="paragraph"><p>The connection process sends data to the request process when
-either the <code>length</code> of data or the <code>period</code> of time is reached.</p></div>
-<div class="paragraph"><p>The <code>timeout</code> option is a safeguard in case the connection
-process becomes unresponsive. The function will crash if no
-message was received in that interval. The timeout should be
-larger than the period. It defaults to the period + 1 second.</p></div>
+<dt>Opts</dt>
+<dd><p>A map of body reading options.</p>
+<p>The <code>length</code> option can be used to request smaller or bigger chunks of data to be sent. It is a best effort approach, Cowboy may send more data than configured on occasions. It defaults to 8MB.</p>
+<p>The <code>period</code> indicates how long the connection process will wait before it provides us with the data it received. It defaults to 15 seconds.</p>
+<p>The connection process sends data to the request process when either the <code>length</code> of data or the <code>period</code> of time is reached.</p>
+<p>The <code>timeout</code> option is a safeguard in case the connection process becomes unresponsive. The function will crash if no message was received in that interval. The timeout should be larger than the period. It defaults to the period<br/> 1 second.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A <code>more</code> tuple is returned when there are more data to be read.</p></div>
-<div class="paragraph"><p>An <code>ok</code> tuple is returned when there are no more data to be read,
-either because this is the last chunk of data, the body has already
-been read, or there was no body to begin with.</p></div>
-<div class="paragraph"><p>The data is always returned as a binary.</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.
-For example it may have an added content-length header once the
-body has been read.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>A <code>more</code> tuple is returned when there are more data to be read.</p>
+<p>An <code>ok</code> tuple is returned when there are no more data to be read, either because this is the last chunk of data, the body has already been read, or there was no body to begin with.</p>
+<p>The data is always returned as a binary.</p>
+<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. For example it may have an added content-length header once the body has been read.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced. Replaces <code>body/1,2</code>.
-</p>
+<ul><li><strong>2.0</strong>: Function introduced. Replaces <code>body/1,2</code>.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Read the entire body</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Read the entire body</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">read_body</span></span>(<span style="color: #009900">Req0</span>, <span style="color: #009900">Acc</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">cowboy_req:read_body</span></span>(<span style="color: #009900">Req0</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Data</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">-&gt;</span> {<span style="color: #FF6600">ok</span>, <span style="color: #990000">&lt;&lt;</span> <span style="color: #009900">Acc</span><span style="color: #990000">/</span><span style="font-weight: bold"><span style="color: #000080">binary</span></span>, <span style="color: #009900">Data</span><span style="color: #990000">/</span><span style="font-weight: bold"><span style="color: #000080">binary</span></span> <span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req</span>};
- {<span style="color: #FF6600">more</span>, <span style="color: #009900">Data</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">-&gt;</span> <span style="font-weight: bold"><span style="color: #000000">read_body</span></span>(<span style="color: #009900">Req</span>, <span style="color: #990000">&lt;&lt;</span> <span style="color: #009900">Acc</span><span style="color: #990000">/</span><span style="font-weight: bold"><span style="color: #000080">binary</span></span>, <span style="color: #009900">Data</span><span style="color: #990000">/</span><span style="font-weight: bold"><span style="color: #000080">binary</span></span> <span style="color: #990000">&gt;&gt;</span>)
- <span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Read the body in small chunks</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">read_body</font></b>(<font color="#009900">Req0</font>, <font color="#009900">Acc</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">case</font></b> <b><font color="#000000">cowboy_req:read_body</font></b>(<font color="#009900">Req0</font>) <b><font color="#0000FF">of</font></b>
+ {<font color="#FF6600">ok</font>, <font color="#009900">Data</font>, <font color="#009900">Req</font>} <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <font color="#990000">&lt;&lt;</font> <font color="#009900">Acc</font><font color="#990000">/</font><b><font color="#000080">binary</font></b>, <font color="#009900">Data</font><font color="#990000">/</font><b><font color="#000080">binary</font></b> <font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>};
+ {<font color="#FF6600">more</font>, <font color="#009900">Data</font>, <font color="#009900">Req</font>} <font color="#990000">-&gt;</font> <b><font color="#000000">read_body</font></b>(<font color="#009900">Req</font>, <font color="#990000">&lt;&lt;</font> <font color="#009900">Acc</font><font color="#990000">/</font><b><font color="#000080">binary</font></b>, <font color="#009900">Data</font><font color="#990000">/</font><b><font color="#000080">binary</font></b> <font color="#990000">&gt;&gt;</font>)
+ <b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Read the body in small chunks</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">cowboy_req:read_body</span></span>(<span style="color: #009900">Req</span>, #{<span style="font-weight: bold"><span style="color: #000080">length</span></span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">64000</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">cowboy_req:read_body</font></b>(<font color="#009900">Req</font>, #{<b><font color="#000080">length</font></b> <font color="#990000">=&gt;</font> <font color="#993399">64000</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
<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.has_body">cowboy_req:has_body(3)</a>,
-<a href="../cowboy_req.body_length">cowboy_req:body_length(3)</a>,
-<a href="../cowboy_req.read_urlencoded_body">cowboy_req:read_urlencoded_body(3)</a>,
-<a href="../cowboy_req.read_part">cowboy_req:read_part(3)</a>,
-<a href="../cowboy_req.read_part_body">cowboy_req:read_part_body(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.has_body">cowboy_req:has_body(3)</a>, <a href="../cowboy_req.body_length">cowboy_req:body_length(3)</a>, <a href="../cowboy_req.read_urlencoded_body">cowboy_req:read_urlencoded_body(3)</a>, <a href="../cowboy_req.read_part">cowboy_req:read_part(3)</a>, <a href="../cowboy_req.read_part_body">cowboy_req:read_part_body(3)</a></p>
+
diff --git a/docs/en/cowboy/2.2/manual/cowboy_req.read_part/index.html b/docs/en/cowboy/2.2/manual/cowboy_req.read_part/index.html
index 23a7d1bf..dd1976be 100644
--- a/docs/en/cowboy/2.2/manual/cowboy_req.read_part/index.html
+++ b/docs/en/cowboy/2.2/manual/cowboy_req.read_part/index.html
@@ -62,162 +62,94 @@
<h1 class="lined-header"><span>cowboy_req:read_part(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:read_part - Read the next multipart headers</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:read_part - Read the next multipart headers</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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_part</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">read_part</span></span>(<span style="color: #009900">Req</span>, #{})
-
-<span style="font-weight: bold"><span style="color: #000000">read_part</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: #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: #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
-their own headers and body. This function parses and returns
-headers. Examples of multipart media types are
-<code>multipart/form-data</code> and <code>multipart/byteranges</code>.</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>Cowboy will read the body before parsing in chunks of size
-up to 64KB, with a period of 5 seconds. This is tailored for
-reading part headers and might not be the most efficient for
-skipping the previous part&#8217;s body.</p></div>
-<div class="paragraph"><p>The headers returned are MIME headers, <strong>NOT</strong> 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 extract information from <code>multipart/form-data</code>
-representations.</p></div>
-<div class="paragraph"><p>Once a part has been read, it can not be read again.</p></div>
-<div class="paragraph"><p>Once the body has been read, Cowboy sets the content-length
-header if it was not previously provided.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">read_part</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> <b><font color="#000000">read_part</font></b>(<font color="#009900">Req</font>, #{})
+
+<b><font color="#000000">read_part</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>(), <font color="#009900">Opts</font>)
+ <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <font color="#009900">Headers</font>, <font color="#009900">Req</font>} | {<font color="#FF6600">done</font>, <font color="#009900">Req</font>}
+
+<font color="#009900">Opts</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:read_body_opts</font></b>()
+<font color="#009900">Headers</font> <font color="#990000">::</font> #{<b><font color="#000080">binary</font></b>() <font color="#990000">=&gt;</font> <b><font color="#000080">binary</font></b>()}</tt></pre>
+</div></div>
+<p>Read the next part of a multipart body.</p>
+<p>This function reads the request body and parses it as multipart. Each parts of a multipart representation have their own headers and body. This function parses and returns headers. Examples of multipart media types are <code>multipart/form-data</code> and <code>multipart/byteranges</code>.</p>
+<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&apos;t been read. Both are skipped automatically when calling this function.</p>
+<p>Cowboy will read the body before parsing in chunks of size up to 64KB, with a period of 5 seconds. This is tailored for reading part headers and might not be the most efficient for skipping the previous part&apos;s body.</p>
+<p>The headers returned are MIME headers, <strong>NOT</strong> 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 extract information from <code>multipart/form-data</code> representations.</p>
+<!-- @todo Proper link to cow_multipart:form_data.-->
+<p>Once a part has been read, it can not be read again.</p>
+<p>Once the body has been read, Cowboy sets the content-length header if it was not previously provided.</p>
+<!-- @todo Limit the maximum size of multipart headers.-->
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-<dt class="hdlist1">
-Opts
-</dt>
-<dd>
-<p>
-A map of body reading options. Please refer to
-<a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a>
-for details about each option.
-</p>
-<div class="paragraph"><p>This function defaults the <code>length</code> to 64KB and the <code>period</code>
-to 5 seconds.</p></div>
+<dt>Opts</dt>
+<dd><p>A map of body reading options. Please refer to <a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a> for details about each option.</p>
+<p>This function defaults the <code>length</code> to 64KB and the <code>period</code> to 5 seconds.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<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 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.
-For example it may have an added content-length header once the
-body has been read.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>An <code>ok</code> tuple is returned containing the next part&apos;s headers as a map.</p>
+<p>A <code>done</code> tuple is returned if there are no more parts to read.</p>
+<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. For example it may have an added content-length header once the body has been read.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced. Replaces <code>part/1,2</code>.
-</p>
+<ul><li><strong>2.0</strong>: Function introduced. Replaces <code>part/1,2</code>.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Read all parts</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Read all parts</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">acc_multipart</span></span>(<span style="color: #009900">Req0</span>, <span style="color: #009900">Acc</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">cowboy_req:read_part</span></span>(<span style="color: #009900">Req0</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Headers</span>, <span style="color: #009900">Req1</span>} <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Body</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">stream_body</span></span>(<span style="color: #009900">Req1</span>, <span style="color: #990000">&lt;&lt;&gt;&gt;</span>),
- <span style="font-weight: bold"><span style="color: #000000">acc_multipart</span></span>(<span style="color: #009900">Req</span>, [{<span style="color: #009900">Headers</span>, <span style="color: #009900">Body</span>}|<span style="color: #009900">Acc</span>]);
- {<span style="color: #FF6600">done</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">-&gt;</span>
- {<span style="font-weight: bold"><span style="color: #000000">lists:reverse</span></span>(<span style="color: #009900">Acc</span>), <span style="color: #009900">Req</span>}
- <span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span>
-
-<span style="font-weight: bold"><span style="color: #000000">stream_body</span></span>(<span style="color: #009900">Req0</span>, <span style="color: #009900">Acc</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">cowboy_req:read_part_body</span></span>(<span style="color: #009900">Req0</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
- {<span style="color: #FF6600">more</span>, <span style="color: #009900">Data</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #000000">stream_body</span></span>(<span style="color: #009900">Req</span>, <span style="color: #990000">&lt;&lt;</span> <span style="color: #009900">Acc</span><span style="color: #990000">/</span><span style="font-weight: bold"><span style="color: #000080">binary</span></span>, <span style="color: #009900">Data</span><span style="color: #990000">/</span><span style="font-weight: bold"><span style="color: #000080">binary</span></span> <span style="color: #990000">&gt;&gt;</span>);
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Data</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #990000">&lt;&lt;</span> <span style="color: #009900">Acc</span><span style="color: #990000">/</span><span style="font-weight: bold"><span style="color: #000080">binary</span></span>, <span style="color: #009900">Data</span><span style="color: #990000">/</span><span style="font-weight: bold"><span style="color: #000080">binary</span></span> <span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req</span>}
- <span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Read all part headers, skipping bodies</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">acc_multipart</font></b>(<font color="#009900">Req0</font>, <font color="#009900">Acc</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">case</font></b> <b><font color="#000000">cowboy_req:read_part</font></b>(<font color="#009900">Req0</font>) <b><font color="#0000FF">of</font></b>
+ {<font color="#FF6600">ok</font>, <font color="#009900">Headers</font>, <font color="#009900">Req1</font>} <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <font color="#009900">Body</font>, <font color="#009900">Req</font>} <font color="#990000">=</font> <b><font color="#000000">stream_body</font></b>(<font color="#009900">Req1</font>, <font color="#990000">&lt;&lt;&gt;&gt;</font>),
+ <b><font color="#000000">acc_multipart</font></b>(<font color="#009900">Req</font>, [{<font color="#009900">Headers</font>, <font color="#009900">Body</font>}|<font color="#009900">Acc</font>]);
+ {<font color="#FF6600">done</font>, <font color="#009900">Req</font>} <font color="#990000">-&gt;</font>
+ {<b><font color="#000000">lists:reverse</font></b>(<font color="#009900">Acc</font>), <font color="#009900">Req</font>}
+ <b><font color="#0000FF">end</font></b><font color="#990000">.</font>
+
+<b><font color="#000000">stream_body</font></b>(<font color="#009900">Req0</font>, <font color="#009900">Acc</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">case</font></b> <b><font color="#000000">cowboy_req:read_part_body</font></b>(<font color="#009900">Req0</font>) <b><font color="#0000FF">of</font></b>
+ {<font color="#FF6600">more</font>, <font color="#009900">Data</font>, <font color="#009900">Req</font>} <font color="#990000">-&gt;</font>
+ <b><font color="#000000">stream_body</font></b>(<font color="#009900">Req</font>, <font color="#990000">&lt;&lt;</font> <font color="#009900">Acc</font><font color="#990000">/</font><b><font color="#000080">binary</font></b>, <font color="#009900">Data</font><font color="#990000">/</font><b><font color="#000080">binary</font></b> <font color="#990000">&gt;&gt;</font>);
+ {<font color="#FF6600">ok</font>, <font color="#009900">Data</font>, <font color="#009900">Req</font>} <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <font color="#990000">&lt;&lt;</font> <font color="#009900">Acc</font><font color="#990000">/</font><b><font color="#000080">binary</font></b>, <font color="#009900">Data</font><font color="#990000">/</font><b><font color="#000080">binary</font></b> <font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>}
+ <b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Read all part headers, skipping bodies</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">skip_body_multipart</span></span>(<span style="color: #009900">Req0</span>, <span style="color: #009900">Acc</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">cowboy_req:read_part</span></span>(<span style="color: #009900">Req0</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Headers</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #000000">skip_body_multipart</span></span>(<span style="color: #009900">Req</span>, [<span style="color: #009900">Headers</span>|<span style="color: #009900">Acc</span>]);
- {<span style="color: #FF6600">done</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">-&gt;</span>
- {<span style="font-weight: bold"><span style="color: #000000">lists:reverse</span></span>(<span style="color: #009900">Acc</span>), <span style="color: #009900">Req</span>}
- <span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Read a part header in larger chunks</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">skip_body_multipart</font></b>(<font color="#009900">Req0</font>, <font color="#009900">Acc</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">case</font></b> <b><font color="#000000">cowboy_req:read_part</font></b>(<font color="#009900">Req0</font>) <b><font color="#0000FF">of</font></b>
+ {<font color="#FF6600">ok</font>, <font color="#009900">Headers</font>, <font color="#009900">Req</font>} <font color="#990000">-&gt;</font>
+ <b><font color="#000000">skip_body_multipart</font></b>(<font color="#009900">Req</font>, [<font color="#009900">Headers</font>|<font color="#009900">Acc</font>]);
+ {<font color="#FF6600">done</font>, <font color="#009900">Req</font>} <font color="#990000">-&gt;</font>
+ {<b><font color="#000000">lists:reverse</font></b>(<font color="#009900">Acc</font>), <font color="#009900">Req</font>}
+ <b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Read a part header in larger chunks</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: #FF6600">ok</span>, <span style="color: #009900">Headers</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:read_part</span></span>(<span style="color: #009900">Req0</span>, #{<span style="font-weight: bold"><span style="color: #000080">length</span></span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">1000000</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#009900">Headers</font>, <font color="#009900">Req</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:read_part</font></b>(<font color="#009900">Req0</font>, #{<b><font color="#000080">length</font></b> <font color="#990000">=&gt;</font> <font color="#993399">1000000</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
<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.has_body">cowboy_req:has_body(3)</a>,
-<a href="../cowboy_req.body_length">cowboy_req:body_length(3)</a>,
-<a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a>,
-<a href="../cowboy_req.read_urlencoded_body">cowboy_req:read_urlencoded_body(3)</a>,
-<a href="../cowboy_req.read_part_body">cowboy_req:read_part_body(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.has_body">cowboy_req:has_body(3)</a>, <a href="../cowboy_req.body_length">cowboy_req:body_length(3)</a>, <a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a>, <a href="../cowboy_req.read_urlencoded_body">cowboy_req:read_urlencoded_body(3)</a>, <a href="../cowboy_req.read_part_body">cowboy_req:read_part_body(3)</a></p>
+
diff --git a/docs/en/cowboy/2.2/manual/cowboy_req.read_part_body/index.html b/docs/en/cowboy/2.2/manual/cowboy_req.read_part_body/index.html
index ce491c3e..24520497 100644
--- a/docs/en/cowboy/2.2/manual/cowboy_req.read_part_body/index.html
+++ b/docs/en/cowboy/2.2/manual/cowboy_req.read_part_body/index.html
@@ -62,130 +62,70 @@
<h1 class="lined-header"><span>cowboy_req:read_part_body(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:read_part_body - Read the current part&#8217;s body</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:read_part_body - Read the current part&apos;s body</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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_part_body</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">read_part_body</span></span>(<span style="color: #009900">Req</span>, #{})
-
-<span style="font-weight: bold"><span style="color: #000000">read_part_body</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: #FF6600">ok</span>, <span style="color: #009900">Data</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: #FF6600">more</span>, <span style="color: #009900">Data</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">Opts</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:read_body_opts</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Read the body of the current part of the multipart message.</p></div>
-<div class="paragraph"><p>This function reads the request body and parses it as
-multipart. Each parts of a multipart representation have
-their own headers and body. This function returns the
-body of the current part. Examples of multipart media types
-are <code>multipart/form-data</code> and <code>multipart/byteranges</code>.</p></div>
-<div class="paragraph"><p>This function reads a chunk of the part&#8217;s body. A <code>more</code> tuple
-is returned when more data remains to be read. Call the function
-repeatedly until an <code>ok</code> tuple is returned to read the entire body.</p></div>
-<div class="paragraph"><p>Once a part has been read, it can not be read again.</p></div>
-<div class="paragraph"><p>Once the body has been read, Cowboy sets the content-length
-header if it was not previously provided.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">read_part_body</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> <b><font color="#000000">read_part_body</font></b>(<font color="#009900">Req</font>, #{})
+
+<b><font color="#000000">read_part_body</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>(), <font color="#009900">Opts</font>)
+ <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <font color="#009900">Data</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">Req</font>}
+ | {<font color="#FF6600">more</font>, <font color="#009900">Data</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">Req</font>}
+
+<font color="#009900">Opts</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:read_body_opts</font></b>()</tt></pre>
+</div></div>
+<p>Read the body of the current part of the multipart message.</p>
+<p>This function reads the request body and parses it as multipart. Each parts of a multipart representation have their own headers and body. This function returns the body of the current part. Examples of multipart media types are <code>multipart/form-data</code> and <code>multipart/byteranges</code>.</p>
+<p>This function reads a chunk of the part&apos;s body. A <code>more</code> tuple is returned when more data remains to be read. Call the function repeatedly until an <code>ok</code> tuple is returned to read the entire body.</p>
+<p>Once a part has been read, it can not be read again.</p>
+<p>Once the body has been read, Cowboy sets the content-length header if it was not previously provided.</p>
+<!-- @todo Limit the maximum size of multipart headers.-->
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-<dt class="hdlist1">
-Opts
-</dt>
-<dd>
-<p>
-A map of body reading options. Please refer to
-<a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a>
-for details about each option.
-</p>
-<div class="paragraph"><p>This function uses the same default options as the
-<a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a>
-function.</p></div>
+<dt>Opts</dt>
+<dd><p>A map of body reading options. Please refer to <a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a> for details about each option.</p>
+<p>This function uses the same default options as the <a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a> function.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A <code>more</code> tuple is returned when there are more data to be read.</p></div>
-<div class="paragraph"><p>An <code>ok</code> tuple is returned when there are no more data to be read.</p></div>
-<div class="paragraph"><p>The data is always returned as a binary.</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.
-For example it may have an added content-length header once the
-body has been read.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>A <code>more</code> tuple is returned when there are more data to be read.</p>
+<p>An <code>ok</code> tuple is returned when there are no more data to be read.</p>
+<p>The data is always returned as a binary.</p>
+<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. For example it may have an added content-length header once the body has been read.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced. Replaces <code>part_body/1,2</code>.
-</p>
+<ul><li><strong>2.0</strong>: Function introduced. Replaces <code>part_body/1,2</code>.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Read a full part&#8217;s body</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Read a full part&apos;s body</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">stream_body</span></span>(<span style="color: #009900">Req0</span>, <span style="color: #009900">Acc</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">cowboy_req:read_part_body</span></span>(<span style="color: #009900">Req0</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
- {<span style="color: #FF6600">more</span>, <span style="color: #009900">Data</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #000000">stream_body</span></span>(<span style="color: #009900">Req</span>, <span style="color: #990000">&lt;&lt;</span> <span style="color: #009900">Acc</span><span style="color: #990000">/</span><span style="font-weight: bold"><span style="color: #000080">binary</span></span>, <span style="color: #009900">Data</span><span style="color: #990000">/</span><span style="font-weight: bold"><span style="color: #000080">binary</span></span> <span style="color: #990000">&gt;&gt;</span>);
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Data</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #990000">&lt;&lt;</span> <span style="color: #009900">Acc</span><span style="color: #990000">/</span><span style="font-weight: bold"><span style="color: #000080">binary</span></span>, <span style="color: #009900">Data</span><span style="color: #990000">/</span><span style="font-weight: bold"><span style="color: #000080">binary</span></span> <span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req</span>}
- <span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Ensure a part&#8217;s body is smaller than 64KB</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">stream_body</font></b>(<font color="#009900">Req0</font>, <font color="#009900">Acc</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">case</font></b> <b><font color="#000000">cowboy_req:read_part_body</font></b>(<font color="#009900">Req0</font>) <b><font color="#0000FF">of</font></b>
+ {<font color="#FF6600">more</font>, <font color="#009900">Data</font>, <font color="#009900">Req</font>} <font color="#990000">-&gt;</font>
+ <b><font color="#000000">stream_body</font></b>(<font color="#009900">Req</font>, <font color="#990000">&lt;&lt;</font> <font color="#009900">Acc</font><font color="#990000">/</font><b><font color="#000080">binary</font></b>, <font color="#009900">Data</font><font color="#990000">/</font><b><font color="#000080">binary</font></b> <font color="#990000">&gt;&gt;</font>);
+ {<font color="#FF6600">ok</font>, <font color="#009900">Data</font>, <font color="#009900">Req</font>} <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <font color="#990000">&lt;&lt;</font> <font color="#009900">Acc</font><font color="#990000">/</font><b><font color="#000080">binary</font></b>, <font color="#009900">Data</font><font color="#990000">/</font><b><font color="#000080">binary</font></b> <font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>}
+ <b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Ensure a part&apos;s body is smaller than 64KB</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: #FF6600">ok</span>, <span style="color: #009900">Body</span>, <span style="color: #009900">Req</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">Req0</span>, #{<span style="font-weight: bold"><span style="color: #000080">length</span></span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">64000</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#009900">Body</font>, <font color="#009900">Req</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:read_part_body</font></b>(<font color="#009900">Req0</font>, #{<b><font color="#000080">length</font></b> <font color="#990000">=&gt;</font> <font color="#993399">64000</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
<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.has_body">cowboy_req:has_body(3)</a>,
-<a href="../cowboy_req.body_length">cowboy_req:body_length(3)</a>,
-<a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a>,
-<a href="../cowboy_req.read_urlencoded_body">cowboy_req:read_urlencoded_body(3)</a>,
-<a href="../cowboy_req.read_part">cowboy_req:read_part(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.has_body">cowboy_req:has_body(3)</a>, <a href="../cowboy_req.body_length">cowboy_req:body_length(3)</a>, <a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a>, <a href="../cowboy_req.read_urlencoded_body">cowboy_req:read_urlencoded_body(3)</a>, <a href="../cowboy_req.read_part">cowboy_req:read_part(3)</a></p>
+
diff --git a/docs/en/cowboy/2.2/manual/cowboy_req.read_urlencoded_body/index.html b/docs/en/cowboy/2.2/manual/cowboy_req.read_urlencoded_body/index.html
index 6ff1ab2c..e573bf20 100644
--- a/docs/en/cowboy/2.2/manual/cowboy_req.read_urlencoded_body/index.html
+++ b/docs/en/cowboy/2.2/manual/cowboy_req.read_urlencoded_body/index.html
@@ -62,126 +62,64 @@
<h1 class="lined-header"><span>cowboy_req:read_urlencoded_body(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:read_urlencoded_body - Read and parse a urlencoded request body</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:read_urlencoded_body - Read and parse a urlencoded request body</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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_urlencoded_body</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">read_urlencoded_body</span></span>(<span style="color: #009900">Req</span>, #{})
-
-<span style="font-weight: bold"><span style="color: #000000">read_urlencoded_body</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: #FF6600">ok</span>, <span style="color: #009900">Body</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">Body</span> <span style="color: #990000">::</span> [{<span style="color: #009900">Key</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="color: #009900">Value</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>() | <span style="color: #000080">true</span>}]</tt></pre></div></div>
-<div class="paragraph"><p>Read and parse a urlencoded request body.</p></div>
-<div class="paragraph"><p>This function reads the request body and parses it as
-<code>application/x-www-form-urlencoded</code>. It returns a list
-of key/values.</p></div>
-<div class="paragraph"><p>The urlencoded media type is used by Web browsers when
-submitting HTML forms using the POST method.</p></div>
-<div class="paragraph"><p>Cowboy needs to read the full body before parsing. By default
-it will read bodies of size up to 64KB. It is possible to
-provide options to read larger bodies if required.</p></div>
-<div class="paragraph"><p>Cowboy will automatically handle protocol details including
-the expect header, chunked transfer-encoding and others.</p></div>
-<div class="paragraph"><p>Once the body has been read, Cowboy sets the content-length
-header if it was not previously provided.</p></div>
-<div class="paragraph"><p>This function can only be called once. Calling it again will
-result in undefined behavior.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">read_urlencoded_body</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> <b><font color="#000000">read_urlencoded_body</font></b>(<font color="#009900">Req</font>, #{})
+
+<b><font color="#000000">read_urlencoded_body</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>(), <font color="#009900">Opts</font>)
+ <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <font color="#009900">Body</font>, <font color="#009900">Req</font>}
+
+<font color="#009900">Opts</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:read_body_opts</font></b>()
+<font color="#009900">Body</font> <font color="#990000">::</font> [{<font color="#009900">Key</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() | <font color="#000080">true</font>}]</tt></pre>
+</div></div>
+<p>Read and parse a urlencoded request body.</p>
+<p>This function reads the request body and parses it as <code>application/x-www-form-urlencoded</code>. It returns a list of key/values.</p>
+<p>The urlencoded media type is used by Web browsers when submitting HTML forms using the POST method.</p>
+<p>Cowboy needs to read the full body before parsing. By default it will read bodies of size up to 64KB. It is possible to provide options to read larger bodies if required.</p>
+<p>Cowboy will automatically handle protocol details including the expect header, chunked transfer-encoding and others.</p>
+<p>Once the body has been read, Cowboy sets the content-length header if it was not previously provided.</p>
+<p>This function can only be called once. Calling it again will result in undefined behavior.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-<dt class="hdlist1">
-Opts
-</dt>
-<dd>
-<p>
-A map of body reading options. Please refer to
-<a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a>
-for details about each option.
-</p>
-<div class="paragraph"><p>This function defaults the <code>length</code> to 64KB and the <code>period</code>
-to 5 seconds.</p></div>
+<dt>Opts</dt>
+<dd><p>A map of body reading options. Please refer to <a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a> for details about each option.</p>
+<p>This function defaults the <code>length</code> to 64KB and the <code>period</code> to 5 seconds.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>An <code>ok</code> tuple is returned containing a list of key/values found
-in the body.</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.
-For example it may have an added content-length header once the
-body has been read.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>An <code>ok</code> tuple is returned containing a list of key/values found in the body.</p>
+<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. For example it may have an added content-length header once the body has been read.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced. Replaces <code>body_qs/1,2</code>.
-</p>
+<ul><li><strong>2.0</strong>: Function introduced. Replaces <code>body_qs/1,2</code>.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Read a urlencoded body</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Read a urlencoded body</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: #FF6600">ok</span>, <span style="color: #009900">Body</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:read_urlencoded_body</span></span>(<span style="color: #009900">Req0</span>),
-{<span style="color: #990000">_</span>, <span style="color: #009900">Lang</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">lists:keyfind</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"lang"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #993399">1</span>, <span style="color: #009900">Body</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Allow large urlencoded bodies</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#009900">Body</font>, <font color="#009900">Req</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:read_urlencoded_body</font></b>(<font color="#009900">Req0</font>),
+{<font color="#990000">_</font>, <font color="#009900">Lang</font>} <font color="#990000">=</font> <b><font color="#000000">lists:keyfind</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"lang"</font><font color="#990000">&gt;&gt;</font>, <font color="#993399">1</font>, <font color="#009900">Body</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Allow large urlencoded bodies</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: #FF6600">ok</span>, <span style="color: #009900">Body</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:read_urlencoded_body</span></span>(<span style="color: #009900">Req0</span>, #{<span style="font-weight: bold"><span style="color: #000080">length</span></span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">1000000</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#009900">Body</font>, <font color="#009900">Req</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:read_urlencoded_body</font></b>(<font color="#009900">Req0</font>, #{<b><font color="#000080">length</font></b> <font color="#990000">=&gt;</font> <font color="#993399">1000000</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
<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.has_body">cowboy_req:has_body(3)</a>,
-<a href="../cowboy_req.body_length">cowboy_req:body_length(3)</a>,
-<a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a>,
-<a href="../cowboy_req.read_part">cowboy_req:read_part(3)</a>,
-<a href="../cowboy_req.read_part_body">cowboy_req:read_part_body(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.has_body">cowboy_req:has_body(3)</a>, <a href="../cowboy_req.body_length">cowboy_req:body_length(3)</a>, <a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a>, <a href="../cowboy_req.read_part">cowboy_req:read_part(3)</a>, <a href="../cowboy_req.read_part_body">cowboy_req:read_part_body(3)</a></p>
+
diff --git a/docs/en/cowboy/2.2/manual/cowboy_req.reply/index.html b/docs/en/cowboy/2.2/manual/cowboy_req.reply/index.html
index 522ca902..debb4369 100644
--- a/docs/en/cowboy/2.2/manual/cowboy_req.reply/index.html
+++ b/docs/en/cowboy/2.2/manual/cowboy_req.reply/index.html
@@ -62,165 +62,87 @@
<h1 class="lined-header"><span>cowboy_req:reply(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:reply - Send the response</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:reply - Send the response</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">reply</span></span>(<span style="color: #009900">Status</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">reply</span></span>(<span style="color: #009900">StatusCode</span>, #{}, <span style="color: #009900">Req</span>)
-
-<span style="font-weight: bold"><span style="color: #000000">reply</span></span>(<span style="color: #009900">Status</span>, <span style="color: #009900">Headers</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">Req</span>
-
-<span style="font-weight: bold"><span style="color: #000000">reply</span></span>(<span style="color: #009900">Status</span>, <span style="color: #009900">Headers</span>, <span style="color: #009900">Body</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">Req</span>
-
-<span style="color: #009900">Status</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:http_status</span></span>()
-<span style="color: #009900">Headers</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:http_headers</span></span>()
-<span style="color: #009900">Body</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:resp_body</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Send the response.</p></div>
-<div class="paragraph"><p>The header names must be given as lowercase binary strings.
-While header names are case insensitive, Cowboy requires them
-to be given as lowercase to function properly.</p></div>
-<div class="paragraph"><p>Cowboy does not allow duplicate header names. Headers set
-by this function may overwrite those set by <code>set_resp_header/3</code>
-and <code>set_resp_headers/2</code>.</p></div>
-<div class="paragraph"><p>Use <a href="../cowboy_req.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a>
-instead of this function to set cookies.</p></div>
-<div class="paragraph"><p>The <code>reply/2,3</code> functions will send the body set previously,
-if any. The <code>reply/4</code> function always sends the given body,
-overriding any previously set.</p></div>
-<div class="paragraph"><p>You do not need to set the content-length header when
-sending a response body. Cowboy takes care of it automatically.
-You should however provide a content-type header.</p></div>
-<div class="paragraph"><p>No further data can be transmitted after this function
-returns. This includes the push mechanism. Attempting to
-send two replies, or to push resources after a reply has
-been sent, will result in an error.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">reply</font></b>(<font color="#009900">Status</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> <b><font color="#000000">reply</font></b>(<font color="#009900">StatusCode</font>, #{}, <font color="#009900">Req</font>)
+
+<b><font color="#000000">reply</font></b>(<font color="#009900">Status</font>, <font color="#009900">Headers</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> <font color="#009900">Req</font>
+
+<b><font color="#000000">reply</font></b>(<font color="#009900">Status</font>, <font color="#009900">Headers</font>, <font color="#009900">Body</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> <font color="#009900">Req</font>
+
+<font color="#009900">Status</font> <font color="#990000">::</font> <b><font color="#000000">cowboy:http_status</font></b>()
+<font color="#009900">Headers</font> <font color="#990000">::</font> <b><font color="#000000">cowboy:http_headers</font></b>()
+<font color="#009900">Body</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:resp_body</font></b>()</tt></pre>
+</div></div>
+<p>Send the response.</p>
+<p>The header names must be given as lowercase binary strings. While header names are case insensitive, Cowboy requires them to be given as lowercase to function properly.</p>
+<p>Cowboy does not allow duplicate header names. Headers set by this function may overwrite those set by <code>set_resp_header/3</code> and <code>set_resp_headers/2</code>.</p>
+<p>Use <a href="../cowboy_req.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a> instead of this function to set cookies.</p>
+<p>The <code>reply/2,3</code> functions will send the body set previously, if any. The <code>reply/4</code> function always sends the given body, overriding any previously set.</p>
+<p>You do not need to set the content-length header when sending a response body. Cowboy takes care of it automatically. You should however provide a content-type header.</p>
+<p>No further data can be transmitted after this function returns. This includes the push mechanism. Attempting to send two replies, or to push resources after a reply has been sent, will result in an error.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Status
-</dt>
-<dd>
-<p>
-The status code for the response.
-</p>
+<dl><dt>Status</dt>
+<dd><p>The status code for the response.</p>
</dd>
-<dt class="hdlist1">
-Headers
-</dt>
-<dd>
-<p>
-The response headers.
-</p>
+<dt>Headers</dt>
+<dd><p>The response headers.</p>
</dd>
-</dl></div>
-<div class="paragraph"><p>Header names must be given as lowercase binary strings.</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Body
-</dt>
-<dd>
-<p>
-The body can be either a binary value, an iolist or a
-<code>sendfile</code> tuple telling Cowboy to send the contents of
-a file.
-</p>
+</dl>
+<p>Header names must be given as lowercase binary strings.</p>
+<dl><dt>Body</dt>
+<dd><p>The body can be either a binary value, an iolist or a <code>sendfile</code> tuple telling Cowboy to send the contents of a file.</p>
</dd>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A new Req object is returned.</p></div>
-<div class="paragraph"><p>The returned Req object should be used from that point onward
-as it contains updated information about the state of the request.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>A new Req object is returned.</p>
+<p>The returned Req object should be used from that point onward as it contains updated information about the state of the request.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Only the Req is returned, it is no longer wrapped in a tuple.
-</p>
+<ul><li><strong>2.0</strong>: Only the Req is returned, it is no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Reply</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Reply</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: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:reply</span></span>(<span style="color: #993399">404</span>, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Reply with custom headers</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:reply</font></b>(<font color="#993399">404</font>, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Reply with custom 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">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">401</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"www-authenticate"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Basic realm=\"erlang.org\""</span><span style="color: #990000">&gt;&gt;</span>
-}, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Reply with custom headers and a body</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:reply</font></b>(<font color="#993399">401</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"www-authenticate"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"Basic realm=\"erlang.org\""</font><font color="#990000">&gt;&gt;</font>
+}, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Reply with custom headers and a body</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: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:reply</span></span>(<span style="color: #993399">200</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/plain"</span><span style="color: #990000">&gt;&gt;</span>
-}, <span style="color: #FF0000">"Hello world!"</span>, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:reply</font></b>(<font color="#993399">200</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/plain"</font><font color="#990000">&gt;&gt;</font>
+}, <font color="#FF0000">"Hello world!"</font>, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a>,
-<a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a>,
-<a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a>,
-<a href="../cowboy_req.set_resp_body">cowboy_req:set_resp_body(3)</a>,
-<a href="../cowboy_req.inform">cowboy_req:inform(3)</a>,
-<a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a>,
-<a href="../cowboy_req.push">cowboy_req:push(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a>, <a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a>, <a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a>, <a href="../cowboy_req.set_resp_body">cowboy_req:set_resp_body(3)</a>, <a href="../cowboy_req.inform">cowboy_req:inform(3)</a>, <a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a>, <a href="../cowboy_req.push">cowboy_req:push(3)</a></p>
+
diff --git a/docs/en/cowboy/2.2/manual/cowboy_req.resp_header/index.html b/docs/en/cowboy/2.2/manual/cowboy_req.resp_header/index.html
index d26e9ca4..2d4e1da7 100644
--- a/docs/en/cowboy/2.2/manual/cowboy_req.resp_header/index.html
+++ b/docs/en/cowboy/2.2/manual/cowboy_req.resp_header/index.html
@@ -62,113 +62,58 @@
<h1 class="lined-header"><span>cowboy_req:resp_header(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:resp_header - Response header</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:resp_header - Response header</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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_header</span></span>(<span style="color: #009900">Name</span>, <span style="color: #009900">Req</span>) <span style="color: #990000">-&gt;</span> <span style="font-weight: bold"><span style="color: #000000">resp_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">resp_header</span></span>(<span style="color: #009900">Name</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">Name</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: #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">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>Return the value for the given response header.</p></div>
-<div class="paragraph"><p>The response header must have been set previously using
-<a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a> or
-<a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a>.</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>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">resp_header</font></b>(<font color="#009900">Name</font>, <font color="#009900">Req</font>) <font color="#990000">-&gt;</font> <b><font color="#000000">resp_header</font></b>(<font color="#009900">Name</font>, <font color="#009900">Req</font>, <font color="#000080">undefined</font>)
+<b><font color="#000000">resp_header</font></b>(<font color="#009900">Name</font>, <font color="#009900">Req</font>, <font color="#009900">Default</font>) <font color="#990000">-&gt;</font> <b><font color="#000080">binary</font></b>() | <font color="#009900">Default</font>
+
+<font color="#009900">Name</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% lowercase; case insensitive</font></i>
+<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()</tt></pre>
+</div></div>
+<p>Return the value for the given response header.</p>
+<p>The response header must have been set previously using <a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a> or <a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a>.</p>
+<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>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Name
-</dt>
-<dd>
-<p>
-Desired response header name as a lowercase binary string.
-</p>
+<dl><dt>Name</dt>
+<dd><p>Desired response header name as a lowercase binary string.</p>
</dd>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dt>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>
+<dt>Default</dt>
+<dd><p>Default value returned when the header is missing.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<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">
+<p>The header value is returned as a binary string. When the header is missing, the default argument is returned.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced.
-</p>
+<ul><li><strong>2.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Get the content-type response header</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Get the content-type response 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">Type</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:resp_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</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-type response header with a default value</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Type</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:resp_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Get the content-type response 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">Type</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:resp_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</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">"text/html"</span><span style="color: #990000">&gt;&gt;</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Type</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:resp_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/html"</font><font color="#990000">&gt;&gt;</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.resp_headers">cowboy_req:resp_headers(3)</a>,
-<a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a>,
-<a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.resp_headers">cowboy_req:resp_headers(3)</a>, <a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a>, <a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a></p>
+
diff --git a/docs/en/cowboy/2.2/manual/cowboy_req.resp_headers/index.html b/docs/en/cowboy/2.2/manual/cowboy_req.resp_headers/index.html
index 31930660..9cc75985 100644
--- a/docs/en/cowboy/2.2/manual/cowboy_req.resp_headers/index.html
+++ b/docs/en/cowboy/2.2/manual/cowboy_req.resp_headers/index.html
@@ -62,79 +62,38 @@
<h1 class="lined-header"><span>cowboy_req:resp_headers(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:resp_headers - Response headers</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:resp_headers - Response headers</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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_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 response headers.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">resp_headers</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <b><font color="#000000">cowboy:http_headers</font></b>()</tt></pre>
+</div></div>
+<p>Return all response headers.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<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">
+<p>Headers are returned as a map with keys being lowercase binary strings, and values as binary strings.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced.
-</p>
+<ul><li><strong>2.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Get all response headers</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Get all response 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:resp_headers</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Headers</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:resp_headers</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.resp_header">cowboy_req:resp_header(3)</a>,
-<a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a>,
-<a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.resp_header">cowboy_req:resp_header(3)</a>, <a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a>, <a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a></p>
+
diff --git a/docs/en/cowboy/2.2/manual/cowboy_req.scheme/index.html b/docs/en/cowboy/2.2/manual/cowboy_req.scheme/index.html
index 2c4bccb9..1bbf5ecb 100644
--- a/docs/en/cowboy/2.2/manual/cowboy_req.scheme/index.html
+++ b/docs/en/cowboy/2.2/manual/cowboy_req.scheme/index.html
@@ -62,89 +62,52 @@
<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">
+<p>cowboy_req:scheme - URI scheme</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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
+<pre><tt><b><font color="#000000">scheme</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <font color="#009900">Scheme</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()</tt></pre>
+</div></div>
+<p>Return the scheme of the effective request URI.</p>
+<p>The scheme can also be obtained using pattern matching:</p>
+<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">
+<pre><tt>#{<font color="#FF6600">scheme</font> <font color="#990000">:=</font> <font color="#009900">Scheme</font>} <font color="#990000">=</font> <font color="#009900">Req</font><font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<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">
+<p>The scheme is returned as a binary. It is case insensitive.</p>
+<p>Cowboy will only set the scheme to <code>&lt;&lt;&quot;http&quot;&gt;&gt;</code> or <code>&lt;&lt;&quot;https&quot;&gt;&gt;</code>.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced.
-</p>
+<ul><li><strong>2.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<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
+<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">
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req0</font><font color="#990000">=</font>#{<font color="#FF6600">scheme</font> <font color="#990000">:=</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"http"</font><font color="#990000">&gt;&gt;</font>}, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ <font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:reply</font></b>(<font color="#993399">302</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"location"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <b><font color="#000000">cowboy_req:uri</font></b>(<font color="#009900">Req</font>, #{<font color="#0000FF">scheme</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"https"</font><font color="#990000">&gt;&gt;</font>})
+ }, <font color="#009900">Req0</font>),
+ {<font color="#FF6600">ok</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>};
+<b><font color="#000000">init</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">cowboy_rest</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
<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>
+<p><a href="../cowboy_req">cowboy_req(3)</a></p>
+
diff --git a/docs/en/cowboy/2.2/manual/cowboy_req.set_resp_body/index.html b/docs/en/cowboy/2.2/manual/cowboy_req.set_resp_body/index.html
index 03f71b8c..1b764118 100644
--- a/docs/en/cowboy/2.2/manual/cowboy_req.set_resp_body/index.html
+++ b/docs/en/cowboy/2.2/manual/cowboy_req.set_resp_body/index.html
@@ -62,138 +62,79 @@
<h1 class="lined-header"><span>cowboy_req:set_resp_body(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:set_resp_body - Set the response body</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:set_resp_body - Set the response body</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">set_resp_body</span></span>(<span style="color: #009900">Body</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">Req</span>
-
-<span style="color: #009900">Body</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:resp_body</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Set the response body.</p></div>
-<div class="paragraph"><p>The response body will be sent when a reply is initiated.
-Note that the functions <code>stream_reply/2,3</code> and <code>reply/4</code>
-will override the body set by this function.</p></div>
-<div class="paragraph"><p>This function can also be used to remove a response body
-that was set previously. To do so, simply call this function
-with an empty body.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">set_resp_body</font></b>(<font color="#009900">Body</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> <font color="#009900">Req</font>
+
+<font color="#009900">Body</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:resp_body</font></b>()</tt></pre>
+</div></div>
+<p>Set the response body.</p>
+<p>The response body will be sent when a reply is initiated. Note that the functions <code>stream_reply/2,3</code> and <code>reply/4</code> will override the body set by this function.</p>
+<p>This function can also be used to remove a response body that was set previously. To do so, simply call this function with an empty body.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Body
-</dt>
-<dd>
-<p>
-The body can be either a binary value, an iolist or a
-<code>sendfile</code> tuple telling Cowboy to send the contents of
-a file.
-</p>
+<dl><dt>Body</dt>
+<dd><p>The body can be either a binary value, an iolist or a <code>sendfile</code> tuple telling Cowboy to send the contents of a file.</p>
</dd>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A new Req object is returned.</p></div>
-<div class="paragraph"><p>The returned Req object must be used from that point onward,
-otherwise the body will not be sent in the response.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>A new Req object is returned.</p>
+<p>The returned Req object must be used from that point onward, otherwise the body will not be sent in the response.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: The function now accepts a <code>sendfile</code> tuple.
-</p>
+<ul><li><strong>2.0</strong>: The function now accepts a <code>sendfile</code> tuple.
</li>
-<li>
-<p>
-<strong>2.0</strong>: The <code>set_resp_body_fun/2,3</code> functions were removed.
-</p>
+<li><strong>2.0</strong>: The <code>set_resp_body_fun/2,3</code> functions were removed.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Set the response body</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Set the response body</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: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_body</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Hello world!"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Set the response body as an iolist</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_body</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"Hello world!"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Set the response body as an iolist</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: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_body</span></span>([
- <span style="color: #FF0000">"&lt;html&gt;&lt;head&gt;&lt;title&gt;"</span>,
- <span style="font-weight: bold"><span style="color: #000000">page_title</span></span>(),
- <span style="color: #FF0000">"&lt;/title&gt;&lt;/head&gt;&lt;body&gt;"</span>,
- <span style="font-weight: bold"><span style="color: #000000">page_body</span></span>(),
- <span style="color: #FF0000">"&lt;/body&gt;&lt;/html&gt;"</span>
-], <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Tell Cowboy to send data from a file</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_body</font></b>([
+ <font color="#FF0000">"&lt;html&gt;&lt;head&gt;&lt;title&gt;"</font>,
+ <b><font color="#000000">page_title</font></b>(),
+ <font color="#FF0000">"&lt;/title&gt;&lt;/head&gt;&lt;body&gt;"</font>,
+ <b><font color="#000000">page_body</font></b>(),
+ <font color="#FF0000">"&lt;/body&gt;&lt;/html&gt;"</font>
+], <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Tell Cowboy to send data from a file</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: #FF6600">ok</span>, <span style="color: #008080">#file_info</span>{<span style="font-weight: bold"><span style="color: #000080">size</span></span><span style="color: #990000">=</span><span style="color: #009900">Size</span>}} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">file:read_file_info</span></span>(<span style="color: #009900">Filename</span>),
-<span style="color: #009900">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_body</span></span>({<span style="color: #FF6600">sendfile</span>, <span style="color: #993399">0</span>, <span style="color: #009900">Size</span>, <span style="color: #009900">Filename</span>}, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Clear any previously set response body</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#008080">#file_info</font>{<b><font color="#000080">size</font></b><font color="#990000">=</font><font color="#009900">Size</font>}} <font color="#990000">=</font> <b><font color="#000000">file:read_file_info</font></b>(<font color="#009900">Filename</font>),
+<font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_body</font></b>({<font color="#FF6600">sendfile</font>, <font color="#993399">0</font>, <font color="#009900">Size</font>, <font color="#009900">Filename</font>}, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Clear any previously set response body</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: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_body</span></span>(<span style="color: #990000">&lt;&lt;&gt;&gt;</span>, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_body</font></b>(<font color="#990000">&lt;&lt;&gt;&gt;</font>, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.set_resp_header">cowboy_req:set_resp_header(3)</a>,
-<a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a>,
-<a href="../cowboy_req.reply">cowboy_req:reply(3)</a>,
-<a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a>, <a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a>, <a href="../cowboy_req.reply">cowboy_req:reply(3)</a>, <a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a></p>
+
diff --git a/docs/en/cowboy/2.2/manual/cowboy_req.set_resp_cookie/index.html b/docs/en/cowboy/2.2/manual/cowboy_req.set_resp_cookie/index.html
index a241db59..76363bc0 100644
--- a/docs/en/cowboy/2.2/manual/cowboy_req.set_resp_cookie/index.html
+++ b/docs/en/cowboy/2.2/manual/cowboy_req.set_resp_cookie/index.html
@@ -62,167 +62,104 @@
<h1 class="lined-header"><span>cowboy_req:set_resp_cookie(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:set_resp_cookie - Set a cookie</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:set_resp_cookie - Set a cookie</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">set_resp_cookie</span></span>(<span style="color: #009900">Name</span>, <span style="color: #009900">Value</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">set_resp_cookie</span></span>(<span style="color: #009900">Name</span>, <span style="color: #009900">Value</span>, [], <span style="color: #009900">Req</span>)
-
-<span style="font-weight: bold"><span style="color: #000000">set_resp_cookie</span></span>(<span style="color: #009900">Name</span>, <span style="color: #009900">Value</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">Req</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="font-style: italic"><span style="color: #9A1900">%% case sensitive</span></span>
-<span style="color: #009900">Value</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>() <span style="font-style: italic"><span style="color: #9A1900">%% case sensitive</span></span>
-<span style="color: #009900">Opts</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cow_cookie:cookie_opts</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Set a cookie to be sent with the response.</p></div>
-<div class="paragraph"><p>Note that cookie names are case sensitive.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">set_resp_cookie</font></b>(<font color="#009900">Name</font>, <font color="#009900">Value</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> <b><font color="#000000">set_resp_cookie</font></b>(<font color="#009900">Name</font>, <font color="#009900">Value</font>, [], <font color="#009900">Req</font>)
+
+<b><font color="#000000">set_resp_cookie</font></b>(<font color="#009900">Name</font>, <font color="#009900">Value</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>(), <font color="#009900">Opts</font>)
+ <font color="#990000">-&gt;</font> <font color="#009900">Req</font>
+
+<font color="#009900">Name</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case sensitive</font></i>
+<font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000000">iodata</font></b>() <i><font color="#9A1900">%% case sensitive</font></i>
+<font color="#009900">Opts</font> <font color="#990000">::</font> <b><font color="#000000">cow_cookie:cookie_opts</font></b>()</tt></pre>
+</div></div>
+<p>Set a cookie to be sent with the response.</p>
+<p>Note that cookie names are case sensitive.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Name
-</dt>
-<dd>
-<p>
-Cookie name.
-</p>
+<dl><dt>Name</dt>
+<dd><p>Cookie name.</p>
</dd>
-<dt class="hdlist1">
-Value
-</dt>
-<dd>
-<p>
-Cookie value.
-</p>
+<dt>Value</dt>
+<dd><p>Cookie value.</p>
</dd>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-<dt class="hdlist1">
-Opts
-</dt>
-<dd>
-<p>
-Cookie options.
-</p>
+<dt>Opts</dt>
+<dd><p>Cookie options.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A new Req object is returned.</p></div>
-<div class="paragraph"><p>The returned Req object must be used from that point onward,
-otherwise the cookie will not be sent in the response.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>A new Req object is returned.</p>
+<p>The returned Req object must be used from that point onward, otherwise the cookie will not be sent in the response.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: <code>set_resp_cookie/3</code> introduced as an alias to <code>set_resp_cookie/4</code> with no options.
-</p>
+<ul><li><strong>2.0</strong>: <code>set_resp_cookie/3</code> introduced as an alias to <code>set_resp_cookie/4</code> with no options.
</li>
-<li>
-<p>
-<strong>2.0</strong>: The first argument type is now <code>binary()</code> instead of <code>iodata()</code>.
-</p>
+<li><strong>2.0</strong>: The first argument type is now <code>binary()</code> instead of <code>iodata()</code>.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Set a session cookie</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Set a session cookie</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">SessionID</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">base64:encode</span></span>(<span style="font-weight: bold"><span style="color: #000000">crypto:strong_rand_bytes</span></span>(<span style="color: #993399">32</span>)),
-<span style="color: #009900">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_cookie</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"sessionid"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">SessionID</span>, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Set a cookie with an expiration time</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">SessionID</font> <font color="#990000">=</font> <b><font color="#000000">base64:encode</font></b>(<b><font color="#000000">crypto:strong_rand_bytes</font></b>(<font color="#993399">32</font>)),
+<font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_cookie</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"sessionid"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">SessionID</font>, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Set a cookie with an expiration time</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: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_cookie</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"lang"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"fr-FR"</span><span style="color: #990000">&gt;&gt;</span>,
- <span style="color: #009900">Req0</span>, #{<span style="color: #0000FF">max_age</span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">3600</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Delete a cookie</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_cookie</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"lang"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"fr-FR"</font><font color="#990000">&gt;&gt;</font>,
+ <font color="#009900">Req0</font>, #{<font color="#0000FF">max_age</font> <font color="#990000">=&gt;</font> <font color="#993399">3600</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Delete a cookie</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: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_cookie</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"sessionid"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;&gt;&gt;</span>,
- <span style="color: #009900">Req0</span>, #{<span style="color: #0000FF">max_age</span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">0</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Set a cookie for a specific domain and path</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_cookie</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"sessionid"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;&gt;&gt;</font>,
+ <font color="#009900">Req0</font>, #{<font color="#0000FF">max_age</font> <font color="#990000">=&gt;</font> <font color="#993399">0</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Set a cookie for a specific domain and 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">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_cookie</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"inaccount"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"1"</span><span style="color: #990000">&gt;&gt;</span>,
- <span style="color: #009900">Req0</span>, #{<span style="color: #0000FF">domain</span> <span style="color: #990000">=&gt;</span> <span style="color: #FF0000">"my.example.org"</span>, <span style="color: #0000FF">path</span> <span style="color: #990000">=&gt;</span> <span style="color: #FF0000">"/account"</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Restrict a cookie to HTTPS</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_cookie</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"inaccount"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"1"</font><font color="#990000">&gt;&gt;</font>,
+ <font color="#009900">Req0</font>, #{<font color="#0000FF">domain</font> <font color="#990000">=&gt;</font> <font color="#FF0000">"my.example.org"</font>, <font color="#0000FF">path</font> <font color="#990000">=&gt;</font> <font color="#FF0000">"/account"</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Restrict a cookie 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="color: #009900">SessionID</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">base64:encode</span></span>(<span style="font-weight: bold"><span style="color: #000000">crypto:strong_rand_bytes</span></span>(<span style="color: #993399">32</span>)),
-<span style="color: #009900">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_cookie</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"sessionid"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">SessionID</span>,
- <span style="color: #009900">Req0</span>, #{<span style="color: #0000FF">secure</span> <span style="color: #990000">=&gt;</span> <span style="color: #000080">true</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Restrict a cookie to HTTP</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">SessionID</font> <font color="#990000">=</font> <b><font color="#000000">base64:encode</font></b>(<b><font color="#000000">crypto:strong_rand_bytes</font></b>(<font color="#993399">32</font>)),
+<font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_cookie</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"sessionid"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">SessionID</font>,
+ <font color="#009900">Req0</font>, #{<font color="#0000FF">secure</font> <font color="#990000">=&gt;</font> <font color="#000080">true</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Restrict a cookie to HTTP</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">SessionID</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">base64:encode</span></span>(<span style="font-weight: bold"><span style="color: #000000">crypto:strong_rand_bytes</span></span>(<span style="color: #993399">32</span>)),
-<span style="color: #009900">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_cookie</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"sessionid"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">SessionID</span>,
- <span style="color: #009900">Req0</span>, #{<span style="color: #0000FF">http_only</span> <span style="color: #990000">=&gt;</span> <span style="color: #000080">true</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">SessionID</font> <font color="#990000">=</font> <b><font color="#000000">base64:encode</font></b>(<b><font color="#000000">crypto:strong_rand_bytes</font></b>(<font color="#993399">32</font>)),
+<font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_cookie</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"sessionid"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">SessionID</font>,
+ <font color="#009900">Req0</font>, #{<font color="#0000FF">http_only</font> <font color="#990000">=&gt;</font> <font color="#000080">true</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
<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.set_resp_header">cowboy_req:set_resp_header(3)</a>,
-<a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a>,
-<a href="../cowboy_req.reply">cowboy_req:reply(3)</a>,
-<a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a>, <a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a>, <a href="../cowboy_req.reply">cowboy_req:reply(3)</a>, <a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a></p>
+
diff --git a/docs/en/cowboy/2.2/manual/cowboy_req.set_resp_header/index.html b/docs/en/cowboy/2.2/manual/cowboy_req.set_resp_header/index.html
index 9e78ece1..029d8cab 100644
--- a/docs/en/cowboy/2.2/manual/cowboy_req.set_resp_header/index.html
+++ b/docs/en/cowboy/2.2/manual/cowboy_req.set_resp_header/index.html
@@ -62,121 +62,60 @@
<h1 class="lined-header"><span>cowboy_req:set_resp_header(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:set_resp_header - Set a response header</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:set_resp_header - Set a response header</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">set_resp_header</span></span>(<span style="color: #009900">Name</span>, <span style="color: #009900">Value</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">Req</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="font-style: italic"><span style="color: #9A1900">%% lowercase; case insensitive</span></span>
-<span style="color: #009900">Value</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>() <span style="font-style: italic"><span style="color: #9A1900">%% case depends on header</span></span></tt></pre></div></div>
-<div class="paragraph"><p>Set a header to be sent with the response.</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>Cowboy does not allow duplicate header names. Headers set
-by this function may be overwritten by those set from the
-reply functions.</p></div>
-<div class="paragraph"><p>Use <a href="../cowboy_req.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a>
-instead of this function to set cookies.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">set_resp_header</font></b>(<font color="#009900">Name</font>, <font color="#009900">Value</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> <font color="#009900">Req</font>
+
+<font color="#009900">Name</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% lowercase; case insensitive</font></i>
+<font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000000">iodata</font></b>() <i><font color="#9A1900">%% case depends on header</font></i></tt></pre>
+</div></div>
+<p>Set a header to be sent with the response.</p>
+<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>
+<p>Cowboy does not allow duplicate header names. Headers set by this function may be overwritten by those set from the reply functions.</p>
+<p>Use <a href="../cowboy_req.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a> instead of this function to set cookies.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Name
-</dt>
-<dd>
-<p>
-Header name as a lowercase binary string.
-</p>
+<dl><dt>Name</dt>
+<dd><p>Header name as a lowercase binary string.</p>
</dd>
-<dt class="hdlist1">
-Value
-</dt>
-<dd>
-<p>
-Header value.
-</p>
+<dt>Value</dt>
+<dd><p>Header value.</p>
</dd>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A new Req object is returned.</p></div>
-<div class="paragraph"><p>The returned Req object must be used from that point onward,
-otherwise the header will not be sent in the response.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>A new Req object is returned.</p>
+<p>The returned Req object must be used from that point onward, otherwise the header will not be sent in the response.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<ul><li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Set a header in the response</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Set a header in the response</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: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"allow"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #FF0000">"GET"</span>, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Construct a header using iolists</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"allow"</font><font color="#990000">&gt;&gt;</font>, <font color="#FF0000">"GET"</font>, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Construct a header using iolists</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: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"allow"</span><span style="color: #990000">&gt;&gt;</span>,
- [<span style="font-weight: bold"><span style="color: #000000">allowed_methods</span></span>(), <span style="color: #FF0000">", OPTIONS"</span>], <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"allow"</font><font color="#990000">&gt;&gt;</font>,
+ [<b><font color="#000000">allowed_methods</font></b>(), <font color="#FF0000">", OPTIONS"</font>], <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a>,
-<a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a>,
-<a href="../cowboy_req.has_resp_header">cowboy_req:has_resp_header(3)</a>,
-<a href="../cowboy_req.resp_header">cowboy_req:resp_header(3)</a>,
-<a href="../cowboy_req.resp_headers">cowboy_req:resp_headers(3)</a>,
-<a href="../cowboy_req.delete_resp_header">cowboy_req:delete_resp_header(3)</a>,
-<a href="../cowboy_req.reply">cowboy_req:reply(3)</a>,
-<a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a>, <a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a>, <a href="../cowboy_req.has_resp_header">cowboy_req:has_resp_header(3)</a>, <a href="../cowboy_req.resp_header">cowboy_req:resp_header(3)</a>, <a href="../cowboy_req.resp_headers">cowboy_req:resp_headers(3)</a>, <a href="../cowboy_req.delete_resp_header">cowboy_req:delete_resp_header(3)</a>, <a href="../cowboy_req.reply">cowboy_req:reply(3)</a>, <a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a></p>
+
diff --git a/docs/en/cowboy/2.2/manual/cowboy_req.set_resp_headers/index.html b/docs/en/cowboy/2.2/manual/cowboy_req.set_resp_headers/index.html
index 8eb7ab4f..a31f0c5e 100644
--- a/docs/en/cowboy/2.2/manual/cowboy_req.set_resp_headers/index.html
+++ b/docs/en/cowboy/2.2/manual/cowboy_req.set_resp_headers/index.html
@@ -62,109 +62,51 @@
<h1 class="lined-header"><span>cowboy_req:set_resp_headers(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:set_resp_headers - Set several response headers</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:set_resp_headers - Set several response headers</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">set_resp_headers</span></span>(<span style="color: #009900">Headers</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">Req</span>
-
-<span style="color: #009900">Headers</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:http_headers</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Set several headers to be sent with the response.</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>Cowboy does not allow duplicate header names. Headers set
-by this function may be overwritten by those set from the
-reply functions. Likewise, headers set by this function may
-overwrite headers that were set previously.</p></div>
-<div class="paragraph"><p>Use <a href="../cowboy_req.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a>
-instead of this function to set cookies.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">set_resp_headers</font></b>(<font color="#009900">Headers</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> <font color="#009900">Req</font>
+
+<font color="#009900">Headers</font> <font color="#990000">::</font> <b><font color="#000000">cowboy:http_headers</font></b>()</tt></pre>
+</div></div>
+<p>Set several headers to be sent with the response.</p>
+<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>
+<p>Cowboy does not allow duplicate header names. Headers set by this function may be overwritten by those set from the reply functions. Likewise, headers set by this function may overwrite headers that were set previously.</p>
+<p>Use <a href="../cowboy_req.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a> instead of this function to set cookies.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Headers
-</dt>
-<dd>
-<p>
-Headers as a map with keys being lowercase binary strings,
-and values as binary strings.
-</p>
+<dl><dt>Headers</dt>
+<dd><p>Headers as a map with keys being lowercase binary strings, and values as binary strings.</p>
</dd>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A new Req object is returned.</p></div>
-<div class="paragraph"><p>The returned Req object must be used from that point onward,
-otherwise the headers will not be sent in the response.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>A new Req object is returned.</p>
+<p>The returned Req object must be used from that point onward, otherwise the headers will not be sent in the response.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced.
-</p>
+<ul><li><strong>2.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Set several response headers</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Set several response 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">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_headers</span></span>(#{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/html"</span><span style="color: #990000">&gt;&gt;</span>,
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-encoding"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"gzip"</span><span style="color: #990000">&gt;&gt;</span>
-}, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_headers</font></b>(#{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/html"</font><font color="#990000">&gt;&gt;</font>,
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-encoding"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"gzip"</font><font color="#990000">&gt;&gt;</font>
+}, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a>,
-<a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a>,
-<a href="../cowboy_req.has_resp_header">cowboy_req:has_resp_header(3)</a>,
-<a href="../cowboy_req.resp_header">cowboy_req:resp_header(3)</a>,
-<a href="../cowboy_req.resp_headers">cowboy_req:resp_headers(3)</a>,
-<a href="../cowboy_req.delete_resp_header">cowboy_req:delete_resp_header(3)</a>,
-<a href="../cowboy_req.reply">cowboy_req:reply(3)</a>,
-<a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a>, <a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a>, <a href="../cowboy_req.has_resp_header">cowboy_req:has_resp_header(3)</a>, <a href="../cowboy_req.resp_header">cowboy_req:resp_header(3)</a>, <a href="../cowboy_req.resp_headers">cowboy_req:resp_headers(3)</a>, <a href="../cowboy_req.delete_resp_header">cowboy_req:delete_resp_header(3)</a>, <a href="../cowboy_req.reply">cowboy_req:reply(3)</a>, <a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a></p>
+
diff --git a/docs/en/cowboy/2.2/manual/cowboy_req.sock/index.html b/docs/en/cowboy/2.2/manual/cowboy_req.sock/index.html
index c7784c1f..7eb0187d 100644
--- a/docs/en/cowboy/2.2/manual/cowboy_req.sock/index.html
+++ b/docs/en/cowboy/2.2/manual/cowboy_req.sock/index.html
@@ -62,86 +62,47 @@
<h1 class="lined-header"><span>cowboy_req:sock(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:sock - Socket address and port</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:sock - Socket address and port</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">sock</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">Info</span>
+<pre><tt><b><font color="#000000">sock</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <font color="#009900">Info</font>
-<span style="color: #009900">Info</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 socket&#8217;s IP address and port number.</p></div>
-<div class="paragraph"><p>The socket information can also be obtained using pattern matching:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<font color="#009900">Info</font> <font color="#990000">::</font> {<b><font color="#000000">inet:ip_address</font></b>(), <b><font color="#000000">inet:port_number</font></b>()}</tt></pre>
+</div></div>
+<p>Return the socket&apos;s IP address and port number.</p>
+<p>The socket information can also be obtained using pattern matching:</p>
+<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">sock</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">
+<pre><tt>#{<font color="#FF6600">sock</font> <font color="#990000">:=</font> {<font color="#009900">IP</font>, <font color="#009900">Port</font>}} <font color="#990000">=</font> <font color="#009900">Req</font><font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The socket&#8217;s local IP address and port number.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The socket&apos;s local IP address and port number.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.1</strong>: Function introduced.
-</p>
+<ul><li><strong>2.1</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Get the socket&#8217;s IP address and port number.</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Get the socket&apos;s 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:sock</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#009900">IP</font>, <font color="#009900">Port</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:sock</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.peer">cowboy_req:peer(3)</a>,
-<a href="../cowboy_req.cert">cowboy_req:cert(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.peer">cowboy_req:peer(3)</a>, <a href="../cowboy_req.cert">cowboy_req:cert(3)</a></p>
+
diff --git a/docs/en/cowboy/2.2/manual/cowboy_req.stream_body/index.html b/docs/en/cowboy/2.2/manual/cowboy_req.stream_body/index.html
index 7c0d9368..e1e94530 100644
--- a/docs/en/cowboy/2.2/manual/cowboy_req.stream_body/index.html
+++ b/docs/en/cowboy/2.2/manual/cowboy_req.stream_body/index.html
@@ -62,119 +62,56 @@
<h1 class="lined-header"><span>cowboy_req:stream_body(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:stream_body - Stream the response body</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:stream_body - Stream the response body</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">stream_body</span></span>(<span style="color: #009900">Data</span>, <span style="color: #009900">IsFin</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: #FF6600">ok</span>
-
-<span style="color: #009900">Data</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>()
-<span style="color: #009900">IsFin</span> <span style="color: #990000">::</span> <span style="color: #FF6600">fin</span> | <span style="color: #FF6600">nofin</span></tt></pre></div></div>
-<div class="paragraph"><p>Stream the response body.</p></div>
-<div class="paragraph"><p>This function may be called as many times as needed after
-initiating a response using the
-<a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a>
-function.</p></div>
-<div class="paragraph"><p>The second argument indicates if this call is the final
-call. Use the <code>nofin</code> value until you know no more data
-will be sent. The final call should use <code>fin</code> (possibly
-with an empty data value) or be a call to the
-<a href="../cowboy_req.stream_trailers">cowboy_req:stream_trailers(3)</a>
-function.</p></div>
-<div class="paragraph"><p>Note that not using <code>fin</code> for the final call is not an
-error; Cowboy will take care of it when the request
-handler terminates if needed. Depending on the resource
-it may however be more efficient to do it as early as
-possible.</p></div>
-<div class="paragraph"><p>You do not need to handle HEAD requests specifically as
-Cowboy will ensure no data is sent when you call this function.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">stream_body</font></b>(<font color="#009900">Data</font>, <font color="#009900">IsFin</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <font color="#FF6600">ok</font>
+
+<font color="#009900">Data</font> <font color="#990000">::</font> <b><font color="#000000">iodata</font></b>()
+<font color="#009900">IsFin</font> <font color="#990000">::</font> <font color="#FF6600">fin</font> | <font color="#FF6600">nofin</font></tt></pre>
+</div></div>
+<p>Stream the response body.</p>
+<p>This function may be called as many times as needed after initiating a response using the <a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a> function.</p>
+<p>The second argument indicates if this call is the final call. Use the <code>nofin</code> value until you know no more data will be sent. The final call should use <code>fin</code> (possibly with an empty data value) or be a call to the <a href="../cowboy_req.stream_trailers">cowboy_req:stream_trailers(3)</a> function.</p>
+<p>Note that not using <code>fin</code> for the final call is not an error; Cowboy will take care of it when the request handler terminates if needed. Depending on the resource it may however be more efficient to do it as early as possible.</p>
+<p>You do not need to handle HEAD requests specifically as Cowboy will ensure no data is sent when you call this function.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Data
-</dt>
-<dd>
-<p>
-The data to be sent.
-</p>
+<dl><dt>Data</dt>
+<dd><p>The data to be sent.</p>
</dd>
-<dt class="hdlist1">
-IsFin
-</dt>
-<dd>
-<p>
-A flag indicating whether this is the final piece of data
-to be sent.
-</p>
+<dt>IsFin</dt>
+<dd><p>A flag indicating whether this is the final piece of data to be sent.</p>
</dd>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The atom <code>ok</code> is always returned. It can be safely ignored.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The atom <code>ok</code> is always returned. It can be safely ignored.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced. Replaces <code>chunk/2</code>.
-</p>
+<ul><li><strong>2.0</strong>: Function introduced. Replaces <code>chunk/2</code>.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Stream the response body</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Stream the response body</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: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_reply</span></span>(<span style="color: #993399">200</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/plain"</span><span style="color: #990000">&gt;&gt;</span>
-}, <span style="color: #009900">Req0</span>),
-<span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_body</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Hello\n"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #FF6600">nofin</span>, <span style="color: #009900">Req</span>),
-<span style="font-weight: bold"><span style="color: #000000">timer:sleep</span></span>(<span style="color: #993399">1000</span>),
-<span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_body</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"World!\n"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #FF6600">fin</span>, <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:stream_reply</font></b>(<font color="#993399">200</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/plain"</font><font color="#990000">&gt;&gt;</font>
+}, <font color="#009900">Req0</font>),
+<b><font color="#000000">cowboy_req:stream_body</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"Hello\n"</font><font color="#990000">&gt;&gt;</font>, <font color="#FF6600">nofin</font>, <font color="#009900">Req</font>),
+<b><font color="#000000">timer:sleep</font></b>(<font color="#993399">1000</font>),
+<b><font color="#000000">cowboy_req:stream_body</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"World!\n"</font><font color="#990000">&gt;&gt;</font>, <font color="#FF6600">fin</font>, <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.stream_reply">cowboy_req:stream_reply(3)</a>,
-<a href="../cowboy_req.stream_trailers">cowboy_req:stream_trailers(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a>, <a href="../cowboy_req.stream_trailers">cowboy_req:stream_trailers(3)</a></p>
+
diff --git a/docs/en/cowboy/2.2/manual/cowboy_req.stream_reply/index.html b/docs/en/cowboy/2.2/manual/cowboy_req.stream_reply/index.html
index 14f072a3..71a2179c 100644
--- a/docs/en/cowboy/2.2/manual/cowboy_req.stream_reply/index.html
+++ b/docs/en/cowboy/2.2/manual/cowboy_req.stream_reply/index.html
@@ -62,152 +62,76 @@
<h1 class="lined-header"><span>cowboy_req:stream_reply(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:stream_reply - Send the response headers</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:stream_reply - Send the response headers</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">stream_reply</span></span>(<span style="color: #009900">Status</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">stream_reply</span></span>(<span style="color: #009900">StatusCode</span>, #{}, <span style="color: #009900">Req</span>)
-
-<span style="font-weight: bold"><span style="color: #000000">stream_reply</span></span>(<span style="color: #009900">Status</span>, <span style="color: #009900">Headers</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">Req</span>
-
-<span style="color: #009900">Status</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:http_status</span></span>()
-<span style="color: #009900">Headers</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:http_headers</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Send the response headers.</p></div>
-<div class="paragraph"><p>The header names must be given as lowercase binary strings.
-While header names are case insensitive, Cowboy requires them
-to be given as lowercase to function properly.</p></div>
-<div class="paragraph"><p>Cowboy does not allow duplicate header names. Headers set
-by this function may overwrite those set by <code>set_resp_header/3</code>.</p></div>
-<div class="paragraph"><p>Use <a href="../cowboy_req.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a>
-instead of this function to set cookies.</p></div>
-<div class="paragraph"><p>If a response body was set before calling this function,
-it will not be sent.</p></div>
-<div class="paragraph"><p>Use <a href="../cowboy_req.stream_body">cowboy_req:stream_body(3)</a>
-to stream the response body and optionally
-<a href="../cowboy_req.stream_trailers">cowboy_req:stream_trailers(3)</a>
-to send response trailer field values.</p></div>
-<div class="paragraph"><p>You may want to set the content-length header when using
-this function, if it is known in advance. This will allow
-clients using HTTP/2 and HTTP/1.0 to process the response
-more efficiently.</p></div>
-<div class="paragraph"><p>The streaming method varies depending on the protocol being
-used. HTTP/2 will use the usual DATA frames. HTTP/1.1 will
-use chunked transfer-encoding. HTTP/1.0 will send the body
-unmodified and close the connection at the end if no
-content-length was set.</p></div>
-<div class="paragraph"><p>It is not possible to push resources after this function
-returns. Any attempt will result in an error.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">stream_reply</font></b>(<font color="#009900">Status</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> <b><font color="#000000">stream_reply</font></b>(<font color="#009900">StatusCode</font>, #{}, <font color="#009900">Req</font>)
+
+<b><font color="#000000">stream_reply</font></b>(<font color="#009900">Status</font>, <font color="#009900">Headers</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> <font color="#009900">Req</font>
+
+<font color="#009900">Status</font> <font color="#990000">::</font> <b><font color="#000000">cowboy:http_status</font></b>()
+<font color="#009900">Headers</font> <font color="#990000">::</font> <b><font color="#000000">cowboy:http_headers</font></b>()</tt></pre>
+</div></div>
+<p>Send the response headers.</p>
+<p>The header names must be given as lowercase binary strings. While header names are case insensitive, Cowboy requires them to be given as lowercase to function properly.</p>
+<p>Cowboy does not allow duplicate header names. Headers set by this function may overwrite those set by <code>set_resp_header/3</code>.</p>
+<p>Use <a href="../cowboy_req.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a> instead of this function to set cookies.</p>
+<p>If a response body was set before calling this function, it will not be sent.</p>
+<p>Use <a href="../cowboy_req.stream_body">cowboy_req:stream_body(3)</a> to stream the response body and optionally <a href="../cowboy_req.stream_trailers">cowboy_req:stream_trailers(3)</a> to send response trailer field values.</p>
+<p>You may want to set the content-length header when using this function, if it is known in advance. This will allow clients using HTTP/2 and HTTP/1.0 to process the response more efficiently.</p>
+<p>The streaming method varies depending on the protocol being used. HTTP/2 will use the usual DATA frames. HTTP/1.1 will use chunked transfer-encoding. HTTP/1.0 will send the body unmodified and close the connection at the end if no content-length was set.</p>
+<p>It is not possible to push resources after this function returns. Any attempt will result in an error.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Status
-</dt>
-<dd>
-<p>
-The status code for the response.
-</p>
+<dl><dt>Status</dt>
+<dd><p>The status code for the response.</p>
</dd>
-<dt class="hdlist1">
-Headers
-</dt>
-<dd>
-<p>
-The response headers.
-</p>
+<dt>Headers</dt>
+<dd><p>The response headers.</p>
</dd>
-</dl></div>
-<div class="paragraph"><p>Header names must be given as lowercase binary strings.</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+</dl>
+<p>Header names must be given as lowercase binary strings.</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A new Req object is returned.</p></div>
-<div class="paragraph"><p>The returned Req object must be used from that point onward
-in order to be able to stream the response body.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>A new Req object is returned.</p>
+<p>The returned Req object must be used from that point onward in order to be able to stream the response body.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Only the Req is returned, it is no longer wrapped in a tuple.
-</p>
+<ul><li><strong>2.0</strong>: Only the Req is returned, it is no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced. Replaces <code>chunked_reply/1,2</code>.
-</p>
+<li><strong>2.0</strong>: Function introduced. Replaces <code>chunked_reply/1,2</code>.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Initiate the response</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Initiate the response</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: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_reply</span></span>(<span style="color: #993399">200</span>, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Stream the response with custom headers</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:stream_reply</font></b>(<font color="#993399">200</font>, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Stream the response with custom 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">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_reply</span></span>(<span style="color: #993399">200</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/plain"</span><span style="color: #990000">&gt;&gt;</span>
-}, <span style="color: #009900">Req0</span>),
-<span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_body</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Hello\n"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #FF6600">nofin</span>, <span style="color: #009900">Req</span>),
-<span style="font-weight: bold"><span style="color: #000000">timer:sleep</span></span>(<span style="color: #993399">1000</span>),
-<span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_body</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"World!\n"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #FF6600">fin</span>, <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:stream_reply</font></b>(<font color="#993399">200</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/plain"</font><font color="#990000">&gt;&gt;</font>
+}, <font color="#009900">Req0</font>),
+<b><font color="#000000">cowboy_req:stream_body</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"Hello\n"</font><font color="#990000">&gt;&gt;</font>, <font color="#FF6600">nofin</font>, <font color="#009900">Req</font>),
+<b><font color="#000000">timer:sleep</font></b>(<font color="#993399">1000</font>),
+<b><font color="#000000">cowboy_req:stream_body</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"World!\n"</font><font color="#990000">&gt;&gt;</font>, <font color="#FF6600">fin</font>, <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a>,
-<a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a>,
-<a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a>,
-<a href="../cowboy_req.inform">cowboy_req:inform(3)</a>,
-<a href="../cowboy_req.reply">cowboy_req:reply(3)</a>,
-<a href="../cowboy_req.stream_body">cowboy_req:stream_body(3)</a>,
-<a href="../cowboy_req.stream_trailers">cowboy_req:stream_trailers(3)</a>,
-<a href="../cowboy_req.push">cowboy_req:push(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a>, <a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a>, <a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a>, <a href="../cowboy_req.inform">cowboy_req:inform(3)</a>, <a href="../cowboy_req.reply">cowboy_req:reply(3)</a>, <a href="../cowboy_req.stream_body">cowboy_req:stream_body(3)</a>, <a href="../cowboy_req.stream_trailers">cowboy_req:stream_trailers(3)</a>, <a href="../cowboy_req.push">cowboy_req:push(3)</a></p>
+
diff --git a/docs/en/cowboy/2.2/manual/cowboy_req.stream_trailers/index.html b/docs/en/cowboy/2.2/manual/cowboy_req.stream_trailers/index.html
index 42961412..600fc5c4 100644
--- a/docs/en/cowboy/2.2/manual/cowboy_req.stream_trailers/index.html
+++ b/docs/en/cowboy/2.2/manual/cowboy_req.stream_trailers/index.html
@@ -62,107 +62,55 @@
<h1 class="lined-header"><span>cowboy_req:stream_trailers(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:stream_trailers - Send the response trailers</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:stream_trailers - Send the response trailers</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">stream_trailers</span></span>(<span style="color: #009900">Trailers</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: #FF6600">ok</span>
-
-<span style="color: #009900">Trailers</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:http_headers</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Send the response trailers and terminate the stream.</p></div>
-<div class="paragraph"><p>This function can only be called once, after initiating
-a response using
-<a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a>
-and sending zero or more body chunks using
-<a href="../cowboy_req.stream_body">cowboy_req:stream_body(3)</a>
-with the <code>nofin</code> argument set. The function <code>stream_trailers/2</code>
-implies <code>fin</code> and automatically terminate the response.</p></div>
-<div class="paragraph"><p>You must list all field names sent in trailers in the
-trailer header, otherwise they might be dropped by intermediaries
-or clients.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">stream_trailers</font></b>(<font color="#009900">Trailers</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <font color="#FF6600">ok</font>
+
+<font color="#009900">Trailers</font> <font color="#990000">::</font> <b><font color="#000000">cowboy:http_headers</font></b>()</tt></pre>
+</div></div>
+<p>Send the response trailers and terminate the stream.</p>
+<p>This function can only be called once, after initiating a response using <a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a> and sending zero or more body chunks using <a href="../cowboy_req.stream_body">cowboy_req:stream_body(3)</a> with the <code>nofin</code> argument set. The function <code>stream_trailers/2</code> implies <code>fin</code> and automatically terminate the response.</p>
+<p>You must list all field names sent in trailers in the trailer header, otherwise they might be dropped by intermediaries or clients.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Trailers
-</dt>
-<dd>
-<p>
-Trailer field values to be sent.
-</p>
+<dl><dt>Trailers</dt>
+<dd><p>Trailer field values to be sent.</p>
</dd>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The atom <code>ok</code> is always returned. It can be safely ignored.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The atom <code>ok</code> is always returned. It can be safely ignored.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.2</strong>: Function introduced.
-</p>
+<ul><li><strong>2.2</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Stream a response body with trailers</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Stream a response body with trailers</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: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_reply</span></span>(<span style="color: #993399">200</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/plain"</span><span style="color: #990000">&gt;&gt;</span>,
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"trailer"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"expires, content-md5"</span><span style="color: #990000">&gt;&gt;</span>
-}, <span style="color: #009900">Req0</span>),
-<span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_body</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Hello\n"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #FF6600">nofin</span>, <span style="color: #009900">Req</span>),
-<span style="font-weight: bold"><span style="color: #000000">timer:sleep</span></span>(<span style="color: #993399">1000</span>),
-<span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_body</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"World!\n"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #FF6600">nofin</span>, <span style="color: #009900">Req</span>)<span style="color: #990000">.</span>
-<span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_trailers</span></span>(#{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"expires"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Sun, 10 Dec 2017 19:13:47 GMT"</span><span style="color: #990000">&gt;&gt;</span>,
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-md5"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"fbf68a8e34b2ded53bba54e68794b4fe"</span><span style="color: #990000">&gt;&gt;</span>
-}, <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:stream_reply</font></b>(<font color="#993399">200</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/plain"</font><font color="#990000">&gt;&gt;</font>,
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"trailer"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"expires, content-md5"</font><font color="#990000">&gt;&gt;</font>
+}, <font color="#009900">Req0</font>),
+<b><font color="#000000">cowboy_req:stream_body</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"Hello\n"</font><font color="#990000">&gt;&gt;</font>, <font color="#FF6600">nofin</font>, <font color="#009900">Req</font>),
+<b><font color="#000000">timer:sleep</font></b>(<font color="#993399">1000</font>),
+<b><font color="#000000">cowboy_req:stream_body</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"World!\n"</font><font color="#990000">&gt;&gt;</font>, <font color="#FF6600">nofin</font>, <font color="#009900">Req</font>)<font color="#990000">.</font>
+<b><font color="#000000">cowboy_req:stream_trailers</font></b>(#{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"expires"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"Sun, 10 Dec 2017 19:13:47 GMT"</font><font color="#990000">&gt;&gt;</font>,
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-md5"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"fbf68a8e34b2ded53bba54e68794b4fe"</font><font color="#990000">&gt;&gt;</font>
+}, <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.stream_reply">cowboy_req:stream_reply(3)</a>,
-<a href="../cowboy_req.stream_body">cowboy_req:stream_body(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a>, <a href="../cowboy_req.stream_body">cowboy_req:stream_body(3)</a></p>
+
diff --git a/docs/en/cowboy/2.2/manual/cowboy_req.uri/index.html b/docs/en/cowboy/2.2/manual/cowboy_req.uri/index.html
index 18bcaad2..6abe3b58 100644
--- a/docs/en/cowboy/2.2/manual/cowboy_req.uri/index.html
+++ b/docs/en/cowboy/2.2/manual/cowboy_req.uri/index.html
@@ -62,177 +62,106 @@
<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">
+<p>cowboy_req:uri - Reconstructed URI</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">
+<pre><tt><b><font color="#000000">uri</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <b><font color="#000000">uri</font></b>(<font color="#009900">Req</font>, #{})
+<b><font color="#000000">uri</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>(), <font color="#009900">Opts</font>) <font color="#990000">-&gt;</font> <font color="#009900">URI</font> <font color="#990000">::</font> <b><font color="#000000">iodata</font></b>()
+
+<font color="#009900">Opts</font> <font color="#990000">::</font> #{
+ <font color="#0000FF">scheme</font> <font color="#990000">=&gt;</font> <b><font color="#000000">iodata</font></b>() | <font color="#000080">undefined</font>,
+ <font color="#0000FF">host</font> <font color="#990000">=&gt;</font> <b><font color="#000000">iodata</font></b>() | <font color="#000080">undefined</font>,
+ <font color="#0000FF">port</font> <font color="#990000">=&gt;</font> <b><font color="#000000">inet:port_number</font></b>() | <font color="#000080">undefined</font>,
+ <font color="#0000FF">path</font> <font color="#990000">=&gt;</font> <b><font color="#000000">iodata</font></b>() | <font color="#000080">undefined</font>,
+ <font color="#0000FF">qs</font> <font color="#990000">=&gt;</font> <b><font color="#000000">iodata</font></b>() | <font color="#000080">undefined</font>,
+ <font color="#0000FF">fragment</font> <font color="#990000">=&gt;</font> <b><font color="#000000">iodata</font></b>() | <font color="#000080">undefined</font>
+}</tt></pre>
+</div></div>
+<p>Reconstruct the effective request URI, optionally modifying components.</p>
+<p>By default Cowboy will build a URI using the components found in the request. Options allow disabling or replacing individual components.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>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>
+<dt>Opts</dt>
+<dd><p>Map for overriding individual components.</p>
+<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>
+<p>As this function always returns a valid URI, there are some things to note:</p>
+<ul><li>Disabling the host also disables the scheme and port.
</li>
-<li>
-<p>
-There is no fragment component by default as these are
- not sent with the request.
-</p>
+<li>There is no fragment component by default as these are not sent with the request.
</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>The port number may not appear in the resulting URI if it is the default port for the given scheme (http: 80; https: 443).
</li>
-</ul></div>
+</ul>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<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">
+<p>The reconstructed URI is returned as an iolist or a binary string.</p>
<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>
+<ul><li><strong>2.0</strong>: Individual components can be replaced or disabled.
</li>
-<li>
-<p>
-<strong>2.0</strong>: Only the URI is returned, it is no longer wrapped in a tuple.
-</p>
+<li><strong>2.0</strong>: Only the URI is returned, it is no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced. Replaces <code>host_url/1</code> and <code>url/1</code>.
-</p>
+<li><strong>2.0</strong>: Function introduced. Replaces <code>host_url/1</code> and <code>url/1</code>.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<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
+<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 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
+<pre><tt><i><font color="#9A1900">%% //example.org/path/to/res?edit=1</font></i>
+<b><font color="#000000">cowboy_req:uri</font></b>(<font color="#009900">Req</font>, #{<font color="#0000FF">scheme</font> <font color="#990000">=&gt;</font> <font color="#000080">undefined</font>})<font color="#990000">.</font></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
+<pre><tt><i><font color="#9A1900">%% </font></i><u><font color="#0000FF">http://example.org</font></u>
+<b><font color="#000000">cowboy_req:uri</font></b>(<font color="#009900">Req</font>, #{<font color="#0000FF">path</font> <font color="#990000">=&gt;</font> <font color="#000080">undefined</font>, <font color="#0000FF">qs</font> <font color="#990000">=&gt;</font> <font color="#000080">undefined</font>})<font color="#990000">.</font></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
+<pre><tt><i><font color="#9A1900">%% /path/to/res?edit=1</font></i>
+<b><font color="#000000">cowboy_req:uri</font></b>(<font color="#009900">Req</font>, #{<font color="#0000FF">host</font> <font color="#990000">=&gt;</font> <font color="#000080">undefined</font>})<font color="#990000">.</font></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
+<pre><tt><i><font color="#9A1900">%% </font></i><u><font color="#0000FF">http://example.org/path/to/res</font></u><i><font color="#9A1900">?edit=1#errors</font></i>
+<b><font color="#000000">cowboy_req:uri</font></b>(<font color="#009900">Req</font>, #{<font color="#0000FF">fragment</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"errors"</font><font color="#990000">&gt;&gt;</font>})<font color="#990000">.</font></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
+<pre><tt><i><font color="#9A1900">%% </font></i><u><font color="#0000FF">https://example.org/path/to/res</font></u><i><font color="#9A1900">?edit=1</font></i>
+<b><font color="#000000">cowboy_req:uri</font></b>(<font color="#009900">Req</font>, #{<font color="#0000FF">scheme</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"https"</font><font color="#990000">&gt;&gt;</font>})<font color="#990000">.</font></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">
+<pre><tt><b><font color="#000000">iolist_to_binary</font></b>(<b><font color="#000000">cowboy_req:uri</font></b>(<font color="#009900">Req</font>))<font color="#990000">.</font></tt></pre>
+</div></div>
<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>
+<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>
+
diff --git a/docs/en/cowboy/2.2/manual/cowboy_req.version/index.html b/docs/en/cowboy/2.2/manual/cowboy_req.version/index.html
index 5e4c84fc..0d978ee3 100644
--- a/docs/en/cowboy/2.2/manual/cowboy_req.version/index.html
+++ b/docs/en/cowboy/2.2/manual/cowboy_req.version/index.html
@@ -62,88 +62,47 @@
<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">
+<p>cowboy_req:version - HTTP version</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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
+<pre><tt><b><font color="#000000">version</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <font color="#009900">Version</font> <font color="#990000">::</font> <b><font color="#000000">cowboy:http_version</font></b>()</tt></pre>
+</div></div>
+<p>Return the HTTP version used for the request.</p>
+<p>The version can also be obtained using pattern matching:</p>
+<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">
+<pre><tt>#{<font color="#FF6600">version</font> <font color="#990000">:=</font> <font color="#009900">Version</font>} <font color="#990000">=</font> <font color="#009900">Req</font><font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<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">
+<p>The HTTP version used for the request is returned as an atom. It is provided for informative purposes only.</p>
<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>
+<ul><li><strong>2.0</strong>: Only the version is returned, it is no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<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
+<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">
+<pre><tt><font color="#009900">Version</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:version</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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>
+<p><a href="../cowboy_req">cowboy_req(3)</a></p>
+
diff --git a/docs/en/cowboy/2.2/manual/cowboy_req/index.html b/docs/en/cowboy/2.2/manual/cowboy_req/index.html
index db88a1b4..640e9c82 100644
--- a/docs/en/cowboy/2.2/manual/cowboy_req/index.html
+++ b/docs/en/cowboy/2.2/manual/cowboy_req/index.html
@@ -62,414 +62,218 @@
<h1 class="lined-header"><span>cowboy_req(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req - HTTP request and response</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req - HTTP request and response</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<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>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="33%" />
-<col width="33%" />
-<col width="33%" />
-<thead>
-<tr>
-<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">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>
+<p>The module <code>cowboy_req</code> provides functions to access, manipulate and respond to requests.</p>
+<p>There are four types of functions in this module. They can be differentiated by their name and their return type:</p>
+<table rules="all" width="100%" frame="border"
+ cellspacing="0" cellpadding="4">
+<thead><tr><th>Type</th>
+<th>Name pattern</th>
+<th>Return type</th>
+</tr></thead><tbody><tr><td>access</td>
+<td>no verb, parse_*, match_*</td>
+<td><code>Value</code></td>
</tr>
-<tr>
-<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><td>question</td>
+<td>has_*</td>
+<td><code>boolean()</code></td>
</tr>
-<tr>
-<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><td>modification</td>
+<td>set_*</td>
+<td><code>Req</code></td>
</tr>
-<tr>
-<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><td>action</td>
+<td>any other verb</td>
+<td><code>ok | {Result, Value, Req}</code></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>
-<div class="sect1">
+</tbody></table>
+<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&apos;s only possible to send one response, and to read the body once.</p>
<h2 id="_exports">Exports</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Connection:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../cowboy_req.peer">cowboy_req:peer(3)</a> - Peer address and port
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.sock">cowboy_req:sock(3)</a> - Socket address and port
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.cert">cowboy_req:cert(3)</a> - Client TLS certificate
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>Raw request:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../cowboy_req.method">cowboy_req:method(3)</a> - HTTP method
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.version">cowboy_req:version(3)</a> - HTTP version
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.scheme">cowboy_req:scheme(3)</a> - URI scheme
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.host">cowboy_req:host(3)</a> - URI host name
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.port">cowboy_req:port(3)</a> - URI port number
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.path">cowboy_req:path(3)</a> - URI path
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.qs">cowboy_req:qs(3)</a> - URI query string
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.uri">cowboy_req:uri(3)</a> - Reconstructed URI
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.header">cowboy_req:header(3)</a> - HTTP header
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.headers">cowboy_req:headers(3)</a> - HTTP headers
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>Processed request:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../cowboy_req.parse_qs">cowboy_req:parse_qs(3)</a> - Parse the query string
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.match_qs">cowboy_req:match_qs(3)</a> - Match the query string against constraints
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.parse_header">cowboy_req:parse_header(3)</a> - Parse the given HTTP header
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.parse_cookies">cowboy_req:parse_cookies(3)</a> - Parse cookie headers
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.match_cookies">cowboy_req:match_cookies(3)</a> - Match cookies against constraints
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.binding">cowboy_req:binding(3)</a> - Access a value bound from the route
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.bindings">cowboy_req:bindings(3)</a> - Access all values bound from the route
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.host_info">cowboy_req:host_info(3)</a> - Access the route&#8217;s heading host segments
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.path_info">cowboy_req:path_info(3)</a> - Access the route&#8217;s trailing path segments
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>Request body:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../cowboy_req.has_body">cowboy_req:has_body(3)</a> - Is there a request body?
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.body_length">cowboy_req:body_length(3)</a> - Body length
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a> - Read the request body
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.read_urlencoded_body">cowboy_req:read_urlencoded_body(3)</a> - Read and parse a urlencoded request body
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.read_part">cowboy_req:read_part(3)</a> - Read the next multipart headers
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.read_part_body">cowboy_req:read_part_body(3)</a> - Read the current part&#8217;s body
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>Response:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../cowboy_req.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a> - Set a cookie
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a> - Set a response header
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a> - Set several response headers
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.has_resp_header">cowboy_req:has_resp_header(3)</a> - Is the given response header set?
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.resp_header">cowboy_req:resp_header(3)</a> - Response header
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.resp_headers">cowboy_req:resp_headers(3)</a> - Response headers
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.delete_resp_header">cowboy_req:delete_resp_header(3)</a> - Delete a response header
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.set_resp_body">cowboy_req:set_resp_body(3)</a> - Set the response body
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.has_resp_body">cowboy_req:has_resp_body(3)</a> - Is there a response body?
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.inform">cowboy_req:inform(3)</a> - Send an informational response
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.reply">cowboy_req:reply(3)</a> - Send the response
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a> - Send the response headers
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.stream_body">cowboy_req:stream_body(3)</a> - Stream the response body
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.stream_trailers">cowboy_req:stream_trailers(3)</a> - Send the response trailers
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.push">cowboy_req:push(3)</a> - Push a resource to the client
-</p>
-</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+<p>Connection:</p>
+<ul><li><a href="../cowboy_req.peer">cowboy_req:peer(3)</a> - Peer address and port
+</li>
+<li><a href="../cowboy_req.sock">cowboy_req:sock(3)</a> - Socket address and port
+</li>
+<li><a href="../cowboy_req.cert">cowboy_req:cert(3)</a> - Client TLS certificate
+</li>
+</ul>
+<p>Raw request:</p>
+<ul><li><a href="../cowboy_req.method">cowboy_req:method(3)</a> - HTTP method
+</li>
+<li><a href="../cowboy_req.version">cowboy_req:version(3)</a> - HTTP version
+</li>
+<li><a href="../cowboy_req.scheme">cowboy_req:scheme(3)</a> - URI scheme
+</li>
+<li><a href="../cowboy_req.host">cowboy_req:host(3)</a> - URI host name
+</li>
+<li><a href="../cowboy_req.port">cowboy_req:port(3)</a> - URI port number
+</li>
+<li><a href="../cowboy_req.path">cowboy_req:path(3)</a> - URI path
+</li>
+<li><a href="../cowboy_req.qs">cowboy_req:qs(3)</a> - URI query string
+</li>
+<li><a href="../cowboy_req.uri">cowboy_req:uri(3)</a> - Reconstructed URI
+</li>
+<li><a href="../cowboy_req.header">cowboy_req:header(3)</a> - HTTP header
+</li>
+<li><a href="../cowboy_req.headers">cowboy_req:headers(3)</a> - HTTP headers
+</li>
+</ul>
+<p>Processed request:</p>
+<ul><li><a href="../cowboy_req.parse_qs">cowboy_req:parse_qs(3)</a> - Parse the query string
+</li>
+<li><a href="../cowboy_req.match_qs">cowboy_req:match_qs(3)</a> - Match the query string against constraints
+</li>
+<li><a href="../cowboy_req.parse_header">cowboy_req:parse_header(3)</a> - Parse the given HTTP header
+</li>
+<li><a href="../cowboy_req.parse_cookies">cowboy_req:parse_cookies(3)</a> - Parse cookie headers
+</li>
+<li><a href="../cowboy_req.match_cookies">cowboy_req:match_cookies(3)</a> - Match cookies against constraints
+</li>
+<li><a href="../cowboy_req.binding">cowboy_req:binding(3)</a> - Access a value bound from the route
+</li>
+<li><a href="../cowboy_req.bindings">cowboy_req:bindings(3)</a> - Access all values bound from the route
+</li>
+<li><a href="../cowboy_req.host_info">cowboy_req:host_info(3)</a> - Access the route&apos;s heading host segments
+</li>
+<li><a href="../cowboy_req.path_info">cowboy_req:path_info(3)</a> - Access the route&apos;s trailing path segments
+</li>
+</ul>
+<p>Request body:</p>
+<ul><li><a href="../cowboy_req.has_body">cowboy_req:has_body(3)</a> - Is there a request body?
+</li>
+<li><a href="../cowboy_req.body_length">cowboy_req:body_length(3)</a> - Body length
+</li>
+<li><a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a> - Read the request body
+</li>
+<li><a href="../cowboy_req.read_urlencoded_body">cowboy_req:read_urlencoded_body(3)</a> - Read and parse a urlencoded request body
+</li>
+<li><a href="../cowboy_req.read_part">cowboy_req:read_part(3)</a> - Read the next multipart headers
+</li>
+<li><a href="../cowboy_req.read_part_body">cowboy_req:read_part_body(3)</a> - Read the current part&apos;s body
+</li>
+</ul>
+<p>Response:</p>
+<ul><li><a href="../cowboy_req.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a> - Set a cookie
+</li>
+<li><a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a> - Set a response header
+</li>
+<li><a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a> - Set several response headers
+</li>
+<li><a href="../cowboy_req.has_resp_header">cowboy_req:has_resp_header(3)</a> - Is the given response header set?
+</li>
+<li><a href="../cowboy_req.resp_header">cowboy_req:resp_header(3)</a> - Response header
+</li>
+<li><a href="../cowboy_req.resp_headers">cowboy_req:resp_headers(3)</a> - Response headers
+</li>
+<li><a href="../cowboy_req.delete_resp_header">cowboy_req:delete_resp_header(3)</a> - Delete a response header
+</li>
+<li><a href="../cowboy_req.set_resp_body">cowboy_req:set_resp_body(3)</a> - Set the response body
+</li>
+<li><a href="../cowboy_req.has_resp_body">cowboy_req:has_resp_body(3)</a> - Is there a response body?
+</li>
+<li><a href="../cowboy_req.inform">cowboy_req:inform(3)</a> - Send an informational response
+</li>
+<li><a href="../cowboy_req.reply">cowboy_req:reply(3)</a> - Send the response
+</li>
+<li><a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a> - Send the response headers
+</li>
+<li><a href="../cowboy_req.stream_body">cowboy_req:stream_body(3)</a> - Stream the response body
+</li>
+<li><a href="../cowboy_req.stream_trailers">cowboy_req:stream_trailers(3)</a> - Send the response trailers
+</li>
+<li><a href="../cowboy_req.push">cowboy_req:push(3)</a> - Push a resource to the client
+</li>
+</ul>
<h2 id="_types">Types</h2>
-<div class="sectionbody">
-<div class="sect2">
<h3 id="_push_opts">push_opts()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">
+<pre><tt><b><font color="#000000">push_opts</font></b>() <font color="#990000">::</font> #{
+ <font color="#0000FF">method</font> <font color="#990000">=&gt;</font> <b><font color="#000080">binary</font></b>(), <i><font color="#9A1900">%% case sensitive</font></i>
+ <font color="#0000FF">scheme</font> <font color="#990000">=&gt;</font> <b><font color="#000080">binary</font></b>(), <i><font color="#9A1900">%% lowercase; case insensitive</font></i>
+ <font color="#0000FF">host</font> <font color="#990000">=&gt;</font> <b><font color="#000080">binary</font></b>(), <i><font color="#9A1900">%% lowercase; case insensitive</font></i>
+ <font color="#0000FF">port</font> <font color="#990000">=&gt;</font> <b><font color="#000000">inet:port_number</font></b>(),
+ <font color="#0000FF">qs</font> <font color="#990000">=&gt;</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case sensitive</font></i>
+}</tt></pre>
+</div></div>
+<p>Push options.</p>
+<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&apos;s URI.</p>
<h3 id="_read_body_opts">read_body_opts()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">
+<pre><tt><b><font color="#000000">read_body_opts</font></b>() <font color="#990000">::</font> #{
+ <b><font color="#000080">length</font></b> <font color="#990000">=&gt;</font> <b><font color="#000000">non_neg_integer</font></b>(),
+ <font color="#0000FF">period</font> <font color="#990000">=&gt;</font> <b><font color="#000000">non_neg_integer</font></b>(),
+ <font color="#0000FF">timeout</font> <font color="#990000">=&gt;</font> <b><font color="#000000">timeout</font></b>()
+}</tt></pre>
+</div></div>
+<p>Body reading options.</p>
+<p>The defaults are function-specific.</p>
<h3 id="_req">req()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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>()},
- <span style="color: #FF6600">sock</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>()},
- <span style="color: #FF6600">cert</span> <span style="color: #990000">:=</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>() | <span style="color: #000080">undefined</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
+<pre><tt><b><font color="#000000">req</font></b>() <font color="#990000">::</font> #{
+ <font color="#FF6600">method</font> <font color="#990000">:=</font> <b><font color="#000080">binary</font></b>(), <i><font color="#9A1900">%% case sensitive</font></i>
+ <font color="#FF6600">version</font> <font color="#990000">:=</font> <b><font color="#000000">cowboy:http_version</font></b>() | <b><font color="#000080">atom</font></b>(),
+ <font color="#FF6600">scheme</font> <font color="#990000">:=</font> <b><font color="#000080">binary</font></b>(), <i><font color="#9A1900">%% lowercase; case insensitive</font></i>
+ <font color="#FF6600">host</font> <font color="#990000">:=</font> <b><font color="#000080">binary</font></b>(), <i><font color="#9A1900">%% lowercase; case insensitive</font></i>
+ <font color="#FF6600">port</font> <font color="#990000">:=</font> <b><font color="#000000">inet:port_number</font></b>(),
+ <font color="#FF6600">path</font> <font color="#990000">:=</font> <b><font color="#000080">binary</font></b>(), <i><font color="#9A1900">%% case sensitive</font></i>
+ <font color="#FF6600">qs</font> <font color="#990000">:=</font> <b><font color="#000080">binary</font></b>(), <i><font color="#9A1900">%% case sensitive</font></i>
+ <font color="#FF6600">headers</font> <font color="#990000">:=</font> <b><font color="#000000">cowboy:http_headers</font></b>(),
+ <font color="#FF6600">peer</font> <font color="#990000">:=</font> {<b><font color="#000000">inet:ip_address</font></b>(), <b><font color="#000000">inet:port_number</font></b>()},
+ <font color="#FF6600">sock</font> <font color="#990000">:=</font> {<b><font color="#000000">inet:ip_address</font></b>(), <b><font color="#000000">inet:port_number</font></b>()},
+ <font color="#FF6600">cert</font> <font color="#990000">:=</font> <b><font color="#000080">binary</font></b>() | <font color="#000080">undefined</font>
+}</tt></pre>
+</div></div>
+<p>The Req object.</p>
+<p>Contains information about the request and response. While some fields are publicly documented, others aren&apos;t and shouldn&apos;t be used.</p>
+<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 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">
+<pre><tt><font color="#009900">Req</font>#{<font color="#009900">_myapp_auth_method</font> <font color="#990000">=&gt;</font> <font color="#FF6600">pubkey</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
<h3 id="_resp_body">resp_body()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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>}
+<pre><tt><b><font color="#000000">resp_body</font></b>() <font color="#990000">::</font> <b><font color="#000000">iodata</font></b>()
+ | {<font color="#FF6600">sendfile</font>, <font color="#009900">Offset</font>, <font color="#009900">Length</font>, <font color="#009900">Filename</font>}
-<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">non_neg_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
+<font color="#009900">Offset</font> <font color="#990000">::</font> <b><font color="#000000">non_neg_integer</font></b>()
+<font color="#009900">Length</font> <font color="#990000">::</font> <b><font color="#000000">non_neg_integer</font></b>()
+<font color="#009900">Filename</font> <font color="#990000">::</font> <b><font color="#000000">file:name_all</font></b>()</tt></pre>
+</div></div>
+<p>Response body.</p>
+<p>It can take two forms: the actual data to be sent or a tuple indicating which file to send.</p>
+<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 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>Note that the length must be greater than zero for any data
-to be sent. Cowboy will send an empty body when the length
-is zero.</p></div>
-</div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#993399">1</font><font color="#990000">&gt;</font> <font color="#009900">RespBody</font> <font color="#990000">=</font> [<font color="#FF0000">"Hello "</font>, [<font color="#990000">&lt;&lt;</font><font color="#FF0000">"world"</font><font color="#990000">&gt;&gt;</font>, <font color="#FF0000">$!</font>]]<font color="#990000">.</font>
+[<font color="#FF0000">"Hello "</font>,[<font color="#990000">&lt;&lt;</font><font color="#FF0000">"world"</font><font color="#990000">&gt;&gt;</font>,<font color="#993399">33</font>]]
+<font color="#993399">2</font><font color="#990000">&gt;</font> <b><font color="#000000">io:format</font></b>(<font color="#FF0000">"~s~n"</font>, [<font color="#009900">RespBody</font>])<font color="#990000">.</font>
+<font color="#009900">Hello</font> <font color="#FF6600">world</font><font color="#990000">!</font></tt></pre>
+</div></div>
+<p>Note that the length must be greater than zero for any data to be sent. Cowboy will send an empty body when the length is zero.</p>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="..">cowboy(7)</a></p></div>
-</div>
-</div>
+<p><a href="..">cowboy(7)</a></p>
+
diff --git a/docs/en/cowboy/2.2/manual/cowboy_rest/index.html b/docs/en/cowboy/2.2/manual/cowboy_rest/index.html
index 9efdf61f..4c0ac588 100644
--- a/docs/en/cowboy/2.2/manual/cowboy_rest/index.html
+++ b/docs/en/cowboy/2.2/manual/cowboy_rest/index.html
@@ -62,670 +62,475 @@
<h1 class="lined-header"><span>cowboy_rest(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_rest - REST handlers</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_rest - REST handlers</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The module <code>cowboy_rest</code> implements the HTTP state machine.</p></div>
-<div class="paragraph"><p>Implementing REST handlers is not enough to provide a REST
-interface; this interface must also follow the REST
-constraints including HATEOAS (hypermedia as the engine
-of application state).</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The module <code>cowboy_rest</code> implements the HTTP state machine.</p>
+<p>Implementing REST handlers is not enough to provide a REST interface; this interface must also follow the REST constraints including HATEOAS (hypermedia as the engine of application state).</p>
<h2 id="_callbacks">Callbacks</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>REST handlers implement the following interface:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
-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="color: #FF6600">cowboy_rest</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
-
-<span style="color: #009900">Callback</span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>)
- <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
- | {<span style="color: #FF6600">stop</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
- | {{<span style="color: #FF6600">switch_handler</span>, <span style="color: #009900">Module</span>}, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
- | {{<span style="color: #FF6600">switch_handler</span>, <span style="color: #009900">Module</span>, <span style="color: #009900">Opts</span>}, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
-
-<span style="font-weight: bold"><span style="color: #000000">terminate</span></span>(<span style="color: #009900">Reason</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> <span style="color: #FF6600">ok</span> <span style="font-style: italic"><span style="color: #9A1900">%% optional</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">State</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()
-<span style="color: #009900">Module</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">module</span></span>()
-<span style="color: #009900">Opts</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()
-<span style="color: #009900">Reason</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">normal</span></span>
- | {<span style="color: #FF6600">crash</span>, <span style="color: #FF6600">error</span> | <span style="font-weight: bold"><span style="color: #000080">exit</span></span> | <span style="font-weight: bold"><span style="color: #000080">throw</span></span>, <span style="font-weight: bold"><span style="color: #000000">any</span></span>()}
-
-<span style="color: #009900">Callback</span> <span style="color: #990000">-</span> <span style="color: #FF6600">see</span> <span style="color: #FF6600">below</span>
-<span style="color: #009900">Result</span> <span style="color: #990000">-</span> <span style="color: #FF6600">see</span> <span style="color: #FF6600">below</span>
-<span style="color: #009900">Default</span> <span style="color: #990000">-</span> <span style="color: #FF6600">see</span> <span style="color: #FF6600">below</span></tt></pre></div></div>
-<div class="paragraph"><p>The <code>init/2</code> callback is common to all handlers. To switch
-to the REST handler behavior, it must return <code>cowboy_rest</code>
-as the first element of the tuple.</p></div>
-<div class="paragraph"><p>The <code>Callback/2</code> above represents all the REST-specific
-callbacks. They are described in the following section
-of this manual. REST-specific callbacks differ by their
-name, semantics, result and default values. The default
-value is the one used when the callback has not been
-implemented. They otherwise all follow the same interface.</p></div>
-<div class="paragraph"><p>The <code>stop</code> tuple can be returned to stop REST processing.
-If no response was sent before then, Cowboy will send a
-<em>204 No Content</em>. The <code>stop</code> tuple can be returned from
-any callback, excluding <code>expires</code>, <code>generate_etag</code>,
-<code>last_modified</code> and <code>variances</code>.</p></div>
-<div class="paragraph"><p>A <code>switch_handler</code> tuple can be returned from these same
-callbacks to stop REST processing and switch to a different
-handler type. This is very useful to, for example, to stream
-the response body.</p></div>
-<div class="paragraph"><p>The optional <code>terminate/3</code> callback will ultimately be called
-with the reason for the termination of the handler.
-Cowboy will terminate the process right after this. There
-is no need to perform any cleanup in this callback.</p></div>
-<div class="paragraph"><p>The following terminate reasons are defined for loop handlers:</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-normal
-</dt>
-<dd>
-<p>
- The handler terminated normally.
-</p>
+<p>REST handlers implement the following interface:</p>
+<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><b><font color="#000000">init</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>)
+ <font color="#990000">-&gt;</font> {<font color="#FF6600">cowboy_rest</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
+
+<font color="#009900">Callback</font>(<font color="#009900">Req</font>, <font color="#009900">State</font>)
+ <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
+ | {<font color="#FF6600">stop</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
+ | {{<font color="#FF6600">switch_handler</font>, <font color="#009900">Module</font>}, <font color="#009900">Req</font>, <font color="#009900">State</font>}
+ | {{<font color="#FF6600">switch_handler</font>, <font color="#009900">Module</font>, <font color="#009900">Opts</font>}, <font color="#009900">Req</font>, <font color="#009900">State</font>}
+
+<b><font color="#000000">terminate</font></b>(<font color="#009900">Reason</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> <font color="#FF6600">ok</font> <i><font color="#9A1900">%% optional</font></i>
+
+<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()
+<font color="#009900">State</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()
+<font color="#009900">Module</font> <font color="#990000">::</font> <b><font color="#000000">module</font></b>()
+<font color="#009900">Opts</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()
+<font color="#009900">Reason</font> <font color="#990000">::</font> <b><font color="#000080">normal</font></b>
+ | {<font color="#FF6600">crash</font>, <font color="#FF6600">error</font> | <b><font color="#000080">exit</font></b> | <b><font color="#000080">throw</font></b>, <b><font color="#000000">any</font></b>()}
+
+<font color="#009900">Callback</font> <font color="#990000">-</font> <font color="#FF6600">see</font> <font color="#FF6600">below</font>
+<font color="#009900">Result</font> <font color="#990000">-</font> <font color="#FF6600">see</font> <font color="#FF6600">below</font>
+<font color="#009900">Default</font> <font color="#990000">-</font> <font color="#FF6600">see</font> <font color="#FF6600">below</font></tt></pre>
+</div></div>
+<p>The <code>init/2</code> callback is common to all handlers. To switch to the REST handler behavior, it must return <code>cowboy_rest</code> as the first element of the tuple.</p>
+<p>The <code>Callback/2</code> above represents all the REST-specific callbacks. They are described in the following section of this manual. REST-specific callbacks differ by their name, semantics, result and default values. The default value is the one used when the callback has not been implemented. They otherwise all follow the same interface.</p>
+<p>The <code>stop</code> tuple can be returned to stop REST processing. If no response was sent before then, Cowboy will send a <em>204 No Content</em>. The <code>stop</code> tuple can be returned from any callback, excluding <code>expires</code>, <code>generate_etag</code>, <code>last_modified</code> and <code>variances</code>.</p>
+<p>A <code>switch_handler</code> tuple can be returned from these same callbacks to stop REST processing and switch to a different handler type. This is very useful to, for example, to stream the response body.</p>
+<p>The optional <code>terminate/3</code> callback will ultimately be called with the reason for the termination of the handler. Cowboy will terminate the process right after this. There is no need to perform any cleanup in this callback.</p>
+<p>The following terminate reasons are defined for loop handlers:</p>
+<dl><dt>normal</dt>
+<dd><p>The handler terminated normally.</p>
</dd>
-<dt class="hdlist1">
-{crash, Class, Reason}
-</dt>
-<dd>
-<p>
- A crash occurred in the handler. <code>Class</code> and <code>Reason</code> can be
- used to obtain more information about the crash. The function
- <code>erlang:get_stacktrace/0</code> can also be called to obtain the
- stacktrace of the process when the crash occurred.
-</p>
+<dt>{crash, Class, Reason}</dt>
+<dd><p>A crash occurred in the handler. <code>Class</code> and <code>Reason</code> can be used to obtain more information about the crash. The function <code>erlang:get_stacktrace/0</code> can also be called to obtain the stacktrace of the process when the crash occurred.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_rest_callbacks">REST callbacks</h2>
-<div class="sectionbody">
-<div class="sect2">
<h3 id="_acceptcallback">AcceptCallback</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #009900">AcceptCallback</span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
-
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="color: #000080">true</span> | {<span style="color: #000080">true</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: #000080">false</span>}
-<span style="color: #009900">Default</span> <span style="color: #990000">-</span> <span style="color: #FF6600">crash</span></tt></pre></div></div>
-<div class="paragraph"><p>Process the request body.</p></div>
-<div class="paragraph"><p>This function should create or update the resource using the
-request body.</p></div>
-<div class="paragraph"><p>For PUT requests, the body is a representation of the resource
-that is being created or replaced.</p></div>
-<div class="paragraph"><p>For POST requests, the body is typically application-specific
-instructions on how to process the request, but it may also
-be a representation of the resource. When creating a new
-resource with POST at a different location, return <code>{true, URI}</code>
-with <code>URI</code> the new location.</p></div>
-<div class="paragraph"><p>For PATCH requests, the body is a series of instructions on
-how to update the resource. Patch files or JSON Patch are
-examples of such media types.</p></div>
-<div class="paragraph"><p>A response body may be sent. The appropriate media type, charset
-and language for the response can be retrieved from the Req
-object using the <code>media_type</code>, <code>charset</code> and <code>language</code> keys,
-respectively. The body can be set using
-<a href="../cowboy_req.set_resp_body">cowboy_req:set_resp_body(3)</a>.</p></div>
-</div>
-<div class="sect2">
+<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><font color="#009900">AcceptCallback</font>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
+
+<font color="#009900">Result</font> <font color="#990000">::</font> <font color="#000080">true</font> | {<font color="#000080">true</font>, <font color="#009900">URI</font> <font color="#990000">::</font> <b><font color="#000000">iodata</font></b>()} | <font color="#000080">false</font>}
+<font color="#009900">Default</font> <font color="#990000">-</font> <font color="#FF6600">crash</font></tt></pre>
+</div></div>
+<p>Process the request body.</p>
+<p>This function should create or update the resource using the request body.</p>
+<p>For PUT requests, the body is a representation of the resource that is being created or replaced.</p>
+<p>For POST requests, the body is typically application-specific instructions on how to process the request, but it may also be a representation of the resource. When creating a new resource with POST at a different location, return <code>{true, URI}</code> with <code>URI</code> the new location.</p>
+<p>For PATCH requests, the body is a series of instructions on how to update the resource. Patch files or JSON Patch are examples of such media types.</p>
+<p>A response body may be sent. The appropriate media type, charset and language for the response can be retrieved from the Req object using the <code>media_type</code>, <code>charset</code> and <code>language</code> keys, respectively. The body can be set using <a href="../cowboy_req.set_resp_body">cowboy_req:set_resp_body(3)</a>.</p>
<h3 id="_allowed_methods">allowed_methods</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">allowed_methods</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">allowed_methods</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</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: #009900">Default</span> <span style="color: #990000">::</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">"HEAD"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"OPTIONS"</span><span style="color: #990000">&gt;&gt;</span>]</tt></pre></div></div>
-<div class="paragraph"><p>Return the list of allowed methods.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> [<b><font color="#000080">binary</font></b>()] <i><font color="#9A1900">%% case sensitive</font></i>
+<font color="#009900">Default</font> <font color="#990000">::</font> [<font color="#990000">&lt;&lt;</font><font color="#FF0000">"GET"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"HEAD"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"OPTIONS"</font><font color="#990000">&gt;&gt;</font>]</tt></pre>
+</div></div>
+<p>Return the list of allowed methods.</p>
<h3 id="_allow_missing_post">allow_missing_post</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">allow_missing_post</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">allow_missing_post</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()
-<span style="color: #009900">Default</span> <span style="color: #990000">::</span> <span style="color: #000080">true</span></tt></pre></div></div>
-<div class="paragraph"><p>Return whether POST is allowed when the resource doesn&#8217;t exist.</p></div>
-<div class="paragraph"><p>Returning <code>true</code> here means that a new resource will be
-created. The URI for the newly created resource should be
-returned from the <code>AcceptCallback</code> function.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> <b><font color="#000000">boolean</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <font color="#000080">true</font></tt></pre>
+</div></div>
+<p>Return whether POST is allowed when the resource doesn&apos;t exist.</p>
+<p>Returning <code>true</code> here means that a new resource will be created. The URI for the newly created resource should be returned from the <code>AcceptCallback</code> function.</p>
<h3 id="_charsets_provided">charsets_provided</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">charsets_provided</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">charsets_provided</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</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: #009900">Default</span> <span style="color: #990000">-</span> <span style="color: #FF6600">skip</span> <span style="color: #FF6600">this</span> <span style="color: #FF6600">step</span></tt></pre></div></div>
-<div class="paragraph"><p>Return the list of charsets the resource provides in order
-of preference.</p></div>
-<div class="paragraph"><p>During content negotiation Cowboy will pick the most
-appropriate charset for the client. The client advertises
-charsets it prefers with the accept-charset header. When
-that header is missing, Cowboy picks the first charset
-from the resource.</p></div>
-<div class="paragraph"><p>Cowboy will add the negotiated <code>charset</code> to the Req object
-after this step completes:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<font color="#009900">Result</font> <font color="#990000">::</font> [<b><font color="#000080">binary</font></b>()] <i><font color="#9A1900">%% lowercase; case insensitive</font></i>
+<font color="#009900">Default</font> <font color="#990000">-</font> <font color="#FF6600">skip</font> <font color="#FF6600">this</font> <font color="#FF6600">step</font></tt></pre>
+</div></div>
+<p>Return the list of charsets the resource provides in order of preference.</p>
+<p>During content negotiation Cowboy will pick the most appropriate charset for the client. The client advertises charsets it prefers with the accept-charset header. When that header is missing, Cowboy picks the first charset from the resource.</p>
+<!-- @todo We should explain precisely how charsets are picked.-->
+<p>Cowboy will add the negotiated <code>charset</code> to the Req object after this step completes:</p>
+<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: #0000FF">charset</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>
-}</tt></pre></div></div>
-</div>
-<div class="sect2">
+<pre><tt><b><font color="#000000">req</font></b>() <font color="#990000">::</font> #{
+ <font color="#0000FF">charset</font> <font color="#990000">=&gt;</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% lowercase; case insensitive</font></i>
+}</tt></pre>
+</div></div>
<h3 id="_content_types_accepted">content_types_accepted</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
-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">content_types_accepted</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
-
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> [{<span style="font-weight: bold"><span style="color: #000080">binary</span></span>() | <span style="color: #009900">ParsedMime</span>, <span style="color: #009900">AcceptCallback</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">atom</span></span>()}]
-<span style="color: #009900">ParsedMime</span> <span style="color: #990000">::</span> {<span style="color: #009900">Type</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="color: #009900">SubType</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="color: #FF6600">'*'</span> | <span style="color: #009900">Params</span>}
-<span style="color: #009900">Params</span> <span style="color: #990000">::</span> [{<span style="color: #009900">Key</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="color: #009900">Value</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()}]
-
-<span style="color: #009900">Default</span> <span style="color: #990000">-</span> <span style="color: #FF6600">crash</span></tt></pre></div></div>
-<div class="paragraph"><p>Return the list of media types the resource accepts in
-order of preference.</p></div>
-<div class="paragraph"><p>A media type is made of different parts. The media type
-<code>text/html;charset=utf-8</code> is of type <code>text</code>, subtype <code>html</code>
-and has a single parameter <code>charset</code> with value <code>utf-8</code>.</p></div>
-<div class="paragraph"><p>Cowboy will match the content-type request header against
-the media types the server accepts and select the appropriate
-callback. When that header is missing, or when the server does not
-accept this media type, the request fails and an error response
-is returned. Cowboy will execute the callback immediately otherwise.</p></div>
-<div class="paragraph"><p>An empty parameters list <code>[]</code> means that no parameters will be
-accepted. When any parameter is acceptable, the tuple form
-should be used with parameters as the atom <code>'*'</code>.</p></div>
-<div class="paragraph"><p>Cowboy treats all parameters as case sensitive, except for the
-<code>charset</code> parameter, which is known to be case insensitive. You
-should therefore always provide the charset as a lowercase
-binary string.</p></div>
-</div>
-<div class="sect2">
+<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><b><font color="#000000">content_types_accepted</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
+
+<font color="#009900">Result</font> <font color="#990000">::</font> [{<b><font color="#000080">binary</font></b>() | <font color="#009900">ParsedMime</font>, <font color="#009900">AcceptCallback</font> <font color="#990000">::</font> <b><font color="#000080">atom</font></b>()}]
+<font color="#009900">ParsedMime</font> <font color="#990000">::</font> {<font color="#009900">Type</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">SubType</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#FF6600">'*'</font> | <font color="#009900">Params</font>}
+<font color="#009900">Params</font> <font color="#990000">::</font> [{<font color="#009900">Key</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()}]
+
+<font color="#009900">Default</font> <font color="#990000">-</font> <font color="#FF6600">crash</font></tt></pre>
+</div></div>
+<!-- @todo Case sensitivity of parsed mime content?-->
+<p>Return the list of media types the resource accepts in order of preference.</p>
+<p>A media type is made of different parts. The media type <code>text/html;charset=utf-8</code> is of type <code>text</code>, subtype <code>html</code> and has a single parameter <code>charset</code> with value <code>utf-8</code>.</p>
+<!-- @todo Cowboy needs to ignore the boundary parameter for-->
+<!-- multipart, as we never want to match against it. Or allow-->
+<!-- ignoring specific parameters at the very least.-->
+<p>Cowboy will match the content-type request header against the media types the server accepts and select the appropriate callback. When that header is missing, or when the server does not accept this media type, the request fails and an error response is returned. Cowboy will execute the callback immediately otherwise.</p>
+<!-- @todo We should explain precisely how media types are picked.-->
+<p>An empty parameters list <code>[]</code> means that no parameters will be accepted. When any parameter is acceptable, the tuple form should be used with parameters as the atom <code>&apos;*&apos;</code>.</p>
+<p>Cowboy treats all parameters as case sensitive, except for the <code>charset</code> parameter, which is known to be case insensitive. You should therefore always provide the charset as a lowercase binary string.</p>
+<!-- @todo Maybe this should be in the user guide instead.-->
+<!-- This function will be called for POST, PUT and PATCH requests.-->
+<!-- It is entirely possible to define different callbacks for different-->
+<!-- methods if the handling of the request differs. Simply verify-->
+<!-- what the method is with `cowboy_req:method/1` and return a-->
+<!-- different list for each methods.-->
<h3 id="_content_types_provided">content_types_provided</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
-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">content_types_provided</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
-
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> [{<span style="font-weight: bold"><span style="color: #000080">binary</span></span>() | <span style="color: #009900">ParsedMime</span>, <span style="color: #009900">ProvideCallback</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">atom</span></span>()}]
-<span style="color: #009900">ParsedMime</span> <span style="color: #990000">::</span> {<span style="color: #009900">Type</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="color: #009900">SubType</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="color: #FF6600">'*'</span> | <span style="color: #009900">Params</span>}
-<span style="color: #009900">Params</span> <span style="color: #990000">::</span> [{<span style="color: #009900">Key</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="color: #009900">Value</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()}]
-
-<span style="color: #009900">Default</span> <span style="color: #990000">-</span> [{{ <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"html"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #FF6600">'*'</span>}, <span style="color: #FF6600">to_html</span>}]</tt></pre></div></div>
-<div class="paragraph"><p>Return the list of media types the resource provides in
-order of preference.</p></div>
-<div class="paragraph"><p>A media type is made of different parts. The media type
-<code>text/html;charset=utf-8</code> is of type <code>text</code>, subtype <code>html</code>
-and has a single parameter <code>charset</code> with value <code>utf-8</code>.</p></div>
-<div class="paragraph"><p>During content negotiation Cowboy will pick the most appropriate
-media type for the client. The client advertises media types it
-prefers with the accept header. When that header is missing,
-the content negotiation fails and an error response is returned.</p></div>
-<div class="paragraph"><p>The callback given for the selected media type will be called
-at the end of the execution of GET and HEAD requests when a
-representation must be sent to the client.</p></div>
-<div class="paragraph"><p>An empty parameters list <code>[]</code> means that no parameters will be
-accepted. When any parameter is acceptable, the tuple form
-should be used with parameters as the atom <code>'*'</code>.</p></div>
-<div class="paragraph"><p>Cowboy treats all parameters as case sensitive, except for the
-<code>charset</code> parameter, which is known to be case insensitive. You
-should therefore always provide the charset as a lowercase
-binary string.</p></div>
-<div class="paragraph"><p>Cowboy will add the negotiated <code>media_type</code> to the Req object
-after this step completes:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
-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: #0000FF">media_type</span> <span style="color: #990000">=&gt;</span> <span style="color: #009900">ParsedMime</span>
-}</tt></pre></div></div>
-</div>
-<div class="sect2">
+<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><b><font color="#000000">content_types_provided</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
+
+<font color="#009900">Result</font> <font color="#990000">::</font> [{<b><font color="#000080">binary</font></b>() | <font color="#009900">ParsedMime</font>, <font color="#009900">ProvideCallback</font> <font color="#990000">::</font> <b><font color="#000080">atom</font></b>()}]
+<font color="#009900">ParsedMime</font> <font color="#990000">::</font> {<font color="#009900">Type</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">SubType</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#FF6600">'*'</font> | <font color="#009900">Params</font>}
+<font color="#009900">Params</font> <font color="#990000">::</font> [{<font color="#009900">Key</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()}]
+
+<font color="#009900">Default</font> <font color="#990000">-</font> [{{ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"html"</font><font color="#990000">&gt;&gt;</font>, <font color="#FF6600">'*'</font>}, <font color="#FF6600">to_html</font>}]</tt></pre>
+</div></div>
+<!-- @todo Case sensitivity of parsed mime content?-->
+<!-- @todo Space required for the time being: https://github.com/spf13/hugo/issues/2398-->
+<p>Return the list of media types the resource provides in order of preference.</p>
+<p>A media type is made of different parts. The media type <code>text/html;charset=utf-8</code> is of type <code>text</code>, subtype <code>html</code> and has a single parameter <code>charset</code> with value <code>utf-8</code>.</p>
+<!-- @todo Cowboy needs to ignore the boundary parameter for-->
+<!-- multipart, as we never want to match against it. Or allow-->
+<!-- ignoring specific parameters at the very least.-->
+<p>During content negotiation Cowboy will pick the most appropriate media type for the client. The client advertises media types it prefers with the accept header. When that header is missing, the content negotiation fails and an error response is returned.</p>
+<p>The callback given for the selected media type will be called at the end of the execution of GET and HEAD requests when a representation must be sent to the client.</p>
+<!-- @todo We should explain precisely how media types are picked.-->
+<p>An empty parameters list <code>[]</code> means that no parameters will be accepted. When any parameter is acceptable, the tuple form should be used with parameters as the atom <code>&apos;*&apos;</code>.</p>
+<p>Cowboy treats all parameters as case sensitive, except for the <code>charset</code> parameter, which is known to be case insensitive. You should therefore always provide the charset as a lowercase binary string.</p>
+<p>Cowboy will add the negotiated <code>media_type</code> to the Req object after this step completes:</p>
+<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><b><font color="#000000">req</font></b>() <font color="#990000">::</font> #{
+ <font color="#0000FF">media_type</font> <font color="#990000">=&gt;</font> <font color="#009900">ParsedMime</font>
+}</tt></pre>
+</div></div>
+<!-- @todo Case sensitivity of parsed mime content?-->
<h3 id="_delete_completed">delete_completed</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">delete_completed</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">delete_completed</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()
-<span style="color: #009900">Default</span> <span style="color: #990000">::</span> <span style="color: #000080">true</span></tt></pre></div></div>
-<div class="paragraph"><p>Return whether the resource has been fully deleted from the
-system, including from any internal cache.</p></div>
-<div class="paragraph"><p>Returning <code>false</code> will result in a <em>202 Accepted</em> response
-being sent instead of a <em>200 OK</em> or <em>204 No Content</em>.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> <b><font color="#000000">boolean</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <font color="#000080">true</font></tt></pre>
+</div></div>
+<p>Return whether the resource has been fully deleted from the system, including from any internal cache.</p>
+<p>Returning <code>false</code> will result in a <em>202 Accepted</em> response being sent instead of a <em>200 OK</em> or <em>204 No Content</em>.</p>
<h3 id="_delete_resource">delete_resource</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">delete_resource</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">delete_resource</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()
-<span style="color: #009900">Default</span> <span style="color: #990000">::</span> <span style="color: #000080">false</span></tt></pre></div></div>
-<div class="paragraph"><p>Delete the resource.</p></div>
-<div class="paragraph"><p>Cowboy will send an error response when this function
-returns <code>false</code>.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> <b><font color="#000000">boolean</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <font color="#000080">false</font></tt></pre>
+</div></div>
+<p>Delete the resource.</p>
+<p>Cowboy will send an error response when this function returns <code>false</code>.</p>
<h3 id="_expires">expires</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">expires</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">expires</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">calendar:datetime</span></span>() | <span style="font-weight: bold"><span style="color: #000080">binary</span></span>() | <span style="color: #000080">undefined</span>
-<span style="color: #009900">Default</span> <span style="color: #990000">::</span> <span style="color: #000080">undefined</span></tt></pre></div></div>
-<div class="paragraph"><p>Return the resource&#8217;s expiration date.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> <b><font color="#000000">calendar:datetime</font></b>() | <b><font color="#000080">binary</font></b>() | <font color="#000080">undefined</font>
+<font color="#009900">Default</font> <font color="#990000">::</font> <font color="#000080">undefined</font></tt></pre>
+</div></div>
+<p>Return the resource&apos;s expiration date.</p>
<h3 id="_forbidden">forbidden</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">forbidden</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">forbidden</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()
-<span style="color: #009900">Default</span> <span style="color: #990000">::</span> <span style="color: #000080">false</span></tt></pre></div></div>
-<div class="paragraph"><p>Return whether access to the resource is forbidden.</p></div>
-<div class="paragraph"><p>A <em>403 Forbidden</em> response will be sent if this
-function returns <code>true</code>. This status code means that
-access is forbidden regardless of authentication,
-and that the request shouldn&#8217;t be repeated.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> <b><font color="#000000">boolean</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <font color="#000080">false</font></tt></pre>
+</div></div>
+<p>Return whether access to the resource is forbidden.</p>
+<p>A <em>403 Forbidden</em> response will be sent if this function returns <code>true</code>. This status code means that access is forbidden regardless of authentication, and that the request shouldn&apos;t be repeated.</p>
<h3 id="_generate_etag">generate_etag</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">generate_etag</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">generate_etag</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>() | {<span style="color: #FF6600">weak</span> | <span style="color: #FF6600">strong</span>, <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()}
-<span style="color: #009900">Default</span> <span style="color: #990000">-</span> <span style="color: #FF6600">no</span> <span style="color: #FF6600">etag</span> <span style="color: #FF6600">value</span></tt></pre></div></div>
-<div class="paragraph"><p>Return the entity tag of the resource.</p></div>
-<div class="paragraph"><p>When a binary is returned, the value is automatically
-parsed to a tuple. The binary must be in the same
-format as the etag header, including quotes.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() | {<font color="#FF6600">weak</font> | <font color="#FF6600">strong</font>, <b><font color="#000080">binary</font></b>()}
+<font color="#009900">Default</font> <font color="#990000">-</font> <font color="#FF6600">no</font> <font color="#FF6600">etag</font> <font color="#FF6600">value</font></tt></pre>
+</div></div>
+<p>Return the entity tag of the resource.</p>
+<p>When a binary is returned, the value is automatically parsed to a tuple. The binary must be in the same format as the etag header, including quotes.</p>
<h3 id="_is_authorized">is_authorized</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">is_authorized</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">is_authorized</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="color: #000080">true</span> | {<span style="color: #000080">false</span>, <span style="color: #009900">AuthHeader</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>()}
-<span style="color: #009900">Default</span> <span style="color: #990000">-</span> <span style="color: #000080">true</span></tt></pre></div></div>
-<div class="paragraph"><p>Return whether the user is authorized to perform the action.</p></div>
-<div class="paragraph"><p>This function should be used to perform any necessary
-authentication of the user before attempting to perform
-any action on the resource.</p></div>
-<div class="paragraph"><p>When authentication fails, the <code>AuthHeader</code> value will
-be sent in the www-authenticate header for the
-<em>401 Unauthorized</em> response.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> <font color="#000080">true</font> | {<font color="#000080">false</font>, <font color="#009900">AuthHeader</font> <font color="#990000">::</font> <b><font color="#000000">iodata</font></b>()}
+<font color="#009900">Default</font> <font color="#990000">-</font> <font color="#000080">true</font></tt></pre>
+</div></div>
+<p>Return whether the user is authorized to perform the action.</p>
+<p>This function should be used to perform any necessary authentication of the user before attempting to perform any action on the resource.</p>
+<p>When authentication fails, the <code>AuthHeader</code> value will be sent in the www-authenticate header for the <em>401 Unauthorized</em> response.</p>
<h3 id="_is_conflict">is_conflict</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">is_conflict</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">is_conflict</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()
-<span style="color: #009900">Default</span> <span style="color: #990000">::</span> <span style="color: #000080">false</span></tt></pre></div></div>
-<div class="paragraph"><p>Return whether the PUT request results in a conflict.</p></div>
-<div class="paragraph"><p>A <em>409 Conflict</em> response is sent when <code>true</code>.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> <b><font color="#000000">boolean</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <font color="#000080">false</font></tt></pre>
+</div></div>
+<p>Return whether the PUT request results in a conflict.</p>
+<p>A <em>409 Conflict</em> response is sent when <code>true</code>.</p>
<h3 id="_known_methods">known_methods</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">known_methods</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">known_methods</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</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: #009900">Default</span> <span style="color: #990000">::</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">"HEAD"</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="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"PUT"</span><span style="color: #990000">&gt;&gt;</span>,
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"PATCH"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"DELETE"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"OPTIONS"</span><span style="color: #990000">&gt;&gt;</span>]</tt></pre></div></div>
-<div class="paragraph"><p>Return the list of known methods.</p></div>
-<div class="paragraph"><p>The full list of methods known by the server should be
-returned, regardless of their use in the resource.</p></div>
-<div class="paragraph"><p>The default value lists the methods Cowboy knows and
-implement in <code>cowboy_rest</code>.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> [<b><font color="#000080">binary</font></b>()] <i><font color="#9A1900">%% case sensitive</font></i>
+<font color="#009900">Default</font> <font color="#990000">::</font> [<font color="#990000">&lt;&lt;</font><font color="#FF0000">"GET"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"HEAD"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"POST"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"PUT"</font><font color="#990000">&gt;&gt;</font>,
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"PATCH"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"DELETE"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"OPTIONS"</font><font color="#990000">&gt;&gt;</font>]</tt></pre>
+</div></div>
+<p>Return the list of known methods.</p>
+<p>The full list of methods known by the server should be returned, regardless of their use in the resource.</p>
+<p>The default value lists the methods Cowboy knows and implement in <code>cowboy_rest</code>.</p>
<h3 id="_languages_provided">languages_provided</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">languages_provided</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">languages_provided</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</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: #009900">Default</span> <span style="color: #990000">-</span> <span style="color: #FF6600">skip</span> <span style="color: #FF6600">this</span> <span style="color: #FF6600">step</span></tt></pre></div></div>
-<div class="paragraph"><p>Return the list of languages the resource provides in order
-of preference.</p></div>
-<div class="paragraph"><p>During content negotiation Cowboy will pick the most
-appropriate language for the client. The client advertises
-languages it prefers with the accept-language header. When
-that header is missing, Cowboy picks the first language
-from the resource.</p></div>
-<div class="paragraph"><p>Cowboy will add the negotiated <code>language</code> to the Req object
-after this step completes:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<font color="#009900">Result</font> <font color="#990000">::</font> [<b><font color="#000080">binary</font></b>()] <i><font color="#9A1900">%% lowercase; case insensitive</font></i>
+<font color="#009900">Default</font> <font color="#990000">-</font> <font color="#FF6600">skip</font> <font color="#FF6600">this</font> <font color="#FF6600">step</font></tt></pre>
+</div></div>
+<p>Return the list of languages the resource provides in order of preference.</p>
+<p>During content negotiation Cowboy will pick the most appropriate language for the client. The client advertises languages it prefers with the accept-language header. When that header is missing, Cowboy picks the first language from the resource.</p>
+<!-- @todo We should explain precisely how languages are picked.-->
+<p>Cowboy will add the negotiated <code>language</code> to the Req object after this step completes:</p>
+<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: #0000FF">language</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>
-}</tt></pre></div></div>
-</div>
-<div class="sect2">
+<pre><tt><b><font color="#000000">req</font></b>() <font color="#990000">::</font> #{
+ <font color="#0000FF">language</font> <font color="#990000">=&gt;</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% lowercase; case insensitive</font></i>
+}</tt></pre>
+</div></div>
<h3 id="_last_modified">last_modified</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">last_modified</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">last_modified</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">calendar:datetime</span></span>()
-<span style="color: #009900">Default</span> <span style="color: #990000">-</span> <span style="color: #FF6600">no</span> <span style="color: #FF6600">last</span> <span style="color: #FF6600">modified</span> <span style="color: #FF6600">value</span></tt></pre></div></div>
-<div class="paragraph"><p>Return the resource&#8217;s last modification date.</p></div>
-<div class="paragraph"><p>This date will be used to test against the if-modified-since
-and if-unmodified-since headers, and sent as the last-modified
-header in the response to GET and HEAD requests.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> <b><font color="#000000">calendar:datetime</font></b>()
+<font color="#009900">Default</font> <font color="#990000">-</font> <font color="#FF6600">no</font> <font color="#FF6600">last</font> <font color="#FF6600">modified</font> <font color="#FF6600">value</font></tt></pre>
+</div></div>
+<p>Return the resource&apos;s last modification date.</p>
+<p>This date will be used to test against the if-modified-since and if-unmodified-since headers, and sent as the last-modified header in the response to GET and HEAD requests.</p>
<h3 id="_malformed_request">malformed_request</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">malformed_request</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">malformed_request</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()
-<span style="color: #009900">Default</span> <span style="color: #990000">::</span> <span style="color: #000080">false</span></tt></pre></div></div>
-<div class="paragraph"><p>Return whether the request is malformed.</p></div>
-<div class="paragraph"><p>A request is malformed when a component required by the
-resource is invalid. This may include the query string
-or individual headers. They should be parsed and validated
-in this function. The body should not be read at this point.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> <b><font color="#000000">boolean</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <font color="#000080">false</font></tt></pre>
+</div></div>
+<p>Return whether the request is malformed.</p>
+<p>A request is malformed when a component required by the resource is invalid. This may include the query string or individual headers. They should be parsed and validated in this function. The body should not be read at this point.</p>
<h3 id="_moved_permanently">moved_permanently</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">moved_permanently</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">moved_permanently</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> {<span style="color: #000080">true</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: #000080">false</span>
-<span style="color: #009900">Default</span> <span style="color: #990000">::</span> <span style="color: #000080">false</span></tt></pre></div></div>
-<div class="paragraph"><p>Return whether the resource was permanently moved, and
-what its new location is.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> {<font color="#000080">true</font>, <font color="#009900">URI</font> <font color="#990000">::</font> <b><font color="#000000">iodata</font></b>()} | <font color="#000080">false</font>
+<font color="#009900">Default</font> <font color="#990000">::</font> <font color="#000080">false</font></tt></pre>
+</div></div>
+<p>Return whether the resource was permanently moved, and what its new location is.</p>
<h3 id="_moved_temporarily">moved_temporarily</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">moved_temporarily</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">moved_temporarily</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> {<span style="color: #000080">true</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: #000080">false</span>
-<span style="color: #009900">Default</span> <span style="color: #990000">::</span> <span style="color: #000080">false</span></tt></pre></div></div>
-<div class="paragraph"><p>Return whether the resource was temporarily moved, and
-what its new location is.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> {<font color="#000080">true</font>, <font color="#009900">URI</font> <font color="#990000">::</font> <b><font color="#000000">iodata</font></b>()} | <font color="#000080">false</font>
+<font color="#009900">Default</font> <font color="#990000">::</font> <font color="#000080">false</font></tt></pre>
+</div></div>
+<p>Return whether the resource was temporarily moved, and what its new location is.</p>
<h3 id="_multiple_choices">multiple_choices</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
-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">multiple_choices</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
-
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()
-<span style="color: #009900">Default</span> <span style="color: #990000">::</span> <span style="color: #000080">false</span></tt></pre></div></div>
-<div class="paragraph"><p>Return whether the client should engage in reactive
-negotiation.</p></div>
-<div class="paragraph"><p>Return <code>true</code> when the server has multiple representations
-of a resource, each with their specific identifier, but is
-unable to determine which is best for the client. For
-example an image might have different sizes and the server
-is unable to determine the capabilities of the client.</p></div>
-<div class="paragraph"><p>When returning <code>true</code> the server should send a body with
-links to the different representations. If the server has
-a preferred representation it can send its link inside a
-location header.</p></div>
-</div>
-<div class="sect2">
+<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><b><font color="#000000">multiple_choices</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
+
+<font color="#009900">Result</font> <font color="#990000">::</font> <b><font color="#000000">boolean</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <font color="#000080">false</font></tt></pre>
+</div></div>
+<p>Return whether the client should engage in reactive negotiation.</p>
+<p>Return <code>true</code> when the server has multiple representations of a resource, each with their specific identifier, but is unable to determine which is best for the client. For example an image might have different sizes and the server is unable to determine the capabilities of the client.</p>
+<p>When returning <code>true</code> the server should send a body with links to the different representations. If the server has a preferred representation it can send its link inside a location header.</p>
<h3 id="_options">options</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">options</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}</tt></pre></div></div>
-<div class="paragraph"><p>Respond to an OPTIONS request.</p></div>
-<div class="paragraph"><p>The response should inform the client the communication
-options available for this resource. By default Cowboy
-will send a <em>200 OK</em> response with the allow header set.</p></div>
-</div>
-<div class="sect2">
+<pre><tt><b><font color="#000000">options</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}</tt></pre>
+</div></div>
+<p>Respond to an OPTIONS request.</p>
+<p>The response should inform the client the communication options available for this resource. By default Cowboy will send a <em>200 OK</em> response with the allow header set.</p>
<h3 id="_previously_existed">previously_existed</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">previously_existed</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">previously_existed</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()
-<span style="color: #009900">Default</span> <span style="color: #990000">::</span> <span style="color: #000080">false</span></tt></pre></div></div>
-<div class="paragraph"><p>Return whether the resource existed previously.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> <b><font color="#000000">boolean</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <font color="#000080">false</font></tt></pre>
+</div></div>
+<p>Return whether the resource existed previously.</p>
<h3 id="_providecallback">ProvideCallback</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">ProvideCallback</span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><font color="#009900">ProvideCallback</font>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:resp_body</span></span>()
-<span style="color: #009900">Default</span> <span style="color: #990000">-</span> <span style="color: #FF6600">crash</span></tt></pre></div></div>
-<div class="paragraph"><p>Return the response body.</p></div>
-<div class="paragraph"><p>The response body can be provided either as the actual data
-to be sent or a tuple indicating which file to send.</p></div>
-<div class="paragraph"><p>This function is called for both GET and HEAD requests. For
-the latter the body is not sent, however.</p></div>
-<div class="paragraph"><p>Note that there used to be a way to stream the response body.
-It was temporarily removed and will be added back in a later
-release.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:resp_body</font></b>()
+<font color="#009900">Default</font> <font color="#990000">-</font> <font color="#FF6600">crash</font></tt></pre>
+</div></div>
+<p>Return the response body.</p>
+<p>The response body can be provided either as the actual data to be sent or a tuple indicating which file to send.</p>
+<p>This function is called for both GET and HEAD requests. For the latter the body is not sent, however.</p>
+<!-- @todo Perhaps we can optimize HEAD requests and just-->
+<!-- allow calculating the length instead of returning the-->
+<!-- whole thing.-->
+<p>Note that there used to be a way to stream the response body. It was temporarily removed and will be added back in a later release.</p>
+<!-- @todo Add a way to switch to loop handler for streaming the body.-->
<h3 id="_resource_exists">resource_exists</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">resource_exists</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">resource_exists</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()
-<span style="color: #009900">Default</span> <span style="color: #990000">::</span> <span style="color: #000080">true</span></tt></pre></div></div>
-<div class="paragraph"><p>Return whether the resource exists.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> <b><font color="#000000">boolean</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <font color="#000080">true</font></tt></pre>
+</div></div>
+<p>Return whether the resource exists.</p>
<h3 id="_service_available">service_available</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">service_available</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">service_available</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()
-<span style="color: #009900">Default</span> <span style="color: #990000">::</span> <span style="color: #000080">true</span></tt></pre></div></div>
-<div class="paragraph"><p>Return whether the service is available.</p></div>
-<div class="paragraph"><p>A <em>503 Service Unavailable</em> response will be sent when this
-function returns <code>false</code>.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> <b><font color="#000000">boolean</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <font color="#000080">true</font></tt></pre>
+</div></div>
+<p>Return whether the service is available.</p>
+<p>A <em>503 Service Unavailable</em> response will be sent when this function returns <code>false</code>.</p>
<h3 id="_uri_too_long">uri_too_long</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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_too_long</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">uri_too_long</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()
-<span style="color: #009900">Default</span> <span style="color: #990000">::</span> <span style="color: #000080">false</span></tt></pre></div></div>
-<div class="paragraph"><p>Return whether the requested URI is too long.</p></div>
-<div class="paragraph"><p>This function can be used to further restrict the length
-of the URI for this specific resource.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> <b><font color="#000000">boolean</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <font color="#000080">false</font></tt></pre>
+</div></div>
+<p>Return whether the requested URI is too long.</p>
+<p>This function can be used to further restrict the length of the URI for this specific resource.</p>
<h3 id="_valid_content_headers">valid_content_headers</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">valid_content_headers</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">valid_content_headers</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()
-<span style="color: #009900">Default</span> <span style="color: #990000">::</span> <span style="color: #000080">true</span></tt></pre></div></div>
-<div class="paragraph"><p>Return whether the content headers are valid.</p></div>
-<div class="paragraph"><p>This callback can be used to reject requests that have
-invalid content header values, for example an unsupported
-content-encoding.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> <b><font color="#000000">boolean</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <font color="#000080">true</font></tt></pre>
+</div></div>
+<p>Return whether the content headers are valid.</p>
+<p>This callback can be used to reject requests that have invalid content header values, for example an unsupported content-encoding.</p>
<h3 id="_valid_entity_length">valid_entity_length</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">valid_entity_length</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">valid_entity_length</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()
-<span style="color: #009900">Default</span> <span style="color: #990000">::</span> <span style="color: #000080">true</span></tt></pre></div></div>
-<div class="paragraph"><p>Return whether the request body length is within acceptable boundaries.</p></div>
-<div class="paragraph"><p>A <em>413 Request Entity Too Large</em> response will be sent if this
-function returns <code>false</code>.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> <b><font color="#000000">boolean</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <font color="#000080">true</font></tt></pre>
+</div></div>
+<p>Return whether the request body length is within acceptable boundaries.</p>
+<p>A <em>413 Request Entity Too Large</em> response will be sent if this function returns <code>false</code>.</p>
<h3 id="_variances">variances</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">variances</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">variances</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</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 insensitive</span></span>
-<span style="color: #009900">Default</span> <span style="color: #990000">::</span> []</tt></pre></div></div>
-<div class="paragraph"><p>Return the list of request headers that affect the
-representation of the resource.</p></div>
-<div class="paragraph"><p>Cowboy automatically adds the accept, accept-charset and
-accept-language headers when necessary. It&#8217;s also useful
-to note that some standard headers also do not need to be
-listed here, like the authorization header.</p></div>
-</div>
-</div>
-</div>
-<div class="sect1">
+<font color="#009900">Result</font> <font color="#990000">::</font> [<b><font color="#000080">binary</font></b>()] <i><font color="#9A1900">%% case insensitive</font></i>
+<font color="#009900">Default</font> <font color="#990000">::</font> []</tt></pre>
+</div></div>
+<p>Return the list of request headers that affect the representation of the resource.</p>
+<p>Cowboy automatically adds the accept, accept-charset and accept-language headers when necessary. It&apos;s also useful to note that some standard headers also do not need to be listed here, like the authorization header.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.1</strong>: The <code>switch_handler</code> return value was added.
-</p>
+<ul><li><strong>2.1</strong>: The <code>switch_handler</code> return value was added.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Behavior introduced.
-</p>
+<li><strong>1.0</strong>: Behavior introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="..">cowboy(7)</a>,
-<a href="../cowboy_handler">cowboy_handler(3)</a></p></div>
-</div>
-</div>
+<p><a href="..">cowboy(7)</a>, <a href="../cowboy_handler">cowboy_handler(3)</a></p>
+
diff --git a/docs/en/cowboy/2.2/manual/cowboy_router.compile/index.html b/docs/en/cowboy/2.2/manual/cowboy_router.compile/index.html
index 129cab1f..3f134779 100644
--- a/docs/en/cowboy/2.2/manual/cowboy_router.compile/index.html
+++ b/docs/en/cowboy/2.2/manual/cowboy_router.compile/index.html
@@ -62,87 +62,48 @@
<h1 class="lined-header"><span>cowboy_router:compile(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_router:compile - Compile routes to the resources</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_router:compile - Compile routes to the resources</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">compile</span></span>(<span style="font-weight: bold"><span style="color: #000000">cowboy_router:routes</span></span>()) <span style="color: #990000">-&gt;</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_router:dispatch_rules</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Compile routes to the resources.</p></div>
-<div class="paragraph"><p>Takes a human readable list of routes and transforms it
-into a form more efficient to process.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">compile</font></b>(<b><font color="#000000">cowboy_router:routes</font></b>()) <font color="#990000">-&gt;</font> <b><font color="#000000">cowboy_router:dispatch_rules</font></b>()</tt></pre>
+</div></div>
+<p>Compile routes to the resources.</p>
+<p>Takes a human readable list of routes and transforms it into a form more efficient to process.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Routes
-</dt>
-<dd>
-<p>
-Human readable list of routes.
-</p>
+<dl><dt>Routes</dt>
+<dd><p>Human readable list of routes.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>An opaque dispatch rules value is returned. This value
-must be given to Cowboy as a middleware environment value.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>An opaque dispatch rules value is returned. This value must be given to Cowboy as a middleware environment value.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<ul><li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Compile routes and start a listener</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Compile routes and start a listener</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">Dispatch</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_router:compile</span></span>([
- {<span style="color: #FF6600">'_'</span>, [
- {<span style="color: #FF0000">"/"</span>, <span style="color: #FF6600">toppage_h</span>, []},
- {<span style="color: #FF0000">"/[...], cowboy_static, {priv_dir, my_example_app, ""}}</span>
-<span style="color: #FF0000"> ]}</span>
-<span style="color: #FF0000">]),</span>
-
-<span style="color: #FF0000">{ok, _} = cowboy:start_clear(example, [{port, 8080}], #{</span>
-<span style="color: #FF0000"> env =&gt; #{dispatch =&gt; Dispatch}</span>
-<span style="color: #FF0000">}).</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Dispatch</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_router:compile</font></b>([
+ {<font color="#FF6600">'_'</font>, [
+ {<font color="#FF0000">"/"</font>, <font color="#FF6600">toppage_h</font>, []},
+ {<font color="#FF0000">"/[...], cowboy_static, {priv_dir, my_example_app, ""}}</font>
+<font color="#FF0000"> ]}</font>
+<font color="#FF0000">]),</font>
+
+<font color="#FF0000">{ok, _} = cowboy:start_clear(example, [{port, 8080}], #{</font>
+<font color="#FF0000"> env =&gt; #{dispatch =&gt; Dispatch}</font>
+<font color="#FF0000">}).</font></tt></pre>
+</div></div>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../cowboy_router">cowboy_router(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_router">cowboy_router(3)</a></p>
+
diff --git a/docs/en/cowboy/2.2/manual/cowboy_router/index.html b/docs/en/cowboy/2.2/manual/cowboy_router/index.html
index 94b6438d..10333a5c 100644
--- a/docs/en/cowboy/2.2/manual/cowboy_router/index.html
+++ b/docs/en/cowboy/2.2/manual/cowboy_router/index.html
@@ -62,110 +62,65 @@
<h1 class="lined-header"><span>cowboy_router(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_router - Router middleware</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_router - Router middleware</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <code>cowboy_router</code> middleware maps the requested host and
-path to the handler to be used for processing the request.</p></div>
-<div class="paragraph"><p>The router takes the <code>dispatch</code> rules as input from the
-middleware environment. Dispatch rules are generated by
-calling the
-<a href="../cowboy_router.compile">cowboy_router:compile(3)</a>
-function.</p></div>
-<div class="paragraph"><p>When a route matches, the router sets the <code>handler</code> and
-<code>handler_opts</code> middleware environment values containing
-the handler module and initial state, respectively.</p></div>
-<div class="paragraph"><p>The router will stop execution when no route matches.
-It will send a 400 response if no host was found, and
-a 404 response otherwise.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The <code>cowboy_router</code> middleware maps the requested host and path to the handler to be used for processing the request.</p>
+<p>The router takes the <code>dispatch</code> rules as input from the middleware environment. Dispatch rules are generated by calling the <a href="../cowboy_router.compile">cowboy_router:compile(3)</a> function.</p>
+<p>When a route matches, the router sets the <code>handler</code> and <code>handler_opts</code> middleware environment values containing the handler module and initial state, respectively.</p>
+<p>The router will stop execution when no route matches. It will send a 400 response if no host was found, and a 404 response otherwise.</p>
<h2 id="_exports">Exports</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../cowboy_router.compile">cowboy_router:compile(3)</a> - Compile routes to the resources
-</p>
+<ul><li><a href="../cowboy_router.compile">cowboy_router:compile(3)</a> - Compile routes to the resources
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_types">Types</h2>
-<div class="sectionbody">
-<div class="sect2">
<h3 id="_bindings">bindings()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">bindings</span></span>() <span style="color: #990000">::</span> #{<span style="font-weight: bold"><span style="color: #000080">atom</span></span>() <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>Bindings found during routing.</p></div>
-</div>
-<div class="sect2">
+<pre><tt><b><font color="#000000">bindings</font></b>() <font color="#990000">::</font> #{<b><font color="#000080">atom</font></b>() <font color="#990000">=&gt;</font> <b><font color="#000000">any</font></b>()}</tt></pre>
+</div></div>
+<p>Bindings found during routing.</p>
<h3 id="_dispatch_rules">dispatch_rules()</h3>
-<div class="paragraph"><p>Opaque type containing the compiled routes.</p></div>
-</div>
-<div class="sect2">
+<p>Opaque type containing the compiled routes.</p>
<h3 id="_routes">routes()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">routes</span></span>() <span style="color: #990000">=</span> [
- {<span style="color: #009900">Host</span>, <span style="color: #009900">PathList</span>} |
- {<span style="color: #009900">Host</span>, <span style="color: #009900">Fields</span>, <span style="color: #009900">PathList</span>}
+<pre><tt><b><font color="#000000">routes</font></b>() <font color="#990000">=</font> [
+ {<font color="#009900">Host</font>, <font color="#009900">PathList</font>} |
+ {<font color="#009900">Host</font>, <font color="#009900">Fields</font>, <font color="#009900">PathList</font>}
]
-<span style="color: #009900">PathList</span> <span style="color: #990000">::</span> [
- {<span style="color: #009900">Path</span>, <span style="color: #009900">Handler</span>, <span style="color: #009900">InitialState</span>} |
- {<span style="color: #009900">Path</span>, <span style="color: #009900">Fields</span>, <span style="color: #009900">Handler</span>, <span style="color: #009900">InitialState</span>}
+<font color="#009900">PathList</font> <font color="#990000">::</font> [
+ {<font color="#009900">Path</font>, <font color="#009900">Handler</font>, <font color="#009900">InitialState</font>} |
+ {<font color="#009900">Path</font>, <font color="#009900">Fields</font>, <font color="#009900">Handler</font>, <font color="#009900">InitialState</font>}
]
-<span style="color: #009900">Host</span> <span style="color: #990000">::</span> <span style="color: #FF6600">'_'</span> | <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>()
-<span style="color: #009900">Path</span> <span style="color: #990000">::</span> <span style="color: #FF6600">'_'</span> | <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>()
-<span style="color: #009900">Fields</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:fields</span></span>()
-<span style="color: #009900">Handler</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">module</span></span>()
-<span style="color: #009900">InitialState</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>Human readable list of routes to handlers.</p></div>
-<div class="paragraph"><p>Cowboy uses this list to map hosts and paths, optionally
-augmented with constraints applied to the bindings, to
-handler modules.</p></div>
-<div class="paragraph"><p>The syntax for routes is currently defined in the user guide.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Host</font> <font color="#990000">::</font> <font color="#FF6600">'_'</font> | <b><font color="#000000">iodata</font></b>()
+<font color="#009900">Path</font> <font color="#990000">::</font> <font color="#FF6600">'_'</font> | <b><font color="#000000">iodata</font></b>()
+<font color="#009900">Fields</font> <font color="#990000">::</font> <b><font color="#000000">cowboy:fields</font></b>()
+<font color="#009900">Handler</font> <font color="#990000">::</font> <b><font color="#000000">module</font></b>()
+<font color="#009900">InitialState</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()</tt></pre>
+</div></div>
+<p>Human readable list of routes to handlers.</p>
+<p>Cowboy uses this list to map hosts and paths, optionally augmented with constraints applied to the bindings, to handler modules.</p>
+<p>The syntax for routes is currently defined in the user guide.</p>
+<!-- @todo The syntax should probably be in this module,-->
+<!-- and the user guide show more practical examples.-->
<h3 id="_tokens">tokens()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">tokens</span></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>List of <code>host_info</code> and <code>path_info</code> tokens that were found
-using the <code>...</code> syntax.</p></div>
-</div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">tokens</font></b>() <font color="#990000">::</font> [<b><font color="#000080">binary</font></b>()]</tt></pre>
+</div></div>
+<p>List of <code>host_info</code> and <code>path_info</code> tokens that were found using the <code>...</code> syntax.</p>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="..">cowboy(7)</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>,
-<a href="../cowboy_req.path_info">cowboy_req:path_info(3)</a></p></div>
-</div>
-</div>
+<p><a href="..">cowboy(7)</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>, <a href="../cowboy_req.path_info">cowboy_req:path_info(3)</a></p>
+
diff --git a/docs/en/cowboy/2.2/manual/cowboy_static/index.html b/docs/en/cowboy/2.2/manual/cowboy_static/index.html
index 6c6d8ca6..f0c0e34a 100644
--- a/docs/en/cowboy/2.2/manual/cowboy_static/index.html
+++ b/docs/en/cowboy/2.2/manual/cowboy_static/index.html
@@ -62,175 +62,110 @@
<h1 class="lined-header"><span>cowboy_static(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_static - Static file handler</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_static - Static file handler</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The module <code>cowboy_static</code> implements file serving capabilities
-using the REST semantics provided by <code>cowboy_rest</code>.</p></div>
-<div class="paragraph"><p>The static file handler is a pre-written handler coming with
-Cowboy. To serve files, use it in your routes.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The module <code>cowboy_static</code> implements file serving capabilities using the REST semantics provided by <code>cowboy_rest</code>.</p>
+<p>The static file handler is a pre-written handler coming with Cowboy. To serve files, use it in your routes.</p>
<h2 id="_options">Options</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">opts</span></span>() <span style="color: #990000">::</span> {<span style="color: #FF6600">priv_file</span>, <span style="color: #009900">App</span>, <span style="color: #009900">Path</span>}
- | {<span style="color: #FF6600">priv_file</span>, <span style="color: #009900">App</span>, <span style="color: #009900">Path</span>, <span style="color: #009900">Extra</span>}
- | {<span style="color: #FF6600">file</span>, <span style="color: #009900">Path</span>}
- | {<span style="color: #FF6600">file</span>, <span style="color: #009900">Path</span>, <span style="color: #009900">Extra</span>}
- | {<span style="color: #FF6600">priv_dir</span>, <span style="color: #009900">App</span>, <span style="color: #009900">Path</span>}
- | {<span style="color: #FF6600">priv_dir</span>, <span style="color: #009900">App</span>, <span style="color: #009900">Path</span>, <span style="color: #009900">Extra</span>}
- | {<span style="color: #FF6600">dir</span>, <span style="color: #009900">Path</span>}
- | {<span style="color: #FF6600">dir</span>, <span style="color: #009900">Path</span>, <span style="color: #009900">Extra</span>}
-
-<span style="color: #009900">App</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">atom</span></span>()
-<span style="color: #009900">Path</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>() | <span style="font-weight: bold"><span style="color: #000000">string</span></span>()
-<span style="color: #009900">Extra</span> <span style="color: #990000">::</span> [<span style="color: #009900">Etag</span> | <span style="color: #009900">Mimetypes</span>]
-
-<span style="color: #009900">Etag</span> <span style="color: #990000">::</span> {<span style="color: #FF6600">etag</span>, <span style="font-weight: bold"><span style="color: #000000">module</span></span>(), <span style="font-weight: bold"><span style="color: #000080">function</span></span>()}
- | {<span style="color: #FF6600">etag</span>, <span style="color: #000080">false</span>}
-
-<span style="color: #009900">Mimetypes</span> <span style="color: #990000">::</span> {<span style="color: #FF6600">mimetypes</span>, <span style="font-weight: bold"><span style="color: #000000">module</span></span>(), <span style="font-weight: bold"><span style="color: #000080">function</span></span>()}
- | {<span style="color: #FF6600">mimetypes</span>, <span style="font-weight: bold"><span style="color: #000080">binary</span></span>() | <span style="color: #009900">ParsedMime</span>}
-
-<span style="color: #009900">ParsedMime</span> <span style="color: #990000">::</span> {<span style="color: #009900">Type</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="color: #009900">SubType</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="color: #009900">Params</span>}
-<span style="color: #009900">Params</span> <span style="color: #990000">::</span> [{<span style="color: #009900">Key</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="color: #009900">Value</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>Static handler configuration.</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-priv_file
-</dt>
-<dd>
-<p>
-Send a file.
-</p>
-<div class="paragraph"><p>The path is relative to the given application&#8217;s private
-directory.</p></div>
+<pre><tt><b><font color="#000000">opts</font></b>() <font color="#990000">::</font> {<font color="#FF6600">priv_file</font>, <font color="#009900">App</font>, <font color="#009900">Path</font>}
+ | {<font color="#FF6600">priv_file</font>, <font color="#009900">App</font>, <font color="#009900">Path</font>, <font color="#009900">Extra</font>}
+ | {<font color="#FF6600">file</font>, <font color="#009900">Path</font>}
+ | {<font color="#FF6600">file</font>, <font color="#009900">Path</font>, <font color="#009900">Extra</font>}
+ | {<font color="#FF6600">priv_dir</font>, <font color="#009900">App</font>, <font color="#009900">Path</font>}
+ | {<font color="#FF6600">priv_dir</font>, <font color="#009900">App</font>, <font color="#009900">Path</font>, <font color="#009900">Extra</font>}
+ | {<font color="#FF6600">dir</font>, <font color="#009900">Path</font>}
+ | {<font color="#FF6600">dir</font>, <font color="#009900">Path</font>, <font color="#009900">Extra</font>}
+
+<font color="#009900">App</font> <font color="#990000">::</font> <b><font color="#000080">atom</font></b>()
+<font color="#009900">Path</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() | <b><font color="#000000">string</font></b>()
+<font color="#009900">Extra</font> <font color="#990000">::</font> [<font color="#009900">Etag</font> | <font color="#009900">Mimetypes</font>]
+
+<font color="#009900">Etag</font> <font color="#990000">::</font> {<font color="#FF6600">etag</font>, <b><font color="#000000">module</font></b>(), <b><font color="#000080">function</font></b>()}
+ | {<font color="#FF6600">etag</font>, <font color="#000080">false</font>}
+
+<font color="#009900">Mimetypes</font> <font color="#990000">::</font> {<font color="#FF6600">mimetypes</font>, <b><font color="#000000">module</font></b>(), <b><font color="#000080">function</font></b>()}
+ | {<font color="#FF6600">mimetypes</font>, <b><font color="#000080">binary</font></b>() | <font color="#009900">ParsedMime</font>}
+
+<font color="#009900">ParsedMime</font> <font color="#990000">::</font> {<font color="#009900">Type</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">SubType</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">Params</font>}
+<font color="#009900">Params</font> <font color="#990000">::</font> [{<font color="#009900">Key</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()}]</tt></pre>
+</div></div>
+<p>Static handler configuration.</p>
+<dl><dt>priv_file</dt>
+<dd><p>Send a file.</p>
+<p>The path is relative to the given application&apos;s private directory.</p>
</dd>
-<dt class="hdlist1">
-file
-</dt>
-<dd>
-<p>
-Send a file.
-</p>
-<div class="paragraph"><p>The path is either absolute or relative to the Erlang node&#8217;s
-current directory.</p></div>
+<dt>file</dt>
+<dd><p>Send a file.</p>
+<p>The path is either absolute or relative to the Erlang node&apos;s current directory.</p>
</dd>
-<dt class="hdlist1">
-priv_dir
-</dt>
-<dd>
-<p>
-Recursively serve files from a directory.
-</p>
-<div class="paragraph"><p>The path is relative to the given application&#8217;s private
-directory.</p></div>
+<dt>priv_dir</dt>
+<dd><p>Recursively serve files from a directory.</p>
+<p>The path is relative to the given application&apos;s private directory.</p>
</dd>
-<dt class="hdlist1">
-dir
-</dt>
-<dd>
-<p>
-Recursively serve files from a directory.
-</p>
-<div class="paragraph"><p>The path is either absolute or relative to the Erlang node&#8217;s
-current directory.</p></div>
+<dt>dir</dt>
+<dd><p>Recursively serve files from a directory.</p>
+<p>The path is either absolute or relative to the Erlang node&apos;s current directory.</p>
</dd>
-</dl></div>
-<div class="paragraph"><p>The extra options allow you to define how the etag should be
-calculated and how the MIME type of files should be detected.</p></div>
-<div class="paragraph"><p>By default the static handler will generate an etag based
-on the size and modification time of the file. You may disable
-the etag entirely with <code>{etag, false}</code> or provide a module
-and function that will be called when needed:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+</dl>
+<p>The extra options allow you to define how the etag should be calculated and how the MIME type of files should be detected.</p>
+<p>By default the static handler will generate an etag based on the size and modification time of the file. You may disable the etag entirely with <code>{etag, false}</code> or provide a module and function that will be called when needed:</p>
+<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">generate_etag</span></span>(<span style="color: #009900">Path</span>, <span style="color: #009900">Size</span>, <span style="color: #009900">Mtime</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #FF6600">strong</span> | <span style="color: #FF6600">weak</span>, <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()}
-
-<span style="color: #009900">Path</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()
-<span style="color: #009900">Size</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>()
-<span style="color: #009900">Mtime</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">file:date_time</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>By default the static handler will detect Web-related MIME types
-by looking at the file extension. You can provide a specific
-MIME type that will always be used, or a module and function that
-will be called when needed:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">generate_etag</font></b>(<font color="#009900">Path</font>, <font color="#009900">Size</font>, <font color="#009900">Mtime</font>) <font color="#990000">-&gt;</font> {<font color="#FF6600">strong</font> | <font color="#FF6600">weak</font>, <b><font color="#000080">binary</font></b>()}
+
+<font color="#009900">Path</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()
+<font color="#009900">Size</font> <font color="#990000">::</font> <b><font color="#000000">non_neg_integer</font></b>()
+<font color="#009900">Mtime</font> <font color="#990000">::</font> <b><font color="#000000">file:date_time</font></b>()</tt></pre>
+</div></div>
+<p>By default the static handler will detect Web-related MIME types by looking at the file extension. You can provide a specific MIME type that will always be used, or a module and function that will be called when needed:</p>
+<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">detect_mimetype</span></span>(<span style="color: #009900">Path</span>) <span style="color: #990000">-&gt;</span> <span style="color: #009900">ParsedMime</span>
-
-<span style="color: #009900">Path</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()
-<span style="color: #009900">ParsedMime</span> <span style="color: #990000">::</span> {<span style="color: #009900">Type</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="color: #009900">SubType</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="color: #009900">Params</span>}
-<span style="color: #009900">Params</span> <span style="color: #990000">::</span> [{<span style="color: #009900">Key</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="color: #009900">Value</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>Cowboy comes with two such functions; the default function
-<code>cow_mimetypes:web/1</code>, and a second function generated from
-the Apache <em>mime.types</em> file, <code>cow_mimetypes:all/1</code>.</p></div>
-<div class="paragraph"><p>The MIME type function should return
-<code>{&lt;&lt;"application"&gt;&gt;, &lt;&lt;"octet-stream"&gt;&gt;, []}</code>
-when it fails to detect a file&#8217;s MIME type.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">detect_mimetype</font></b>(<font color="#009900">Path</font>) <font color="#990000">-&gt;</font> <font color="#009900">ParsedMime</font>
+
+<font color="#009900">Path</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()
+<font color="#009900">ParsedMime</font> <font color="#990000">::</font> {<font color="#009900">Type</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">SubType</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">Params</font>}
+<font color="#009900">Params</font> <font color="#990000">::</font> [{<font color="#009900">Key</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()}]</tt></pre>
+</div></div>
+<!-- @todo Case sensitivity of parsed mime content?-->
+<p>Cowboy comes with two such functions; the default function <code>cow_mimetypes:web/1</code>, and a second function generated from the Apache <em>mime.types</em> file, <code>cow_mimetypes:all/1</code>.</p>
+<p>The MIME type function should return <code>{&lt;&lt;&quot;application&quot;&gt;&gt;, &lt;&lt;&quot;octet-stream&quot;&gt;&gt;, []}</code> when it fails to detect a file&apos;s MIME type.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>1.0</strong>: Handler introduced.
-</p>
+<ul><li><strong>1.0</strong>: Handler introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Custom etag function</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Custom etag function</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">generate_etag</span></span>(<span style="color: #009900">Path</span>, <span style="color: #009900">Size</span>, <span style="color: #009900">Mtime</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">strong</span>, <span style="font-weight: bold"><span style="color: #000000">integer_to_binary</span></span>(
- <span style="font-weight: bold"><span style="color: #000000">erlang:phash2</span></span>({<span style="color: #009900">Path</span>, <span style="color: #009900">Size</span>, <span style="color: #009900">Mtime</span>}, <span style="color: #993399">16#ffffffff</span>))}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Custom MIME type function</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">generate_etag</font></b>(<font color="#009900">Path</font>, <font color="#009900">Size</font>, <font color="#009900">Mtime</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">strong</font>, <b><font color="#000000">integer_to_binary</font></b>(
+ <b><font color="#000000">erlang:phash2</font></b>({<font color="#009900">Path</font>, <font color="#009900">Size</font>, <font color="#009900">Mtime</font>}, <font color="#993399">16#ffffffff</font>))}<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Custom MIME type function</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">always_octet_stream</span></span>(<span style="color: #009900">_Path</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">filename:extension</span></span>(<span style="color: #009900">Path</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">".erl"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">-&gt;</span> {<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"plain"</span><span style="color: #990000">&gt;&gt;</span>, []};
- <span style="color: #990000">_</span> <span style="color: #990000">-&gt;</span> {<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"application"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"octet-stream"</span><span style="color: #990000">&gt;&gt;</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">
+<pre><tt><b><font color="#000000">always_octet_stream</font></b>(<font color="#009900">_Path</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">case</font></b> <b><font color="#000000">filename:extension</font></b>(<font color="#009900">Path</font>) <b><font color="#0000FF">of</font></b>
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">".erl"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">-&gt;</font> {<font color="#990000">&lt;&lt;</font><font color="#FF0000">"text"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"plain"</font><font color="#990000">&gt;&gt;</font>, []};
+ <font color="#990000">_</font> <font color="#990000">-&gt;</font> {<font color="#990000">&lt;&lt;</font><font color="#FF0000">"application"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"octet-stream"</font><font color="#990000">&gt;&gt;</font>, []}
+ <b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="..">cowboy(7)</a>,
-<a href="../cowboy_router">cowboy_router(3)</a></p></div>
-</div>
-</div>
+<p><a href="..">cowboy(7)</a>, <a href="../cowboy_router">cowboy_router(3)</a></p>
+
diff --git a/docs/en/cowboy/2.2/manual/cowboy_stream/index.html b/docs/en/cowboy/2.2/manual/cowboy_stream/index.html
index 1e2e3b35..8b2675a4 100644
--- a/docs/en/cowboy/2.2/manual/cowboy_stream/index.html
+++ b/docs/en/cowboy/2.2/manual/cowboy_stream/index.html
@@ -62,452 +62,307 @@
<h1 class="lined-header"><span>cowboy_stream(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_handler - Stream handlers</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_handler - Stream handlers</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The module <code>cowboy_stream</code> defines a callback interface
-and a protocol for handling HTTP streams.</p></div>
-<div class="paragraph"><p>An HTTP request and its associated response is called
-a stream. A connection may have many streams. In HTTP/1.1
-they are executed sequentially, while in HTTP/2 they are
-executed concurrently.</p></div>
-<div class="paragraph"><p>Cowboy calls the stream handler for nearly all events
-related to a stream. Exceptions vary depending on the
-protocol.</p></div>
-<div class="paragraph"><p>Extra care must be taken when implementing stream handlers
-to ensure compatibility. While some modification of the
-events and commands is allowed, it is generally not a good
-idea to completely omit them.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The module <code>cowboy_stream</code> defines a callback interface and a protocol for handling HTTP streams.</p>
+<p>An HTTP request and its associated response is called a stream. A connection may have many streams. In HTTP/1.1 they are executed sequentially, while in HTTP/2 they are executed concurrently.</p>
+<p>Cowboy calls the stream handler for nearly all events related to a stream. Exceptions vary depending on the protocol.</p>
+<p>Extra care must be taken when implementing stream handlers to ensure compatibility. While some modification of the events and commands is allowed, it is generally not a good idea to completely omit them.</p>
<h2 id="_callbacks">Callbacks</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Stream handlers must implement the following interface:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Stream handlers must implement the following interface:</p>
+<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">init</span></span>(<span style="color: #009900">StreamID</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">Opts</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Commands</span>, <span style="color: #009900">State</span>}
-<span style="font-weight: bold"><span style="color: #000000">data</span></span>(<span style="color: #009900">StreamID</span>, <span style="color: #009900">IsFin</span>, <span style="color: #009900">Data</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Commands</span>, <span style="color: #009900">State</span>}
-<span style="font-weight: bold"><span style="color: #000000">info</span></span>(<span style="color: #009900">StreamID</span>, <span style="color: #009900">Info</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Commands</span>, <span style="color: #009900">State</span>}
-<span style="font-weight: bold"><span style="color: #000000">terminate</span></span>(<span style="color: #009900">StreamID</span>, <span style="color: #009900">Reason</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()
-<span style="font-weight: bold"><span style="color: #000000">early_error</span></span>(<span style="color: #009900">StreamID</span>, <span style="color: #009900">Reason</span>, <span style="color: #009900">PartialReq</span>, <span style="color: #009900">Resp</span>, <span style="color: #009900">Opts</span>) <span style="color: #990000">-&gt;</span> <span style="color: #009900">Resp</span>
-
-<span style="color: #009900">StreamID</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_stream:streamid</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">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:opts</span></span>()
-<span style="color: #009900">Commands</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_stream:commands</span></span>()
-<span style="color: #009900">State</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()
-<span style="color: #009900">IsFin</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_stream:fin</span></span>()
-<span style="color: #009900">Data</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()
-<span style="color: #009900">Info</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()
-<span style="color: #009900">Reason</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_stream:reason</span></span>()
-<span style="color: #009900">PartialReq</span> <span style="color: #990000">-</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:req</span></span>(), <span style="color: #FF6600">except</span> <span style="color: #FF6600">all</span> <span style="color: #FF6600">fields</span> <span style="color: #FF6600">are</span> <span style="color: #FF6600">optional</span>
-<span style="color: #009900">Resp</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_stream:resp_command</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>HTTP/1.1 will initialize a stream only when the request-line
-and all headers have been received. When errors occur before
-that point Cowboy will call the callback <code>early_error/5</code>
-with a partial request, the error reason and the response
-Cowboy intends to send. All other events go throuh the
-stream handler using the normal callbacks.</p></div>
-<div class="paragraph"><p>HTTP/2 will initialize the stream when the <code>HEADERS</code> block has
-been fully received and decoded. Any protocol error occuring
-before that will not result in a response being sent and
-will therefore not go through the stream handler. In addition
-Cowboy may terminate streams without sending an HTTP response
-back.</p></div>
-<div class="paragraph"><p>The stream is initialized by calling <code>init/3</code>. All streams
-that are initialized will eventually be terminated by calling
-<code>terminate/3</code>.</p></div>
-<div class="paragraph"><p>When Cowboy receives data for the stream it will call <code>data/4</code>.
-The data given is the request body after any transfer decoding
-has been applied.</p></div>
-<div class="paragraph"><p>When Cowboy receives a message addressed to a stream, or when
-Cowboy needs to inform the stream handler that an internal
-event has occurred, it will call <code>info/3</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">StreamID</font>, <font color="#009900">Req</font>, <font color="#009900">Opts</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Commands</font>, <font color="#009900">State</font>}
+<b><font color="#000000">data</font></b>(<font color="#009900">StreamID</font>, <font color="#009900">IsFin</font>, <font color="#009900">Data</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Commands</font>, <font color="#009900">State</font>}
+<b><font color="#000000">info</font></b>(<font color="#009900">StreamID</font>, <font color="#009900">Info</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Commands</font>, <font color="#009900">State</font>}
+<b><font color="#000000">terminate</font></b>(<font color="#009900">StreamID</font>, <font color="#009900">Reason</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> <b><font color="#000000">any</font></b>()
+<b><font color="#000000">early_error</font></b>(<font color="#009900">StreamID</font>, <font color="#009900">Reason</font>, <font color="#009900">PartialReq</font>, <font color="#009900">Resp</font>, <font color="#009900">Opts</font>) <font color="#990000">-&gt;</font> <font color="#009900">Resp</font>
+
+<font color="#009900">StreamID</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_stream:streamid</font></b>()
+<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()
+<font color="#009900">Opts</font> <font color="#990000">::</font> <b><font color="#000000">cowboy:opts</font></b>()
+<font color="#009900">Commands</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_stream:commands</font></b>()
+<font color="#009900">State</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()
+<font color="#009900">IsFin</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_stream:fin</font></b>()
+<font color="#009900">Data</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()
+<font color="#009900">Info</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()
+<font color="#009900">Reason</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_stream:reason</font></b>()
+<font color="#009900">PartialReq</font> <font color="#990000">-</font> <b><font color="#000000">cowboy_req:req</font></b>(), <font color="#FF6600">except</font> <font color="#FF6600">all</font> <font color="#FF6600">fields</font> <font color="#FF6600">are</font> <font color="#FF6600">optional</font>
+<font color="#009900">Resp</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_stream:resp_command</font></b>()</tt></pre>
+</div></div>
+<p>HTTP/1.1 will initialize a stream only when the request-line and all headers have been received. When errors occur before that point Cowboy will call the callback <code>early_error/5</code> with a partial request, the error reason and the response Cowboy intends to send. All other events go throuh the stream handler using the normal callbacks.</p>
+<p>HTTP/2 will initialize the stream when the <code>HEADERS</code> block has been fully received and decoded. Any protocol error occuring before that will not result in a response being sent and will therefore not go through the stream handler. In addition Cowboy may terminate streams without sending an HTTP response back.</p>
+<p>The stream is initialized by calling <code>init/3</code>. All streams that are initialized will eventually be terminated by calling <code>terminate/3</code>.</p>
+<p>When Cowboy receives data for the stream it will call <code>data/4</code>. The data given is the request body after any transfer decoding has been applied.</p>
+<p>When Cowboy receives a message addressed to a stream, or when Cowboy needs to inform the stream handler that an internal event has occurred, it will call <code>info/3</code>.</p>
<h2 id="commands">Commands</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Stream handlers can return a list of commands to be executed
-from the <code>init/3</code>, <code>data/4</code> and <code>info/3</code> callbacks. In addition,
-the <code>early_error/5</code> callback must return a response command.</p></div>
-<div class="paragraph"><p>The following commands are defined:</p></div>
-<div class="sect2">
+<p>Stream handlers can return a list of commands to be executed from the <code>init/3</code>, <code>data/4</code> and <code>info/3</code> callbacks. In addition, the <code>early_error/5</code> callback must return a response command.</p>
+<!-- @todo We need a &apos;log&apos; command that would call error_logger.-->
+<!-- It&apos;s better than doing in the handlers directly because-->
+<!-- then we can have other stream handlers manipulate those logs.-->
+<!-- @todo We need a command to send a message so that other-->
+<!-- stream handlers can manipulate these messages if necessary.-->
+<p>The following commands are defined:</p>
<h3 id="inform_command">inform</h3>
-<div class="paragraph"><p>Send an informational response to the client.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Send an informational response to the client.</p>
+<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">inform</span>, <span style="font-weight: bold"><span style="color: #000000">cowboy:http_status</span></span>(), <span style="font-weight: bold"><span style="color: #000000">cowboy:http_headers</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>Any number of informational responses may be sent,
-but only until the final response is sent.</p></div>
-</div>
-<div class="sect2">
+<pre><tt>{<font color="#FF6600">inform</font>, <b><font color="#000000">cowboy:http_status</font></b>(), <b><font color="#000000">cowboy:http_headers</font></b>()}</tt></pre>
+</div></div>
+<p>Any number of informational responses may be sent, but only until the final response is sent.</p>
<h3 id="response_command">response</h3>
-<div class="paragraph"><p>Send a response to the client.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Send a response to the client.</p>
+<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">response</span>, <span style="font-weight: bold"><span style="color: #000000">cowboy:http_status</span></span>(), <span style="font-weight: bold"><span style="color: #000000">cowboy:http_headers</span></span>(),
- <span style="font-weight: bold"><span style="color: #000000">cowboy_req:resp_body</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>No more data can be sent after this command.</p></div>
-</div>
-<div class="sect2">
+<pre><tt>{<font color="#FF6600">response</font>, <b><font color="#000000">cowboy:http_status</font></b>(), <b><font color="#000000">cowboy:http_headers</font></b>(),
+ <b><font color="#000000">cowboy_req:resp_body</font></b>()}</tt></pre>
+</div></div>
+<p>No more data can be sent after this command.</p>
<h3 id="headers_command">headers</h3>
-<div class="paragraph"><p>Initiate a response to the client.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Initiate a response to the client.</p>
+<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="font-weight: bold"><span style="color: #000000">cowboy:http_status</span></span>(), <span style="font-weight: bold"><span style="color: #000000">cowboy:http_headers</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>This initiates a response to the client. The stream
-will end when a data command with the <code>fin</code> flag or
-a trailer command is returned.</p></div>
-</div>
-<div class="sect2">
+<pre><tt>{<font color="#FF6600">headers</font>, <b><font color="#000000">cowboy:http_status</font></b>(), <b><font color="#000000">cowboy:http_headers</font></b>()}</tt></pre>
+</div></div>
+<p>This initiates a response to the client. The stream will end when a data command with the <code>fin</code> flag or a trailer command is returned.</p>
<h3 id="data_command">data</h3>
-<div class="paragraph"><p>Send data to the client.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Send data to the client.</p>
+<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">data</span>, <span style="font-weight: bold"><span style="color: #000000">fin</span></span>(), <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>()}</tt></pre></div></div>
-</div>
-<div class="sect2">
+<pre><tt>{<font color="#FF6600">data</font>, <b><font color="#000000">fin</font></b>(), <b><font color="#000000">iodata</font></b>()}</tt></pre>
+</div></div>
<h3 id="trailers_command">trailers</h3>
-<div class="paragraph"><p>Send response trailers to the client.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Send response trailers to the client.</p>
+<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">trailers</span>, <span style="font-weight: bold"><span style="color: #000000">cowboy:http_headers</span></span>()}</tt></pre></div></div>
-</div>
-<div class="sect2">
+<pre><tt>{<font color="#FF6600">trailers</font>, <b><font color="#000000">cowboy:http_headers</font></b>()}</tt></pre>
+</div></div>
<h3 id="push_command">push</h3>
-<div class="paragraph"><p>Push a resource to the client.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Push a resource to the client.</p>
+<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">push</span>, <span style="color: #009900">Method</span>, <span style="color: #009900">Scheme</span>, <span style="color: #009900">Host</span>, <span style="font-weight: bold"><span style="color: #000000">inet:port_number</span></span>(),
- <span style="color: #009900">Path</span>, <span style="color: #009900">Qs</span>, <span style="font-weight: bold"><span style="color: #000000">cowboy:http_headers</span></span>()}
+<pre><tt>{<font color="#FF6600">push</font>, <font color="#009900">Method</font>, <font color="#009900">Scheme</font>, <font color="#009900">Host</font>, <b><font color="#000000">inet:port_number</font></b>(),
+ <font color="#009900">Path</font>, <font color="#009900">Qs</font>, <b><font color="#000000">cowboy:http_headers</font></b>()}
-<span style="color: #009900">Method</span> <span style="color: #990000">=</span> <span style="color: #009900">Scheme</span> <span style="color: #990000">=</span> <span style="color: #009900">Host</span> <span style="color: #990000">=</span> <span style="color: #009900">Path</span> <span style="color: #990000">=</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>The command will be ignored if the protocol does not provide
-any server push mechanism.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Method</font> <font color="#990000">=</font> <font color="#009900">Scheme</font> <font color="#990000">=</font> <font color="#009900">Host</font> <font color="#990000">=</font> <font color="#009900">Path</font> <font color="#990000">=</font> <font color="#009900">Qs</font> <font color="#990000">=</font> <b><font color="#000080">binary</font></b>()</tt></pre>
+</div></div>
+<p>The command will be ignored if the protocol does not provide any server push mechanism.</p>
<h3 id="_flow">flow</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">flow</span>, <span style="font-weight: bold"><span style="color: #000000">pos_integer</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>Request more data to be read from the request body. The
-exact behavior depends on the protocol.</p></div>
-</div>
-<div class="sect2">
+<pre><tt>{<font color="#FF6600">flow</font>, <b><font color="#000000">pos_integer</font></b>()}</tt></pre>
+</div></div>
+<p>Request more data to be read from the request body. The exact behavior depends on the protocol.</p>
<h3 id="_spawn">spawn</h3>
-<div class="paragraph"><p>Inform Cowboy that a process was spawned and should be
-supervised.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Inform Cowboy that a process was spawned and should be supervised.</p>
+<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: #000080">spawn</span></span>, <span style="font-weight: bold"><span style="color: #000080">pid</span></span>(), <span style="font-weight: bold"><span style="color: #000000">timeout</span></span>()}</tt></pre></div></div>
-</div>
-<div class="sect2">
+<pre><tt>{<b><font color="#000080">spawn</font></b>, <b><font color="#000080">pid</font></b>(), <b><font color="#000000">timeout</font></b>()}</tt></pre>
+</div></div>
<h3 id="_error_response">error_response</h3>
-<div class="paragraph"><p>Send an error response if no response was sent previously.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Send an error response if no response was sent previously.</p>
+<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">error_response</span>, <span style="font-weight: bold"><span style="color: #000000">cowboy:http_status</span></span>(), <span style="font-weight: bold"><span style="color: #000000">cowboy:http_headers</span></span>(), <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>()}</tt></pre></div></div>
-</div>
-<div class="sect2">
+<pre><tt>{<font color="#FF6600">error_response</font>, <b><font color="#000000">cowboy:http_status</font></b>(), <b><font color="#000000">cowboy:http_headers</font></b>(), <b><font color="#000000">iodata</font></b>()}</tt></pre>
+</div></div>
<h3 id="switch_protocol_command">switch_protocol</h3>
-<div class="paragraph"><p>Switch to a different protocol.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Switch to a different protocol.</p>
+<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">switch_protocol</span>, <span style="font-weight: bold"><span style="color: #000000">cowboy:http_headers</span></span>(), <span style="font-weight: bold"><span style="color: #000000">module</span></span>(), <span style="font-weight: bold"><span style="color: #000000">state</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>Contains the headers that will be sent in the 101 response,
-along with the module implementing the protocol we are
-switching to and its initial state.</p></div>
-</div>
-<div class="sect2">
+<pre><tt>{<font color="#FF6600">switch_protocol</font>, <b><font color="#000000">cowboy:http_headers</font></b>(), <b><font color="#000000">module</font></b>(), <b><font color="#000000">state</font></b>()}</tt></pre>
+</div></div>
+<p>Contains the headers that will be sent in the 101 response, along with the module implementing the protocol we are switching to and its initial state.</p>
<h3 id="_stop">stop</h3>
-<div class="paragraph"><p>Stop the stream.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Stop the stream.</p>
+<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">stop</span></tt></pre></div></div>
-<div class="paragraph"><p>While no more data can be sent after the <code>fin</code> flag was set,
-the stream is still tracked by Cowboy until it is stopped by
-the handler.</p></div>
-<div class="paragraph"><p>The behavior when stopping a stream for which no response
-has been sent will vary depending on the protocol. The stream
-will end successfully as far as the client is concerned.</p></div>
-<div class="paragraph"><p>To indicate that an error occurred, either use <code>error_response</code>
-before stopping, or use <code>internal_error</code>.</p></div>
-</div>
-<div class="sect2">
+<pre><tt><font color="#FF6600">stop</font></tt></pre>
+</div></div>
+<p>While no more data can be sent after the <code>fin</code> flag was set, the stream is still tracked by Cowboy until it is stopped by the handler.</p>
+<p>The behavior when stopping a stream for which no response has been sent will vary depending on the protocol. The stream will end successfully as far as the client is concerned.</p>
+<p>To indicate that an error occurred, either use <code>error_response</code> before stopping, or use <code>internal_error</code>.</p>
<h3 id="_internal_error">internal_error</h3>
-<div class="paragraph"><p>Stop the stream with an error.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Stop the stream with an error.</p>
+<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">internal_error</span>, <span style="color: #009900">Reason</span>, <span style="color: #009900">HumanReadable</span>}
-
-<span style="color: #009900">Reason</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()
-<span style="color: #009900">HumanReadable</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000080">atom</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>This command should be used when the stream cannot continue
-because of an internal error. An <code>error_response</code> command
-may be sent before that to advertise to the client why the
-stream is dropped.</p></div>
-</div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#FF6600">internal_error</font>, <font color="#009900">Reason</font>, <font color="#009900">HumanReadable</font>}
+
+<font color="#009900">Reason</font> <font color="#990000">=</font> <b><font color="#000000">any</font></b>()
+<font color="#009900">HumanReadable</font> <font color="#990000">=</font> <b><font color="#000080">atom</font></b>()</tt></pre>
+</div></div>
+<p>This command should be used when the stream cannot continue because of an internal error. An <code>error_response</code> command may be sent before that to advertise to the client why the stream is dropped.</p>
<h2 id="_predefined_events">Predefined events</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy will forward all messages sent to the stream to
-the <code>info/3</code> callback. To send a message to a stream,
-send a message to the connection process with the form
-<code>{{Pid, StreamID}, Msg}</code>. The connection process will
-then forward <code>Msg</code> to the stream handlers.</p></div>
-<div class="paragraph"><p>Cowboy will also forward the exit signals for the
-processes that the stream spawned.</p></div>
-<div class="sect2">
+<p>Cowboy will forward all messages sent to the stream to the <code>info/3</code> callback. To send a message to a stream, send a message to the connection process with the form <code>{{Pid, StreamID}, Msg}</code>. The connection process will then forward <code>Msg</code> to the stream handlers.</p>
+<p>Cowboy will also forward the exit signals for the processes that the stream spawned.</p>
<h3 id="_exit">EXIT</h3>
-<div class="paragraph"><p>A process spawned by this stream has exited.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<!-- info(_StreamID, {&apos;EXIT&apos;, Pid, normal}, State=#state{pid=Pid}) -&gt;-->
+<!-- info(_StreamID, {&apos;EXIT&apos;, Pid, {_Reason, [_, {cow_http_hd, _, _, _}|_]}}, State=#state{pid=Pid}) -&gt;-->
+<!-- info(StreamID, Exit = {&apos;EXIT&apos;, Pid, {Reason, Stacktrace}}, State=#state{ref=Ref, pid=Pid}) -&gt;-->
+<p>A process spawned by this stream has exited.</p>
+<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: #000080">'EXIT'</span>, <span style="font-weight: bold"><span style="color: #000080">pid</span></span>(), <span style="font-weight: bold"><span style="color: #000000">any</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>This is the raw exit message without any modification.</p></div>
-</div>
-<div class="sect2">
+<pre><tt>{<font color="#000080">'EXIT'</font>, <b><font color="#000080">pid</font></b>(), <b><font color="#000000">any</font></b>()}</tt></pre>
+</div></div>
+<p>This is the raw exit message without any modification.</p>
+<!-- === read_body-->
+<!-- -->
+<!-- //info(_StreamID, {read_body, Ref, Length, _},-->
+<!-- //info(StreamID, {read_body, Ref, Length, Period}, State) -&gt;-->
+<!-- -->
+<!-- TODO yeah I am not actually sure this one should be public just yet-->
+<!-- TODO if it is, then we probably shouldn&apos;t send a message directly,-->
+<!-- TODO but rather return a command that will end up sending the message-->
+<!-- -->
+<!-- TODO The problem being that no stream handler has access to that-->
+<!-- TODO message if we send it directly. So we should have a command-->
+<!-- TODO send_message or something that can be seen from all handlers.-->
+<!-- -->
+<!-- TODO The thing is that stream handlers can have 0 to N processes-->
+<!-- TODO so we have to make it easy to say which process should-->
+<!-- TODO receive the message, and perhaps *identify* which process-->
+<!-- TODO gets it?-->
<h3 id="_inform">inform</h3>
-<div class="paragraph"><p>Same as the <a href="../inform_command">inform command</a>.</p></div>
-<div class="paragraph"><p>Sent when the request process reads the body and an
-expect: 100-continue header was present in the request,
-or when the request process sends an informational
-response on its own.</p></div>
-</div>
-<div class="sect2">
+<p>Same as the <a href="../inform_command">inform command</a>.</p>
+<p>Sent when the request process reads the body and an expect: 100-continue header was present in the request, or when the request process sends an informational response on its own.</p>
<h3 id="_response">response</h3>
-<div class="paragraph"><p>Same as the <a href="../response_command">response command</a>.</p></div>
-<div class="paragraph"><p>Usually sent when the request process replies to the client.
-May also be sent by Cowboy internally.</p></div>
-</div>
-<div class="sect2">
+<p>Same as the <a href="../response_command">response command</a>.</p>
+<p>Usually sent when the request process replies to the client. May also be sent by Cowboy internally.</p>
<h3 id="_headers">headers</h3>
-<div class="paragraph"><p>Same as the <a href="../headers_command">headers command</a>.</p></div>
-<div class="paragraph"><p>Sent when the request process starts replying to the client.</p></div>
-</div>
-<div class="sect2">
+<p>Same as the <a href="../headers_command">headers command</a>.</p>
+<p>Sent when the request process starts replying to the client.</p>
<h3 id="_data">data</h3>
-<div class="paragraph"><p>Same as the <a href="../data_command">data command</a>.</p></div>
-<div class="paragraph"><p>Sent when the request process streams data to the client.</p></div>
-</div>
-<div class="sect2">
+<p>Same as the <a href="../data_command">data command</a>.</p>
+<p>Sent when the request process streams data to the client.</p>
<h3 id="_trailers">trailers</h3>
-<div class="paragraph"><p>Same as the <a href="../trailers_command">trailers command</a>.</p></div>
-<div class="paragraph"><p>Sent when the request process sends the trailer field values
-to the client.</p></div>
-</div>
-<div class="sect2">
+<p>Same as the <a href="../trailers_command">trailers command</a>.</p>
+<p>Sent when the request process sends the trailer field values to the client.</p>
<h3 id="_push">push</h3>
-<div class="paragraph"><p>Same as the <a href="../push_command">push command</a>.</p></div>
-<div class="paragraph"><p>Sent when the request process pushes a resource to the client.</p></div>
-</div>
-<div class="sect2">
+<p>Same as the <a href="../push_command">push command</a>.</p>
+<p>Sent when the request process pushes a resource to the client.</p>
<h3 id="_switch_protocol">switch_protocol</h3>
-<div class="paragraph"><p>Same as the <a href="../switch_protocol_command">switch_protocol command</a>.</p></div>
-<div class="paragraph"><p>Sent when switching to the HTTP/2 or Websocket protocol.</p></div>
-</div>
-</div>
-</div>
-<div class="sect1">
+<p>Same as the <a href="../switch_protocol_command">switch_protocol command</a>.</p>
+<!-- @todo Not done for HTTP/2 yet.-->
+<p>Sent when switching to the HTTP/2 or Websocket protocol.</p>
<h2 id="_exports">Exports</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The following function should be called by modules implementing
-stream handlers to execute the next stream handler in the list:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../cowboy_stream.init">cowboy_stream:init(3)</a> - Initialize a stream
-</p>
+<p>The following function should be called by modules implementing stream handlers to execute the next stream handler in the list:</p>
+<ul><li><a href="../cowboy_stream.init">cowboy_stream:init(3)</a> - Initialize a stream
</li>
-<li>
-<p>
-<a href="../cowboy_stream.data">cowboy_stream:data(3)</a> - Handle data for a stream
-</p>
+<li><a href="../cowboy_stream.data">cowboy_stream:data(3)</a> - Handle data for a stream
</li>
-<li>
-<p>
-<a href="../cowboy_stream.info">cowboy_stream:info(3)</a> - Handle a message for a stream
-</p>
+<li><a href="../cowboy_stream.info">cowboy_stream:info(3)</a> - Handle a message for a stream
</li>
-<li>
-<p>
-<a href="../cowboy_stream.terminate">cowboy_stream:terminate(3)</a> - Terminate a stream
-</p>
+<li><a href="../cowboy_stream.terminate">cowboy_stream:terminate(3)</a> - Terminate a stream
</li>
-<li>
-<p>
-<a href="../cowboy_stream.early_error">cowboy_stream:early_error(3)</a> - Handle an early error for a stream
-</p>
+<li><a href="../cowboy_stream.early_error">cowboy_stream:early_error(3)</a> - Handle an early error for a stream
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_types">Types</h2>
-<div class="sectionbody">
-<div class="sect2">
<h3 id="_commands">commands()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">commands</span></span>() <span style="color: #990000">::</span> [<span style="color: #009900">Command</span>]</tt></pre></div></div>
-<div class="paragraph"><p>See the <a href="../commands">list of commands</a> for details.</p></div>
-</div>
-<div class="sect2">
+<pre><tt><b><font color="#000000">commands</font></b>() <font color="#990000">::</font> [<font color="#009900">Command</font>]</tt></pre>
+</div></div>
+<p>See the <a href="../commands">list of commands</a> for details.</p>
<h3 id="_fin">fin()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">fin</span></span>() <span style="color: #990000">::</span> <span style="color: #FF6600">fin</span> | <span style="color: #FF6600">nofin</span></tt></pre></div></div>
-<div class="paragraph"><p>Used in commands and events to indicate that this is
-the end of the stream.</p></div>
-</div>
-<div class="sect2">
+<pre><tt><b><font color="#000000">fin</font></b>() <font color="#990000">::</font> <font color="#FF6600">fin</font> | <font color="#FF6600">nofin</font></tt></pre>
+</div></div>
+<p>Used in commands and events to indicate that this is the end of the stream.</p>
<h3 id="_partial_req">partial_req()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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: #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">version</span> <span style="color: #990000">=&gt;</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: #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">path</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">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>
- <span style="color: #0000FF">headers</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:http_headers</span></span>(),
- <span style="color: #0000FF">peer</span> <span style="color: #990000">=&gt;</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>Partial request information received when an early error is
-detected.</p></div>
-</div>
-<div class="sect2">
+<pre><tt><b><font color="#000000">req</font></b>() <font color="#990000">::</font> #{
+ <font color="#0000FF">method</font> <font color="#990000">=&gt;</font> <b><font color="#000080">binary</font></b>(), <i><font color="#9A1900">%% case sensitive</font></i>
+ <font color="#0000FF">version</font> <font color="#990000">=&gt;</font> <b><font color="#000000">cowboy:http_version</font></b>() | <b><font color="#000080">atom</font></b>(),
+ <font color="#0000FF">scheme</font> <font color="#990000">=&gt;</font> <b><font color="#000080">binary</font></b>(), <i><font color="#9A1900">%% lowercase; case insensitive</font></i>
+ <font color="#0000FF">host</font> <font color="#990000">=&gt;</font> <b><font color="#000080">binary</font></b>(), <i><font color="#9A1900">%% lowercase; case insensitive</font></i>
+ <font color="#0000FF">port</font> <font color="#990000">=&gt;</font> <b><font color="#000000">inet:port_number</font></b>(),
+ <font color="#0000FF">path</font> <font color="#990000">=&gt;</font> <b><font color="#000080">binary</font></b>(), <i><font color="#9A1900">%% case sensitive</font></i>
+ <font color="#0000FF">qs</font> <font color="#990000">=&gt;</font> <b><font color="#000080">binary</font></b>(), <i><font color="#9A1900">%% case sensitive</font></i>
+ <font color="#0000FF">headers</font> <font color="#990000">=&gt;</font> <b><font color="#000000">cowboy:http_headers</font></b>(),
+ <font color="#0000FF">peer</font> <font color="#990000">=&gt;</font> {<b><font color="#000000">inet:ip_address</font></b>(), <b><font color="#000000">inet:port_number</font></b>()}
+}</tt></pre>
+</div></div>
+<p>Partial request information received when an early error is detected.</p>
<h3 id="_reason">reason()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">reason</span></span>() <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">normal</span></span> | <span style="color: #FF6600">switch_protocol</span>
- | {<span style="color: #FF6600">internal_error</span>, <span style="color: #FF6600">timeout</span> | {<span style="color: #FF6600">error</span> | <span style="font-weight: bold"><span style="color: #000080">exit</span></span> | <span style="font-weight: bold"><span style="color: #000080">throw</span></span>, <span style="font-weight: bold"><span style="color: #000000">any</span></span>()}, <span style="color: #009900">HumanReadable</span>}
- | {<span style="color: #FF6600">socket_error</span>, <span style="color: #FF6600">closed</span> | <span style="font-weight: bold"><span style="color: #000080">atom</span></span>(), <span style="color: #009900">HumanReadable</span>}
- | {<span style="color: #FF6600">stream_error</span>, <span style="color: #009900">Error</span>, <span style="color: #009900">HumanReadable</span>}
- | {<span style="color: #FF6600">connection_error</span>, <span style="color: #009900">Error</span>, <span style="color: #009900">HumanReadable</span>}
- | {<span style="color: #FF6600">stop</span>, <span style="font-weight: bold"><span style="color: #000000">cow_http2:frame</span></span>(), <span style="color: #009900">HumanReadable</span>}
-
-<span style="color: #009900">Error</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000080">atom</span></span>()
-<span style="color: #009900">HumanReadable</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000080">atom</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Reason for the stream termination.</p></div>
-</div>
-<div class="sect2">
+<pre><tt><b><font color="#000000">reason</font></b>() <font color="#990000">::</font> <b><font color="#000080">normal</font></b> | <font color="#FF6600">switch_protocol</font>
+ | {<font color="#FF6600">internal_error</font>, <font color="#FF6600">timeout</font> | {<font color="#FF6600">error</font> | <b><font color="#000080">exit</font></b> | <b><font color="#000080">throw</font></b>, <b><font color="#000000">any</font></b>()}, <font color="#009900">HumanReadable</font>}
+ | {<font color="#FF6600">socket_error</font>, <font color="#FF6600">closed</font> | <b><font color="#000080">atom</font></b>(), <font color="#009900">HumanReadable</font>}
+ | {<font color="#FF6600">stream_error</font>, <font color="#009900">Error</font>, <font color="#009900">HumanReadable</font>}
+ | {<font color="#FF6600">connection_error</font>, <font color="#009900">Error</font>, <font color="#009900">HumanReadable</font>}
+ | {<font color="#FF6600">stop</font>, <b><font color="#000000">cow_http2:frame</font></b>(), <font color="#009900">HumanReadable</font>}
+
+<font color="#009900">Error</font> <font color="#990000">=</font> <b><font color="#000080">atom</font></b>()
+<font color="#009900">HumanReadable</font> <font color="#990000">=</font> <b><font color="#000080">atom</font></b>()</tt></pre>
+</div></div>
+<p>Reason for the stream termination.</p>
<h3 id="_resp_command">resp_command()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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_command</span></span>() <span style="color: #990000">::</span> {<span style="color: #FF6600">response</span>, <span style="font-weight: bold"><span style="color: #000000">cowboy:http_status</span></span>(),
- <span style="font-weight: bold"><span style="color: #000000">cowboy:http_headers</span></span>(), <span style="font-weight: bold"><span style="color: #000000">cowboy_req:resp_body</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>See the <a href="../response_command">response command</a> for details.</p></div>
-</div>
-<div class="sect2">
+<pre><tt><b><font color="#000000">resp_command</font></b>() <font color="#990000">::</font> {<font color="#FF6600">response</font>, <b><font color="#000000">cowboy:http_status</font></b>(),
+ <b><font color="#000000">cowboy:http_headers</font></b>(), <b><font color="#000000">cowboy_req:resp_body</font></b>()}</tt></pre>
+</div></div>
+<p>See the <a href="../response_command">response command</a> for details.</p>
<h3 id="_streamid">streamid()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">streamid</span></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>The identifier for this stream.</p></div>
-<div class="paragraph"><p>The identifier is unique over the connection process.
-It is possible to form a unique identifier node-wide and
-cluster-wide by wrapping it in a <code>{self(), StreamID}</code>
-tuple.</p></div>
-</div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">streamid</font></b>() <font color="#990000">::</font> <b><font color="#000000">any</font></b>()</tt></pre>
+</div></div>
+<p>The identifier for this stream.</p>
+<p>The identifier is unique over the connection process. It is possible to form a unique identifier node-wide and cluster-wide by wrapping it in a <code>{self(), StreamID}</code> tuple.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.2</strong>: The trailers command was introduced.
-</p>
+<ul><li><strong>2.2</strong>: The trailers command was introduced.
</li>
-<li>
-<p>
-<strong>2.0</strong>: Module introduced.
-</p>
+<li><strong>2.0</strong>: Module introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="..">cowboy(7)</a>,
-<a href="../cowboy_http">cowboy_http(3)</a>,
-<a href="../cowboy_http2">cowboy_http2(3)</a></p></div>
-</div>
-</div>
+<p><a href="..">cowboy(7)</a>, <a href="../cowboy_http">cowboy_http(3)</a>, <a href="../cowboy_http2">cowboy_http2(3)</a></p>
+
diff --git a/docs/en/cowboy/2.2/manual/cowboy_websocket/index.html b/docs/en/cowboy/2.2/manual/cowboy_websocket/index.html
index 90bae6a8..4b805744 100644
--- a/docs/en/cowboy/2.2/manual/cowboy_websocket/index.html
+++ b/docs/en/cowboy/2.2/manual/cowboy_websocket/index.html
@@ -62,295 +62,144 @@
<h1 class="lined-header"><span>cowboy_websocket(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_websocket - Websocket</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_websocket - Websocket</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The module <code>cowboy_websocket</code> implements Websocket
-as a Ranch protocol. It also defines a callback interface
-for handling Websocket connections.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The module <code>cowboy_websocket</code> implements Websocket as a Ranch protocol. It also defines a callback interface for handling Websocket connections.</p>
<h2 id="_callbacks">Callbacks</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Websocket handlers must implement the following callback
-interface:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Websocket handlers must implement the following callback interface:</p>
+<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">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_websocket</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
- | {<span style="color: #FF6600">cowboy_websocket</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>, <span style="color: #009900">Opts</span>}
-
-<span style="font-weight: bold"><span style="color: #000000">websocket_init</span></span>(<span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> <span style="color: #009900">CallResult</span> <span style="font-style: italic"><span style="color: #9A1900">%% optional</span></span>
-<span style="font-weight: bold"><span style="color: #000000">websocket_handle</span></span>(<span style="color: #009900">InFrame</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> <span style="color: #009900">CallResult</span>
-<span style="font-weight: bold"><span style="color: #000000">websocket_info</span></span>(<span style="color: #009900">Info</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> <span style="color: #009900">CallResult</span>
-
-<span style="font-weight: bold"><span style="color: #000000">terminate</span></span>(<span style="color: #009900">Reason</span>, <span style="color: #009900">PartialReq</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> <span style="color: #FF6600">ok</span> <span style="font-style: italic"><span style="color: #9A1900">%% optional</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">PartialReq</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">map</span></span>()
-<span style="color: #009900">State</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()
-<span style="color: #009900">Opts</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_websocket:opts</span></span>()
-<span style="color: #009900">InFrame</span> <span style="color: #990000">::</span> {<span style="color: #FF6600">text</span> | <span style="font-weight: bold"><span style="color: #000080">binary</span></span> | <span style="color: #FF6600">ping</span> | <span style="color: #FF6600">pong</span>, <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()}
-<span style="color: #009900">OutFrame</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cow_ws:frame</span></span>() <span style="font-style: italic"><span style="color: #9A1900">%% see types below</span></span>
-<span style="color: #009900">Info</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()
-
-<span style="color: #009900">CallResult</span> <span style="color: #990000">::</span> {<span style="color: #FF6600">ok</span>, <span style="color: #009900">State</span>}
- | {<span style="color: #FF6600">ok</span>, <span style="color: #009900">State</span>, <span style="color: #FF6600">hibernate</span>}
- | {<span style="color: #FF6600">reply</span>, <span style="color: #009900">OutFrame</span> | [<span style="color: #009900">OutFrame</span>], <span style="color: #009900">State</span>}
- | {<span style="color: #FF6600">reply</span>, <span style="color: #009900">OutFrame</span> | [<span style="color: #009900">OutFrame</span>], <span style="color: #009900">State</span>, <span style="color: #FF6600">hibernate</span>}
- | {<span style="color: #FF6600">stop</span>, <span style="color: #009900">State</span>}
-
-<span style="color: #009900">Reason</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">normal</span></span> | <span style="color: #FF6600">stop</span> | <span style="color: #FF6600">timeout</span>
- | <span style="color: #FF6600">remote</span> | {<span style="color: #FF6600">remote</span>, <span style="font-weight: bold"><span style="color: #000000">cow_ws:close_code</span></span>(), <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()}
- | {<span style="color: #FF6600">error</span>, <span style="color: #FF6600">badencoding</span> | <span style="color: #FF6600">badframe</span> | <span style="color: #FF6600">closed</span> | <span style="font-weight: bold"><span style="color: #000080">atom</span></span>()}
- | {<span style="color: #FF6600">crash</span>, <span style="color: #FF6600">error</span> | <span style="font-weight: bold"><span style="color: #000080">exit</span></span> | <span style="font-weight: bold"><span style="color: #000080">throw</span></span>, <span style="font-weight: bold"><span style="color: #000000">any</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>The <code>init/2</code> callback is common to all handlers. To upgrade
-the connection to Websocket, it must return <code>cowboy_websocket</code>
-as the first element of the tuple.</p></div>
-<div class="paragraph"><p>Any operation requiring the HTTP request must be done in the
-<code>init/2</code> function, as the Req object will not be available
-after it returns. Websocket sub-protocol selection should
-therefore be done in this function.</p></div>
-<div class="paragraph"><p>The optional <code>websocket_init/1</code> callback will be called once
-the connection has been upgraded to Websocket. It can be used
-to perform any required initialization of the handler.</p></div>
-<div class="paragraph"><p>Note that the <code>init/2</code> function does not run in the same
-process as the Websocket callbacks. Any Websocket-specific
-initialization must be done in <code>websocket_init/1</code>.</p></div>
-<div class="paragraph"><p>The <code>websocket_handle/2</code> callback will be called for every
-frame received. The <code>websocket_info/2</code> callback will be
-called for every Erlang message received.</p></div>
-<div class="paragraph"><p>All three Websocket callbacks may send one or more frames
-back to the client (by returning a <code>reply</code> tuple) or terminate
-the connection (by sending a <code>close</code> frame or returning a <code>stop</code>
-tuple).</p></div>
-<div class="paragraph"><p>The optional <code>terminate/3</code> callback will ultimately be called
-with the reason for the termination of the connection. This
-callback is common to all handlers. Note that Websocket will
-not provide the full Req object by default, to save memory.</p></div>
-<div class="paragraph"><p>Cowboy will terminate the process right after closing the
-Websocket connection. This means that there is no need to
-perform any cleanup in the <code>terminate/3</code> callback.</p></div>
-<div class="paragraph"><p>The following terminate reasons are defined for Websocket
-connections:</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-normal
-</dt>
-<dd>
-<p>
- The connection was closed normally before establishing a Websocket
- connection. This typically happens if an <code>ok</code> tuple is returned
- from the <code>init/2</code> callback.
-</p>
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>)
+ <font color="#990000">-&gt;</font> {<font color="#FF6600">cowboy_websocket</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
+ | {<font color="#FF6600">cowboy_websocket</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>, <font color="#009900">Opts</font>}
+
+<b><font color="#000000">websocket_init</font></b>(<font color="#009900">State</font>) <font color="#990000">-&gt;</font> <font color="#009900">CallResult</font> <i><font color="#9A1900">%% optional</font></i>
+<b><font color="#000000">websocket_handle</font></b>(<font color="#009900">InFrame</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> <font color="#009900">CallResult</font>
+<b><font color="#000000">websocket_info</font></b>(<font color="#009900">Info</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> <font color="#009900">CallResult</font>
+
+<b><font color="#000000">terminate</font></b>(<font color="#009900">Reason</font>, <font color="#009900">PartialReq</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> <font color="#FF6600">ok</font> <i><font color="#9A1900">%% optional</font></i>
+
+<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()
+<font color="#009900">PartialReq</font> <font color="#990000">::</font> <b><font color="#000000">map</font></b>()
+<font color="#009900">State</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()
+<font color="#009900">Opts</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_websocket:opts</font></b>()
+<font color="#009900">InFrame</font> <font color="#990000">::</font> {<font color="#FF6600">text</font> | <b><font color="#000080">binary</font></b> | <font color="#FF6600">ping</font> | <font color="#FF6600">pong</font>, <b><font color="#000080">binary</font></b>()}
+<font color="#009900">OutFrame</font> <font color="#990000">::</font> <b><font color="#000000">cow_ws:frame</font></b>() <i><font color="#9A1900">%% see types below</font></i>
+<font color="#009900">Info</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()
+
+<font color="#009900">CallResult</font> <font color="#990000">::</font> {<font color="#FF6600">ok</font>, <font color="#009900">State</font>}
+ | {<font color="#FF6600">ok</font>, <font color="#009900">State</font>, <font color="#FF6600">hibernate</font>}
+ | {<font color="#FF6600">reply</font>, <font color="#009900">OutFrame</font> | [<font color="#009900">OutFrame</font>], <font color="#009900">State</font>}
+ | {<font color="#FF6600">reply</font>, <font color="#009900">OutFrame</font> | [<font color="#009900">OutFrame</font>], <font color="#009900">State</font>, <font color="#FF6600">hibernate</font>}
+ | {<font color="#FF6600">stop</font>, <font color="#009900">State</font>}
+
+<font color="#009900">Reason</font> <font color="#990000">::</font> <b><font color="#000080">normal</font></b> | <font color="#FF6600">stop</font> | <font color="#FF6600">timeout</font>
+ | <font color="#FF6600">remote</font> | {<font color="#FF6600">remote</font>, <b><font color="#000000">cow_ws:close_code</font></b>(), <b><font color="#000080">binary</font></b>()}
+ | {<font color="#FF6600">error</font>, <font color="#FF6600">badencoding</font> | <font color="#FF6600">badframe</font> | <font color="#FF6600">closed</font> | <b><font color="#000080">atom</font></b>()}
+ | {<font color="#FF6600">crash</font>, <font color="#FF6600">error</font> | <b><font color="#000080">exit</font></b> | <b><font color="#000080">throw</font></b>, <b><font color="#000000">any</font></b>()}</tt></pre>
+</div></div>
+<p>The <code>init/2</code> callback is common to all handlers. To upgrade the connection to Websocket, it must return <code>cowboy_websocket</code> as the first element of the tuple.</p>
+<p>Any operation requiring the HTTP request must be done in the <code>init/2</code> function, as the Req object will not be available after it returns. Websocket sub-protocol selection should therefore be done in this function.</p>
+<p>The optional <code>websocket_init/1</code> callback will be called once the connection has been upgraded to Websocket. It can be used to perform any required initialization of the handler.</p>
+<p>Note that the <code>init/2</code> function does not run in the same process as the Websocket callbacks. Any Websocket-specific initialization must be done in <code>websocket_init/1</code>.</p>
+<p>The <code>websocket_handle/2</code> callback will be called for every frame received. The <code>websocket_info/2</code> callback will be called for every Erlang message received.</p>
+<p>All three Websocket callbacks may send one or more frames back to the client (by returning a <code>reply</code> tuple) or terminate the connection (by sending a <code>close</code> frame or returning a <code>stop</code> tuple).</p>
+<p>The optional <code>terminate/3</code> callback will ultimately be called with the reason for the termination of the connection. This callback is common to all handlers. Note that Websocket will not provide the full Req object by default, to save memory.</p>
+<p>Cowboy will terminate the process right after closing the Websocket connection. This means that there is no need to perform any cleanup in the <code>terminate/3</code> callback.</p>
+<p>The following terminate reasons are defined for Websocket connections:</p>
+<dl><dt>normal</dt>
+<dd><p>The connection was closed normally before establishing a Websocket connection. This typically happens if an <code>ok</code> tuple is returned from the <code>init/2</code> callback.</p>
</dd>
-<dt class="hdlist1">
-remote
-</dt>
-<dd>
-<p>
- The remote endpoint closed the connection without giving any
- further details.
-</p>
+<dt>remote</dt>
+<dd><p>The remote endpoint closed the connection without giving any further details.</p>
</dd>
-<dt class="hdlist1">
-{remote, Code, Payload}
-</dt>
-<dd>
-<p>
- The remote endpoint closed the connection with the given
- <code>Code</code> and <code>Payload</code> as the reason.
-</p>
+<dt>{remote, Code, Payload}</dt>
+<dd><p>The remote endpoint closed the connection with the given <code>Code</code> and <code>Payload</code> as the reason.</p>
</dd>
-<dt class="hdlist1">
-stop
-</dt>
-<dd>
-<p>
- The handler requested to close the connection, either by returning
- a <code>stop</code> tuple or by sending a <code>close</code> frame.
-</p>
+<dt>stop</dt>
+<dd><p>The handler requested to close the connection, either by returning a <code>stop</code> tuple or by sending a <code>close</code> frame.</p>
</dd>
-<dt class="hdlist1">
-timeout
-</dt>
-<dd>
-<p>
- The connection has been closed due to inactivity. The timeout
- value can be configured from <code>init/2</code>.
-</p>
+<dt>timeout</dt>
+<dd><p>The connection has been closed due to inactivity. The timeout value can be configured from <code>init/2</code>.</p>
</dd>
-<dt class="hdlist1">
-{crash, Class, Reason}
-</dt>
-<dd>
-<p>
- A crash occurred in the handler. <code>Class</code> and <code>Reason</code> can be
- used to obtain more information about the crash. The function
- <code>erlang:get_stacktrace/0</code> can also be called to obtain the
- stacktrace of the process when the crash occurred.
-</p>
+<dt>{crash, Class, Reason}</dt>
+<dd><p>A crash occurred in the handler. <code>Class</code> and <code>Reason</code> can be used to obtain more information about the crash. The function <code>erlang:get_stacktrace/0</code> can also be called to obtain the stacktrace of the process when the crash occurred.</p>
</dd>
-<dt class="hdlist1">
-{error, badencoding}
-</dt>
-<dd>
-<p>
- A text frame was sent by the client with invalid encoding. All
- text frames must be valid UTF-8.
-</p>
+<dt>{error, badencoding}</dt>
+<dd><p>A text frame was sent by the client with invalid encoding. All text frames must be valid UTF-8.</p>
</dd>
-<dt class="hdlist1">
-{error, badframe}
-</dt>
-<dd>
-<p>
- A protocol error has been detected.
-</p>
+<dt>{error, badframe}</dt>
+<dd><p>A protocol error has been detected.</p>
</dd>
-<dt class="hdlist1">
-{error, closed}
-</dt>
-<dd>
-<p>
- The socket has been closed brutally without a close frame being
- received first.
-</p>
+<dt>{error, closed}</dt>
+<dd><p>The socket has been closed brutally without a close frame being received first.</p>
</dd>
-<dt class="hdlist1">
-{error, Reason}
-</dt>
-<dd>
-<p>
- A socket error ocurred.
-</p>
+<dt>{error, Reason}</dt>
+<dd><p>A socket error ocurred.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_types">Types</h2>
-<div class="sectionbody">
-<div class="sect3">
<h4 id="_cow_ws_frame">cow_ws:frame()</h4>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">frame</span></span>() <span style="color: #990000">::</span> {<span style="color: #FF6600">text</span>, <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>()}
- | {<span style="font-weight: bold"><span style="color: #000080">binary</span></span>, <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>()}
- | <span style="color: #FF6600">ping</span> | {<span style="color: #FF6600">ping</span>, <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>()}
- | <span style="color: #FF6600">pong</span> | {<span style="color: #FF6600">pong</span>, <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>()}
- | <span style="color: #FF6600">close</span> | {<span style="color: #FF6600">close</span>, <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>()} | {<span style="color: #FF6600">close</span>, <span style="font-weight: bold"><span style="color: #000000">close_code</span></span>(), <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>()}
-
-<span style="font-weight: bold"><span style="color: #000000">close_code</span></span>() <span style="color: #990000">::</span> <span style="color: #993399">1000</span><span style="color: #990000">..</span><span style="color: #993399">1003</span> | <span style="color: #993399">1006</span><span style="color: #990000">..</span><span style="color: #993399">1011</span> | <span style="color: #993399">3000</span><span style="color: #990000">..</span><span style="color: #993399">4999</span></tt></pre></div></div>
-<div class="paragraph"><p>Websocket frames that can be sent as a response.</p></div>
-<div class="paragraph"><p>Note that there is no need to send pong frames back as
-Cowboy does it automatically for you.</p></div>
-</div>
-<div class="sect2">
+<pre><tt><b><font color="#000000">frame</font></b>() <font color="#990000">::</font> {<font color="#FF6600">text</font>, <b><font color="#000000">iodata</font></b>()}
+ | {<b><font color="#000080">binary</font></b>, <b><font color="#000000">iodata</font></b>()}
+ | <font color="#FF6600">ping</font> | {<font color="#FF6600">ping</font>, <b><font color="#000000">iodata</font></b>()}
+ | <font color="#FF6600">pong</font> | {<font color="#FF6600">pong</font>, <b><font color="#000000">iodata</font></b>()}
+ | <font color="#FF6600">close</font> | {<font color="#FF6600">close</font>, <b><font color="#000000">iodata</font></b>()} | {<font color="#FF6600">close</font>, <b><font color="#000000">close_code</font></b>(), <b><font color="#000000">iodata</font></b>()}
+
+<b><font color="#000000">close_code</font></b>() <font color="#990000">::</font> <font color="#993399">1000</font><font color="#990000">..</font><font color="#993399">1003</font> | <font color="#993399">1006</font><font color="#990000">..</font><font color="#993399">1011</font> | <font color="#993399">3000</font><font color="#990000">..</font><font color="#993399">4999</font></tt></pre>
+</div></div>
+<p>Websocket frames that can be sent as a response.</p>
+<p>Note that there is no need to send pong frames back as Cowboy does it automatically for you.</p>
<h3 id="_opts">opts()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">opts</span></span>() <span style="color: #990000">::</span> #{
- <span style="color: #0000FF">compress</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>(),
- <span style="color: #0000FF">idle_timeout</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">timeout</span></span>(),
- <span style="color: #0000FF">req_filter</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">fun</span></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">map</span></span>())
-}</tt></pre></div></div>
-<div class="paragraph"><p>Websocket handler options.</p></div>
-<div class="paragraph"><p>This configuration is passed to Cowboy from the <code>init/2</code>
-function:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">opts</font></b>() <font color="#990000">::</font> #{
+ <font color="#0000FF">compress</font> <font color="#990000">=&gt;</font> <b><font color="#000000">boolean</font></b>(),
+ <font color="#0000FF">idle_timeout</font> <font color="#990000">=&gt;</font> <b><font color="#000000">timeout</font></b>(),
+ <font color="#0000FF">req_filter</font> <font color="#990000">=&gt;</font> <b><font color="#0000FF">fun</font></b>((<b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <b><font color="#000000">map</font></b>())
+}</tt></pre>
+</div></div>
+<p>Websocket handler options.</p>
+<p>This configuration is passed to Cowboy from the <code>init/2</code> function:</p>
+<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">init</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- <span style="color: #009900">Opts</span> <span style="color: #990000">=</span> #{<span style="color: #0000FF">compress</span> <span style="color: #990000">=&gt;</span> <span style="color: #000080">true</span>},
- {<span style="color: #FF6600">cowboy_websocket</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>, <span style="color: #009900">Opts</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>The default value is given next to the option name:</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-compress (false)
-</dt>
-<dd>
-<p>
- Whether to enable the Websocket frame compression
- extension. Frames will only be compressed for the
- clients that support this extension.
-</p>
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ <font color="#009900">Opts</font> <font color="#990000">=</font> #{<font color="#0000FF">compress</font> <font color="#990000">=&gt;</font> <font color="#000080">true</font>},
+ {<font color="#FF6600">cowboy_websocket</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>, <font color="#009900">Opts</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>The default value is given next to the option name:</p>
+<dl><dt>compress (false)</dt>
+<dd><p>Whether to enable the Websocket frame compression extension. Frames will only be compressed for the clients that support this extension.</p>
</dd>
-<dt class="hdlist1">
-idle_timeout (60000)
-</dt>
-<dd>
-<p>
- Time in milliseconds that Cowboy will keep the
- connection open without receiving anything from
- the client.
-</p>
+<dt>idle_timeout (60000)</dt>
+<dd><p>Time in milliseconds that Cowboy will keep the connection open without receiving anything from the client.</p>
</dd>
-<dt class="hdlist1">
-req_filter
-</dt>
-<dd>
-<p>
- A function applied to the Req to compact it and
- only keep required information. The Req is only
- given back in the <code>terminate/3</code> callback. By default
- it keeps the method, version, URI components and peer
- information.
-</p>
+<dt>req_filter</dt>
+<dd><p>A function applied to the Req to compact it and only keep required information. The Req is only given back in the <code>terminate/3</code> callback. By default it keeps the method, version, URI components and peer information.</p>
</dd>
-</dl></div>
-</div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: The Req object is no longer passed to Websocket callbacks.
-</p>
+<ul><li><strong>2.0</strong>: The Req object is no longer passed to Websocket callbacks.
</li>
-<li>
-<p>
-<strong>2.0</strong>: The callback <code>websocket_terminate/3</code> was removed in favor of <code>terminate/3</code>.
-</p>
+<li><strong>2.0</strong>: The callback <code>websocket_terminate/3</code> was removed in favor of <code>terminate/3</code>.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Protocol introduced.
-</p>
+<li><strong>1.0</strong>: Protocol introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="..">cowboy(7)</a>,
-<a href="../cowboy_handler">cowboy_handler(3)</a>,
-<a href="../cowboy_http">cowboy_http(3)</a>,
-<a href="../cowboy_http2">cowboy_http2(3)</a></p></div>
-</div>
-</div>
+<p><a href="..">cowboy(7)</a>, <a href="../cowboy_handler">cowboy_handler(3)</a>, <a href="../cowboy_http">cowboy_http(3)</a>, <a href="../cowboy_http2">cowboy_http2(3)</a></p>
+
diff --git a/docs/en/cowboy/2.2/manual/http_status_codes/index.html b/docs/en/cowboy/2.2/manual/http_status_codes/index.html
index a76f19ca..1af65a41 100644
--- a/docs/en/cowboy/2.2/manual/http_status_codes/index.html
+++ b/docs/en/cowboy/2.2/manual/http_status_codes/index.html
@@ -62,271 +62,92 @@
<h1 class="lined-header"><span>HTTP status codes(7)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>HTTP status codes - status codes used by Cowboy</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>HTTP status codes - status codes used by Cowboy</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This chapter aims to list all HTTP status codes that Cowboy
-may return, with details on the reasons why. The list given
-here only includes the replies that Cowboy sends, not user
-replies.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This chapter aims to list all HTTP status codes that Cowboy may return, with details on the reasons why. The list given here only includes the replies that Cowboy sends, not user replies.</p>
<h2 id="_100_continue">100 Continue</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>When the client sends an <code>expect: 100-continue</code> header,
-Cowboy automatically sends a this status code before
-trying to read the request body. This behavior can be
-disabled using the appropriate body option.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>When the client sends an <code>expect: 100-continue</code> header, Cowboy automatically sends a this status code before trying to read the request body. This behavior can be disabled using the appropriate body option.</p>
<h2 id="_101_switching_protocols">101 Switching Protocols</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This is the status code sent when switching to the
-Websocket protocol.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This is the status code sent when switching to the Websocket protocol.</p>
<h2 id="_200_ok">200 OK</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_201_created">201 Created</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_202_accepted">202 Accepted</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_204_no_content">204 No Content</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent when the processing of a request
-ends without any reply having been sent. It may also be
-sent by <code>cowboy_rest</code> under normal conditions.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent when the processing of a request ends without any reply having been sent. It may also be sent by <code>cowboy_rest</code> under normal conditions.</p>
<h2 id="_300_multiple_choices">300 Multiple Choices</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_301_moved_permanently">301 Moved Permanently</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_303_see_other">303 See Other</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_304_not_modified">304 Not Modified</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_307_temporary_redirect">307 Temporary Redirect</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_400_bad_request">400 Bad Request</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy will send this status code for any of the
-following reasons:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-Too many empty lines were sent before the request.
-</p>
+<p>Cowboy will send this status code for any of the following reasons:</p>
+<ul><li>Too many empty lines were sent before the request.
</li>
-<li>
-<p>
-The request-line could not be parsed.
-</p>
+<li>The request-line could not be parsed.
</li>
-<li>
-<p>
-Too many headers were sent.
-</p>
+<li>Too many headers were sent.
</li>
-<li>
-<p>
-A header name was too long.
-</p>
+<li>A header name was too long.
</li>
-<li>
-<p>
-A header value was too long.
-</p>
+<li>A header value was too long.
</li>
-<li>
-<p>
-The host header was missing from an HTTP/1.1 request.
-</p>
+<li>The host header was missing from an HTTP/1.1 request.
</li>
-<li>
-<p>
-The host header could not be parsed.
-</p>
+<li>The host header could not be parsed.
</li>
-<li>
-<p>
-The requested host was not found.
-</p>
+<li>The requested host was not found.
</li>
-<li>
-<p>
-The requested path could not be parsed.
-</p>
+<li>The requested path could not be parsed.
</li>
-<li>
-<p>
-The accept header could not be parsed when using REST.
-</p>
+<li>The accept header could not be parsed when using REST.
</li>
-<li>
-<p>
-REST under normal conditions.
-</p>
+<li>REST under normal conditions.
</li>
-<li>
-<p>
-A Websocket upgrade failed.
-</p>
+<li>A Websocket upgrade failed.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_401_unauthorized">401 Unauthorized</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_403_forbidden">403 Forbidden</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_404_not_found">404 Not Found</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent when the router successfully
-resolved the host but didn&#8217;t find a matching path for
-the request. It may also be sent by <code>cowboy_rest</code> under
-normal conditions.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent when the router successfully resolved the host but didn&apos;t find a matching path for the request. It may also be sent by <code>cowboy_rest</code> under normal conditions.</p>
<h2 id="_405_method_not_allowed">405 Method Not Allowed</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_406_not_acceptable">406 Not Acceptable</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_408_request_timeout">408 Request Timeout</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy will send this status code to the client if the
-client started to send a request, indicated by the
-request-line being received fully, but failed to send
-all headers in a reasonable time.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Cowboy will send this status code to the client if the client started to send a request, indicated by the request-line being received fully, but failed to send all headers in a reasonable time.</p>
<h2 id="_409_conflict">409 Conflict</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_410_gone">410 Gone</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_412_precondition_failed">412 Precondition Failed</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_413_request_entity_too_large">413 Request Entity Too Large</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_414_request_uri_too_long">414 Request-URI Too Long</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy will send this status code to the client if the
-request-line is too long. It may also be sent by
-<code>cowboy_rest</code> under normal conditions.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Cowboy will send this status code to the client if the request-line is too long. It may also be sent by <code>cowboy_rest</code> under normal conditions.</p>
<h2 id="_415_unsupported_media_type">415 Unsupported Media Type</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_500_internal_server_error">500 Internal Server Error</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent when a crash occurs in HTTP, loop
-or REST handlers, or when an invalid return value is
-returned. It may also be sent by <code>cowboy_rest</code> under
-normal conditions.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent when a crash occurs in HTTP, loop or REST handlers, or when an invalid return value is returned. It may also be sent by <code>cowboy_rest</code> under normal conditions.</p>
<h2 id="_501_not_implemented">501 Not Implemented</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_503_service_unavailable">503 Service Unavailable</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_505_http_version_not_supported">505 HTTP Version Not Supported</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy only supports the versions 1.0 and 1.1 of HTTP.
-In all other cases this status code is sent back to the
-client and the connection is closed.</p></div>
-</div>
-</div>
+<p>Cowboy only supports the versions 1.0 and 1.1 of HTTP. In all other cases this status code is sent back to the client and the connection is closed.</p>
+
diff --git a/docs/en/cowboy/2.2/manual/index.html b/docs/en/cowboy/2.2/manual/index.html
index 24224831..805dfe85 100644
--- a/docs/en/cowboy/2.2/manual/index.html
+++ b/docs/en/cowboy/2.2/manual/index.html
@@ -62,171 +62,77 @@
<h1 class="lined-header"><span>Cowboy Function Reference</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy - Small, fast, modern HTTP server for Erlang/OTP</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy - Small, fast, modern HTTP server for Erlang/OTP</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy is an HTTP server for Erlang/OTP with support for the
-HTTP/1.1, HTTP/2 and Websocket protocols.</p></div>
-<div class="paragraph"><p>Cowboy aims to provide a complete HTTP stack. This includes
-the implementation of the HTTP RFCs but also any directly
-related standards, like Websocket or Server-Sent Events.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Cowboy is an HTTP server for Erlang/OTP with support for the HTTP/1.1, HTTP/2 and Websocket protocols.</p>
+<p>Cowboy aims to provide a complete HTTP stack. This includes the implementation of the HTTP RFCs but also any directly related standards, like Websocket or Server-Sent Events.</p>
<h2 id="_modules">Modules</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Functions:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="cowboy">cowboy(3)</a> - Listener management
-</p>
+<p>Functions:</p>
+<ul><li><a href="cowboy">cowboy(3)</a> - Listener management
</li>
-<li>
-<p>
-<a href="cowboy_req">cowboy_req(3)</a> - Request and response
-</p>
+<li><a href="cowboy_req">cowboy_req(3)</a> - Request and response
</li>
-<li>
-<p>
-<a href="cowboy_router">cowboy_router(3)</a> - Router
-</p>
+<li><a href="cowboy_router">cowboy_router(3)</a> - Router
</li>
-<li>
-<p>
-<a href="cowboy_constraints">cowboy_constraints(3)</a> - Constraints
-</p>
+<li><a href="cowboy_constraints">cowboy_constraints(3)</a> - Constraints
</li>
-</ul></div>
-<div class="paragraph"><p>Protocols:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="cowboy_http">cowboy_http(3)</a> - HTTP/1.1
-</p>
+</ul>
+<p>Protocols:</p>
+<ul><li><a href="cowboy_http">cowboy_http(3)</a> - HTTP/1.1
</li>
-<li>
-<p>
-<a href="cowboy_http2">cowboy_http2(3)</a> - HTTP/2
-</p>
+<li><a href="cowboy_http2">cowboy_http2(3)</a> - HTTP/2
</li>
-<li>
-<p>
-<a href="cowboy_websocket">cowboy_websocket(3)</a> - Websocket
-</p>
+<li><a href="cowboy_websocket">cowboy_websocket(3)</a> - Websocket
</li>
-</ul></div>
-<div class="paragraph"><p>Handlers:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="cowboy_static">cowboy_static(3)</a> - Static file handler
-</p>
+</ul>
+<p>Handlers:</p>
+<ul><li><a href="cowboy_static">cowboy_static(3)</a> - Static file handler
</li>
-</ul></div>
-<div class="paragraph"><p>Behaviors:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="cowboy_handler">cowboy_handler(3)</a> - Plain HTTP handlers
-</p>
+</ul>
+<p>Behaviors:</p>
+<ul><li><a href="cowboy_handler">cowboy_handler(3)</a> - Plain HTTP handlers
</li>
-<li>
-<p>
-<a href="cowboy_loop">cowboy_loop(3)</a> - Loop handlers
-</p>
+<li><a href="cowboy_loop">cowboy_loop(3)</a> - Loop handlers
</li>
-<li>
-<p>
-<a href="cowboy_middleware">cowboy_middleware(3)</a> - Middlewares
-</p>
+<li><a href="cowboy_middleware">cowboy_middleware(3)</a> - Middlewares
</li>
-<li>
-<p>
-<a href="cowboy_rest">cowboy_rest(3)</a> - REST handlers
-</p>
+<li><a href="cowboy_rest">cowboy_rest(3)</a> - REST handlers
</li>
-<li>
-<p>
-<a href="cowboy_stream">cowboy_stream(3)</a> - Stream handlers
-</p>
+<li><a href="cowboy_stream">cowboy_stream(3)</a> - Stream handlers
</li>
-<li>
-<p>
-<a href="cowboy_websocket">cowboy_websocket(3)</a> - Websocket handlers
-</p>
+<li><a href="cowboy_websocket">cowboy_websocket(3)</a> - Websocket handlers
</li>
-</ul></div>
-<div class="paragraph"><p>Middlewares:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="cowboy_router">cowboy_router(3)</a> - Router middleware
-</p>
+</ul>
+<p>Middlewares:</p>
+<ul><li><a href="cowboy_router">cowboy_router(3)</a> - Router middleware
</li>
-<li>
-<p>
-<a href="cowboy_handler">cowboy_handler(3)</a> - Handler middleware
-</p>
+<li><a href="cowboy_handler">cowboy_handler(3)</a> - Handler middleware
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
+<!-- @todo http_status_codes is not linked to; what to do with it?-->
<h2 id="_dependencies">Dependencies</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="ranch_app">ranch(7)</a> - Socket acceptor pool for TCP protocols
-</p>
+<ul><li><a href="ranch_app">ranch(7)</a> - Socket acceptor pool for TCP protocols
</li>
-<li>
-<p>
-<a href="cowlib_app">cowlib(7)</a> - Support library for manipulating Web protocols
-</p>
+<li><a href="cowlib_app">cowlib(7)</a> - Support library for manipulating Web protocols
</li>
-<li>
-<p>
-ssl - Secure communication over sockets
-</p>
+<li>ssl - Secure communication over sockets
</li>
-<li>
-<p>
-crypto - Crypto functions
-</p>
+<li>crypto - Crypto functions
</li>
-</ul></div>
-<div class="paragraph"><p>All these applications must be started before the <code>cowboy</code>
-application. To start Cowboy and all dependencies at once:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+</ul>
+<p>All these applications must be started before the <code>cowboy</code> application. To start Cowboy and all dependencies at once:</p>
+<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">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">application:ensure_all_started</span></span>(<span style="color: #FF6600">cowboy</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">application:ensure_all_started</font></b>(<font color="#FF6600">cowboy</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_environment">Environment</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <code>cowboy</code> application does not define any application
-environment configuration parameters.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The <code>cowboy</code> application does not define any application environment configuration parameters.</p>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="ranch_app">ranch(7)</a>,
-<a href="cowlib_app">cowlib(7)</a></p></div>
-</div>
-</div>
+<p><a href="ranch_app">ranch(7)</a>, <a href="cowlib_app">cowlib(7)</a></p>
+
diff --git a/docs/en/cowboy/2.3/guide/constraints/index.html b/docs/en/cowboy/2.3/guide/constraints/index.html
index 029dcc19..7907e2b5 100644
--- a/docs/en/cowboy/2.3/guide/constraints/index.html
+++ b/docs/en/cowboy/2.3/guide/constraints/index.html
@@ -62,141 +62,86 @@
<h1 class="lined-header"><span>Constraints</span></h1>
-<div class="paragraph"><p>Constraints are validation and conversion functions applied
-to user input.</p></div>
-<div class="paragraph"><p>They are used in various places in Cowboy, including the
-router and the <code>cowboy_req</code> match functions.</p></div>
-<div class="sect1">
+<p>Constraints are validation and conversion functions applied to user input.</p>
+<p>They are used in various places in Cowboy, including the router and the <code>cowboy_req</code> match functions.</p>
<h2 id="_syntax">Syntax</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Constraints are provided as a list of fields. For each field
-in the list, specific constraints can be applied, as well as
-a default value if the field is missing.</p></div>
-<div class="paragraph"><p>A field can take the form of an atom <code>field</code>, a tuple with
-constraints <code>{field, Constraints}</code> or a tuple with constraints
-and a default value <code>{field, Constraints, Default}</code>.
-The <code>field</code> form indicates the field is mandatory.</p></div>
-<div class="paragraph"><p>Note that when used with the router, only the second form
-makes sense, as it does not use the default and the field
-is always defined.</p></div>
-<div class="paragraph"><p>Constraints for each field are provided as an ordered list
-of atoms or funs to apply. Built-in constraints are provided
-as atoms, while custom constraints are provided as funs.</p></div>
-<div class="paragraph"><p>When multiple constraints are provided, they are applied in
-the order given. If the value has been modified by a constraint
-then the next one receives the new value.</p></div>
-<div class="paragraph"><p>For example, the following constraints will first validate
-and convert the field <code>my_value</code> to an integer, and then
-check that the integer is positive:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Constraints are provided as a list of fields. For each field in the list, specific constraints can be applied, as well as a default value if the field is missing.</p>
+<p>A field can take the form of an atom <code>field</code>, a tuple with constraints <code>{field, Constraints}</code> or a tuple with constraints and a default value <code>{field, Constraints, Default}</code>. The <code>field</code> form indicates the field is mandatory.</p>
+<p>Note that when used with the router, only the second form makes sense, as it does not use the default and the field is always defined.</p>
+<p>Constraints for each field are provided as an ordered list of atoms or funs to apply. Built-in constraints are provided as atoms, while custom constraints are provided as funs.</p>
+<p>When multiple constraints are provided, they are applied in the order given. If the value has been modified by a constraint then the next one receives the new value.</p>
+<p>For example, the following constraints will first validate and convert the field <code>my_value</code> to an integer, and then check that the integer is positive:</p>
+<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">PositiveFun</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">fun</span></span>
- (<span style="color: #990000">_</span>, <span style="color: #009900">V</span>) <span style="font-weight: bold"><span style="color: #0000FF">when</span></span> <span style="color: #009900">V</span> <span style="color: #990000">&gt;</span> <span style="color: #993399">0</span> <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">V</span>};
- (<span style="color: #990000">_</span>, <span style="color: #990000">_</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">error</span>, <span style="color: #FF6600">not_positive</span>}
-<span style="font-weight: bold"><span style="color: #0000FF">end</span></span>,
-{<span style="color: #FF6600">my_value</span>, [<span style="color: #FF6600">int</span>, <span style="color: #009900">PositiveFun</span>]}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>We ignore the first fun argument in this snippet. We shouldn&#8217;t.
-We will simply learn what it is later in this chapter.</p></div>
-<div class="paragraph"><p>When there&#8217;s only one constraint, it can be provided directly
-without wrapping it into a list:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">PositiveFun</font> <font color="#990000">=</font> <b><font color="#0000FF">fun</font></b>
+ (<font color="#990000">_</font>, <font color="#009900">V</font>) <b><font color="#0000FF">when</font></b> <font color="#009900">V</font> <font color="#990000">&gt;</font> <font color="#993399">0</font> <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <font color="#009900">V</font>};
+ (<font color="#990000">_</font>, <font color="#990000">_</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">error</font>, <font color="#FF6600">not_positive</font>}
+<b><font color="#0000FF">end</font></b>,
+{<font color="#FF6600">my_value</font>, [<font color="#FF6600">int</font>, <font color="#009900">PositiveFun</font>]}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>We ignore the first fun argument in this snippet. We shouldn&apos;t. We will simply learn what it is later in this chapter.</p>
+<p>When there&apos;s only one constraint, it can be provided directly without wrapping it into a list:</p>
+<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">my_value</span>, <span style="color: #FF6600">int</span>}</tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#FF6600">my_value</font>, <font color="#FF6600">int</font>}</tt></pre>
+</div></div>
<h2 id="_built_in_constraints">Built-in constraints</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Built-in constraints are specified as an atom:</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"> Constraint </th>
-<th align="left" valign="top"> Description</th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td align="left" valign="top"><p class="table">int</p></td>
-<td align="left" valign="top"><p class="table">Converts binary value to integer.</p></td>
+<p>Built-in constraints are specified as an atom:</p>
+<table rules="all" width="100%" frame="border"
+ cellspacing="0" cellpadding="4">
+<thead><tr><th>Constraint</th>
+<th>Description</th>
+</tr></thead><tbody><tr><td>int</td>
+<td>Converts binary value to integer.</td>
</tr>
-<tr>
-<td align="left" valign="top"><p class="table">nonempty</p></td>
-<td align="left" valign="top"><p class="table">Ensures the binary value is non-empty.</p></td>
+<tr><td>nonempty</td>
+<td>Ensures the binary value is non-empty.</td>
</tr>
-</tbody>
-</table>
-</div>
-</div>
-</div>
-<div class="sect1">
+</tbody></table>
<h2 id="_custom_constraints">Custom constraints</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Custom constraints are specified as a fun. This fun takes
-two arguments. The first argument indicates the operation
-to be performed, and the second is the value. What the
-value is and what must be returned depends on the operation.</p></div>
-<div class="paragraph"><p>Cowboy currently defines three operations. The operation
-used for validating and converting user input is the <code>forward</code>
-operation.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Custom constraints are specified as a fun. This fun takes two arguments. The first argument indicates the operation to be performed, and the second is the value. What the value is and what must be returned depends on the operation.</p>
+<p>Cowboy currently defines three operations. The operation used for validating and converting user input is the <code>forward</code> operation.</p>
+<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">int</span></span>(<span style="color: #FF6600">forward</span>, <span style="color: #009900">Value</span>) <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #0000FF">try</span></span>
- {<span style="color: #FF6600">ok</span>, <span style="font-weight: bold"><span style="color: #000000">binary_to_integer</span></span>(<span style="color: #009900">Value</span>)}
- <span style="font-weight: bold"><span style="color: #0000FF">catch</span></span> <span style="color: #990000">_:_</span> <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">error</span>, <span style="color: #FF6600">not_an_integer</span>}
- <span style="font-weight: bold"><span style="color: #0000FF">end</span></span>;</tt></pre></div></div>
-<div class="paragraph"><p>The value must be returned even if it is not converted
-by the constraint.</p></div>
-<div class="paragraph"><p>The <code>reverse</code> operation does the opposite: it
-takes a converted value and changes it back to what the
-user input would have been.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">int</font></b>(<font color="#FF6600">forward</font>, <font color="#009900">Value</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">try</font></b>
+ {<font color="#FF6600">ok</font>, <b><font color="#000000">binary_to_integer</font></b>(<font color="#009900">Value</font>)}
+ <b><font color="#0000FF">catch</font></b> <font color="#990000">_:_</font> <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">error</font>, <font color="#FF6600">not_an_integer</font>}
+ <b><font color="#0000FF">end</font></b>;</tt></pre>
+</div></div>
+<p>The value must be returned even if it is not converted by the constraint.</p>
+<p>The <code>reverse</code> operation does the opposite: it takes a converted value and changes it back to what the user input would have been.</p>
+<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">int</span></span>(<span style="color: #FF6600">reverse</span>, <span style="color: #009900">Value</span>) <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #0000FF">try</span></span>
- {<span style="color: #FF6600">ok</span>, <span style="font-weight: bold"><span style="color: #000000">integer_to_binary</span></span>(<span style="color: #009900">Value</span>)}
- <span style="font-weight: bold"><span style="color: #0000FF">catch</span></span> <span style="color: #990000">_:_</span> <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">error</span>, <span style="color: #FF6600">not_an_integer</span>}
- <span style="font-weight: bold"><span style="color: #0000FF">end</span></span>;</tt></pre></div></div>
-<div class="paragraph"><p>Finally, the <code>format_error</code> operation takes an error
-returned by any other operation and returns a formatted
-human-readable error message.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">int</font></b>(<font color="#FF6600">reverse</font>, <font color="#009900">Value</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">try</font></b>
+ {<font color="#FF6600">ok</font>, <b><font color="#000000">integer_to_binary</font></b>(<font color="#009900">Value</font>)}
+ <b><font color="#0000FF">catch</font></b> <font color="#990000">_:_</font> <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">error</font>, <font color="#FF6600">not_an_integer</font>}
+ <b><font color="#0000FF">end</font></b>;</tt></pre>
+</div></div>
+<p>Finally, the <code>format_error</code> operation takes an error returned by any other operation and returns a formatted human-readable error message.</p>
+<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">int</span></span>(<span style="color: #FF6600">format_error</span>, {<span style="color: #FF6600">not_an_integer</span>, <span style="color: #009900">Value</span>}) <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #000000">io_lib:format</span></span>(<span style="color: #FF0000">"The value ~p is not an integer."</span>, [<span style="color: #009900">Value</span>])<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Notice that for this case you get both the error and
-the value that was given to the constraint that produced
-this error.</p></div>
-<div class="paragraph"><p>Cowboy will not catch exceptions coming from constraint
-functions. They should be written to not emit any exceptions.</p></div>
-</div>
-</div>
+<pre><tt><b><font color="#000000">int</font></b>(<font color="#FF6600">format_error</font>, {<font color="#FF6600">not_an_integer</font>, <font color="#009900">Value</font>}) <font color="#990000">-&gt;</font>
+ <b><font color="#000000">io_lib:format</font></b>(<font color="#FF0000">"The value ~p is not an integer."</font>, [<font color="#009900">Value</font>])<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Notice that for this case you get both the error and the value that was given to the constraint that produced this error.</p>
+<p>Cowboy will not catch exceptions coming from constraint functions. They should be written to not emit any exceptions.</p>
+
diff --git a/docs/en/cowboy/2.3/guide/cookies/index.html b/docs/en/cowboy/2.3/guide/cookies/index.html
index 2f4c28f8..8d1e67bb 100644
--- a/docs/en/cowboy/2.3/guide/cookies/index.html
+++ b/docs/en/cowboy/2.3/guide/cookies/index.html
@@ -62,144 +62,103 @@
<h1 class="lined-header"><span>Using cookies</span></h1>
-<div class="paragraph"><p>Cookies are a mechanism allowing applications to maintain
-state on top of the stateless HTTP protocol.</p></div>
-<div class="paragraph"><p>Cookies are a name/value store where the names and values are
-stored in plain text. They expire either after a delay
-or when the browser closes. They can be configured on a
-specific domain name or path, and restricted to secure
-resources (sent or downloaded over HTTPS), or restricted
-to the server (disallowing access from client-side scripts).</p></div>
-<div class="paragraph"><p>Cookie names are de facto case sensitive.</p></div>
-<div class="paragraph"><p>Cookies are stored client-side and sent with every subsequent
-request that matches the domain and path for which they were
-stored, until they expire. This can create a non-negligible
-cost.</p></div>
-<div class="paragraph"><p>Cookies should not be considered secure. They are stored on
-the user&#8217;s computer in plain text, and can be read by any
-program. They can also be read by proxies when using clear
-connections. Always validate the value before using it,
-and never store any sensitive information inside it.</p></div>
-<div class="paragraph"><p>Cookies set by the server are only available in requests
-following the client reception of the response containing
-them.</p></div>
-<div class="paragraph"><p>Cookies may be sent repeatedly. This is often useful to
-update the expiration time and avoid losing a cookie.</p></div>
-<div class="sect1">
+<p>Cookies are a mechanism allowing applications to maintain state on top of the stateless HTTP protocol.</p>
+<p>Cookies are a name/value store where the names and values are stored in plain text. They expire either after a delay or when the browser closes. They can be configured on a specific domain name or path, and restricted to secure resources (sent or downloaded over HTTPS), or restricted to the server (disallowing access from client-side scripts).</p>
+<p>Cookie names are de facto case sensitive.</p>
+<p>Cookies are stored client-side and sent with every subsequent request that matches the domain and path for which they were stored, until they expire. This can create a non-negligible cost.</p>
+<p>Cookies should not be considered secure. They are stored on the user&apos;s computer in plain text, and can be read by any program. They can also be read by proxies when using clear connections. Always validate the value before using it, and never store any sensitive information inside it.</p>
+<p>Cookies set by the server are only available in requests following the client reception of the response containing them.</p>
+<p>Cookies may be sent repeatedly. This is often useful to update the expiration time and avoid losing a cookie.</p>
<h2 id="_setting_cookies">Setting cookies</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>By default cookies are defined for the duration of the session:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>By default cookies are defined for the duration of the session:</p>
+<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">SessionID</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">generate_session_id</span></span>(),
-<span style="color: #009900">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_cookie</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"sessionid"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">SessionID</span>, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>They can also be set for a duration in seconds:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">SessionID</font> <font color="#990000">=</font> <b><font color="#000000">generate_session_id</font></b>(),
+<font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_cookie</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"sessionid"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">SessionID</font>, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>They can also be set for a duration in seconds:</p>
+<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">SessionID</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">generate_session_id</span></span>(),
-<span style="color: #009900">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_cookie</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"sessionid"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">SessionID</span>, <span style="color: #009900">Req0</span>,
- #{<span style="color: #0000FF">max_age</span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">3600</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>To delete cookies, set <code>max_age</code> to 0:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">SessionID</font> <font color="#990000">=</font> <b><font color="#000000">generate_session_id</font></b>(),
+<font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_cookie</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"sessionid"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">SessionID</font>, <font color="#009900">Req0</font>,
+ #{<font color="#0000FF">max_age</font> <font color="#990000">=&gt;</font> <font color="#993399">3600</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>To delete cookies, set <code>max_age</code> to 0:</p>
+<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">SessionID</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">generate_session_id</span></span>(),
-<span style="color: #009900">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_cookie</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"sessionid"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">SessionID</span>, <span style="color: #009900">Req0</span>,
- #{<span style="color: #0000FF">max_age</span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">0</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>To restrict cookies to a specific domain and path, the options
-of the same name can be used:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">SessionID</font> <font color="#990000">=</font> <b><font color="#000000">generate_session_id</font></b>(),
+<font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_cookie</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"sessionid"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">SessionID</font>, <font color="#009900">Req0</font>,
+ #{<font color="#0000FF">max_age</font> <font color="#990000">=&gt;</font> <font color="#993399">0</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>To restrict cookies to a specific domain and path, the options of the same name can be used:</p>
+<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">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_cookie</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"inaccount"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"1"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req0</span>,
- #{<span style="color: #0000FF">domain</span> <span style="color: #990000">=&gt;</span> <span style="color: #FF0000">"my.example.org"</span>, <span style="color: #0000FF">path</span> <span style="color: #990000">=&gt;</span> <span style="color: #FF0000">"/account"</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Cookies will be sent with requests to this domain and all
-its subdomains, and to resources on this path or deeper
-in the path hierarchy.</p></div>
-<div class="paragraph"><p>To restrict cookies to secure channels (typically resources
-available over HTTPS):</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_cookie</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"inaccount"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"1"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req0</font>,
+ #{<font color="#0000FF">domain</font> <font color="#990000">=&gt;</font> <font color="#FF0000">"my.example.org"</font>, <font color="#0000FF">path</font> <font color="#990000">=&gt;</font> <font color="#FF0000">"/account"</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Cookies will be sent with requests to this domain and all its subdomains, and to resources on this path or deeper in the path hierarchy.</p>
+<p>To restrict cookies to secure channels (typically resources available over HTTPS):</p>
+<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">SessionID</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">generate_session_id</span></span>(),
-<span style="color: #009900">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_cookie</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"sessionid"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">SessionID</span>, <span style="color: #009900">Req0</span>,
- #{<span style="color: #0000FF">secure</span> <span style="color: #990000">=&gt;</span> <span style="color: #000080">true</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>To prevent client-side scripts from accessing a cookie:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">SessionID</font> <font color="#990000">=</font> <b><font color="#000000">generate_session_id</font></b>(),
+<font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_cookie</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"sessionid"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">SessionID</font>, <font color="#009900">Req0</font>,
+ #{<font color="#0000FF">secure</font> <font color="#990000">=&gt;</font> <font color="#000080">true</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>To prevent client-side scripts from accessing a cookie:</p>
+<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">SessionID</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">generate_session_id</span></span>(),
-<span style="color: #009900">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_cookie</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"sessionid"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">SessionID</span>, <span style="color: #009900">Req0</span>,
- #{<span style="color: #0000FF">http_only</span> <span style="color: #990000">=&gt;</span> <span style="color: #000080">true</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Cookies may also be set client-side, for example using
-Javascript.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">SessionID</font> <font color="#990000">=</font> <b><font color="#000000">generate_session_id</font></b>(),
+<font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_cookie</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"sessionid"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">SessionID</font>, <font color="#009900">Req0</font>,
+ #{<font color="#0000FF">http_only</font> <font color="#990000">=&gt;</font> <font color="#000080">true</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Cookies may also be set client-side, for example using Javascript.</p>
<h2 id="_reading_cookies">Reading cookies</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The client only ever sends back the cookie name and value.
-All other options that can be set are never sent back.</p></div>
-<div class="paragraph"><p>Cowboy provides two functions for reading cookies. Both
-involve parsing the cookie header(s) and so should not
-be called repeatedly.</p></div>
-<div class="paragraph"><p>You can get all cookies as a key/value list:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The client only ever sends back the cookie name and value. All other options that can be set are never sent back.</p>
+<p>Cowboy provides two functions for reading cookies. Both involve parsing the cookie header(s) and so should not be called repeatedly.</p>
+<p>You can get all cookies as a key/value list:</p>
+<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">Cookies</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:parse_cookies</span></span>(<span style="color: #009900">Req</span>),
-{<span style="color: #990000">_</span>, <span style="color: #009900">Lang</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">lists:keyfind</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"lang"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #993399">1</span>, <span style="color: #009900">Cookies</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Or you can perform a match against cookies and retrieve
-only the ones you need, while at the same time doing
-any required post processing using <a href="../constraints">constraints</a>.
-This function returns a map:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Cookies</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:parse_cookies</font></b>(<font color="#009900">Req</font>),
+{<font color="#990000">_</font>, <font color="#009900">Lang</font>} <font color="#990000">=</font> <b><font color="#000000">lists:keyfind</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"lang"</font><font color="#990000">&gt;&gt;</font>, <font color="#993399">1</font>, <font color="#009900">Cookies</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Or you can perform a match against cookies and retrieve only the ones you need, while at the same time doing any required post processing using <a href="../constraints">constraints</a>. This function returns a map:</p>
+<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">id</span> <span style="color: #990000">:=</span> <span style="color: #009900">ID</span>, <span style="color: #FF6600">lang</span> <span style="color: #990000">:=</span> <span style="color: #009900">Lang</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:match_cookies</span></span>([<span style="color: #FF6600">id</span>, <span style="color: #FF6600">lang</span>], <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>You can use constraints to validate the values while matching
-them. The following snippet will crash if the <code>id</code> cookie is
-not an integer number or if the <code>lang</code> cookie is empty. Additionally
-the <code>id</code> cookie value will be converted to an integer term:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>#{<font color="#FF6600">id</font> <font color="#990000">:=</font> <font color="#009900">ID</font>, <font color="#FF6600">lang</font> <font color="#990000">:=</font> <font color="#009900">Lang</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:match_cookies</font></b>([<font color="#FF6600">id</font>, <font color="#FF6600">lang</font>], <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>You can use constraints to validate the values while matching them. The following snippet will crash if the <code>id</code> cookie is not an integer number or if the <code>lang</code> cookie is empty. Additionally the <code>id</code> cookie value will be converted to an integer term:</p>
+<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">CookiesMap</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:match_cookies</span></span>([{<span style="color: #FF6600">id</span>, <span style="color: #FF6600">int</span>}, {<span style="color: #FF6600">lang</span>, <span style="color: #FF6600">nonempty</span>}], <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Note that if two cookies share the same name, then the map value
-will be a list of the two cookie values.</p></div>
-<div class="paragraph"><p>A default value can be provided. The default will be used
-if the <code>lang</code> cookie is not found. It will not be used if
-the cookie is found but has an empty value:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">CookiesMap</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:match_cookies</font></b>([{<font color="#FF6600">id</font>, <font color="#FF6600">int</font>}, {<font color="#FF6600">lang</font>, <font color="#FF6600">nonempty</font>}], <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Note that if two cookies share the same name, then the map value will be a list of the two cookie values.</p>
+<p>A default value can be provided. The default will be used if the <code>lang</code> cookie is not found. It will not be used if the cookie is found but has an empty value:</p>
+<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">lang</span> <span style="color: #990000">:=</span> <span style="color: #009900">Lang</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:match_cookies</span></span>([{<span style="color: #FF6600">lang</span>, [], <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"en-US"</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="paragraph"><p>If no default is provided and the value is missing, an
-exception is thrown.</p></div>
-</div>
-</div>
+<pre><tt>#{<font color="#FF6600">lang</font> <font color="#990000">:=</font> <font color="#009900">Lang</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:match_cookies</font></b>([{<font color="#FF6600">lang</font>, [], <font color="#990000">&lt;&lt;</font><font color="#FF0000">"en-US"</font><font color="#990000">&gt;&gt;</font>}], <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>If no default is provided and the value is missing, an exception is thrown.</p>
+
diff --git a/docs/en/cowboy/2.3/guide/erlang_web/index.html b/docs/en/cowboy/2.3/guide/erlang_web/index.html
index 97bc07d2..76a54644 100644
--- a/docs/en/cowboy/2.3/guide/erlang_web/index.html
+++ b/docs/en/cowboy/2.3/guide/erlang_web/index.html
@@ -62,194 +62,52 @@
<h1 class="lined-header"><span>Erlang and the Web</span></h1>
-<div class="paragraph"><p>Erlang is the ideal platform for writing Web applications.
-Its features are a perfect match for the requirements of
-modern Web applications.</p></div>
-<div class="sect1">
+<p>Erlang is the ideal platform for writing Web applications. Its features are a perfect match for the requirements of modern Web applications.</p>
<h2 id="_the_web_is_concurrent">The Web is concurrent</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>When you access a website there is little concurrency
-involved. A few connections are opened and requests
-are sent through these connections. Then the web page
-is displayed on your screen. Your browser will only
-open up to 4 or 8 connections to the server, depending
-on your settings. This isn&#8217;t much.</p></div>
-<div class="paragraph"><p>But think about it. You are not the only one accessing
-the server at the same time. There can be hundreds, if
-not thousands, if not millions of connections to the
-same server at the same time.</p></div>
-<div class="paragraph"><p>Even today a lot of systems used in production haven&#8217;t
-solved the C10K problem (ten thousand concurrent connections).
-And the ones who did are trying hard to get to the next
-step, C100K, and are pretty far from it.</p></div>
-<div class="paragraph"><p>Erlang meanwhile has no problem handling millions of
-connections. At the time of writing there are application
-servers written in Erlang that can handle more than two
-million connections on a single server in a real production
-application, with spare memory and CPU!</p></div>
-<div class="paragraph"><p>The Web is concurrent, and Erlang is a language designed
-for concurrency, so it is a perfect match.</p></div>
-<div class="paragraph"><p>Of course, various platforms need to scale beyond a few
-million connections. This is where Erlang&#8217;s built-in
-distribution mechanisms come in. If one server isn&#8217;t
-enough, add more! Erlang allows you to use the same code
-for talking to local processes or to processes in other
-parts of your cluster, which means you can scale very
-quickly if the need arises.</p></div>
-<div class="paragraph"><p>The Web has large userbases, and the Erlang platform was
-designed to work in a distributed setting, so it is a
-perfect match.</p></div>
-<div class="paragraph"><p>Or is it? Surely you can find solutions to handle that many
-concurrent connections with your favorite language&#8230; But all
-these solutions will break down in the next few years. Why?
-Firstly because servers don&#8217;t get any more powerful, they
-instead get a lot more cores and memory. This is only useful
-if your application can use them properly, and Erlang is
-light-years away from anything else in that area. Secondly,
-today your computer and your phone are online, tomorrow your
-watch, goggles, bike, car, fridge and tons of other devices
-will also connect to various applications on the Internet.</p></div>
-<div class="paragraph"><p>Only Erlang is prepared to deal with what&#8217;s coming.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>When you access a website there is little concurrency involved. A few connections are opened and requests are sent through these connections. Then the web page is displayed on your screen. Your browser will only open up to 4 or 8 connections to the server, depending on your settings. This isn&apos;t much.</p>
+<p>But think about it. You are not the only one accessing the server at the same time. There can be hundreds, if not thousands, if not millions of connections to the same server at the same time.</p>
+<p>Even today a lot of systems used in production haven&apos;t solved the C10K problem (ten thousand concurrent connections). And the ones who did are trying hard to get to the next step, C100K, and are pretty far from it.</p>
+<p>Erlang meanwhile has no problem handling millions of connections. At the time of writing there are application servers written in Erlang that can handle more than two million connections on a single server in a real production application, with spare memory and CPU!</p>
+<p>The Web is concurrent, and Erlang is a language designed for concurrency, so it is a perfect match.</p>
+<p>Of course, various platforms need to scale beyond a few million connections. This is where Erlang&apos;s built-in distribution mechanisms come in. If one server isn&apos;t enough, add more! Erlang allows you to use the same code for talking to local processes or to processes in other parts of your cluster, which means you can scale very quickly if the need arises.</p>
+<p>The Web has large userbases, and the Erlang platform was designed to work in a distributed setting, so it is a perfect match.</p>
+<p>Or is it? Surely you can find solutions to handle that many concurrent connections with your favorite language... But all these solutions will break down in the next few years. Why? Firstly because servers don&apos;t get any more powerful, they instead get a lot more cores and memory. This is only useful if your application can use them properly, and Erlang is light-years away from anything else in that area. Secondly, today your computer and your phone are online, tomorrow your watch, goggles, bike, car, fridge and tons of other devices will also connect to various applications on the Internet.</p>
+<p>Only Erlang is prepared to deal with what&apos;s coming.</p>
<h2 id="_the_web_is_soft_real_time">The Web is soft real time</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>What does soft real time mean, you ask? It means we want the
-operations done as quickly as possible, and in the case of
-web applications, it means we want the data propagated fast.</p></div>
-<div class="paragraph"><p>In comparison, hard real time has a similar meaning, but also
-has a hard time constraint, for example an operation needs to
-be done in under N milliseconds otherwise the system fails
-entirely.</p></div>
-<div class="paragraph"><p>Users aren&#8217;t that needy yet, they just want to get access
-to their content in a reasonable delay, and they want the
-actions they make to register at most a few seconds after
-they submitted them, otherwise they&#8217;ll start worrying about
-whether it successfully went through.</p></div>
-<div class="paragraph"><p>The Web is soft real time because taking longer to perform an
-operation would be seen as bad quality of service.</p></div>
-<div class="paragraph"><p>Erlang is a soft real time system. It will always run
-processes fairly, a little at a time, switching to another
-process after a while and preventing a single process to
-steal resources from all others. This means that Erlang
-can guarantee stable low latency of operations.</p></div>
-<div class="paragraph"><p>Erlang provides the guarantees that the soft real time Web
-requires.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>What does soft real time mean, you ask? It means we want the operations done as quickly as possible, and in the case of web applications, it means we want the data propagated fast.</p>
+<p>In comparison, hard real time has a similar meaning, but also has a hard time constraint, for example an operation needs to be done in under N milliseconds otherwise the system fails entirely.</p>
+<p>Users aren&apos;t that needy yet, they just want to get access to their content in a reasonable delay, and they want the actions they make to register at most a few seconds after they submitted them, otherwise they&apos;ll start worrying about whether it successfully went through.</p>
+<p>The Web is soft real time because taking longer to perform an operation would be seen as bad quality of service.</p>
+<p>Erlang is a soft real time system. It will always run processes fairly, a little at a time, switching to another process after a while and preventing a single process to steal resources from all others. This means that Erlang can guarantee stable low latency of operations.</p>
+<p>Erlang provides the guarantees that the soft real time Web requires.</p>
<h2 id="_the_web_is_asynchronous">The Web is asynchronous</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Long ago, the Web was synchronous because HTTP was synchronous.
-You fired a request, and then waited for a response. Not anymore.
-It all began when XmlHttpRequest started being used. It allowed
-the client to perform asynchronous calls to the server.</p></div>
-<div class="paragraph"><p>Then Websocket appeared and allowed both the server and the client
-to send data to the other endpoint completely asynchronously. The
-data is contained within frames and no response is necessary.</p></div>
-<div class="paragraph"><p>Erlang processes work the same. They send each other data contained
-within messages and then continue running without needing a response.
-They tend to spend most of their time inactive, waiting for a new
-message, and the Erlang VM happily activate them when one is received.</p></div>
-<div class="paragraph"><p>It is therefore quite easy to imagine Erlang being good at receiving
-Websocket frames, which may come in at unpredictable times, pass the
-data to the responsible processes which are always ready waiting for
-new messages, and perform the operations required by only activating
-the required parts of the system.</p></div>
-<div class="paragraph"><p>The more recent Web technologies, like Websocket of course, but also
-HTTP/2.0, are all fully asynchronous protocols. The concept
-of requests and responses is retained of course, but anything could
-be sent in between, by both the client or the browser, and the
-responses could also be received in a completely different order.</p></div>
-<div class="paragraph"><p>Erlang is by nature asynchronous and really good at it thanks to the
-great engineering that has been done in the VM over the years. It&#8217;s
-only natural that it&#8217;s so good at dealing with the asynchronous Web.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Long ago, the Web was synchronous because HTTP was synchronous. You fired a request, and then waited for a response. Not anymore. It all began when XmlHttpRequest started being used. It allowed the client to perform asynchronous calls to the server.</p>
+<p>Then Websocket appeared and allowed both the server and the client to send data to the other endpoint completely asynchronously. The data is contained within frames and no response is necessary.</p>
+<p>Erlang processes work the same. They send each other data contained within messages and then continue running without needing a response. They tend to spend most of their time inactive, waiting for a new message, and the Erlang VM happily activate them when one is received.</p>
+<p>It is therefore quite easy to imagine Erlang being good at receiving Websocket frames, which may come in at unpredictable times, pass the data to the responsible processes which are always ready waiting for new messages, and perform the operations required by only activating the required parts of the system.</p>
+<p>The more recent Web technologies, like Websocket of course, but also HTTP/2.0, are all fully asynchronous protocols. The concept of requests and responses is retained of course, but anything could be sent in between, by both the client or the browser, and the responses could also be received in a completely different order.</p>
+<p>Erlang is by nature asynchronous and really good at it thanks to the great engineering that has been done in the VM over the years. It&apos;s only natural that it&apos;s so good at dealing with the asynchronous Web.</p>
<h2 id="_the_web_is_omnipresent">The Web is omnipresent</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The Web has taken a very important part of our lives. We&#8217;re
-connected at all times, when we&#8217;re on our phone, using our computer,
-passing time using a tablet while in the bathroom&#8230; And this
-isn&#8217;t going to slow down, every single device at home or on us
-will be connected.</p></div>
-<div class="paragraph"><p>All these devices are always connected. And with the number of
-alternatives to give you access to the content you seek, users
-tend to not stick around when problems arise. Users today want
-their applications to be always available and if it&#8217;s having
-too many issues they just move on.</p></div>
-<div class="paragraph"><p>Despite this, when developers choose a product to use for building
-web applications, their only concern seems to be "Is it fast?",
-and they look around for synthetic benchmarks showing which one
-is the fastest at sending "Hello world" with only a handful
-concurrent connections. Web benchmarks haven&#8217;t been representative
-of reality in a long time, and are drifting further away as
-time goes on.</p></div>
-<div class="paragraph"><p>What developers should really ask themselves is "Can I service
-all my users with no interruption?" and they&#8217;d find that they have
-two choices. They can either hope for the best, or they can use
-Erlang.</p></div>
-<div class="paragraph"><p>Erlang is built for fault tolerance. When writing code in any other
-language, you have to check all the return values and act accordingly
-to avoid any unforeseen issues. If you&#8217;re lucky, you won&#8217;t miss
-anything important. When writing Erlang code, you can just check
-the success condition and ignore all errors. If an error happens,
-the Erlang process crashes and is then restarted by a special
-process called a supervisor.</p></div>
-<div class="paragraph"><p>Erlang developers thus have no need to fear unhandled
-errors, and can focus on handling only the errors that should
-give some feedback to the user and let the system take care of
-the rest. This also has the advantage of allowing them to write
-a lot less code, and let them sleep at night.</p></div>
-<div class="paragraph"><p>Erlang&#8217;s fault tolerance oriented design is the first piece of
-what makes it the best choice for the omnipresent, always available
-Web.</p></div>
-<div class="paragraph"><p>The second piece is Erlang&#8217;s built-in distribution. Distribution
-is a key part of building a fault tolerant system, because it
-allows you to handle bigger failures, like a whole server going
-down, or even a data center entirely.</p></div>
-<div class="paragraph"><p>Fault tolerance and distribution are important today, and will be
-vital in the future of the Web. Erlang is ready.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The Web has taken a very important part of our lives. We&apos;re connected at all times, when we&apos;re on our phone, using our computer, passing time using a tablet while in the bathroom... And this isn&apos;t going to slow down, every single device at home or on us will be connected.</p>
+<p>All these devices are always connected. And with the number of alternatives to give you access to the content you seek, users tend to not stick around when problems arise. Users today want their applications to be always available and if it&apos;s having too many issues they just move on.</p>
+<p>Despite this, when developers choose a product to use for building web applications, their only concern seems to be &quot;Is it fast?&quot;, and they look around for synthetic benchmarks showing which one is the fastest at sending &quot;Hello world&quot; with only a handful concurrent connections. Web benchmarks haven&apos;t been representative of reality in a long time, and are drifting further away as time goes on.</p>
+<p>What developers should really ask themselves is &quot;Can I service all my users with no interruption?&quot; and they&apos;d find that they have two choices. They can either hope for the best, or they can use Erlang.</p>
+<p>Erlang is built for fault tolerance. When writing code in any other language, you have to check all the return values and act accordingly to avoid any unforeseen issues. If you&apos;re lucky, you won&apos;t miss anything important. When writing Erlang code, you can just check the success condition and ignore all errors. If an error happens, the Erlang process crashes and is then restarted by a special process called a supervisor.</p>
+<p>Erlang developers thus have no need to fear unhandled errors, and can focus on handling only the errors that should give some feedback to the user and let the system take care of the rest. This also has the advantage of allowing them to write a lot less code, and let them sleep at night.</p>
+<p>Erlang&apos;s fault tolerance oriented design is the first piece of what makes it the best choice for the omnipresent, always available Web.</p>
+<p>The second piece is Erlang&apos;s built-in distribution. Distribution is a key part of building a fault tolerant system, because it allows you to handle bigger failures, like a whole server going down, or even a data center entirely.</p>
+<p>Fault tolerance and distribution are important today, and will be vital in the future of the Web. Erlang is ready.</p>
<h2 id="_learn_erlang">Learn Erlang</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>If you are new to Erlang, you may want to grab a book or
-two to get started. Those are my recommendations as the
-author of Cowboy.</p></div>
-<div class="sect3">
+<p>If you are new to Erlang, you may want to grab a book or two to get started. Those are my recommendations as the author of Cowboy.</p>
<h4 id="_the_erlanger_playbook">The Erlanger Playbook</h4>
-<div class="paragraph"><p>The Erlanger Playbook is an ebook I am currently writing,
-which covers a number of different topics from code to
-documentation to testing Erlang applications. It also has
-an Erlang section where it covers directly the building
-blocks and patterns, rather than details like the syntax.</p></div>
-<div class="paragraph"><p>You can most likely read it as a complete beginner, but
-you will need a companion book to make the most of it.
-Buy it from the <a href="https://ninenines.eu">Nine Nines website</a>.</p></div>
-</div>
-<div class="sect3">
+<p>The Erlanger Playbook is an ebook I am currently writing, which covers a number of different topics from code to documentation to testing Erlang applications. It also has an Erlang section where it covers directly the building blocks and patterns, rather than details like the syntax.</p>
+<p>You can most likely read it as a complete beginner, but you will need a companion book to make the most of it. Buy it from the <a href="https://ninenines.eu">Nine Nines website</a>.</p>
<h4 id="_programming_erlang">Programming Erlang</h4>
-<div class="paragraph"><p>This book is from one of the creator of Erlang, Joe
-Armstrong. It provides a very good explanation of what
-Erlang is and why it is so. It serves as a very good
-introduction to the language and platform.</p></div>
-<div class="paragraph"><p>The book is <a href="http://pragprog.com/book/jaerlang2/programming-erlang">Programming Erlang</a>,
-and it also features a chapter on Cowboy.</p></div>
-</div>
-<div class="sect3">
+<p>This book is from one of the creator of Erlang, Joe Armstrong. It provides a very good explanation of what Erlang is and why it is so. It serves as a very good introduction to the language and platform.</p>
+<p>The book is <a href="http://pragprog.com/book/jaerlang2/programming-erlang">Programming Erlang</a>, and it also features a chapter on Cowboy.</p>
<h4 id="_learn_you_some_erlang_for_great_good">Learn You Some Erlang for Great Good!</h4>
-<div class="paragraph"><p><a href="http://learnyousomeerlang.com">LYSE</a> is a much more complete
-book covering many aspects of Erlang, while also providing
-stories and humor. Be warned: it&#8217;s pretty verbose. It comes
-with a free online version and a more refined paper and
-ebook version.</p></div>
-</div>
-</div>
-</div>
+<p><a href="http://learnyousomeerlang.com">LYSE</a> is a much more complete book covering many aspects of Erlang, while also providing stories and humor. Be warned: it&apos;s pretty verbose. It comes with a free online version and a more refined paper and ebook version.</p>
+
diff --git a/docs/en/cowboy/2.3/guide/flow_diagram/index.html b/docs/en/cowboy/2.3/guide/flow_diagram/index.html
index 05bc677a..d675a2f5 100644
--- a/docs/en/cowboy/2.3/guide/flow_diagram/index.html
+++ b/docs/en/cowboy/2.3/guide/flow_diagram/index.html
@@ -62,113 +62,30 @@
<h1 class="lined-header"><span>Flow diagram</span></h1>
-<div class="paragraph"><p>Cowboy is a lightweight HTTP server with support for HTTP/1.1,
-HTTP/2 and Websocket.</p></div>
-<div class="paragraph"><p>It is built on top of Ranch. Please see the Ranch guide for more
-information about how the network connections are handled.</p></div>
-<div class="sect1">
+<p>Cowboy is a lightweight HTTP server with support for HTTP/1.1, HTTP/2 and Websocket.</p>
+<p>It is built on top of Ranch. Please see the Ranch guide for more information about how the network connections are handled.</p>
<h2 id="_overview">Overview</h2>
-<div class="sectionbody">
-<div class="imageblock">
-<div class="content">
-<img src="../http_req_resp.png" alt="HTTP request/response flowchart" />
-</div>
-</div>
-<div class="paragraph"><p>As you can see on the diagram, the client
-begins by connecting to the server. This step is handled
-by a Ranch acceptor, which is a process dedicated to
-accepting new connections.</p></div>
-<div class="paragraph"><p>After Ranch accepts a new connection, whether it is an
-HTTP/1.1 or HTTP/2 connection, Cowboy starts receiving
-requests and handling them.</p></div>
-<div class="paragraph"><p>In HTTP/1.1 all requests come sequentially. In HTTP/2
-the requests may arrive and be processed concurrently.</p></div>
-<div class="paragraph"><p>When a request comes in, Cowboy creates a stream, which
-is a set of request/response and all the events associated
-with them. The protocol code in Cowboy defers the handling
-of these streams to stream handler modules. When you
-configure Cowboy you may define one or more module that
-will receive all events associated with a stream, including
-the request, response, bodies, Erlang messages and more.</p></div>
-<div class="paragraph"><p>By default Cowboy comes configured with a stream handler
-called <code>cowboy_stream_h</code>. This stream handler will create
-a new process for every request coming in, and then
-communicate with this process to read the body or send
-a response back. The request process executes middlewares
-which, by default, including the router and then the
-execution of handlers. Like stream handlers, middlewares
-may also be customized.</p></div>
-<div class="paragraph"><p>A response may be sent at almost any point in this
-diagram. If the response must be sent before the stream
-is initialized (because an error occurred early, for
-example) then stream handlers receive a special event
-indicating this error.</p></div>
-</div>
-</div>
-<div class="sect1">
+<img src="../http_req_resp.png" alt="HTTP request/response flowchart"/><p>As you can see on the diagram, the client begins by connecting to the server. This step is handled by a Ranch acceptor, which is a process dedicated to accepting new connections.</p>
+<p>After Ranch accepts a new connection, whether it is an HTTP/1.1 or HTTP/2 connection, Cowboy starts receiving requests and handling them.</p>
+<p>In HTTP/1.1 all requests come sequentially. In HTTP/2 the requests may arrive and be processed concurrently.</p>
+<p>When a request comes in, Cowboy creates a stream, which is a set of request/response and all the events associated with them. The protocol code in Cowboy defers the handling of these streams to stream handler modules. When you configure Cowboy you may define one or more module that will receive all events associated with a stream, including the request, response, bodies, Erlang messages and more.</p>
+<p>By default Cowboy comes configured with a stream handler called <code>cowboy_stream_h</code>. This stream handler will create a new process for every request coming in, and then communicate with this process to read the body or send a response back. The request process executes middlewares which, by default, including the router and then the execution of handlers. Like stream handlers, middlewares may also be customized.</p>
+<p>A response may be sent at almost any point in this diagram. If the response must be sent before the stream is initialized (because an error occurred early, for example) then stream handlers receive a special event indicating this error.</p>
<h2 id="_protocol_specific_headers">Protocol-specific headers</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy takes care of protocol-specific headers and prevents
-you from sending them manually. For HTTP/1.1 this includes
-the <code>transfer-encoding</code> and <code>connection</code> headers. For HTTP/2
-this includes the colon headers like <code>:status</code>.</p></div>
-<div class="paragraph"><p>Cowboy will also remove protocol-specific headers from
-requests before passing them to stream handlers. Cowboy
-tries to hide the implementation details of all protocols
-as well as possible.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Cowboy takes care of protocol-specific headers and prevents you from sending them manually. For HTTP/1.1 this includes the <code>transfer-encoding</code> and <code>connection</code> headers. For HTTP/2 this includes the colon headers like <code>:status</code>.</p>
+<p>Cowboy will also remove protocol-specific headers from requests before passing them to stream handlers. Cowboy tries to hide the implementation details of all protocols as well as possible.</p>
<h2 id="_number_of_processes_per_connection">Number of processes per connection</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>By default, Cowboy will use one process per connection,
-plus one process per set of request/response (called a
-stream, internally).</p></div>
-<div class="paragraph"><p>The reason it creates a new process for every request is due
-to the requirements of HTTP/2 where requests are executed
-concurrently and independently from the connection. The
-frames from the different requests end up interleaved on
-the single TCP connection.</p></div>
-<div class="paragraph"><p>The request processes are never reused. There is therefore
-no need to perform any cleanup after the response has been
-sent. The process will terminate and Erlang/OTP will reclaim
-all memory at once.</p></div>
-<div class="paragraph"><p>Cowboy ultimately does not require more than one process
-per connection. It is possible to interact with the connection
-directly from a stream handler, a low level interface to Cowboy.
-They are executed from within the connection process, and can
-handle the incoming requests and send responses. This is however
-not recommended in normal circumstances, as a stream handler
-taking too long to execute could have a negative impact on
-concurrent requests or the state of the connection itself.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>By default, Cowboy will use one process per connection, plus one process per set of request/response (called a stream, internally).</p>
+<p>The reason it creates a new process for every request is due to the requirements of HTTP/2 where requests are executed concurrently and independently from the connection. The frames from the different requests end up interleaved on the single TCP connection.</p>
+<p>The request processes are never reused. There is therefore no need to perform any cleanup after the response has been sent. The process will terminate and Erlang/OTP will reclaim all memory at once.</p>
+<p>Cowboy ultimately does not require more than one process per connection. It is possible to interact with the connection directly from a stream handler, a low level interface to Cowboy. They are executed from within the connection process, and can handle the incoming requests and send responses. This is however not recommended in normal circumstances, as a stream handler taking too long to execute could have a negative impact on concurrent requests or the state of the connection itself.</p>
<h2 id="_date_header">Date header</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Because querying for the current date and time can be expensive,
-Cowboy generates one <em>Date</em> header value every second, shares it
-to all other processes, which then simply copy it in the response.
-This allows compliance with HTTP/1.1 with no actual performance loss.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Because querying for the current date and time can be expensive, Cowboy generates one <em>Date</em> header value every second, shares it to all other processes, which then simply copy it in the response. This allows compliance with HTTP/1.1 with no actual performance loss.</p>
<h2 id="_binaries">Binaries</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy makes extensive use of binaries.</p></div>
-<div class="paragraph"><p>Binaries are more efficient than lists for representing
-strings because they take less memory space. Processing
-performance can vary depending on the operation. Binaries
-are known for generally getting a great boost if the code
-is compiled natively. Please see the HiPE documentation
-for more details.</p></div>
-<div class="paragraph"><p>Binaries may end up being shared between processes. This
-can lead to some large memory usage when one process keeps
-the binary data around forever without freeing it. If you
-see some weird memory usage in your application, this might
-be the cause.</p></div>
-</div>
-</div>
+<p>Cowboy makes extensive use of binaries.</p>
+<p>Binaries are more efficient than lists for representing strings because they take less memory space. Processing performance can vary depending on the operation. Binaries are known for generally getting a great boost if the code is compiled natively. Please see the HiPE documentation for more details.</p>
+<p>Binaries may end up being shared between processes. This can lead to some large memory usage when one process keeps the binary data around forever without freeing it. If you see some weird memory usage in your application, this might be the cause.</p>
+
diff --git a/docs/en/cowboy/2.3/guide/getting_started/index.html b/docs/en/cowboy/2.3/guide/getting_started/index.html
index b06cbf46..d214b33a 100644
--- a/docs/en/cowboy/2.3/guide/getting_started/index.html
+++ b/docs/en/cowboy/2.3/guide/getting_started/index.html
@@ -62,161 +62,104 @@
<h1 class="lined-header"><span>Getting started</span></h1>
-<div class="paragraph"><p>Erlang is more than a language, it is also an operating system
-for your applications. Erlang developers rarely write standalone
-modules, they write libraries or applications, and then bundle
-those into what is called a release. A release contains the
-Erlang VM plus all applications required to run the node, so
-it can be pushed to production directly.</p></div>
-<div class="paragraph"><p>This chapter walks you through all the steps of setting up
-Cowboy, writing your first application and generating your first
-release. At the end of this chapter you should know everything
-you need to push your first Cowboy application to production.</p></div>
-<div class="sect1">
+<p>Erlang is more than a language, it is also an operating system for your applications. Erlang developers rarely write standalone modules, they write libraries or applications, and then bundle those into what is called a release. A release contains the Erlang VM plus all applications required to run the node, so it can be pushed to production directly.</p>
+<p>This chapter walks you through all the steps of setting up Cowboy, writing your first application and generating your first release. At the end of this chapter you should know everything you need to push your first Cowboy application to production.</p>
<h2 id="_prerequisites">Prerequisites</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>We are going to use the <a href="https://github.com/ninenines/erlang.mk">Erlang.mk</a>
-build system. If you are using Windows, please check the
-<a href="http://erlang.mk/guide/installation.html">Installation instructions</a>
-to get your environment setup before you continue.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>We are going to use the <a href="https://github.com/ninenines/erlang.mk">Erlang.mk</a> build system. If you are using Windows, please check the <a href="http://erlang.mk/guide/installation.html">Installation instructions</a> to get your environment setup before you continue.</p>
<h2 id="_bootstrap">Bootstrap</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>First, let&#8217;s create the directory for our application.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>First, let&apos;s create the directory for our application.</p>
+<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 hello_erlang
-$ cd hello_erlang</tt></pre></div></div>
-<div class="paragraph"><p>Then we need to download Erlang.mk. Either use the following
-command or download it manually.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+$ cd hello_erlang</tt></pre>
+</div></div>
+<p>Then we need to download Erlang.mk. Either use the following command or download it manually.</p>
+<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>$ wget 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>We can now bootstrap our application. Since we are going to generate
-a release, we will also bootstrap it at the same time.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>$ wget https<font color="#990000">:</font>//erlang<font color="#990000">.</font>mk/erlang<font color="#990000">.</font>mk</tt></pre>
+</div></div>
+<p>We can now bootstrap our application. Since we are going to generate a release, we will also bootstrap it at the same time.</p>
+<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 -f erlang<span style="color: #990000">.</span>mk bootstrap bootstrap-rel</tt></pre></div></div>
-<div class="paragraph"><p>This creates a Makefile, a base application, and the release files
-necessary for creating the release. We can already build and start
-this release.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>$ make -f erlang<font color="#990000">.</font>mk bootstrap bootstrap-rel</tt></pre>
+</div></div>
+<p>This creates a Makefile, a base application, and the release files necessary for creating the release. We can already build and start this release.</p>
+<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 run
-<span style="color: #990000">...</span>
-<span style="color: #990000">(</span>hello_erlang@<span style="color: #993399">127.0</span><span style="color: #990000">.</span><span style="color: #993399">0.1</span><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>Entering the command <code>i().</code> will show the running processes, including
-one called <code>hello_erlang_sup</code>. This is the supervisor for our
-application.</p></div>
-<div class="paragraph"><p>The release currently does nothing. In the rest of this chapter we
-will add Cowboy as a dependency and write a simple "Hello world!"
-handler.</p></div>
-</div>
-</div>
-<div class="sect1">
+<font color="#990000">...</font>
+<font color="#990000">(</font>hello_erlang@<font color="#993399">127.0</font><font color="#990000">.</font><font color="#993399">0.1</font><font color="#990000">)</font><font color="#993399">1</font><font color="#990000">&gt;</font></tt></pre>
+</div></div>
+<p>Entering the command <code>i().</code> will show the running processes, including one called <code>hello_erlang_sup</code>. This is the supervisor for our application.</p>
+<p>The release currently does nothing. In the rest of this chapter we will add Cowboy as a dependency and write a simple &quot;Hello world!&quot; handler.</p>
<h2 id="_cowboy_setup">Cowboy setup</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>We will modify the <em>Makefile</em> to tell the build system it needs to
-fetch and compile Cowboy:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>We will modify the <em>Makefile</em> to tell the build system it needs to fetch and compile Cowboy:</p>
+<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">PROJECT =</span> hello_erlang
+<pre><tt><font color="#009900">PROJECT =</font> hello_erlang
-<span style="color: #009900">DEPS =</span> cowboy
-<span style="color: #009900">dep_cowboy_commit =</span> 2.3.0
+<font color="#009900">DEPS =</font> cowboy
+<font color="#009900">dep_cowboy_commit =</font> 2.3.0
-<span style="color: #009900">DEP_PLUGINS =</span> cowboy
+<font color="#009900">DEP_PLUGINS =</font> cowboy
-include erlang.mk</tt></pre></div></div>
-<div class="paragraph"><p>We also tell the build system to load the plugins Cowboy provides.
-These include predefined templates that we will use soon.</p></div>
-<div class="paragraph"><p>If you do <code>make run</code> now, Cowboy will be included in the release
-and started automatically. This is not enough however, as Cowboy
-doesn&#8217;t do anything by default. We still need to tell Cowboy to
-listen for connections.</p></div>
-</div>
-</div>
-<div class="sect1">
+include erlang.mk</tt></pre>
+</div></div>
+<p>We also tell the build system to load the plugins Cowboy provides. These include predefined templates that we will use soon.</p>
+<p>If you do <code>make run</code> now, Cowboy will be included in the release and started automatically. This is not enough however, as Cowboy doesn&apos;t do anything by default. We still need to tell Cowboy to listen for connections.</p>
<h2 id="_listening_for_connections">Listening for connections</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>First we define the routes that Cowboy will use to map requests
-to handler modules, and then we start the listener. This is best
-done at application startup.</p></div>
-<div class="paragraph"><p>Open the <em>src/hello_erlang_app.erl</em> file and add the necessary
-code to the <code>start/2</code> function to make it look like this:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>First we define the routes that Cowboy will use to map requests to handler modules, and then we start the listener. This is best done at application startup.</p>
+<p>Open the <em>src/hello_erlang_app.erl</em> file and add the necessary code to the <code>start/2</code> function to make it look like this:</p>
+<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">start</span></span>(<span style="color: #009900">_Type</span>, <span style="color: #009900">_Args</span>) <span style="color: #990000">-&gt;</span>
- <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: #FF6600">'_'</span>, [{<span style="color: #FF0000">"/"</span>, <span style="color: #FF6600">hello_handler</span>, []}]}
+<pre><tt><b><font color="#000000">start</font></b>(<font color="#009900">_Type</font>, <font color="#009900">_Args</font>) <font color="#990000">-&gt;</font>
+ <font color="#009900">Dispatch</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_router:compile</font></b>([
+ {<font color="#FF6600">'_'</font>, [{<font color="#FF0000">"/"</font>, <font color="#FF6600">hello_handler</font>, []}]}
]),
- {<span style="color: #FF6600">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:start_clear</span></span>(<span style="color: #FF6600">my_http_listener</span>,
- [{<span style="color: #FF6600">port</span>, <span style="color: #993399">8080</span>}],
- #{<span style="color: #0000FF">env</span> <span style="color: #990000">=&gt;</span> #{<span style="color: #0000FF">dispatch</span> <span style="color: #990000">=&gt;</span> <span style="color: #009900">Dispatch</span>}}
+ {<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy:start_clear</font></b>(<font color="#FF6600">my_http_listener</font>,
+ [{<font color="#FF6600">port</font>, <font color="#993399">8080</font>}],
+ #{<font color="#0000FF">env</font> <font color="#990000">=&gt;</font> #{<font color="#0000FF">dispatch</font> <font color="#990000">=&gt;</font> <font color="#009900">Dispatch</font>}}
),
- <span style="font-weight: bold"><span style="color: #000000">hello_erlang_sup:start_link</span></span>()<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Routes are explained in details in the <a href="../routing">Routing</a>
-chapter. For this tutorial we map the path <code>/</code> to the handler
-module <code>hello_handler</code>. This module doesn&#8217;t exist yet.</p></div>
-<div class="paragraph"><p>Build and start the release, then open <a href="http://localhost:8080">http://localhost:8080</a>
-in your browser. You will get a 500 error because the module is missing.
-Any other URL, like <a href="http://localhost:8080/test">http://localhost:8080/test</a>, will result in a
-404 error.</p></div>
-</div>
-</div>
-<div class="sect1">
+ <b><font color="#000000">hello_erlang_sup:start_link</font></b>()<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Routes are explained in details in the <a href="../routing">Routing</a> chapter. For this tutorial we map the path <code>/</code> to the handler module <code>hello_handler</code>. This module doesn&apos;t exist yet.</p>
+<p>Build and start the release, then open <a href="http://localhost:8080">http://localhost:8080</a> in your browser. You will get a 500 error because the module is missing. Any other URL, like <a href="http://localhost:8080/test">http://localhost:8080/test</a>, will result in a 404 error.</p>
<h2 id="_handling_requests">Handling requests</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy features different kinds of handlers, including REST
-and Websocket handlers. For this tutorial we will use a plain
-HTTP handler.</p></div>
-<div class="paragraph"><p>Generate a handler from a template:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Cowboy features different kinds of handlers, including REST and Websocket handlers. For this tutorial we will use a plain HTTP handler.</p>
+<p>Generate a handler from a template:</p>
+<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 new <span style="color: #009900">t</span><span style="color: #990000">=</span>cowboy<span style="color: #990000">.</span>http <span style="color: #009900">n</span><span style="color: #990000">=</span>hello_handler</tt></pre></div></div>
-<div class="paragraph"><p>Then, open the <em>src/hello_handler.erl</em> file and modify
-the <code>init/2</code> function like this to send a reply.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>$ make new <font color="#009900">t</font><font color="#990000">=</font>cowboy<font color="#990000">.</font>http <font color="#009900">n</font><font color="#990000">=</font>hello_handler</tt></pre>
+</div></div>
+<p>Then, open the <em>src/hello_handler.erl</em> file and modify the <code>init/2</code> function like this to send a reply.</p>
+<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">init</span></span>(<span style="color: #009900">Req0</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">200</span>,
- #{<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/plain"</span><span style="color: #990000">&gt;&gt;</span>},
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Hello Erlang!"</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="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>What the above code does is send a 200 OK reply, with the
-Content-type header set to <code>text/plain</code> and the response
-body set to <code>Hello Erlang!</code>.</p></div>
-<div class="paragraph"><p>If you run the release and open <a href="http://localhost:8080">http://localhost:8080</a>
-in your browser, you should get a nice <code>Hello Erlang!</code> displayed!</p></div>
-</div>
-</div>
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req0</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ <font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:reply</font></b>(<font color="#993399">200</font>,
+ #{<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/plain"</font><font color="#990000">&gt;&gt;</font>},
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"Hello Erlang!"</font><font color="#990000">&gt;&gt;</font>,
+ <font color="#009900">Req0</font>),
+ {<font color="#FF6600">ok</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>What the above code does is send a 200 OK reply, with the Content-type header set to <code>text/plain</code> and the response body set to <code>Hello Erlang!</code>.</p>
+<p>If you run the release and open <a href="http://localhost:8080">http://localhost:8080</a> in your browser, you should get a nice <code>Hello Erlang!</code> displayed!</p>
+
diff --git a/docs/en/cowboy/2.3/guide/handlers/index.html b/docs/en/cowboy/2.3/guide/handlers/index.html
index e8567d8e..61d83e67 100644
--- a/docs/en/cowboy/2.3/guide/handlers/index.html
+++ b/docs/en/cowboy/2.3/guide/handlers/index.html
@@ -62,91 +62,57 @@
<h1 class="lined-header"><span>Handlers</span></h1>
-<div class="paragraph"><p>Handlers are Erlang modules that handle HTTP requests.</p></div>
-<div class="sect1">
+<p>Handlers are Erlang modules that handle HTTP requests.</p>
<h2 id="_plain_http_handlers">Plain HTTP handlers</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The most basic handler in Cowboy implements the mandatory
-<code>init/2</code> callback, manipulates the request, optionally
-sends a response and then returns.</p></div>
-<div class="paragraph"><p>This callback receives the <a href="../req">Req object</a> and the initial
-state defined in the <a href="../routing">router configuration</a>.</p></div>
-<div class="paragraph"><p>A handler that does nothing would look like this:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The most basic handler in Cowboy implements the mandatory <code>init/2</code> callback, manipulates the request, optionally sends a response and then returns.</p>
+<p>This callback receives the <a href="../req">Req object</a> and the initial state defined in the <a href="../routing">router configuration</a>.</p>
+<p>A handler that does nothing would look like this:</p>
+<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">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">ok</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Despite sending no reply, a <code>204 No Content</code> response will be
-sent to the client, as Cowboy makes sure that a response is
-sent for every request.</p></div>
-<div class="paragraph"><p>We need to use the Req object to reply.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Despite sending no reply, a <code>204 No Content</code> response will be sent to the client, as Cowboy makes sure that a response is sent for every request.</p>
+<p>We need to use the Req object to reply.</p>
+<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">init</span></span>(<span style="color: #009900">Req0</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">200</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/plain"</span><span style="color: #990000">&gt;&gt;</span>
- }, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Hello World!"</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="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Cowboy will immediately send a response when <code>cowboy:reply/4</code>
-is called.</p></div>
-<div class="paragraph"><p>We then return a 3-tuple. <code>ok</code> means that the handler ran
-successfully. We also give the modified Req back to Cowboy.</p></div>
-<div class="paragraph"><p>The last value of the tuple is a state that will be used
-in every subsequent callbacks to this handler. Plain HTTP
-handlers only have one additional callback, the optional
-and rarely used <code>terminate/3</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req0</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ <font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:reply</font></b>(<font color="#993399">200</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/plain"</font><font color="#990000">&gt;&gt;</font>
+ }, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"Hello World!"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req0</font>),
+ {<font color="#FF6600">ok</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Cowboy will immediately send a response when <code>cowboy:reply/4</code> is called.</p>
+<p>We then return a 3-tuple. <code>ok</code> means that the handler ran successfully. We also give the modified Req back to Cowboy.</p>
+<p>The last value of the tuple is a state that will be used in every subsequent callbacks to this handler. Plain HTTP handlers only have one additional callback, the optional and rarely used <code>terminate/3</code>.</p>
<h2 id="_other_handlers">Other handlers</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <code>init/2</code> callback can also be used to inform Cowboy
-that this is a different kind of handler and that Cowboy
-should switch to it. To do this you simply need to return
-the module name of the handler type you want to switch to.</p></div>
-<div class="paragraph"><p>Cowboy comes with three handler types you can switch to:
-<a href="../rest_handlers">cowboy_rest</a>, <a href="#ws_handlers">cowboy_websocket</a>
-and <a href="../loop_handlers">cowboy_loop</a>. In addition to those you
-can define your own handler types.</p></div>
-<div class="paragraph"><p>Switching is simple. Instead of returning <code>ok</code>, you simply
-return the name of the handler type you want to use. The
-following snippet switches to a Websocket handler:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The <code>init/2</code> callback can also be used to inform Cowboy that this is a different kind of handler and that Cowboy should switch to it. To do this you simply need to return the module name of the handler type you want to switch to.</p>
+<p>Cowboy comes with three handler types you can switch to: <a href="../rest_handlers">cowboy_rest</a>, <a href="../ws_handlers">cowboy_websocket</a> and <a href="../loop_handlers">cowboy_loop</a>. In addition to those you can define your own handler types.</p>
+<p>Switching is simple. Instead of returning <code>ok</code>, you simply return the name of the handler type you want to use. The following snippet switches to a Websocket handler:</p>
+<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">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_websocket</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">
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">cowboy_websocket</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_cleaning_up">Cleaning up</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>All handler types provide the optional <code>terminate/3</code> callback.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>All handler types provide the optional <code>terminate/3</code> callback.</p>
+<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">terminate</span></span>(<span style="color: #009900">_Reason</span>, <span style="color: #009900">_Req</span>, <span style="color: #009900">_State</span>) <span style="color: #990000">-&gt;</span>
- <span style="color: #FF6600">ok</span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>This callback is strictly reserved for any required cleanup.
-You cannot send a response from this function. There is no
-other return value.</p></div>
-<div class="paragraph"><p>This callback is optional because it is rarely necessary.
-Cleanup should be done in separate processes directly (by
-monitoring the handler process to detect when it exits).</p></div>
-<div class="paragraph"><p>Cowboy does not reuse processes for different requests. The
-process will terminate soon after this call returns.</p></div>
-</div>
-</div>
+<pre><tt><b><font color="#000000">terminate</font></b>(<font color="#009900">_Reason</font>, <font color="#009900">_Req</font>, <font color="#009900">_State</font>) <font color="#990000">-&gt;</font>
+ <font color="#FF6600">ok</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>This callback is strictly reserved for any required cleanup. You cannot send a response from this function. There is no other return value.</p>
+<p>This callback is optional because it is rarely necessary. Cleanup should be done in separate processes directly (by monitoring the handler process to detect when it exits).</p>
+<p>Cowboy does not reuse processes for different requests. The process will terminate soon after this call returns.</p>
+
diff --git a/docs/en/cowboy/2.3/guide/index.html b/docs/en/cowboy/2.3/guide/index.html
index 88267686..2aede748 100644
--- a/docs/en/cowboy/2.3/guide/index.html
+++ b/docs/en/cowboy/2.3/guide/index.html
@@ -62,214 +62,85 @@
<h1 class="lined-header"><span>Cowboy User Guide</span></h1>
-<div class="sect1">
+<!-- REST: where should i handle bindings? init, probably. qs? in media type functions-->
+<!-- REST: explain how a module per media type is good; module may be shared between client/server-->
<h2 id="_rationale">Rationale</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="modern_web/">The modern Web</a>
-</p>
+<ul><li><a href="modern_web/">The modern Web</a>
</li>
-<li>
-<p>
-<a href="erlang_web/">Erlang and the Web</a>
-</p>
+<li><a href="erlang_web/">Erlang and the Web</a>
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_introduction">Introduction</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="introduction/">Introduction</a>
-</p>
+<ul><li><a href="introduction/">Introduction</a>
</li>
-<li>
-<p>
-<a href="getting_started/">Getting started</a>
-</p>
+<li><a href="getting_started/">Getting started</a>
</li>
-<li>
-<p>
-<a href="flow_diagram/">Flow diagram</a>
-</p>
+<li><a href="flow_diagram/">Flow diagram</a>
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_configuration">Configuration</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="listeners/">Listeners</a>
-</p>
+<ul><li><a href="listeners/">Listeners</a>
</li>
-<li>
-<p>
-<a href="routing/">Routing</a>
-</p>
+<li><a href="routing/">Routing</a>
</li>
-<li>
-<p>
-<a href="constraints/">Constraints</a>
-</p>
+<li><a href="constraints/">Constraints</a>
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_handlers">Handlers</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="handlers/">Handlers</a>
-</p>
+<ul><li><a href="handlers/">Handlers</a>
</li>
-<li>
-<p>
-<a href="loop_handlers/">Loop handlers</a>
-</p>
+<li><a href="loop_handlers/">Loop handlers</a>
</li>
-<li>
-<p>
-<a href="static_files/">Static files</a>
-</p>
+<li><a href="static_files/">Static files</a>
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_request_and_response">Request and response</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="req/">Request details</a>
-</p>
+<ul><li><a href="req/">Request details</a>
</li>
-<li>
-<p>
-<a href="req_body/">Reading the request body</a>
-</p>
+<li><a href="req_body/">Reading the request body</a>
</li>
-<li>
-<p>
-<a href="resp/">Sending a response</a>
-</p>
+<li><a href="resp/">Sending a response</a>
</li>
-<li>
-<p>
-<a href="cookies/">Using cookies</a>
-</p>
+<li><a href="cookies/">Using cookies</a>
</li>
-<li>
-<p>
-<a href="multipart/">Multipart</a>
-</p>
+<li><a href="multipart/">Multipart</a>
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_rest">REST</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="rest_principles/">REST principles</a>
-</p>
+<ul><li><a href="rest_principles/">REST principles</a>
</li>
-<li>
-<p>
-<a href="rest_handlers/">Handling REST requests</a>
-</p>
+<li><a href="rest_handlers/">Handling REST requests</a>
</li>
-<li>
-<p>
-<a href="rest_flowcharts/">REST flowcharts</a>
-</p>
+<li><a href="rest_flowcharts/">REST flowcharts</a>
</li>
-<li>
-<p>
-<a href="resource_design/">Designing a resource handler</a>
-</p>
+<li><a href="resource_design/">Designing a resource handler</a>
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_websocket">Websocket</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="ws_protocol/">The Websocket protocol</a>
-</p>
+<ul><li><a href="ws_protocol/">The Websocket protocol</a>
</li>
-<li>
-<p>
-<a href="ws_handlers/">Websocket handlers</a>
-</p>
+<li><a href="ws_handlers/">Websocket handlers</a>
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_advanced">Advanced</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="streams/">Streams</a>
-</p>
+<ul><li><a href="streams/">Streams</a>
</li>
-<li>
-<p>
-<a href="middlewares/">Middlewares</a>
-</p>
+<li><a href="middlewares/">Middlewares</a>
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_additional_information">Additional information</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="migrating_from_2.2/">Migrating from Cowboy 2.2 to 2.3</a>
-</p>
+<ul><li><a href="migrating_from_2.2/">Migrating from Cowboy 2.2 to 2.3</a>
</li>
-<li>
-<p>
-<a href="migrating_from_2.1/">Migrating from Cowboy 2.1 to 2.2</a>
-</p>
+<li><a href="migrating_from_2.1/">Migrating from Cowboy 2.1 to 2.2</a>
</li>
-<li>
-<p>
-<a href="migrating_from_2.0/">Migrating from Cowboy 2.0 to 2.1</a>
-</p>
+<li><a href="migrating_from_2.0/">Migrating from Cowboy 2.0 to 2.1</a>
</li>
-<li>
-<p>
-<a href="migrating_from_1.0/">Migrating from Cowboy 1.0 to 2.0</a>
-</p>
+<li><a href="migrating_from_1.0/">Migrating from Cowboy 1.0 to 2.0</a>
</li>
-<li>
-<p>
-<a href="specs/">HTTP and other specifications</a>
-</p>
+<li><a href="specs/">HTTP and other specifications</a>
</li>
-</ul></div>
-</div>
-</div>
+</ul>
+
diff --git a/docs/en/cowboy/2.3/guide/introduction/index.html b/docs/en/cowboy/2.3/guide/introduction/index.html
index eaeaf485..3a0db4b4 100644
--- a/docs/en/cowboy/2.3/guide/introduction/index.html
+++ b/docs/en/cowboy/2.3/guide/introduction/index.html
@@ -62,79 +62,40 @@
<h1 class="lined-header"><span>Introduction</span></h1>
-<div class="paragraph"><p>Cowboy is a small, fast and modern HTTP server for Erlang/OTP.</p></div>
-<div class="paragraph"><p>Cowboy aims to provide a complete <a href="../modern_web">modern Web stack</a>.
-This includes HTTP/1.1, HTTP/2, Websocket, Server-Sent Events and
-Webmachine-based REST.</p></div>
-<div class="paragraph"><p>Cowboy comes with functions for introspection and tracing, enabling
-developers to know precisely what is happening at any time. Its modular
-design also easily enable developers to add instrumentation.</p></div>
-<div class="paragraph"><p>Cowboy is a high quality project. It has a small code base, is very
-efficient (both in latency and memory use) and can easily be embedded
-in another application.</p></div>
-<div class="paragraph"><p>Cowboy is clean Erlang code. It includes hundreds of tests and its code
-is fully compliant with the Dialyzer. It is also well documented and
-features a Function Reference, a User Guide and numerous Tutorials.</p></div>
-<div class="sect1">
+<p>Cowboy is a small, fast and modern HTTP server for Erlang/OTP.</p>
+<p>Cowboy aims to provide a complete <a href="../modern_web">modern Web stack</a>. This includes HTTP/1.1, HTTP/2, Websocket, Server-Sent Events and Webmachine-based REST.</p>
+<p>Cowboy comes with functions for introspection and tracing, enabling developers to know precisely what is happening at any time. Its modular design also easily enable developers to add instrumentation.</p>
+<p>Cowboy is a high quality project. It has a small code base, is very efficient (both in latency and memory use) and can easily be embedded in another application.</p>
+<p>Cowboy is clean Erlang code. It includes hundreds of tests and its code is fully compliant with the Dialyzer. It is also well documented and features a Function Reference, a User Guide and numerous Tutorials.</p>
<h2 id="_prerequisites">Prerequisites</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Beginner Erlang knowledge is recommended for reading this guide.</p></div>
-<div class="paragraph"><p>Knowledge of the HTTP protocol is recommended but not required, as it
-will be detailed throughout the guide.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Beginner Erlang knowledge is recommended for reading this guide.</p>
+<p>Knowledge of the HTTP protocol is recommended but not required, as it will be detailed throughout the guide.</p>
<h2 id="_supported_platforms">Supported platforms</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy is tested and supported on Linux, FreeBSD, Windows and OSX.</p></div>
-<div class="paragraph"><p>Cowboy has been reported to work on other platforms, but we make no
-guarantee that the experience will be safe and smooth. You are advised
-to perform the necessary testing and security audits prior to deploying
-on other platforms.</p></div>
-<div class="paragraph"><p>Cowboy is developed for Erlang/OTP 19.0 and newer.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Cowboy is tested and supported on Linux, FreeBSD, Windows and OSX.</p>
+<p>Cowboy has been reported to work on other platforms, but we make no guarantee that the experience will be safe and smooth. You are advised to perform the necessary testing and security audits prior to deploying on other platforms.</p>
+<p>Cowboy is developed for Erlang/OTP 19.0 and newer.</p>
<h2 id="_license">License</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy uses the ISC License.</p></div>
-<div class="listingblock">
-<div class="content">
-<pre><code>Copyright (c) 2011-2017, Loïc Hoguin &lt;[email protected]&gt;
+<p>Cowboy uses the ISC License.</p>
+<div class="listingblock"><div class="content"><pre>Copyright (c) 2011-2017, Loïc Hoguin &lt;[email protected]&gt;
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+THE SOFTWARE IS PROVIDED &quot;AS IS&quot; AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.</code></pre>
-</div></div>
-</div>
-</div>
-<div class="sect1">
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.</pre></div></div>
<h2 id="_versioning">Versioning</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy uses <a href="http://semver.org/">Semantic Versioning 2.0.0</a>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Cowboy uses <a href="http://semver.org/">Semantic Versioning 2.0.0</a>.</p>
<h2 id="_conventions">Conventions</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>In the HTTP protocol, the method name is case sensitive. All standard
-method names are uppercase.</p></div>
-<div class="paragraph"><p>Header names are case insensitive. When using HTTP/1.1, Cowboy converts
-all the request header names to lowercase. HTTP/2 requires clients to
-send them as lowercase. Any other header name is expected to be provided
-lowercased, including when querying information about the request or
-when sending responses.</p></div>
-<div class="paragraph"><p>The same applies to any other case insensitive value.</p></div>
-</div>
-</div>
+<p>In the HTTP protocol, the method name is case sensitive. All standard method names are uppercase.</p>
+<p>Header names are case insensitive. When using HTTP/1.1, Cowboy converts all the request header names to lowercase. HTTP/2 requires clients to send them as lowercase. Any other header name is expected to be provided lowercased, including when querying information about the request or when sending responses.</p>
+<p>The same applies to any other case insensitive value.</p>
+
diff --git a/docs/en/cowboy/2.3/guide/listeners/index.html b/docs/en/cowboy/2.3/guide/listeners/index.html
index 0990f98c..743c25fb 100644
--- a/docs/en/cowboy/2.3/guide/listeners/index.html
+++ b/docs/en/cowboy/2.3/guide/listeners/index.html
@@ -62,109 +62,61 @@
<h1 class="lined-header"><span>Listeners</span></h1>
-<div class="paragraph"><p>A listener is a set of processes that listens on a port for
-new connections. Incoming connections get handled by Cowboy.
-Depending on the connection handshake, one or another protocol
-may be used.</p></div>
-<div class="paragraph"><p>This chapter is specific to Cowboy. Please refer to the
-<a href="https://ninenines.eu/docs/en/ranch/1.3/guide/listeners/">Ranch User Guide</a>
-for more information about listeners.</p></div>
-<div class="paragraph"><p>Cowboy provides two types of listeners: one listening for
-clear TCP connections, and one listening for secure TLS
-connections. Both of them support the HTTP/1.1 and HTTP/2
-protocols.</p></div>
-<div class="sect1">
+<p>A listener is a set of processes that listens on a port for new connections. Incoming connections get handled by Cowboy. Depending on the connection handshake, one or another protocol may be used.</p>
+<p>This chapter is specific to Cowboy. Please refer to the <a href="https://ninenines.eu/docs/en/ranch/1.3/guide/listeners/">Ranch User Guide</a> for more information about listeners.</p>
+<p>Cowboy provides two types of listeners: one listening for clear TCP connections, and one listening for secure TLS connections. Both of them support the HTTP/1.1 and HTTP/2 protocols.</p>
<h2 id="_clear_tcp_listener">Clear TCP listener</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The clear TCP listener will accept connections on the
-given port. A typical HTTP server would listen on port 80.
-Port 80 requires special permissions on most platforms
-however so a common alternative is port 8080.</p></div>
-<div class="paragraph"><p>The following snippet starts listening for connections
-on port 8080:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The clear TCP listener will accept connections on the given port. A typical HTTP server would listen on port 80. Port 80 requires special permissions on most platforms however so a common alternative is port 8080.</p>
+<p>The following snippet starts listening for connections on port 8080:</p>
+<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">start</span></span>(<span style="color: #009900">_Type</span>, <span style="color: #009900">_Args</span>) <span style="color: #990000">-&gt;</span>
- <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: #FF6600">'_'</span>, [{<span style="color: #FF0000">"/"</span>, <span style="color: #FF6600">hello_handler</span>, []}]}
+<pre><tt><b><font color="#000000">start</font></b>(<font color="#009900">_Type</font>, <font color="#009900">_Args</font>) <font color="#990000">-&gt;</font>
+ <font color="#009900">Dispatch</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_router:compile</font></b>([
+ {<font color="#FF6600">'_'</font>, [{<font color="#FF0000">"/"</font>, <font color="#FF6600">hello_handler</font>, []}]}
]),
- {<span style="color: #FF6600">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:start_clear</span></span>(<span style="color: #FF6600">my_http_listener</span>,
- [{<span style="color: #FF6600">port</span>, <span style="color: #993399">8080</span>}],
- #{<span style="color: #0000FF">env</span> <span style="color: #990000">=&gt;</span> #{<span style="color: #0000FF">dispatch</span> <span style="color: #990000">=&gt;</span> <span style="color: #009900">Dispatch</span>}}
+ {<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy:start_clear</font></b>(<font color="#FF6600">my_http_listener</font>,
+ [{<font color="#FF6600">port</font>, <font color="#993399">8080</font>}],
+ #{<font color="#0000FF">env</font> <font color="#990000">=&gt;</font> #{<font color="#0000FF">dispatch</font> <font color="#990000">=&gt;</font> <font color="#009900">Dispatch</font>}}
),
- <span style="font-weight: bold"><span style="color: #000000">hello_erlang_sup:start_link</span></span>()<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>The <a href="../getting_started">Getting Started</a> chapter uses a
-clear TCP listener.</p></div>
-<div class="paragraph"><p>Clients connecting to Cowboy on the clear listener port are
-expected to use either HTTP/1.1 or HTTP/2.</p></div>
-<div class="paragraph"><p>Cowboy supports both methods of initiating a clear
-HTTP/2 connection: through the Upgrade mechanism
-(<a href="https://tools.ietf.org/html/rfc7540#section-3.2">RFC 7540 3.2</a>)
-or by sending the preface directly
-(<a href="https://tools.ietf.org/html/rfc7540#section-3.4">RFC 7540 3.4</a>).</p></div>
-<div class="paragraph"><p>Compatibility with HTTP/1.0 is provided by Cowboy&#8217;s HTTP/1.1
-implementation.</p></div>
-</div>
-</div>
-<div class="sect1">
+ <b><font color="#000000">hello_erlang_sup:start_link</font></b>()<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>The <a href="../getting_started">Getting Started</a> chapter uses a clear TCP listener.</p>
+<p>Clients connecting to Cowboy on the clear listener port are expected to use either HTTP/1.1 or HTTP/2.</p>
+<p>Cowboy supports both methods of initiating a clear HTTP/2 connection: through the Upgrade mechanism (<a href="https://tools.ietf.org/html/rfc7540#section-3.2">RFC 7540 3.2</a>) or by sending the preface directly (<a href="https://tools.ietf.org/html/rfc7540#section-3.4">RFC 7540 3.4</a>).</p>
+<p>Compatibility with HTTP/1.0 is provided by Cowboy&apos;s HTTP/1.1 implementation.</p>
<h2 id="_secure_tls_listener">Secure TLS listener</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The secure TLS listener will accept connections on the
-given port. A typical HTTPS server would listen on port 443.
-Port 443 requires special permissions on most platforms
-however so a common alternative is port 8443.</p></div>
-<div class="paragraph"><p>The function provided by Cowboy will ensure that the TLS
-options given are following the HTTP/2 RFC with regards
-to security. For example some TLS extensions or ciphers
-may be disabled. This also applies to HTTP/1.1 connections
-on this listener. If this is not desirable, Ranch can be
-used directly to setup a custom listener.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The secure TLS listener will accept connections on the given port. A typical HTTPS server would listen on port 443. Port 443 requires special permissions on most platforms however so a common alternative is port 8443.</p>
+<!-- @todo Make a complete list of restrictions.-->
+<p>The function provided by Cowboy will ensure that the TLS options given are following the HTTP/2 RFC with regards to security. For example some TLS extensions or ciphers may be disabled. This also applies to HTTP/1.1 connections on this listener. If this is not desirable, Ranch can be used directly to setup a custom listener.</p>
+<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">start</span></span>(<span style="color: #009900">_Type</span>, <span style="color: #009900">_Args</span>) <span style="color: #990000">-&gt;</span>
- <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: #FF6600">'_'</span>, [{<span style="color: #FF0000">"/"</span>, <span style="color: #FF6600">hello_handler</span>, []}]}
+<pre><tt><b><font color="#000000">start</font></b>(<font color="#009900">_Type</font>, <font color="#009900">_Args</font>) <font color="#990000">-&gt;</font>
+ <font color="#009900">Dispatch</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_router:compile</font></b>([
+ {<font color="#FF6600">'_'</font>, [{<font color="#FF0000">"/"</font>, <font color="#FF6600">hello_handler</font>, []}]}
]),
- {<span style="color: #FF6600">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:start_tls</span></span>(<span style="color: #FF6600">my_http_listener</span>,
+ {<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy:start_tls</font></b>(<font color="#FF6600">my_http_listener</font>,
[
- {<span style="color: #FF6600">port</span>, <span style="color: #993399">8443</span>},
- {<span style="color: #FF6600">certfile</span>, <span style="color: #FF0000">"/path/to/certfile"</span>},
- {<span style="color: #FF6600">keyfile</span>, <span style="color: #FF0000">"/path/to/keyfile"</span>}
+ {<font color="#FF6600">port</font>, <font color="#993399">8443</font>},
+ {<font color="#FF6600">certfile</font>, <font color="#FF0000">"/path/to/certfile"</font>},
+ {<font color="#FF6600">keyfile</font>, <font color="#FF0000">"/path/to/keyfile"</font>}
],
- #{<span style="color: #0000FF">env</span> <span style="color: #990000">=&gt;</span> #{<span style="color: #0000FF">dispatch</span> <span style="color: #990000">=&gt;</span> <span style="color: #009900">Dispatch</span>}}
+ #{<font color="#0000FF">env</font> <font color="#990000">=&gt;</font> #{<font color="#0000FF">dispatch</font> <font color="#990000">=&gt;</font> <font color="#009900">Dispatch</font>}}
),
- <span style="font-weight: bold"><span style="color: #000000">hello_erlang_sup:start_link</span></span>()<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Clients connecting to Cowboy on the secure listener are
-expected to use the ALPN TLS extension to indicate what
-protocols they understand. Cowboy always prefers HTTP/2
-over HTTP/1.1 when both are supported. When neither are
-supported by the client, or when the ALPN extension was
-missing, Cowboy expects HTTP/1.1 to be used.</p></div>
-<div class="paragraph"><p>Cowboy also advertises HTTP/2 support through the older
-NPN TLS extension for compatibility. Note however that
-this support will likely not be enabled by default when
-Cowboy 2.0 gets released.</p></div>
-<div class="paragraph"><p>Compatibility with HTTP/1.0 is provided by Cowboy&#8217;s HTTP/1.1
-implementation.</p></div>
-</div>
-</div>
-<div class="sect1">
+ <b><font color="#000000">hello_erlang_sup:start_link</font></b>()<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Clients connecting to Cowboy on the secure listener are expected to use the ALPN TLS extension to indicate what protocols they understand. Cowboy always prefers HTTP/2 over HTTP/1.1 when both are supported. When neither are supported by the client, or when the ALPN extension was missing, Cowboy expects HTTP/1.1 to be used.</p>
+<p>Cowboy also advertises HTTP/2 support through the older NPN TLS extension for compatibility. Note however that this support will likely not be enabled by default when Cowboy 2.0 gets released.</p>
+<p>Compatibility with HTTP/1.0 is provided by Cowboy&apos;s HTTP/1.1 implementation.</p>
<h2 id="_protocol_configuration">Protocol configuration</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The HTTP/1.1 and HTTP/2 protocols share the same semantics;
-only their framing differs. The first is a text protocol and
-the second a binary protocol.</p></div>
-<div class="paragraph"><p>Cowboy doesn&#8217;t separate the configuration for HTTP/1.1 and
-HTTP/2. Everything goes into the same map. Many options are
-shared.</p></div>
-</div>
-</div>
+<p>The HTTP/1.1 and HTTP/2 protocols share the same semantics; only their framing differs. The first is a text protocol and the second a binary protocol.</p>
+<p>Cowboy doesn&apos;t separate the configuration for HTTP/1.1 and HTTP/2. Everything goes into the same map. Many options are shared.</p>
+<!-- @todo Describe good to know options for both protocols?-->
+<!-- Maybe do that in separate chapters?-->
+
diff --git a/docs/en/cowboy/2.3/guide/loop_handlers/index.html b/docs/en/cowboy/2.3/guide/loop_handlers/index.html
index 57c5be92..637a54e1 100644
--- a/docs/en/cowboy/2.3/guide/loop_handlers/index.html
+++ b/docs/en/cowboy/2.3/guide/loop_handlers/index.html
@@ -62,131 +62,72 @@
<h1 class="lined-header"><span>Loop handlers</span></h1>
-<div class="paragraph"><p>Loop handlers are a special kind of HTTP handlers used when the
-response can not be sent right away. The handler enters instead
-a receive loop waiting for the right message before it can send
-a response.</p></div>
-<div class="paragraph"><p>Loop handlers are used for requests where a response might not
-be immediately available, but where you would like to keep the
-connection open for a while in case the response arrives. The
-most known example of such practice is known as long polling.</p></div>
-<div class="paragraph"><p>Loop handlers can also be used for requests where a response is
-partially available and you need to stream the response body
-while the connection is open. The most known example of such
-practice is server-sent events.</p></div>
-<div class="paragraph"><p>While the same can be accomplished using plain HTTP handlers,
-it is recommended to use loop handlers because they are well-tested
-and allow using built-in features like hibernation and timeouts.</p></div>
-<div class="paragraph"><p>Loop handlers essentially wait for one or more Erlang messages
-and feed these messages to the <code>info/3</code> callback. It also features
-the <code>init/2</code> and <code>terminate/3</code> callbacks which work the same as
-for plain HTTP handlers.</p></div>
-<div class="sect1">
+<p>Loop handlers are a special kind of HTTP handlers used when the response can not be sent right away. The handler enters instead a receive loop waiting for the right message before it can send a response.</p>
+<p>Loop handlers are used for requests where a response might not be immediately available, but where you would like to keep the connection open for a while in case the response arrives. The most known example of such practice is known as long polling.</p>
+<p>Loop handlers can also be used for requests where a response is partially available and you need to stream the response body while the connection is open. The most known example of such practice is server-sent events.</p>
+<p>While the same can be accomplished using plain HTTP handlers, it is recommended to use loop handlers because they are well-tested and allow using built-in features like hibernation and timeouts.</p>
+<p>Loop handlers essentially wait for one or more Erlang messages and feed these messages to the <code>info/3</code> callback. It also features the <code>init/2</code> and <code>terminate/3</code> callbacks which work the same as for plain HTTP handlers.</p>
<h2 id="_initialization">Initialization</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <code>init/2</code> function must return a <code>cowboy_loop</code> tuple to enable
-loop handler behavior. This tuple may optionally contain
-a timeout value and/or the atom <code>hibernate</code> to make the
-process enter hibernation until a message is received.</p></div>
-<div class="paragraph"><p>This snippet enables the loop handler:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The <code>init/2</code> function must return a <code>cowboy_loop</code> tuple to enable loop handler behavior. This tuple may optionally contain a timeout value and/or the atom <code>hibernate</code> to make the process enter hibernation until a message is received.</p>
+<p>This snippet enables the loop handler:</p>
+<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">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_loop</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>This also makes the process hibernate:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">cowboy_loop</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>This also makes the process hibernate:</p>
+<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">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_loop</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>, <span style="color: #FF6600">hibernate</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">cowboy_loop</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>, <font color="#FF6600">hibernate</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_receive_loop">Receive loop</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Once initialized, Cowboy will wait for messages to arrive
-in the process' mailbox. When a message arrives, Cowboy
-calls the <code>info/3</code> function with the message, the Req object
-and the handler&#8217;s state.</p></div>
-<div class="paragraph"><p>The following snippet sends a reply when it receives a
-<code>reply</code> message from another process, or waits for another
-message otherwise.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Once initialized, Cowboy will wait for messages to arrive in the process&apos; mailbox. When a message arrives, Cowboy calls the <code>info/3</code> function with the message, the Req object and the handler&apos;s state.</p>
+<p>The following snippet sends a reply when it receives a <code>reply</code> message from another process, or waits for another message otherwise.</p>
+<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">info</span></span>({<span style="color: #FF6600">reply</span>, <span style="color: #009900">Body</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: #000000">cowboy_req:reply</span></span>(<span style="color: #993399">200</span>, #{}, <span style="color: #009900">Body</span>, <span style="color: #009900">Req</span>),
- {<span style="color: #FF6600">stop</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>};
-<span style="font-weight: bold"><span style="color: #000000">info</span></span>(<span style="color: #009900">_Msg</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>, <span style="color: #FF6600">hibernate</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Do note that the <code>reply</code> tuple here may be any message
-and is simply an example.</p></div>
-<div class="paragraph"><p>This callback may perform any necessary operation including
-sending all or parts of a reply, and will subsequently
-return a tuple indicating if more messages are to be expected.</p></div>
-<div class="paragraph"><p>The callback may also choose to do nothing at all and just
-skip the message received.</p></div>
-<div class="paragraph"><p>If a reply is sent, then the <code>stop</code> tuple should be returned.
-This will instruct Cowboy to end the request.</p></div>
-<div class="paragraph"><p>Otherwise an <code>ok</code> tuple should be returned.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">info</font></b>({<font color="#FF6600">reply</font>, <font color="#009900">Body</font>}, <font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#000000">cowboy_req:reply</font></b>(<font color="#993399">200</font>, #{}, <font color="#009900">Body</font>, <font color="#009900">Req</font>),
+ {<font color="#FF6600">stop</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>};
+<b><font color="#000000">info</font></b>(<font color="#009900">_Msg</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>, <font color="#FF6600">hibernate</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Do note that the <code>reply</code> tuple here may be any message and is simply an example.</p>
+<p>This callback may perform any necessary operation including sending all or parts of a reply, and will subsequently return a tuple indicating if more messages are to be expected.</p>
+<p>The callback may also choose to do nothing at all and just skip the message received.</p>
+<p>If a reply is sent, then the <code>stop</code> tuple should be returned. This will instruct Cowboy to end the request.</p>
+<p>Otherwise an <code>ok</code> tuple should be returned.</p>
<h2 id="_streaming_loop">Streaming loop</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Another common case well suited for loop handlers is
-streaming data received in the form of Erlang messages.
-This can be done by initiating a chunked reply in the
-<code>init/2</code> callback and then using <code>cowboy_req:chunk/2</code>
-every time a message is received.</p></div>
-<div class="paragraph"><p>The following snippet does exactly that. As you can see
-a chunk is sent every time an <code>event</code> message is received,
-and the loop is stopped by sending an <code>eof</code> message.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Another common case well suited for loop handlers is streaming data received in the form of Erlang messages. This can be done by initiating a chunked reply in the <code>init/2</code> callback and then using <code>cowboy_req:chunk/2</code> every time a message is received.</p>
+<p>The following snippet does exactly that. As you can see a chunk is sent every time an <code>event</code> message is received, and the loop is stopped by sending an <code>eof</code> message.</p>
+<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">init</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- <span style="color: #009900">Req2</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_reply</span></span>(<span style="color: #993399">200</span>, <span style="color: #009900">Req</span>),
- {<span style="color: #FF6600">cowboy_loop</span>, <span style="color: #009900">Req2</span>, <span style="color: #009900">State</span>}<span style="color: #990000">.</span>
-
-<span style="font-weight: bold"><span style="color: #000000">info</span></span>(<span style="color: #FF6600">eof</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">stop</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>};
-<span style="font-weight: bold"><span style="color: #000000">info</span></span>({<span style="color: #FF6600">event</span>, <span style="color: #009900">Data</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: #000000">cowboy_req:stream_body</span></span>(<span style="color: #009900">Data</span>, <span style="color: #FF6600">nofin</span>, <span style="color: #009900">Req</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">info</span></span>(<span style="color: #009900">_Msg</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">ok</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">
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ <font color="#009900">Req2</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:stream_reply</font></b>(<font color="#993399">200</font>, <font color="#009900">Req</font>),
+ {<font color="#FF6600">cowboy_loop</font>, <font color="#009900">Req2</font>, <font color="#009900">State</font>}<font color="#990000">.</font>
+
+<b><font color="#000000">info</font></b>(<font color="#FF6600">eof</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">stop</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>};
+<b><font color="#000000">info</font></b>({<font color="#FF6600">event</font>, <font color="#009900">Data</font>}, <font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#000000">cowboy_req:stream_body</font></b>(<font color="#009900">Data</font>, <font color="#FF6600">nofin</font>, <font color="#009900">Req</font>),
+ {<font color="#FF6600">ok</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>};
+<b><font color="#000000">info</font></b>(<font color="#009900">_Msg</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_cleaning_up">Cleaning up</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>It is recommended that you set the connection header to
-<code>close</code> when replying, as this process may be reused for
-a subsequent request.</p></div>
-<div class="paragraph"><p>Please refer to the <a href="../handlers">Handlers chapter</a>
-for general instructions about cleaning up.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>It is recommended that you set the connection header to <code>close</code> when replying, as this process may be reused for a subsequent request.</p>
+<p>Please refer to the <a href="../handlers">Handlers chapter</a> for general instructions about cleaning up.</p>
<h2 id="_hibernate">Hibernate</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>To save memory, you may hibernate the process in between
-messages received. This is done by returning the atom
-<code>hibernate</code> as part of the <code>loop</code> tuple callbacks normally
-return. Just add the atom at the end and Cowboy will hibernate
-accordingly.</p></div>
-</div>
-</div>
+<p>To save memory, you may hibernate the process in between messages received. This is done by returning the atom <code>hibernate</code> as part of the <code>loop</code> tuple callbacks normally return. Just add the atom at the end and Cowboy will hibernate accordingly.</p>
+
diff --git a/docs/en/cowboy/2.3/guide/middlewares/index.html b/docs/en/cowboy/2.3/guide/middlewares/index.html
index a02ce678..6dbf8869 100644
--- a/docs/en/cowboy/2.3/guide/middlewares/index.html
+++ b/docs/en/cowboy/2.3/guide/middlewares/index.html
@@ -62,92 +62,38 @@
<h1 class="lined-header"><span>Middlewares</span></h1>
-<div class="paragraph"><p>Cowboy delegates the request processing to middleware components.
-By default, two middlewares are defined, for the routing and handling
-of the request, as is detailed in most of this guide.</p></div>
-<div class="paragraph"><p>Middlewares give you complete control over how requests are to be
-processed. You can add your own middlewares to the mix or completely
-change the chain of middlewares as needed.</p></div>
-<div class="paragraph"><p>Cowboy will execute all middlewares in the given order, unless one
-of them decides to stop processing.</p></div>
-<div class="sect1">
+<p>Cowboy delegates the request processing to middleware components. By default, two middlewares are defined, for the routing and handling of the request, as is detailed in most of this guide.</p>
+<p>Middlewares give you complete control over how requests are to be processed. You can add your own middlewares to the mix or completely change the chain of middlewares as needed.</p>
+<p>Cowboy will execute all middlewares in the given order, unless one of them decides to stop processing.</p>
<h2 id="_usage">Usage</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Middlewares only need to implement a single callback: <code>execute/2</code>.
-It is defined in the <code>cowboy_middleware</code> behavior.</p></div>
-<div class="paragraph"><p>This callback has two arguments. The first is the <code>Req</code> object.
-The second is the environment.</p></div>
-<div class="paragraph"><p>Middlewares can return one of three different values:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<code>{ok, Req, Env}</code> to continue the request processing
-</p>
+<p>Middlewares only need to implement a single callback: <code>execute/2</code>. It is defined in the <code>cowboy_middleware</code> behavior.</p>
+<p>This callback has two arguments. The first is the <code>Req</code> object. The second is the environment.</p>
+<p>Middlewares can return one of three different values:</p>
+<ul><li><code>{ok, Req, Env}</code> to continue the request processing
</li>
-<li>
-<p>
-<code>{suspend, Module, Function, Args}</code> to hibernate
-</p>
+<li><code>{suspend, Module, Function, Args}</code> to hibernate
</li>
-<li>
-<p>
-<code>{stop, Req}</code> to stop processing and move on to the next request
-</p>
+<li><code>{stop, Req}</code> to stop processing and move on to the next request
</li>
-</ul></div>
-<div class="paragraph"><p>Of note is that when hibernating, processing will resume on the given
-MFA, discarding all previous stacktrace. Make sure you keep the <code>Req</code>
-and <code>Env</code> in the arguments of this MFA for later use.</p></div>
-<div class="paragraph"><p>If an error happens during middleware processing, Cowboy will not try
-to send an error back to the socket, the process will just crash. It
-is up to the middleware to make sure that a reply is sent if something
-goes wrong.</p></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
+<p>Of note is that when hibernating, processing will resume on the given MFA, discarding all previous stacktrace. Make sure you keep the <code>Req</code> and <code>Env</code> in the arguments of this MFA for later use.</p>
+<p>If an error happens during middleware processing, Cowboy will not try to send an error back to the socket, the process will just crash. It is up to the middleware to make sure that a reply is sent if something goes wrong.</p>
<h2 id="_configuration">Configuration</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The middleware environment is defined as the <code>env</code> protocol option.
-In the previous chapters we saw it briefly when we needed to pass
-the routing information. It is a list of tuples with the first
-element being an atom and the second any Erlang term.</p></div>
-<div class="paragraph"><p>Two values in the environment are reserved:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<code>listener</code> contains the name of the listener
-</p>
+<p>The middleware environment is defined as the <code>env</code> protocol option. In the previous chapters we saw it briefly when we needed to pass the routing information. It is a list of tuples with the first element being an atom and the second any Erlang term.</p>
+<p>Two values in the environment are reserved:</p>
+<ul><li><code>listener</code> contains the name of the listener
</li>
-<li>
-<p>
-<code>result</code> contains the result of the processing
-</p>
+<li><code>result</code> contains the result of the processing
</li>
-</ul></div>
-<div class="paragraph"><p>The <code>listener</code> value is always defined. The <code>result</code> value can be
-set by any middleware. If set to anything other than <code>ok</code>, Cowboy
-will not process any subsequent requests on this connection.</p></div>
-<div class="paragraph"><p>The middlewares that come with Cowboy may define or require other
-environment values to perform.</p></div>
-<div class="paragraph"><p>You can update the environment by calling the <code>cowboy:set_env/3</code>
-convenience function, adding or replacing a value in the environment.</p></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
+<p>The <code>listener</code> value is always defined. The <code>result</code> value can be set by any middleware. If set to anything other than <code>ok</code>, Cowboy will not process any subsequent requests on this connection.</p>
+<p>The middlewares that come with Cowboy may define or require other environment values to perform.</p>
+<p>You can update the environment by calling the <code>cowboy:set_env/3</code> convenience function, adding or replacing a value in the environment.</p>
<h2 id="_routing_middleware">Routing middleware</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The routing middleware requires the <code>dispatch</code> value. If routing
-succeeds, it will put the handler name and options in the <code>handler</code>
-and <code>handler_opts</code> values of the environment, respectively.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The routing middleware requires the <code>dispatch</code> value. If routing succeeds, it will put the handler name and options in the <code>handler</code> and <code>handler_opts</code> values of the environment, respectively.</p>
<h2 id="_handler_middleware">Handler middleware</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The handler middleware requires the <code>handler</code> and <code>handler_opts</code>
-values. It puts the result of the request handling into <code>result</code>.</p></div>
-</div>
-</div>
+<p>The handler middleware requires the <code>handler</code> and <code>handler_opts</code> values. It puts the result of the request handling into <code>result</code>.</p>
+
diff --git a/docs/en/cowboy/2.3/guide/migrating_from_1.0/index.html b/docs/en/cowboy/2.3/guide/migrating_from_1.0/index.html
index c284d717..b8a30584 100644
--- a/docs/en/cowboy/2.3/guide/migrating_from_1.0/index.html
+++ b/docs/en/cowboy/2.3/guide/migrating_from_1.0/index.html
@@ -62,388 +62,120 @@
<h1 class="lined-header"><span>Migrating from Cowboy 1.0 to 2.0</span></h1>
-<div class="paragraph"><p>A lot has changed between Cowboy 1.0 and 2.0. The <code>cowboy_req</code>
-interface in particular has seen a massive revamp. Hooks are
-gone, their functionality can now be achieved via stream
-handlers.</p></div>
-<div class="paragraph"><p>The documentation has seen great work, in particular the
-manual. Each module and each function now has its own dedicated
-manual page with full details and examples.</p></div>
-<div class="sect1">
+<p>A lot has changed between Cowboy 1.0 and 2.0. The <code>cowboy_req</code> interface in particular has seen a massive revamp. Hooks are gone, their functionality can now be achieved via stream handlers.</p>
+<p>The documentation has seen great work, in particular the manual. Each module and each function now has its own dedicated manual page with full details and examples.</p>
<h2 id="_compatibility">Compatibility</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Compatibility with Erlang/OTP R16, 17 and 18 has been dropped.
-Erlang/OTP 19.0 or above is required. It is non-trivial to
-make Cowboy 2.0 work with older Erlang/OTP versions.</p></div>
-<div class="paragraph"><p>Cowboy 2.0 is not compatible with Cowlib versions older than
-2.0. It should be compatible with Ranch 1.0 or above, however
-it has not been tested with Ranch versions older than 1.4.</p></div>
-<div class="paragraph"><p>Cowboy 2.0 is tested on Arch Linux, Ubuntu, FreeBSD, Windows
-and OSX. It is tested with every point release (latest patch
-release) and also with HiPE on the most recent release.</p></div>
-<div class="paragraph"><p>Cowboy 2.0 now comes with Erlang.mk templates.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Compatibility with Erlang/OTP R16, 17 and 18 has been dropped. Erlang/OTP 19.0 or above is required. It is non-trivial to make Cowboy 2.0 work with older Erlang/OTP versions.</p>
+<p>Cowboy 2.0 is not compatible with Cowlib versions older than 2.0. It should be compatible with Ranch 1.0 or above, however it has not been tested with Ranch versions older than 1.4.</p>
+<p>Cowboy 2.0 is tested on Arch Linux, Ubuntu, FreeBSD, Windows and OSX. It is tested with every point release (latest patch release) and also with HiPE on the most recent release.</p>
+<p>Cowboy 2.0 now comes with Erlang.mk templates.</p>
<h2 id="_features_added">Features added</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-The HTTP/2 protocol is now supported.
-</p>
-</li>
-<li>
-<p>
-Cowboy no longer uses only one process per connection.
- It now uses one process per connection plus one process
- per request by default. This is necessary for HTTP/2.
- There might be a slight drop in performance for HTTP/1.1
- connections due to this change.
-</p>
-</li>
-<li>
-<p>
-Cowboy internals have largely been reworked in order to
- support HTTP/2. This opened the way to stream handlers,
- which are a chain of modules that are called whenever
- something happens relating to a request/response.
-</p>
-</li>
-<li>
-<p>
-The <code>cowboy_stream_h</code> stream handler has been added.
- It provides most of Cowboy&#8217;s default behavior.
-</p>
-</li>
-<li>
-<p>
-The <code>cowboy_compress_h</code> stream handler has been added.
- It compresses responses when possible. It&#8217;s worth noting
- that it compresses in more cases than Cowboy 1.0 ever did.
-</p>
-</li>
-<li>
-<p>
-Because of the many changes in the internals of Cowboy,
- many options have been added or modified. Of note is that
- the Websocket options are now given per handler rather
- than for the entire listener.
-</p>
-</li>
-<li>
-<p>
-Websocket permessage-deflate compression is now supported
- via the <code>compress</code> option.
-</p>
-</li>
-<li>
-<p>
-Static file handlers will now correctly find files found
- in <em>.ez</em> archives.
-</p>
-</li>
-<li>
-<p>
-Constraints have been generalized and are now used not only
- in the router but also in some <code>cowboy_req</code> functions. Their
- interface has also been modified to allow for reverse
- operations and formatting of errors.
-</p>
-</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+<ul><li>The HTTP/2 protocol is now supported.
+</li>
+<li>Cowboy no longer uses only one process per connection. It now uses one process per connection plus one process per request by default. This is necessary for HTTP/2. There might be a slight drop in performance for HTTP/1.1 connections due to this change.
+</li>
+<li>Cowboy internals have largely been reworked in order to support HTTP/2. This opened the way to stream handlers, which are a chain of modules that are called whenever something happens relating to a request/response.
+</li>
+<li>The <code>cowboy_stream_h</code> stream handler has been added. It provides most of Cowboy&apos;s default behavior.
+</li>
+<li>The <code>cowboy_compress_h</code> stream handler has been added. It compresses responses when possible. It&apos;s worth noting that it compresses in more cases than Cowboy 1.0 ever did.
+</li>
+<li>Because of the many changes in the internals of Cowboy, many options have been added or modified. Of note is that the Websocket options are now given per handler rather than for the entire listener.
+</li>
+<li>Websocket permessage-deflate compression is now supported via the <code>compress</code> option.
+</li>
+<li>Static file handlers will now correctly find files found in <em>.ez</em> archives.
+</li>
+<li>Constraints have been generalized and are now used not only in the router but also in some <code>cowboy_req</code> functions. Their interface has also been modified to allow for reverse operations and formatting of errors.
+</li>
+</ul>
<h2 id="_features_removed">Features removed</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-SPDY support has been removed. Use HTTP/2 instead.
-</p>
-</li>
-<li>
-<p>
-Hooks have been removed. Use <a href="../streams">stream handlers</a> instead.
-</p>
-</li>
-<li>
-<p>
-The undocumented <code>waiting_stream</code> hack has been removed.
- It allowed disabling chunked transfer-encoding for HTTP/1.1.
- It has no equivalent in Cowboy 2.0. Open a ticket if necessary.
-</p>
-</li>
-<li>
-<p>
-Sub protocols still exist, but their interface has largely changed
- and they are no longer documented for the time being.
-</p>
-</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+<ul><li>SPDY support has been removed. Use HTTP/2 instead.
+</li>
+<li>Hooks have been removed. Use <a href="../streams">stream handlers</a> instead.
+</li>
+<li>The undocumented <code>waiting_stream</code> hack has been removed. It allowed disabling chunked transfer-encoding for HTTP/1.1. It has no equivalent in Cowboy 2.0. Open a ticket if necessary.
+</li>
+<li>Sub protocols still exist, but their interface has largely changed and they are no longer documented for the time being.
+</li>
+</ul>
<h2 id="_changed_behaviors">Changed behaviors</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-The handler behaviors have been renamed and are now <code>cowboy_handler</code>,
- <code>cowboy_loop</code>, <code>cowboy_rest</code> and <code>cowboy_websocket</code>.
-</p>
-</li>
-<li>
-<p>
-Plain HTTP, loop, REST and Websocket handlers have had their
- init and terminate callbacks unified. They now all use the
- <code>init/2</code> and <code>terminate/3</code> callbacks. The latter is now optional.
- The terminate reason has now been documented for all handlers.
-</p>
-</li>
-<li>
-<p>
-The tuple returned to switch to a different handler type has
- changed. It now takes the form <code>{Module, Req, State}</code> or
- <code>{Module, Req, State, Opts}</code>, where <code>Opts</code> is a map of options
- to configure the handler. The timeout and hibernate options
- must now be specified using this map, where applicable.
-</p>
-</li>
-<li>
-<p>
-All behaviors that used to accept <code>halt</code> or <code>shutdown</code> tuples
- as a return value no longer do so. The return value is now
- a <code>stop</code> tuple, consistent across Cowboy.
-</p>
-</li>
-<li>
-<p>
-Middlewares can no longer return an <code>error</code> tuple. They have
- to send the response and return a <code>stop</code> tuple instead.
-</p>
-</li>
-<li>
-<p>
-The <code>known_content_type</code> REST handler callback has been removed
- as it was found unnecessary.
-</p>
-</li>
-<li>
-<p>
-Websocket handlers have both the normal <code>init/2</code> and
- an optional <code>websocket_init/1</code> function. The reason for
- that exception is that the <code>websocket_*</code> callbacks execute
- in a separate process from the <code>init/2</code> callback, and it
- was therefore not obvious how timers or monitors should
- be setup properly. They are effectively initializing the
- handler before and after the HTTP/1.1 upgrade.
-</p>
-</li>
-<li>
-<p>
-Websocket handlers can now send frames directly from
- <code>websocket_init/1</code>. The frames will be sent immediately
- after the handshake.
-</p>
-</li>
-<li>
-<p>
-Websocket handler callbacks no longer receive the Req
- argument. The <code>init/2</code> callback still receives it and
- can be used to extract relevant information. The <code>terminate/3</code>
- callback, if implemented, may still receive the Req
- (see next bullet point).
-</p>
-</li>
-<li>
-<p>
-Websocket handlers have a new <code>req_filter</code> option that
- can be used to customize how much information should be
- discarded from the Req object after the handshake. Note
- that the Req object is only available in <code>terminate/3</code>
- past that point.
-</p>
-</li>
-<li>
-<p>
-Websocket handlers have their timeout default changed
- from infinity to 60 seconds.
-</p>
-</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+<ul><li>The handler behaviors have been renamed and are now <code>cowboy_handler</code>, <code>cowboy_loop</code>, <code>cowboy_rest</code> and <code>cowboy_websocket</code>.
+</li>
+<li>Plain HTTP, loop, REST and Websocket handlers have had their init and terminate callbacks unified. They now all use the <code>init/2</code> and <code>terminate/3</code> callbacks. The latter is now optional. The terminate reason has now been documented for all handlers.
+</li>
+<li>The tuple returned to switch to a different handler type has changed. It now takes the form <code>{Module, Req, State}</code> or <code>{Module, Req, State, Opts}</code>, where <code>Opts</code> is a map of options to configure the handler. The timeout and hibernate options must now be specified using this map, where applicable.
+</li>
+<li>All behaviors that used to accept <code>halt</code> or <code>shutdown</code> tuples as a return value no longer do so. The return value is now a <code>stop</code> tuple, consistent across Cowboy.
+</li>
+<li>Middlewares can no longer return an <code>error</code> tuple. They have to send the response and return a <code>stop</code> tuple instead.
+</li>
+<li>The <code>known_content_type</code> REST handler callback has been removed as it was found unnecessary.
+</li>
+<li>Websocket handlers have both the normal <code>init/2</code> and an optional <code>websocket_init/1</code> function. The reason for that exception is that the <code>websocket_*</code> callbacks execute in a separate process from the <code>init/2</code> callback, and it was therefore not obvious how timers or monitors should be setup properly. They are effectively initializing the handler before and after the HTTP/1.1 upgrade.
+</li>
+<li>Websocket handlers can now send frames directly from <code>websocket_init/1</code>. The frames will be sent immediately after the handshake.
+</li>
+<li>Websocket handler callbacks no longer receive the Req argument. The <code>init/2</code> callback still receives it and can be used to extract relevant information. The <code>terminate/3</code> callback, if implemented, may still receive the Req (see next bullet point).
+</li>
+<li>Websocket handlers have a new <code>req_filter</code> option that can be used to customize how much information should be discarded from the Req object after the handshake. Note that the Req object is only available in <code>terminate/3</code> past that point.
+</li>
+<li>Websocket handlers have their timeout default changed from infinity to 60 seconds.
+</li>
+</ul>
<h2 id="_new_functions">New functions</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-The <code>cowboy_req:scheme/1</code> function has been added.
-</p>
-</li>
-<li>
-<p>
-The <code>cowboy_req:uri/1,2</code> function has been added, replacing the
- less powerful functions <code>cowboy_req:url/1</code> and <code>cowboy_req:host_url/1</code>.
-</p>
-</li>
-<li>
-<p>
-The functions <code>cowboy_req:match_qs/2</code> and <code>cowboy_req:match_cookies/2</code>
- allow matching query string and cookies against constraints.
-</p>
-</li>
-<li>
-<p>
-The function <code>cowboy_req:set_resp_cookie/3</code> has been added to
- complement <code>cowboy_req:set_resp_cookie/4</code>.
-</p>
-</li>
-<li>
-<p>
-The functions <code>cowboy_req:resp_header/2,3</code> and <code>cowboy_req:resp_headers/1</code>
- have been added. They can be used to retrieve response headers
- that were previously set.
-</p>
-</li>
-<li>
-<p>
-The function <code>cowboy_req:set_resp_headers/2</code> has been added. It
- allows setting many response headers at once.
-</p>
-</li>
-<li>
-<p>
-The functions <code>cowboy_req:push/3,4</code> can be used to push resources
- for protocols that support it (by default only HTTP/2).
-</p>
-</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+<ul><li>The <code>cowboy_req:scheme/1</code> function has been added.
+</li>
+<li>The <code>cowboy_req:uri/1,2</code> function has been added, replacing the less powerful functions <code>cowboy_req:url/1</code> and <code>cowboy_req:host_url/1</code>.
+</li>
+<li>The functions <code>cowboy_req:match_qs/2</code> and <code>cowboy_req:match_cookies/2</code> allow matching query string and cookies against constraints.
+</li>
+<li>The function <code>cowboy_req:set_resp_cookie/3</code> has been added to complement <code>cowboy_req:set_resp_cookie/4</code>.
+</li>
+<li>The functions <code>cowboy_req:resp_header/2,3</code> and <code>cowboy_req:resp_headers/1</code> have been added. They can be used to retrieve response headers that were previously set.
+</li>
+<li>The function <code>cowboy_req:set_resp_headers/2</code> has been added. It allows setting many response headers at once.
+</li>
+<li>The functions <code>cowboy_req:push/3,4</code> can be used to push resources for protocols that support it (by default only HTTP/2).
+</li>
+</ul>
<h2 id="_changed_functions">Changed functions</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-The <code>cowboy:start_http/4</code> function was renamed to <code>cowboy:start_clear/3</code>.
-</p>
-</li>
-<li>
-<p>
-The <code>cowboy:start_https/4</code> function was renamed to <code>cowboy:start_tls/3</code>.
-</p>
-</li>
-<li>
-<p>
-Most, if not all, functions in the <code>cowboy_req</code> module have been modified.
- Please consult the changelog of each individual functions. The changes
- are mainly about simplifying and clarifying the interface. The Req is no
- longer returned when not necessary, maps are used wherever possible,
- and some functions have been renamed.
-</p>
-</li>
-<li>
-<p>
-The position of the <code>Opts</code> argument for <code>cowboy_req:set_resp_cookie/4</code>
- has changed to improve consistency. It is now the last argument.
-</p>
-</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+<ul><li>The <code>cowboy:start_http/4</code> function was renamed to <code>cowboy:start_clear/3</code>.
+</li>
+<li>The <code>cowboy:start_https/4</code> function was renamed to <code>cowboy:start_tls/3</code>.
+</li>
+<li>Most, if not all, functions in the <code>cowboy_req</code> module have been modified. Please consult the changelog of each individual functions. The changes are mainly about simplifying and clarifying the interface. The Req is no longer returned when not necessary, maps are used wherever possible, and some functions have been renamed.
+</li>
+<li>The position of the <code>Opts</code> argument for <code>cowboy_req:set_resp_cookie/4</code> has changed to improve consistency. It is now the last argument.
+</li>
+</ul>
<h2 id="_removed_functions">Removed functions</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-The functions <code>cowboy_req:url/1</code> and <code>cowboy_req:host_url/1</code> have been
- removed in favor of the new function <code>cowboy_req:uri/1,2</code>.
-</p>
-</li>
-<li>
-<p>
-The functions <code>cowboy_req:meta/2,3</code> and <code>cowboy_req:set_meta/3</code> have
- been removed. The Req object is now a public map, therefore they became
- unnecessary.
-</p>
-</li>
-<li>
-<p>
-The functions <code>cowboy_req:set_resp_body_fun/2,3</code> have been removed.
- For sending files, the function <code>cowboy_req:set_resp_body/2</code> can now
- take a sendfile tuple.
-</p>
-</li>
-<li>
-<p>
-Remove many undocumented functions from <code>cowboy_req</code>, including the
- functions <code>cowboy_req:get/2</code> and <code>cowboy_req:set/3</code>.
-</p>
-</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+<ul><li>The functions <code>cowboy_req:url/1</code> and <code>cowboy_req:host_url/1</code> have been removed in favor of the new function <code>cowboy_req:uri/1,2</code>.
+</li>
+<li>The functions <code>cowboy_req:meta/2,3</code> and <code>cowboy_req:set_meta/3</code> have been removed. The Req object is now a public map, therefore they became unnecessary.
+</li>
+<li>The functions <code>cowboy_req:set_resp_body_fun/2,3</code> have been removed. For sending files, the function <code>cowboy_req:set_resp_body/2</code> can now take a sendfile tuple.
+</li>
+<li>Remove many undocumented functions from <code>cowboy_req</code>, including the functions <code>cowboy_req:get/2</code> and <code>cowboy_req:set/3</code>.
+</li>
+</ul>
<h2 id="_other_changes">Other changes</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-The correct percent-decoding algorithm is now used for path elements
- during routing. It will no longer decode <code>+</code> characters.
-</p>
-</li>
-<li>
-<p>
-The router will now properly handle path segments <code>.</code> and <code>..</code>.
-</p>
-</li>
-<li>
-<p>
-Routing behavior has changed for URIs containing latin1 characters.
- They are no longer allowed. URIs are expected to be in UTF-8 once
- they are percent-decoded.
-</p>
-</li>
-<li>
-<p>
-Clients that send multiple headers of the same name
- will have the values of those headers concatenated into a
- comma-separated list. This is of special importance in the
- case of the content-type header, as previously only the
- first value was used in the <code>content_types_accepted/2</code> step
- in REST handlers.
-</p>
-</li>
-<li>
-<p>
-Etag comparison in REST handlers has been fixed. Some requests may
- now fail when they succeeded in the past.
-</p>
-</li>
-<li>
-<p>
-The <code>If-*-Since</code> headers are now ignored in REST handlers if
- the corresponding <code>If*-Match</code> header exist. The former is
- largely a backward compatible header and this shouldn&#8217;t create
- any issue. The new behavior follows the current RFCs more closely.
-</p>
-</li>
-<li>
-<p>
-The static file handler has been improved to handle more special
- characters on systems that accept them.
-</p>
-</li>
-</ul></div>
-</div>
-</div>
+<ul><li>The correct percent-decoding algorithm is now used for path elements during routing. It will no longer decode <code>+</code> characters.
+</li>
+<li>The router will now properly handle path segments <code>.</code> and <code>..</code>.
+</li>
+<li>Routing behavior has changed for URIs containing latin1 characters. They are no longer allowed. URIs are expected to be in UTF-8 once they are percent-decoded.
+</li>
+<li>Clients that send multiple headers of the same name will have the values of those headers concatenated into a comma-separated list. This is of special importance in the case of the content-type header, as previously only the first value was used in the <code>content_types_accepted/2</code> step in REST handlers.
+</li>
+<li>Etag comparison in REST handlers has been fixed. Some requests may now fail when they succeeded in the past.
+</li>
+<li>The <code>If-*-Since</code> headers are now ignored in REST handlers if the corresponding <code>If*-Match</code> header exist. The former is largely a backward compatible header and this shouldn&apos;t create any issue. The new behavior follows the current RFCs more closely.
+</li>
+<li>The static file handler has been improved to handle more special characters on systems that accept them.
+</li>
+</ul>
+
diff --git a/docs/en/cowboy/2.3/guide/migrating_from_2.0/index.html b/docs/en/cowboy/2.3/guide/migrating_from_2.0/index.html
index d547b8c6..fa7978d1 100644
--- a/docs/en/cowboy/2.3/guide/migrating_from_2.0/index.html
+++ b/docs/en/cowboy/2.3/guide/migrating_from_2.0/index.html
@@ -62,188 +62,55 @@
<h1 class="lined-header"><span>Migrating from Cowboy 2.0 to 2.1</span></h1>
-<div class="paragraph"><p>Cowboy 2.1 focused on adding features that were temporarily
-removed in Cowboy 2.0. A number of bugs found in the 2.0
-release were also fixed.</p></div>
-<div class="sect1">
+<p>Cowboy 2.1 focused on adding features that were temporarily removed in Cowboy 2.0. A number of bugs found in the 2.0 release were also fixed.</p>
<h2 id="_features_added">Features added</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-It is now possible to obtain the client TLS certificate
- and the local IP/port for the connection from the Req object.
-</p>
+<ul><li>It is now possible to obtain the client TLS certificate and the local IP/port for the connection from the Req object.
</li>
-<li>
-<p>
-Informational responses (1XX responses) can now be sent.
- They must be sent before initiating the final response.
-</p>
+<li>Informational responses (1XX responses) can now be sent. They must be sent before initiating the final response.
</li>
-<li>
-<p>
-The <code>expect: 100-continue</code> header is now handled
- automatically. The 100 response will be sent on the
- first <code>cowboy_req:read_body/2,3,4</code> call. This only applies
- when using the default <code>cowboy_stream_h</code> stream handler.
-</p>
+<li>The <code>expect: 100-continue</code> header is now handled automatically. The 100 response will be sent on the first <code>cowboy_req:read_body/2,3,4</code> call. This only applies when using the default <code>cowboy_stream_h</code> stream handler.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_experimental_features_added">Experimental features added</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Experimental features are previews of features that will be
-added in a future release. They are not documented and their
-interface may change at any time. You are welcome to try them
-and provide feedback.</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-The <code>cowboy_metrics_h</code> stream handler can be used to
- extract metrics out of Cowboy. It must be used first in
- the list of stream handlers, and will record all events
- related to requests, responses and spawned processes.
- When the stream terminates it will pass this information
- to a user-defined callback.
-</p>
+<p>Experimental features are previews of features that will be added in a future release. They are not documented and their interface may change at any time. You are welcome to try them and provide feedback.</p>
+<ul><li>The <code>cowboy_metrics_h</code> stream handler can be used to extract metrics out of Cowboy. It must be used first in the list of stream handlers, and will record all events related to requests, responses and spawned processes. When the stream terminates it will pass this information to a user-defined callback.
</li>
-<li>
-<p>
-The <code>cowboy_tracer_h</code> stream handler can be used to setup
- automatic tracing of specific requests. You can conditionally
- enable tracing based on a function, header, path or any other
- element from the request and the trace will apply to the
- entire connection and any processes created by it. This is
- meant to be used for debugging both in tests and production.
-</p>
+<li>The <code>cowboy_tracer_h</code> stream handler can be used to setup automatic tracing of specific requests. You can conditionally enable tracing based on a function, header, path or any other element from the request and the trace will apply to the entire connection and any processes created by it. This is meant to be used for debugging both in tests and production.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_changed_behaviors">Changed behaviors</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-The <code>cowboy_rest</code> handler now implements a mechanism for
- switching to a different type of handler from any callback
- where <code>stop</code> is also allowed. Switch by returning
- <code>{switch_handler, Module}</code> or <code>{switch_handler, Module, Opts}</code>.
- This is especially useful for switching to <code>cowboy_loop</code>
- for streaming the request or response body.
-</p>
+<ul><li>The <code>cowboy_rest</code> handler now implements a mechanism for switching to a different type of handler from any callback where <code>stop</code> is also allowed. Switch by returning <code>{switch_handler, Module}</code> or <code>{switch_handler, Module, Opts}</code>. This is especially useful for switching to <code>cowboy_loop</code> for streaming the request or response body.
</li>
-<li>
-<p>
-REST callbacks that do not allow <code>stop</code> as a return value
- are now explicitly listed in the documentation.
-</p>
+<li>REST callbacks that do not allow <code>stop</code> as a return value are now explicitly listed in the documentation.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_new_functions">New functions</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-The function <code>cowboy_req:sock/1</code> returns the IP/port
- of the local socket.
-</p>
+<ul><li>The function <code>cowboy_req:sock/1</code> returns the IP/port of the local socket.
</li>
-<li>
-<p>
-The function <code>cowboy_req:cert/1</code> returns the client
- TLS certificate or <code>undefined</code> if it isn&#8217;t available.
-</p>
+<li>The function <code>cowboy_req:cert/1</code> returns the client TLS certificate or <code>undefined</code> if it isn&apos;t available.
</li>
-<li>
-<p>
-The function <code>cowboy_req:inform/2,3</code> sends an
- informational response.
-</p>
+<li>The function <code>cowboy_req:inform/2,3</code> sends an informational response.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_bugs_fixed">Bugs fixed</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-Ensure HTTP/2 connections are not closed prematurely
- when the user code does not read the request body.
-</p>
+<ul><li>Ensure HTTP/2 connections are not closed prematurely when the user code does not read the request body.
</li>
-<li>
-<p>
-Ensure HTTP/1.1 streams are not terminated too early.
- Their behavior is now consistent with the HTTP/2 code
- where the stream handler is only terminated when the
- <code>stop</code> command is returned.
-</p>
+<li>Ensure HTTP/1.1 streams are not terminated too early. Their behavior is now consistent with the HTTP/2 code where the stream handler is only terminated when the <code>stop</code> command is returned.
</li>
-<li>
-<p>
-Sending zero-sized data from stream handlers or from
- <code>cowboy_req:stream_body/3</code> could lead to issues with
- HTTP/1.1. This has been fixed.
-</p>
+<li>Sending zero-sized data from stream handlers or from <code>cowboy_req:stream_body/3</code> could lead to issues with HTTP/1.1. This has been fixed.
</li>
-<li>
-<p>
-The final chunk sent by Cowboy when it terminates a
- chunked body after the handler process exits was not
- passed through stream handlers, which could lead to
- issues when <code>cowboy_compress_h</code> was being used. This
- is now corrected.
-</p>
+<li>The final chunk sent by Cowboy when it terminates a chunked body after the handler process exits was not passed through stream handlers, which could lead to issues when <code>cowboy_compress_h</code> was being used. This is now corrected.
</li>
-<li>
-<p>
-The stream handler state was discarded in some cases
- where Cowboy had to send a response or response data
- automatically when ending a stream. This has now
- been corrected.
-</p>
+<li>The stream handler state was discarded in some cases where Cowboy had to send a response or response data automatically when ending a stream. This has now been corrected.
</li>
-<li>
-<p>
-The stream handler callback <code>terminate/3</code> will now be
- called when switching to another protocol using the
- command <code>switch_protocol</code>. This doesn&#8217;t apply when
- doing upgrades to HTTP/2 as those occur before the
- stream is initialized.
-</p>
+<li>The stream handler callback <code>terminate/3</code> will now be called when switching to another protocol using the command <code>switch_protocol</code>. This doesn&apos;t apply when doing upgrades to HTTP/2 as those occur before the stream is initialized.
</li>
-<li>
-<p>
-Cowlib has been updated to 2.0.1 to fix an issue with
- Websocket compression when using Erlang/OTP 20.1. Note
- that at the time of writing all 20.1 versions (from
- 20.1 to 20.1.4) have issues when compression is enabled.
- It is expected to work properly from 20.1.5 onward. In
- the meantime it is recommended to run the plain 20.1
- release and disable Websocket compression, or use a
- release before 20.1.
-</p>
+<li>Cowlib has been updated to 2.0.1 to fix an issue with Websocket compression when using Erlang/OTP 20.1. Note that at the time of writing all 20.1 versions (from 20.1 to 20.1.4) have issues when compression is enabled. It is expected to work properly from 20.1.5 onward. In the meantime it is recommended to run the plain 20.1 release and disable Websocket compression, or use a release before 20.1.
</li>
-<li>
-<p>
-Cowboy will no longer crash when the <code>cowboy_clock</code>
- process is not running. This can happen when Cowboy
- is being restarted during upgrades, for example.
-</p>
+<li>Cowboy will no longer crash when the <code>cowboy_clock</code> process is not running. This can happen when Cowboy is being restarted during upgrades, for example.
</li>
-</ul></div>
-</div>
-</div>
+</ul>
+
diff --git a/docs/en/cowboy/2.3/guide/migrating_from_2.1/index.html b/docs/en/cowboy/2.3/guide/migrating_from_2.1/index.html
index 6d6fed21..364c295f 100644
--- a/docs/en/cowboy/2.3/guide/migrating_from_2.1/index.html
+++ b/docs/en/cowboy/2.3/guide/migrating_from_2.1/index.html
@@ -62,203 +62,66 @@
<h1 class="lined-header"><span>Migrating from Cowboy 2.1 to 2.2</span></h1>
-<div class="paragraph"><p>Cowboy 2.2 focused on adding features required for writing
-gRPC servers and on completing test suites for the core
-HTTP RFCs, fixing many bugs along the way.</p></div>
-<div class="sect1">
+<p>Cowboy 2.2 focused on adding features required for writing gRPC servers and on completing test suites for the core HTTP RFCs, fixing many bugs along the way.</p>
<h2 id="_features_added">Features added</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-Add support for sending trailers at the end of response bodies.
- Trailers are additional header fields that may be sent after the
- body to add more information to the response. Their usage is
- required in gRPC servers. They are optional and may be discarded
- in other scenarios (for example if the request goes through an
- HTTP/1.0 proxy, as HTTP/1.0 does not support trailers).
-</p>
+<ul><li>Add support for sending trailers at the end of response bodies. Trailers are additional header fields that may be sent after the body to add more information to the response. Their usage is required in gRPC servers. They are optional and may be discarded in other scenarios (for example if the request goes through an HTTP/1.0 proxy, as HTTP/1.0 does not support trailers).
</li>
-<li>
-<p>
-The <code>max_skip_body_length</code> option was added to <code>cowboy_http</code>.
- It controls how much of a request body Cowboy is willing to skip
- when the handler did not touch it. If the remaining body size is
- too large Cowboy instead closes the connection. It defaults to 1MB.
-</p>
+<li>The <code>max_skip_body_length</code> option was added to <code>cowboy_http</code>. It controls how much of a request body Cowboy is willing to skip when the handler did not touch it. If the remaining body size is too large Cowboy instead closes the connection. It defaults to 1MB.
</li>
-<li>
-<p>
-The CONNECT and TRACE methods are now rejected as they are
- currently not implemented and must be handled differently than
- other methods. They will be implemented in a future release.
-</p>
+<li>The CONNECT and TRACE methods are now rejected as they are currently not implemented and must be handled differently than other methods. They will be implemented in a future release.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_new_functions">New functions</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-The function <code>stream_trailers/2</code> has been added. It terminates
- a stream and adds trailer fields at the end of the response. A
- corresponding stream handler command <code>{trailers, Trailers}</code>
- has also been added.
-</p>
+<ul><li>The function <code>stream_trailers/2</code> has been added. It terminates a stream and adds trailer fields at the end of the response. A corresponding stream handler command <code>{trailers, Trailers}</code> has also been added.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_bugs_fixed">Bugs fixed</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-Test suites for the core HTTP RFCs RFC7230, RFC7231 and RFC7540
- have been completed. Many of the bugs listed here were fixed as
- a result of this work.
-</p>
+<ul><li>Test suites for the core HTTP RFCs RFC7230, RFC7231 and RFC7540 have been completed. Many of the bugs listed here were fixed as a result of this work.
</li>
-<li>
-<p>
-Many HTTP/2 edge cases when clients are misbehaving have been
- corrected. This includes many cases where the request is malformed
- (for example when a pseudo-header is present twice).
-</p>
+<li>Many HTTP/2 edge cases when clients are misbehaving have been corrected. This includes many cases where the request is malformed (for example when a pseudo-header is present twice).
</li>
-<li>
-<p>
-When the HTTP/2 SETTINGS_INITIAL_WINDOW_SIZE value changes,
- Cowboy now properly updates the flow control windows.
-</p>
+<li>When the HTTP/2 SETTINGS_INITIAL_WINDOW_SIZE value changes, Cowboy now properly updates the flow control windows.
</li>
-<li>
-<p>
-HTTP/2 could mistakenly log stray messages that actually were
- expected. This is no longer the case.
-</p>
+<li>HTTP/2 could mistakenly log stray messages that actually were expected. This is no longer the case.
</li>
-<li>
-<p>
-We no longer send a GOAWAY frame when the HTTP/2 preface is invalid.
-</p>
+<li>We no longer send a GOAWAY frame when the HTTP/2 preface is invalid.
</li>
-<li>
-<p>
-Some values in the Req object of pushed requests were in the
- wrong type. They are now the expected binary instead of iolist.
-</p>
+<li>Some values in the Req object of pushed requests were in the wrong type. They are now the expected binary instead of iolist.
</li>
-<li>
-<p>
-A response body was sometimes sent in response to HEAD requests
- when using HTTP/2. The body is now ignored.
-</p>
+<li>A response body was sometimes sent in response to HEAD requests when using HTTP/2. The body is now ignored.
</li>
-<li>
-<p>
-The <code>max_headers</code> option for <code>cowboy_http</code> was not always respected
- depending on the contents of the buffer. The limit is now strict.
-</p>
+<li>The <code>max_headers</code> option for <code>cowboy_http</code> was not always respected depending on the contents of the buffer. The limit is now strict.
</li>
-<li>
-<p>
-When an early error occurred on the HTTP/1.1 request line, the
- partial Req given to stream handlers was missing the <code>ref</code> and
- <code>peer</code> information. This has been corrected.
-</p>
+<li>When an early error occurred on the HTTP/1.1 request line, the partial Req given to stream handlers was missing the <code>ref</code> and <code>peer</code> information. This has been corrected.
</li>
-<li>
-<p>
-Absolute URIs with a userinfo component, or without an authority
- component, are now properly rejected for HTTP/1.0 and HTTP/1.1.
-</p>
+<li>Absolute URIs with a userinfo component, or without an authority component, are now properly rejected for HTTP/1.0 and HTTP/1.1.
</li>
-<li>
-<p>
-Whitespace is no longer allowed in header lines before the colon.
-</p>
+<li>Whitespace is no longer allowed in header lines before the colon.
</li>
-<li>
-<p>
-408 responses to HTTP/1.1 requests now properly include a
- connection: close header indicating that we are going to
- close the connection. This header will also be sent for
- other early errors resulting in the closing of the connection.
-</p>
+<li>408 responses to HTTP/1.1 requests now properly include a connection: close header indicating that we are going to close the connection. This header will also be sent for other early errors resulting in the closing of the connection.
</li>
-<li>
-<p>
-When both the transfer-encoding and content-length headers are
- sent in an HTTP/1.1 request, the transfer-encoding now takes
- precedence over the content-length header and the latter is
- removed from the Req object.
-</p>
+<li>When both the transfer-encoding and content-length headers are sent in an HTTP/1.1 request, the transfer-encoding now takes precedence over the content-length header and the latter is removed from the Req object.
</li>
-<li>
-<p>
-A 400 response is now returned when the transfer-encoding
- header is invalid or contains any transfer-coding other
- than chunked.
-</p>
+<li>A 400 response is now returned when the transfer-encoding header is invalid or contains any transfer-coding other than chunked.
</li>
-<li>
-<p>
-Invalid chunk sizes are now rejected immediately.
-</p>
+<li>Invalid chunk sizes are now rejected immediately.
</li>
-<li>
-<p>
-Chunk extensions are now limited to 129 characters. They are
- not used in practice and are still ignored by Cowboy. The limit
- is not configurable.
-</p>
+<li>Chunk extensions are now limited to 129 characters. They are not used in practice and are still ignored by Cowboy. The limit is not configurable.
</li>
-<li>
-<p>
-The final chunk was mistakenly sent in responses to HEAD
- requests. This is now corrected.
-</p>
+<li>The final chunk was mistakenly sent in responses to HEAD requests. This is now corrected.
</li>
-<li>
-<p>
-<code>OPTIONS *</code> requests were broken in Cowboy 2.0. They are now
- working again. Both the routing and <code>cowboy_req:uri/1,2</code> have
- been corrected.
-</p>
+<li><code>OPTIONS *</code> requests were broken in Cowboy 2.0. They are now working again. Both the routing and <code>cowboy_req:uri/1,2</code> have been corrected.
</li>
-<li>
-<p>
-204 responses no longer include a content-length header.
-</p>
+<li>204 responses no longer include a content-length header.
</li>
-<li>
-<p>
-A packet could be lost when switching to Websocket or any
- other protocol via the <code>switch_protocol</code> command. This is
- now fixed.
-</p>
+<li>A packet could be lost when switching to Websocket or any other protocol via the <code>switch_protocol</code> command. This is now fixed.
</li>
-<li>
-<p>
-A 426 response will now be sent when a handler requires
- the client to upgrade to Websocket and the request did not
- include the required headers.
-</p>
+<li>A 426 response will now be sent when a handler requires the client to upgrade to Websocket and the request did not include the required headers.
</li>
-<li>
-<p>
-Both experimental stream handlers <code>cowboy_metrics_h</code> and
- <code>cowboy_tracer_h</code> received a number of fixes and improvements.
-</p>
+<li>Both experimental stream handlers <code>cowboy_metrics_h</code> and <code>cowboy_tracer_h</code> received a number of fixes and improvements.
</li>
-</ul></div>
-</div>
-</div>
+</ul>
+
diff --git a/docs/en/cowboy/2.3/guide/migrating_from_2.2/index.html b/docs/en/cowboy/2.3/guide/migrating_from_2.2/index.html
index ced40d21..95aea629 100644
--- a/docs/en/cowboy/2.3/guide/migrating_from_2.2/index.html
+++ b/docs/en/cowboy/2.3/guide/migrating_from_2.2/index.html
@@ -62,108 +62,38 @@
<h1 class="lined-header"><span>Migrating from Cowboy 2.2 to 2.3</span></h1>
-<div class="paragraph"><p>Cowboy 2.3 focused on making the Cowboy processes behave
-properly according to OTP principles. This version is a
-very good milestone toward that goal and most of everything
-should now work. Release upgrades and a few details will
-be improved in future versions.</p></div>
-<div class="sect1">
+<p>Cowboy 2.3 focused on making the Cowboy processes behave properly according to OTP principles. This version is a very good milestone toward that goal and most of everything should now work. Release upgrades and a few details will be improved in future versions.</p>
<h2 id="_features_added">Features added</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-Add support for all functions from the module <code>sys</code>. Note
- that Cowboy currently does not implement the <code>sys</code> debugging
- mechanisms as tracing is recommended instead.
-</p>
+<ul><li>Add support for all functions from the module <code>sys</code>. Note that Cowboy currently does not implement the <code>sys</code> debugging mechanisms as tracing is recommended instead.
</li>
-<li>
-<p>
-Add a <code>max_frame_size</code> option for Websocket handlers
- to close the connection when the client attempts to
- send a frame that&#8217;s too large. It currently defaults
- to <code>infinity</code> to avoid breaking existing code but will
- be changed in a future version.
-</p>
+<li>Add a <code>max_frame_size</code> option for Websocket handlers to close the connection when the client attempts to send a frame that&apos;s too large. It currently defaults to <code>infinity</code> to avoid breaking existing code but will be changed in a future version.
</li>
-<li>
-<p>
-Update Cowlib to 2.2.1.
-</p>
+<li>Update Cowlib to 2.2.1.
</li>
-<li>
-<p>
-Add support for the 308 status code and a test suite
- for RFC7538 where it is defined.
-</p>
+<li>Add support for the 308 status code and a test suite for RFC7538 where it is defined.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_bugs_fixed">Bugs fixed</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-Ensure timeout options accept the value <code>infinity</code> as
- documented.
-</p>
+<ul><li>Ensure timeout options accept the value <code>infinity</code> as documented.
</li>
-<li>
-<p>
-Properly reject HTTP/2 requests with an invalid content-length
- header instead of simply crashing.
-</p>
+<li>Properly reject HTTP/2 requests with an invalid content-length header instead of simply crashing.
</li>
-<li>
-<p>
-When switching from HTTP/1.1 to Websocket or user protocols
- all the messages in the mailbox were flushed. Only messages
- specific to <code>cowboy_http</code> should now be flushed.
-</p>
+<li>When switching from HTTP/1.1 to Websocket or user protocols all the messages in the mailbox were flushed. Only messages specific to <code>cowboy_http</code> should now be flushed.
</li>
-<li>
-<p>
-Parsing of the x-forwarded-for header has been corrected.
- It now supports IPv6 addresses both with and without port.
-</p>
+<li>Parsing of the x-forwarded-for header has been corrected. It now supports IPv6 addresses both with and without port.
</li>
-<li>
-<p>
-Websocket subprotocol tokens are now parsed in a case
- insensitive manner, according to the spec.
-</p>
+<li>Websocket subprotocol tokens are now parsed in a case insensitive manner, according to the spec.
</li>
-<li>
-<p>
-Cookies without values are now allowed. For example <code>Cookie: foo</code>.
-</p>
+<li>Cookies without values are now allowed. For example <code>Cookie: foo</code>.
</li>
-<li>
-<p>
-Colons are now allowed within path segments in routes provided
- to <code>cowboy_router:compile/1</code> as long as they are not the first
- character of the path segment.
-</p>
+<li>Colons are now allowed within path segments in routes provided to <code>cowboy_router:compile/1</code> as long as they are not the first character of the path segment.
</li>
-<li>
-<p>
-The <code>cowboy_req:delete_resp_header/2</code> function will no longer
- crash when no response header was set before calling it.
-</p>
+<li>The <code>cowboy_req:delete_resp_header/2</code> function will no longer crash when no response header was set before calling it.
</li>
-<li>
-<p>
-A miscount of the output HTTP/2 flow control window has been
- fixed. It prevented sending the response body fully to some
- clients. The issue only affected response bodies sent as iolists.
-</p>
+<li>A miscount of the output HTTP/2 flow control window has been fixed. It prevented sending the response body fully to some clients. The issue only affected response bodies sent as iolists.
</li>
-</ul></div>
-</div>
-</div>
+</ul>
+
diff --git a/docs/en/cowboy/2.3/guide/modern_web/index.html b/docs/en/cowboy/2.3/guide/modern_web/index.html
index 4b1a8406..2f9cc837 100644
--- a/docs/en/cowboy/2.3/guide/modern_web/index.html
+++ b/docs/en/cowboy/2.3/guide/modern_web/index.html
@@ -62,115 +62,38 @@
<h1 class="lined-header"><span>The modern Web</span></h1>
-<div class="paragraph"><p>Cowboy is a server for the modern Web. This chapter explains
-what it means and details all the standards involved.</p></div>
-<div class="paragraph"><p>Cowboy supports all the standards listed in this document.</p></div>
-<div class="sect1">
+<p>Cowboy is a server for the modern Web. This chapter explains what it means and details all the standards involved.</p>
+<p>Cowboy supports all the standards listed in this document.</p>
<h2 id="_http_2">HTTP/2</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>HTTP/2 is the most efficient protocol for consuming Web
-services. It enables clients to keep a connection open
-for long periods of time; to send requests concurrently;
-to reduce the size of requests through HTTP headers
-compression; and more. The protocol is binary, greatly
-reducing the resources needed to parse it.</p></div>
-<div class="paragraph"><p>HTTP/2 also enables the server to push messages to the
-client. This can be used for various purposes, including
-the sending of related resources before the client requests
-them, in an effort to reduce latency. This can also be used
-to enable bidirectional communication.</p></div>
-<div class="paragraph"><p>Cowboy provides transparent support for HTTP/2. Clients
-that know it can use it; others fall back to HTTP/1.1
-automatically.</p></div>
-<div class="paragraph"><p>HTTP/2 is compatible with the HTTP/1.1 semantics.</p></div>
-<div class="paragraph"><p>HTTP/2 is defined by RFC 7540 and RFC 7541.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>HTTP/2 is the most efficient protocol for consuming Web services. It enables clients to keep a connection open for long periods of time; to send requests concurrently; to reduce the size of requests through HTTP headers compression; and more. The protocol is binary, greatly reducing the resources needed to parse it.</p>
+<p>HTTP/2 also enables the server to push messages to the client. This can be used for various purposes, including the sending of related resources before the client requests them, in an effort to reduce latency. This can also be used to enable bidirectional communication.</p>
+<p>Cowboy provides transparent support for HTTP/2. Clients that know it can use it; others fall back to HTTP/1.1 automatically.</p>
+<p>HTTP/2 is compatible with the HTTP/1.1 semantics.</p>
+<p>HTTP/2 is defined by RFC 7540 and RFC 7541.</p>
<h2 id="_http_1_1">HTTP/1.1</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>HTTP/1.1 is the previous version of the HTTP protocol.
-The protocol itself is text-based and suffers from numerous
-issues and limitations. In particular it is not possible
-to execute requests concurrently (though pipelining is
-sometimes possible), and it&#8217;s also sometimes difficult
-to detect that a client disconnected.</p></div>
-<div class="paragraph"><p>HTTP/1.1 does provide very good semantics for interacting
-with Web services. It defines the standard methods, headers
-and status codes used by HTTP/1.1 and HTTP/2 clients and
-servers.</p></div>
-<div class="paragraph"><p>HTTP/1.1 also defines compatibility with an older version
-of the protocol, HTTP/1.0, which was never really standardized
-across implementations.</p></div>
-<div class="paragraph"><p>The core of HTTP/1.1 is defined by RFC 7230, RFC 7231,
-RFC 7232, RFC 7233, RFC 7234 and RFC 7235. Numerous RFCs
-and other specifications exist defining additional HTTP
-methods, status codes, headers or semantics.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>HTTP/1.1 is the previous version of the HTTP protocol. The protocol itself is text-based and suffers from numerous issues and limitations. In particular it is not possible to execute requests concurrently (though pipelining is sometimes possible), and it&apos;s also sometimes difficult to detect that a client disconnected.</p>
+<p>HTTP/1.1 does provide very good semantics for interacting with Web services. It defines the standard methods, headers and status codes used by HTTP/1.1 and HTTP/2 clients and servers.</p>
+<p>HTTP/1.1 also defines compatibility with an older version of the protocol, HTTP/1.0, which was never really standardized across implementations.</p>
+<p>The core of HTTP/1.1 is defined by RFC 7230, RFC 7231, RFC 7232, RFC 7233, RFC 7234 and RFC 7235. Numerous RFCs and other specifications exist defining additional HTTP methods, status codes, headers or semantics.</p>
<h2 id="_websocket">Websocket</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../ws_protocol">Websocket</a> is a protocol built on top of HTTP/1.1
-that provides a two-ways communication channel between the client and
-the server. Communication is asynchronous and can occur concurrently.</p></div>
-<div class="paragraph"><p>It consists of a Javascript object allowing setting up a
-Websocket connection to the server, and a binary based
-protocol for sending data to the server or the client.</p></div>
-<div class="paragraph"><p>Websocket connections can transfer either UTF-8 encoded text
-data or binary data. The protocol also includes support for
-implementing a ping/pong mechanism, allowing the server and
-the client to have more confidence that the connection is still
-alive.</p></div>
-<div class="paragraph"><p>A Websocket connection can be used to transfer any kind of data,
-small or big, text or binary. Because of this Websocket is
-sometimes used for communication between systems.</p></div>
-<div class="paragraph"><p>Websocket messages have no semantics on their own. Websocket
-is closer to TCP in that aspect, and requires you to design
-and implement your own protocol on top of it; or adapt an
-existing protocol to Websocket.</p></div>
-<div class="paragraph"><p>Cowboy provides an interface known as <a href="../ws_handlers">Websocket handlers</a>
-that gives complete control over a Websocket connection.</p></div>
-<div class="paragraph"><p>The Websocket protocol is defined by RFC 6455.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p><a href="../ws_protocol">Websocket</a> is a protocol built on top of HTTP/1.1 that provides a two-ways communication channel between the client and the server. Communication is asynchronous and can occur concurrently.</p>
+<p>It consists of a Javascript object allowing setting up a Websocket connection to the server, and a binary based protocol for sending data to the server or the client.</p>
+<p>Websocket connections can transfer either UTF-8 encoded text data or binary data. The protocol also includes support for implementing a ping/pong mechanism, allowing the server and the client to have more confidence that the connection is still alive.</p>
+<p>A Websocket connection can be used to transfer any kind of data, small or big, text or binary. Because of this Websocket is sometimes used for communication between systems.</p>
+<p>Websocket messages have no semantics on their own. Websocket is closer to TCP in that aspect, and requires you to design and implement your own protocol on top of it; or adapt an existing protocol to Websocket.</p>
+<p>Cowboy provides an interface known as <a href="../ws_handlers">Websocket handlers</a> that gives complete control over a Websocket connection.</p>
+<p>The Websocket protocol is defined by RFC 6455.</p>
<h2 id="_long_lived_requests">Long-lived requests</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy provides an interface that can be used to support
-long-polling or to stream large amounts of data reliably,
-including using Server-Sent Events.</p></div>
-<div class="paragraph"><p>Long-polling is a mechanism in which the client performs
-a request which may not be immediately answered by the
-server. It allows clients to request resources that may
-not currently exist, but are expected to be created soon,
-and which will be returned as soon as they are.</p></div>
-<div class="paragraph"><p>Long-polling is essentially a hack, but it is widely used
-to overcome limitations on older clients and servers.</p></div>
-<div class="paragraph"><p>Server-Sent Events is a small protocol defined as a media
-type, <code>text/event-stream</code>, along with a new HTTP header,
-<code>Last-Event-ID</code>. It is defined in the EventSource W3C
-specification.</p></div>
-<div class="paragraph"><p>Cowboy provides an interface known as <a href="../loop_handlers">loop handlers</a>
-that facilitates the implementation of long-polling or stream
-mechanisms. It works regardless of the underlying protocol.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Cowboy provides an interface that can be used to support long-polling or to stream large amounts of data reliably, including using Server-Sent Events.</p>
+<p>Long-polling is a mechanism in which the client performs a request which may not be immediately answered by the server. It allows clients to request resources that may not currently exist, but are expected to be created soon, and which will be returned as soon as they are.</p>
+<p>Long-polling is essentially a hack, but it is widely used to overcome limitations on older clients and servers.</p>
+<p>Server-Sent Events is a small protocol defined as a media type, <code>text/event-stream</code>, along with a new HTTP header, <code>Last-Event-ID</code>. It is defined in the EventSource W3C specification.</p>
+<p>Cowboy provides an interface known as <a href="../loop_handlers">loop handlers</a> that facilitates the implementation of long-polling or stream mechanisms. It works regardless of the underlying protocol.</p>
<h2 id="_rest">REST</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../rest_principles">REST, or REpresentational State Transfer</a>,
-is a style of architecture for loosely connected distributed
-systems. It can easily be implemented on top of HTTP.</p></div>
-<div class="paragraph"><p>REST is essentially a set of constraints to be followed.
-Many of these constraints are purely architectural and
-solved by simply using HTTP. Some constraints must be
-explicitly followed by the developer.</p></div>
-<div class="paragraph"><p>Cowboy provides an interface known as <a href="../rest_handlers">REST handlers</a>
-that simplifies the implementation of a REST API on top of
-the HTTP protocol.</p></div>
-</div>
-</div>
+<p><a href="../rest_principles">REST, or REpresentational State Transfer</a>, is a style of architecture for loosely connected distributed systems. It can easily be implemented on top of HTTP.</p>
+<p>REST is essentially a set of constraints to be followed. Many of these constraints are purely architectural and solved by simply using HTTP. Some constraints must be explicitly followed by the developer.</p>
+<p>Cowboy provides an interface known as <a href="../rest_handlers">REST handlers</a> that simplifies the implementation of a REST API on top of the HTTP protocol.</p>
+
diff --git a/docs/en/cowboy/2.3/guide/multipart/index.html b/docs/en/cowboy/2.3/guide/multipart/index.html
index 17224160..2f5559f5 100644
--- a/docs/en/cowboy/2.3/guide/multipart/index.html
+++ b/docs/en/cowboy/2.3/guide/multipart/index.html
@@ -62,169 +62,107 @@
<h1 class="lined-header"><span>Multipart requests</span></h1>
-<div class="paragraph"><p>Multipart originates from MIME, an Internet standard that
-extends the format of emails.</p></div>
-<div class="paragraph"><p>A multipart message is a list of parts. A part contains
-headers and a body. The body of the parts may be
-of any media type, and contain text or binary data.
-It is possible for parts to contain a multipart media
-type.</p></div>
-<div class="paragraph"><p>In the context of HTTP, multipart is most often used
-with the <code>multipart/form-data</code> media type. It is what
-browsers use to upload files through HTML forms.</p></div>
-<div class="paragraph"><p>The <code>multipart/byteranges</code> is also common. It is the
-media type used to send arbitrary bytes from a resource,
-enabling clients to resume downloads.</p></div>
-<div class="sect1">
+<p>Multipart originates from MIME, an Internet standard that extends the format of emails.</p>
+<p>A multipart message is a list of parts. A part contains headers and a body. The body of the parts may be of any media type, and contain text or binary data. It is possible for parts to contain a multipart media type.</p>
+<p>In the context of HTTP, multipart is most often used with the <code>multipart/form-data</code> media type. It is what browsers use to upload files through HTML forms.</p>
+<p>The <code>multipart/byteranges</code> is also common. It is the media type used to send arbitrary bytes from a resource, enabling clients to resume downloads.</p>
<h2 id="_form_data">Form-data</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>In the normal case, when a form is submitted, the
-browser will use the <code>application/x-www-form-urlencoded</code>
-content-type. This type is just a list of keys and
-values and is therefore not fit for uploading files.</p></div>
-<div class="paragraph"><p>That&#8217;s where the <code>multipart/form-data</code> content-type
-comes in. When the form is configured to use this
-content-type, the browser will create a multipart
-message where each part corresponds to a field on
-the form. For files, it also adds some metadata in
-the part headers, like the file name.</p></div>
-<div class="paragraph"><p>A form with a text input, a file input and a select
-choice box will result in a multipart message with
-three parts, one for each field.</p></div>
-<div class="paragraph"><p>The browser does its best to determine the media type
-of the files it sends this way, but you should not
-rely on it for determining the contents of the file.
-Proper investigation of the contents is recommended.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>In the normal case, when a form is submitted, the browser will use the <code>application/x-www-form-urlencoded</code> content-type. This type is just a list of keys and values and is therefore not fit for uploading files.</p>
+<p>That&apos;s where the <code>multipart/form-data</code> content-type comes in. When the form is configured to use this content-type, the browser will create a multipart message where each part corresponds to a field on the form. For files, it also adds some metadata in the part headers, like the file name.</p>
+<p>A form with a text input, a file input and a select choice box will result in a multipart message with three parts, one for each field.</p>
+<p>The browser does its best to determine the media type of the files it sends this way, but you should not rely on it for determining the contents of the file. Proper investigation of the contents is recommended.</p>
<h2 id="_checking_for_multipart_messages">Checking for multipart messages</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The content-type header indicates the presence of
-a multipart message:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The content-type header indicates the presence of a multipart message:</p>
+<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">&lt;&lt;</span><span style="color: #FF0000">"multipart"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"form-data"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">_</span>}
- <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:parse_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#990000">&lt;&lt;</font><font color="#FF0000">"multipart"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"form-data"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">_</font>}
+ <font color="#990000">=</font> <b><font color="#000000">cowboy_req:parse_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_reading_a_multipart_message">Reading a multipart message</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy provides two sets of functions for reading
-request bodies as multipart messages.</p></div>
-<div class="paragraph"><p>The <code>cowboy_req:read_part/1,2</code> functions return the
-next part&#8217;s headers, if any.</p></div>
-<div class="paragraph"><p>The <code>cowboy_req:read_part_body/1,2</code> functions return
-the current part&#8217;s body. For large bodies you may
-need to call the function multiple times.</p></div>
-<div class="paragraph"><p>To read a multipart message you need to iterate over
-all its parts:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Cowboy provides two sets of functions for reading request bodies as multipart messages.</p>
+<p>The <code>cowboy_req:read_part/1,2</code> functions return the next part&apos;s headers, if any.</p>
+<p>The <code>cowboy_req:read_part_body/1,2</code> functions return the current part&apos;s body. For large bodies you may need to call the function multiple times.</p>
+<p>To read a multipart message you need to iterate over all its parts:</p>
+<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">multipart</span></span>(<span style="color: #009900">Req0</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">cowboy_req:read_part</span></span>(<span style="color: #009900">Req0</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">_Headers</span>, <span style="color: #009900">Req1</span>} <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">_Body</span>, <span style="color: #009900">Req</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="font-weight: bold"><span style="color: #000000">multipart</span></span>(<span style="color: #009900">Req</span>);
- {<span style="color: #FF6600">done</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">-&gt;</span>
- <span style="color: #009900">Req</span>
- <span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>When part bodies are too large, Cowboy will return
-a <code>more</code> tuple, and allow you to loop until the part
-body has been fully read.</p></div>
-<div class="paragraph"><p>The function <code>cow_multipart:form_data/1</code> can be used
-to quickly obtain information about a part from a
-<code>multipart/form-data</code> message. The function returns
-a <code>data</code> or a <code>file</code> tuple depending on whether this
-is a normal field or a file being uploaded.</p></div>
-<div class="paragraph"><p>The following snippet will use this function and
-use different strategies depending on whether the
-part is a file:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">multipart</font></b>(<font color="#009900">Req0</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">case</font></b> <b><font color="#000000">cowboy_req:read_part</font></b>(<font color="#009900">Req0</font>) <b><font color="#0000FF">of</font></b>
+ {<font color="#FF6600">ok</font>, <font color="#009900">_Headers</font>, <font color="#009900">Req1</font>} <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <font color="#009900">_Body</font>, <font color="#009900">Req</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:read_part_body</font></b>(<font color="#009900">Req1</font>),
+ <b><font color="#000000">multipart</font></b>(<font color="#009900">Req</font>);
+ {<font color="#FF6600">done</font>, <font color="#009900">Req</font>} <font color="#990000">-&gt;</font>
+ <font color="#009900">Req</font>
+ <b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>When part bodies are too large, Cowboy will return a <code>more</code> tuple, and allow you to loop until the part body has been fully read.</p>
+<p>The function <code>cow_multipart:form_data/1</code> can be used to quickly obtain information about a part from a <code>multipart/form-data</code> message. The function returns a <code>data</code> or a <code>file</code> tuple depending on whether this is a normal field or a file being uploaded.</p>
+<p>The following snippet will use this function and use different strategies depending on whether the part is a file:</p>
+<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">multipart</span></span>(<span style="color: #009900">Req0</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">cowboy_req:read_part</span></span>(<span style="color: #009900">Req0</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Headers</span>, <span style="color: #009900">Req1</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: #0000FF">case</span></span> <span style="font-weight: bold"><span style="color: #000000">cow_multipart:form_data</span></span>(<span style="color: #009900">Headers</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
- {<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: #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>);
- {<span style="color: #FF6600">done</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">-&gt;</span>
- <span style="color: #009900">Req</span>
- <span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span>
-
-<span style="font-weight: bold"><span style="color: #000000">stream_file</span></span>(<span style="color: #009900">Req0</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">cowboy_req:read_part_body</span></span>(<span style="color: #009900">Req0</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">_LastBodyChunk</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">-&gt;</span>
- <span style="color: #009900">Req</span>;
- {<span style="color: #FF6600">more</span>, <span style="color: #009900">_BodyChunk</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #000000">stream_file</span></span>(<span style="color: #009900">Req</span>)
- <span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Both the part header and body reading functions can take
-options that will be given to the request body reading
-functions. By default, <code>cowboy_req:read_part/1</code> reads
-up to 64KB for up to 5 seconds. <code>cowboy_req:read_part_body/1</code>
-has the same defaults as <code>cowboy_req:read_body/1</code>.</p></div>
-<div class="paragraph"><p>To change the defaults for part headers:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">multipart</font></b>(<font color="#009900">Req0</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">case</font></b> <b><font color="#000000">cowboy_req:read_part</font></b>(<font color="#009900">Req0</font>) <b><font color="#0000FF">of</font></b>
+ {<font color="#FF6600">ok</font>, <font color="#009900">Headers</font>, <font color="#009900">Req1</font>} <font color="#990000">-&gt;</font>
+ <font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#0000FF">case</font></b> <b><font color="#000000">cow_multipart:form_data</font></b>(<font color="#009900">Headers</font>) <b><font color="#0000FF">of</font></b>
+ {<font color="#FF6600">data</font>, <font color="#009900">_FieldName</font>} <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <font color="#009900">_Body</font>, <font color="#009900">Req2</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:read_part_body</font></b>(<font color="#009900">Req1</font>),
+ <font color="#009900">Req2</font>;
+ {<font color="#FF6600">file</font>, <font color="#009900">_FieldName</font>, <font color="#009900">_Filename</font>, <font color="#009900">_CType</font>} <font color="#990000">-&gt;</font>
+ <b><font color="#000000">stream_file</font></b>(<font color="#009900">Req1</font>)
+ <b><font color="#0000FF">end</font></b>,
+ <b><font color="#000000">multipart</font></b>(<font color="#009900">Req</font>);
+ {<font color="#FF6600">done</font>, <font color="#009900">Req</font>} <font color="#990000">-&gt;</font>
+ <font color="#009900">Req</font>
+ <b><font color="#0000FF">end</font></b><font color="#990000">.</font>
+
+<b><font color="#000000">stream_file</font></b>(<font color="#009900">Req0</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">case</font></b> <b><font color="#000000">cowboy_req:read_part_body</font></b>(<font color="#009900">Req0</font>) <b><font color="#0000FF">of</font></b>
+ {<font color="#FF6600">ok</font>, <font color="#009900">_LastBodyChunk</font>, <font color="#009900">Req</font>} <font color="#990000">-&gt;</font>
+ <font color="#009900">Req</font>;
+ {<font color="#FF6600">more</font>, <font color="#009900">_BodyChunk</font>, <font color="#009900">Req</font>} <font color="#990000">-&gt;</font>
+ <b><font color="#000000">stream_file</font></b>(<font color="#009900">Req</font>)
+ <b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Both the part header and body reading functions can take options that will be given to the request body reading functions. By default, <code>cowboy_req:read_part/1</code> reads up to 64KB for up to 5 seconds. <code>cowboy_req:read_part_body/1</code> has the same defaults as <code>cowboy_req:read_body/1</code>.</p>
+<p>To change the defaults for part headers:</p>
+<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">cowboy_req:read_part</span></span>(<span style="color: #009900">Req</span>, #{<span style="font-weight: bold"><span style="color: #000080">length</span></span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">128000</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>And for part bodies:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">cowboy_req:read_part</font></b>(<font color="#009900">Req</font>, #{<b><font color="#000080">length</font></b> <font color="#990000">=&gt;</font> <font color="#993399">128000</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>And for part bodies:</p>
+<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">cowboy_req:read_part_body</span></span>(<span style="color: #009900">Req</span>, #{<span style="font-weight: bold"><span style="color: #000080">length</span></span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">1000000</span>, <span style="color: #0000FF">period</span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">7000</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">cowboy_req:read_part_body</font></b>(<font color="#009900">Req</font>, #{<b><font color="#000080">length</font></b> <font color="#990000">=&gt;</font> <font color="#993399">1000000</font>, <font color="#0000FF">period</font> <font color="#990000">=&gt;</font> <font color="#993399">7000</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_skipping_unwanted_parts">Skipping unwanted parts</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Part bodies do not have to be read. Cowboy will automatically
-skip it when you request the next part&#8217;s body.</p></div>
-<div class="paragraph"><p>The following snippet reads all part headers and skips
-all bodies:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Part bodies do not have to be read. Cowboy will automatically skip it when you request the next part&apos;s body.</p>
+<p>The following snippet reads all part headers and skips all bodies:</p>
+<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">multipart</span></span>(<span style="color: #009900">Req0</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">cowboy_req:read_part</span></span>(<span style="color: #009900">Req0</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">_Headers</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #000000">multipart</span></span>(<span style="color: #009900">Req</span>);
- {<span style="color: #FF6600">done</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">-&gt;</span>
- <span style="color: #009900">Req</span>
- <span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Similarly, if you start reading the body and it ends up
-being too big, you can simply continue with the next part.
-Cowboy will automatically skip what remains.</p></div>
-<div class="paragraph"><p>While Cowboy can skip part bodies automatically, the read
-rate is not configurable. Depending on your application
-you may want to skip manually, in particular if you observe
-poor performance while skipping.</p></div>
-<div class="paragraph"><p>You do not have to read all parts either. You can stop
-reading as soon as you find the data you need.</p></div>
-</div>
-</div>
+<pre><tt><b><font color="#000000">multipart</font></b>(<font color="#009900">Req0</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">case</font></b> <b><font color="#000000">cowboy_req:read_part</font></b>(<font color="#009900">Req0</font>) <b><font color="#0000FF">of</font></b>
+ {<font color="#FF6600">ok</font>, <font color="#009900">_Headers</font>, <font color="#009900">Req</font>} <font color="#990000">-&gt;</font>
+ <b><font color="#000000">multipart</font></b>(<font color="#009900">Req</font>);
+ {<font color="#FF6600">done</font>, <font color="#009900">Req</font>} <font color="#990000">-&gt;</font>
+ <font color="#009900">Req</font>
+ <b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Similarly, if you start reading the body and it ends up being too big, you can simply continue with the next part. Cowboy will automatically skip what remains.</p>
+<p>While Cowboy can skip part bodies automatically, the read rate is not configurable. Depending on your application you may want to skip manually, in particular if you observe poor performance while skipping.</p>
+<p>You do not have to read all parts either. You can stop reading as soon as you find the data you need.</p>
+<!-- @todo Cover the building of multipart messages.-->
+
diff --git a/docs/en/cowboy/2.3/guide/req/index.html b/docs/en/cowboy/2.3/guide/req/index.html
index 9d44a310..b709f063 100644
--- a/docs/en/cowboy/2.3/guide/req/index.html
+++ b/docs/en/cowboy/2.3/guide/req/index.html
@@ -62,407 +62,283 @@
<h1 class="lined-header"><span>The Req object</span></h1>
-<div class="paragraph"><p>The Req object is a variable used for obtaining information
-about a request, read its body or send a response.</p></div>
-<div class="paragraph"><p>It is not really an object in the object-oriented sense.
-It is a simple map that can be directly accessed or
-used when calling functions from the <code>cowboy_req</code> module.</p></div>
-<div class="paragraph"><p>The Req object is the subject of a few different chapters.
-In this chapter we will learn about the Req object and
-look at how to retrieve information about the request.</p></div>
-<div class="sect1">
+<p>The Req object is a variable used for obtaining information about a request, read its body or send a response.</p>
+<p>It is not really an object in the object-oriented sense. It is a simple map that can be directly accessed or used when calling functions from the <code>cowboy_req</code> module.</p>
+<p>The Req object is the subject of a few different chapters. In this chapter we will learn about the Req object and look at how to retrieve information about the request.</p>
<h2 id="_direct_access">Direct access</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The Req map contains a number of fields which are documented
-and can be accessed directly. They are the fields that have
-a direct mapping to HTTP: the request <code>method</code>; the HTTP
-<code>version</code> used; the effective URI components <code>scheme</code>,
-<code>host</code>, <code>port</code>, <code>path</code> and <code>qs</code>; the request <code>headers</code>;
-and the connection <code>peer</code> address and port.</p></div>
-<div class="paragraph"><p>Note that the <code>version</code> field can be used to determine
-whether a connection is using HTTP/2.</p></div>
-<div class="paragraph"><p>To access a field, you can simply match in the function
-head. The following example sends a simple "Hello world!"
-response when the <code>method</code> is GET, and a 405 error
-otherwise.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The Req map contains a number of fields which are documented and can be accessed directly. They are the fields that have a direct mapping to HTTP: the request <code>method</code>; the HTTP <code>version</code> used; the effective URI components <code>scheme</code>, <code>host</code>, <code>port</code>, <code>path</code> and <code>qs</code>; the request <code>headers</code>; and the connection <code>peer</code> address and port.</p>
+<p>Note that the <code>version</code> field can be used to determine whether a connection is using HTTP/2.</p>
+<p>To access a field, you can simply match in the function head. The following example sends a simple &quot;Hello world!&quot; response when the <code>method</code> is GET, and a 405 error otherwise.</p>
+<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">init</span></span>(<span style="color: #009900">Req0</span><span style="color: #990000">=</span>#{<span style="color: #FF6600">method</span> <span style="color: #990000">:=</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"GET"</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">200</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/plain"</span><span style="color: #990000">&gt;&gt;</span>
- }, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Hello world!"</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">Req0</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">405</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"allow"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"GET"</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="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Any other field is internal and should not be accessed.
-They may change in future releases, including maintenance
-releases, without notice.</p></div>
-<div class="paragraph"><p>Modifying the Req object, while allowed, is not recommended
-unless strictly necessary. If adding new fields, make sure
-to namespace the field names so that no conflict can occur
-with future Cowboy updates or third party projects.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req0</font><font color="#990000">=</font>#{<font color="#FF6600">method</font> <font color="#990000">:=</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"GET"</font><font color="#990000">&gt;&gt;</font>}, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ <font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:reply</font></b>(<font color="#993399">200</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/plain"</font><font color="#990000">&gt;&gt;</font>
+ }, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"Hello world!"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req0</font>),
+ {<font color="#FF6600">ok</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>};
+<b><font color="#000000">init</font></b>(<font color="#009900">Req0</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ <font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:reply</font></b>(<font color="#993399">405</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"allow"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"GET"</font><font color="#990000">&gt;&gt;</font>
+ }, <font color="#009900">Req0</font>),
+ {<font color="#FF6600">ok</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Any other field is internal and should not be accessed. They may change in future releases, including maintenance releases, without notice.</p>
+<p>Modifying the Req object, while allowed, is not recommended unless strictly necessary. If adding new fields, make sure to namespace the field names so that no conflict can occur with future Cowboy updates or third party projects.</p>
+<!-- @todo There are currently no tests for direct access.-->
<h2 id="_introduction_to_the_cowboy_req_interface">Introduction to the cowboy_req interface</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Functions in the <code>cowboy_req</code> module provide access to
-the request information but also various operations that
-are common when dealing with HTTP requests.</p></div>
-<div class="paragraph"><p>All the functions that begin with a verb indicate an action.
-Other functions simply return the corresponding value
-(sometimes that value does need to be built, but the
-cost of the operation is equivalent to retrieving a value).</p></div>
-<div class="paragraph"><p>Some of the <code>cowboy_req</code> functions return an updated Req
-object. They are the read, reply, set and delete functions.
-While ignoring the returned Req will not cause incorrect
-behavior for some of them, it is highly recommended to
-always keep and use the last returned Req object. The
-manual for <code>cowboy_req</code> details these functions and what
-modifications are done to the Req object.</p></div>
-<div class="paragraph"><p>Some of the calls to <code>cowboy_req</code> have side effects. This
-is the case of the read and reply functions. Cowboy reads
-the request body or replies immediately when the function
-is called.</p></div>
-<div class="paragraph"><p>All functions will crash if something goes wrong. There
-is usually no need to catch these errors, Cowboy will
-send the appropriate 4xx or 5xx response depending on
-where the crash occurred.</p></div>
-</div>
-</div>
-<div class="sect1">
+<!-- @todo Link to cowboy_req manual-->
+<p>Functions in the <code>cowboy_req</code> module provide access to the request information but also various operations that are common when dealing with HTTP requests.</p>
+<p>All the functions that begin with a verb indicate an action. Other functions simply return the corresponding value (sometimes that value does need to be built, but the cost of the operation is equivalent to retrieving a value).</p>
+<p>Some of the <code>cowboy_req</code> functions return an updated Req object. They are the read, reply, set and delete functions. While ignoring the returned Req will not cause incorrect behavior for some of them, it is highly recommended to always keep and use the last returned Req object. The manual for <code>cowboy_req</code> details these functions and what modifications are done to the Req object.</p>
+<p>Some of the calls to <code>cowboy_req</code> have side effects. This is the case of the read and reply functions. Cowboy reads the request body or replies immediately when the function is called.</p>
+<p>All functions will crash if something goes wrong. There is usually no need to catch these errors, Cowboy will send the appropriate 4xx or 5xx response depending on where the crash occurred.</p>
<h2 id="_request_method">Request method</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The request method can be retrieved directly:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The request method can be retrieved directly:</p>
+<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 class="paragraph"><p>Or using a function:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>#{<font color="#FF6600">method</font> <font color="#990000">:=</font> <font color="#009900">Method</font>} <font color="#990000">=</font> <font color="#009900">Req</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Or using a function:</p>
+<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">Method</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="paragraph"><p>The method is a case sensitive binary string. Standard
-methods include GET, HEAD, OPTIONS, PATCH, POST, PUT
-or DELETE.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Method</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:method</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>The method is a case sensitive binary string. Standard methods include GET, HEAD, OPTIONS, PATCH, POST, PUT or DELETE.</p>
<h2 id="_http_version">HTTP version</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The HTTP version is informational. It does not indicate that
-the client implements the protocol well or fully.</p></div>
-<div class="paragraph"><p>There is typically no need to change behavior based on the
-HTTP version: Cowboy already does it for you.</p></div>
-<div class="paragraph"><p>It can be useful in some cases, though. For example, one may
-want to redirect HTTP/1.1 clients to use Websocket, while HTTP/2
-clients keep using HTTP/2.</p></div>
-<div class="paragraph"><p>The HTTP version can be retrieved directly:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The HTTP version is informational. It does not indicate that the client implements the protocol well or fully.</p>
+<p>There is typically no need to change behavior based on the HTTP version: Cowboy already does it for you.</p>
+<p>It can be useful in some cases, though. For example, one may want to redirect HTTP/1.1 clients to use Websocket, while HTTP/2 clients keep using HTTP/2.</p>
+<p>The HTTP version can be retrieved directly:</p>
+<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 class="paragraph"><p>Or using a function:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>#{<font color="#FF6600">version</font> <font color="#990000">:=</font> <font color="#009900">Version</font>} <font color="#990000">=</font> <font color="#009900">Req</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Or using a function:</p>
+<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">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 class="paragraph"><p>Cowboy defines the <code>'HTTP/1.0'</code>, <code>'HTTP/1.1'</code> and <code>'HTTP/2'</code>
-versions. Custom protocols can define their own values as
-atoms.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Version</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:version</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Cowboy defines the <code>&apos;HTTP/1.0&apos;</code>, <code>&apos;HTTP/1.1&apos;</code> and <code>&apos;HTTP/2&apos;</code> versions. Custom protocols can define their own values as atoms.</p>
<h2 id="_effective_request_uri">Effective request URI</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The scheme, host, port, path and query string components
-of the effective request URI can all be retrieved directly:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The scheme, host, port, path and query string components of the effective request URI can all be retrieved directly:</p>
+<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: #FF6600">host</span> <span style="color: #990000">:=</span> <span style="color: #009900">Host</span>,
- <span style="color: #FF6600">port</span> <span style="color: #990000">:=</span> <span style="color: #009900">Port</span>,
- <span style="color: #FF6600">path</span> <span style="color: #990000">:=</span> <span style="color: #009900">Path</span>,
- <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 class="paragraph"><p>Or using the related functions:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+ <font color="#FF6600">scheme</font> <font color="#990000">:=</font> <font color="#009900">Scheme</font>,
+ <font color="#FF6600">host</font> <font color="#990000">:=</font> <font color="#009900">Host</font>,
+ <font color="#FF6600">port</font> <font color="#990000">:=</font> <font color="#009900">Port</font>,
+ <font color="#FF6600">path</font> <font color="#990000">:=</font> <font color="#009900">Path</font>,
+ <font color="#FF6600">qs</font> <font color="#990000">:=</font> <font color="#009900">Qs</font>
+} <font color="#990000">=</font> <font color="#009900">Req</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Or using the related functions:</p>
+<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">Scheme</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:scheme</span></span>(<span style="color: #009900">Req</span>),
-<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: #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: #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>
-<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 class="paragraph"><p>The scheme and host are lowercased case insensitive binary
-strings. The port is an integer representing the port number.
-The path and query string are case sensitive binary strings.</p></div>
-<div class="paragraph"><p>Cowboy defines only the <code>&lt;&lt;"http"&gt;&gt;</code> and <code>&lt;&lt;"https"&gt;&gt;</code> schemes.
-They are chosen so that the scheme will only be <code>&lt;&lt;"https"&gt;&gt;</code>
-for requests on secure HTTP/1.1 or HTTP/2 connections.</p></div>
-<div class="paragraph"><p>The effective request URI itself can be reconstructed with
-the <code>cowboy_req:uri/1,2</code> function. By default, an absolute
-URI is returned:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Scheme</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:scheme</font></b>(<font color="#009900">Req</font>),
+<font color="#009900">Host</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:host</font></b>(<font color="#009900">Req</font>),
+<font color="#009900">Port</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:port</font></b>(<font color="#009900">Req</font>),
+<font color="#009900">Path</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:path</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font>
+<font color="#009900">Qs</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:qs</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>The scheme and host are lowercased case insensitive binary strings. The port is an integer representing the port number. The path and query string are case sensitive binary strings.</p>
+<p>Cowboy defines only the <code>&lt;&lt;&quot;http&quot;&gt;&gt;</code> and <code>&lt;&lt;&quot;https&quot;&gt;&gt;</code> schemes. They are chosen so that the scheme will only be <code>&lt;&lt;&quot;https&quot;&gt;&gt;</code> for requests on secure HTTP/1.1 or HTTP/2 connections.</p>
+<!-- @todo Is that tested well?-->
+<p>The effective request URI itself can be reconstructed with the <code>cowboy_req:uri/1,2</code> function. By default, an absolute URI is returned:</p>
+<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-style: italic"><span style="color: #9A1900">%% </span></span><span style="text-decoration: underline"><span style="color: #0000FF">scheme://host</span></span><span style="font-style: italic"><span style="color: #9A1900">[:port]/path[?qs]</span></span>
-<span style="color: #009900">URI</span> <span style="color: #990000">=</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 class="paragraph"><p>Options are available to either disable or replace some
-or all of the components. Various URIs or URI formats can
-be generated this way, including the origin form:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><i><font color="#9A1900">%% </font></i><u><font color="#0000FF">scheme://host</font></u><i><font color="#9A1900">[:port]/path[?qs]</font></i>
+<font color="#009900">URI</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:uri</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Options are available to either disable or replace some or all of the components. Various URIs or URI formats can be generated this way, including the origin form:</p>
+<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-style: italic"><span style="color: #9A1900">%% /path[?qs]</span></span>
-<span style="color: #009900">URI</span> <span style="color: #990000">=</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="paragraph"><p>The protocol relative form:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><i><font color="#9A1900">%% /path[?qs]</font></i>
+<font color="#009900">URI</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:uri</font></b>(<font color="#009900">Req</font>, #{<font color="#0000FF">host</font> <font color="#990000">=&gt;</font> <font color="#000080">undefined</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>The protocol relative form:</p>
+<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-style: italic"><span style="color: #9A1900">%% //host[:port]/path[?qs]</span></span>
-<span style="color: #009900">URI</span> <span style="color: #990000">=</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="paragraph"><p>The absolute URI without a query string:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><i><font color="#9A1900">%% //host[:port]/path[?qs]</font></i>
+<font color="#009900">URI</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:uri</font></b>(<font color="#009900">Req</font>, #{<font color="#0000FF">scheme</font> <font color="#990000">=&gt;</font> <font color="#000080">undefined</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>The absolute URI without a query string:</p>
+<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">URI</span> <span style="color: #990000">=</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">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="paragraph"><p>A different host:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">URI</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:uri</font></b>(<font color="#009900">Req</font>, #{<font color="#0000FF">qs</font> <font color="#990000">=&gt;</font> <font color="#000080">undefined</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>A different host:</p>
+<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">URI</span> <span style="color: #990000">=</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: #990000">&lt;&lt;</span><span style="color: #FF0000">"example.org"</span><span style="color: #990000">&gt;&gt;</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>And any other combination.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">URI</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:uri</font></b>(<font color="#009900">Req</font>, #{<font color="#0000FF">host</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"example.org"</font><font color="#990000">&gt;&gt;</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>And any other combination.</p>
<h2 id="_bindings">Bindings</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Bindings are the host and path components that you chose
-to extract when defining the routes of your application.
-They are only available after the routing.</p></div>
-<div class="paragraph"><p>Cowboy provides functions to retrieve one or all bindings.</p></div>
-<div class="paragraph"><p>To retrieve a single value:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Bindings are the host and path components that you chose to extract when defining the routes of your application. They are only available after the routing.</p>
+<p>Cowboy provides functions to retrieve one or all bindings.</p>
+<p>To retrieve a single value:</p>
+<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">Value</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:binding</span></span>(<span style="color: #FF6600">userid</span>, <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>When attempting to retrieve a value that was not bound,
-<code>undefined</code> will be returned. A different default value
-can be provided:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Value</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:binding</font></b>(<font color="#FF6600">userid</font>, <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>When attempting to retrieve a value that was not bound, <code>undefined</code> will be returned. A different default value can be provided:</p>
+<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">Value</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:binding</span></span>(<span style="color: #FF6600">userid</span>, <span style="color: #009900">Req</span>, <span style="color: #993399">42</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>To retrieve everything that was bound:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Value</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:binding</font></b>(<font color="#FF6600">userid</font>, <font color="#009900">Req</font>, <font color="#993399">42</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>To retrieve everything that was bound:</p>
+<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">Bindings</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:bindings</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>They are returned as a map, with keys being atoms.</p></div>
-<div class="paragraph"><p>The Cowboy router also allows you to capture many host
-or path segments at once using the <code>...</code> qualifier.</p></div>
-<div class="paragraph"><p>To retrieve the segments captured from the host name:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Bindings</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:bindings</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>They are returned as a map, with keys being atoms.</p>
+<p>The Cowboy router also allows you to capture many host or path segments at once using the <code>...</code> qualifier.</p>
+<p>To retrieve the segments captured from the host name:</p>
+<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">HostInfo</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:host_info</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>And the path segments:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">HostInfo</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:host_info</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>And the path segments:</p>
+<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">PathInfo</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:path_info</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Cowboy will return <code>undefined</code> if <code>...</code> was not used
-in the route.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">PathInfo</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:path_info</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Cowboy will return <code>undefined</code> if <code>...</code> was not used in the route.</p>
<h2 id="_query_parameters">Query parameters</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy provides two functions to access query parameters.
-You can use the first to get the entire list of parameters.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Cowboy provides two functions to access query parameters. You can use the first to get the entire list of parameters.</p>
+<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">QsVals</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:parse_qs</span></span>(<span style="color: #009900">Req</span>),
-{<span style="color: #990000">_</span>, <span style="color: #009900">Lang</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">lists:keyfind</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"lang"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #993399">1</span>, <span style="color: #009900">QsVals</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Cowboy will only parse the query string, and not do any
-transformation. This function may therefore return duplicates,
-or parameter names without an associated value. The order of
-the list returned is undefined.</p></div>
-<div class="paragraph"><p>When a query string is <code>key=1&amp;key=2</code>, the list returned will
-contain two parameters of name <code>key</code>.</p></div>
-<div class="paragraph"><p>The same is true when trying to use the PHP-style suffix <code>[]</code>.
-When a query string is <code>key[]=1&amp;key[]=2</code>, the list returned will
-contain two parameters of name <code>key[]</code>.</p></div>
-<div class="paragraph"><p>When a query string is simply <code>key</code>, Cowboy will return the
-list <code>[{&lt;&lt;"key"&gt;&gt;, true}]</code>, using <code>true</code> to indicate that the
-parameter <code>key</code> was defined, but with no value.</p></div>
-<div class="paragraph"><p>The second function Cowboy provides allows you to match out
-only the parameters you are interested in, and at the same
-time do any post processing you require using <a href="../constraints">constraints</a>.
-This function returns a map.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">QsVals</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:parse_qs</font></b>(<font color="#009900">Req</font>),
+{<font color="#990000">_</font>, <font color="#009900">Lang</font>} <font color="#990000">=</font> <b><font color="#000000">lists:keyfind</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"lang"</font><font color="#990000">&gt;&gt;</font>, <font color="#993399">1</font>, <font color="#009900">QsVals</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Cowboy will only parse the query string, and not do any transformation. This function may therefore return duplicates, or parameter names without an associated value. The order of the list returned is undefined.</p>
+<p>When a query string is <code>key=1&amp;key=2</code>, the list returned will contain two parameters of name <code>key</code>.</p>
+<p>The same is true when trying to use the PHP-style suffix <code>[]</code>. When a query string is <code>key[]=1&amp;key[]=2</code>, the list returned will contain two parameters of name <code>key[]</code>.</p>
+<p>When a query string is simply <code>key</code>, Cowboy will return the list <code>[{&lt;&lt;&quot;key&quot;&gt;&gt;, true}]</code>, using <code>true</code> to indicate that the parameter <code>key</code> was defined, but with no value.</p>
+<p>The second function Cowboy provides allows you to match out only the parameters you are interested in, and at the same time do any post processing you require using <a href="../constraints">constraints</a>. This function returns a map.</p>
+<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">id</span> <span style="color: #990000">:=</span> <span style="color: #009900">ID</span>, <span style="color: #FF6600">lang</span> <span style="color: #990000">:=</span> <span style="color: #009900">Lang</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:match_qs</span></span>([<span style="color: #FF6600">id</span>, <span style="color: #FF6600">lang</span>], <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Constraints can be applied automatically. The following
-snippet will crash when the <code>id</code> parameter is not an integer,
-or when the <code>lang</code> parameter is empty. At the same time, the
-value for <code>id</code> will be converted to an integer term:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>#{<font color="#FF6600">id</font> <font color="#990000">:=</font> <font color="#009900">ID</font>, <font color="#FF6600">lang</font> <font color="#990000">:=</font> <font color="#009900">Lang</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:match_qs</font></b>([<font color="#FF6600">id</font>, <font color="#FF6600">lang</font>], <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Constraints can be applied automatically. The following snippet will crash when the <code>id</code> parameter is not an integer, or when the <code>lang</code> parameter is empty. At the same time, the value for <code>id</code> will be converted to an integer term:</p>
+<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">QsMap</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:match_qs</span></span>([{<span style="color: #FF6600">id</span>, <span style="color: #FF6600">int</span>}, {<span style="color: #FF6600">lang</span>, <span style="color: #FF6600">nonempty</span>}], <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>A default value may also be provided. The default will be used
-if the <code>lang</code> key is not found. It will not be used if
-the key is found but has an empty value.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">QsMap</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:match_qs</font></b>([{<font color="#FF6600">id</font>, <font color="#FF6600">int</font>}, {<font color="#FF6600">lang</font>, <font color="#FF6600">nonempty</font>}], <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>A default value may also be provided. The default will be used if the <code>lang</code> key is not found. It will not be used if the key is found but has an empty value.</p>
+<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">lang</span> <span style="color: #990000">:=</span> <span style="color: #009900">Lang</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:match_qs</span></span>([{<span style="color: #FF6600">lang</span>, [], <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"en-US"</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="paragraph"><p>If no default is provided and the value is missing, the
-query string is deemed invalid and the process will crash.</p></div>
-<div class="paragraph"><p>When the query string is <code>key=1&amp;key=2</code>, the value for <code>key</code>
-will be the list <code>[1, 2]</code>. Parameter names do not need to
-include the PHP-style suffix. Constraints may be used to
-ensure that only one value was passed through.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>#{<font color="#FF6600">lang</font> <font color="#990000">:=</font> <font color="#009900">Lang</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:match_qs</font></b>([{<font color="#FF6600">lang</font>, [], <font color="#990000">&lt;&lt;</font><font color="#FF0000">"en-US"</font><font color="#990000">&gt;&gt;</font>}], <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>If no default is provided and the value is missing, the query string is deemed invalid and the process will crash.</p>
+<p>When the query string is <code>key=1&amp;key=2</code>, the value for <code>key</code> will be the list <code>[1, 2]</code>. Parameter names do not need to include the PHP-style suffix. Constraints may be used to ensure that only one value was passed through.</p>
<h2 id="_headers">Headers</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Header values can be retrieved either as a binary string
-or parsed into a more meaningful representation.</p></div>
-<div class="paragraph"><p>The get the raw value:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Header values can be retrieved either as a binary string or parsed into a more meaningful representation.</p>
+<p>The get the raw value:</p>
+<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">HeaderVal</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-type"</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="paragraph"><p>Cowboy expects all header names to be provided as lowercase
-binary strings. This is true for both requests and responses,
-regardless of the underlying protocol.</p></div>
-<div class="paragraph"><p>When the header is missing from the request, <code>undefined</code>
-will be returned. A different default can be provided:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">HeaderVal</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Cowboy expects all header names to be provided as lowercase binary strings. This is true for both requests and responses, regardless of the underlying protocol.</p>
+<p>When the header is missing from the request, <code>undefined</code> will be returned. A different default can be provided:</p>
+<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">HeaderVal</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-type"</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">"text/plain"</span><span style="color: #990000">&gt;&gt;</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>All headers can be retrieved at once, either directly:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">HeaderVal</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/plain"</font><font color="#990000">&gt;&gt;</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>All headers can be retrieved at once, either directly:</p>
+<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">AllHeaders</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>Or using a function:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>#{<font color="#FF6600">headers</font> <font color="#990000">:=</font> <font color="#009900">AllHeaders</font>} <font color="#990000">=</font> <font color="#009900">Req</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Or using a function:</p>
+<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">AllHeaders</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 class="paragraph"><p>Cowboy provides equivalent functions to parse individual
-headers. There is no function to parse all headers at once.</p></div>
-<div class="paragraph"><p>To parse a specific header:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">AllHeaders</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:headers</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Cowboy provides equivalent functions to parse individual headers. There is no function to parse all headers at once.</p>
+<p>To parse a specific header:</p>
+<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">ParsedVal</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:parse_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</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="paragraph"><p>An exception will be thrown if it doesn&#8217;t know how to parse the
-given header, or if the value is invalid. The list of known headers
-and default values can be found in the manual.</p></div>
-<div class="paragraph"><p>When the header is missing, <code>undefined</code> is returned. You can
-change the default value. Note that it should be the parsed value
-directly:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">ParsedVal</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:parse_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>An exception will be thrown if it doesn&apos;t know how to parse the given header, or if the value is invalid. The list of known headers and default values can be found in the manual.</p>
+<p>When the header is missing, <code>undefined</code> is returned. You can change the default value. Note that it should be the parsed value directly:</p>
+<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">ParsedVal</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:parse_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</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">"text"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"plain"</span><span style="color: #990000">&gt;&gt;</span>, []})<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">ParsedVal</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:parse_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>,
+ {<font color="#990000">&lt;&lt;</font><font color="#FF0000">"text"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"plain"</font><font color="#990000">&gt;&gt;</font>, []})<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_peer">Peer</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The peer address and port number for the connection can be
-retrieved either directly or using a function.</p></div>
-<div class="paragraph"><p>To retrieve the peer directly:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The peer address and port number for the connection can be retrieved either directly or using a function.</p>
+<p>To retrieve the peer directly:</p>
+<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 class="paragraph"><p>And using a function:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>#{<font color="#FF6600">peer</font> <font color="#990000">:=</font> {<font color="#009900">IP</font>, <font color="#009900">Port</font>}} <font color="#990000">=</font> <font color="#009900">Req</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>And using a function:</p>
+<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">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 class="paragraph"><p>Note that the peer corresponds to the remote end of the
-connection to the server, which may or may not be the
-client itself. It may also be a proxy or a gateway.</p></div>
-</div>
-</div>
+<pre><tt>{<font color="#009900">IP</font>, <font color="#009900">Port</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:peer</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Note that the peer corresponds to the remote end of the connection to the server, which may or may not be the client itself. It may also be a proxy or a gateway.</p>
+
diff --git a/docs/en/cowboy/2.3/guide/req_body/index.html b/docs/en/cowboy/2.3/guide/req_body/index.html
index 7db337da..a127f6f2 100644
--- a/docs/en/cowboy/2.3/guide/req_body/index.html
+++ b/docs/en/cowboy/2.3/guide/req_body/index.html
@@ -62,144 +62,93 @@
<h1 class="lined-header"><span>Reading the request body</span></h1>
-<div class="paragraph"><p>The request body can be read using the Req object.</p></div>
-<div class="paragraph"><p>Cowboy will not attempt to read the body until requested.
-You need to call the body reading functions in order to
-retrieve it.</p></div>
-<div class="paragraph"><p>Cowboy will not cache the body, it is therefore only
-possible to read it once.</p></div>
-<div class="paragraph"><p>You are not required to read it, however. If a body is
-present and was not read, Cowboy will either cancel or
-skip its download, depending on the protocol.</p></div>
-<div class="paragraph"><p>Cowboy provides functions for reading the body raw,
-and read and parse form urlencoded or <a href="../multipart">multipart bodies</a>.
-The latter is covered in its own chapter.</p></div>
-<div class="sect1">
+<p>The request body can be read using the Req object.</p>
+<p>Cowboy will not attempt to read the body until requested. You need to call the body reading functions in order to retrieve it.</p>
+<p>Cowboy will not cache the body, it is therefore only possible to read it once.</p>
+<p>You are not required to read it, however. If a body is present and was not read, Cowboy will either cancel or skip its download, depending on the protocol.</p>
+<p>Cowboy provides functions for reading the body raw, and read and parse form urlencoded or <a href="../multipart">multipart bodies</a>. The latter is covered in its own chapter.</p>
<h2 id="_request_body_presence">Request body presence</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Not all requests come with a body. You can check for
-the presence of a request body with this function:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Not all requests come with a body. You can check for the presence of a request body with this function:</p>
+<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">cowboy_req:has_body</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>It returns <code>true</code> if there is a body; <code>false</code> otherwise.</p></div>
-<div class="paragraph"><p>In practice, this function is rarely used. When the
-method is <code>POST</code>, <code>PUT</code> or <code>PATCH</code>, the request body
-is often required by the application, which should
-just attempt to read it directly.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">cowboy_req:has_body</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>It returns <code>true</code> if there is a body; <code>false</code> otherwise.</p>
+<p>In practice, this function is rarely used. When the method is <code>POST</code>, <code>PUT</code> or <code>PATCH</code>, the request body is often required by the application, which should just attempt to read it directly.</p>
<h2 id="_request_body_length">Request body length</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>You can obtain the length of the body:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>You can obtain the length of the body:</p>
+<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">Length</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:body_length</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Note that the length may not be known in advance. In
-that case <code>undefined</code> will be returned. This can happen
-with HTTP/1.1&#8217;s chunked transfer-encoding, or HTTP/2
-when no content-length was provided.</p></div>
-<div class="paragraph"><p>Cowboy will update the body length in the Req object
-once the body has been read completely. A length will
-always be returned when attempting to call this function
-after reading the body completely.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Length</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:body_length</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Note that the length may not be known in advance. In that case <code>undefined</code> will be returned. This can happen with HTTP/1.1&apos;s chunked transfer-encoding, or HTTP/2 when no content-length was provided.</p>
+<p>Cowboy will update the body length in the Req object once the body has been read completely. A length will always be returned when attempting to call this function after reading the body completely.</p>
<h2 id="_reading_the_body">Reading the body</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>You can read the entire body with one function call:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>You can read the entire body with one function call:</p>
+<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">ok</span>, <span style="color: #009900">Data</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:read_body</span></span>(<span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Cowboy returns an <code>ok</code> tuple when the body has been
-read fully.</p></div>
-<div class="paragraph"><p>By default, Cowboy will attempt to read up to 8MB
-of data, for up to 15 seconds. The call will return
-once Cowboy has read at least 8MB of data, or at
-the end of the 15 seconds period.</p></div>
-<div class="paragraph"><p>These values can be customized. For example, to read
-only up to 1MB for up to 5 seconds:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#009900">Data</font>, <font color="#009900">Req</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:read_body</font></b>(<font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Cowboy returns an <code>ok</code> tuple when the body has been read fully.</p>
+<p>By default, Cowboy will attempt to read up to 8MB of data, for up to 15 seconds. The call will return once Cowboy has read at least 8MB of data, or at the end of the 15 seconds period.</p>
+<p>These values can be customized. For example, to read only up to 1MB for up to 5 seconds:</p>
+<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">ok</span>, <span style="color: #009900">Data</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:read_body</span></span>(<span style="color: #009900">Req0</span>,
- #{<span style="font-weight: bold"><span style="color: #000080">length</span></span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">1000000</span>, <span style="color: #0000FF">period</span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">5000</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>You may also disable the length limit:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#009900">Data</font>, <font color="#009900">Req</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:read_body</font></b>(<font color="#009900">Req0</font>,
+ #{<b><font color="#000080">length</font></b> <font color="#990000">=&gt;</font> <font color="#993399">1000000</font>, <font color="#0000FF">period</font> <font color="#990000">=&gt;</font> <font color="#993399">5000</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>You may also disable the length limit:</p>
+<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">ok</span>, <span style="color: #009900">Data</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:read_body</span></span>(<span style="color: #009900">Req0</span>, #{<span style="font-weight: bold"><span style="color: #000080">length</span></span> <span style="color: #990000">=&gt;</span> <span style="color: #FF6600">infinity</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>This makes the function wait 15 seconds and return with
-whatever arrived during that period. This is not
-recommended for public facing applications.</p></div>
-<div class="paragraph"><p>These two options can effectively be used to control
-the rate of transmission of the request body.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#009900">Data</font>, <font color="#009900">Req</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:read_body</font></b>(<font color="#009900">Req0</font>, #{<b><font color="#000080">length</font></b> <font color="#990000">=&gt;</font> <font color="#FF6600">infinity</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>This makes the function wait 15 seconds and return with whatever arrived during that period. This is not recommended for public facing applications.</p>
+<p>These two options can effectively be used to control the rate of transmission of the request body.</p>
<h2 id="_streaming_the_body">Streaming the body</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>When the body is too large, the first call will return
-a <code>more</code> tuple instead of <code>ok</code>. You can call the
-function again to read more of the body, reading
-it one chunk at a time.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>When the body is too large, the first call will return a <code>more</code> tuple instead of <code>ok</code>. You can call the function again to read more of the body, reading it one chunk at a time.</p>
+<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_to_console</span></span>(<span style="color: #009900">Req0</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">cowboy_req:read_body</span></span>(<span style="color: #009900">Req0</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Data</span>, <span style="color: #009900">Req</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"</span>, [<span style="color: #009900">Data</span>]),
- <span style="color: #009900">Req</span>;
- {<span style="color: #FF6600">more</span>, <span style="color: #009900">Data</span>, <span style="color: #009900">Req</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"</span>, [<span style="color: #009900">Data</span>]),
- <span style="font-weight: bold"><span style="color: #000000">read_body_to_console</span></span>(<span style="color: #009900">Req</span>)
- <span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>The <code>length</code> and <code>period</code> options can also be used.
-They need to be passed for every call.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">read_body_to_console</font></b>(<font color="#009900">Req0</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">case</font></b> <b><font color="#000000">cowboy_req:read_body</font></b>(<font color="#009900">Req0</font>) <b><font color="#0000FF">of</font></b>
+ {<font color="#FF6600">ok</font>, <font color="#009900">Data</font>, <font color="#009900">Req</font>} <font color="#990000">-&gt;</font>
+ <b><font color="#000000">io:format</font></b>(<font color="#FF0000">"~s"</font>, [<font color="#009900">Data</font>]),
+ <font color="#009900">Req</font>;
+ {<font color="#FF6600">more</font>, <font color="#009900">Data</font>, <font color="#009900">Req</font>} <font color="#990000">-&gt;</font>
+ <b><font color="#000000">io:format</font></b>(<font color="#FF0000">"~s"</font>, [<font color="#009900">Data</font>]),
+ <b><font color="#000000">read_body_to_console</font></b>(<font color="#009900">Req</font>)
+ <b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>The <code>length</code> and <code>period</code> options can also be used. They need to be passed for every call.</p>
<h2 id="_reading_a_form_urlencoded_body">Reading a form urlencoded body</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy provides a convenient function for reading and
-parsing bodies sent as application/x-www-form-urlencoded.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Cowboy provides a convenient function for reading and parsing bodies sent as application/x-www-form-urlencoded.</p>
+<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">ok</span>, <span style="color: #009900">KeyValues</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:read_urlencoded_body</span></span>(<span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>This function returns a list of key/values, exactly like
-the function <code>cowboy_req:parse_qs/1</code>.</p></div>
-<div class="paragraph"><p>The defaults for this function are different. Cowboy will
-read for up to 64KB and up to 5 seconds. They can be modified:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#009900">KeyValues</font>, <font color="#009900">Req</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:read_urlencoded_body</font></b>(<font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>This function returns a list of key/values, exactly like the function <code>cowboy_req:parse_qs/1</code>.</p>
+<p>The defaults for this function are different. Cowboy will read for up to 64KB and up to 5 seconds. They can be modified:</p>
+<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">ok</span>, <span style="color: #009900">KeyValues</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:read_urlencoded_body</span></span>(<span style="color: #009900">Req0</span>,
- #{<span style="font-weight: bold"><span style="color: #000080">length</span></span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">4096</span>, <span style="color: #0000FF">period</span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">3000</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#009900">KeyValues</font>, <font color="#009900">Req</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:read_urlencoded_body</font></b>(<font color="#009900">Req0</font>,
+ #{<b><font color="#000080">length</font></b> <font color="#990000">=&gt;</font> <font color="#993399">4096</font>, <font color="#0000FF">period</font> <font color="#990000">=&gt;</font> <font color="#993399">3000</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+
diff --git a/docs/en/cowboy/2.3/guide/resource_design/index.html b/docs/en/cowboy/2.3/guide/resource_design/index.html
index be567d98..699ebc56 100644
--- a/docs/en/cowboy/2.3/guide/resource_design/index.html
+++ b/docs/en/cowboy/2.3/guide/resource_design/index.html
@@ -62,213 +62,66 @@
<h1 class="lined-header"><span>Designing a resource handler</span></h1>
-<div class="paragraph"><p>This chapter aims to provide you with a list of questions
-you must answer in order to write a good resource handler.
-It is meant to be usable as a step by step guide.</p></div>
-<div class="sect1">
+<p>This chapter aims to provide you with a list of questions you must answer in order to write a good resource handler. It is meant to be usable as a step by step guide.</p>
<h2 id="_the_service">The service</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Can the service become unavailable, and when it does, can
-we detect it? For example, database connectivity problems
-may be detected early. We may also have planned outages
-of all or parts of the system. Implement the
-<code>service_available</code> callback.</p></div>
-<div class="paragraph"><p>What HTTP methods does the service implement? Do we need
-more than the standard OPTIONS, HEAD, GET, PUT, POST,
-PATCH and DELETE? Are we not using one of those at all?
-Implement the <code>known_methods</code> callback.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Can the service become unavailable, and when it does, can we detect it? For example, database connectivity problems may be detected early. We may also have planned outages of all or parts of the system. Implement the <code>service_available</code> callback.</p>
+<p>What HTTP methods does the service implement? Do we need more than the standard OPTIONS, HEAD, GET, PUT, POST, PATCH and DELETE? Are we not using one of those at all? Implement the <code>known_methods</code> callback.</p>
<h2 id="_type_of_resource_handler">Type of resource handler</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Am I writing a handler for a collection of resources,
-or for a single resource?</p></div>
-<div class="paragraph"><p>The semantics for each of these are quite different.
-You should not mix collection and single resource in
-the same handler.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Am I writing a handler for a collection of resources, or for a single resource?</p>
+<p>The semantics for each of these are quite different. You should not mix collection and single resource in the same handler.</p>
<h2 id="_collection_handler">Collection handler</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Skip this section if you are not doing a collection.</p></div>
-<div class="paragraph"><p>Is the collection hardcoded or dynamic? For example,
-if you use the route <code>/users</code> for the collection of
-users then the collection is hardcoded; if you use
-<code>/forums/:category</code> for the collection of threads
-then it isn&#8217;t. When the collection is hardcoded you
-can safely assume the resource always exists.</p></div>
-<div class="paragraph"><p>What methods should I implement?</p></div>
-<div class="paragraph"><p>OPTIONS is used to get some information about the
-collection. It is recommended to allow it even if you
-do not implement it, as Cowboy has a default
-implementation built-in.</p></div>
-<div class="paragraph"><p>HEAD and GET are used to retrieve the collection.
-If you allow GET, also allow HEAD as there&#8217;s no extra
-work required to make it work.</p></div>
-<div class="paragraph"><p>POST is used to create a new resource inside the
-collection. Creating a resource by using POST on
-the collection is useful when resources may be
-created before knowing their URI, usually because
-parts of it are generated dynamically. A common
-case is some kind of auto incremented integer
-identifier.</p></div>
-<div class="paragraph"><p>The next methods are more rarely allowed.</p></div>
-<div class="paragraph"><p>PUT is used to create a new collection (when
-the collection isn&#8217;t hardcoded), or replace
-the entire collection.</p></div>
-<div class="paragraph"><p>DELETE is used to delete the entire collection.</p></div>
-<div class="paragraph"><p>PATCH is used to modify the collection using
-instructions given in the request body. A PATCH
-operation is atomic. The PATCH operation may
-be used for such things as reordering; adding,
-modifying or deleting parts of the collection.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Skip this section if you are not doing a collection.</p>
+<p>Is the collection hardcoded or dynamic? For example, if you use the route <code>/users</code> for the collection of users then the collection is hardcoded; if you use <code>/forums/:category</code> for the collection of threads then it isn&apos;t. When the collection is hardcoded you can safely assume the resource always exists.</p>
+<p>What methods should I implement?</p>
+<p>OPTIONS is used to get some information about the collection. It is recommended to allow it even if you do not implement it, as Cowboy has a default implementation built-in.</p>
+<p>HEAD and GET are used to retrieve the collection. If you allow GET, also allow HEAD as there&apos;s no extra work required to make it work.</p>
+<p>POST is used to create a new resource inside the collection. Creating a resource by using POST on the collection is useful when resources may be created before knowing their URI, usually because parts of it are generated dynamically. A common case is some kind of auto incremented integer identifier.</p>
+<p>The next methods are more rarely allowed.</p>
+<p>PUT is used to create a new collection (when the collection isn&apos;t hardcoded), or replace the entire collection.</p>
+<p>DELETE is used to delete the entire collection.</p>
+<p>PATCH is used to modify the collection using instructions given in the request body. A PATCH operation is atomic. The PATCH operation may be used for such things as reordering; adding, modifying or deleting parts of the collection.</p>
<h2 id="_single_resource_handler">Single resource handler</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Skip this section if you are doing a collection.</p></div>
-<div class="paragraph"><p>What methods should I implement?</p></div>
-<div class="paragraph"><p>OPTIONS is used to get some information about the
-resource. It is recommended to allow it even if you
-do not implement it, as Cowboy has a default
-implementation built-in.</p></div>
-<div class="paragraph"><p>HEAD and GET are used to retrieve the resource.
-If you allow GET, also allow HEAD as there&#8217;s no extra
-work required to make it work.</p></div>
-<div class="paragraph"><p>POST is used to update the resource.</p></div>
-<div class="paragraph"><p>PUT is used to create a new resource (when it doesn&#8217;t
-already exist) or replace the resource.</p></div>
-<div class="paragraph"><p>DELETE is used to delete the resource.</p></div>
-<div class="paragraph"><p>PATCH is used to modify the resource using
-instructions given in the request body. A PATCH
-operation is atomic. The PATCH operation may
-be used for adding, removing or modifying specific
-values in the resource.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Skip this section if you are doing a collection.</p>
+<p>What methods should I implement?</p>
+<p>OPTIONS is used to get some information about the resource. It is recommended to allow it even if you do not implement it, as Cowboy has a default implementation built-in.</p>
+<p>HEAD and GET are used to retrieve the resource. If you allow GET, also allow HEAD as there&apos;s no extra work required to make it work.</p>
+<p>POST is used to update the resource.</p>
+<p>PUT is used to create a new resource (when it doesn&apos;t already exist) or replace the resource.</p>
+<p>DELETE is used to delete the resource.</p>
+<p>PATCH is used to modify the resource using instructions given in the request body. A PATCH operation is atomic. The PATCH operation may be used for adding, removing or modifying specific values in the resource.</p>
<h2 id="_the_resource">The resource</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Following the above discussion, implement the
-<code>allowed_methods</code> callback.</p></div>
-<div class="paragraph"><p>Does the resource always exist? If it may not, implement
-the <code>resource_exists</code> callback.</p></div>
-<div class="paragraph"><p>Do I need to authenticate the client before they can
-access the resource? What authentication mechanisms
-should I provide? This may include form-based, token-based
-(in the URL or a cookie), HTTP basic, HTTP digest,
-SSL certificate or any other form of authentication.
-Implement the <code>is_authorized</code> callback.</p></div>
-<div class="paragraph"><p>Do I need fine-grained access control? How do I determine
-that they are authorized access? Handle that in your
-<code>is_authorized</code> callback.</p></div>
-<div class="paragraph"><p>Can access to a resource be forbidden regardless of access
-being authorized? A simple example of that is censorship
-of a resource. Implement the <code>forbidden</code> callback.</p></div>
-<div class="paragraph"><p>Are there any constraints on the length of the resource URI?
-For example, the URI may be used as a key in storage and may
-have a limit in length. Implement <code>uri_too_long</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Following the above discussion, implement the <code>allowed_methods</code> callback.</p>
+<p>Does the resource always exist? If it may not, implement the <code>resource_exists</code> callback.</p>
+<p>Do I need to authenticate the client before they can access the resource? What authentication mechanisms should I provide? This may include form-based, token-based (in the URL or a cookie), HTTP basic, HTTP digest, SSL certificate or any other form of authentication. Implement the <code>is_authorized</code> callback.</p>
+<p>Do I need fine-grained access control? How do I determine that they are authorized access? Handle that in your <code>is_authorized</code> callback.</p>
+<p>Can access to a resource be forbidden regardless of access being authorized? A simple example of that is censorship of a resource. Implement the <code>forbidden</code> callback.</p>
+<p>Are there any constraints on the length of the resource URI? For example, the URI may be used as a key in storage and may have a limit in length. Implement <code>uri_too_long</code>.</p>
<h2 id="_representations">Representations</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>What media types do I provide? If text based, what charsets
-are provided? What languages do I provide?</p></div>
-<div class="paragraph"><p>Implement the mandatory <code>content_types_provided</code>. Prefix
-the callbacks with <code>to_</code> for clarity. For example, <code>to_html</code>
-or <code>to_text</code>.</p></div>
-<div class="paragraph"><p>Implement the <code>languages_provided</code> or <code>charsets_provided</code>
-callbacks if applicable.</p></div>
-<div class="paragraph"><p>Is there any other header that may make the representation
-of the resource vary? Implement the <code>variances</code> callback.</p></div>
-<div class="paragraph"><p>Depending on your choices for caching content, you may
-want to implement one or more of the <code>generate_etag</code>,
-<code>last_modified</code> and <code>expires</code> callbacks.</p></div>
-<div class="paragraph"><p>Do I want the user or user agent to actively choose a
-representation available? Send a list of available
-representations in the response body and implement
-the <code>multiple_choices</code> callback.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>What media types do I provide? If text based, what charsets are provided? What languages do I provide?</p>
+<p>Implement the mandatory <code>content_types_provided</code>. Prefix the callbacks with <code>to_</code> for clarity. For example, <code>to_html</code> or <code>to_text</code>.</p>
+<p>Implement the <code>languages_provided</code> or <code>charsets_provided</code> callbacks if applicable.</p>
+<p>Is there any other header that may make the representation of the resource vary? Implement the <code>variances</code> callback.</p>
+<p>Depending on your choices for caching content, you may want to implement one or more of the <code>generate_etag</code>, <code>last_modified</code> and <code>expires</code> callbacks.</p>
+<p>Do I want the user or user agent to actively choose a representation available? Send a list of available representations in the response body and implement the <code>multiple_choices</code> callback.</p>
<h2 id="_redirections">Redirections</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Do I need to keep track of what resources were deleted?
-For example, you may have a mechanism where moving a
-resource leaves a redirect link to its new location.
-Implement the <code>previously_existed</code> callback.</p></div>
-<div class="paragraph"><p>Was the resource moved, and is the move temporary? If
-it is explicitly temporary, for example due to maintenance,
-implement the <code>moved_temporarily</code> callback. Otherwise,
-implement the <code>moved_permanently</code> callback.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Do I need to keep track of what resources were deleted? For example, you may have a mechanism where moving a resource leaves a redirect link to its new location. Implement the <code>previously_existed</code> callback.</p>
+<p>Was the resource moved, and is the move temporary? If it is explicitly temporary, for example due to maintenance, implement the <code>moved_temporarily</code> callback. Otherwise, implement the <code>moved_permanently</code> callback.</p>
<h2 id="_the_request">The request</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Do you need to read the query string? Individual headers?
-Implement <code>malformed_request</code> and do all the parsing and
-validation in this function. Note that the body should not
-be read at this point.</p></div>
-<div class="paragraph"><p>May there be a request body? Will I know its size?
-What&#8217;s the maximum size of the request body I&#8217;m willing
-to accept? Implement <code>valid_entity_length</code>.</p></div>
-<div class="paragraph"><p>Finally, take a look at the sections corresponding to the
-methods you are implementing.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Do you need to read the query string? Individual headers? Implement <code>malformed_request</code> and do all the parsing and validation in this function. Note that the body should not be read at this point.</p>
+<p>May there be a request body? Will I know its size? What&apos;s the maximum size of the request body I&apos;m willing to accept? Implement <code>valid_entity_length</code>.</p>
+<p>Finally, take a look at the sections corresponding to the methods you are implementing.</p>
<h2 id="_options_method">OPTIONS method</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy by default will send back a list of allowed methods.
-Do I need to add more information to the response? Implement
-the <code>options</code> method.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Cowboy by default will send back a list of allowed methods. Do I need to add more information to the response? Implement the <code>options</code> method.</p>
<h2 id="_get_and_head_methods">GET and HEAD methods</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>If you implement the methods GET and/or HEAD, you must
-implement one <code>ProvideResource</code> callback for each
-content-type returned by the <code>content_types_provided</code>
-callback.</p></div>
-</div>
-</div>
-<div class="sect1">
-<h2 id="_put_post_and_patch_methods">PUT, POST and PATCH methods</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>If you implement the methods PUT, POST and/or PATCH,
-you must implement the <code>content_types_accepted</code> callback,
-and one <code>AcceptCallback</code> callback for each content-type
-it returns. Prefix the <code>AcceptCallback</code> callback names
-with <code>from_</code> for clarity. For example, <code>from_html</code> or
-<code>from_json</code>.</p></div>
-<div class="paragraph"><p>Do we want to allow the POST method to create individual
-resources directly through their URI (like PUT)? Implement
-the <code>allow_missing_post</code> callback. It is recommended to
-explicitly use PUT in these cases instead.</p></div>
-<div class="paragraph"><p>May there be conflicts when using PUT to create or replace
-a resource? Do we want to make sure that two updates around
-the same time are not cancelling one another? Implement the
-<code>is_conflict</code> callback.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>If you implement the methods GET and/or HEAD, you must implement one <code>ProvideResource</code> callback for each content-type returned by the <code>content_types_provided</code> callback.</p>
+<h2 id="_put__post_and_patch_methods">PUT, POST and PATCH methods</h2>
+<p>If you implement the methods PUT, POST and/or PATCH, you must implement the <code>content_types_accepted</code> callback, and one <code>AcceptCallback</code> callback for each content-type it returns. Prefix the <code>AcceptCallback</code> callback names with <code>from_</code> for clarity. For example, <code>from_html</code> or <code>from_json</code>.</p>
+<p>Do we want to allow the POST method to create individual resources directly through their URI (like PUT)? Implement the <code>allow_missing_post</code> callback. It is recommended to explicitly use PUT in these cases instead.</p>
+<p>May there be conflicts when using PUT to create or replace a resource? Do we want to make sure that two updates around the same time are not cancelling one another? Implement the <code>is_conflict</code> callback.</p>
<h2 id="_delete_methods">DELETE methods</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>If you implement the method DELETE, you must implement
-the <code>delete_resource</code> callback.</p></div>
-<div class="paragraph"><p>When <code>delete_resource</code> returns, is the resource completely
-removed from the server, including from any caching service?
-If not, and/or if the deletion is asynchronous and we have
-no way of knowing it has been completed yet, implement the
-<code>delete_completed</code> callback.</p></div>
-</div>
-</div>
+<p>If you implement the method DELETE, you must implement the <code>delete_resource</code> callback.</p>
+<p>When <code>delete_resource</code> returns, is the resource completely removed from the server, including from any caching service? If not, and/or if the deletion is asynchronous and we have no way of knowing it has been completed yet, implement the <code>delete_completed</code> callback.</p>
+
diff --git a/docs/en/cowboy/2.3/guide/resp/index.html b/docs/en/cowboy/2.3/guide/resp/index.html
index bc1a04ea..2fb3f064 100644
--- a/docs/en/cowboy/2.3/guide/resp/index.html
+++ b/docs/en/cowboy/2.3/guide/resp/index.html
@@ -62,373 +62,249 @@
<h1 class="lined-header"><span>Sending a response</span></h1>
-<div class="paragraph"><p>The response must be sent using the Req object.</p></div>
-<div class="paragraph"><p>Cowboy provides two different ways of sending responses:
-either directly or by streaming the body. Response headers
-and body may be set in advance. The response is sent as
-soon as one of the reply or stream reply function is
-called.</p></div>
-<div class="paragraph"><p>Cowboy also provides a simplified interface for sending
-files. It can also send only specific parts of a file.</p></div>
-<div class="paragraph"><p>While only one response is allowed for every request,
-HTTP/2 introduced a mechanism that allows the server
-to push additional resources related to the response.
-This chapter also describes how this feature works in
-Cowboy.</p></div>
-<div class="sect1">
+<p>The response must be sent using the Req object.</p>
+<p>Cowboy provides two different ways of sending responses: either directly or by streaming the body. Response headers and body may be set in advance. The response is sent as soon as one of the reply or stream reply function is called.</p>
+<p>Cowboy also provides a simplified interface for sending files. It can also send only specific parts of a file.</p>
+<p>While only one response is allowed for every request, HTTP/2 introduced a mechanism that allows the server to push additional resources related to the response. This chapter also describes how this feature works in Cowboy.</p>
<h2 id="_reply">Reply</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy provides three functions for sending the entire reply,
-depending on whether you need to set headers and body. In all
-cases, Cowboy will add any headers required by the protocol
-(for example the date header will always be sent).</p></div>
-<div class="paragraph"><p>When you need to set only the status code,
-use <code>cowboy_req:reply/2</code>:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Cowboy provides three functions for sending the entire reply, depending on whether you need to set headers and body. In all cases, Cowboy will add any headers required by the protocol (for example the date header will always be sent).</p>
+<p>When you need to set only the status code, use <code>cowboy_req:reply/2</code>:</p>
+<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">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">200</span>, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>When you need to set response headers at the same time,
-use <code>cowboy_req:reply/3</code>:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:reply</font></b>(<font color="#993399">200</font>, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>When you need to set response headers at the same time, use <code>cowboy_req:reply/3</code>:</p>
+<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">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">303</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="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"https://ninenines.eu"</span><span style="color: #990000">&gt;&gt;</span>
-}, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Note that the header name must always be a lowercase
-binary.</p></div>
-<div class="paragraph"><p>When you also need to set the response body,
-use <code>cowboy_req:reply/4</code>:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:reply</font></b>(<font color="#993399">303</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"location"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"https://ninenines.eu"</font><font color="#990000">&gt;&gt;</font>
+}, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Note that the header name must always be a lowercase binary.</p>
+<p>When you also need to set the response body, use <code>cowboy_req:reply/4</code>:</p>
+<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">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">200</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/plain"</span><span style="color: #990000">&gt;&gt;</span>
-}, <span style="color: #FF0000">"Hello world!"</span>, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>You should always set the content-type header when the
-response has a body. There is however no need to set
-the content-length header; Cowboy does it automatically.</p></div>
-<div class="paragraph"><p>The response body and the header values must be either
-a binary or an iolist. An iolist is a list containing
-binaries, characters, strings or other iolists. This
-allows you to build a response from different parts
-without having to do any concatenation:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:reply</font></b>(<font color="#993399">200</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/plain"</font><font color="#990000">&gt;&gt;</font>
+}, <font color="#FF0000">"Hello world!"</font>, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>You should always set the content-type header when the response has a body. There is however no need to set the content-length header; Cowboy does it automatically.</p>
+<p>The response body and the header values must be either a binary or an iolist. An iolist is a list containing binaries, characters, strings or other iolists. This allows you to build a response from different parts without having to do any concatenation:</p>
+<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">Title</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"Hello world!"</span>,
-<span style="color: #009900">Body</span> <span style="color: #990000">=</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Hats off!"</span><span style="color: #990000">&gt;&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">200</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/html"</span><span style="color: #990000">&gt;&gt;</span>
-}, [<span style="color: #FF0000">"&lt;html&gt;&lt;head&gt;&lt;title&gt;"</span>, <span style="color: #009900">Title</span>, <span style="color: #FF0000">"&lt;/title&gt;&lt;/head&gt;"</span>,
- <span style="color: #FF0000">"&lt;body&gt;&lt;p&gt;"</span>, <span style="color: #009900">Body</span>, <span style="color: #FF0000">"&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;"</span>], <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>This method of building responses is more efficient than
-concatenating. Behind the scenes, each element of the list
-is simply a pointer, and those pointers are used directly
-when writing to the socket.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Title</font> <font color="#990000">=</font> <font color="#FF0000">"Hello world!"</font>,
+<font color="#009900">Body</font> <font color="#990000">=</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"Hats off!"</font><font color="#990000">&gt;&gt;</font>,
+<font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:reply</font></b>(<font color="#993399">200</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/html"</font><font color="#990000">&gt;&gt;</font>
+}, [<font color="#FF0000">"&lt;html&gt;&lt;head&gt;&lt;title&gt;"</font>, <font color="#009900">Title</font>, <font color="#FF0000">"&lt;/title&gt;&lt;/head&gt;"</font>,
+ <font color="#FF0000">"&lt;body&gt;&lt;p&gt;"</font>, <font color="#009900">Body</font>, <font color="#FF0000">"&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;"</font>], <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>This method of building responses is more efficient than concatenating. Behind the scenes, each element of the list is simply a pointer, and those pointers are used directly when writing to the socket.</p>
<h2 id="_stream_reply">Stream reply</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy provides two functions for initiating a response,
-and an additional function for streaming the response body.
-Cowboy will add any required headers to the response.</p></div>
-<div class="paragraph"><p>When you need to set only the status code,
-use <code>cowboy_req:stream_reply/2</code>:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Cowboy provides two functions for initiating a response, and an additional function for streaming the response body. Cowboy will add any required headers to the response.</p>
+<!-- @todo For HTTP/1.1 Cowboy should probably not use chunked transfer-encoding if the content-length is set.-->
+<p>When you need to set only the status code, use <code>cowboy_req:stream_reply/2</code>:</p>
+<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">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_reply</span></span>(<span style="color: #993399">200</span>, <span style="color: #009900">Req0</span>),
-
-<span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_body</span></span>(<span style="color: #FF0000">"Hello..."</span>, <span style="color: #FF6600">nofin</span>, <span style="color: #009900">Req</span>),
-<span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_body</span></span>(<span style="color: #FF0000">"chunked..."</span>, <span style="color: #FF6600">nofin</span>, <span style="color: #009900">Req</span>),
-<span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_body</span></span>(<span style="color: #FF0000">"world!!"</span>, <span style="color: #FF6600">fin</span>, <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>The second argument to <code>cowboy_req:stream_body/3</code> indicates
-whether this data terminates the body. Use <code>fin</code> for the
-final flag, and <code>nofin</code> otherwise.</p></div>
-<div class="paragraph"><p>This snippet does not set a content-type header. This is
-not recommended. All responses with a body should have
-a content-type. The header can be set beforehand, or
-using the <code>cowboy_req:stream_reply/3</code>:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:stream_reply</font></b>(<font color="#993399">200</font>, <font color="#009900">Req0</font>),
+
+<b><font color="#000000">cowboy_req:stream_body</font></b>(<font color="#FF0000">"Hello..."</font>, <font color="#FF6600">nofin</font>, <font color="#009900">Req</font>),
+<b><font color="#000000">cowboy_req:stream_body</font></b>(<font color="#FF0000">"chunked..."</font>, <font color="#FF6600">nofin</font>, <font color="#009900">Req</font>),
+<b><font color="#000000">cowboy_req:stream_body</font></b>(<font color="#FF0000">"world!!"</font>, <font color="#FF6600">fin</font>, <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>The second argument to <code>cowboy_req:stream_body/3</code> indicates whether this data terminates the body. Use <code>fin</code> for the final flag, and <code>nofin</code> otherwise.</p>
+<p>This snippet does not set a content-type header. This is not recommended. All responses with a body should have a content-type. The header can be set beforehand, or using the <code>cowboy_req:stream_reply/3</code>:</p>
+<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">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_reply</span></span>(<span style="color: #993399">200</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/html"</span><span style="color: #990000">&gt;&gt;</span>
-}, <span style="color: #009900">Req0</span>),
-
-<span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_body</span></span>(<span style="color: #FF0000">"&lt;html&gt;&lt;head&gt;Hello world!&lt;/head&gt;"</span>, <span style="color: #FF6600">nofin</span>, <span style="color: #009900">Req</span>),
-<span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_body</span></span>(<span style="color: #FF0000">"&lt;body&gt;&lt;p&gt;Hats off!&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;"</span>, <span style="color: #FF6600">fin</span>, <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>HTTP provides a few different ways to stream response bodies.
-Cowboy will select the most appropriate one based on the HTTP
-version and the request and response headers.</p></div>
-<div class="paragraph"><p>While not required by any means, it is recommended that you
-set the content-length header in the response if you know it
-in advance. This will ensure that the best response method
-is selected and help clients understand when the response
-is fully received.</p></div>
-<div class="paragraph"><p>Cowboy also provides a function to send response trailers.
-Response trailers are semantically equivalent to the headers
-you send in the response, only they are sent at the end.
-This is especially useful to attach information to the
-response that could not be generated until the response
-body was fully generated.</p></div>
-<div class="paragraph"><p>Trailer fields must be listed in the trailer header. Any
-field not listed might be dropped by the client or an intermediary.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:stream_reply</font></b>(<font color="#993399">200</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/html"</font><font color="#990000">&gt;&gt;</font>
+}, <font color="#009900">Req0</font>),
+
+<b><font color="#000000">cowboy_req:stream_body</font></b>(<font color="#FF0000">"&lt;html&gt;&lt;head&gt;Hello world!&lt;/head&gt;"</font>, <font color="#FF6600">nofin</font>, <font color="#009900">Req</font>),
+<b><font color="#000000">cowboy_req:stream_body</font></b>(<font color="#FF0000">"&lt;body&gt;&lt;p&gt;Hats off!&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;"</font>, <font color="#FF6600">fin</font>, <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>HTTP provides a few different ways to stream response bodies. Cowboy will select the most appropriate one based on the HTTP version and the request and response headers.</p>
+<p>While not required by any means, it is recommended that you set the content-length header in the response if you know it in advance. This will ensure that the best response method is selected and help clients understand when the response is fully received.</p>
+<p>Cowboy also provides a function to send response trailers. Response trailers are semantically equivalent to the headers you send in the response, only they are sent at the end. This is especially useful to attach information to the response that could not be generated until the response body was fully generated.</p>
+<p>Trailer fields must be listed in the trailer header. Any field not listed might be dropped by the client or an intermediary.</p>
+<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">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_reply</span></span>(<span style="color: #993399">200</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/html"</span><span style="color: #990000">&gt;&gt;</span>,
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"trailer"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"expires, content-md5"</span><span style="color: #990000">&gt;&gt;</span>
-}, <span style="color: #009900">Req0</span>),
-
-<span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_body</span></span>(<span style="color: #FF0000">"&lt;html&gt;&lt;head&gt;Hello world!&lt;/head&gt;"</span>, <span style="color: #FF6600">nofin</span>, <span style="color: #009900">Req</span>),
-<span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_body</span></span>(<span style="color: #FF0000">"&lt;body&gt;&lt;p&gt;Hats off!&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;"</span>, <span style="color: #FF6600">nofin</span>, <span style="color: #009900">Req</span>),
-
-<span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_trailers</span></span>(#{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"expires"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Sun, 10 Dec 2017 19:13:47 GMT"</span><span style="color: #990000">&gt;&gt;</span>,
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-md5"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"c6081d20ff41a42ce17048ed1c0345e2"</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="paragraph"><p>The stream ends with trailers. It is no longer possible to
-send data after sending trailers. You cannot send trailers
-after setting the <code>fin</code> flag when streaming the body.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:stream_reply</font></b>(<font color="#993399">200</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/html"</font><font color="#990000">&gt;&gt;</font>,
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"trailer"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"expires, content-md5"</font><font color="#990000">&gt;&gt;</font>
+}, <font color="#009900">Req0</font>),
+
+<b><font color="#000000">cowboy_req:stream_body</font></b>(<font color="#FF0000">"&lt;html&gt;&lt;head&gt;Hello world!&lt;/head&gt;"</font>, <font color="#FF6600">nofin</font>, <font color="#009900">Req</font>),
+<b><font color="#000000">cowboy_req:stream_body</font></b>(<font color="#FF0000">"&lt;body&gt;&lt;p&gt;Hats off!&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;"</font>, <font color="#FF6600">nofin</font>, <font color="#009900">Req</font>),
+
+<b><font color="#000000">cowboy_req:stream_trailers</font></b>(#{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"expires"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"Sun, 10 Dec 2017 19:13:47 GMT"</font><font color="#990000">&gt;&gt;</font>,
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-md5"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"c6081d20ff41a42ce17048ed1c0345e2"</font><font color="#990000">&gt;&gt;</font>
+}, <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>The stream ends with trailers. It is no longer possible to send data after sending trailers. You cannot send trailers after setting the <code>fin</code> flag when streaming the body.</p>
<h2 id="_preset_response_headers">Preset response headers</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy provides functions to set response headers without
-immediately sending them. They are stored in the Req object
-and sent as part of the response when a reply function is
-called.</p></div>
-<div class="paragraph"><p>To set response headers:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Cowboy provides functions to set response headers without immediately sending them. They are stored in the Req object and sent as part of the response when a reply function is called.</p>
+<p>To set response headers:</p>
+<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">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"allow"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #FF0000">"GET"</span>, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Header names must be a lowercase binary.</p></div>
-<div class="paragraph"><p>Do not use this function for setting cookies. Refer to
-the <a href="../cookies">Cookies</a> chapter for more information.</p></div>
-<div class="paragraph"><p>To check if a response header has already been set:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"allow"</font><font color="#990000">&gt;&gt;</font>, <font color="#FF0000">"GET"</font>, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Header names must be a lowercase binary.</p>
+<p>Do not use this function for setting cookies. Refer to the <a href="../cookies">Cookies</a> chapter for more information.</p>
+<p>To check if a response header has already been set:</p>
+<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">cowboy_req:has_resp_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"allow"</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="paragraph"><p>It returns <code>true</code> if the header was set, <code>false</code> otherwise.</p></div>
-<div class="paragraph"><p>To delete a response header that was set previously:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">cowboy_req:has_resp_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"allow"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>It returns <code>true</code> if the header was set, <code>false</code> otherwise.</p>
+<p>To delete a response header that was set previously:</p>
+<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">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:delete_resp_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"allow"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:delete_resp_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"allow"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_overriding_headers">Overriding headers</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>As Cowboy provides different ways of setting response
-headers and body, clashes may occur, so it&#8217;s important
-to understand what happens when a header is set twice.</p></div>
-<div class="paragraph"><p>Headers come from five different origins:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-Protocol-specific headers (for example HTTP/1.1&#8217;s connection header)
-</p>
+<p>As Cowboy provides different ways of setting response headers and body, clashes may occur, so it&apos;s important to understand what happens when a header is set twice.</p>
+<p>Headers come from five different origins:</p>
+<ul><li>Protocol-specific headers (for example HTTP/1.1&apos;s connection header)
</li>
-<li>
-<p>
-Other required headers (for example the date header)
-</p>
+<li>Other required headers (for example the date header)
</li>
-<li>
-<p>
-Preset headers
-</p>
+<li>Preset headers
</li>
-<li>
-<p>
-Headers given to the reply function
-</p>
+<li>Headers given to the reply function
</li>
-<li>
-<p>
-Set-cookie headers
-</p>
+<li>Set-cookie headers
</li>
-</ul></div>
-<div class="paragraph"><p>Cowboy does not allow overriding protocol-specific headers.</p></div>
-<div class="paragraph"><p>Set-cookie headers will always be appended at the end of
-the list of headers before sending the response.</p></div>
-<div class="paragraph"><p>Headers given to the reply function will always override
-preset headers and required headers. If a header is found
-in two or three of these, then the one in the reply function
-is picked and the others are dropped.</p></div>
-<div class="paragraph"><p>Similarly, preset headers will always override required
-headers.</p></div>
-<div class="paragraph"><p>To illustrate, look at the following snippet. Cowboy by
-default sends the server header with the value "Cowboy".
-We can override it:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+</ul>
+<p>Cowboy does not allow overriding protocol-specific headers.</p>
+<p>Set-cookie headers will always be appended at the end of the list of headers before sending the response.</p>
+<p>Headers given to the reply function will always override preset headers and required headers. If a header is found in two or three of these, then the one in the reply function is picked and the others are dropped.</p>
+<p>Similarly, preset headers will always override required headers.</p>
+<p>To illustrate, look at the following snippet. Cowboy by default sends the server header with the value &quot;Cowboy&quot;. We can override it:</p>
+<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">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">200</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"server"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"yaws"</span><span style="color: #990000">&gt;&gt;</span>
-}, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:reply</font></b>(<font color="#993399">200</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"server"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"yaws"</font><font color="#990000">&gt;&gt;</font>
+}, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_preset_response_body">Preset response body</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy provides functions to set the response body without
-immediately sending it. It is stored in the Req object and
-sent when the reply function is called.</p></div>
-<div class="paragraph"><p>To set the response body:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Cowboy provides functions to set the response body without immediately sending it. It is stored in the Req object and sent when the reply function is called.</p>
+<p>To set the response body:</p>
+<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">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_body</span></span>(<span style="color: #FF0000">"Hello world!"</span>, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>To check if a response body has already been set:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_body</font></b>(<font color="#FF0000">"Hello world!"</font>, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<!-- @todo Yeah we probably should add that function that-->
+<!-- also sets the content-type at the same time...-->
+<p>To check if a response body has already been set:</p>
+<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">cowboy_req:has_resp_body</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>It returns <code>true</code> if the body was set and is non-empty,
-<code>false</code> otherwise.</p></div>
-<div class="paragraph"><p>The preset response body is only sent if the reply function
-used is <code>cowboy_req:reply/2</code> or <code>cowboy_req:reply/3</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">cowboy_req:has_resp_body</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>It returns <code>true</code> if the body was set and is non-empty, <code>false</code> otherwise.</p>
+<!-- @todo We probably should also have a function that-->
+<!-- properly removes the response body, including any-->
+<!-- content-* headers.-->
+<p>The preset response body is only sent if the reply function used is <code>cowboy_req:reply/2</code> or <code>cowboy_req:reply/3</code>.</p>
<h2 id="_sending_files">Sending files</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy provides a shortcut for sending files. When
-using <code>cowboy_req:reply/4</code>, or when presetting the
-response header, you can give a <code>sendfile</code> tuple to
-Cowboy:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Cowboy provides a shortcut for sending files. When using <code>cowboy_req:reply/4</code>, or when presetting the response header, you can give a <code>sendfile</code> tuple to Cowboy:</p>
+<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">sendfile</span>, <span style="color: #009900">Offset</span>, <span style="color: #009900">Length</span>, <span style="color: #009900">Filename</span>}</tt></pre></div></div>
-<div class="paragraph"><p>Depending on the values for <code>Offset</code> or <code>Length</code>, the
-entire file may be sent, or just a part of it.</p></div>
-<div class="paragraph"><p>The length is required even for sending the entire file.
-Cowboy sends it in the content-length header.</p></div>
-<div class="paragraph"><p>To send a file while replying:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>{<font color="#FF6600">sendfile</font>, <font color="#009900">Offset</font>, <font color="#009900">Length</font>, <font color="#009900">Filename</font>}</tt></pre>
+</div></div>
+<p>Depending on the values for <code>Offset</code> or <code>Length</code>, the entire file may be sent, or just a part of it.</p>
+<p>The length is required even for sending the entire file. Cowboy sends it in the content-length header.</p>
+<p>To send a file while replying:</p>
+<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">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">200</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #FF0000">"image/png"</span>
-}, {<span style="color: #FF6600">sendfile</span>, <span style="color: #993399">0</span>, <span style="color: #993399">12345</span>, <span style="color: #FF0000">"path/to/logo.png"</span>}, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:reply</font></b>(<font color="#993399">200</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#FF0000">"image/png"</font>
+}, {<font color="#FF6600">sendfile</font>, <font color="#993399">0</font>, <font color="#993399">12345</font>, <font color="#FF0000">"path/to/logo.png"</font>}, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<!-- @todo An example of presetting a file would be useful,-->
+<!-- but let&apos;s wait for the function that can set the-->
+<!-- content-type at the same time.-->
+<!-- @todo What about streaming many files? For example-->
+<!-- it should be possible to build a tar file on the fly-->
+<!-- while still using sendfile. Another example could be-->
+<!-- proper support for multipart byte ranges. Yet another-->
+<!-- example would be automatic concatenation of CSS or JS-->
+<!-- files.-->
<h2 id="_informational_responses">Informational responses</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy allows you to send informational responses.</p></div>
-<div class="paragraph"><p>Informational responses are responses that have a status
-code between 100 and 199. Any number can be sent before
-the proper response. Sending an informational response
-does not change the behavior of the proper response, and
-clients are expected to ignore any informational response
-they do not understand.</p></div>
-<div class="paragraph"><p>The following snippet sends a 103 informational response
-with some headers that are expected to be in the final
-response.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Cowboy allows you to send informational responses.</p>
+<p>Informational responses are responses that have a status code between 100 and 199. Any number can be sent before the proper response. Sending an informational response does not change the behavior of the proper response, and clients are expected to ignore any informational response they do not understand.</p>
+<p>The following snippet sends a 103 informational response with some headers that are expected to be in the final response.</p>
+<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">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:inform</span></span>(<span style="color: #993399">103</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"link"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"&lt;/style.css&gt;; rel=preload; as=style, &lt;/script.js&gt;; rel=preload; as=script"</span><span style="color: #990000">&gt;&gt;</span>
-}, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:inform</font></b>(<font color="#993399">103</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"link"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"&lt;/style.css&gt;; rel=preload; as=style, &lt;/script.js&gt;; rel=preload; as=script"</font><font color="#990000">&gt;&gt;</font>
+}, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_push">Push</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The HTTP/2 protocol introduced the ability to push resources
-related to the one sent in the response. Cowboy provides two
-functions for that purpose: <code>cowboy_req:push/3,4</code>.</p></div>
-<div class="paragraph"><p>Push is only available for HTTP/2. Cowboy will automatically
-ignore push requests if the protocol doesn&#8217;t support it.</p></div>
-<div class="paragraph"><p>The push function must be called before any of the reply
-functions. Doing otherwise will result in a crash.</p></div>
-<div class="paragraph"><p>To push a resource, you need to provide the same information
-as a client performing a request would. This includes the
-HTTP method, the URI and any necessary request headers.</p></div>
-<div class="paragraph"><p>Cowboy by default only requires you to give the path to
-the resource and the request headers. The rest of the URI
-is taken from the current request (excluding the query
-string, set to empty) and the method is GET by default.</p></div>
-<div class="paragraph"><p>The following snippet pushes a CSS file that is linked to
-in the response:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The HTTP/2 protocol introduced the ability to push resources related to the one sent in the response. Cowboy provides two functions for that purpose: <code>cowboy_req:push/3,4</code>.</p>
+<p>Push is only available for HTTP/2. Cowboy will automatically ignore push requests if the protocol doesn&apos;t support it.</p>
+<p>The push function must be called before any of the reply functions. Doing otherwise will result in a crash.</p>
+<p>To push a resource, you need to provide the same information as a client performing a request would. This includes the HTTP method, the URI and any necessary request headers.</p>
+<p>Cowboy by default only requires you to give the path to the resource and the request headers. The rest of the URI is taken from the current request (excluding the query string, set to empty) and the method is GET by default.</p>
+<p>The following snippet pushes a CSS file that is linked to in the response:</p>
+<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">cowboy_req:push</span></span>(<span style="color: #FF0000">"/static/style.css"</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"accept"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/css"</span><span style="color: #990000">&gt;&gt;</span>
-}, <span style="color: #009900">Req0</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">200</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/html"</span><span style="color: #990000">&gt;&gt;</span>
-}, [<span style="color: #FF0000">"&lt;html&gt;&lt;head&gt;&lt;title&gt;My web page&lt;/title&gt;"</span>,
- <span style="color: #FF0000">"&lt;link rel='stylesheet' type='text/css' href='/static/style.css'&gt;"</span>,
- <span style="color: #FF0000">"&lt;body&gt;&lt;p&gt;Welcome to Erlang!&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;"</span>], <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>To override the method, scheme, host, port or query string,
-simply pass in a fourth argument. The following snippet
-uses a different host name:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">cowboy_req:push</font></b>(<font color="#FF0000">"/static/style.css"</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"accept"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/css"</font><font color="#990000">&gt;&gt;</font>
+}, <font color="#009900">Req0</font>),
+<font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:reply</font></b>(<font color="#993399">200</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/html"</font><font color="#990000">&gt;&gt;</font>
+}, [<font color="#FF0000">"&lt;html&gt;&lt;head&gt;&lt;title&gt;My web page&lt;/title&gt;"</font>,
+ <font color="#FF0000">"&lt;link rel='stylesheet' type='text/css' href='/static/style.css'&gt;"</font>,
+ <font color="#FF0000">"&lt;body&gt;&lt;p&gt;Welcome to Erlang!&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;"</font>], <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>To override the method, scheme, host, port or query string, simply pass in a fourth argument. The following snippet uses a different host name:</p>
+<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">cowboy_req:push</span></span>(<span style="color: #FF0000">"/static/style.css"</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"accept"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/css"</span><span style="color: #990000">&gt;&gt;</span>
-}, #{<span style="color: #0000FF">host</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"cdn.example.org"</span><span style="color: #990000">&gt;&gt;</span>}, <span style="color: #009900">Req</span>),</tt></pre></div></div>
-<div class="paragraph"><p>Pushed resources don&#8217;t have to be files. As long as the push
-request is cacheable, safe and does not include a body, the
-resource can be pushed.</p></div>
-<div class="paragraph"><p>Under the hood, Cowboy handles pushed requests the same as
-normal requests: a different process is created which will
-ultimately send a response to the client.</p></div>
-</div>
-</div>
+<pre><tt><b><font color="#000000">cowboy_req:push</font></b>(<font color="#FF0000">"/static/style.css"</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"accept"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/css"</font><font color="#990000">&gt;&gt;</font>
+}, #{<font color="#0000FF">host</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"cdn.example.org"</font><font color="#990000">&gt;&gt;</font>}, <font color="#009900">Req</font>),</tt></pre>
+</div></div>
+<p>Pushed resources don&apos;t have to be files. As long as the push request is cacheable, safe and does not include a body, the resource can be pushed.</p>
+<p>Under the hood, Cowboy handles pushed requests the same as normal requests: a different process is created which will ultimately send a response to the client.</p>
+
diff --git a/docs/en/cowboy/2.3/guide/rest_flowcharts/index.html b/docs/en/cowboy/2.3/guide/rest_flowcharts/index.html
index 7951c237..698e74db 100644
--- a/docs/en/cowboy/2.3/guide/rest_flowcharts/index.html
+++ b/docs/en/cowboy/2.3/guide/rest_flowcharts/index.html
@@ -62,244 +62,64 @@
<h1 class="lined-header"><span>REST flowcharts</span></h1>
-<div class="paragraph"><p>This chapter will explain the REST handler state machine through
-a number of different diagrams.</p></div>
-<div class="paragraph"><p>There are four main paths that requests may follow. One for the
-method OPTIONS; one for the methods GET and HEAD; one for the
-methods PUT, POST and PATCH; and one for the method DELETE.</p></div>
-<div class="paragraph"><p>All paths start with the "Start" diagram, and all paths excluding
-the OPTIONS path go through the "Content negotiation" diagram
-and optionally the "Conditional requests" diagram if the resource
-exists.</p></div>
-<div class="paragraph"><p>The red squares refer to another diagram. The light green squares
-indicate a response. Other squares may be either a callback or a
-question answered by Cowboy itself. Green arrows tend to indicate
-the default behavior if the callback is undefined.</p></div>
-<div class="sect1">
+<p>This chapter will explain the REST handler state machine through a number of different diagrams.</p>
+<p>There are four main paths that requests may follow. One for the method OPTIONS; one for the methods GET and HEAD; one for the methods PUT, POST and PATCH; and one for the method DELETE.</p>
+<p>All paths start with the &quot;Start&quot; diagram, and all paths excluding the OPTIONS path go through the &quot;Content negotiation&quot; diagram and optionally the &quot;Conditional requests&quot; diagram if the resource exists.</p>
+<p>The red squares refer to another diagram. The light green squares indicate a response. Other squares may be either a callback or a question answered by Cowboy itself. Green arrows tend to indicate the default behavior if the callback is undefined.</p>
<h2 id="_start">Start</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>All requests start from here.</p></div>
-<div class="imageblock">
-<div class="content">
-<img src="../rest_start.png" alt="REST starting flowchart" />
-</div>
-</div>
-<div class="paragraph"><p>A series of callbacks are called in succession to perform
-a general checkup of the service, the request line and
-request headers.</p></div>
-<div class="paragraph"><p>The request body, if any, is not expected to have been
-received for any of these steps. It is only processed
-at the end of the "PUT, POST and PATCH methods" diagram,
-when all conditions have been met.</p></div>
-<div class="paragraph"><p>The <code>known_methods</code> and <code>allowed_methods</code> callbacks
-return a list of methods. Cowboy then checks if the request
-method is in the list, and stops otherwise.</p></div>
-<div class="paragraph"><p>The <code>is_authorized</code> callback may be used to check that
-access to the resource is authorized. Authentication
-may also be performed as needed. When authorization is
-denied, the return value from the callback must include
-a challenge applicable to the requested resource, which
-will be sent back to the client in the www-authenticate
-header.</p></div>
-<div class="paragraph"><p>This diagram is immediately followed by either the
-"OPTIONS method" diagram when the request method is
-OPTIONS, or the "Content negotiation" diagram otherwise.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>All requests start from here.</p>
+<img src="../rest_start.png" alt="REST starting flowchart"/><p>A series of callbacks are called in succession to perform a general checkup of the service, the request line and request headers.</p>
+<p>The request body, if any, is not expected to have been received for any of these steps. It is only processed at the end of the &quot;PUT, POST and PATCH methods&quot; diagram, when all conditions have been met.</p>
+<p>The <code>known_methods</code> and <code>allowed_methods</code> callbacks return a list of methods. Cowboy then checks if the request method is in the list, and stops otherwise.</p>
+<p>The <code>is_authorized</code> callback may be used to check that access to the resource is authorized. Authentication may also be performed as needed. When authorization is denied, the return value from the callback must include a challenge applicable to the requested resource, which will be sent back to the client in the www-authenticate header.</p>
+<p>This diagram is immediately followed by either the &quot;OPTIONS method&quot; diagram when the request method is OPTIONS, or the &quot;Content negotiation&quot; diagram otherwise.</p>
<h2 id="_options_method">OPTIONS method</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This diagram only applies to OPTIONS requests.</p></div>
-<div class="imageblock">
-<div class="content">
-<img src="../rest_options.png" alt="REST OPTIONS method flowchart" />
-</div>
-</div>
-<div class="paragraph"><p>The <code>options</code> callback may be used to add information
-about the resource, such as media types or languages
-provided; allowed methods; any extra information. A
-response body may also be set, although clients should
-not be expected to read it.</p></div>
-<div class="paragraph"><p>If the <code>options</code> callback is not defined, Cowboy will
-send a response containing the list of allowed methods
-by default.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This diagram only applies to OPTIONS requests.</p>
+<img src="../rest_options.png" alt="REST OPTIONS method flowchart"/><p>The <code>options</code> callback may be used to add information about the resource, such as media types or languages provided; allowed methods; any extra information. A response body may also be set, although clients should not be expected to read it.</p>
+<p>If the <code>options</code> callback is not defined, Cowboy will send a response containing the list of allowed methods by default.</p>
<h2 id="_content_negotiation">Content negotiation</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This diagram applies to all request methods other than
-OPTIONS. It is executed right after the "Start" diagram
-is completed.</p></div>
-<div class="imageblock">
-<div class="content">
-<img src="../rest_conneg.png" alt="REST content negotiation flowchart" />
-</div>
-</div>
-<div class="paragraph"><p>The purpose of these steps is to determine an appropriate
-representation to be sent back to the client.</p></div>
-<div class="paragraph"><p>The request may contain any of the accept header; the
-accept-language header; or the accept-charset header.
-When present, Cowboy will parse the headers and then
-call the corresponding callback to obtain the list
-of provided content-type, language or charset for this
-resource. It then automatically select the best match
-based on the request.</p></div>
-<div class="paragraph"><p>If a callback is not defined, Cowboy will select the
-content-type, language or charset that the client
-prefers.</p></div>
-<div class="paragraph"><p>The <code>content_types_provided</code> also returns the name of
-a callback for every content-type it accepts. This
-callback will only be called at the end of the
-"GET and HEAD methods" diagram, when all conditions
-have been met.</p></div>
-<div class="paragraph"><p>The selected content-type, language and charset are
-saved as meta values in the Req object. You <strong>should</strong>
-use the appropriate representation if you set a
-response body manually (alongside an error code,
-for example).</p></div>
-<div class="paragraph"><p>This diagram is immediately followed by
-the "GET and HEAD methods" diagram,
-the "PUT, POST and PATCH methods" diagram,
-or the "DELETE method" diagram, depending on the
-method.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This diagram applies to all request methods other than OPTIONS. It is executed right after the &quot;Start&quot; diagram is completed.</p>
+<img src="../rest_conneg.png" alt="REST content negotiation flowchart"/><p>The purpose of these steps is to determine an appropriate representation to be sent back to the client.</p>
+<p>The request may contain any of the accept header; the accept-language header; or the accept-charset header. When present, Cowboy will parse the headers and then call the corresponding callback to obtain the list of provided content-type, language or charset for this resource. It then automatically select the best match based on the request.</p>
+<p>If a callback is not defined, Cowboy will select the content-type, language or charset that the client prefers.</p>
+<p>The <code>content_types_provided</code> also returns the name of a callback for every content-type it accepts. This callback will only be called at the end of the &quot;GET and HEAD methods&quot; diagram, when all conditions have been met.</p>
+<p>The selected content-type, language and charset are saved as meta values in the Req object. You <strong>should</strong> use the appropriate representation if you set a response body manually (alongside an error code, for example).</p>
+<p>This diagram is immediately followed by the &quot;GET and HEAD methods&quot; diagram, the &quot;PUT, POST and PATCH methods&quot; diagram, or the &quot;DELETE method&quot; diagram, depending on the method.</p>
<h2 id="_get_and_head_methods">GET and HEAD methods</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This diagram only applies to GET and HEAD requests.</p></div>
-<div class="paragraph"><p>For a description of the <code>cond</code> step, please see
-the "Conditional requests" diagram.</p></div>
-<div class="imageblock">
-<div class="content">
-<img src="../rest_get_head.png" alt="REST GET/HEAD methods flowchart" />
-</div>
-</div>
-<div class="paragraph"><p>When the resource exists, and the conditional steps
-succeed, the resource can be retrieved.</p></div>
-<div class="paragraph"><p>Cowboy prepares the response by first retrieving
-metadata about the representation, then by calling
-the <code>ProvideResource</code> callback. This is the callback
-you defined for each content-types you returned from
-<code>content_types_provided</code>. This callback returns the body
-that will be sent back to the client, or a fun if the
-body must be streamed.</p></div>
-<div class="paragraph"><p>When the resource does not exist, Cowboy will figure out
-whether the resource existed previously, and if so whether
-it was moved elsewhere in order to redirect the client to
-the new URI.</p></div>
-<div class="paragraph"><p>The <code>moved_permanently</code> and <code>moved_temporarily</code> callbacks
-must return the new location of the resource if it was in
-fact moved.</p></div>
-</div>
-</div>
-<div class="sect1">
-<h2 id="_put_post_and_patch_methods">PUT, POST and PATCH methods</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This diagram only applies to PUT, POST and PATCH requests.</p></div>
-<div class="paragraph"><p>For a description of the <code>cond</code> step, please see
-the "Conditional requests" diagram.</p></div>
-<div class="imageblock">
-<div class="content">
-<img src="../rest_put_post_patch.png" alt="REST PUT/POST/PATCH methods flowchart" />
-</div>
-</div>
-<div class="paragraph"><p>When the resource exists, first the conditional steps
-are executed. When that succeeds, and the method is PUT,
-Cowboy will call the <code>is_conflict</code> callback. This function
-can be used to prevent potential race conditions, by locking
-the resource for example.</p></div>
-<div class="paragraph"><p>Then all three methods reach the <code>content_types_accepted</code>
-step that we will describe in a few paragraphs.</p></div>
-<div class="paragraph"><p>When the resource does not exist, and the method is PUT,
-Cowboy will check for conflicts and then move on to the
-<code>content_types_accepted</code> step. For other methods, Cowboy
-will figure out whether the resource existed previously,
-and if so whether it was moved elsewhere. If the resource
-is truly non-existent, the method is POST and the call
-for <code>allow_missing_post</code> returns <code>true</code>, then Cowboy will
-move on to the <code>content_types_accepted</code> step. Otherwise
-the request processing ends there.</p></div>
-<div class="paragraph"><p>The <code>moved_permanently</code> and <code>moved_temporarily</code> callbacks
-must return the new location of the resource if it was in
-fact moved.</p></div>
-<div class="paragraph"><p>The <code>content_types_accepted</code> returns a list of
-content-types it accepts, but also the name of a callback
-for each of them. Cowboy will select the appropriate
-callback for processing the request body and call it.</p></div>
-<div class="paragraph"><p>This callback may return one of three different return
-values.</p></div>
-<div class="paragraph"><p>If an error occurred while processing the request body,
-it must return <code>false</code> and Cowboy will send an
-appropriate error response.</p></div>
-<div class="paragraph"><p>If the method is POST, then you may return <code>true</code> with
-an URI of where the resource has been created. This is
-especially useful for writing handlers for collections.</p></div>
-<div class="paragraph"><p>Otherwise, return <code>true</code> to indicate success. Cowboy
-will select the appropriate response to be sent depending
-on whether a resource has been created, rather than
-modified, and on the availability of a location header
-or a body in the response.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This diagram only applies to GET and HEAD requests.</p>
+<p>For a description of the <code>cond</code> step, please see the &quot;Conditional requests&quot; diagram.</p>
+<img src="../rest_get_head.png" alt="REST GET/HEAD methods flowchart"/><p>When the resource exists, and the conditional steps succeed, the resource can be retrieved.</p>
+<p>Cowboy prepares the response by first retrieving metadata about the representation, then by calling the <code>ProvideResource</code> callback. This is the callback you defined for each content-types you returned from <code>content_types_provided</code>. This callback returns the body that will be sent back to the client, or a fun if the body must be streamed.</p>
+<p>When the resource does not exist, Cowboy will figure out whether the resource existed previously, and if so whether it was moved elsewhere in order to redirect the client to the new URI.</p>
+<p>The <code>moved_permanently</code> and <code>moved_temporarily</code> callbacks must return the new location of the resource if it was in fact moved.</p>
+<h2 id="_put__post_and_patch_methods">PUT, POST and PATCH methods</h2>
+<p>This diagram only applies to PUT, POST and PATCH requests.</p>
+<p>For a description of the <code>cond</code> step, please see the &quot;Conditional requests&quot; diagram.</p>
+<img src="../rest_put_post_patch.png" alt="REST PUT/POST/PATCH methods flowchart"/><p>When the resource exists, first the conditional steps are executed. When that succeeds, and the method is PUT, Cowboy will call the <code>is_conflict</code> callback. This function can be used to prevent potential race conditions, by locking the resource for example.</p>
+<p>Then all three methods reach the <code>content_types_accepted</code> step that we will describe in a few paragraphs.</p>
+<p>When the resource does not exist, and the method is PUT, Cowboy will check for conflicts and then move on to the <code>content_types_accepted</code> step. For other methods, Cowboy will figure out whether the resource existed previously, and if so whether it was moved elsewhere. If the resource is truly non-existent, the method is POST and the call for <code>allow_missing_post</code> returns <code>true</code>, then Cowboy will move on to the <code>content_types_accepted</code> step. Otherwise the request processing ends there.</p>
+<p>The <code>moved_permanently</code> and <code>moved_temporarily</code> callbacks must return the new location of the resource if it was in fact moved.</p>
+<p>The <code>content_types_accepted</code> returns a list of content-types it accepts, but also the name of a callback for each of them. Cowboy will select the appropriate callback for processing the request body and call it.</p>
+<p>This callback may return one of three different return values.</p>
+<p>If an error occurred while processing the request body, it must return <code>false</code> and Cowboy will send an appropriate error response.</p>
+<p>If the method is POST, then you may return <code>true</code> with an URI of where the resource has been created. This is especially useful for writing handlers for collections.</p>
+<p>Otherwise, return <code>true</code> to indicate success. Cowboy will select the appropriate response to be sent depending on whether a resource has been created, rather than modified, and on the availability of a location header or a body in the response.</p>
<h2 id="_delete_method">DELETE method</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This diagram only applies to DELETE requests.</p></div>
-<div class="paragraph"><p>For a description of the <code>cond</code> step, please see
-the "Conditional requests" diagram.</p></div>
-<div class="imageblock">
-<div class="content">
-<img src="../rest_delete.png" alt="REST DELETE method flowchart" />
-</div>
-</div>
-<div class="paragraph"><p>When the resource exists, and the conditional steps
-succeed, the resource can be deleted.</p></div>
-<div class="paragraph"><p>Deleting the resource is a two steps process. First
-the callback <code>delete_resource</code> is executed. Use this
-callback to delete the resource.</p></div>
-<div class="paragraph"><p>Because the resource may be cached, you must also
-delete all cached representations of this resource
-in the system. This operation may take a while though,
-so you may return before it finished.</p></div>
-<div class="paragraph"><p>Cowboy will then call the <code>delete_completed</code> callback.
-If you know that the resource has been completely
-deleted from your system, including from caches, then
-you can return <code>true</code>. If any doubts persist, return
-<code>false</code>. Cowboy will assume <code>true</code> by default.</p></div>
-<div class="paragraph"><p>To finish, Cowboy checks if you set a response body,
-and depending on that, sends the appropriate response.</p></div>
-<div class="paragraph"><p>When the resource does not exist, Cowboy will figure out
-whether the resource existed previously, and if so whether
-it was moved elsewhere in order to redirect the client to
-the new URI.</p></div>
-<div class="paragraph"><p>The <code>moved_permanently</code> and <code>moved_temporarily</code> callbacks
-must return the new location of the resource if it was in
-fact moved.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This diagram only applies to DELETE requests.</p>
+<p>For a description of the <code>cond</code> step, please see the &quot;Conditional requests&quot; diagram.</p>
+<img src="../rest_delete.png" alt="REST DELETE method flowchart"/><p>When the resource exists, and the conditional steps succeed, the resource can be deleted.</p>
+<p>Deleting the resource is a two steps process. First the callback <code>delete_resource</code> is executed. Use this callback to delete the resource.</p>
+<p>Because the resource may be cached, you must also delete all cached representations of this resource in the system. This operation may take a while though, so you may return before it finished.</p>
+<p>Cowboy will then call the <code>delete_completed</code> callback. If you know that the resource has been completely deleted from your system, including from caches, then you can return <code>true</code>. If any doubts persist, return <code>false</code>. Cowboy will assume <code>true</code> by default.</p>
+<p>To finish, Cowboy checks if you set a response body, and depending on that, sends the appropriate response.</p>
+<p>When the resource does not exist, Cowboy will figure out whether the resource existed previously, and if so whether it was moved elsewhere in order to redirect the client to the new URI.</p>
+<p>The <code>moved_permanently</code> and <code>moved_temporarily</code> callbacks must return the new location of the resource if it was in fact moved.</p>
<h2 id="_conditional_requests">Conditional requests</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This diagram applies to all request methods other than
-OPTIONS. It is executed right after the <code>resource_exists</code>
-callback, when the resource exists.</p></div>
-<div class="imageblock">
-<div class="content">
-<img src="../rest_cond.png" alt="REST conditional requests flowchart" />
-</div>
-</div>
-<div class="paragraph"><p>A request becomes conditional when it includes either of
-the if-match header; the if-unmodified-since header; the
-if-none-match header; or the if-modified-since header.</p></div>
-<div class="paragraph"><p>If the condition fails, the request ends immediately
-without any retrieval or modification of the resource.</p></div>
-<div class="paragraph"><p>The <code>generate_etag</code> and <code>last_modified</code> are called as
-needed. Cowboy will only call them once and then cache
-the results for subsequent use.</p></div>
-</div>
-</div>
+<p>This diagram applies to all request methods other than OPTIONS. It is executed right after the <code>resource_exists</code> callback, when the resource exists.</p>
+<img src="../rest_cond.png" alt="REST conditional requests flowchart"/><p>A request becomes conditional when it includes either of the if-match header; the if-unmodified-since header; the if-none-match header; or the if-modified-since header.</p>
+<p>If the condition fails, the request ends immediately without any retrieval or modification of the resource.</p>
+<p>The <code>generate_etag</code> and <code>last_modified</code> are called as needed. Cowboy will only call them once and then cache the results for subsequent use.</p>
+
diff --git a/docs/en/cowboy/2.3/guide/rest_handlers/index.html b/docs/en/cowboy/2.3/guide/rest_handlers/index.html
index 83d1fb46..1d2fe4e6 100644
--- a/docs/en/cowboy/2.3/guide/rest_handlers/index.html
+++ b/docs/en/cowboy/2.3/guide/rest_handlers/index.html
@@ -62,287 +62,162 @@
<h1 class="lined-header"><span>REST handlers</span></h1>
-<div class="paragraph"><p>REST is implemented in Cowboy as a sub protocol. The request
-is handled as a state machine with many optional callbacks
-describing the resource and modifying the machine&#8217;s behavior.</p></div>
-<div class="paragraph"><p>The REST handler is the recommended way to handle HTTP requests.</p></div>
-<div class="sect1">
+<p>REST is implemented in Cowboy as a sub protocol. The request is handled as a state machine with many optional callbacks describing the resource and modifying the machine&apos;s behavior.</p>
+<p>The REST handler is the recommended way to handle HTTP requests.</p>
<h2 id="_initialization">Initialization</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>First, the <code>init/2</code> callback is called. This callback is common
-to all handlers. To use REST for the current request, this function
-must return a <code>cowboy_rest</code> tuple.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>First, the <code>init/2</code> callback is called. This callback is common to all handlers. To use REST for the current request, this function must return a <code>cowboy_rest</code> tuple.</p>
+<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">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 class="paragraph"><p>Cowboy will then switch to the REST protocol and start executing
-the state machine.</p></div>
-<div class="paragraph"><p>After reaching the end of the flowchart, the <code>terminate/3</code> callback
-will be called if it is defined.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">cowboy_rest</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Cowboy will then switch to the REST protocol and start executing the state machine.</p>
+<p>After reaching the end of the flowchart, the <code>terminate/3</code> callback will be called if it is defined.</p>
<h2 id="_methods">Methods</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The REST component has code for handling the following HTTP methods:
-HEAD, GET, POST, PATCH, PUT, DELETE and OPTIONS.</p></div>
-<div class="paragraph"><p>Other methods can be accepted, however they have no specific callback
-defined for them at this time.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The REST component has code for handling the following HTTP methods: HEAD, GET, POST, PATCH, PUT, DELETE and OPTIONS.</p>
+<p>Other methods can be accepted, however they have no specific callback defined for them at this time.</p>
<h2 id="_callbacks">Callbacks</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>All callbacks are optional. Some may become mandatory depending
-on what other defined callbacks return. The various flowcharts
-in the next chapter should be a useful to determine which callbacks
-you need.</p></div>
-<div class="paragraph"><p>All callbacks take two arguments, the Req object and the State,
-and return a three-element tuple of the form <code>{Value, Req, State}</code>.</p></div>
-<div class="paragraph"><p>Nearly all callbacks can also return <code>{stop, Req, State}</code> to
-stop execution of the request, and
-<code>{{switch_handler, Module}, Req, State}</code> or
-<code>{{switch_handler, Module, Opts}, Req, State}</code> to switch to
-a different handler type. The exceptions are <code>expires</code>
-<code>generate_etag</code>, <code>last_modified</code> and <code>variances</code>.</p></div>
-<div class="paragraph"><p>The following table summarizes the callbacks and their default values.
-If the callback isn&#8217;t defined, then the default value will be used.
-Please look at the flowcharts to find out the result of each return
-value.</p></div>
-<div class="paragraph"><p>In the following table, "skip" means the callback is entirely skipped
-if it is undefined, moving directly to the next step. Similarly,
-"none" means there is no default value for this callback.</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"> Callback name </th>
-<th align="center" valign="top"> Default value</th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td align="left" valign="top"><p class="table">allowed_methods</p></td>
-<td align="center" valign="top"><p class="table"><code>[&lt;&lt;"GET"&gt;&gt;, &lt;&lt;"HEAD"&gt;&gt;, &lt;&lt;"OPTIONS"&gt;&gt;]</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">allow_missing_post</p></td>
-<td align="center" valign="top"><p class="table"><code>true</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">charsets_provided</p></td>
-<td align="center" valign="top"><p class="table">skip</p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">content_types_accepted</p></td>
-<td align="center" valign="top"><p class="table">none</p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">content_types_provided</p></td>
-<td align="center" valign="top"><p class="table"><code>[{{ &lt;&lt;"text"&gt;&gt;, &lt;&lt;"html"&gt;&gt;, '*'}, to_html}]</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">delete_completed</p></td>
-<td align="center" valign="top"><p class="table"><code>true</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">delete_resource</p></td>
-<td align="center" valign="top"><p class="table"><code>false</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">expires</p></td>
-<td align="center" valign="top"><p class="table"><code>undefined</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">forbidden</p></td>
-<td align="center" valign="top"><p class="table"><code>false</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">generate_etag</p></td>
-<td align="center" valign="top"><p class="table"><code>undefined</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">is_authorized</p></td>
-<td align="center" valign="top"><p class="table"><code>true</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">is_conflict</p></td>
-<td align="center" valign="top"><p class="table"><code>false</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">known_methods</p></td>
-<td align="center" valign="top"><p class="table"><code>[&lt;&lt;"GET"&gt;&gt;, &lt;&lt;"HEAD"&gt;&gt;, &lt;&lt;"POST"&gt;&gt;, &lt;&lt;"PUT"&gt;&gt;, &lt;&lt;"PATCH"&gt;&gt;, &lt;&lt;"DELETE"&gt;&gt;, &lt;&lt;"OPTIONS"&gt;&gt;]</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">languages_provided</p></td>
-<td align="center" valign="top"><p class="table">skip</p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">last_modified</p></td>
-<td align="center" valign="top"><p class="table"><code>undefined</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">malformed_request</p></td>
-<td align="center" valign="top"><p class="table"><code>false</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">moved_permanently</p></td>
-<td align="center" valign="top"><p class="table"><code>false</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">moved_temporarily</p></td>
-<td align="center" valign="top"><p class="table"><code>false</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">multiple_choices</p></td>
-<td align="center" valign="top"><p class="table"><code>false</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">options</p></td>
-<td align="center" valign="top"><p class="table"><code>ok</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">previously_existed</p></td>
-<td align="center" valign="top"><p class="table"><code>false</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">resource_exists</p></td>
-<td align="center" valign="top"><p class="table"><code>true</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">service_available</p></td>
-<td align="center" valign="top"><p class="table"><code>true</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">uri_too_long</p></td>
-<td align="center" valign="top"><p class="table"><code>false</code></p></td>
+<p>All callbacks are optional. Some may become mandatory depending on what other defined callbacks return. The various flowcharts in the next chapter should be a useful to determine which callbacks you need.</p>
+<p>All callbacks take two arguments, the Req object and the State, and return a three-element tuple of the form <code>{Value, Req, State}</code>.</p>
+<p>Nearly all callbacks can also return <code>{stop, Req, State}</code> to stop execution of the request, and <code>{{switch_handler, Module}, Req, State}</code> or <code>{{switch_handler, Module, Opts}, Req, State}</code> to switch to a different handler type. The exceptions are <code>expires</code> <code>generate_etag</code>, <code>last_modified</code> and <code>variances</code>.</p>
+<p>The following table summarizes the callbacks and their default values. If the callback isn&apos;t defined, then the default value will be used. Please look at the flowcharts to find out the result of each return value.</p>
+<p>In the following table, &quot;skip&quot; means the callback is entirely skipped if it is undefined, moving directly to the next step. Similarly, &quot;none&quot; means there is no default value for this callback.</p>
+<table rules="all" width="100%" frame="border"
+ cellspacing="0" cellpadding="4">
+<thead><tr><th>Callback name</th>
+<th>Default value</th>
+</tr></thead><tbody><tr><td>allowed_methods</td>
+<td><code>[&lt;&lt;&quot;GET&quot;&gt;&gt;, &lt;&lt;&quot;HEAD&quot;&gt;&gt;, &lt;&lt;&quot;OPTIONS&quot;&gt;&gt;]</code></td>
</tr>
-<tr>
-<td align="left" valign="top"><p class="table">valid_content_headers</p></td>
-<td align="center" valign="top"><p class="table"><code>true</code></p></td>
+<tr><td>allow_missing_post</td>
+<td><code>true</code></td>
</tr>
-<tr>
-<td align="left" valign="top"><p class="table">valid_entity_length</p></td>
-<td align="center" valign="top"><p class="table"><code>true</code></p></td>
+<tr><td>charsets_provided</td>
+<td>skip</td>
</tr>
-<tr>
-<td align="left" valign="top"><p class="table">variances</p></td>
-<td align="center" valign="top"><p class="table"><code>[]</code></p></td>
+<tr><td>content_types_accepted</td>
+<td>none</td>
</tr>
-</tbody>
-</table>
-</div>
-<div class="paragraph"><p>As you can see, Cowboy tries to move on with the request whenever
-possible by using well thought out default values.</p></div>
-<div class="paragraph"><p>In addition to these, there can be any number of user-defined
-callbacks that are specified through <code>content_types_accepted/2</code>
-and <code>content_types_provided/2</code>. They can take any name, however
-it is recommended to use a separate prefix for the callbacks of
-each function. For example, <code>from_html</code> and <code>to_html</code> indicate
-in the first case that we&#8217;re accepting a resource given as HTML,
-and in the second case that we send one as HTML.</p></div>
-</div>
-</div>
-<div class="sect1">
+<tr><td>content_types_provided</td>
+<td><code>[{{ &lt;&lt;&quot;text&quot;&gt;&gt;, &lt;&lt;&quot;html&quot;&gt;&gt;, &apos;*&apos;}, to_html}]</code></td>
+</tr>
+<tr><td>delete_completed</td>
+<td><code>true</code></td>
+</tr>
+<tr><td>delete_resource</td>
+<td><code>false</code></td>
+</tr>
+<tr><td>expires</td>
+<td><code>undefined</code></td>
+</tr>
+<tr><td>forbidden</td>
+<td><code>false</code></td>
+</tr>
+<tr><td>generate_etag</td>
+<td><code>undefined</code></td>
+</tr>
+<tr><td>is_authorized</td>
+<td><code>true</code></td>
+</tr>
+<tr><td>is_conflict</td>
+<td><code>false</code></td>
+</tr>
+<tr><td>known_methods</td>
+<td><code>[&lt;&lt;&quot;GET&quot;&gt;&gt;, &lt;&lt;&quot;HEAD&quot;&gt;&gt;, &lt;&lt;&quot;POST&quot;&gt;&gt;, &lt;&lt;&quot;PUT&quot;&gt;&gt;, &lt;&lt;&quot;PATCH&quot;&gt;&gt;, &lt;&lt;&quot;DELETE&quot;&gt;&gt;, &lt;&lt;&quot;OPTIONS&quot;&gt;&gt;]</code></td>
+</tr>
+<tr><td>languages_provided</td>
+<td>skip</td>
+</tr>
+<tr><td>last_modified</td>
+<td><code>undefined</code></td>
+</tr>
+<tr><td>malformed_request</td>
+<td><code>false</code></td>
+</tr>
+<tr><td>moved_permanently</td>
+<td><code>false</code></td>
+</tr>
+<tr><td>moved_temporarily</td>
+<td><code>false</code></td>
+</tr>
+<tr><td>multiple_choices</td>
+<td><code>false</code></td>
+</tr>
+<tr><td>options</td>
+<td><code>ok</code></td>
+</tr>
+<tr><td>previously_existed</td>
+<td><code>false</code></td>
+</tr>
+<tr><td>resource_exists</td>
+<td><code>true</code></td>
+</tr>
+<tr><td>service_available</td>
+<td><code>true</code></td>
+</tr>
+<tr><td>uri_too_long</td>
+<td><code>false</code></td>
+</tr>
+<tr><td>valid_content_headers</td>
+<td><code>true</code></td>
+</tr>
+<tr><td>valid_entity_length</td>
+<td><code>true</code></td>
+</tr>
+<tr><td>variances</td>
+<td><code>[]</code></td>
+</tr>
+</tbody></table>
+<p>As you can see, Cowboy tries to move on with the request whenever possible by using well thought out default values.</p>
+<p>In addition to these, there can be any number of user-defined callbacks that are specified through <code>content_types_accepted/2</code> and <code>content_types_provided/2</code>. They can take any name, however it is recommended to use a separate prefix for the callbacks of each function. For example, <code>from_html</code> and <code>to_html</code> indicate in the first case that we&apos;re accepting a resource given as HTML, and in the second case that we send one as HTML.</p>
<h2 id="_meta_data">Meta data</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy will set informative values to the Req object at various
-points of the execution. You can retrieve them by matching the
-Req object directly. The values are defined in the following table:</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"> Key </th>
-<th align="left" valign="top"> Details</th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td align="left" valign="top"><p class="table">media_type</p></td>
-<td align="left" valign="top"><p class="table">The content-type negotiated for the response entity.</p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">language</p></td>
-<td align="left" valign="top"><p class="table">The language negotiated for the response entity.</p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">charset</p></td>
-<td align="left" valign="top"><p class="table">The charset negotiated for the response entity.</p></td>
-</tr>
-</tbody>
-</table>
-</div>
-<div class="paragraph"><p>They can be used to send a proper body with the response to a
-request that used a method other than HEAD or GET.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Cowboy will set informative values to the Req object at various points of the execution. You can retrieve them by matching the Req object directly. The values are defined in the following table:</p>
+<table rules="all" width="100%" frame="border"
+ cellspacing="0" cellpadding="4">
+<thead><tr><th>Key</th>
+<th>Details</th>
+</tr></thead><tbody><tr><td>media_type</td>
+<td>The content-type negotiated for the response entity.</td>
+</tr>
+<tr><td>language</td>
+<td>The language negotiated for the response entity.</td>
+</tr>
+<tr><td>charset</td>
+<td>The charset negotiated for the response entity.</td>
+</tr>
+</tbody></table>
+<p>They can be used to send a proper body with the response to a request that used a method other than HEAD or GET.</p>
<h2 id="_response_headers">Response headers</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy will set response headers automatically over the execution
-of the REST code. They are listed in the following table.</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="left" valign="top"> Details</th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td align="left" valign="top"><p class="table">content-language</p></td>
-<td align="left" valign="top"><p class="table">Language used in the response body</p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">content-type</p></td>
-<td align="left" valign="top"><p class="table">Media type and charset of the response body</p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">etag</p></td>
-<td align="left" valign="top"><p class="table">Etag of the resource</p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">expires</p></td>
-<td align="left" valign="top"><p class="table">Expiration date of the resource</p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">last-modified</p></td>
-<td align="left" valign="top"><p class="table">Last modification date for the resource</p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">location</p></td>
-<td align="left" valign="top"><p class="table">Relative or absolute URI to the requested resource</p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">vary</p></td>
-<td align="left" valign="top"><p class="table">List of headers that may change the representation of the resource</p></td>
-</tr>
-</tbody>
-</table>
-</div>
-</div>
-</div>
+<p>Cowboy will set response headers automatically over the execution of the REST code. They are listed in the following table.</p>
+<table rules="all" width="100%" frame="border"
+ cellspacing="0" cellpadding="4">
+<thead><tr><th>Header name</th>
+<th>Details</th>
+</tr></thead><tbody><tr><td>content-language</td>
+<td>Language used in the response body</td>
+</tr>
+<tr><td>content-type</td>
+<td>Media type and charset of the response body</td>
+</tr>
+<tr><td>etag</td>
+<td>Etag of the resource</td>
+</tr>
+<tr><td>expires</td>
+<td>Expiration date of the resource</td>
+</tr>
+<tr><td>last-modified</td>
+<td>Last modification date for the resource</td>
+</tr>
+<tr><td>location</td>
+<td>Relative or absolute URI to the requested resource</td>
+</tr>
+<tr><td>vary</td>
+<td>List of headers that may change the representation of the resource</td>
+</tr>
+</tbody></table>
+
diff --git a/docs/en/cowboy/2.3/guide/rest_principles/index.html b/docs/en/cowboy/2.3/guide/rest_principles/index.html
index 12de886b..78687d10 100644
--- a/docs/en/cowboy/2.3/guide/rest_principles/index.html
+++ b/docs/en/cowboy/2.3/guide/rest_principles/index.html
@@ -62,153 +62,38 @@
<h1 class="lined-header"><span>REST principles</span></h1>
-<div class="paragraph"><p>This chapter will attempt to define the concepts behind REST
-and explain what makes a service RESTful.</p></div>
-<div class="paragraph"><p>REST is often confused with performing a distinct operation
-depending on the HTTP method, while using more than the GET
-and POST methods. That&#8217;s highly misguided at best.</p></div>
-<div class="paragraph"><p>We will first attempt to define REST and will look at what
-it means in the context of HTTP and the Web.
-For a more in-depth explanation of REST, you can read
-<a href="http://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm">Roy T. Fielding&#8217;s dissertation</a>
-as it does a great job explaining where it comes from and
-what it achieves.</p></div>
-<div class="sect1">
+<p>This chapter will attempt to define the concepts behind REST and explain what makes a service RESTful.</p>
+<p>REST is often confused with performing a distinct operation depending on the HTTP method, while using more than the GET and POST methods. That&apos;s highly misguided at best.</p>
+<p>We will first attempt to define REST and will look at what it means in the context of HTTP and the Web. For a more in-depth explanation of REST, you can read <a href="http://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm">Roy T. Fielding&apos;s dissertation</a> as it does a great job explaining where it comes from and what it achieves.</p>
<h2 id="_rest_architecture">REST architecture</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>REST is a <strong>client-server</strong> architecture. The client and the server
-both have a different set of concerns. The server stores and/or
-manipulates information and makes it available to the user in
-an efficient manner. The client takes that information and
-displays it to the user and/or uses it to perform subsequent
-requests for information. This separation of concerns allows both
-the client and the server to evolve independently as it only
-requires that the interface stays the same.</p></div>
-<div class="paragraph"><p>REST is <strong>stateless</strong>. That means the communication between the
-client and the server always contains all the information needed
-to perform the request. There is no session state in the server,
-it is kept entirely on the client&#8217;s side. If access to a resource
-requires authentication, then the client needs to authenticate
-itself with every request.</p></div>
-<div class="paragraph"><p>REST is <strong>cacheable</strong>. The client, the server and any intermediary
-components can all cache resources in order to improve performance.</p></div>
-<div class="paragraph"><p>REST provides a <strong>uniform interface</strong> between components. This
-simplifies the architecture, as all components follow the same
-rules to speak to one another. It also makes it easier to understand
-the interactions between the different components of the system.
-A number of constraints are required to achieve this. They are
-covered in the rest of the chapter.</p></div>
-<div class="paragraph"><p>REST is a <strong>layered system</strong>. Individual components cannot see
-beyond the immediate layer with which they are interacting. This
-means that a client connecting to an intermediate component, like
-a proxy, has no knowledge of what lies beyond. This allows
-components to be independent and thus easily replaceable or
-extendable.</p></div>
-<div class="paragraph"><p>REST optionally provides <strong>code on demand</strong>. Code may be downloaded
-to extend client functionality. This is optional however because
-the client may not be able to download or run this code, and so
-a REST component cannot rely on it being executed.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>REST is a <strong>client-server</strong> architecture. The client and the server both have a different set of concerns. The server stores and/or manipulates information and makes it available to the user in an efficient manner. The client takes that information and displays it to the user and/or uses it to perform subsequent requests for information. This separation of concerns allows both the client and the server to evolve independently as it only requires that the interface stays the same.</p>
+<p>REST is <strong>stateless</strong>. That means the communication between the client and the server always contains all the information needed to perform the request. There is no session state in the server, it is kept entirely on the client&apos;s side. If access to a resource requires authentication, then the client needs to authenticate itself with every request.</p>
+<p>REST is <strong>cacheable</strong>. The client, the server and any intermediary components can all cache resources in order to improve performance.</p>
+<p>REST provides a <strong>uniform interface</strong> between components. This simplifies the architecture, as all components follow the same rules to speak to one another. It also makes it easier to understand the interactions between the different components of the system. A number of constraints are required to achieve this. They are covered in the rest of the chapter.</p>
+<p>REST is a <strong>layered system</strong>. Individual components cannot see beyond the immediate layer with which they are interacting. This means that a client connecting to an intermediate component, like a proxy, has no knowledge of what lies beyond. This allows components to be independent and thus easily replaceable or extendable.</p>
+<p>REST optionally provides <strong>code on demand</strong>. Code may be downloaded to extend client functionality. This is optional however because the client may not be able to download or run this code, and so a REST component cannot rely on it being executed.</p>
<h2 id="_resources_and_resource_identifiers">Resources and resource identifiers</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A resource is an abstract concept. In a REST system, any information
-that can be named may be a resource. This includes documents, images,
-a collection of resources and any other information. Any information
-that can be the target of an hypertext link can be a resource.</p></div>
-<div class="paragraph"><p>A resource is a conceptual mapping to a set of entities. The set of
-entities evolves over time; a resource doesn&#8217;t. For example, a resource
-can map to "users who have logged in this past month" and another
-to "all users". At some point in time they may map to the same set of
-entities, because all users logged in this past month. But they are
-still different resources. Similarly, if nobody logged in recently,
-then the first resource may map to the empty set. This resource exists
-regardless of the information it maps to.</p></div>
-<div class="paragraph"><p>Resources are identified by uniform resource identifiers, also known
-as URIs. Sometimes internationalized resource identifiers, or IRIs,
-may also be used, but these can be directly translated into a URI.</p></div>
-<div class="paragraph"><p>In practice we will identify two kinds of resources. Individual
-resources map to a set of one element, for example "user Joe".
-Collection of resources map to a set of 0 to N elements,
-for example "all users".</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>A resource is an abstract concept. In a REST system, any information that can be named may be a resource. This includes documents, images, a collection of resources and any other information. Any information that can be the target of an hypertext link can be a resource.</p>
+<p>A resource is a conceptual mapping to a set of entities. The set of entities evolves over time; a resource doesn&apos;t. For example, a resource can map to &quot;users who have logged in this past month&quot; and another to &quot;all users&quot;. At some point in time they may map to the same set of entities, because all users logged in this past month. But they are still different resources. Similarly, if nobody logged in recently, then the first resource may map to the empty set. This resource exists regardless of the information it maps to.</p>
+<p>Resources are identified by uniform resource identifiers, also known as URIs. Sometimes internationalized resource identifiers, or IRIs, may also be used, but these can be directly translated into a URI.</p>
+<p>In practice we will identify two kinds of resources. Individual resources map to a set of one element, for example &quot;user Joe&quot;. Collection of resources map to a set of 0 to N elements, for example &quot;all users&quot;.</p>
<h2 id="_resource_representations">Resource representations</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The representation of a resource is a sequence of bytes associated
-with metadata.</p></div>
-<div class="paragraph"><p>The metadata comes as a list of key-value pairs, where the name
-corresponds to a standard that defines the value&#8217;s structure and
-semantics. With HTTP, the metadata comes in the form of request
-or response headers. The headers' structure and semantics are well
-defined in the HTTP standard. Metadata includes representation
-metadata, resource metadata and control data.</p></div>
-<div class="paragraph"><p>The representation metadata gives information about the
-representation, such as its media type, the date of last
-modification, or even a checksum.</p></div>
-<div class="paragraph"><p>Resource metadata could be link to related resources or
-information about additional representations of the resource.</p></div>
-<div class="paragraph"><p>Control data allows parameterizing the request or response.
-For example, we may only want the representation returned if
-it is more recent than the one we have in cache. Similarly,
-we may want to instruct the client about how it should cache
-the representation. This isn&#8217;t restricted to caching. We may,
-for example, want to store a new representation of a resource
-only if it wasn&#8217;t modified since we first retrieved it.</p></div>
-<div class="paragraph"><p>The data format of a representation is also known as the media
-type. Some media types are intended for direct rendering to the
-user, while others are intended for automated processing. The
-media type is a key component of the REST architecture.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The representation of a resource is a sequence of bytes associated with metadata.</p>
+<p>The metadata comes as a list of key-value pairs, where the name corresponds to a standard that defines the value&apos;s structure and semantics. With HTTP, the metadata comes in the form of request or response headers. The headers&apos; structure and semantics are well defined in the HTTP standard. Metadata includes representation metadata, resource metadata and control data.</p>
+<p>The representation metadata gives information about the representation, such as its media type, the date of last modification, or even a checksum.</p>
+<p>Resource metadata could be link to related resources or information about additional representations of the resource.</p>
+<p>Control data allows parameterizing the request or response. For example, we may only want the representation returned if it is more recent than the one we have in cache. Similarly, we may want to instruct the client about how it should cache the representation. This isn&apos;t restricted to caching. We may, for example, want to store a new representation of a resource only if it wasn&apos;t modified since we first retrieved it.</p>
+<p>The data format of a representation is also known as the media type. Some media types are intended for direct rendering to the user, while others are intended for automated processing. The media type is a key component of the REST architecture.</p>
<h2 id="_self_descriptive_messages">Self-descriptive messages</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Messages must be self-descriptive. That means that the data
-format of a representation must always come with its media
-type (and similarly requesting a resource involves choosing
-the media type of the representation returned). If you are
-sending HTML, then you must say it is HTML by sending the
-media type with the representation. In HTTP this is done
-using the content-type header.</p></div>
-<div class="paragraph"><p>The media type is often an IANA registered media type, like
-<code>text/html</code> or <code>image/png</code>, but does not need to be. Exactly
-two things are important for respecting this constraint: that
-the media type is well specified, and that the sender and
-recipient agree about what the media type refers to.</p></div>
-<div class="paragraph"><p>This means that you can create your own media types, like
-<code>application/x-mine</code>, and that as long as you write the
-specifications for it and that both endpoints agree about
-it then the constraint is respected.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Messages must be self-descriptive. That means that the data format of a representation must always come with its media type (and similarly requesting a resource involves choosing the media type of the representation returned). If you are sending HTML, then you must say it is HTML by sending the media type with the representation. In HTTP this is done using the content-type header.</p>
+<p>The media type is often an IANA registered media type, like <code>text/html</code> or <code>image/png</code>, but does not need to be. Exactly two things are important for respecting this constraint: that the media type is well specified, and that the sender and recipient agree about what the media type refers to.</p>
+<p>This means that you can create your own media types, like <code>application/x-mine</code>, and that as long as you write the specifications for it and that both endpoints agree about it then the constraint is respected.</p>
<h2 id="_hypermedia_as_the_engine_of_application_state">Hypermedia as the engine of application state</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The last constraint is generally where services that claim
-to be RESTful fail. Interactions with a server must be
-entirely driven by hypermedia. The client does not need
-any prior knowledge of the service in order to use it,
-other than an entry point and of course basic understanding
-of the media type of the representations, at the very least
-enough to find and identify hyperlinks and link relations.</p></div>
-<div class="paragraph"><p>To give a simple example, if your service only works with
-the <code>application/json</code> media type then this constraint
-cannot be respected (as there are no concept of links in
-JSON) and thus your service isn&#8217;t RESTful. This is the case
-for the majority of self-proclaimed REST services.</p></div>
-<div class="paragraph"><p>On the other hand if you create a JSON based media type
-that has a concept of links and link relations, then
-your service might be RESTful.</p></div>
-<div class="paragraph"><p>Respecting this constraint means that the entirety of the
-service becomes self-discoverable, not only the resources
-in it, but also the operations you can perform on it. This
-makes clients very thin as there is no need to implement
-anything specific to the service to operate on it.</p></div>
-</div>
-</div>
+<p>The last constraint is generally where services that claim to be RESTful fail. Interactions with a server must be entirely driven by hypermedia. The client does not need any prior knowledge of the service in order to use it, other than an entry point and of course basic understanding of the media type of the representations, at the very least enough to find and identify hyperlinks and link relations.</p>
+<p>To give a simple example, if your service only works with the <code>application/json</code> media type then this constraint cannot be respected (as there are no concept of links in JSON) and thus your service isn&apos;t RESTful. This is the case for the majority of self-proclaimed REST services.</p>
+<p>On the other hand if you create a JSON based media type that has a concept of links and link relations, then your service might be RESTful.</p>
+<p>Respecting this constraint means that the entirety of the service becomes self-discoverable, not only the resources in it, but also the operations you can perform on it. This makes clients very thin as there is no need to implement anything specific to the service to operate on it.</p>
+
diff --git a/docs/en/cowboy/2.3/guide/routing/index.html b/docs/en/cowboy/2.3/guide/routing/index.html
index 5f1ef914..1a7eccc6 100644
--- a/docs/en/cowboy/2.3/guide/routing/index.html
+++ b/docs/en/cowboy/2.3/guide/routing/index.html
@@ -62,261 +62,181 @@
<h1 class="lined-header"><span>Routing</span></h1>
-<div class="paragraph"><p>Cowboy does nothing by default.</p></div>
-<div class="paragraph"><p>To make Cowboy useful, you need to map URIs to Erlang modules that will
-handle the requests. This is called routing.</p></div>
-<div class="paragraph"><p>When Cowboy receives a request, it tries to match the requested host and
-path to the configured routes. When there&#8217;s a match, the route&#8217;s
-associated handler is executed.</p></div>
-<div class="paragraph"><p>Routes need to be compiled before they can be used by Cowboy.
-The result of the compilation is the dispatch rules.</p></div>
-<div class="sect1">
+<p>Cowboy does nothing by default.</p>
+<p>To make Cowboy useful, you need to map URIs to Erlang modules that will handle the requests. This is called routing.</p>
+<p>When Cowboy receives a request, it tries to match the requested host and path to the configured routes. When there&apos;s a match, the route&apos;s associated handler is executed.</p>
+<p>Routes need to be compiled before they can be used by Cowboy. The result of the compilation is the dispatch rules.</p>
<h2 id="_syntax">Syntax</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The general structure for the routes is defined as follow.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The general structure for the routes is defined as follow.</p>
+<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">Routes</span> <span style="color: #990000">=</span> [<span style="color: #009900">Host1</span>, <span style="color: #009900">Host2</span>, <span style="color: #990000">...</span> <span style="color: #009900">HostN</span>]<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Each host contains matching rules for the host along with optional
-constraints, and a list of routes for the path component.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Routes</font> <font color="#990000">=</font> [<font color="#009900">Host1</font>, <font color="#009900">Host2</font>, <font color="#990000">...</font> <font color="#009900">HostN</font>]<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Each host contains matching rules for the host along with optional constraints, and a list of routes for the path component.</p>
+<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">Host1</span> <span style="color: #990000">=</span> {<span style="color: #009900">HostMatch</span>, <span style="color: #009900">PathsList</span>}<span style="color: #990000">.</span>
-<span style="color: #009900">Host2</span> <span style="color: #990000">=</span> {<span style="color: #009900">HostMatch</span>, <span style="color: #009900">Constraints</span>, <span style="color: #009900">PathsList</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>The list of routes for the path component is defined similar to the
-list of hosts.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Host1</font> <font color="#990000">=</font> {<font color="#009900">HostMatch</font>, <font color="#009900">PathsList</font>}<font color="#990000">.</font>
+<font color="#009900">Host2</font> <font color="#990000">=</font> {<font color="#009900">HostMatch</font>, <font color="#009900">Constraints</font>, <font color="#009900">PathsList</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>The list of routes for the path component is defined similar to the list of hosts.</p>
+<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">PathsList</span> <span style="color: #990000">=</span> [<span style="color: #009900">Path1</span>, <span style="color: #009900">Path2</span>, <span style="color: #990000">...</span> <span style="color: #009900">PathN</span>]<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Finally, each path contains matching rules for the path along with
-optional constraints, and gives us the handler module to be used
-along with its initial state.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">PathsList</font> <font color="#990000">=</font> [<font color="#009900">Path1</font>, <font color="#009900">Path2</font>, <font color="#990000">...</font> <font color="#009900">PathN</font>]<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Finally, each path contains matching rules for the path along with optional constraints, and gives us the handler module to be used along with its initial state.</p>
+<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">Path1</span> <span style="color: #990000">=</span> {<span style="color: #009900">PathMatch</span>, <span style="color: #009900">Handler</span>, <span style="color: #009900">InitialState</span>}<span style="color: #990000">.</span>
-<span style="color: #009900">Path2</span> <span style="color: #990000">=</span> {<span style="color: #009900">PathMatch</span>, <span style="color: #009900">Constraints</span>, <span style="color: #009900">Handler</span>, <span style="color: #009900">InitialState</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Continue reading to learn more about the match syntax and the optional
-constraints.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Path1</font> <font color="#990000">=</font> {<font color="#009900">PathMatch</font>, <font color="#009900">Handler</font>, <font color="#009900">InitialState</font>}<font color="#990000">.</font>
+<font color="#009900">Path2</font> <font color="#990000">=</font> {<font color="#009900">PathMatch</font>, <font color="#009900">Constraints</font>, <font color="#009900">Handler</font>, <font color="#009900">InitialState</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Continue reading to learn more about the match syntax and the optional constraints.</p>
<h2 id="_match_syntax">Match syntax</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The match syntax is used to associate host names and paths with their
-respective handlers.</p></div>
-<div class="paragraph"><p>The match syntax is the same for host and path with a few subtleties.
-Indeed, the segments separator is different, and the host is matched
-starting from the last segment going to the first. All examples will
-feature both host and path match rules and explain the differences
-when encountered.</p></div>
-<div class="paragraph"><p>Excluding special values that we will explain at the end of this section,
-the simplest match value is a host or a path. It can be given as either
-a <code>string()</code> or a <code>binary()</code>.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The match syntax is used to associate host names and paths with their respective handlers.</p>
+<p>The match syntax is the same for host and path with a few subtleties. Indeed, the segments separator is different, and the host is matched starting from the last segment going to the first. All examples will feature both host and path match rules and explain the differences when encountered.</p>
+<p>Excluding special values that we will explain at the end of this section, the simplest match value is a host or a path. It can be given as either a <code>string()</code> or a <code>binary()</code>.</p>
+<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">PathMatch1</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"/"</span><span style="color: #990000">.</span>
-<span style="color: #009900">PathMatch2</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"/path/to/resource"</span><span style="color: #990000">.</span>
-
-<span style="color: #009900">HostMatch1</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"cowboy.example.org"</span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>As you can see, all paths defined this way must start with a slash
-character. Note that these two paths are identical as far as routing
-is concerned.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">PathMatch1</font> <font color="#990000">=</font> <font color="#FF0000">"/"</font><font color="#990000">.</font>
+<font color="#009900">PathMatch2</font> <font color="#990000">=</font> <font color="#FF0000">"/path/to/resource"</font><font color="#990000">.</font>
+
+<font color="#009900">HostMatch1</font> <font color="#990000">=</font> <font color="#FF0000">"cowboy.example.org"</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>As you can see, all paths defined this way must start with a slash character. Note that these two paths are identical as far as routing is concerned.</p>
+<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">PathMatch2</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"/path/to/resource"</span><span style="color: #990000">.</span>
-<span style="color: #009900">PathMatch3</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"/path/to/resource/"</span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Hosts with and without a trailing dot are equivalent for routing.
-Similarly, hosts with and without a leading dot are also equivalent.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">PathMatch2</font> <font color="#990000">=</font> <font color="#FF0000">"/path/to/resource"</font><font color="#990000">.</font>
+<font color="#009900">PathMatch3</font> <font color="#990000">=</font> <font color="#FF0000">"/path/to/resource/"</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Hosts with and without a trailing dot are equivalent for routing. Similarly, hosts with and without a leading dot are also equivalent.</p>
+<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">HostMatch1</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"cowboy.example.org"</span><span style="color: #990000">.</span>
-<span style="color: #009900">HostMatch2</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"cowboy.example.org."</span><span style="color: #990000">.</span>
-<span style="color: #009900">HostMatch3</span> <span style="color: #990000">=</span> <span style="color: #FF0000">".cowboy.example.org"</span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>It is possible to extract segments of the host and path and to store
-the values in the <code>Req</code> object for later use. We call these kind of
-values bindings.</p></div>
-<div class="paragraph"><p>The syntax for bindings is very simple. A segment that begins with
-the <code>:</code> character means that what follows until the end of the segment
-is the name of the binding in which the segment value will be stored.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">HostMatch1</font> <font color="#990000">=</font> <font color="#FF0000">"cowboy.example.org"</font><font color="#990000">.</font>
+<font color="#009900">HostMatch2</font> <font color="#990000">=</font> <font color="#FF0000">"cowboy.example.org."</font><font color="#990000">.</font>
+<font color="#009900">HostMatch3</font> <font color="#990000">=</font> <font color="#FF0000">".cowboy.example.org"</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>It is possible to extract segments of the host and path and to store the values in the <code>Req</code> object for later use. We call these kind of values bindings.</p>
+<p>The syntax for bindings is very simple. A segment that begins with the <code>:</code> character means that what follows until the end of the segment is the name of the binding in which the segment value will be stored.</p>
+<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">PathMatch</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"/hats/:name/prices"</span><span style="color: #990000">.</span>
-<span style="color: #009900">HostMatch</span> <span style="color: #990000">=</span> <span style="color: #FF0000">":subdomain.example.org"</span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>If these two end up matching when routing, you will end up with two
-bindings defined, <code>subdomain</code> and <code>name</code>, each containing the
-segment value where they were defined. For example, the URL
-<code>http://test.example.org/hats/wild_cowboy_legendary/prices</code> will
-result in having the value <code>test</code> bound to the name <code>subdomain</code>
-and the value <code>wild_cowboy_legendary</code> bound to the name <code>name</code>.
-They can later be retrieved using <code>cowboy_req:binding/{2,3}</code>. The
-binding name must be given as an atom.</p></div>
-<div class="paragraph"><p>There is a special binding name you can use to mimic the underscore
-variable in Erlang. Any match against the <code>_</code> binding will succeed
-but the data will be discarded. This is especially useful for
-matching against many domain names in one go.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">PathMatch</font> <font color="#990000">=</font> <font color="#FF0000">"/hats/:name/prices"</font><font color="#990000">.</font>
+<font color="#009900">HostMatch</font> <font color="#990000">=</font> <font color="#FF0000">":subdomain.example.org"</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>If these two end up matching when routing, you will end up with two bindings defined, <code>subdomain</code> and <code>name</code>, each containing the segment value where they were defined. For example, the URL <code>http://test.example.org/hats/wild_cowboy_legendary/prices</code> will result in having the value <code>test</code> bound to the name <code>subdomain</code> and the value <code>wild_cowboy_legendary</code> bound to the name <code>name</code>. They can later be retrieved using <code>cowboy_req:binding/{2,3}</code>. The binding name must be given as an atom.</p>
+<p>There is a special binding name you can use to mimic the underscore variable in Erlang. Any match against the <code>_</code> binding will succeed but the data will be discarded. This is especially useful for matching against many domain names in one go.</p>
+<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">HostMatch</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"ninenines.:_"</span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Similarly, it is possible to have optional segments. Anything
-between brackets is optional.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">HostMatch</font> <font color="#990000">=</font> <font color="#FF0000">"ninenines.:_"</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Similarly, it is possible to have optional segments. Anything between brackets is optional.</p>
+<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">PathMatch</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"/hats/[page/:number]"</span><span style="color: #990000">.</span>
-<span style="color: #009900">HostMatch</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"[www.]ninenines.eu"</span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>You can also have imbricated optional segments.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">PathMatch</font> <font color="#990000">=</font> <font color="#FF0000">"/hats/[page/:number]"</font><font color="#990000">.</font>
+<font color="#009900">HostMatch</font> <font color="#990000">=</font> <font color="#FF0000">"[www.]ninenines.eu"</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>You can also have imbricated optional segments.</p>
+<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">PathMatch</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"/hats/[page/[:number]]"</span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>You can retrieve the rest of the host or path using <code>[...]</code>.
-In the case of hosts it will match anything before, in the case
-of paths anything after the previously matched segments. It is
-a special case of optional segments, in that it can have
-zero, one or many segments. You can then find the segments using
-<code>cowboy_req:host_info/1</code> and <code>cowboy_req:path_info/1</code> respectively.
-They will be represented as a list of segments.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">PathMatch</font> <font color="#990000">=</font> <font color="#FF0000">"/hats/[page/[:number]]"</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>You can retrieve the rest of the host or path using <code>[...]</code>. In the case of hosts it will match anything before, in the case of paths anything after the previously matched segments. It is a special case of optional segments, in that it can have zero, one or many segments. You can then find the segments using <code>cowboy_req:host_info/1</code> and <code>cowboy_req:path_info/1</code> respectively. They will be represented as a list of segments.</p>
+<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">PathMatch</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"/hats/[...]"</span><span style="color: #990000">.</span>
-<span style="color: #009900">HostMatch</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"[...]ninenines.eu"</span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>If a binding appears twice in the routing rules, then the match
-will succeed only if they share the same value. This copies the
-Erlang pattern matching behavior.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">PathMatch</font> <font color="#990000">=</font> <font color="#FF0000">"/hats/[...]"</font><font color="#990000">.</font>
+<font color="#009900">HostMatch</font> <font color="#990000">=</font> <font color="#FF0000">"[...]ninenines.eu"</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>If a binding appears twice in the routing rules, then the match will succeed only if they share the same value. This copies the Erlang pattern matching behavior.</p>
+<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">PathMatch</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"/hats/:name/:name"</span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>This is also true when an optional segment is present. In this
-case the two values must be identical only if the segment is
-available.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">PathMatch</font> <font color="#990000">=</font> <font color="#FF0000">"/hats/:name/:name"</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>This is also true when an optional segment is present. In this case the two values must be identical only if the segment is available.</p>
+<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">PathMatch</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"/hats/:name/[:name]"</span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>If a binding is defined in both the host and path, then they must
-also share the same value.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">PathMatch</font> <font color="#990000">=</font> <font color="#FF0000">"/hats/:name/[:name]"</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>If a binding is defined in both the host and path, then they must also share the same value.</p>
+<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">PathMatch</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"/:user/[...]"</span><span style="color: #990000">.</span>
-<span style="color: #009900">HostMatch</span> <span style="color: #990000">=</span> <span style="color: #FF0000">":user.github.com"</span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Finally, there are two special match values that can be used. The
-first is the atom <code>'_'</code> which will match any host or path.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">PathMatch</font> <font color="#990000">=</font> <font color="#FF0000">"/:user/[...]"</font><font color="#990000">.</font>
+<font color="#009900">HostMatch</font> <font color="#990000">=</font> <font color="#FF0000">":user.github.com"</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Finally, there are two special match values that can be used. The first is the atom <code>&apos;_&apos;</code> which will match any host or path.</p>
+<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">PathMatch</span> <span style="color: #990000">=</span> <span style="color: #FF6600">'_'</span><span style="color: #990000">.</span>
-<span style="color: #009900">HostMatch</span> <span style="color: #990000">=</span> <span style="color: #FF6600">'_'</span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>The second is the special host match <code>"*"</code> which will match the
-wildcard path, generally used alongside the <code>OPTIONS</code> method.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">PathMatch</font> <font color="#990000">=</font> <font color="#FF6600">'_'</font><font color="#990000">.</font>
+<font color="#009900">HostMatch</font> <font color="#990000">=</font> <font color="#FF6600">'_'</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>The second is the special host match <code>&quot;*&quot;</code> which will match the wildcard path, generally used alongside the <code>OPTIONS</code> method.</p>
+<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">HostMatch</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"*"</span><span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">HostMatch</font> <font color="#990000">=</font> <font color="#FF0000">"*"</font><font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_constraints">Constraints</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>After the matching has completed, the resulting bindings can be tested
-against a set of constraints. Constraints are only tested when the
-binding is defined. They run in the order you defined them. The match
-will succeed only if they all succeed. If the match fails, then Cowboy
-tries the next route in the list.</p></div>
-<div class="paragraph"><p>The format used for constraints is the same as match functions in
-<code>cowboy_req</code>: they are provided as a list of fields which may have
-one or more constraints. While the router accepts the same format,
-it will skip fields with no constraints and will also ignore default
-values, if any.</p></div>
-<div class="paragraph"><p>Read more about <a href="../constraints">constraints</a>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>After the matching has completed, the resulting bindings can be tested against a set of constraints. Constraints are only tested when the binding is defined. They run in the order you defined them. The match will succeed only if they all succeed. If the match fails, then Cowboy tries the next route in the list.</p>
+<p>The format used for constraints is the same as match functions in <code>cowboy_req</code>: they are provided as a list of fields which may have one or more constraints. While the router accepts the same format, it will skip fields with no constraints and will also ignore default values, if any.</p>
+<p>Read more about <a href="../constraints">constraints</a>.</p>
<h2 id="_compilation">Compilation</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The routes must be compiled before Cowboy can use them. The compilation
-step normalizes the routes to simplify the code and speed up the
-execution, but the routes are still looked up one by one in the end.
-Faster compilation strategies could be to compile the routes directly
-to Erlang code, but would require heavier dependencies.</p></div>
-<div class="paragraph"><p>To compile routes, just call the appropriate function:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The routes must be compiled before Cowboy can use them. The compilation step normalizes the routes to simplify the code and speed up the execution, but the routes are still looked up one by one in the end. Faster compilation strategies could be to compile the routes directly to Erlang code, but would require heavier dependencies.</p>
+<p>To compile routes, just call the appropriate function:</p>
+<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">Dispatch</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_router:compile</span></span>([
- <span style="font-style: italic"><span style="color: #9A1900">%% {HostMatch, list({PathMatch, Handler, InitialState})}</span></span>
- {<span style="color: #FF6600">'_'</span>, [{<span style="color: #FF6600">'_'</span>, <span style="color: #FF6600">my_handler</span>, #{}}]}
+<pre><tt><font color="#009900">Dispatch</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_router:compile</font></b>([
+ <i><font color="#9A1900">%% {HostMatch, list({PathMatch, Handler, InitialState})}</font></i>
+ {<font color="#FF6600">'_'</font>, [{<font color="#FF6600">'_'</font>, <font color="#FF6600">my_handler</font>, #{}}]}
]),
-<span style="font-style: italic"><span style="color: #9A1900">%% Name, NbAcceptors, TransOpts, ProtoOpts</span></span>
-<span style="font-weight: bold"><span style="color: #000000">cowboy:start_clear</span></span>(<span style="color: #FF6600">my_http_listener</span>,
- [{<span style="color: #FF6600">port</span>, <span style="color: #993399">8080</span>}],
- #{<span style="color: #0000FF">env</span> <span style="color: #990000">=&gt;</span> #{<span style="color: #0000FF">dispatch</span> <span style="color: #990000">=&gt;</span> <span style="color: #009900">Dispatch</span>}}
-)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<i><font color="#9A1900">%% Name, NbAcceptors, TransOpts, ProtoOpts</font></i>
+<b><font color="#000000">cowboy:start_clear</font></b>(<font color="#FF6600">my_http_listener</font>,
+ [{<font color="#FF6600">port</font>, <font color="#993399">8080</font>}],
+ #{<font color="#0000FF">env</font> <font color="#990000">=&gt;</font> #{<font color="#0000FF">dispatch</font> <font color="#990000">=&gt;</font> <font color="#009900">Dispatch</font>}}
+)<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_live_update">Live update</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>You can use the <code>cowboy:set_env/3</code> function for updating the dispatch
-list used by routing. This will apply to all new connections accepted
-by the listener:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>You can use the <code>cowboy:set_env/3</code> function for updating the dispatch list used by routing. This will apply to all new connections accepted by the listener:</p>
+<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">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>
+<pre><tt><font color="#009900">Dispatch</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_router:compile</font></b>(<font color="#009900">Routes</font>),
+<b><font color="#000000">cowboy:set_env</font></b>(<font color="#FF6600">my_http_listener</font>, <font color="#FF6600">dispatch</font>, <font color="#009900">Dispatch</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Note that you need to compile the routes again before updating.</p>
+
diff --git a/docs/en/cowboy/2.3/guide/specs/index.html b/docs/en/cowboy/2.3/guide/specs/index.html
index 49ba1e1a..b16bd2fa 100644
--- a/docs/en/cowboy/2.3/guide/specs/index.html
+++ b/docs/en/cowboy/2.3/guide/specs/index.html
@@ -62,859 +62,345 @@
<h1 class="lined-header"><span>HTTP and other specifications</span></h1>
-<div class="paragraph"><p>This chapter intends to list all the specification documents
-for or related to HTTP.</p></div>
-<div class="sect1">
+<p>This chapter intends to list all the specification documents for or related to HTTP.</p>
<h2 id="_http">HTTP</h2>
-<div class="sectionbody">
-<div class="sect3">
<h4 id="_iana_registries">IANA Registries</h4>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="https://www.iana.org/assignments/http-methods/http-methods.xhtml">HTTP Method Registry</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml">HTTP Status Code Registry</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.iana.org/assignments/message-headers/message-headers.xhtml">Message Headers</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.iana.org/assignments/http-parameters/http-parameters.xhtml">HTTP Parameters</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.iana.org/assignments/http-alt-svc-parameters/http-alt-svc-parameters.xhtml">HTTP Alt-Svc Parameter Registry</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.iana.org/assignments/http-authschemes/http-authschemes.xhtml">HTTP Authentication Scheme Registry</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.iana.org/assignments/http-cache-directives/http-cache-directives.xhtml">HTTP Cache Directive Registry</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.iana.org/assignments/http-dig-alg/http-dig-alg.xhtml">HTTP Digest Algorithm Values</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.iana.org/assignments/hoba-device-identifiers/hoba-device-identifiers.xhtml">HTTP Origin-Bound Authentication Device Identifier Types</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.iana.org/assignments/http-upgrade-tokens/http-upgrade-tokens.xhtml">HTTP Upgrade Token Registry</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.iana.org/assignments/http-warn-codes/http-warn-codes.xhtml">HTTP Warn Codes</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.iana.org/assignments/http2-parameters/http2-parameters.xhtml">HTTP/2 Parameters</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.ietf.org/assignments/websocket/websocket.xml">WebSocket Protocol Registries</a>
-</p>
-</li>
-</ul></div>
-</div>
-<div class="sect3">
+<ul><li><a href="https://www.iana.org/assignments/http-methods/http-methods.xhtml">HTTP Method Registry</a>
+</li>
+<li><a href="https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml">HTTP Status Code Registry</a>
+</li>
+<li><a href="https://www.iana.org/assignments/message-headers/message-headers.xhtml">Message Headers</a>
+</li>
+<li><a href="https://www.iana.org/assignments/http-parameters/http-parameters.xhtml">HTTP Parameters</a>
+</li>
+<li><a href="https://www.iana.org/assignments/http-alt-svc-parameters/http-alt-svc-parameters.xhtml">HTTP Alt-Svc Parameter Registry</a>
+</li>
+<li><a href="https://www.iana.org/assignments/http-authschemes/http-authschemes.xhtml">HTTP Authentication Scheme Registry</a>
+</li>
+<li><a href="https://www.iana.org/assignments/http-cache-directives/http-cache-directives.xhtml">HTTP Cache Directive Registry</a>
+</li>
+<li><a href="https://www.iana.org/assignments/http-dig-alg/http-dig-alg.xhtml">HTTP Digest Algorithm Values</a>
+</li>
+<li><a href="https://www.iana.org/assignments/hoba-device-identifiers/hoba-device-identifiers.xhtml">HTTP Origin-Bound Authentication Device Identifier Types</a>
+</li>
+<li><a href="https://www.iana.org/assignments/http-upgrade-tokens/http-upgrade-tokens.xhtml">HTTP Upgrade Token Registry</a>
+</li>
+<li><a href="https://www.iana.org/assignments/http-warn-codes/http-warn-codes.xhtml">HTTP Warn Codes</a>
+</li>
+<li><a href="https://www.iana.org/assignments/http2-parameters/http2-parameters.xhtml">HTTP/2 Parameters</a>
+</li>
+<li><a href="https://www.ietf.org/assignments/websocket/websocket.xml">WebSocket Protocol Registries</a>
+</li>
+</ul>
<h4 id="_current">Current</h4>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="http://www.w3.org/TR/cors/">CORS</a>: Cross-Origin Resource Sharing
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/CSP2/">CSP2</a>: Content Security Policy Level 2
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/tracking-dnt/">DNT</a>: Tracking Preference Expression (DNT)
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/eventsource/">eventsource</a>: Server-Sent Events
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.w3.org/TR/html4/interact/forms.html#h-17.13.4">Form content types</a>: Form content types
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.w3.org/TR/preload/">Preload</a>: Preload
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.haproxy.org/download/1.8/doc/proxy-protocol.txt">PROXY</a>: The PROXY protocol
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm">REST</a>: Fielding&#8217;s Dissertation
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc1945">RFC 1945</a>: HTTP/1.0
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc1951">RFC 1951</a>: DEFLATE Compressed Data Format Specification version 1.3
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc1952">RFC 1952</a>: GZIP file format specification version 4.3
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc2046#section-5.1">RFC 2046</a>: Multipart media type (in MIME Part Two: Media Types)
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc2295">RFC 2295</a>: Transparent Content Negotiation in HTTP
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc2296">RFC 2296</a>: HTTP Remote Variant Selection Algorithm: RVSA/1.0
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc2817">RFC 2817</a>: Upgrading to TLS Within HTTP/1.1
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc2818">RFC 2818</a>: HTTP Over TLS
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc3230">RFC 3230</a>: Instance Digests in HTTP
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc4559">RFC 4559</a>: SPNEGO-based Kerberos and NTLM HTTP Authentication in Microsoft Windows
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc5789">RFC 5789</a>: PATCH Method for HTTP
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc5843">RFC 5843</a>: Additional Hash Algorithms for HTTP Instance Digests
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc5861">RFC 5861</a>: HTTP Cache-Control Extensions for Stale Content
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc5988">RFC 5988</a>: Web Linking
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6265">RFC 6265</a>: HTTP State Management Mechanism
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6266">RFC 6266</a>: Use of the Content-Disposition Header Field
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6454">RFC 6454</a>: The Web Origin Concept
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6455">RFC 6455</a>: The WebSocket Protocol
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6585">RFC 6585</a>: Additional HTTP Status Codes
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6750">RFC 6750</a>: The OAuth 2.0 Authorization Framework: Bearer Token Usage
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6797">RFC 6797</a>: HTTP Strict Transport Security (HSTS)
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6903">RFC 6903</a>: Additional Link Relation Types
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7034">RFC 7034</a>: HTTP Header Field X-Frame-Options
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7089">RFC 7089</a>: Time-Based Access to Resource States: Memento
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7230">RFC 7230</a>: HTTP/1.1 Message Syntax and Routing
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7231">RFC 7231</a>: HTTP/1.1 Semantics and Content
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>: HTTP/1.1 Conditional Requests
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7233">RFC 7233</a>: HTTP/1.1 Range Requests
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7234">RFC 7234</a>: HTTP/1.1 Caching
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7235">RFC 7235</a>: HTTP/1.1 Authentication
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7239">RFC 7239</a>: Forwarded HTTP Extension
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7240">RFC 7240</a>: Prefer Header for HTTP
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7469">RFC 7469</a>: Public Key Pinning Extension for HTTP
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7486">RFC 7486</a>: HTTP Origin-Bound Authentication (HOBA)
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7538">RFC 7538</a>: HTTP Status Code 308 (Permanent Redirect)
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7540">RFC 7540</a>: Hypertext Transfer Protocol Version 2 (HTTP/2)
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7541">RFC 7541</a>: HPACK: Header Compression for HTTP/2
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7578">RFC 7578</a>: Returning Values from Forms: multipart/form-data
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7615">RFC 7615</a>: HTTP Authentication-Info and Proxy-Authentication-Info Response Header Fields
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7616">RFC 7616</a>: HTTP Digest Access Authentication
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7617">RFC 7617</a>: The <em>Basic</em> HTTP Authentication Scheme
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7639">RFC 7639</a>: The ALPN HTTP Header Field
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7692">RFC 7692</a>: Compression Extensions for WebSocket
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7694">RFC 7694</a>: HTTP Client-Initiated Content-Encoding
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7725">RFC 7725</a>: An HTTP Status Code to Report Legal Obstacles
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7804">RFC 7804</a>: Salted Challenge Response HTTP Authentication Mechanism
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7838">RFC 7838</a>: HTTP Alternative Services
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7932">RFC 7932</a>: Brotli Compressed Data Format
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7936">RFC 7936</a>: Clarifying Registry Procedures for the WebSocket Subprotocol Name Registry
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc8053">RFC 8053</a>: HTTP Authentication Extensions for Interactive Clients
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc8164">RFC 8164</a>: Opportunistic Security for HTTP/2
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc8187">RFC 8187</a>: Indicating Character Encoding and Language for HTTP Header Field Parameters
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc8188">RFC 8188</a>: Encrypted Content-Encoding for HTTP
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc8246">RFC 8246</a>: HTTP Immutable Responses
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc8297">RFC 8297</a>: An HTTP Status Code for Indicating Hints
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc8336">RFC 8336</a>: The ORIGIN HTTP/2 Frame
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.w3.org/TR/webmention/">Webmention</a>: Webmention
-</p>
-</li>
-</ul></div>
-</div>
-<div class="sect3">
+<ul><li><a href="http://www.w3.org/TR/cors/">CORS</a>: Cross-Origin Resource Sharing
+</li>
+<li><a href="http://www.w3.org/TR/CSP2/">CSP2</a>: Content Security Policy Level 2
+</li>
+<li><a href="http://www.w3.org/TR/tracking-dnt/">DNT</a>: Tracking Preference Expression (DNT)
+</li>
+<li><a href="http://www.w3.org/TR/eventsource/">eventsource</a>: Server-Sent Events
+</li>
+<li><a href="https://www.w3.org/TR/html4/interact/forms.html#h-17.13.4">Form content types</a>: Form content types
+</li>
+<li><a href="https://www.w3.org/TR/preload/">Preload</a>: Preload
+</li>
+<li><a href="https://www.haproxy.org/download/1.8/doc/proxy-protocol.txt">PROXY</a>: The PROXY protocol
+</li>
+<li><a href="http://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm">REST</a>: Fielding&apos;s Dissertation
+</li>
+<li><a href="https://tools.ietf.org/html/rfc1945">RFC 1945</a>: HTTP/1.0
+</li>
+<li><a href="https://tools.ietf.org/html/rfc1951">RFC 1951</a>: DEFLATE Compressed Data Format Specification version 1.3
+</li>
+<li><a href="https://tools.ietf.org/html/rfc1952">RFC 1952</a>: GZIP file format specification version 4.3
+</li>
+<li><a href="https://tools.ietf.org/html/rfc2046#section-5.1">RFC 2046</a>: Multipart media type (in MIME Part Two: Media Types)
+</li>
+<li><a href="https://tools.ietf.org/html/rfc2295">RFC 2295</a>: Transparent Content Negotiation in HTTP
+</li>
+<li><a href="https://tools.ietf.org/html/rfc2296">RFC 2296</a>: HTTP Remote Variant Selection Algorithm: RVSA/1.0
+</li>
+<li><a href="https://tools.ietf.org/html/rfc2817">RFC 2817</a>: Upgrading to TLS Within HTTP/1.1
+</li>
+<li><a href="https://tools.ietf.org/html/rfc2818">RFC 2818</a>: HTTP Over TLS
+</li>
+<li><a href="https://tools.ietf.org/html/rfc3230">RFC 3230</a>: Instance Digests in HTTP
+</li>
+<li><a href="https://tools.ietf.org/html/rfc4559">RFC 4559</a>: SPNEGO-based Kerberos and NTLM HTTP Authentication in Microsoft Windows
+</li>
+<li><a href="https://tools.ietf.org/html/rfc5789">RFC 5789</a>: PATCH Method for HTTP
+</li>
+<li><a href="https://tools.ietf.org/html/rfc5843">RFC 5843</a>: Additional Hash Algorithms for HTTP Instance Digests
+</li>
+<li><a href="https://tools.ietf.org/html/rfc5861">RFC 5861</a>: HTTP Cache-Control Extensions for Stale Content
+</li>
+<li><a href="https://tools.ietf.org/html/rfc5988">RFC 5988</a>: Web Linking
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6265">RFC 6265</a>: HTTP State Management Mechanism
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6266">RFC 6266</a>: Use of the Content-Disposition Header Field
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6454">RFC 6454</a>: The Web Origin Concept
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6455">RFC 6455</a>: The WebSocket Protocol
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6585">RFC 6585</a>: Additional HTTP Status Codes
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6750">RFC 6750</a>: The OAuth 2.0 Authorization Framework: Bearer Token Usage
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6797">RFC 6797</a>: HTTP Strict Transport Security (HSTS)
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6903">RFC 6903</a>: Additional Link Relation Types
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7034">RFC 7034</a>: HTTP Header Field X-Frame-Options
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7089">RFC 7089</a>: Time-Based Access to Resource States: Memento
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7230">RFC 7230</a>: HTTP/1.1 Message Syntax and Routing
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7231">RFC 7231</a>: HTTP/1.1 Semantics and Content
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>: HTTP/1.1 Conditional Requests
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7233">RFC 7233</a>: HTTP/1.1 Range Requests
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7234">RFC 7234</a>: HTTP/1.1 Caching
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7235">RFC 7235</a>: HTTP/1.1 Authentication
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7239">RFC 7239</a>: Forwarded HTTP Extension
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7240">RFC 7240</a>: Prefer Header for HTTP
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7469">RFC 7469</a>: Public Key Pinning Extension for HTTP
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7486">RFC 7486</a>: HTTP Origin-Bound Authentication (HOBA)
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7538">RFC 7538</a>: HTTP Status Code 308 (Permanent Redirect)
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7540">RFC 7540</a>: Hypertext Transfer Protocol Version 2 (HTTP/2)
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7541">RFC 7541</a>: HPACK: Header Compression for HTTP/2
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7578">RFC 7578</a>: Returning Values from Forms: multipart/form-data
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7615">RFC 7615</a>: HTTP Authentication-Info and Proxy-Authentication-Info Response Header Fields
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7616">RFC 7616</a>: HTTP Digest Access Authentication
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7617">RFC 7617</a>: The <em>Basic</em> HTTP Authentication Scheme
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7639">RFC 7639</a>: The ALPN HTTP Header Field
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7692">RFC 7692</a>: Compression Extensions for WebSocket
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7694">RFC 7694</a>: HTTP Client-Initiated Content-Encoding
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7725">RFC 7725</a>: An HTTP Status Code to Report Legal Obstacles
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7804">RFC 7804</a>: Salted Challenge Response HTTP Authentication Mechanism
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7838">RFC 7838</a>: HTTP Alternative Services
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7932">RFC 7932</a>: Brotli Compressed Data Format
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7936">RFC 7936</a>: Clarifying Registry Procedures for the WebSocket Subprotocol Name Registry
+</li>
+<li><a href="https://tools.ietf.org/html/rfc8053">RFC 8053</a>: HTTP Authentication Extensions for Interactive Clients
+</li>
+<li><a href="https://tools.ietf.org/html/rfc8164">RFC 8164</a>: Opportunistic Security for HTTP/2
+</li>
+<li><a href="https://tools.ietf.org/html/rfc8187">RFC 8187</a>: Indicating Character Encoding and Language for HTTP Header Field Parameters
+</li>
+<li><a href="https://tools.ietf.org/html/rfc8188">RFC 8188</a>: Encrypted Content-Encoding for HTTP
+</li>
+<li><a href="https://tools.ietf.org/html/rfc8246">RFC 8246</a>: HTTP Immutable Responses
+</li>
+<li><a href="https://tools.ietf.org/html/rfc8297">RFC 8297</a>: An HTTP Status Code for Indicating Hints
+</li>
+<li><a href="https://tools.ietf.org/html/rfc8336">RFC 8336</a>: The ORIGIN HTTP/2 Frame
+</li>
+<li><a href="https://www.w3.org/TR/webmention/">Webmention</a>: Webmention
+</li>
+</ul>
<h4 id="_upcoming">Upcoming</h4>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="https://www.w3.org/TR/csp-cookies/">Content Security Policy: Cookie Controls</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.w3.org/TR/csp-embedded-enforcement/">Content Security Policy: Embedded Enforcement</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.w3.org/TR/CSP3/">Content Security Policy Level 3</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.w3.org/TR/csp-pinning/">Content Security Policy Pinning</a>
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/referrer-policy/">Referrer Policy</a>
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/UISecurity/">User Interface Security Directives for Content Security Policy</a>
-</p>
-</li>
-</ul></div>
-</div>
-<div class="sect3">
+<ul><li><a href="https://www.w3.org/TR/csp-cookies/">Content Security Policy: Cookie Controls</a>
+</li>
+<li><a href="https://www.w3.org/TR/csp-embedded-enforcement/">Content Security Policy: Embedded Enforcement</a>
+</li>
+<li><a href="https://www.w3.org/TR/CSP3/">Content Security Policy Level 3</a>
+</li>
+<li><a href="https://www.w3.org/TR/csp-pinning/">Content Security Policy Pinning</a>
+</li>
+<li><a href="http://www.w3.org/TR/referrer-policy/">Referrer Policy</a>
+</li>
+<li><a href="http://www.w3.org/TR/UISecurity/">User Interface Security Directives for Content Security Policy</a>
+</li>
+</ul>
<h4 id="_informative">Informative</h4>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="http://www.w3.org/TR/webarch/">Architecture of the World Wide Web</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc2936">RFC 2936</a>: HTTP MIME Type Handler Detection
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc2964">RFC 2964</a>: Use of HTTP State Management
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc3143">RFC 3143</a>: Known HTTP Proxy/Caching Problems
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6202">RFC 6202</a>: Known Issues and Best Practices for the Use of Long Polling and Streaming in Bidirectional HTTP
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6838">RFC 6838</a>: Media Type Specifications and Registration Procedures
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7478">RFC 7478</a>: Web Real-Time Communication Use Cases and Requirements
-</p>
-</li>
-</ul></div>
-</div>
-<div class="sect3">
+<ul><li><a href="http://www.w3.org/TR/webarch/">Architecture of the World Wide Web</a>
+</li>
+<li><a href="https://tools.ietf.org/html/rfc2936">RFC 2936</a>: HTTP MIME Type Handler Detection
+</li>
+<li><a href="https://tools.ietf.org/html/rfc2964">RFC 2964</a>: Use of HTTP State Management
+</li>
+<li><a href="https://tools.ietf.org/html/rfc3143">RFC 3143</a>: Known HTTP Proxy/Caching Problems
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6202">RFC 6202</a>: Known Issues and Best Practices for the Use of Long Polling and Streaming in Bidirectional HTTP
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6838">RFC 6838</a>: Media Type Specifications and Registration Procedures
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7478">RFC 7478</a>: Web Real-Time Communication Use Cases and Requirements
+</li>
+</ul>
<h4 id="_related">Related</h4>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="http://www.w3.org/TR/app-uri/">app: URL Scheme</a>
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/beacon/">Beacon</a>
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/FileAPI/">File API</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc8030">Generic Event Delivery Using HTTP Push</a>
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/capability-urls/">Good Practices for Capability URLs</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://html.spec.whatwg.org/multipage/">HTML Living Standard</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://developers.whatwg.org/">HTML Living Standard for Web developers</a>
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/html401/">HTML4.01</a>
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/html5/">HTML5</a>
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/html51/">HTML5.1</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.w3.org/TR/html52/">HTML5.2</a>
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/media-frags/">Media Fragments URI 1.0</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6690">RFC 6690</a>: Constrained RESTful Environments (CoRE) Link Format
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7807">RFC 7807</a>: Problem Details for HTTP APIs
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6906">RFC 6906</a>: The <em>profile</em> Link Relation Type
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/SRI/">Subresource Integrity</a>
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/tracking-compliance/">Tracking Compliance and Scope</a>
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/media-frags-reqs/">Use cases and requirements for Media Fragments</a>
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/webrtc/">WebRTC 1.0: Real-time Communication Between Browsers</a>
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/websockets/">Websocket API</a>
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/XMLHttpRequest/">XMLHttpRequest Level 1</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://xhr.spec.whatwg.org/">XMLHttpRequest Living Standard</a>
-</p>
-</li>
-</ul></div>
-</div>
-<div class="sect3">
+<ul><li><a href="http://www.w3.org/TR/app-uri/">app: URL Scheme</a>
+</li>
+<li><a href="http://www.w3.org/TR/beacon/">Beacon</a>
+</li>
+<li><a href="http://www.w3.org/TR/FileAPI/">File API</a>
+</li>
+<li><a href="https://tools.ietf.org/html/rfc8030">Generic Event Delivery Using HTTP Push</a>
+</li>
+<li><a href="http://www.w3.org/TR/capability-urls/">Good Practices for Capability URLs</a>
+</li>
+<li><a href="https://html.spec.whatwg.org/multipage/">HTML Living Standard</a>
+</li>
+<li><a href="https://developers.whatwg.org/">HTML Living Standard for Web developers</a>
+</li>
+<li><a href="http://www.w3.org/TR/html401/">HTML4.01</a>
+</li>
+<li><a href="http://www.w3.org/TR/html5/">HTML5</a>
+</li>
+<li><a href="http://www.w3.org/TR/html51/">HTML5.1</a>
+</li>
+<li><a href="https://www.w3.org/TR/html52/">HTML5.2</a>
+</li>
+<li><a href="http://www.w3.org/TR/media-frags/">Media Fragments URI 1.0</a>
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6690">RFC 6690</a>: Constrained RESTful Environments (CoRE) Link Format
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7807">RFC 7807</a>: Problem Details for HTTP APIs
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6906">RFC 6906</a>: The <em>profile</em> Link Relation Type
+</li>
+<li><a href="http://www.w3.org/TR/SRI/">Subresource Integrity</a>
+</li>
+<li><a href="http://www.w3.org/TR/tracking-compliance/">Tracking Compliance and Scope</a>
+</li>
+<li><a href="http://www.w3.org/TR/media-frags-reqs/">Use cases and requirements for Media Fragments</a>
+</li>
+<li><a href="http://www.w3.org/TR/webrtc/">WebRTC 1.0: Real-time Communication Between Browsers</a>
+</li>
+<li><a href="http://www.w3.org/TR/websockets/">Websocket API</a>
+</li>
+<li><a href="http://www.w3.org/TR/XMLHttpRequest/">XMLHttpRequest Level 1</a>
+</li>
+<li><a href="https://xhr.spec.whatwg.org/">XMLHttpRequest Living Standard</a>
+</li>
+</ul>
<h4 id="_seemingly_obsolete">Seemingly obsolete</h4>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc2227">RFC 2227</a>: Simple Hit-Metering and Usage-Limiting for HTTP
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc2310">RFC 2310</a>: The Safe Response Header Field
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc2324">RFC 2324</a>: Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0)
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc2660">RFC 2660</a>: The Secure HyperText Transfer Protocol
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc2774">RFC 2774</a>: An HTTP Extension Framework
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc2965">RFC 2965</a>: HTTP State Management Mechanism (Cookie2)
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc3229">RFC 3229</a>: Delta encoding in HTTP
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7168">RFC 7168</a>: The Hyper Text Coffee Pot Control Protocol for Tea Efflux Appliances (HTCPCP-TEA)
-</p>
-</li>
-<li>
-<p>
-<a href="http://dev.chromium.org/spdy/spdy-protocol">SPDY</a>: SPDY Protocol
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/draft-tyoshino-hybi-websocket-perframe-deflate-06">x-webkit-deflate-frame</a>: Deprecated Websocket compression
-</p>
-</li>
-</ul></div>
-</div>
-</div>
-</div>
-<div class="sect1">
+<ul><li><a href="https://tools.ietf.org/html/rfc2227">RFC 2227</a>: Simple Hit-Metering and Usage-Limiting for HTTP
+</li>
+<li><a href="https://tools.ietf.org/html/rfc2310">RFC 2310</a>: The Safe Response Header Field
+</li>
+<li><a href="https://tools.ietf.org/html/rfc2324">RFC 2324</a>: Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0)
+</li>
+<li><a href="https://tools.ietf.org/html/rfc2660">RFC 2660</a>: The Secure HyperText Transfer Protocol
+</li>
+<li><a href="https://tools.ietf.org/html/rfc2774">RFC 2774</a>: An HTTP Extension Framework
+</li>
+<li><a href="https://tools.ietf.org/html/rfc2965">RFC 2965</a>: HTTP State Management Mechanism (Cookie2)
+</li>
+<li><a href="https://tools.ietf.org/html/rfc3229">RFC 3229</a>: Delta encoding in HTTP
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7168">RFC 7168</a>: The Hyper Text Coffee Pot Control Protocol for Tea Efflux Appliances (HTCPCP-TEA)
+</li>
+<li><a href="http://dev.chromium.org/spdy/spdy-protocol">SPDY</a>: SPDY Protocol
+</li>
+<li><a href="https://tools.ietf.org/html/draft-tyoshino-hybi-websocket-perframe-deflate-06">x-webkit-deflate-frame</a>: Deprecated Websocket compression
+</li>
+</ul>
<h2 id="_url">URL</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc3986">RFC 3986</a>: URI Generic Syntax
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6570">RFC 6570</a>: URI Template
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6874">RFC 6874</a>: Representing IPv6 Zone Identifiers in Address Literals and URIs
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7320">RFC 7320</a>: URI Design and Ownership
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/url-1/">URL</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://url.spec.whatwg.org/">URL Living Standard</a>
-</p>
-</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+<ul><li><a href="https://tools.ietf.org/html/rfc3986">RFC 3986</a>: URI Generic Syntax
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6570">RFC 6570</a>: URI Template
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6874">RFC 6874</a>: Representing IPv6 Zone Identifiers in Address Literals and URIs
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7320">RFC 7320</a>: URI Design and Ownership
+</li>
+<li><a href="http://www.w3.org/TR/url-1/">URL</a>
+</li>
+<li><a href="https://url.spec.whatwg.org/">URL Living Standard</a>
+</li>
+</ul>
<h2 id="_webdav">WebDAV</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc3253">RFC 3253</a>: Versioning Extensions to WebDAV
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc3648">RFC 3648</a>: WebDAV Ordered Collections Protocol
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc3744">RFC 3744</a>: WebDAV Access Control Protocol
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc4316">RFC 4316</a>: Datatypes for WebDAV Properties
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc4331">RFC 4331</a>: Quota and Size Properties for DAV Collections
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc4437">RFC 4437</a>: WebDAV Redirect Reference Resources
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc4709">RFC 4709</a>: Mounting WebDAV Servers
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc4791">RFC 4791</a>: Calendaring Extensions to WebDAV (CalDAV)
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc4918">RFC 4918</a>: HTTP Extensions for WebDAV
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc5323">RFC 5323</a>: WebDAV SEARCH
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc5397">RFC 5397</a>: WebDAV Current Principal Extension
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc5689">RFC 5689</a>: Extended MKCOL for WebDAV
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc5842">RFC 5842</a>: Binding Extensions to WebDAV
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc5995">RFC 5995</a>: Using POST to Add Members to WebDAV Collections
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6352">RFC 6352</a>: CardDAV: vCard Extensions to WebDAV
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6578">RFC 6578</a>: Collection Synchronization for WebDAV
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6638">RFC 6638</a>: Scheduling Extensions to CalDAV
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6764">RFC 6764</a>: Locating Services for Calendaring Extensions to WebDAV (CalDAV) and vCard Extensions to WebDAV (CardDAV)
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7809">RFC 7809</a>: Calendaring Extensions to WebDAV (CalDAV): Time Zones by Reference
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7953">RFC 7953</a>: Calendar Availability
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc8144">RFC 8144</a>: Use of the Prefer Header Field in WebDAV
-</p>
-</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+<ul><li><a href="https://tools.ietf.org/html/rfc3253">RFC 3253</a>: Versioning Extensions to WebDAV
+</li>
+<li><a href="https://tools.ietf.org/html/rfc3648">RFC 3648</a>: WebDAV Ordered Collections Protocol
+</li>
+<li><a href="https://tools.ietf.org/html/rfc3744">RFC 3744</a>: WebDAV Access Control Protocol
+</li>
+<li><a href="https://tools.ietf.org/html/rfc4316">RFC 4316</a>: Datatypes for WebDAV Properties
+</li>
+<li><a href="https://tools.ietf.org/html/rfc4331">RFC 4331</a>: Quota and Size Properties for DAV Collections
+</li>
+<li><a href="https://tools.ietf.org/html/rfc4437">RFC 4437</a>: WebDAV Redirect Reference Resources
+</li>
+<li><a href="https://tools.ietf.org/html/rfc4709">RFC 4709</a>: Mounting WebDAV Servers
+</li>
+<li><a href="https://tools.ietf.org/html/rfc4791">RFC 4791</a>: Calendaring Extensions to WebDAV (CalDAV)
+</li>
+<li><a href="https://tools.ietf.org/html/rfc4918">RFC 4918</a>: HTTP Extensions for WebDAV
+</li>
+<li><a href="https://tools.ietf.org/html/rfc5323">RFC 5323</a>: WebDAV SEARCH
+</li>
+<li><a href="https://tools.ietf.org/html/rfc5397">RFC 5397</a>: WebDAV Current Principal Extension
+</li>
+<li><a href="https://tools.ietf.org/html/rfc5689">RFC 5689</a>: Extended MKCOL for WebDAV
+</li>
+<li><a href="https://tools.ietf.org/html/rfc5842">RFC 5842</a>: Binding Extensions to WebDAV
+</li>
+<li><a href="https://tools.ietf.org/html/rfc5995">RFC 5995</a>: Using POST to Add Members to WebDAV Collections
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6352">RFC 6352</a>: CardDAV: vCard Extensions to WebDAV
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6578">RFC 6578</a>: Collection Synchronization for WebDAV
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6638">RFC 6638</a>: Scheduling Extensions to CalDAV
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6764">RFC 6764</a>: Locating Services for Calendaring Extensions to WebDAV (CalDAV) and vCard Extensions to WebDAV (CardDAV)
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7809">RFC 7809</a>: Calendaring Extensions to WebDAV (CalDAV): Time Zones by Reference
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7953">RFC 7953</a>: Calendar Availability
+</li>
+<li><a href="https://tools.ietf.org/html/rfc8144">RFC 8144</a>: Use of the Prefer Header Field in WebDAV
+</li>
+</ul>
<h2 id="_coap">CoAP</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7252">RFC 7252</a>: The Constrained Application Protocol (CoAP)
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7390">RFC 7390</a>: Group Communication for CoAP
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7641">RFC 7641</a>: Observing Resources in CoAP
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7650">RFC 7650</a>: A CoAP Usage for REsource LOcation And Discovery (RELOAD)
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7959">RFC 7959</a>: Block-Wise Transfers in CoAP
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7967">RFC 7967</a>: CoAP Option for No Server Response
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc8075">RFC 8075</a>: Guidelines for Mapping Implementations: HTTP to CoAP
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc8132">RFC 8132</a>: PATCH and FETCH Methods for CoAP
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc8323">RFC 8323</a>: CoAP over TCP, TLS, and WebSockets
-</p>
-</li>
-</ul></div>
-</div>
-</div>
+<ul><li><a href="https://tools.ietf.org/html/rfc7252">RFC 7252</a>: The Constrained Application Protocol (CoAP)
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7390">RFC 7390</a>: Group Communication for CoAP
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7641">RFC 7641</a>: Observing Resources in CoAP
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7650">RFC 7650</a>: A CoAP Usage for REsource LOcation And Discovery (RELOAD)
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7959">RFC 7959</a>: Block-Wise Transfers in CoAP
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7967">RFC 7967</a>: CoAP Option for No Server Response
+</li>
+<li><a href="https://tools.ietf.org/html/rfc8075">RFC 8075</a>: Guidelines for Mapping Implementations: HTTP to CoAP
+</li>
+<li><a href="https://tools.ietf.org/html/rfc8132">RFC 8132</a>: PATCH and FETCH Methods for CoAP
+</li>
+<li><a href="https://tools.ietf.org/html/rfc8323">RFC 8323</a>: CoAP over TCP, TLS, and WebSockets
+</li>
+</ul>
+
diff --git a/docs/en/cowboy/2.3/guide/static_files/index.html b/docs/en/cowboy/2.3/guide/static_files/index.html
index 5b5bbd0b..f3fe3254 100644
--- a/docs/en/cowboy/2.3/guide/static_files/index.html
+++ b/docs/en/cowboy/2.3/guide/static_files/index.html
@@ -62,173 +62,101 @@
<h1 class="lined-header"><span>Static files</span></h1>
-<div class="paragraph"><p>Cowboy comes with a ready to use handler for serving static
-files. It is provided as a convenience for serving files
-during development.</p></div>
-<div class="paragraph"><p>For systems in production, consider using one of the many
-Content Distribution Network (CDN) available on the market,
-as they are the best solution for serving files.</p></div>
-<div class="paragraph"><p>The static handler can serve either one file or all files
-from a given directory. The etag generation and mime types
-can be configured.</p></div>
-<div class="sect1">
+<p>Cowboy comes with a ready to use handler for serving static files. It is provided as a convenience for serving files during development.</p>
+<p>For systems in production, consider using one of the many Content Distribution Network (CDN) available on the market, as they are the best solution for serving files.</p>
+<p>The static handler can serve either one file or all files from a given directory. The etag generation and mime types can be configured.</p>
<h2 id="_serve_one_file">Serve one file</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>You can use the static handler to serve one specific file
-from an application&#8217;s private directory. This is particularly
-useful to serve an <em>index.html</em> file when the client requests
-the <code>/</code> path, for example. The path configured is relative
-to the given application&#8217;s private directory.</p></div>
-<div class="paragraph"><p>The following rule will serve the file <em>static/index.html</em>
-from the application <code>my_app</code>'s priv directory whenever the
-path <code>/</code> is accessed:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>You can use the static handler to serve one specific file from an application&apos;s private directory. This is particularly useful to serve an <em>index.html</em> file when the client requests the <code>/</code> path, for example. The path configured is relative to the given application&apos;s private directory.</p>
+<p>The following rule will serve the file <em>static/index.html</em> from the application <code>my_app</code>&apos;s priv directory whenever the path <code>/</code> is accessed:</p>
+<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: #FF0000">"/"</span>, <span style="color: #FF6600">cowboy_static</span>, {<span style="color: #FF6600">priv_file</span>, <span style="color: #FF6600">my_app</span>, <span style="color: #FF0000">"static/index.html"</span>}}</tt></pre></div></div>
-<div class="paragraph"><p>You can also specify the absolute path to a file, or the
-path to the file relative to the current directory:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>{<font color="#FF0000">"/"</font>, <font color="#FF6600">cowboy_static</font>, {<font color="#FF6600">priv_file</font>, <font color="#FF6600">my_app</font>, <font color="#FF0000">"static/index.html"</font>}}</tt></pre>
+</div></div>
+<p>You can also specify the absolute path to a file, or the path to the file relative to the current directory:</p>
+<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: #FF0000">"/"</span>, <span style="color: #FF6600">cowboy_static</span>, {<span style="color: #FF6600">file</span>, <span style="color: #FF0000">"/var/www/index.html"</span>}}</tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#FF0000">"/"</font>, <font color="#FF6600">cowboy_static</font>, {<font color="#FF6600">file</font>, <font color="#FF0000">"/var/www/index.html"</font>}}</tt></pre>
+</div></div>
<h2 id="_serve_all_files_from_a_directory">Serve all files from a directory</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>You can also use the static handler to serve all files that
-can be found in the configured directory. The handler will
-use the <code>path_info</code> information to resolve the file location,
-which means that your route must end with a <code>[...]</code> pattern
-for it to work. All files are served, including the ones that
-may be found in subfolders.</p></div>
-<div class="paragraph"><p>You can specify the directory relative to an application&#8217;s
-private directory.</p></div>
-<div class="paragraph"><p>The following rule will serve any file found in the application
-<code>my_app</code>'s priv directory inside the <code>static/assets</code> folder
-whenever the requested path begins with <code>/assets/</code>:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>You can also use the static handler to serve all files that can be found in the configured directory. The handler will use the <code>path_info</code> information to resolve the file location, which means that your route must end with a <code>[...]</code> pattern for it to work. All files are served, including the ones that may be found in subfolders.</p>
+<p>You can specify the directory relative to an application&apos;s private directory.</p>
+<p>The following rule will serve any file found in the application <code>my_app</code>&apos;s priv directory inside the <code>static/assets</code> folder whenever the requested path begins with <code>/assets/</code>:</p>
+<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: #FF0000">"/assets/[...]"</span>, <span style="color: #FF6600">cowboy_static</span>, {<span style="color: #FF6600">priv_dir</span>, <span style="color: #FF6600">my_app</span>, <span style="color: #FF0000">"static/assets"</span>}}</tt></pre></div></div>
-<div class="paragraph"><p>You can also specify the absolute path to the directory or
-set it relative to the current directory:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>{<font color="#FF0000">"/assets/[...]"</font>, <font color="#FF6600">cowboy_static</font>, {<font color="#FF6600">priv_dir</font>, <font color="#FF6600">my_app</font>, <font color="#FF0000">"static/assets"</font>}}</tt></pre>
+</div></div>
+<p>You can also specify the absolute path to the directory or set it relative to the current directory:</p>
+<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: #FF0000">"/assets/[...]"</span>, <span style="color: #FF6600">cowboy_static</span>, {<span style="color: #FF6600">dir</span>, <span style="color: #FF0000">"/var/www/assets"</span>}}</tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#FF0000">"/assets/[...]"</font>, <font color="#FF6600">cowboy_static</font>, {<font color="#FF6600">dir</font>, <font color="#FF0000">"/var/www/assets"</font>}}</tt></pre>
+</div></div>
<h2 id="_customize_the_mimetype_detection">Customize the mimetype detection</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>By default, Cowboy will attempt to recognize the mimetype
-of your static files by looking at the extension.</p></div>
-<div class="paragraph"><p>You can override the function that figures out the mimetype
-of the static files. It can be useful when Cowboy is missing
-a mimetype you need to handle, or when you want to reduce
-the list to make lookups faster. You can also give a
-hard-coded mimetype that will be used unconditionally.</p></div>
-<div class="paragraph"><p>Cowboy comes with two functions built-in. The default
-function only handles common file types used when building
-Web applications. The other function is an extensive list
-of hundreds of mimetypes that should cover almost any need
-you may have. You can of course create your own function.</p></div>
-<div class="paragraph"><p>To use the default function, you should not have to configure
-anything, as it is the default. If you insist, though, the
-following will do the job:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>By default, Cowboy will attempt to recognize the mimetype of your static files by looking at the extension.</p>
+<p>You can override the function that figures out the mimetype of the static files. It can be useful when Cowboy is missing a mimetype you need to handle, or when you want to reduce the list to make lookups faster. You can also give a hard-coded mimetype that will be used unconditionally.</p>
+<p>Cowboy comes with two functions built-in. The default function only handles common file types used when building Web applications. The other function is an extensive list of hundreds of mimetypes that should cover almost any need you may have. You can of course create your own function.</p>
+<p>To use the default function, you should not have to configure anything, as it is the default. If you insist, though, the following will do the job:</p>
+<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: #FF0000">"/assets/[...]"</span>, <span style="color: #FF6600">cowboy_static</span>, {<span style="color: #FF6600">priv_dir</span>, <span style="color: #FF6600">my_app</span>, <span style="color: #FF0000">"static/assets"</span>,
- [{<span style="color: #FF6600">mimetypes</span>, <span style="color: #FF6600">cow_mimetypes</span>, <span style="color: #FF6600">web</span>}]}}</tt></pre></div></div>
-<div class="paragraph"><p>As you can see, there is an optional field that may contain
-a list of less used options, like mimetypes or etag. All option
-types have this optional field.</p></div>
-<div class="paragraph"><p>To use the function that will detect almost any mimetype,
-the following configuration will do:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>{<font color="#FF0000">"/assets/[...]"</font>, <font color="#FF6600">cowboy_static</font>, {<font color="#FF6600">priv_dir</font>, <font color="#FF6600">my_app</font>, <font color="#FF0000">"static/assets"</font>,
+ [{<font color="#FF6600">mimetypes</font>, <font color="#FF6600">cow_mimetypes</font>, <font color="#FF6600">web</font>}]}}</tt></pre>
+</div></div>
+<p>As you can see, there is an optional field that may contain a list of less used options, like mimetypes or etag. All option types have this optional field.</p>
+<p>To use the function that will detect almost any mimetype, the following configuration will do:</p>
+<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: #FF0000">"/assets/[...]"</span>, <span style="color: #FF6600">cowboy_static</span>, {<span style="color: #FF6600">priv_dir</span>, <span style="color: #FF6600">my_app</span>, <span style="color: #FF0000">"static/assets"</span>,
- [{<span style="color: #FF6600">mimetypes</span>, <span style="color: #FF6600">cow_mimetypes</span>, <span style="color: #FF6600">all</span>}]}}</tt></pre></div></div>
-<div class="paragraph"><p>You probably noticed the pattern by now. The configuration
-expects a module and a function name, so you can use any
-of your own functions instead:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>{<font color="#FF0000">"/assets/[...]"</font>, <font color="#FF6600">cowboy_static</font>, {<font color="#FF6600">priv_dir</font>, <font color="#FF6600">my_app</font>, <font color="#FF0000">"static/assets"</font>,
+ [{<font color="#FF6600">mimetypes</font>, <font color="#FF6600">cow_mimetypes</font>, <font color="#FF6600">all</font>}]}}</tt></pre>
+</div></div>
+<p>You probably noticed the pattern by now. The configuration expects a module and a function name, so you can use any of your own functions instead:</p>
+<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: #FF0000">"/assets/[...]"</span>, <span style="color: #FF6600">cowboy_static</span>, {<span style="color: #FF6600">priv_dir</span>, <span style="color: #FF6600">my_app</span>, <span style="color: #FF0000">"static/assets"</span>,
- [{<span style="color: #FF6600">mimetypes</span>, <span style="color: #009900">Module</span>, <span style="color: #009900">Function</span>}]}}</tt></pre></div></div>
-<div class="paragraph"><p>The function that performs the mimetype detection receives
-a single argument that is the path to the file on disk. It
-is recommended to return the mimetype in tuple form, although
-a binary string is also allowed (but will require extra
-processing). If the function can&#8217;t figure out the mimetype,
-then it should return <code>{&lt;&lt;"application"&gt;&gt;, &lt;&lt;"octet-stream"&gt;&gt;, []}</code>.</p></div>
-<div class="paragraph"><p>When the static handler fails to find the extension,
-it will send the file as <code>application/octet-stream</code>.
-A browser receiving such file will attempt to download it
-directly to disk.</p></div>
-<div class="paragraph"><p>Finally, the mimetype can be hard-coded for all files.
-This is especially useful in combination with the <code>file</code>
-and <code>priv_file</code> options as it avoids needless computation:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>{<font color="#FF0000">"/assets/[...]"</font>, <font color="#FF6600">cowboy_static</font>, {<font color="#FF6600">priv_dir</font>, <font color="#FF6600">my_app</font>, <font color="#FF0000">"static/assets"</font>,
+ [{<font color="#FF6600">mimetypes</font>, <font color="#009900">Module</font>, <font color="#009900">Function</font>}]}}</tt></pre>
+</div></div>
+<p>The function that performs the mimetype detection receives a single argument that is the path to the file on disk. It is recommended to return the mimetype in tuple form, although a binary string is also allowed (but will require extra processing). If the function can&apos;t figure out the mimetype, then it should return <code>{&lt;&lt;&quot;application&quot;&gt;&gt;, &lt;&lt;&quot;octet-stream&quot;&gt;&gt;, []}</code>.</p>
+<p>When the static handler fails to find the extension, it will send the file as <code>application/octet-stream</code>. A browser receiving such file will attempt to download it directly to disk.</p>
+<p>Finally, the mimetype can be hard-coded for all files. This is especially useful in combination with the <code>file</code> and <code>priv_file</code> options as it avoids needless computation:</p>
+<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: #FF0000">"/"</span>, <span style="color: #FF6600">cowboy_static</span>, {<span style="color: #FF6600">priv_file</span>, <span style="color: #FF6600">my_app</span>, <span style="color: #FF0000">"static/index.html"</span>,
- [{<span style="color: #FF6600">mimetypes</span>, {<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"html"</span><span style="color: #990000">&gt;&gt;</span>, []}}]}}</tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#FF0000">"/"</font>, <font color="#FF6600">cowboy_static</font>, {<font color="#FF6600">priv_file</font>, <font color="#FF6600">my_app</font>, <font color="#FF0000">"static/index.html"</font>,
+ [{<font color="#FF6600">mimetypes</font>, {<font color="#990000">&lt;&lt;</font><font color="#FF0000">"text"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"html"</font><font color="#990000">&gt;&gt;</font>, []}}]}}</tt></pre>
+</div></div>
<h2 id="_generate_an_etag">Generate an etag</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>By default, the static handler will generate an etag header
-value based on the size and modified time. This solution
-can not be applied to all systems though. It would perform
-rather poorly over a cluster of nodes, for example, as the
-file metadata will vary from server to server, giving a
-different etag on each server.</p></div>
-<div class="paragraph"><p>You can however change the way the etag is calculated:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>By default, the static handler will generate an etag header value based on the size and modified time. This solution can not be applied to all systems though. It would perform rather poorly over a cluster of nodes, for example, as the file metadata will vary from server to server, giving a different etag on each server.</p>
+<p>You can however change the way the etag is calculated:</p>
+<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: #FF0000">"/assets/[...]"</span>, <span style="color: #FF6600">cowboy_static</span>, {<span style="color: #FF6600">priv_dir</span>, <span style="color: #FF6600">my_app</span>, <span style="color: #FF0000">"static/assets"</span>,
- [{<span style="color: #FF6600">etag</span>, <span style="color: #009900">Module</span>, <span style="color: #009900">Function</span>}]}}</tt></pre></div></div>
-<div class="paragraph"><p>This function will receive three arguments: the path to the
-file on disk, the size of the file and the last modification
-time. In a distributed setup, you would typically use the
-file path to retrieve an etag value that is identical across
-all your servers.</p></div>
-<div class="paragraph"><p>You can also completely disable etag handling:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>{<font color="#FF0000">"/assets/[...]"</font>, <font color="#FF6600">cowboy_static</font>, {<font color="#FF6600">priv_dir</font>, <font color="#FF6600">my_app</font>, <font color="#FF0000">"static/assets"</font>,
+ [{<font color="#FF6600">etag</font>, <font color="#009900">Module</font>, <font color="#009900">Function</font>}]}}</tt></pre>
+</div></div>
+<p>This function will receive three arguments: the path to the file on disk, the size of the file and the last modification time. In a distributed setup, you would typically use the file path to retrieve an etag value that is identical across all your servers.</p>
+<p>You can also completely disable etag handling:</p>
+<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: #FF0000">"/assets/[...]"</span>, <span style="color: #FF6600">cowboy_static</span>, {<span style="color: #FF6600">priv_dir</span>, <span style="color: #FF6600">my_app</span>, <span style="color: #FF0000">"static/assets"</span>,
- [{<span style="color: #FF6600">etag</span>, <span style="color: #000080">false</span>}]}}</tt></pre></div></div>
-</div>
-</div>
+<pre><tt>{<font color="#FF0000">"/assets/[...]"</font>, <font color="#FF6600">cowboy_static</font>, {<font color="#FF6600">priv_dir</font>, <font color="#FF6600">my_app</font>, <font color="#FF0000">"static/assets"</font>,
+ [{<font color="#FF6600">etag</font>, <font color="#000080">false</font>}]}}</tt></pre>
+</div></div>
+
diff --git a/docs/en/cowboy/2.3/guide/streams/index.html b/docs/en/cowboy/2.3/guide/streams/index.html
index 4c621525..7f936431 100644
--- a/docs/en/cowboy/2.3/guide/streams/index.html
+++ b/docs/en/cowboy/2.3/guide/streams/index.html
@@ -62,61 +62,23 @@
<h1 class="lined-header"><span>Streams</span></h1>
-<div class="paragraph"><p>A stream is the set of messages that form an HTTP
-request/response pair.</p></div>
-<div class="paragraph"><p>The term stream comes from HTTP/2. In Cowboy, it is
-also used when talking about HTTP/1.1 or HTTP/1.0.
-It should not be confused with streaming the request
-or response body.</p></div>
-<div class="paragraph"><p>All versions of HTTP allow clients to initiate
-streams. HTTP/2 is the only one also allowing servers,
-through its server push feature. Both client and
-server-initiated streams go through the same process
-in Cowboy.</p></div>
-<div class="sect1">
+<p>A stream is the set of messages that form an HTTP request/response pair.</p>
+<p>The term stream comes from HTTP/2. In Cowboy, it is also used when talking about HTTP/1.1 or HTTP/1.0. It should not be confused with streaming the request or response body.</p>
+<p>All versions of HTTP allow clients to initiate streams. HTTP/2 is the only one also allowing servers, through its server push feature. Both client and server-initiated streams go through the same process in Cowboy.</p>
<h2 id="_stream_handlers">Stream handlers</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Stream handlers must implement five different callbacks.
-Four of them are directly related; one is special.</p></div>
-<div class="paragraph"><p>All callbacks receives the stream ID as first argument.</p></div>
-<div class="paragraph"><p>Most of them can return a list of commands to be executed
-by Cowboy. When callbacks are chained, it is possible to
-intercept and modify these commands. This can be useful
-for modifying responses for example.</p></div>
-<div class="paragraph"><p>The <code>init/3</code> callback is invoked when a new request
-comes in. It receives the Req object and the protocol options
-for this listener.</p></div>
-<div class="paragraph"><p>The <code>data/4</code> callback is invoked when data from the request
-body is received. It receives both this data and a flag
-indicating whether more is to be expected.</p></div>
-<div class="paragraph"><p>The <code>info/3</code> callback is invoked when an Erlang message is
-received for this stream. They will typically be messages
-sent by the request process.</p></div>
-<div class="paragraph"><p>Finally the <code>terminate/3</code> callback is invoked with the
-terminate reason for the stream. The return value is ignored.
-Note that as with all terminate callbacks in Erlang, there
-is no strong guarantee that it will be called.</p></div>
-<div class="paragraph"><p>The special callback <code>early_error/5</code> is called when an error
-occurs before the request headers were fully received and
-Cowboy is sending a response. It receives the partial Req
-object, the error reason, the protocol options and the response
-Cowboy will send. This response must be returned, possibly
-modified.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Stream handlers must implement five different callbacks. Four of them are directly related; one is special.</p>
+<p>All callbacks receives the stream ID as first argument.</p>
+<p>Most of them can return a list of commands to be executed by Cowboy. When callbacks are chained, it is possible to intercept and modify these commands. This can be useful for modifying responses for example.</p>
+<p>The <code>init/3</code> callback is invoked when a new request comes in. It receives the Req object and the protocol options for this listener.</p>
+<p>The <code>data/4</code> callback is invoked when data from the request body is received. It receives both this data and a flag indicating whether more is to be expected.</p>
+<p>The <code>info/3</code> callback is invoked when an Erlang message is received for this stream. They will typically be messages sent by the request process.</p>
+<p>Finally the <code>terminate/3</code> callback is invoked with the terminate reason for the stream. The return value is ignored. Note that as with all terminate callbacks in Erlang, there is no strong guarantee that it will be called.</p>
+<p>The special callback <code>early_error/5</code> is called when an error occurs before the request headers were fully received and Cowboy is sending a response. It receives the partial Req object, the error reason, the protocol options and the response Cowboy will send. This response must be returned, possibly modified.</p>
<h2 id="_built_in_handlers">Built-in handlers</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy comes with two handlers.</p></div>
-<div class="paragraph"><p><code>cowboy_stream_h</code> is the default stream handler.
-It is the core of much of the functionality of Cowboy.
-All chains of stream handlers should call it last.</p></div>
-<div class="paragraph"><p><code>cowboy_compress_h</code> will automatically compress
-responses when possible. It is not enabled by default.
-It is a good example for writing your own handlers
-that will modify responses.</p></div>
-</div>
-</div>
+<p>Cowboy comes with two handlers.</p>
+<p><code>cowboy_stream_h</code> is the default stream handler. It is the core of much of the functionality of Cowboy. All chains of stream handlers should call it last.</p>
+<p><code>cowboy_compress_h</code> will automatically compress responses when possible. It is not enabled by default. It is a good example for writing your own handlers that will modify responses.</p>
+
diff --git a/docs/en/cowboy/2.3/guide/ws_handlers/index.html b/docs/en/cowboy/2.3/guide/ws_handlers/index.html
index ab028875..6fca9cf9 100644
--- a/docs/en/cowboy/2.3/guide/ws_handlers/index.html
+++ b/docs/en/cowboy/2.3/guide/ws_handlers/index.html
@@ -62,297 +62,190 @@
<h1 class="lined-header"><span>Websocket handlers</span></h1>
-<div class="paragraph"><p>Websocket handlers provide an interface for upgrading HTTP/1.1
-connections to Websocket and sending or receiving frames on
-the Websocket connection.</p></div>
-<div class="paragraph"><p>As Websocket connections are established through the HTTP/1.1
-upgrade mechanism, Websocket handlers need to be able to first
-receive the HTTP request for the upgrade, before switching to
-Websocket and taking over the connection. They can then receive
-or send Websocket frames, handle incoming Erlang messages or
-close the connection.</p></div>
-<div class="sect1">
+<p>Websocket handlers provide an interface for upgrading HTTP/1.1 connections to Websocket and sending or receiving frames on the Websocket connection.</p>
+<p>As Websocket connections are established through the HTTP/1.1 upgrade mechanism, Websocket handlers need to be able to first receive the HTTP request for the upgrade, before switching to Websocket and taking over the connection. They can then receive or send Websocket frames, handle incoming Erlang messages or close the connection.</p>
<h2 id="_upgrade">Upgrade</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <code>init/2</code> callback is called when the request is received.
-To establish a Websocket connection, you must switch to the
-<code>cowboy_websocket</code> module:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The <code>init/2</code> callback is called when the request is received. To establish a Websocket connection, you must switch to the <code>cowboy_websocket</code> module:</p>
+<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">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_websocket</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Cowboy will perform the Websocket handshake immediately. Note
-that the handshake will fail if the client did not request an
-upgrade to Websocket.</p></div>
-<div class="paragraph"><p>The Req object becomes unavailable after this function returns.
-Any information required for proper execution of the Websocket
-handler must be saved in the state.</p></div>
-</div>
-</div>
-<div class="sect1">
-<h2 id="_subprotocol">Subprotocol</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The client may provide a list of Websocket subprotocols it
-supports in the sec-websocket-protocol header. The server <strong>must</strong>
-select one of them and send it back to the client or the
-handshake will fail.</p></div>
-<div class="paragraph"><p>For example, a client could understand both STOMP and MQTT over
-Websocket, and provide the header:</p></div>
-<div class="listingblock">
-<div class="content">
-<pre><code>sec-websocket-protocol: v12.stomp, mqtt</code></pre>
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">cowboy_websocket</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
</div></div>
-<div class="paragraph"><p>If the server only understands MQTT it can return:</p></div>
-<div class="listingblock">
-<div class="content">
-<pre><code>sec-websocket-protocol: mqtt</code></pre>
-</div></div>
-<div class="paragraph"><p>This selection must be done in <code>init/2</code>. An example usage could
-be:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Cowboy will perform the Websocket handshake immediately. Note that the handshake will fail if the client did not request an upgrade to Websocket.</p>
+<p>The Req object becomes unavailable after this function returns. Any information required for proper execution of the Websocket handler must be saved in the state.</p>
+<h2 id="_subprotocol">Subprotocol</h2>
+<p>The client may provide a list of Websocket subprotocols it supports in the sec-websocket-protocol header. The server <strong>must</strong> select one of them and send it back to the client or the handshake will fail.</p>
+<p>For example, a client could understand both STOMP and MQTT over Websocket, and provide the header:</p>
+<div class="listingblock"><div class="content"><pre>sec-websocket-protocol: v12.stomp, mqtt</pre></div></div>
+<p>If the server only understands MQTT it can return:</p>
+<div class="listingblock"><div class="content"><pre>sec-websocket-protocol: mqtt</pre></div></div>
+<p>This selection must be done in <code>init/2</code>. An example usage could be:</p>
+<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">init</span></span>(<span style="color: #009900">Req0</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">cowboy_req:parse_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"sec-websocket-protocol"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req0</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
- <span style="color: #000080">undefined</span> <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">cowboy_websocket</span>, <span style="color: #009900">Req0</span>, <span style="color: #009900">State</span>};
- <span style="color: #009900">Subprotocols</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:keymember</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"mqtt"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #993399">1</span>, <span style="color: #009900">Subprotocols</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="color: #009900">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"sec-websocket-protocol"</span><span style="color: #990000">&gt;&gt;</span>,
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"mqtt"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req0</span>),
- {<span style="color: #FF6600">cowboy_websocket</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="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">400</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: #0000FF">end</span></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">
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req0</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">case</font></b> <b><font color="#000000">cowboy_req:parse_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"sec-websocket-protocol"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req0</font>) <b><font color="#0000FF">of</font></b>
+ <font color="#000080">undefined</font> <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">cowboy_websocket</font>, <font color="#009900">Req0</font>, <font color="#009900">State</font>};
+ <font color="#009900">Subprotocols</font> <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">case</font></b> <b><font color="#000000">lists:keymember</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"mqtt"</font><font color="#990000">&gt;&gt;</font>, <font color="#993399">1</font>, <font color="#009900">Subprotocols</font>) <b><font color="#0000FF">of</font></b>
+ <font color="#000080">true</font> <font color="#990000">-&gt;</font>
+ <font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"sec-websocket-protocol"</font><font color="#990000">&gt;&gt;</font>,
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"mqtt"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req0</font>),
+ {<font color="#FF6600">cowboy_websocket</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>};
+ <font color="#000080">false</font> <font color="#990000">-&gt;</font>
+ <font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:reply</font></b>(<font color="#993399">400</font>, <font color="#009900">Req0</font>),
+ {<font color="#FF6600">ok</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
+ <b><font color="#0000FF">end</font></b>
+ <b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_post_upgrade_initialization">Post-upgrade initialization</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy has separate processes for handling the connection
-and requests. Because Websocket takes over the connection,
-the Websocket protocol handling occurs in a different
-process than the request handling.</p></div>
-<div class="paragraph"><p>This is reflected in the different callbacks Websocket
-handlers have. The <code>init/2</code> callback is called from the
-temporary request process and the <code>websocket_</code> callbacks
-from the connection process.</p></div>
-<div class="paragraph"><p>This means that some initialization cannot be done from
-<code>init/2</code>. Anything that would require the current pid,
-or be tied to the current pid, will not work as intended.
-The optional <code>websocket_init/1</code> can be used instead:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Cowboy has separate processes for handling the connection and requests. Because Websocket takes over the connection, the Websocket protocol handling occurs in a different process than the request handling.</p>
+<p>This is reflected in the different callbacks Websocket handlers have. The <code>init/2</code> callback is called from the temporary request process and the <code>websocket_</code> callbacks from the connection process.</p>
+<p>This means that some initialization cannot be done from <code>init/2</code>. Anything that would require the current pid, or be tied to the current pid, will not work as intended. The optional <code>websocket_init/1</code> can be used instead:</p>
+<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">websocket_init</span></span>(<span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #000000">erlang:start_timer</span></span>(<span style="color: #993399">1000</span>, <span style="font-weight: bold"><span style="color: #000080">self</span></span>(), <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Hello!"</span><span style="color: #990000">&gt;&gt;</span>),
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">State</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>All Websocket callbacks share the same return values. This
-means that we can send frames to the client right after
-the upgrade:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">websocket_init</font></b>(<font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#000000">erlang:start_timer</font></b>(<font color="#993399">1000</font>, <b><font color="#000080">self</font></b>(), <font color="#990000">&lt;&lt;</font><font color="#FF0000">"Hello!"</font><font color="#990000">&gt;&gt;</font>),
+ {<font color="#FF6600">ok</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>All Websocket callbacks share the same return values. This means that we can send frames to the client right after the upgrade:</p>
+<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">websocket_init</span></span>(<span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">reply</span>, {<span style="color: #FF6600">text</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Hello!"</span><span style="color: #990000">&gt;&gt;</span>}, <span style="color: #009900">State</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">websocket_init</font></b>(<font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">reply</font>, {<font color="#FF6600">text</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"Hello!"</font><font color="#990000">&gt;&gt;</font>}, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_receiving_frames">Receiving frames</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy will call <code>websocket_handle/2</code> whenever a text, binary,
-ping or pong frame arrives from the client.</p></div>
-<div class="paragraph"><p>The handler can handle or ignore the frames. It can also
-send frames back to the client or stop the connection.</p></div>
-<div class="paragraph"><p>The following snippet echoes back any text frame received and
-ignores all others:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Cowboy will call <code>websocket_handle/2</code> whenever a text, binary, ping or pong frame arrives from the client.</p>
+<p>The handler can handle or ignore the frames. It can also send frames back to the client or stop the connection.</p>
+<p>The following snippet echoes back any text frame received and ignores all others:</p>
+<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">websocket_handle</span></span>(<span style="color: #009900">Frame</span> <span style="color: #990000">=</span> {<span style="color: #FF6600">text</span>, <span style="color: #990000">_</span>}, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">reply</span>, <span style="color: #009900">Frame</span>, <span style="color: #009900">State</span>};
-<span style="font-weight: bold"><span style="color: #000000">websocket_handle</span></span>(<span style="color: #009900">_Frame</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">State</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Note that ping and pong frames require no action from the
-handler as Cowboy will automatically reply to ping frames.
-They are provided for informative purposes only.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">websocket_handle</font></b>(<font color="#009900">Frame</font> <font color="#990000">=</font> {<font color="#FF6600">text</font>, <font color="#990000">_</font>}, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">reply</font>, <font color="#009900">Frame</font>, <font color="#009900">State</font>};
+<b><font color="#000000">websocket_handle</font></b>(<font color="#009900">_Frame</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Note that ping and pong frames require no action from the handler as Cowboy will automatically reply to ping frames. They are provided for informative purposes only.</p>
<h2 id="_receiving_erlang_messages">Receiving Erlang messages</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy will call <code>websocket_info/2</code> whenever an Erlang message
-arrives.</p></div>
-<div class="paragraph"><p>The handler can handle or ignore the messages. It can also
-send frames to the client or stop the connection.</p></div>
-<div class="paragraph"><p>The following snippet forwards log messages to the client
-and ignores all others:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Cowboy will call <code>websocket_info/2</code> whenever an Erlang message arrives.</p>
+<p>The handler can handle or ignore the messages. It can also send frames to the client or stop the connection.</p>
+<p>The following snippet forwards log messages to the client and ignores all others:</p>
+<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">websocket_info</span></span>({<span style="font-weight: bold"><span style="color: #000080">log</span></span>, <span style="color: #009900">Text</span>}, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">reply</span>, {<span style="color: #FF6600">text</span>, <span style="color: #009900">Text</span>}, <span style="color: #009900">State</span>};
-<span style="font-weight: bold"><span style="color: #000000">websocket_info</span></span>(<span style="color: #009900">_Info</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">State</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">websocket_info</font></b>({<b><font color="#000080">log</font></b>, <font color="#009900">Text</font>}, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">reply</font>, {<font color="#FF6600">text</font>, <font color="#009900">Text</font>}, <font color="#009900">State</font>};
+<b><font color="#000000">websocket_info</font></b>(<font color="#009900">_Info</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_sending_frames">Sending frames</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>All <code>websocket_</code> callbacks share return values. They may
-send zero, one or many frames to the client.</p></div>
-<div class="paragraph"><p>To send nothing, just return an ok tuple:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<!-- @todo This will be deprecated and eventually replaced with a-->
+<!-- {Commands, State} interface that allows providing more-->
+<!-- functionality easily.-->
+<p>All <code>websocket_</code> callbacks share return values. They may send zero, one or many frames to the client.</p>
+<p>To send nothing, just return an ok tuple:</p>
+<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">websocket_info</span></span>(<span style="color: #009900">_Info</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">State</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>To send one frame, return a reply tuple with the frame to send:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">websocket_info</font></b>(<font color="#009900">_Info</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>To send one frame, return a reply tuple with the frame to send:</p>
+<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">websocket_info</span></span>(<span style="color: #009900">_Info</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">reply</span>, {<span style="color: #FF6600">text</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Hello!"</span><span style="color: #990000">&gt;&gt;</span>}, <span style="color: #009900">State</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>You can send frames of any type: text, binary, ping, pong
-or close frames.</p></div>
-<div class="paragraph"><p>To send many frames at once, return a reply tuple with the
-list of frames to send:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">websocket_info</font></b>(<font color="#009900">_Info</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">reply</font>, {<font color="#FF6600">text</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"Hello!"</font><font color="#990000">&gt;&gt;</font>}, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>You can send frames of any type: text, binary, ping, pong or close frames.</p>
+<p>To send many frames at once, return a reply tuple with the list of frames to send:</p>
+<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">websocket_info</span></span>(<span style="color: #009900">_Info</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">reply</span>, [
- {<span style="color: #FF6600">text</span>, <span style="color: #FF0000">"Hello"</span>},
- {<span style="color: #FF6600">text</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"world!"</span><span style="color: #990000">&gt;&gt;</span>},
- {<span style="font-weight: bold"><span style="color: #000080">binary</span></span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #993399">0</span><span style="color: #990000">:</span><span style="color: #993399">8000</span><span style="color: #990000">&gt;&gt;</span>}
- ], <span style="color: #009900">State</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>They are sent in the given order.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">websocket_info</font></b>(<font color="#009900">_Info</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">reply</font>, [
+ {<font color="#FF6600">text</font>, <font color="#FF0000">"Hello"</font>},
+ {<font color="#FF6600">text</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"world!"</font><font color="#990000">&gt;&gt;</font>},
+ {<b><font color="#000080">binary</font></b>, <font color="#990000">&lt;&lt;</font><font color="#993399">0</font><font color="#990000">:</font><font color="#993399">8000</font><font color="#990000">&gt;&gt;</font>}
+ ], <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>They are sent in the given order.</p>
<h2 id="_keeping_the_connection_alive">Keeping the connection alive</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy will automatically respond to ping frames sent by
-the client. They are still forwarded to the handler for
-informative purposes, but no further action is required.</p></div>
-<div class="paragraph"><p>Cowboy does not send ping frames itself. The handler can
-do it if required. A better solution in most cases is to
-let the client handle pings. Doing it from the handler
-would imply having an additional timer per connection and
-this can be a considerable cost for servers that need to
-handle large numbers of connections.</p></div>
-<div class="paragraph"><p>Cowboy can be configured to close idle connections
-automatically. It is highly recommended to configure
-a timeout here, to avoid having processes linger longer
-than needed.</p></div>
-<div class="paragraph"><p>The <code>init/2</code> callback can set the timeout to be used
-for the connection. For example, this would make Cowboy
-close connections idle for more than 30 seconds:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Cowboy will automatically respond to ping frames sent by the client. They are still forwarded to the handler for informative purposes, but no further action is required.</p>
+<p>Cowboy does not send ping frames itself. The handler can do it if required. A better solution in most cases is to let the client handle pings. Doing it from the handler would imply having an additional timer per connection and this can be a considerable cost for servers that need to handle large numbers of connections.</p>
+<p>Cowboy can be configured to close idle connections automatically. It is highly recommended to configure a timeout here, to avoid having processes linger longer than needed.</p>
+<p>The <code>init/2</code> callback can set the timeout to be used for the connection. For example, this would make Cowboy close connections idle for more than 30 seconds:</p>
+<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">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_websocket</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>, #{
- <span style="color: #0000FF">idle_timeout</span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">30000</span>}}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>This value cannot be changed once it is set. It defaults to
-<code>60000</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">cowboy_websocket</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>, #{
+ <font color="#0000FF">idle_timeout</font> <font color="#990000">=&gt;</font> <font color="#993399">30000</font>}}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>This value cannot be changed once it is set. It defaults to <code>60000</code>.</p>
<h2 id="_limiting_frame_sizes">Limiting frame sizes</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy accepts frames of any size by default. You should
-limit the size depending on what your handler may handle.
-You can do this via the <code>init/2</code> callback:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Cowboy accepts frames of any size by default. You should limit the size depending on what your handler may handle. You can do this via the <code>init/2</code> callback:</p>
+<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">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_websocket</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>, #{
- <span style="color: #0000FF">max_frame_size</span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">8000000</span>}}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>The lack of limit is historical. A future version of
-Cowboy will have a more reasonable default.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">cowboy_websocket</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>, #{
+ <font color="#0000FF">max_frame_size</font> <font color="#990000">=&gt;</font> <font color="#993399">8000000</font>}}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>The lack of limit is historical. A future version of Cowboy will have a more reasonable default.</p>
<h2 id="_saving_memory">Saving memory</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The Websocket connection process can be set to hibernate
-after the callback returns.</p></div>
-<div class="paragraph"><p>Simply add an <code>hibernate</code> field to the ok or reply tuples:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The Websocket connection process can be set to hibernate after the callback returns.</p>
+<p>Simply add an <code>hibernate</code> field to the ok or reply tuples:</p>
+<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">websocket_init</span></span>(<span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">State</span>, <span style="color: #FF6600">hibernate</span>}<span style="color: #990000">.</span>
-
-<span style="font-weight: bold"><span style="color: #000000">websocket_handle</span></span>(<span style="color: #009900">_Frame</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">State</span>, <span style="color: #FF6600">hibernate</span>}<span style="color: #990000">.</span>
-
-<span style="font-weight: bold"><span style="color: #000000">websocket_info</span></span>(<span style="color: #009900">_Info</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">reply</span>, {<span style="color: #FF6600">text</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Hello!"</span><span style="color: #990000">&gt;&gt;</span>}, <span style="color: #009900">State</span>, <span style="color: #FF6600">hibernate</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>It is highly recommended to write your handlers with
-hibernate enabled, as this allows to greatly reduce the
-memory usage. Do note however that an increase in the
-CPU usage or latency can be observed instead, in particular
-for the more busy connections.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">websocket_init</font></b>(<font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <font color="#009900">State</font>, <font color="#FF6600">hibernate</font>}<font color="#990000">.</font>
+
+<b><font color="#000000">websocket_handle</font></b>(<font color="#009900">_Frame</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <font color="#009900">State</font>, <font color="#FF6600">hibernate</font>}<font color="#990000">.</font>
+
+<b><font color="#000000">websocket_info</font></b>(<font color="#009900">_Info</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">reply</font>, {<font color="#FF6600">text</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"Hello!"</font><font color="#990000">&gt;&gt;</font>}, <font color="#009900">State</font>, <font color="#FF6600">hibernate</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>It is highly recommended to write your handlers with hibernate enabled, as this allows to greatly reduce the memory usage. Do note however that an increase in the CPU usage or latency can be observed instead, in particular for the more busy connections.</p>
<h2 id="_closing_the_connection">Closing the connection</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The connection can be closed at any time, either by telling
-Cowboy to stop it or by sending a close frame.</p></div>
-<div class="paragraph"><p>To tell Cowboy to close the connection, use a stop tuple:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The connection can be closed at any time, either by telling Cowboy to stop it or by sending a close frame.</p>
+<p>To tell Cowboy to close the connection, use a stop tuple:</p>
+<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">websocket_info</span></span>(<span style="color: #009900">_Info</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">stop</span>, <span style="color: #009900">State</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Sending a <code>close</code> frame will immediately initiate the closing
-of the Websocket connection. Note that when sending a list of
-frames that include a close frame, any frame found after the
-close frame will not be sent.</p></div>
-<div class="paragraph"><p>The following example sends a close frame with a reason message:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">websocket_info</font></b>(<font color="#009900">_Info</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">stop</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Sending a <code>close</code> frame will immediately initiate the closing of the Websocket connection. Note that when sending a list of frames that include a close frame, any frame found after the close frame will not be sent.</p>
+<p>The following example sends a close frame with a reason message:</p>
+<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">websocket_info</span></span>(<span style="color: #009900">_Info</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">reply</span>, {<span style="color: #FF6600">close</span>, <span style="color: #993399">1000</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"some-reason"</span><span style="color: #990000">&gt;&gt;</span>}, <span style="color: #009900">State</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
+<pre><tt><b><font color="#000000">websocket_info</font></b>(<font color="#009900">_Info</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">reply</font>, {<font color="#FF6600">close</font>, <font color="#993399">1000</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"some-reason"</font><font color="#990000">&gt;&gt;</font>}, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+
diff --git a/docs/en/cowboy/2.3/guide/ws_protocol/index.html b/docs/en/cowboy/2.3/guide/ws_protocol/index.html
index b6748a82..6f6c593a 100644
--- a/docs/en/cowboy/2.3/guide/ws_protocol/index.html
+++ b/docs/en/cowboy/2.3/guide/ws_protocol/index.html
@@ -62,70 +62,22 @@
<h1 class="lined-header"><span>The Websocket protocol</span></h1>
-<div class="paragraph"><p>This chapter explains what Websocket is and why it is
-a vital component of soft realtime Web applications.</p></div>
-<div class="sect1">
+<p>This chapter explains what Websocket is and why it is a vital component of soft realtime Web applications.</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Websocket is an extension to HTTP that emulates plain TCP
-connections between the client, typically a Web browser,
-and the server. It uses the HTTP Upgrade mechanism to
-establish the connection.</p></div>
-<div class="paragraph"><p>Websocket connections are fully asynchronous, unlike
-HTTP/1.1 (synchronous) and HTTP/2 (asynchronous, but the
-server can only initiate streams in response to requests).
-With Websocket, the client and the server can both send
-frames at any time without any restriction. It is closer
-to TCP than any of the HTTP protocols.</p></div>
-<div class="paragraph"><p>Websocket is an IETF standard. Cowboy supports the standard
-and all drafts that were previously implemented by browsers,
-excluding the initial flawed draft sometimes known as
-"version 0".</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Websocket is an extension to HTTP that emulates plain TCP connections between the client, typically a Web browser, and the server. It uses the HTTP Upgrade mechanism to establish the connection.</p>
+<p>Websocket connections are fully asynchronous, unlike HTTP/1.1 (synchronous) and HTTP/2 (asynchronous, but the server can only initiate streams in response to requests). With Websocket, the client and the server can both send frames at any time without any restriction. It is closer to TCP than any of the HTTP protocols.</p>
+<p>Websocket is an IETF standard. Cowboy supports the standard and all drafts that were previously implemented by browsers, excluding the initial flawed draft sometimes known as &quot;version 0&quot;.</p>
<h2 id="_websocket_vs_http_2">Websocket vs HTTP/2</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>For a few years Websocket was the only way to have a
-bidirectional asynchronous connection with the server.
-This changed when HTTP/2 was introduced. While HTTP/2
-requires the client to first perform a request before
-the server can push data, this is only a minor restriction
-as the client can do so just as it connects.</p></div>
-<div class="paragraph"><p>Websocket was designed as a kind-of-TCP channel to a
-server. It only defines the framing and connection
-management and lets the developer implement a protocol
-on top of it. For example you could implement IRC over
-Websocket and use a Javascript IRC client to speak to
-the server.</p></div>
-<div class="paragraph"><p>HTTP/2 on the other hand is just an improvement over
-the HTTP/1.1 connection and request/response mechanism.
-It has the same semantics as HTTP/1.1.</p></div>
-<div class="paragraph"><p>If all you need is to access an HTTP API, then HTTP/2
-should be your first choice. On the other hand, if what
-you need is a different protocol, then you can use
-Websocket to implement it.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>For a few years Websocket was the only way to have a bidirectional asynchronous connection with the server. This changed when HTTP/2 was introduced. While HTTP/2 requires the client to first perform a request before the server can push data, this is only a minor restriction as the client can do so just as it connects.</p>
+<p>Websocket was designed as a kind-of-TCP channel to a server. It only defines the framing and connection management and lets the developer implement a protocol on top of it. For example you could implement IRC over Websocket and use a Javascript IRC client to speak to the server.</p>
+<p>HTTP/2 on the other hand is just an improvement over the HTTP/1.1 connection and request/response mechanism. It has the same semantics as HTTP/1.1.</p>
+<p>If all you need is to access an HTTP API, then HTTP/2 should be your first choice. On the other hand, if what you need is a different protocol, then you can use Websocket to implement it.</p>
<h2 id="_implementation">Implementation</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy implements Websocket as a protocol upgrade. Once the
-upgrade is performed from the <code>init/2</code> callback, Cowboy
-switches to Websocket. Please consult the next chapter for
-more information on initiating and handling Websocket
-connections.</p></div>
-<div class="paragraph"><p>The implementation of Websocket in Cowboy is validated using
-the Autobahn test suite, which is an extensive suite of tests
-covering all aspects of the protocol. Cowboy passes the
-suite with 100% success, including all optional tests.</p></div>
-<div class="paragraph"><p>Cowboy&#8217;s Websocket implementation also includes the
-permessage-deflate and x-webkit-deflate-frame compression
-extensions.</p></div>
-<div class="paragraph"><p>Cowboy will automatically use compression when the
-<code>compress</code> option is returned from the <code>init/2</code> function.</p></div>
-</div>
-</div>
+<p>Cowboy implements Websocket as a protocol upgrade. Once the upgrade is performed from the <code>init/2</code> callback, Cowboy switches to Websocket. Please consult the next chapter for more information on initiating and handling Websocket connections.</p>
+<p>The implementation of Websocket in Cowboy is validated using the Autobahn test suite, which is an extensive suite of tests covering all aspects of the protocol. Cowboy passes the suite with 100% success, including all optional tests.</p>
+<p>Cowboy&apos;s Websocket implementation also includes the permessage-deflate and x-webkit-deflate-frame compression extensions.</p>
+<p>Cowboy will automatically use compression when the <code>compress</code> option is returned from the <code>init/2</code> function.</p>
+
diff --git a/docs/en/cowboy/2.3/manual/cowboy.set_env/index.html b/docs/en/cowboy/2.3/manual/cowboy.set_env/index.html
index 1b3a9279..89788f69 100644
--- a/docs/en/cowboy/2.3/manual/cowboy.set_env/index.html
+++ b/docs/en/cowboy/2.3/manual/cowboy.set_env/index.html
@@ -62,117 +62,59 @@
<h1 class="lined-header"><span>cowboy:set_env(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy:set_env - Update a listener&#8217;s environment value</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy:set_env - Update a listener&apos;s environment value</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">set_env</span></span>(<span style="color: #009900">Name</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">ranch:ref</span></span>(),
- <span style="color: #009900">Key</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">atom</span></span>(),
- <span style="color: #009900">Value</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>())
- <span style="color: #990000">-&gt;</span> <span style="color: #FF6600">ok</span></tt></pre></div></div>
-<div class="paragraph"><p>Set or update an environment value for a previously started
-listener.</p></div>
-<div class="paragraph"><p>This is most useful for updating the routes dynamically,
-without having to restart the listener.</p></div>
-<div class="paragraph"><p>The new value will only be available to new connections.
-Pre-existing connections will still use the old value.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">set_env</font></b>(<font color="#009900">Name</font> <font color="#990000">::</font> <b><font color="#000000">ranch:ref</font></b>(),
+ <font color="#009900">Key</font> <font color="#990000">::</font> <b><font color="#000080">atom</font></b>(),
+ <font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>())
+ <font color="#990000">-&gt;</font> <font color="#FF6600">ok</font></tt></pre>
+</div></div>
+<p>Set or update an environment value for a previously started listener.</p>
+<p>This is most useful for updating the routes dynamically, without having to restart the listener.</p>
+<p>The new value will only be available to new connections. Pre-existing connections will still use the old value.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Name
-</dt>
-<dd>
-<p>
-The name of the listener to update.
-</p>
-<div class="paragraph"><p>The name of the listener is the first argument given to the
-<a href="../cowboy.start_clear">cowboy:start_clear(3)</a>,
-<a href="../cowboy.start_tls">cowboy:start_tls(3)</a> or
-<a href="../ranch.start_listener">ranch:start_listener(3)</a> function.</p></div>
+<dl><dt>Name</dt>
+<dd><p>The name of the listener to update.</p>
+<p>The name of the listener is the first argument given to the <a href="../cowboy.start_clear">cowboy:start_clear(3)</a>, <a href="../cowboy.start_tls">cowboy:start_tls(3)</a> or <a href="../ranch.start_listener">ranch:start_listener(3)</a> function.</p>
</dd>
-<dt class="hdlist1">
-Key
-</dt>
-<dd>
-<p>
-The key in the environment map. Common keys include <code>dispatch</code>
-and <code>middlewares</code>.
-</p>
+<dt>Key</dt>
+<dd><p>The key in the environment map. Common keys include <code>dispatch</code> and <code>middlewares</code>.</p>
</dd>
-<dt class="hdlist1">
-Value
-</dt>
-<dd>
-<p>
-The new value.
-</p>
-<div class="paragraph"><p>The type of the value differs depending on the key.</p></div>
+<dt>Value</dt>
+<dd><p>The new value.</p>
+<p>The type of the value differs depending on the key.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The atom <code>ok</code> is returned on success.</p></div>
-<div class="paragraph"><p>An <code>exit:badarg</code> exception is thrown when the listener does
-not exist.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The atom <code>ok</code> is returned on success.</p>
+<p>An <code>exit:badarg</code> exception is thrown when the listener does not exist.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<ul><li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Update a listener&#8217;s routes</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Update a listener&apos;s routes</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">Dispatch</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_router:compile</span></span>([
- {<span style="color: #FF6600">'_'</span>, [
- {<span style="color: #FF0000">"/"</span>, <span style="color: #FF6600">toppage_h</span>, []},
- {<span style="color: #FF0000">"/ws"</span>, <span style="color: #FF6600">websocket_h</span>, []}
+<pre><tt><font color="#009900">Dispatch</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_router:compile</font></b>([
+ {<font color="#FF6600">'_'</font>, [
+ {<font color="#FF0000">"/"</font>, <font color="#FF6600">toppage_h</font>, []},
+ {<font color="#FF0000">"/ws"</font>, <font color="#FF6600">websocket_h</font>, []}
]}
]),
-<span style="font-weight: bold"><span style="color: #000000">cowboy:set_env</span></span>(<span style="color: #FF6600">example</span>, <span style="color: #FF6600">dispatch</span>, <span style="color: #009900">Dispatch</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<b><font color="#000000">cowboy:set_env</font></b>(<font color="#FF6600">example</font>, <font color="#FF6600">dispatch</font>, <font color="#009900">Dispatch</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../cowboy">cowboy(3)</a>,
-<a href="../cowboy.start_clear">cowboy:start_clear(3)</a>,
-<a href="../cowboy.start_tls">cowboy:start_tls(3)</a>,
-<a href="../ranch.set_protocol_options">ranch:set_protocol_options(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy">cowboy(3)</a>, <a href="../cowboy.start_clear">cowboy:start_clear(3)</a>, <a href="../cowboy.start_tls">cowboy:start_tls(3)</a>, <a href="../ranch.set_protocol_options">ranch:set_protocol_options(3)</a></p>
+
diff --git a/docs/en/cowboy/2.3/manual/cowboy.start_clear/index.html b/docs/en/cowboy/2.3/manual/cowboy.start_clear/index.html
index 9096c18c..58145cfc 100644
--- a/docs/en/cowboy/2.3/manual/cowboy.start_clear/index.html
+++ b/docs/en/cowboy/2.3/manual/cowboy.start_clear/index.html
@@ -62,148 +62,77 @@
<h1 class="lined-header"><span>cowboy:start_clear(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy:start_clear - Listen for connections using plain TCP</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy:start_clear - Listen for connections using plain TCP</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">start_clear</span></span>(<span style="color: #009900">Name</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">ranch:ref</span></span>(),
- <span style="color: #009900">TransportOpts</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">ranch_tcp:opts</span></span>(),
- <span style="color: #009900">ProtocolOpts</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">opts</span></span>())
- <span style="color: #990000">-&gt;</span> {<span style="color: #FF6600">ok</span>, <span style="color: #009900">ListenerPid</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">pid</span></span>()}
- | {<span style="color: #FF6600">error</span>, <span style="font-weight: bold"><span style="color: #000000">any</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>Start listening for connections over a clear TCP channel.</p></div>
-<div class="paragraph"><p>Both HTTP/1.1 and HTTP/2 are supported on this listener.
-HTTP/2 has two methods of establishing a connection over
-a clear TCP channel. Both the upgrade and the prior knowledge
-methods are supported.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">start_clear</font></b>(<font color="#009900">Name</font> <font color="#990000">::</font> <b><font color="#000000">ranch:ref</font></b>(),
+ <font color="#009900">TransportOpts</font> <font color="#990000">::</font> <b><font color="#000000">ranch_tcp:opts</font></b>(),
+ <font color="#009900">ProtocolOpts</font> <font color="#990000">::</font> <b><font color="#000000">opts</font></b>())
+ <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <font color="#009900">ListenerPid</font> <font color="#990000">::</font> <b><font color="#000080">pid</font></b>()}
+ | {<font color="#FF6600">error</font>, <b><font color="#000000">any</font></b>()}</tt></pre>
+</div></div>
+<p>Start listening for connections over a clear TCP channel.</p>
+<p>Both HTTP/1.1 and HTTP/2 are supported on this listener. HTTP/2 has two methods of establishing a connection over a clear TCP channel. Both the upgrade and the prior knowledge methods are supported.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Name
-</dt>
-<dd>
-<p>
-The listener name is used to refer to this listener in
-future calls, for example when stopping it or when
-updating the routes defined.
-</p>
-<div class="paragraph"><p>It can be any Erlang term. An atom is generally good enough,
-for example <code>api</code>, <code>my_app_clear</code> or <code>my_app_tls</code>.</p></div>
+<dl><dt>Name</dt>
+<dd><p>The listener name is used to refer to this listener in future calls, for example when stopping it or when updating the routes defined.</p>
+<p>It can be any Erlang term. An atom is generally good enough, for example <code>api</code>, <code>my_app_clear</code> or <code>my_app_tls</code>.</p>
</dd>
-<dt class="hdlist1">
-TransportOpts
-</dt>
-<dd>
-<p>
-The transport options are where the TCP options, including
-the listener&#8217;s port number, are defined. Transport options
-are provided as a list of keys and values, for example
-<code>[{port, 8080}]</code>.
-</p>
-<div class="paragraph"><p>The available options are documented in the
-<a href="../ranch_tcp">ranch_tcp(3)</a> manual.</p></div>
+<dt>TransportOpts</dt>
+<dd><p>The transport options are where the TCP options, including the listener&apos;s port number, are defined. Transport options are provided as a list of keys and values, for example <code>[{port, 8080}]</code>.</p>
+<p>The available options are documented in the <a href="../ranch_tcp">ranch_tcp(3)</a> manual.</p>
</dd>
-<dt class="hdlist1">
-ProtocolOpts
-</dt>
-<dd>
-<p>
-The protocol options are in a map containing all the options for
-the different protocols that may be involved when connecting
-to the listener, including HTTP/1.1 and HTTP/2.
-</p>
-<div class="paragraph"><p>The HTTP/1.1 options are documented in the
-<a href="../cowboy_http">cowboy_http(3)</a> manual;
-and the HTTP/2 options in
-<a href="../cowboy_http2">cowboy_http2(3)</a>.</p></div>
+<dt>ProtocolOpts</dt>
+<dd><p>The protocol options are in a map containing all the options for the different protocols that may be involved when connecting to the listener, including HTTP/1.1 and HTTP/2.</p>
+<p>The HTTP/1.1 options are documented in the <a href="../cowboy_http">cowboy_http(3)</a> manual; and the HTTP/2 options in <a href="../cowboy_http2">cowboy_http2(3)</a>.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>An ok tuple is returned on success. It contains the pid of
-the top-level supervisor for the listener.</p></div>
-<div class="paragraph"><p>An error tuple is returned on error. The error reason may
-be any Erlang term.</p></div>
-<div class="paragraph"><p>A common error is <code>eaddrinuse</code>. It indicates that the port
-configured for Cowboy is already in use.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>An ok tuple is returned on success. It contains the pid of the top-level supervisor for the listener.</p>
+<p>An error tuple is returned on error. The error reason may be any Erlang term.</p>
+<p>A common error is <code>eaddrinuse</code>. It indicates that the port configured for Cowboy is already in use.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: HTTP/2 support added.
-</p>
+<ul><li><strong>2.0</strong>: HTTP/2 support added.
</li>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced. Replaces <code>cowboy:start_http/4</code>.
-</p>
+<li><strong>2.0</strong>: Function introduced. Replaces <code>cowboy:start_http/4</code>.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Start a listener</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Start a listener</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">Dispatch</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_router:compile</span></span>([
- {<span style="color: #FF6600">'_'</span>, [
- {<span style="color: #FF0000">"/"</span>, <span style="color: #FF6600">toppage_h</span>, []}
+<pre><tt><font color="#009900">Dispatch</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_router:compile</font></b>([
+ {<font color="#FF6600">'_'</font>, [
+ {<font color="#FF0000">"/"</font>, <font color="#FF6600">toppage_h</font>, []}
]}
]),
-{<span style="color: #FF6600">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:start_clear</span></span>(<span style="color: #FF6600">example</span>, [{<span style="color: #FF6600">port</span>, <span style="color: #993399">8080</span>}], #{
- <span style="color: #0000FF">env</span> <span style="color: #990000">=&gt;</span> #{<span style="color: #0000FF">dispatch</span> <span style="color: #990000">=&gt;</span> <span style="color: #009900">Dispatch</span>}
-})<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Start a listener on a random port</div>
-<div class="content"><!-- Generator: GNU source-highlight
+{<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy:start_clear</font></b>(<font color="#FF6600">example</font>, [{<font color="#FF6600">port</font>, <font color="#993399">8080</font>}], #{
+ <font color="#0000FF">env</font> <font color="#990000">=&gt;</font> #{<font color="#0000FF">dispatch</font> <font color="#990000">=&gt;</font> <font color="#009900">Dispatch</font>}
+})<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Start a listener on a random port</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">Name</span> <span style="color: #990000">=</span> <span style="color: #FF6600">example</span>,
+<pre><tt><font color="#009900">Name</font> <font color="#990000">=</font> <font color="#FF6600">example</font>,
-{<span style="color: #FF6600">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:start_clear</span></span>(<span style="color: #009900">Name</span>, [], #{
- <span style="color: #0000FF">env</span> <span style="color: #990000">=&gt;</span> #{<span style="color: #0000FF">dispatch</span> <span style="color: #990000">=&gt;</span> <span style="color: #009900">Dispatch</span>}
+{<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy:start_clear</font></b>(<font color="#009900">Name</font>, [], #{
+ <font color="#0000FF">env</font> <font color="#990000">=&gt;</font> #{<font color="#0000FF">dispatch</font> <font color="#990000">=&gt;</font> <font color="#009900">Dispatch</font>}
}),
-<span style="color: #009900">Port</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">ranch:get_port</span></span>(<span style="color: #009900">Name</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<font color="#009900">Port</font> <font color="#990000">=</font> <b><font color="#000000">ranch:get_port</font></b>(<font color="#009900">Name</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../cowboy">cowboy(3)</a>,
-<a href="../cowboy.start_tls">cowboy:start_tls(3)</a>,
-<a href="../cowboy.stop_listener">cowboy:stop_listener(3)</a>,
-<a href="../ranch">ranch(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy">cowboy(3)</a>, <a href="../cowboy.start_tls">cowboy:start_tls(3)</a>, <a href="../cowboy.stop_listener">cowboy:stop_listener(3)</a>, <a href="../ranch">ranch(3)</a></p>
+
diff --git a/docs/en/cowboy/2.3/manual/cowboy.start_tls/index.html b/docs/en/cowboy/2.3/manual/cowboy.start_tls/index.html
index 08f92c46..41f1c02f 100644
--- a/docs/en/cowboy/2.3/manual/cowboy.start_tls/index.html
+++ b/docs/en/cowboy/2.3/manual/cowboy.start_tls/index.html
@@ -62,153 +62,82 @@
<h1 class="lined-header"><span>cowboy:start_tls(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy:start_tls - Listen for connections using TLS</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy:start_tls - Listen for connections using TLS</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">start_tls</span></span>(<span style="color: #009900">Name</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">ranch:ref</span></span>(),
- <span style="color: #009900">TransportOpts</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">ranch_ssl:opts</span></span>(),
- <span style="color: #009900">ProtocolOpts</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">opts</span></span>())
- <span style="color: #990000">-&gt;</span> {<span style="color: #FF6600">ok</span>, <span style="color: #009900">ListenerPid</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">pid</span></span>()}
- | {<span style="color: #FF6600">error</span>, <span style="font-weight: bold"><span style="color: #000000">any</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>Start listening for connections over a secure TLS channel.</p></div>
-<div class="paragraph"><p>Both HTTP/1.1 and HTTP/2 are supported on this listener.
-The ALPN TLS extension must be used to initiate an HTTP/2
-connection.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">start_tls</font></b>(<font color="#009900">Name</font> <font color="#990000">::</font> <b><font color="#000000">ranch:ref</font></b>(),
+ <font color="#009900">TransportOpts</font> <font color="#990000">::</font> <b><font color="#000000">ranch_ssl:opts</font></b>(),
+ <font color="#009900">ProtocolOpts</font> <font color="#990000">::</font> <b><font color="#000000">opts</font></b>())
+ <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <font color="#009900">ListenerPid</font> <font color="#990000">::</font> <b><font color="#000080">pid</font></b>()}
+ | {<font color="#FF6600">error</font>, <b><font color="#000000">any</font></b>()}</tt></pre>
+</div></div>
+<p>Start listening for connections over a secure TLS channel.</p>
+<p>Both HTTP/1.1 and HTTP/2 are supported on this listener. The ALPN TLS extension must be used to initiate an HTTP/2 connection.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Name
-</dt>
-<dd>
-<p>
-The listener name is used to refer to this listener in
-future calls, for example when stopping it or when
-updating the routes defined.
-</p>
-<div class="paragraph"><p>It can be any Erlang term. An atom is generally good enough,
-for example <code>api</code>, <code>my_app_clear</code> or <code>my_app_tls</code>.</p></div>
+<dl><dt>Name</dt>
+<dd><p>The listener name is used to refer to this listener in future calls, for example when stopping it or when updating the routes defined.</p>
+<p>It can be any Erlang term. An atom is generally good enough, for example <code>api</code>, <code>my_app_clear</code> or <code>my_app_tls</code>.</p>
</dd>
-<dt class="hdlist1">
-TransportOpts
-</dt>
-<dd>
-<p>
-The transport options are where the TCP options, including
-the listener&#8217;s port number, are defined. They also contain
-the TLS options, like the server&#8217;s certificate. Transport options
-are provided as a list of keys and values, for example
-<code>[{port, 8443}, {certfile, "path/to/cert.pem"}]</code>.
-</p>
-<div class="paragraph"><p>The available options are documented in the
-<a href="../ranch_ssl">ranch_ssl(3)</a> manual.</p></div>
+<dt>TransportOpts</dt>
+<dd><p>The transport options are where the TCP options, including the listener&apos;s port number, are defined. They also contain the TLS options, like the server&apos;s certificate. Transport options are provided as a list of keys and values, for example <code>[{port, 8443}, {certfile, &quot;path/to/cert.pem&quot;}]</code>.</p>
+<p>The available options are documented in the <a href="../ranch_ssl">ranch_ssl(3)</a> manual.</p>
</dd>
-<dt class="hdlist1">
-ProtocolOpts
-</dt>
-<dd>
-<p>
-The protocol options are in a map containing all the options for
-the different protocols that may be involved when connecting
-to the listener, including HTTP/1.1 and HTTP/2.
-</p>
-<div class="paragraph"><p>The HTTP/1.1 options are documented in the
-<a href="../cowboy_http">cowboy_http(3)</a> manual;
-and the HTTP/2 options in
-<a href="../cowboy_http2">cowboy_http2(3)</a>.</p></div>
+<dt>ProtocolOpts</dt>
+<dd><p>The protocol options are in a map containing all the options for the different protocols that may be involved when connecting to the listener, including HTTP/1.1 and HTTP/2.</p>
+<p>The HTTP/1.1 options are documented in the <a href="../cowboy_http">cowboy_http(3)</a> manual; and the HTTP/2 options in <a href="../cowboy_http2">cowboy_http2(3)</a>.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>An ok tuple is returned on success. It contains the pid of
-the top-level supervisor for the listener.</p></div>
-<div class="paragraph"><p>An error tuple is returned on error. The error reason may
-be any Erlang term.</p></div>
-<div class="paragraph"><p>A common error is <code>eaddrinuse</code>. It indicates that the port
-configured for Cowboy is already in use.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>An ok tuple is returned on success. It contains the pid of the top-level supervisor for the listener.</p>
+<p>An error tuple is returned on error. The error reason may be any Erlang term.</p>
+<p>A common error is <code>eaddrinuse</code>. It indicates that the port configured for Cowboy is already in use.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: HTTP/2 support added.
-</p>
+<ul><li><strong>2.0</strong>: HTTP/2 support added.
</li>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced. Replaces <code>cowboy:start_https/4</code>.
-</p>
+<li><strong>2.0</strong>: Function introduced. Replaces <code>cowboy:start_https/4</code>.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Start a listener</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Start a listener</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">Dispatch</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_router:compile</span></span>([
- {<span style="color: #FF6600">'_'</span>, [
- {<span style="color: #FF0000">"/"</span>, <span style="color: #FF6600">toppage_h</span>, []}
+<pre><tt><font color="#009900">Dispatch</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_router:compile</font></b>([
+ {<font color="#FF6600">'_'</font>, [
+ {<font color="#FF0000">"/"</font>, <font color="#FF6600">toppage_h</font>, []}
]}
]),
-{<span style="color: #FF6600">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:start_tls</span></span>(<span style="color: #FF6600">example</span>, [
- {<span style="color: #FF6600">port</span>, <span style="color: #993399">8443</span>},
- {<span style="color: #FF6600">cert</span>, <span style="color: #FF0000">"path/to/cert.pem"</span>}
+{<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy:start_tls</font></b>(<font color="#FF6600">example</font>, [
+ {<font color="#FF6600">port</font>, <font color="#993399">8443</font>},
+ {<font color="#FF6600">cert</font>, <font color="#FF0000">"path/to/cert.pem"</font>}
], #{
- <span style="color: #0000FF">env</span> <span style="color: #990000">=&gt;</span> #{<span style="color: #0000FF">dispatch</span> <span style="color: #990000">=&gt;</span> <span style="color: #009900">Dispatch</span>}
-})<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Start a listener on a random port</div>
-<div class="content"><!-- Generator: GNU source-highlight
+ <font color="#0000FF">env</font> <font color="#990000">=&gt;</font> #{<font color="#0000FF">dispatch</font> <font color="#990000">=&gt;</font> <font color="#009900">Dispatch</font>}
+})<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Start a listener on a random port</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">Name</span> <span style="color: #990000">=</span> <span style="color: #FF6600">example</span>,
+<pre><tt><font color="#009900">Name</font> <font color="#990000">=</font> <font color="#FF6600">example</font>,
-{<span style="color: #FF6600">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:start_tls</span></span>(<span style="color: #009900">Name</span>, [
- {<span style="color: #FF6600">cert</span>, <span style="color: #FF0000">"path/to/cert.pem"</span>}
+{<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy:start_tls</font></b>(<font color="#009900">Name</font>, [
+ {<font color="#FF6600">cert</font>, <font color="#FF0000">"path/to/cert.pem"</font>}
], #{
- <span style="color: #0000FF">env</span> <span style="color: #990000">=&gt;</span> #{<span style="color: #0000FF">dispatch</span> <span style="color: #990000">=&gt;</span> <span style="color: #009900">Dispatch</span>}
+ <font color="#0000FF">env</font> <font color="#990000">=&gt;</font> #{<font color="#0000FF">dispatch</font> <font color="#990000">=&gt;</font> <font color="#009900">Dispatch</font>}
}),
-<span style="color: #009900">Port</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">ranch:get_port</span></span>(<span style="color: #009900">Name</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<font color="#009900">Port</font> <font color="#990000">=</font> <b><font color="#000000">ranch:get_port</font></b>(<font color="#009900">Name</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../cowboy">cowboy(3)</a>,
-<a href="../cowboy.start_clear">cowboy:start_clear(3)</a>,
-<a href="../cowboy.stop_listener">cowboy:stop_listener(3)</a>,
-<a href="../ranch">ranch(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy">cowboy(3)</a>, <a href="../cowboy.start_clear">cowboy:start_clear(3)</a>, <a href="../cowboy.stop_listener">cowboy:stop_listener(3)</a>, <a href="../ranch">ranch(3)</a></p>
+
diff --git a/docs/en/cowboy/2.3/manual/cowboy.stop_listener/index.html b/docs/en/cowboy/2.3/manual/cowboy.stop_listener/index.html
index 0fc6df10..8fbdeef2 100644
--- a/docs/en/cowboy/2.3/manual/cowboy.stop_listener/index.html
+++ b/docs/en/cowboy/2.3/manual/cowboy.stop_listener/index.html
@@ -62,87 +62,42 @@
<h1 class="lined-header"><span>cowboy:stop_listener(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy:stop_listener - Stop the given listener</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy:stop_listener - Stop the given listener</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">stop_listener</span></span>(<span style="color: #009900">Name</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">ranch:ref</span></span>())
- <span style="color: #990000">-&gt;</span> <span style="color: #FF6600">ok</span> | {<span style="color: #FF6600">error</span>, <span style="color: #FF6600">not_found</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Stop a previously started listener.</p></div>
-<div class="paragraph"><p>Alias of <a href="../ranch.stop_listener">ranch:stop_listener(3)</a>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">stop_listener</font></b>(<font color="#009900">Name</font> <font color="#990000">::</font> <b><font color="#000000">ranch:ref</font></b>())
+ <font color="#990000">-&gt;</font> <font color="#FF6600">ok</font> | {<font color="#FF6600">error</font>, <font color="#FF6600">not_found</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Stop a previously started listener.</p>
+<p>Alias of <a href="../ranch.stop_listener">ranch:stop_listener(3)</a>.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Name
-</dt>
-<dd>
-<p>
-The name of the listener to be stopped.
-</p>
-<div class="paragraph"><p>The name of the listener is the first argument given to the
-<a href="../cowboy.start_clear">cowboy:start_clear(3)</a>,
-<a href="../cowboy.start_tls">cowboy:start_tls(3)</a> or
-<a href="../ranch.start_listener">ranch:start_listener(3)</a> function.</p></div>
+<dl><dt>Name</dt>
+<dd><p>The name of the listener to be stopped.</p>
+<p>The name of the listener is the first argument given to the <a href="../cowboy.start_clear">cowboy:start_clear(3)</a>, <a href="../cowboy.start_tls">cowboy:start_tls(3)</a> or <a href="../ranch.start_listener">ranch:start_listener(3)</a> function.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The atom <code>ok</code> is returned on success.</p></div>
-<div class="paragraph"><p>The <code>{error, not_found}</code> tuple is returned when the listener
-does not exist.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The atom <code>ok</code> is returned on success.</p>
+<p>The <code>{error, not_found}</code> tuple is returned when the listener does not exist.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<ul><li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Stop a listener</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Stop a listener</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: #0000FF">ok</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:stop_listener</span></span>(<span style="color: #FF6600">example</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#0000FF">ok</font> <font color="#990000">=</font> <b><font color="#000000">cowboy:stop_listener</font></b>(<font color="#FF6600">example</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../cowboy">cowboy(3)</a>,
-<a href="../cowboy.start_clear">cowboy:start_clear(3)</a>,
-<a href="../cowboy.start_tls">cowboy:start_tls(3)</a>,
-<a href="../ranch">ranch(3)</a>,
-<a href="../ranch.start_listener">ranch:start_listener(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy">cowboy(3)</a>, <a href="../cowboy.start_clear">cowboy:start_clear(3)</a>, <a href="../cowboy.start_tls">cowboy:start_tls(3)</a>, <a href="../ranch">ranch(3)</a>, <a href="../ranch.start_listener">ranch:start_listener(3)</a></p>
+
diff --git a/docs/en/cowboy/2.3/manual/cowboy/index.html b/docs/en/cowboy/2.3/manual/cowboy/index.html
index 0b551dfa..9ea56c9e 100644
--- a/docs/en/cowboy/2.3/manual/cowboy/index.html
+++ b/docs/en/cowboy/2.3/manual/cowboy/index.html
@@ -62,129 +62,76 @@
<h1 class="lined-header"><span>cowboy(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy - HTTP server</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy - HTTP server</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The module <code>cowboy</code> provides convenience functions for
-manipulating Ranch listeners.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The module <code>cowboy</code> provides convenience functions for manipulating Ranch listeners.</p>
<h2 id="_exports">Exports</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../cowboy.start_clear">cowboy:start_clear(3)</a> - Listen for connections using plain TCP
-</p>
+<ul><li><a href="../cowboy.start_clear">cowboy:start_clear(3)</a> - Listen for connections using plain TCP
</li>
-<li>
-<p>
-<a href="../cowboy.start_tls">cowboy:start_tls(3)</a> - Listen for connections using TLS
-</p>
+<li><a href="../cowboy.start_tls">cowboy:start_tls(3)</a> - Listen for connections using TLS
</li>
-<li>
-<p>
-<a href="../cowboy.stop_listener">cowboy:stop_listener(3)</a> - Stop the given listener
-</p>
+<li><a href="../cowboy.stop_listener">cowboy:stop_listener(3)</a> - Stop the given listener
</li>
-<li>
-<p>
-<a href="../cowboy.set_env">cowboy:set_env(3)</a> - Update a listener&#8217;s environment value
-</p>
+<li><a href="../cowboy.set_env">cowboy:set_env(3)</a> - Update a listener&apos;s environment value
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_types">Types</h2>
-<div class="sectionbody">
-<div class="sect2">
<h3 id="_fields">fields()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">fields</span></span>() <span style="color: #990000">::</span> [<span style="color: #009900">Name</span>
- | {<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">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>
-<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
-<a href="../cowboy_req">cowboy_req(3)</a>.</p></div>
-</div>
-<div class="sect2">
+<pre><tt><b><font color="#000000">fields</font></b>() <font color="#990000">::</font> [<font color="#009900">Name</font>
+ | {<font color="#009900">Name</font>, <font color="#009900">Constraints</font>}
+ | {<font color="#009900">Name</font>, <font color="#009900">Constraints</font>, <font color="#009900">Default</font>}]
+
+<font color="#009900">Name</font> <font color="#990000">::</font> <b><font color="#000080">atom</font></b>()
+<font color="#009900">Constraints</font> <font color="#990000">::</font> <font color="#009900">Constraint</font> | [<font color="#009900">Constraint</font>]
+<font color="#009900">Constraint</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_constraints:constraint</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()</tt></pre>
+</div></div>
+<p>Fields description for match operations.</p>
+<p>This type is used in <a href="../cowboy_router">cowboy_router(3)</a> for matching bindings and in the match functions found in <a href="../cowboy_req">cowboy_req(3)</a>.</p>
<h3 id="_http_headers">http_headers()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">http_headers</span></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: #000000">iodata</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>HTTP headers.</p></div>
-</div>
-<div class="sect2">
+<pre><tt><b><font color="#000000">http_headers</font></b>() <font color="#990000">::</font> #{<b><font color="#000080">binary</font></b>() <font color="#990000">=&gt;</font> <b><font color="#000000">iodata</font></b>()}</tt></pre>
+</div></div>
+<p>HTTP headers.</p>
<h3 id="_http_status">http_status()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">http_status</span></span>() <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>() | <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>HTTP response status.</p></div>
-<div class="paragraph"><p>A binary status can be used to set a reason phrase. Note
-however that HTTP/2 only sends the status code and drops
-the reason phrase entirely.</p></div>
-</div>
-<div class="sect2">
+<pre><tt><b><font color="#000000">http_status</font></b>() <font color="#990000">::</font> <b><font color="#000000">non_neg_integer</font></b>() | <b><font color="#000080">binary</font></b>()</tt></pre>
+</div></div>
+<p>HTTP response status.</p>
+<p>A binary status can be used to set a reason phrase. Note however that HTTP/2 only sends the status code and drops the reason phrase entirely.</p>
<h3 id="_http_version">http_version()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">http_version</span></span>() <span style="color: #990000">::</span> <span style="color: #FF6600">'HTTP/2'</span> | <span style="color: #FF6600">'HTTP/1.1'</span> | <span style="color: #FF6600">'HTTP/1.0'</span></tt></pre></div></div>
-<div class="paragraph"><p>HTTP version.</p></div>
-<div class="paragraph"><p>Note that semantically, HTTP/1.1 and HTTP/2 are equivalent.</p></div>
-</div>
-<div class="sect2">
+<pre><tt><b><font color="#000000">http_version</font></b>() <font color="#990000">::</font> <font color="#FF6600">'HTTP/2'</font> | <font color="#FF6600">'HTTP/1.1'</font> | <font color="#FF6600">'HTTP/1.0'</font></tt></pre>
+</div></div>
+<p>HTTP version.</p>
+<p>Note that semantically, HTTP/1.1 and HTTP/2 are equivalent.</p>
<h3 id="_opts">opts()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">opts</span></span>() <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">map</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Options for the HTTP/1.1, HTTP/2 and Websocket protocols.</p></div>
-<div class="paragraph"><p>The protocol options are in a map containing all the options for
-the different protocols that may be involved when connecting
-to the listener, including HTTP/1.1 and HTTP/2.</p></div>
-<div class="paragraph"><p>The HTTP/1.1 options are documented in the
-<a href="../cowboy_http">cowboy_http(3)</a> manual
-and the HTTP/2 options in
-<a href="../cowboy_http2">cowboy_http2(3)</a>.</p></div>
-</div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">opts</font></b>() <font color="#990000">::</font> <b><font color="#000000">map</font></b>()</tt></pre>
+</div></div>
+<p>Options for the HTTP/1.1, HTTP/2 and Websocket protocols.</p>
+<p>The protocol options are in a map containing all the options for the different protocols that may be involved when connecting to the listener, including HTTP/1.1 and HTTP/2.</p>
+<p>The HTTP/1.1 options are documented in the <a href="../cowboy_http">cowboy_http(3)</a> manual and the HTTP/2 options in <a href="../cowboy_http2">cowboy_http2(3)</a>.</p>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="..">cowboy(7)</a>,
-<a href="../ranch">ranch(3)</a></p></div>
-</div>
-</div>
+<p><a href="..">cowboy(7)</a>, <a href="../ranch">ranch(3)</a></p>
+
diff --git a/docs/en/cowboy/2.3/manual/cowboy_app/index.html b/docs/en/cowboy/2.3/manual/cowboy_app/index.html
index 906a1178..9512bd6a 100644
--- a/docs/en/cowboy/2.3/manual/cowboy_app/index.html
+++ b/docs/en/cowboy/2.3/manual/cowboy_app/index.html
@@ -62,171 +62,77 @@
<h1 class="lined-header"><span>cowboy(7)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy - Small, fast, modern HTTP server for Erlang/OTP</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy - Small, fast, modern HTTP server for Erlang/OTP</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy is an HTTP server for Erlang/OTP with support for the
-HTTP/1.1, HTTP/2 and Websocket protocols.</p></div>
-<div class="paragraph"><p>Cowboy aims to provide a complete HTTP stack. This includes
-the implementation of the HTTP RFCs but also any directly
-related standards, like Websocket or Server-Sent Events.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Cowboy is an HTTP server for Erlang/OTP with support for the HTTP/1.1, HTTP/2 and Websocket protocols.</p>
+<p>Cowboy aims to provide a complete HTTP stack. This includes the implementation of the HTTP RFCs but also any directly related standards, like Websocket or Server-Sent Events.</p>
<h2 id="_modules">Modules</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Functions:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../cowboy">cowboy(3)</a> - Listener management
-</p>
+<p>Functions:</p>
+<ul><li><a href="../cowboy">cowboy(3)</a> - Listener management
</li>
-<li>
-<p>
-<a href="../cowboy_req">cowboy_req(3)</a> - Request and response
-</p>
+<li><a href="../cowboy_req">cowboy_req(3)</a> - Request and response
</li>
-<li>
-<p>
-<a href="../cowboy_router">cowboy_router(3)</a> - Router
-</p>
+<li><a href="../cowboy_router">cowboy_router(3)</a> - Router
</li>
-<li>
-<p>
-<a href="../cowboy_constraints">cowboy_constraints(3)</a> - Constraints
-</p>
+<li><a href="../cowboy_constraints">cowboy_constraints(3)</a> - Constraints
</li>
-</ul></div>
-<div class="paragraph"><p>Protocols:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../cowboy_http">cowboy_http(3)</a> - HTTP/1.1
-</p>
+</ul>
+<p>Protocols:</p>
+<ul><li><a href="../cowboy_http">cowboy_http(3)</a> - HTTP/1.1
</li>
-<li>
-<p>
-<a href="../cowboy_http2">cowboy_http2(3)</a> - HTTP/2
-</p>
+<li><a href="../cowboy_http2">cowboy_http2(3)</a> - HTTP/2
</li>
-<li>
-<p>
-<a href="../cowboy_websocket">cowboy_websocket(3)</a> - Websocket
-</p>
+<li><a href="../cowboy_websocket">cowboy_websocket(3)</a> - Websocket
</li>
-</ul></div>
-<div class="paragraph"><p>Handlers:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../cowboy_static">cowboy_static(3)</a> - Static file handler
-</p>
+</ul>
+<p>Handlers:</p>
+<ul><li><a href="../cowboy_static">cowboy_static(3)</a> - Static file handler
</li>
-</ul></div>
-<div class="paragraph"><p>Behaviors:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../cowboy_handler">cowboy_handler(3)</a> - Plain HTTP handlers
-</p>
+</ul>
+<p>Behaviors:</p>
+<ul><li><a href="../cowboy_handler">cowboy_handler(3)</a> - Plain HTTP handlers
</li>
-<li>
-<p>
-<a href="../cowboy_loop">cowboy_loop(3)</a> - Loop handlers
-</p>
+<li><a href="../cowboy_loop">cowboy_loop(3)</a> - Loop handlers
</li>
-<li>
-<p>
-<a href="../cowboy_middleware">cowboy_middleware(3)</a> - Middlewares
-</p>
+<li><a href="../cowboy_middleware">cowboy_middleware(3)</a> - Middlewares
</li>
-<li>
-<p>
-<a href="../cowboy_rest">cowboy_rest(3)</a> - REST handlers
-</p>
+<li><a href="../cowboy_rest">cowboy_rest(3)</a> - REST handlers
</li>
-<li>
-<p>
-<a href="../cowboy_stream">cowboy_stream(3)</a> - Stream handlers
-</p>
+<li><a href="../cowboy_stream">cowboy_stream(3)</a> - Stream handlers
</li>
-<li>
-<p>
-<a href="../cowboy_websocket">cowboy_websocket(3)</a> - Websocket handlers
-</p>
+<li><a href="../cowboy_websocket">cowboy_websocket(3)</a> - Websocket handlers
</li>
-</ul></div>
-<div class="paragraph"><p>Middlewares:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../cowboy_router">cowboy_router(3)</a> - Router middleware
-</p>
+</ul>
+<p>Middlewares:</p>
+<ul><li><a href="../cowboy_router">cowboy_router(3)</a> - Router middleware
</li>
-<li>
-<p>
-<a href="../cowboy_handler">cowboy_handler(3)</a> - Handler middleware
-</p>
+<li><a href="../cowboy_handler">cowboy_handler(3)</a> - Handler middleware
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
+<!-- @todo http_status_codes is not linked to; what to do with it?-->
<h2 id="_dependencies">Dependencies</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../ranch">ranch(7)</a> - Socket acceptor pool for TCP protocols
-</p>
+<ul><li><a href="../ranch">ranch(7)</a> - Socket acceptor pool for TCP protocols
</li>
-<li>
-<p>
-<a href="../cowlib">cowlib(7)</a> - Support library for manipulating Web protocols
-</p>
+<li><a href="../cowlib">cowlib(7)</a> - Support library for manipulating Web protocols
</li>
-<li>
-<p>
-ssl - Secure communication over sockets
-</p>
+<li>ssl - Secure communication over sockets
</li>
-<li>
-<p>
-crypto - Crypto functions
-</p>
+<li>crypto - Crypto functions
</li>
-</ul></div>
-<div class="paragraph"><p>All these applications must be started before the <code>cowboy</code>
-application. To start Cowboy and all dependencies at once:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+</ul>
+<p>All these applications must be started before the <code>cowboy</code> application. To start Cowboy and all dependencies at once:</p>
+<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">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">application:ensure_all_started</span></span>(<span style="color: #FF6600">cowboy</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">application:ensure_all_started</font></b>(<font color="#FF6600">cowboy</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_environment">Environment</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <code>cowboy</code> application does not define any application
-environment configuration parameters.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The <code>cowboy</code> application does not define any application environment configuration parameters.</p>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../ranch">ranch(7)</a>,
-<a href="../cowlib">cowlib(7)</a></p></div>
-</div>
-</div>
+<p><a href="../ranch">ranch(7)</a>, <a href="../cowlib">cowlib(7)</a></p>
+
diff --git a/docs/en/cowboy/2.3/manual/cowboy_constraints.int/index.html b/docs/en/cowboy/2.3/manual/cowboy_constraints.int/index.html
index 6153fcbf..67a2c938 100644
--- a/docs/en/cowboy/2.3/manual/cowboy_constraints.int/index.html
+++ b/docs/en/cowboy/2.3/manual/cowboy_constraints.int/index.html
@@ -62,92 +62,52 @@
<h1 class="lined-header"><span>cowboy_constraints:int(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_constraints:int - Integer constraint</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_constraints:int - Integer constraint</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Constraint functions implement a number of different operations.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Constraint functions implement a number of different operations.</p>
+<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">int</span></span>(<span style="color: #FF6600">forward</span>, <span style="color: #009900">Bin</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Int</span>} | {<span style="color: #FF6600">error</span>, <span style="color: #FF6600">not_an_integer</span>}
+<pre><tt><b><font color="#000000">int</font></b>(<font color="#FF6600">forward</font>, <font color="#009900">Bin</font>) <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <font color="#009900">Int</font>} | {<font color="#FF6600">error</font>, <font color="#FF6600">not_an_integer</font>}
-<span style="color: #009900">Bin</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()
-<span style="color: #009900">Int</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">integer</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Validate and convert the text representation of an integer.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<font color="#009900">Bin</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()
+<font color="#009900">Int</font> <font color="#990000">::</font> <b><font color="#000080">integer</font></b>()</tt></pre>
+</div></div>
+<p>Validate and convert the text representation of an integer.</p>
+<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">int</span></span>(<span style="color: #FF6600">reverse</span>, <span style="color: #009900">Int</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Bin</span>} | {<span style="color: #FF6600">error</span>, <span style="color: #FF6600">not_an_integer</span>}</tt></pre></div></div>
-<div class="paragraph"><p>Convert an integer back to its text representation.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">int</font></b>(<font color="#FF6600">reverse</font>, <font color="#009900">Int</font>) <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <font color="#009900">Bin</font>} | {<font color="#FF6600">error</font>, <font color="#FF6600">not_an_integer</font>}</tt></pre>
+</div></div>
+<p>Convert an integer back to its text representation.</p>
+<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">int</span></span>(<span style="color: #FF6600">format_error</span>, <span style="color: #009900">Error</span>) <span style="color: #990000">-&gt;</span> <span style="color: #009900">HumanReadable</span>
+<pre><tt><b><font color="#000000">int</font></b>(<font color="#FF6600">format_error</font>, <font color="#009900">Error</font>) <font color="#990000">-&gt;</font> <font color="#009900">HumanReadable</font>
-<span style="color: #009900">Error</span> <span style="color: #990000">::</span> {<span style="color: #FF6600">not_an_integer</span>, <span style="color: #009900">Bin</span> | <span style="color: #009900">Int</span>}
-<span style="color: #009900">HumanReadable</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">iolist</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Generate a human-readable error message.</p></div>
-</div>
-</div>
-<div class="sect1">
+<font color="#009900">Error</font> <font color="#990000">::</font> {<font color="#FF6600">not_an_integer</font>, <font color="#009900">Bin</font> | <font color="#009900">Int</font>}
+<font color="#009900">HumanReadable</font> <font color="#990000">::</font> <b><font color="#000000">iolist</font></b>()</tt></pre>
+</div></div>
+<p>Generate a human-readable error message.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Arguments vary depending on the operation. Constraint
-functions always take the operation type as first argument,
-and the value as second argument.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Arguments vary depending on the operation. Constraint functions always take the operation type as first argument, and the value as second argument.</p>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The return value varies depending on the operation.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The return value varies depending on the operation.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Interface modified to allow for a variety of operations.
-</p>
+<ul><li><strong>2.0</strong>: Interface modified to allow for a variety of operations.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Constraint introduced.
-</p>
+<li><strong>1.0</strong>: Constraint introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This function is not meant to be called directly.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This function is not meant to be called directly.</p>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../cowboy_constraints">cowboy_constraints(3)</a>,
-<a href="../cowboy_constraints.nonempty">cowboy_constraints:nonempty(3)</a>,
-<a href="../cowboy_router">cowboy_router(3)</a>,
-<a href="../cowboy_req.match_cookies">cowboy_req:match_cookies(3)</a>,
-<a href="../cowboy_req.match_qs">cowboy_req:match_qs(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_constraints">cowboy_constraints(3)</a>, <a href="../cowboy_constraints.nonempty">cowboy_constraints:nonempty(3)</a>, <a href="../cowboy_router">cowboy_router(3)</a>, <a href="../cowboy_req.match_cookies">cowboy_req:match_cookies(3)</a>, <a href="../cowboy_req.match_qs">cowboy_req:match_qs(3)</a></p>
+
diff --git a/docs/en/cowboy/2.3/manual/cowboy_constraints.nonempty/index.html b/docs/en/cowboy/2.3/manual/cowboy_constraints.nonempty/index.html
index cc14ce3c..8578be2c 100644
--- a/docs/en/cowboy/2.3/manual/cowboy_constraints.nonempty/index.html
+++ b/docs/en/cowboy/2.3/manual/cowboy_constraints.nonempty/index.html
@@ -62,91 +62,51 @@
<h1 class="lined-header"><span>cowboy_constraints:nonempty(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_constraints:nonempty - Non-empty constraint</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_constraints:nonempty - Non-empty constraint</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Constraint functions implement a number of different operations.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Constraint functions implement a number of different operations.</p>
+<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">nonempty</span></span>(<span style="color: #FF6600">forward</span> | <span style="color: #FF6600">reverse</span>, <span style="color: #990000">&lt;&lt;&gt;&gt;</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #FF6600">error</span>, <span style="color: #FF6600">empty</span>}</tt></pre></div></div>
-<div class="paragraph"><p>Reject empty values.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">nonempty</font></b>(<font color="#FF6600">forward</font> | <font color="#FF6600">reverse</font>, <font color="#990000">&lt;&lt;&gt;&gt;</font>) <font color="#990000">-&gt;</font> {<font color="#FF6600">error</font>, <font color="#FF6600">empty</font>}</tt></pre>
+</div></div>
+<p>Reject empty values.</p>
+<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">nonempty</span></span>(<span style="color: #FF6600">forward</span> | <span style="color: #FF6600">reverse</span>, <span style="color: #009900">Bin</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Bin</span>}
+<pre><tt><b><font color="#000000">nonempty</font></b>(<font color="#FF6600">forward</font> | <font color="#FF6600">reverse</font>, <font color="#009900">Bin</font>) <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <font color="#009900">Bin</font>}
-<span style="color: #009900">Bin</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>Accept any other binary values.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<font color="#009900">Bin</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()</tt></pre>
+</div></div>
+<p>Accept any other binary values.</p>
+<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">nonempty</span></span>(<span style="color: #FF6600">format_error</span>, <span style="color: #009900">Error</span>) <span style="color: #990000">-&gt;</span> <span style="color: #009900">HumanReadable</span>
+<pre><tt><b><font color="#000000">nonempty</font></b>(<font color="#FF6600">format_error</font>, <font color="#009900">Error</font>) <font color="#990000">-&gt;</font> <font color="#009900">HumanReadable</font>
-<span style="color: #009900">Error</span> <span style="color: #990000">::</span> {<span style="color: #FF6600">empty</span>, <span style="color: #009900">Bin</span>}
-<span style="color: #009900">HumanReadable</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">iolist</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Generate a human-readable error message.</p></div>
-</div>
-</div>
-<div class="sect1">
+<font color="#009900">Error</font> <font color="#990000">::</font> {<font color="#FF6600">empty</font>, <font color="#009900">Bin</font>}
+<font color="#009900">HumanReadable</font> <font color="#990000">::</font> <b><font color="#000000">iolist</font></b>()</tt></pre>
+</div></div>
+<p>Generate a human-readable error message.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Arguments vary depending on the operation. Constraint
-functions always take the operation type as first argument,
-and the value as second argument.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Arguments vary depending on the operation. Constraint functions always take the operation type as first argument, and the value as second argument.</p>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The return value varies depending on the operation.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The return value varies depending on the operation.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Interface modified to allow for a variety of operations.
-</p>
+<ul><li><strong>2.0</strong>: Interface modified to allow for a variety of operations.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Constraint introduced.
-</p>
+<li><strong>1.0</strong>: Constraint introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This function is not meant to be called directly.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This function is not meant to be called directly.</p>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../cowboy_constraints">cowboy_constraints(3)</a>,
-<a href="../cowboy_constraints.int">cowboy_constraints:int(3)</a>,
-<a href="../cowboy_router">cowboy_router(3)</a>,
-<a href="../cowboy_req.match_cookies">cowboy_req:match_cookies(3)</a>,
-<a href="../cowboy_req.match_qs">cowboy_req:match_qs(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_constraints">cowboy_constraints(3)</a>, <a href="../cowboy_constraints.int">cowboy_constraints:int(3)</a>, <a href="../cowboy_router">cowboy_router(3)</a>, <a href="../cowboy_req.match_cookies">cowboy_req:match_cookies(3)</a>, <a href="../cowboy_req.match_qs">cowboy_req:match_qs(3)</a></p>
+
diff --git a/docs/en/cowboy/2.3/manual/cowboy_constraints/index.html b/docs/en/cowboy/2.3/manual/cowboy_constraints/index.html
index 6de9597b..8f0ebbbf 100644
--- a/docs/en/cowboy/2.3/manual/cowboy_constraints/index.html
+++ b/docs/en/cowboy/2.3/manual/cowboy_constraints/index.html
@@ -62,84 +62,43 @@
<h1 class="lined-header"><span>cowboy_constraints(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_constraints - Constraints</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_constraints - Constraints</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The module <code>cowboy_constraints</code> defines the built-in
-constraints in Cowboy and provides an interface for
-manipulating these constraints.</p></div>
-<div class="paragraph"><p>Constraints are functions that define what type of
-input is allowed. They are used throughout Cowboy,
-from the router to query strings to cookies.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The module <code>cowboy_constraints</code> defines the built-in constraints in Cowboy and provides an interface for manipulating these constraints.</p>
+<p>Constraints are functions that define what type of input is allowed. They are used throughout Cowboy, from the router to query strings to cookies.</p>
<h2 id="_exports">Exports</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Built-in constraints:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../cowboy_constraints.int">cowboy_constraints:int(3)</a> - Integer constraint
-</p>
+<p>Built-in constraints:</p>
+<ul><li><a href="../cowboy_constraints.int">cowboy_constraints:int(3)</a> - Integer constraint
</li>
-<li>
-<p>
-<a href="../cowboy_constraints.nonempty">cowboy_constraints:nonempty(3)</a> - Non-empty constraint
-</p>
+<li><a href="../cowboy_constraints.nonempty">cowboy_constraints:nonempty(3)</a> - Non-empty constraint
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_types">Types</h2>
-<div class="sectionbody">
-<div class="sect2">
<h3 id="_constraint">constraint()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">constraint</span></span>() <span style="color: #990000">::</span> <span style="color: #FF6600">int</span> | <span style="color: #FF6600">nonempty</span> | <span style="font-weight: bold"><span style="color: #0000FF">fun</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>A constraint function.</p></div>
-<div class="paragraph"><p>The atom constraints are built-in, see the corresponding
-function in the exports list above.</p></div>
-</div>
-<div class="sect2">
+<pre><tt><b><font color="#000000">constraint</font></b>() <font color="#990000">::</font> <font color="#FF6600">int</font> | <font color="#FF6600">nonempty</font> | <b><font color="#0000FF">fun</font></b>()</tt></pre>
+</div></div>
+<p>A constraint function.</p>
+<p>The atom constraints are built-in, see the corresponding function in the exports list above.</p>
<h3 id="_reason">reason()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">reason</span></span>() <span style="color: #990000">::</span> {<span style="font-weight: bold"><span style="color: #000000">constraint</span></span>(), <span style="color: #009900">Reason</span>, <span style="color: #009900">Value</span>}
-
-<span style="color: #009900">Reason</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()
-<span style="color: #009900">Value</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>Reason for the constraint failure.</p></div>
-<div class="paragraph"><p>It includes the constraint function in question,
-a machine-readable error reason and the value that
-made the constraint fail.</p></div>
-</div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">reason</font></b>() <font color="#990000">::</font> {<b><font color="#000000">constraint</font></b>(), <font color="#009900">Reason</font>, <font color="#009900">Value</font>}
+
+<font color="#009900">Reason</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()
+<font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()</tt></pre>
+</div></div>
+<p>Reason for the constraint failure.</p>
+<p>It includes the constraint function in question, a machine-readable error reason and the value that made the constraint fail.</p>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="..">cowboy(7)</a>,
-<a href="../cowboy">cowboy(3)</a>,
-<a href="../cowboy_router">cowboy_router(3)</a>,
-<a href="../cowboy_req.match_cookies">cowboy_req:match_cookies(3)</a>,
-<a href="../cowboy_req.match_qs">cowboy_req:match_qs(3)</a></p></div>
-</div>
-</div>
+<p><a href="..">cowboy(7)</a>, <a href="../cowboy">cowboy(3)</a>, <a href="../cowboy_router">cowboy_router(3)</a>, <a href="../cowboy_req.match_cookies">cowboy_req:match_cookies(3)</a>, <a href="../cowboy_req.match_qs">cowboy_req:match_qs(3)</a></p>
+
diff --git a/docs/en/cowboy/2.3/manual/cowboy_handler.terminate/index.html b/docs/en/cowboy/2.3/manual/cowboy_handler.terminate/index.html
index dd9d24f4..c1050fa3 100644
--- a/docs/en/cowboy/2.3/manual/cowboy_handler.terminate/index.html
+++ b/docs/en/cowboy/2.3/manual/cowboy_handler.terminate/index.html
@@ -62,109 +62,54 @@
<h1 class="lined-header"><span>cowboy_handler:terminate(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_handler:terminate - Terminate the handler</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_handler:terminate - Terminate the handler</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">terminate</span></span>(<span style="color: #009900">Reason</span>, <span style="color: #009900">PartialReq</span>, <span style="color: #009900">State</span>, <span style="color: #009900">Handler</span>) <span style="color: #990000">-&gt;</span> <span style="color: #FF6600">ok</span>
-
-<span style="color: #009900">Reason</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()
-<span style="color: #009900">PartialReq</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">map</span></span>()
-<span style="color: #009900">State</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()
-<span style="color: #009900">Handler</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">module</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Call the optional terminate callback if it is defined.</p></div>
-<div class="paragraph"><p>Make sure to use this function at the end of the execution
-of modules that implement custom handler behaviors.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">terminate</font></b>(<font color="#009900">Reason</font>, <font color="#009900">PartialReq</font>, <font color="#009900">State</font>, <font color="#009900">Handler</font>) <font color="#990000">-&gt;</font> <font color="#FF6600">ok</font>
+
+<font color="#009900">Reason</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()
+<font color="#009900">PartialReq</font> <font color="#990000">::</font> <b><font color="#000000">map</font></b>()
+<font color="#009900">State</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()
+<font color="#009900">Handler</font> <font color="#990000">::</font> <b><font color="#000000">module</font></b>()</tt></pre>
+</div></div>
+<p>Call the optional terminate callback if it is defined.</p>
+<p>Make sure to use this function at the end of the execution of modules that implement custom handler behaviors.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Reason
-</dt>
-<dd>
-<p>
-Reason for termination.
-</p>
+<dl><dt>Reason</dt>
+<dd><p>Reason for termination.</p>
</dd>
-<dt class="hdlist1">
-PartialReq
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
-<div class="paragraph"><p>It is possible to remove fields from the Req object to save memory
-when the handler has no concept of requests/responses. The only
-requirement is that a map is provided.</p></div>
+<dt>PartialReq</dt>
+<dd><p>The Req object.</p>
+<p>It is possible to remove fields from the Req object to save memory when the handler has no concept of requests/responses. The only requirement is that a map is provided.</p>
</dd>
-<dt class="hdlist1">
-State
-</dt>
-<dd>
-<p>
-Handler state.
-</p>
+<dt>State</dt>
+<dd><p>Handler state.</p>
</dd>
-<dt class="hdlist1">
-Handler
-</dt>
-<dd>
-<p>
-Handler module.
-</p>
+<dt>Handler</dt>
+<dd><p>Handler module.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The atom <code>ok</code> is always returned. It can be safely ignored.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The atom <code>ok</code> is always returned. It can be safely ignored.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced.
-</p>
+<ul><li><strong>2.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Terminate a handler normally</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Terminate a handler normally</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">cowboy_handler:terminate</span></span>(<span style="font-weight: bold"><span style="color: #000080">normal</span></span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>, <span style="color: #009900">Handler</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">cowboy_handler:terminate</font></b>(<b><font color="#000080">normal</font></b>, <font color="#009900">Req</font>, <font color="#009900">State</font>, <font color="#009900">Handler</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../cowboy_handler">cowboy_handler(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_handler">cowboy_handler(3)</a></p>
+
diff --git a/docs/en/cowboy/2.3/manual/cowboy_handler/index.html b/docs/en/cowboy/2.3/manual/cowboy_handler/index.html
index 88eed6c6..def10074 100644
--- a/docs/en/cowboy/2.3/manual/cowboy_handler/index.html
+++ b/docs/en/cowboy/2.3/manual/cowboy_handler/index.html
@@ -62,96 +62,46 @@
<h1 class="lined-header"><span>cowboy_handler(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_handler - Plain HTTP handlers</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_handler - Plain HTTP handlers</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <code>cowboy_handler</code> middleware executes the handler selected
-by the router or any other preceding middleware.</p></div>
-<div class="paragraph"><p>This middleware takes the handler module and initial state
-from the <code>handler</code> and <code>handler_opts</code> environment values,
-respectively. On completion, it adds a <code>result</code> value to
-the middleware environment, containing the return value
-of the <code>terminate/3</code> callback (if defined) and <code>ok</code> otherwise.</p></div>
-<div class="paragraph"><p>This module also defines a callback interface for handling
-HTTP requests.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The <code>cowboy_handler</code> middleware executes the handler selected by the router or any other preceding middleware.</p>
+<p>This middleware takes the handler module and initial state from the <code>handler</code> and <code>handler_opts</code> environment values, respectively. On completion, it adds a <code>result</code> value to the middleware environment, containing the return value of the <code>terminate/3</code> callback (if defined) and <code>ok</code> otherwise.</p>
+<p>This module also defines a callback interface for handling HTTP requests.</p>
<h2 id="_callbacks">Callbacks</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Plain HTTP handlers implement the following interface:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Plain HTTP handlers implement the following interface:</p>
+<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">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">ok</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
-
-<span style="font-weight: bold"><span style="color: #000000">terminate</span></span>(<span style="color: #009900">Reason</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> <span style="color: #FF6600">ok</span> <span style="font-style: italic"><span style="color: #9A1900">%% optional</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">State</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()
-<span style="color: #009900">Reason</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">normal</span></span>
- | {<span style="color: #FF6600">crash</span>, <span style="color: #FF6600">error</span> | <span style="font-weight: bold"><span style="color: #000080">exit</span></span> | <span style="font-weight: bold"><span style="color: #000080">throw</span></span>, <span style="font-weight: bold"><span style="color: #000000">any</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>These two callbacks are common to all handlers.</p></div>
-<div class="paragraph"><p>Plain HTTP handlers do all their work in the <code>init/2</code>
-callback. Returning <code>ok</code> terminates the handler. If no
-response is sent, Cowboy will send a <code>204 No Content</code>.</p></div>
-<div class="paragraph"><p>The optional <code>terminate/3</code> callback will ultimately be called
-with the reason for the termination of the handler.
-Cowboy will terminate the process right after this. There
-is no need to perform any cleanup in this callback.</p></div>
-<div class="paragraph"><p>The following terminate reasons are defined for plain HTTP
-handlers:</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-normal
-</dt>
-<dd>
-<p>
- The connection was closed normally.
-</p>
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
+
+<b><font color="#000000">terminate</font></b>(<font color="#009900">Reason</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> <font color="#FF6600">ok</font> <i><font color="#9A1900">%% optional</font></i>
+
+<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()
+<font color="#009900">State</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()
+<font color="#009900">Reason</font> <font color="#990000">::</font> <b><font color="#000080">normal</font></b>
+ | {<font color="#FF6600">crash</font>, <font color="#FF6600">error</font> | <b><font color="#000080">exit</font></b> | <b><font color="#000080">throw</font></b>, <b><font color="#000000">any</font></b>()}</tt></pre>
+</div></div>
+<p>These two callbacks are common to all handlers.</p>
+<p>Plain HTTP handlers do all their work in the <code>init/2</code> callback. Returning <code>ok</code> terminates the handler. If no response is sent, Cowboy will send a <code>204 No Content</code>.</p>
+<p>The optional <code>terminate/3</code> callback will ultimately be called with the reason for the termination of the handler. Cowboy will terminate the process right after this. There is no need to perform any cleanup in this callback.</p>
+<p>The following terminate reasons are defined for plain HTTP handlers:</p>
+<dl><dt>normal</dt>
+<dd><p>The connection was closed normally.</p>
</dd>
-<dt class="hdlist1">
-{crash, Class, Reason}
-</dt>
-<dd>
-<p>
- A crash occurred in the handler. <code>Class</code> and <code>Reason</code> can be
- used to obtain more information about the crash. The function
- <code>erlang:get_stacktrace/0</code> can also be called to obtain the
- stacktrace of the process when the crash occurred.
-</p>
+<dt>{crash, Class, Reason}</dt>
+<dd><p>A crash occurred in the handler. <code>Class</code> and <code>Reason</code> can be used to obtain more information about the crash. The function <code>erlang:get_stacktrace/0</code> can also be called to obtain the stacktrace of the process when the crash occurred.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_exports">Exports</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The following function should be called by modules implementing
-custom handlers to execute the optional terminate callback:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../cowboy_handler.terminate">cowboy_handler:terminate(3)</a> - Terminate the handler
-</p>
+<p>The following function should be called by modules implementing custom handlers to execute the optional terminate callback:</p>
+<ul><li><a href="../cowboy_handler.terminate">cowboy_handler:terminate(3)</a> - Terminate the handler
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="..">cowboy(7)</a></p></div>
-</div>
-</div>
+<p><a href="..">cowboy(7)</a></p>
+
diff --git a/docs/en/cowboy/2.3/manual/cowboy_http/index.html b/docs/en/cowboy/2.3/manual/cowboy_http/index.html
index 12b29e27..4268bfef 100644
--- a/docs/en/cowboy/2.3/manual/cowboy_http/index.html
+++ b/docs/en/cowboy/2.3/manual/cowboy_http/index.html
@@ -62,255 +62,116 @@
<h1 class="lined-header"><span>cowboy_http(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_http - HTTP/1.1</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_http - HTTP/1.1</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The module <code>cowboy_http</code> implements HTTP/1.1 and HTTP/1.0
-as a Ranch protocol.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The module <code>cowboy_http</code> implements HTTP/1.1 and HTTP/1.0 as a Ranch protocol.</p>
<h2 id="_options">Options</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<!-- @todo Might be worth moving cowboy_clear/tls/stream_h options-->
+<!-- to their respective manual, when they are added.-->
+<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">opts</span></span>() <span style="color: #990000">::</span> #{
- <span style="color: #0000FF">connection_type</span> <span style="color: #990000">=&gt;</span> <span style="color: #FF6600">worker</span> | <span style="color: #FF6600">supervisor</span>,
- <span style="color: #0000FF">env</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_middleware:env</span></span>(),
- <span style="color: #0000FF">idle_timeout</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">timeout</span></span>(),
- <span style="color: #0000FF">inactivity_timeout</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">timeout</span></span>(),
- <span style="color: #0000FF">max_empty_lines</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">max_header_name_length</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">max_header_value_length</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">max_headers</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">max_keepalive</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">max_method_length</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">max_request_line_length</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">max_skip_body_length</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">middlewares</span> <span style="color: #990000">=&gt;</span> [<span style="font-weight: bold"><span style="color: #000000">module</span></span>()],
- <span style="color: #0000FF">request_timeout</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">timeout</span></span>(),
- <span style="color: #000080">shutdown</span><span style="color: #009900">_timeout</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">timeout</span></span>(),
- <span style="color: #0000FF">stream_handlers</span> <span style="color: #990000">=&gt;</span> [<span style="font-weight: bold"><span style="color: #000000">module</span></span>()]
-}</tt></pre></div></div>
-<div class="paragraph"><p>Configuration for the HTTP/1.1 protocol.</p></div>
-<div class="paragraph"><p>This configuration is passed to Cowboy when starting listeners
-using <code>cowboy:start_clear/3</code> or <code>cowboy:start_tls/3</code> functions.</p></div>
-<div class="paragraph"><p>It can be updated without restarting listeners using the
-Ranch functions <code>ranch:get_protocol_options/1</code> and
-<code>ranch:set_protocol_options/2</code>.</p></div>
-<div class="paragraph"><p>The default value is given next to the option name:</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-connection_type (supervisor)
-</dt>
-<dd>
-<p>
- Whether the connection process also acts as a supervisor.
-</p>
-</dd>
-<dt class="hdlist1">
-env (#{})
-</dt>
-<dd>
-<p>
- Middleware environment.
-</p>
-</dd>
-<dt class="hdlist1">
-idle_timeout (60000)
-</dt>
-<dd>
-<p>
- Time in ms with no data received before Cowboy closes the connection.
-</p>
-</dd>
-<dt class="hdlist1">
-inactivity_timeout (300000)
-</dt>
-<dd>
-<p>
- Time in ms with nothing received at all before Cowboy closes the connection.
-</p>
-</dd>
-<dt class="hdlist1">
-max_empty_lines (5)
-</dt>
-<dd>
-<p>
- Maximum number of empty lines before a request.
-</p>
-</dd>
-<dt class="hdlist1">
-max_header_name_length (64)
-</dt>
-<dd>
-<p>
- Maximum length of header names.
-</p>
-</dd>
-<dt class="hdlist1">
-max_header_value_length (4096)
-</dt>
-<dd>
-<p>
- Maximum length of header values.
-</p>
-</dd>
-<dt class="hdlist1">
-max_headers (100)
-</dt>
-<dd>
-<p>
- Maximum number of headers allowed per request.
-</p>
-</dd>
-<dt class="hdlist1">
-max_keepalive (100)
-</dt>
-<dd>
-<p>
- Maximum number of requests allowed per connection.
-</p>
-</dd>
-<dt class="hdlist1">
-max_method_length (32)
-</dt>
-<dd>
-<p>
- Maximum length of the method.
-</p>
-</dd>
-<dt class="hdlist1">
-max_request_line_length (8000)
-</dt>
-<dd>
-<p>
- Maximum length of the request line.
-</p>
-</dd>
-<dt class="hdlist1">
-max_skip_body_length (1000000)
-</dt>
-<dd>
-<p>
- Maximum length Cowboy is willing to skip when the user code did not read the body fully.
- When the remaining length is too large or unknown Cowboy will close the connection.
-</p>
-</dd>
-<dt class="hdlist1">
-middlewares ([cowboy_router, cowboy_handler])
-</dt>
-<dd>
-<p>
- Middlewares to run for every request.
-</p>
-</dd>
-<dt class="hdlist1">
-request_timeout (5000)
-</dt>
-<dd>
-<p>
- Time in ms with no requests before Cowboy closes the connection.
-</p>
-</dd>
-<dt class="hdlist1">
-shutdown_timeout (5000)
-</dt>
-<dd>
-<p>
- Time in ms Cowboy will wait for child processes to shut down before killing them.
-</p>
-</dd>
-<dt class="hdlist1">
-stream_handlers ([cowboy_stream_h])
-</dt>
-<dd>
-<p>
- Ordered list of stream handlers that will handle all stream events.
-</p>
-</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">opts</font></b>() <font color="#990000">::</font> #{
+ <font color="#0000FF">connection_type</font> <font color="#990000">=&gt;</font> <font color="#FF6600">worker</font> | <font color="#FF6600">supervisor</font>,
+ <font color="#0000FF">env</font> <font color="#990000">=&gt;</font> <b><font color="#000000">cowboy_middleware:env</font></b>(),
+ <font color="#0000FF">idle_timeout</font> <font color="#990000">=&gt;</font> <b><font color="#000000">timeout</font></b>(),
+ <font color="#0000FF">inactivity_timeout</font> <font color="#990000">=&gt;</font> <b><font color="#000000">timeout</font></b>(),
+ <font color="#0000FF">max_empty_lines</font> <font color="#990000">=&gt;</font> <b><font color="#000000">non_neg_integer</font></b>(),
+ <font color="#0000FF">max_header_name_length</font> <font color="#990000">=&gt;</font> <b><font color="#000000">non_neg_integer</font></b>(),
+ <font color="#0000FF">max_header_value_length</font> <font color="#990000">=&gt;</font> <b><font color="#000000">non_neg_integer</font></b>(),
+ <font color="#0000FF">max_headers</font> <font color="#990000">=&gt;</font> <b><font color="#000000">non_neg_integer</font></b>(),
+ <font color="#0000FF">max_keepalive</font> <font color="#990000">=&gt;</font> <b><font color="#000000">non_neg_integer</font></b>(),
+ <font color="#0000FF">max_method_length</font> <font color="#990000">=&gt;</font> <b><font color="#000000">non_neg_integer</font></b>(),
+ <font color="#0000FF">max_request_line_length</font> <font color="#990000">=&gt;</font> <b><font color="#000000">non_neg_integer</font></b>(),
+ <font color="#0000FF">max_skip_body_length</font> <font color="#990000">=&gt;</font> <b><font color="#000000">non_neg_integer</font></b>(),
+ <font color="#0000FF">middlewares</font> <font color="#990000">=&gt;</font> [<b><font color="#000000">module</font></b>()],
+ <font color="#0000FF">request_timeout</font> <font color="#990000">=&gt;</font> <b><font color="#000000">timeout</font></b>(),
+ <font color="#000080">shutdown</font><font color="#009900">_timeout</font> <font color="#990000">=&gt;</font> <b><font color="#000000">timeout</font></b>(),
+ <font color="#0000FF">stream_handlers</font> <font color="#990000">=&gt;</font> [<b><font color="#000000">module</font></b>()]
+}</tt></pre>
+</div></div>
+<p>Configuration for the HTTP/1.1 protocol.</p>
+<p>This configuration is passed to Cowboy when starting listeners using <code>cowboy:start_clear/3</code> or <code>cowboy:start_tls/3</code> functions.</p>
+<p>It can be updated without restarting listeners using the Ranch functions <code>ranch:get_protocol_options/1</code> and <code>ranch:set_protocol_options/2</code>.</p>
+<p>The default value is given next to the option name:</p>
+<dl><dt>connection_type (supervisor)</dt>
+<dd><p>Whether the connection process also acts as a supervisor.</p>
+</dd>
+<dt>env (#{})</dt>
+<dd><p>Middleware environment.</p>
+</dd>
+<dt>idle_timeout (60000)</dt>
+<dd><p>Time in ms with no data received before Cowboy closes the connection.</p>
+</dd>
+<dt>inactivity_timeout (300000)</dt>
+<dd><p>Time in ms with nothing received at all before Cowboy closes the connection.</p>
+</dd>
+<dt>max_empty_lines (5)</dt>
+<dd><p>Maximum number of empty lines before a request.</p>
+</dd>
+<dt>max_header_name_length (64)</dt>
+<dd><p>Maximum length of header names.</p>
+</dd>
+<dt>max_header_value_length (4096)</dt>
+<dd><p>Maximum length of header values.</p>
+</dd>
+<dt>max_headers (100)</dt>
+<dd><p>Maximum number of headers allowed per request.</p>
+</dd>
+<dt>max_keepalive (100)</dt>
+<dd><p>Maximum number of requests allowed per connection.</p>
+</dd>
+<dt>max_method_length (32)</dt>
+<dd><p>Maximum length of the method.</p>
+</dd>
+<dt>max_request_line_length (8000)</dt>
+<dd><p>Maximum length of the request line.</p>
+</dd>
+<dt>max_skip_body_length (1000000)</dt>
+<dd><p>Maximum length Cowboy is willing to skip when the user code did not read the body fully. When the remaining length is too large or unknown Cowboy will close the connection.</p>
+</dd>
+<dt>middlewares ([cowboy_router, cowboy_handler])</dt>
+<dd><p>Middlewares to run for every request.</p>
+</dd>
+<dt>request_timeout (5000)</dt>
+<dd><p>Time in ms with no requests before Cowboy closes the connection.</p>
+</dd>
+<dt>shutdown_timeout (5000)</dt>
+<dd><p>Time in ms Cowboy will wait for child processes to shut down before killing them.</p>
+</dd>
+<dt>stream_handlers ([cowboy_stream_h])</dt>
+<dd><p>Ordered list of stream handlers that will handle all stream events.</p>
+</dd>
+</dl>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.2</strong>: The <code>max_skip_body_length</code> option was added.
-</p>
+<ul><li><strong>2.2</strong>: The <code>max_skip_body_length</code> option was added.
</li>
-<li>
-<p>
-<strong>2.0</strong>: The <code>timeout</code> option was renamed <code>request_timeout</code>.
-</p>
+<li><strong>2.0</strong>: The <code>timeout</code> option was renamed <code>request_timeout</code>.
</li>
-<li>
-<p>
-<strong>2.0</strong>: The <code>idle_timeout</code>, <code>inactivity_timeout</code> and <code>shutdown_timeout</code> options were added.
-</p>
+<li><strong>2.0</strong>: The <code>idle_timeout</code>, <code>inactivity_timeout</code> and <code>shutdown_timeout</code> options were added.
</li>
-<li>
-<p>
-<strong>2.0</strong>: The <code>max_method_length</code> option was added.
-</p>
+<li><strong>2.0</strong>: The <code>max_method_length</code> option was added.
</li>
-<li>
-<p>
-<strong>2.0</strong>: The <code>max_request_line_length</code> default was increased from 4096 to 8000.
-</p>
+<li><strong>2.0</strong>: The <code>max_request_line_length</code> default was increased from 4096 to 8000.
</li>
-<li>
-<p>
-<strong>2.0</strong>: The <code>connection_type</code> option was added.
-</p>
+<li><strong>2.0</strong>: The <code>connection_type</code> option was added.
</li>
-<li>
-<p>
-<strong>2.0</strong>: The <code>env</code> option is now a map instead of a proplist.
-</p>
+<li><strong>2.0</strong>: The <code>env</code> option is now a map instead of a proplist.
</li>
-<li>
-<p>
-<strong>2.0</strong>: The <code>stream_handlers</code> option was added.
-</p>
+<li><strong>2.0</strong>: The <code>stream_handlers</code> option was added.
</li>
-<li>
-<p>
-<strong>2.0</strong>: The <code>compress</code> option was removed in favor of the <code>cowboy_compress_h</code> stream handler.
-</p>
+<li><strong>2.0</strong>: The <code>compress</code> option was removed in favor of the <code>cowboy_compress_h</code> stream handler.
</li>
-<li>
-<p>
-<strong>2.0</strong>: Options are now a map instead of a proplist.
-</p>
+<li><strong>2.0</strong>: Options are now a map instead of a proplist.
</li>
-<li>
-<p>
-<strong>2.0</strong>: Protocol introduced. Replaces <code>cowboy_protocol</code>.
-</p>
+<li><strong>2.0</strong>: Protocol introduced. Replaces <code>cowboy_protocol</code>.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="..">cowboy(7)</a>,
-<a href="../cowboy_http2">cowboy_http2(3)</a>,
-<a href="../cowboy_websocket">cowboy_websocket(3)</a></p></div>
-</div>
-</div>
+<p><a href="..">cowboy(7)</a>, <a href="../cowboy_http2">cowboy_http2(3)</a>, <a href="../cowboy_websocket">cowboy_websocket(3)</a></p>
+
diff --git a/docs/en/cowboy/2.3/manual/cowboy_http2/index.html b/docs/en/cowboy/2.3/manual/cowboy_http2/index.html
index 90954f46..dd72ba7f 100644
--- a/docs/en/cowboy/2.3/manual/cowboy_http2/index.html
+++ b/docs/en/cowboy/2.3/manual/cowboy_http2/index.html
@@ -62,123 +62,60 @@
<h1 class="lined-header"><span>cowboy_http2(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_http2 - HTTP/2</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_http2 - HTTP/2</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The module <code>cowboy_http2</code> implements HTTP/2
-as a Ranch protocol.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The module <code>cowboy_http2</code> implements HTTP/2 as a Ranch protocol.</p>
<h2 id="_options">Options</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<!-- @todo Might be worth moving cowboy_clear/tls/stream_h options-->
+<!-- to their respective manual, when they are added.-->
+<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">opts</span></span>() <span style="color: #990000">::</span> #{
- <span style="color: #0000FF">connection_type</span> <span style="color: #990000">=&gt;</span> <span style="color: #FF6600">worker</span> | <span style="color: #FF6600">supervisor</span>,
- <span style="color: #0000FF">env</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_middleware:env</span></span>(),
- <span style="color: #0000FF">inactivity_timeout</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">timeout</span></span>(),
- <span style="color: #0000FF">middlewares</span> <span style="color: #990000">=&gt;</span> [<span style="font-weight: bold"><span style="color: #000000">module</span></span>()],
- <span style="color: #0000FF">preface_timeout</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">timeout</span></span>(),
- <span style="color: #000080">shutdown</span><span style="color: #009900">_timeout</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">timeout</span></span>(),
- <span style="color: #0000FF">stream_handlers</span> <span style="color: #990000">=&gt;</span> [<span style="font-weight: bold"><span style="color: #000000">module</span></span>()]
-}</tt></pre></div></div>
-<div class="paragraph"><p>Configuration for the HTTP/2 protocol.</p></div>
-<div class="paragraph"><p>This configuration is passed to Cowboy when starting listeners
-using <code>cowboy:start_clear/3</code> or <code>cowboy:start_tls/3</code> functions.</p></div>
-<div class="paragraph"><p>It can be updated without restarting listeners using the
-Ranch functions <code>ranch:get_protocol_options/1</code> and
-<code>ranch:set_protocol_options/2</code>.</p></div>
-<div class="paragraph"><p>The default value is given next to the option name:</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-connection_type (supervisor)
-</dt>
-<dd>
-<p>
- Whether the connection process also acts as a supervisor.
-</p>
+<pre><tt><b><font color="#000000">opts</font></b>() <font color="#990000">::</font> #{
+ <font color="#0000FF">connection_type</font> <font color="#990000">=&gt;</font> <font color="#FF6600">worker</font> | <font color="#FF6600">supervisor</font>,
+ <font color="#0000FF">env</font> <font color="#990000">=&gt;</font> <b><font color="#000000">cowboy_middleware:env</font></b>(),
+ <font color="#0000FF">inactivity_timeout</font> <font color="#990000">=&gt;</font> <b><font color="#000000">timeout</font></b>(),
+ <font color="#0000FF">middlewares</font> <font color="#990000">=&gt;</font> [<b><font color="#000000">module</font></b>()],
+ <font color="#0000FF">preface_timeout</font> <font color="#990000">=&gt;</font> <b><font color="#000000">timeout</font></b>(),
+ <font color="#000080">shutdown</font><font color="#009900">_timeout</font> <font color="#990000">=&gt;</font> <b><font color="#000000">timeout</font></b>(),
+ <font color="#0000FF">stream_handlers</font> <font color="#990000">=&gt;</font> [<b><font color="#000000">module</font></b>()]
+}</tt></pre>
+</div></div>
+<p>Configuration for the HTTP/2 protocol.</p>
+<p>This configuration is passed to Cowboy when starting listeners using <code>cowboy:start_clear/3</code> or <code>cowboy:start_tls/3</code> functions.</p>
+<p>It can be updated without restarting listeners using the Ranch functions <code>ranch:get_protocol_options/1</code> and <code>ranch:set_protocol_options/2</code>.</p>
+<p>The default value is given next to the option name:</p>
+<dl><dt>connection_type (supervisor)</dt>
+<dd><p>Whether the connection process also acts as a supervisor.</p>
</dd>
-<dt class="hdlist1">
-env (#{})
-</dt>
-<dd>
-<p>
- Middleware environment.
-</p>
+<dt>env (#{})</dt>
+<dd><p>Middleware environment.</p>
</dd>
-<dt class="hdlist1">
-inactivity_timeout (300000)
-</dt>
-<dd>
-<p>
- Time in ms with nothing received at all before Cowboy closes the connection.
-</p>
+<dt>inactivity_timeout (300000)</dt>
+<dd><p>Time in ms with nothing received at all before Cowboy closes the connection.</p>
</dd>
-<dt class="hdlist1">
-middlewares ([cowboy_router, cowboy_handler])
-</dt>
-<dd>
-<p>
- Middlewares to run for every request.
-</p>
+<dt>middlewares ([cowboy_router, cowboy_handler])</dt>
+<dd><p>Middlewares to run for every request.</p>
</dd>
-<dt class="hdlist1">
-preface_timeout (5000)
-</dt>
-<dd>
-<p>
- Time in ms Cowboy is willing to wait for the connection preface.
-</p>
+<dt>preface_timeout (5000)</dt>
+<dd><p>Time in ms Cowboy is willing to wait for the connection preface.</p>
</dd>
-<dt class="hdlist1">
-shutdown_timeout (5000)
-</dt>
-<dd>
-<p>
- Time in ms Cowboy will wait for child processes to shut down before killing them.
-</p>
+<dt>shutdown_timeout (5000)</dt>
+<dd><p>Time in ms Cowboy will wait for child processes to shut down before killing them.</p>
</dd>
-<dt class="hdlist1">
-stream_handlers ([cowboy_stream_h])
-</dt>
-<dd>
-<p>
- Ordered list of stream handlers that will handle all stream events.
-</p>
+<dt>stream_handlers ([cowboy_stream_h])</dt>
+<dd><p>Ordered list of stream handlers that will handle all stream events.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Protocol introduced.
-</p>
+<ul><li><strong>2.0</strong>: Protocol introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="..">cowboy(7)</a>,
-<a href="../cowboy_http">cowboy_http(3)</a>,
-<a href="../cowboy_websocket">cowboy_websocket(3)</a></p></div>
-</div>
-</div>
+<p><a href="..">cowboy(7)</a>, <a href="../cowboy_http">cowboy_http(3)</a>, <a href="../cowboy_websocket">cowboy_websocket(3)</a></p>
+
diff --git a/docs/en/cowboy/2.3/manual/cowboy_loop/index.html b/docs/en/cowboy/2.3/manual/cowboy_loop/index.html
index 2b9b57ff..d4e2f459 100644
--- a/docs/en/cowboy/2.3/manual/cowboy_loop/index.html
+++ b/docs/en/cowboy/2.3/manual/cowboy_loop/index.html
@@ -62,120 +62,60 @@
<h1 class="lined-header"><span>cowboy_loop(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_loop - Loop handlers</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_loop - Loop handlers</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The module <code>cowboy_loop</code> defines a callback interface for
-long running HTTP connections.</p></div>
-<div class="paragraph"><p>You should switch to this behavior for long polling,
-server-sent events and similar long-running requests.</p></div>
-<div class="paragraph"><p>There are generally two usage patterns:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-Loop until receiving a specific message, then send
- a response and stop execution (for example long polling);
-</p>
+<p>The module <code>cowboy_loop</code> defines a callback interface for long running HTTP connections.</p>
+<p>You should switch to this behavior for long polling, server-sent events and similar long-running requests.</p>
+<p>There are generally two usage patterns:</p>
+<ul><li>Loop until receiving a specific message, then send a response and stop execution (for example long polling);
</li>
-<li>
-<p>
-Or initiate a response in <code>init/2</code> and stream the
- body in <code>info/3</code> as necessary (for example server-sent events).
-</p>
+<li>Or initiate a response in <code>init/2</code> and stream the body in <code>info/3</code> as necessary (for example server-sent events).
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_callbacks">Callbacks</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Loop handlers implement the following interface:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Loop handlers implement the following interface:</p>
+<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">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_loop</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
- | {<span style="color: #FF6600">cowboy_loop</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>, <span style="color: #FF6600">hibernate</span>}
-
-<span style="font-weight: bold"><span style="color: #000000">info</span></span>(<span style="color: #009900">Info</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>)
- <span style="color: #990000">-&gt;</span> {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
- | {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>, <span style="color: #FF6600">hibernate</span>}
- | {<span style="color: #FF6600">stop</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
-
-<span style="font-weight: bold"><span style="color: #000000">terminate</span></span>(<span style="color: #009900">Reason</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> <span style="color: #FF6600">ok</span> <span style="font-style: italic"><span style="color: #9A1900">%% optional</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">State</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()
-<span style="color: #009900">Info</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()
-<span style="color: #009900">Reason</span> <span style="color: #990000">::</span> <span style="color: #FF6600">stop</span>
- | {<span style="color: #FF6600">crash</span>, <span style="color: #FF6600">error</span> | <span style="font-weight: bold"><span style="color: #000080">exit</span></span> | <span style="font-weight: bold"><span style="color: #000080">throw</span></span>, <span style="font-weight: bold"><span style="color: #000000">any</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>The <code>init/2</code> callback is common to all handlers. To switch
-to the loop behavior, it must return <code>cowboy_loop</code> as the
-first element of the tuple.</p></div>
-<div class="paragraph"><p>The <code>info/3</code> callback will be called for every Erlang message
-received. It may choose to continue the receive loop or stop
-it.</p></div>
-<div class="paragraph"><p>The optional <code>terminate/3</code> callback will ultimately be called
-with the reason for the termination of the handler.
-Cowboy will terminate the process right after this. There
-is no need to perform any cleanup in this callback.</p></div>
-<div class="paragraph"><p>The following terminate reasons are defined for loop handlers:</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-stop
-</dt>
-<dd>
-<p>
- The handler requested to close the connection by returning
- a <code>stop</code> tuple.
-</p>
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>)
+ <font color="#990000">-&gt;</font> {<font color="#FF6600">cowboy_loop</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
+ | {<font color="#FF6600">cowboy_loop</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>, <font color="#FF6600">hibernate</font>}
+
+<b><font color="#000000">info</font></b>(<font color="#009900">Info</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>)
+ <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
+ | {<font color="#FF6600">ok</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>, <font color="#FF6600">hibernate</font>}
+ | {<font color="#FF6600">stop</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
+
+<b><font color="#000000">terminate</font></b>(<font color="#009900">Reason</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> <font color="#FF6600">ok</font> <i><font color="#9A1900">%% optional</font></i>
+
+<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()
+<font color="#009900">State</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()
+<font color="#009900">Info</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()
+<font color="#009900">Reason</font> <font color="#990000">::</font> <font color="#FF6600">stop</font>
+ | {<font color="#FF6600">crash</font>, <font color="#FF6600">error</font> | <b><font color="#000080">exit</font></b> | <b><font color="#000080">throw</font></b>, <b><font color="#000000">any</font></b>()}</tt></pre>
+</div></div>
+<p>The <code>init/2</code> callback is common to all handlers. To switch to the loop behavior, it must return <code>cowboy_loop</code> as the first element of the tuple.</p>
+<p>The <code>info/3</code> callback will be called for every Erlang message received. It may choose to continue the receive loop or stop it.</p>
+<p>The optional <code>terminate/3</code> callback will ultimately be called with the reason for the termination of the handler. Cowboy will terminate the process right after this. There is no need to perform any cleanup in this callback.</p>
+<p>The following terminate reasons are defined for loop handlers:</p>
+<dl><dt>stop</dt>
+<dd><p>The handler requested to close the connection by returning a <code>stop</code> tuple.</p>
</dd>
-<dt class="hdlist1">
-{crash, Class, Reason}
-</dt>
-<dd>
-<p>
- A crash occurred in the handler. <code>Class</code> and <code>Reason</code> can be
- used to obtain more information about the crash. The function
- <code>erlang:get_stacktrace/0</code> can also be called to obtain the
- stacktrace of the process when the crash occurred.
-</p>
+<dt>{crash, Class, Reason}</dt>
+<dd><p>A crash occurred in the handler. <code>Class</code> and <code>Reason</code> can be used to obtain more information about the crash. The function <code>erlang:get_stacktrace/0</code> can also be called to obtain the stacktrace of the process when the crash occurred.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Loop handlers no longer need to handle overflow/timeouts.
-</p>
+<ul><li><strong>2.0</strong>: Loop handlers no longer need to handle overflow/timeouts.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Behavior introduced.
-</p>
+<li><strong>1.0</strong>: Behavior introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="..">cowboy(7)</a>,
-<a href="../cowboy_handler">cowboy_handler(3)</a></p></div>
-</div>
-</div>
+<p><a href="..">cowboy(7)</a>, <a href="../cowboy_handler">cowboy_handler(3)</a></p>
+
diff --git a/docs/en/cowboy/2.3/manual/cowboy_middleware/index.html b/docs/en/cowboy/2.3/manual/cowboy_middleware/index.html
index 200af7f6..7dc3e2bf 100644
--- a/docs/en/cowboy/2.3/manual/cowboy_middleware/index.html
+++ b/docs/en/cowboy/2.3/manual/cowboy_middleware/index.html
@@ -62,115 +62,56 @@
<h1 class="lined-header"><span>cowboy_middleware(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_middleware - Middlewares</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_middleware - Middlewares</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The module <code>cowboy_middleware</code> defines a callback interface for
-Cowboy middlewares.</p></div>
-<div class="paragraph"><p>Middlewares process the request sequentially in the order they
-are configured.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The module <code>cowboy_middleware</code> defines a callback interface for Cowboy middlewares.</p>
+<p>Middlewares process the request sequentially in the order they are configured.</p>
<h2 id="_callbacks">Callbacks</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Middlewares implement the following interface:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Middlewares implement the following interface:</p>
+<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">execute</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">Env</span>)
- <span style="color: #990000">-&gt;</span> {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">Env</span>}
- | {<span style="color: #FF6600">suspend</span>, <span style="font-weight: bold"><span style="color: #000000">module</span></span>(), <span style="font-weight: bold"><span style="color: #000080">atom</span></span>(), [<span style="font-weight: bold"><span style="color: #000000">any</span></span>()]}
- | {<span style="color: #FF6600">stop</span>, <span style="color: #009900">Req</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">Env</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_middleware:env</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>The <code>execute/2</code> is the only callback that needs to be
-implemented. It must execute the middleware and return
-with instructions for Cowboy.</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-ok
-</dt>
-<dd>
-<p>
-Cowboy should continue processing the request using the
-returned Req object and environment.
-</p>
+<pre><tt><b><font color="#000000">execute</font></b>(<font color="#009900">Req</font>, <font color="#009900">Env</font>)
+ <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <font color="#009900">Req</font>, <font color="#009900">Env</font>}
+ | {<font color="#FF6600">suspend</font>, <b><font color="#000000">module</font></b>(), <b><font color="#000080">atom</font></b>(), [<b><font color="#000000">any</font></b>()]}
+ | {<font color="#FF6600">stop</font>, <font color="#009900">Req</font>}
+
+<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()
+<font color="#009900">Env</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_middleware:env</font></b>()</tt></pre>
+</div></div>
+<p>The <code>execute/2</code> is the only callback that needs to be implemented. It must execute the middleware and return with instructions for Cowboy.</p>
+<dl><dt>ok</dt>
+<dd><p>Cowboy should continue processing the request using the returned Req object and environment.</p>
</dd>
-<dt class="hdlist1">
-suspend
-</dt>
-<dd>
-<p>
-Cowboy will hibernate the process. When resuming, Cowboy
-will apply the returned module, function and arguments.
-</p>
+<dt>suspend</dt>
+<dd><p>Cowboy will hibernate the process. When resuming, Cowboy will apply the returned module, function and arguments.</p>
</dd>
-<dt class="hdlist1">
-stop
-</dt>
-<dd>
-<p>
-Cowboy will stop middleware execution. No other middleware
-will be executed. This effectively ends the processing of
-the request.
-</p>
+<dt>stop</dt>
+<dd><p>Cowboy will stop middleware execution. No other middleware will be executed. This effectively ends the processing of the request.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_types">Types</h2>
-<div class="sectionbody">
-<div class="sect2">
<h3 id="_env">env()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">env</span></span>() <span style="color: #990000">::</span> #{<span style="font-weight: bold"><span style="color: #000080">atom</span></span>() <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>Middleware environment.</p></div>
-<div class="paragraph"><p>A new environment is created for every request. The initial
-environment contained the user configured environment values
-(like <code>dispatch</code> for example) plus the <code>listener</code> value which
-contains the name of the listener for this connection.</p></div>
-<div class="paragraph"><p>Middlewares may modify the environment as necessary.</p></div>
-</div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">env</font></b>() <font color="#990000">::</font> #{<b><font color="#000080">atom</font></b>() <font color="#990000">=&gt;</font> <b><font color="#000000">any</font></b>()}</tt></pre>
+</div></div>
+<p>Middleware environment.</p>
+<p>A new environment is created for every request. The initial environment contained the user configured environment values (like <code>dispatch</code> for example) plus the <code>listener</code> value which contains the name of the listener for this connection.</p>
+<p>Middlewares may modify the environment as necessary.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: The <code>env</code> type is now a map instead of a proplist.
-</p>
+<ul><li><strong>2.0</strong>: The <code>env</code> type is now a map instead of a proplist.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Behavior introduced.
-</p>
+<li><strong>1.0</strong>: Behavior introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="..">cowboy(7)</a></p></div>
-</div>
-</div>
+<p><a href="..">cowboy(7)</a></p>
+
diff --git a/docs/en/cowboy/2.3/manual/cowboy_req.binding/index.html b/docs/en/cowboy/2.3/manual/cowboy_req.binding/index.html
index 16e29645..46822b72 100644
--- a/docs/en/cowboy/2.3/manual/cowboy_req.binding/index.html
+++ b/docs/en/cowboy/2.3/manual/cowboy_req.binding/index.html
@@ -62,116 +62,60 @@
<h1 class="lined-header"><span>cowboy_req:binding(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:binding - Access a value bound from the route</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:binding - Access a value bound from the route</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">binding</span></span>(<span style="color: #009900">Name</span>, <span style="color: #009900">Req</span>) <span style="color: #990000">-&gt;</span> <span style="font-weight: bold"><span style="color: #000000">binding</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">binding</span></span>(<span style="color: #009900">Name</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: #000000">any</span></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">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">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>Return the value for the given binding.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">binding</font></b>(<font color="#009900">Name</font>, <font color="#009900">Req</font>) <font color="#990000">-&gt;</font> <b><font color="#000000">binding</font></b>(<font color="#009900">Name</font>, <font color="#009900">Req</font>, <font color="#000080">undefined</font>)
+<b><font color="#000000">binding</font></b>(<font color="#009900">Name</font>, <font color="#009900">Req</font>, <font color="#009900">Default</font>) <font color="#990000">-&gt;</font> <b><font color="#000000">any</font></b>() | <font color="#009900">Default</font>
+
+<font color="#009900">Name</font> <font color="#990000">::</font> <b><font color="#000080">atom</font></b>()
+<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()</tt></pre>
+</div></div>
+<p>Return the value for the given binding.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Name
-</dt>
-<dd>
-<p>
-Desired binding name as an atom.
-</p>
+<dl><dt>Name</dt>
+<dd><p>Desired binding name as an atom.</p>
</dd>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-<dt class="hdlist1">
-Default
-</dt>
-<dd>
-<p>
-Default value returned when the binding is missing.
-</p>
+<dt>Default</dt>
+<dd><p>Default value returned when the binding is missing.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>By default the value is a case sensitive binary string, however
-constraints may change the type of this value (for example
-automatically converting numbers to integer).</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>By default the value is a case sensitive binary string, however constraints may change the type of this value (for example automatically converting numbers to integer).</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Only the value is returned, it is no longer wrapped in a tuple.
-</p>
+<ul><li><strong>2.0</strong>: Only the value is returned, it is no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Get the username from the path</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Get the username from the 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="font-style: italic"><span style="color: #9A1900">%% Route is "/users/:user"</span></span>
-<span style="color: #009900">Username</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:binding</span></span>(<span style="color: #FF6600">user</span>, <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Get the branch name, with a default</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><i><font color="#9A1900">%% Route is "/users/:user"</font></i>
+<font color="#009900">Username</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:binding</font></b>(<font color="#FF6600">user</font>, <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Get the branch name, with a default</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">%% Route is "/log[/:branch]"</span></span>
-<span style="color: #009900">Branch</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:binding</span></span>(<span style="color: #FF6600">branch</span>, <span style="color: #009900">Req</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"master"</span><span style="color: #990000">&gt;&gt;</span>)</tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><i><font color="#9A1900">%% Route is "/log[/:branch]"</font></i>
+<font color="#009900">Branch</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:binding</font></b>(<font color="#FF6600">branch</font>, <font color="#009900">Req</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"master"</font><font color="#990000">&gt;&gt;</font>)</tt></pre>
+</div></div>
<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.bindings">cowboy_req:bindings(3)</a>,
-<a href="../cowboy_req.host_info">cowboy_req:host_info(3)</a>,
-<a href="../cowboy_req.path_info">cowboy_req:path_info(3)</a>,
-<a href="../cowboy_router">cowboy_router(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.bindings">cowboy_req:bindings(3)</a>, <a href="../cowboy_req.host_info">cowboy_req:host_info(3)</a>, <a href="../cowboy_req.path_info">cowboy_req:path_info(3)</a>, <a href="../cowboy_router">cowboy_router(3)</a></p>
+
diff --git a/docs/en/cowboy/2.3/manual/cowboy_req.bindings/index.html b/docs/en/cowboy/2.3/manual/cowboy_req.bindings/index.html
index 8bbcd4aa..0054626b 100644
--- a/docs/en/cowboy/2.3/manual/cowboy_req.bindings/index.html
+++ b/docs/en/cowboy/2.3/manual/cowboy_req.bindings/index.html
@@ -62,86 +62,40 @@
<h1 class="lined-header"><span>cowboy_req:bindings(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:bindings - Access all values bound from the route</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:bindings - Access all values bound from the route</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">bindings</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_router:bindings</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Return a map containing all bindings.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">bindings</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <b><font color="#000000">cowboy_router:bindings</font></b>()</tt></pre>
+</div></div>
+<p>Return a map containing all bindings.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>By default values are case sensitive binary strings, however
-constraints may change the type of this value (for example
-automatically converting numbers to integer).</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>By default values are case sensitive binary strings, however constraints may change the type of this value (for example automatically converting numbers to integer).</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Only the values are returned, they are no longer wrapped in a tuple.
-</p>
+<ul><li><strong>2.0</strong>: Only the values are returned, they are no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Get all bindings</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Get all bindings</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">Bindings</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:bindings</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Bindings</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:bindings</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.host_info">cowboy_req:host_info(3)</a>,
-<a href="../cowboy_req.path_info">cowboy_req:path_info(3)</a>,
-<a href="../cowboy_router">cowboy_router(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.binding">cowboy_req:binding(3)</a>, <a href="../cowboy_req.host_info">cowboy_req:host_info(3)</a>, <a href="../cowboy_req.path_info">cowboy_req:path_info(3)</a>, <a href="../cowboy_router">cowboy_router(3)</a></p>
+
diff --git a/docs/en/cowboy/2.3/manual/cowboy_req.body_length/index.html b/docs/en/cowboy/2.3/manual/cowboy_req.body_length/index.html
index 262456a0..9818d81e 100644
--- a/docs/en/cowboy/2.3/manual/cowboy_req.body_length/index.html
+++ b/docs/en/cowboy/2.3/manual/cowboy_req.body_length/index.html
@@ -62,89 +62,41 @@
<h1 class="lined-header"><span>cowboy_req:body_length(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:body_length - Body length</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:body_length - Body length</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">body_length</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: #000080">undefined</span> | <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Return the length of the request body.</p></div>
-<div class="paragraph"><p>The length is not always known before reading the body.
-In those cases Cowboy will return <code>undefined</code>. The body
-length is available after the body has been fully read.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">body_length</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <font color="#000080">undefined</font> | <b><font color="#000000">non_neg_integer</font></b>()</tt></pre>
+</div></div>
+<p>Return the length of the request body.</p>
+<p>The length is not always known before reading the body. In those cases Cowboy will return <code>undefined</code>. The body length is available after the body has been fully read.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The length of the request body, or <code>undefined</code> if it is
-not known.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The length of the request body, or <code>undefined</code> if it is not known.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Only the length is returned, it is no longer wrapped in a tuple.
-</p>
+<ul><li><strong>2.0</strong>: Only the length is returned, it is no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Get the body length</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Get the body length</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:body_length</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Length</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:body_length</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.has_body">cowboy_req:has_body(3)</a>,
-<a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a>,
-<a href="../cowboy_req.read_urlencoded_body">cowboy_req:read_urlencoded_body(3)</a>,
-<a href="../cowboy_req.read_part">cowboy_req:read_part(3)</a>,
-<a href="../cowboy_req.read_part_body">cowboy_req:read_part_body(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.has_body">cowboy_req:has_body(3)</a>, <a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a>, <a href="../cowboy_req.read_urlencoded_body">cowboy_req:read_urlencoded_body(3)</a>, <a href="../cowboy_req.read_part">cowboy_req:read_part(3)</a>, <a href="../cowboy_req.read_part_body">cowboy_req:read_part_body(3)</a></p>
+
diff --git a/docs/en/cowboy/2.3/manual/cowboy_req.cert/index.html b/docs/en/cowboy/2.3/manual/cowboy_req.cert/index.html
index e6cc2839..699bd3fe 100644
--- a/docs/en/cowboy/2.3/manual/cowboy_req.cert/index.html
+++ b/docs/en/cowboy/2.3/manual/cowboy_req.cert/index.html
@@ -62,104 +62,60 @@
<h1 class="lined-header"><span>cowboy_req:cert(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:cert - Client TLS certificate</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:cert - Client TLS certificate</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">cert</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: #000080">binary</span></span>() | <span style="color: #000080">undefined</span></tt></pre></div></div>
-<div class="paragraph"><p>Return the peer&#8217;s TLS certificate.</p></div>
-<div class="paragraph"><p>Using the default configuration this function will always return
-<code>undefined</code>. You need to explicitly configure Cowboy to request
-the client certificate. To do this you need to set the <code>verify</code>
-transport option to <code>verify_peer</code>:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">cert</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <b><font color="#000080">binary</font></b>() | <font color="#000080">undefined</font></tt></pre>
+</div></div>
+<p>Return the peer&apos;s TLS certificate.</p>
+<p>Using the default configuration this function will always return <code>undefined</code>. You need to explicitly configure Cowboy to request the client certificate. To do this you need to set the <code>verify</code> transport option to <code>verify_peer</code>:</p>
+<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">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:start_tls</span></span>(<span style="color: #FF6600">example</span>, [
- {<span style="color: #FF6600">port</span>, <span style="color: #993399">8443</span>},
- {<span style="color: #FF6600">cert</span>, <span style="color: #FF0000">"path/to/cert.pem"</span>},
- {<span style="color: #FF6600">verify</span>, <span style="color: #FF6600">verify_peer</span>}
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy:start_tls</font></b>(<font color="#FF6600">example</font>, [
+ {<font color="#FF6600">port</font>, <font color="#993399">8443</font>},
+ {<font color="#FF6600">cert</font>, <font color="#FF0000">"path/to/cert.pem"</font>},
+ {<font color="#FF6600">verify</font>, <font color="#FF6600">verify_peer</font>}
], #{
- <span style="color: #0000FF">env</span> <span style="color: #990000">=&gt;</span> #{<span style="color: #0000FF">dispatch</span> <span style="color: #990000">=&gt;</span> <span style="color: #009900">Dispatch</span>}
-})<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>You may also want to customize the <code>verify_fun</code> function. Please
-consult the <code>ssl</code> application&#8217;s manual for more details.</p></div>
-<div class="paragraph"><p>TCP connections do not allow a certificate and this function
-will therefore always return <code>undefined</code>.</p></div>
-<div class="paragraph"><p>The certificate can also be obtained using pattern matching:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+ <font color="#0000FF">env</font> <font color="#990000">=&gt;</font> #{<font color="#0000FF">dispatch</font> <font color="#990000">=&gt;</font> <font color="#009900">Dispatch</font>}
+})<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>You may also want to customize the <code>verify_fun</code> function. Please consult the <code>ssl</code> application&apos;s manual for more details.</p>
+<p>TCP connections do not allow a certificate and this function will therefore always return <code>undefined</code>.</p>
+<p>The certificate can also be obtained using pattern matching:</p>
+<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">cert</span> <span style="color: #990000">:=</span> <span style="color: #009900">Cert</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">
+<pre><tt>#{<font color="#FF6600">cert</font> <font color="#990000">:=</font> <font color="#009900">Cert</font>} <font color="#990000">=</font> <font color="#009900">Req</font><font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The client TLS certificate.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The client TLS certificate.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.1</strong>: Function introduced.
-</p>
+<ul><li><strong>2.1</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Get the client TLS certificate.</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Get the client TLS certificate.</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">Cert</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:cert</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Cert</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:cert</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.peer">cowboy_req:peer(3)</a>,
-<a href="../cowboy_req.sock">cowboy_req:sock(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.peer">cowboy_req:peer(3)</a>, <a href="../cowboy_req.sock">cowboy_req:sock(3)</a></p>
+
diff --git a/docs/en/cowboy/2.3/manual/cowboy_req.delete_resp_header/index.html b/docs/en/cowboy/2.3/manual/cowboy_req.delete_resp_header/index.html
index 64cd7b63..3fbe5288 100644
--- a/docs/en/cowboy/2.3/manual/cowboy_req.delete_resp_header/index.html
+++ b/docs/en/cowboy/2.3/manual/cowboy_req.delete_resp_header/index.html
@@ -62,95 +62,45 @@
<h1 class="lined-header"><span>cowboy_req:delete_resp_header(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:delete_resp_header - Delete a response header</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:delete_resp_header - Delete a response header</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">delete_resp_header</span></span>(<span style="color: #009900">Name</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">Req</span>
+<pre><tt><b><font color="#000000">delete_resp_header</font></b>(<font color="#009900">Name</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <font color="#009900">Req</font>
-<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="font-style: italic"><span style="color: #9A1900">%% lowercase; case insensitive</span></span></tt></pre></div></div>
-<div class="paragraph"><p>Delete the given response 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>
-</div>
-<div class="sect1">
+<font color="#009900">Name</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% lowercase; case insensitive</font></i></tt></pre>
+</div></div>
+<p>Delete the given response header.</p>
+<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>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Name
-</dt>
-<dd>
-<p>
-Header name as a lowercase binary string.
-</p>
+<dl><dt>Name</dt>
+<dd><p>Header name as a lowercase binary string.</p>
</dd>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A new Req object is returned.</p></div>
-<div class="paragraph"><p>The returned Req object must be used from that point onward,
-otherwise the header will still be sent in the response.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>A new Req object is returned.</p>
+<p>The returned Req object must be used from that point onward, otherwise the header will still be sent in the response.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<ul><li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Remove the content-type header from the response</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Remove the content-type header from the response</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: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:delete_resp_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req0</span>),</tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:delete_resp_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req0</font>),</tt></pre>
+</div></div>
<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.set_resp_header">cowboy_req:set_resp_header(3)</a>,
-<a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a>,
-<a href="../cowboy_req.has_resp_header">cowboy_req:has_resp_header(3)</a>,
-<a href="../cowboy_req.resp_header">cowboy_req:resp_header(3)</a>,
-<a href="../cowboy_req.resp_headers">cowboy_req:resp_headers(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a>, <a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a>, <a href="../cowboy_req.has_resp_header">cowboy_req:has_resp_header(3)</a>, <a href="../cowboy_req.resp_header">cowboy_req:resp_header(3)</a>, <a href="../cowboy_req.resp_headers">cowboy_req:resp_headers(3)</a></p>
+
diff --git a/docs/en/cowboy/2.3/manual/cowboy_req.has_body/index.html b/docs/en/cowboy/2.3/manual/cowboy_req.has_body/index.html
index 1de52c2a..de71a7c7 100644
--- a/docs/en/cowboy/2.3/manual/cowboy_req.has_body/index.html
+++ b/docs/en/cowboy/2.3/manual/cowboy_req.has_body/index.html
@@ -62,80 +62,38 @@
<h1 class="lined-header"><span>cowboy_req:has_body(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:has_body - Is there a request body?</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:has_body - Is there a request body?</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">has_body</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">boolean</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Return whether the request has a body.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">has_body</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <b><font color="#000000">boolean</font></b>()</tt></pre>
+</div></div>
+<p>Return whether the request has a body.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A boolean indicating whether the request has a body.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>A boolean indicating whether the request has a body.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<ul><li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Ensure the request has a body</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Ensure the request has a body</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: #000080">true</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:has_body</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#000080">true</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:has_body</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.body_length">cowboy_req:body_length(3)</a>,
-<a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a>,
-<a href="../cowboy_req.read_urlencoded_body">cowboy_req:read_urlencoded_body(3)</a>,
-<a href="../cowboy_req.read_part">cowboy_req:read_part(3)</a>,
-<a href="../cowboy_req.read_part_body">cowboy_req:read_part_body(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.body_length">cowboy_req:body_length(3)</a>, <a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a>, <a href="../cowboy_req.read_urlencoded_body">cowboy_req:read_urlencoded_body(3)</a>, <a href="../cowboy_req.read_part">cowboy_req:read_part(3)</a>, <a href="../cowboy_req.read_part_body">cowboy_req:read_part_body(3)</a></p>
+
diff --git a/docs/en/cowboy/2.3/manual/cowboy_req.has_resp_body/index.html b/docs/en/cowboy/2.3/manual/cowboy_req.has_resp_body/index.html
index 2426ed09..914ca182 100644
--- a/docs/en/cowboy/2.3/manual/cowboy_req.has_resp_body/index.html
+++ b/docs/en/cowboy/2.3/manual/cowboy_req.has_resp_body/index.html
@@ -62,82 +62,43 @@
<h1 class="lined-header"><span>cowboy_req:has_resp_body(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:has_resp_body - Is there a response body?</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:has_resp_body - Is there a response body?</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">has_resp_body</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">boolean</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Return whether a response body has been set.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">has_resp_body</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <b><font color="#000000">boolean</font></b>()</tt></pre>
+</div></div>
+<p>Return whether a response body has been set.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A boolean indicating whether a response body has been set.</p></div>
-<div class="paragraph"><p>This function will return <code>false</code> when an empty response
-body has been set.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>A boolean indicating whether a response body has been set.</p>
+<p>This function will return <code>false</code> when an empty response body has been set.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<ul><li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Check whether a body has been set</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Check whether a body has been set</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: #000080">false</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:has_resp_body</span></span>(<span style="color: #009900">Req0</span>),
-<span style="color: #009900">Req1</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_body</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Hello!"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req0</span>),
-<span style="color: #000080">true</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:has_resp_body</span></span>(<span style="color: #009900">Req1</span>),
-<span style="color: #009900">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_body</span></span>(<span style="color: #990000">&lt;&lt;&gt;&gt;</span>, <span style="color: #009900">Req1</span>),
-<span style="color: #000080">false</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:has_resp_body</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#000080">false</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:has_resp_body</font></b>(<font color="#009900">Req0</font>),
+<font color="#009900">Req1</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_body</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"Hello!"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req0</font>),
+<font color="#000080">true</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:has_resp_body</font></b>(<font color="#009900">Req1</font>),
+<font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_body</font></b>(<font color="#990000">&lt;&lt;&gt;&gt;</font>, <font color="#009900">Req1</font>),
+<font color="#000080">false</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:has_resp_body</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.set_resp_body">cowboy_req:set_resp_body(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.set_resp_body">cowboy_req:set_resp_body(3)</a></p>
+
diff --git a/docs/en/cowboy/2.3/manual/cowboy_req.has_resp_header/index.html b/docs/en/cowboy/2.3/manual/cowboy_req.has_resp_header/index.html
index 769cd656..fdd8112d 100644
--- a/docs/en/cowboy/2.3/manual/cowboy_req.has_resp_header/index.html
+++ b/docs/en/cowboy/2.3/manual/cowboy_req.has_resp_header/index.html
@@ -62,95 +62,46 @@
<h1 class="lined-header"><span>cowboy_req:has_resp_header(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:has_resp_header - Is the given response header set?</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:has_resp_header - Is the given response header set?</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">has_resp_header</span></span>(<span style="color: #009900">Name</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">boolean</span></span>()
+<pre><tt><b><font color="#000000">has_resp_header</font></b>(<font color="#009900">Name</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <b><font color="#000000">boolean</font></b>()
-<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="font-style: italic"><span style="color: #9A1900">%% lowercase; case insensitive</span></span></tt></pre></div></div>
-<div class="paragraph"><p>Return whether the given response header has been set.</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>
-</div>
-<div class="sect1">
+<font color="#009900">Name</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% lowercase; case insensitive</font></i></tt></pre>
+</div></div>
+<p>Return whether the given response header has been set.</p>
+<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>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Name
-</dt>
-<dd>
-<p>
-Header name as a lowercase binary string.
-</p>
+<dl><dt>Name</dt>
+<dd><p>Header name as a lowercase binary string.</p>
</dd>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A boolean indicating whether the given response header has been set.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>A boolean indicating whether the given response header has been set.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<ul><li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Check whether the content-type header has been set</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Check whether the content-type header has been set</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: #000080">false</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:has_resp_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req0</span>),
-<span style="color: #009900">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/html"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req0</span>),
-<span style="color: #000080">true</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:has_resp_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#000080">false</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:has_resp_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req0</font>),
+<font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/html"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req0</font>),
+<font color="#000080">true</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:has_resp_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.set_resp_header">cowboy_req:set_resp_header(3)</a>,
-<a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a>,
-<a href="../cowboy_req.resp_header">cowboy_req:resp_header(3)</a>,
-<a href="../cowboy_req.resp_headers">cowboy_req:resp_headers(3)</a>,
-<a href="../cowboy_req.delete_resp_header">cowboy_req:delete_resp_header(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a>, <a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a>, <a href="../cowboy_req.resp_header">cowboy_req:resp_header(3)</a>, <a href="../cowboy_req.resp_headers">cowboy_req:resp_headers(3)</a>, <a href="../cowboy_req.delete_resp_header">cowboy_req:delete_resp_header(3)</a></p>
+
diff --git a/docs/en/cowboy/2.3/manual/cowboy_req.header/index.html b/docs/en/cowboy/2.3/manual/cowboy_req.header/index.html
index 37651c85..b7c45c53 100644
--- a/docs/en/cowboy/2.3/manual/cowboy_req.header/index.html
+++ b/docs/en/cowboy/2.3/manual/cowboy_req.header/index.html
@@ -62,122 +62,67 @@
<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">
+<p>cowboy_req:header - HTTP header</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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: #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: #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">Name</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: #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">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>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
+<pre><tt><b><font color="#000000">header</font></b>(<font color="#009900">Name</font>, <font color="#009900">Req</font>) <font color="#990000">-&gt;</font> <b><font color="#000000">header</font></b>(<font color="#009900">Name</font>, <font color="#009900">Req</font>, <font color="#000080">undefined</font>)
+<b><font color="#000000">header</font></b>(<font color="#009900">Name</font>, <font color="#009900">Req</font>, <font color="#009900">Default</font>) <font color="#990000">-&gt;</font> <b><font color="#000080">binary</font></b>() | <font color="#009900">Default</font>
+
+<font color="#009900">Name</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% lowercase; case insensitive</font></i>
+<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()</tt></pre>
+</div></div>
+<p>Return the value for the given HTTP header.</p>
+<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>
+<p>Headers can also be obtained using pattern matching:</p>
+<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">
+<pre><tt>#{<font color="#FF6600">headers</font> <font color="#990000">:=</font> #{<font color="#009900">Name</font> <font color="#990000">:=</font> <font color="#009900">Value</font>}} <font color="#990000">=</font> <font color="#009900">Req</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Note that this snippet will crash if the header is missing.</p>
<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 lowercase binary string.
-</p>
+<dl><dt>Name</dt>
+<dd><p>Desired HTTP header name as a lowercase binary string.</p>
</dd>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dt>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>
+<dt>Default</dt>
+<dd><p>Default value returned when the header is missing.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<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">
+<p>The header value is returned as a binary string. When the header is missing, the default argument is returned.</p>
<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>
+<ul><li><strong>2.0</strong>: Only the header value is returned, it is no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<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
+<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
+<pre><tt><font color="#009900">Accept</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"accept"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>)<font color="#990000">.</font></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">
+<pre><tt><font color="#009900">Length</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-length"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"0"</font><font color="#990000">&gt;&gt;</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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>
+<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>
+
diff --git a/docs/en/cowboy/2.3/manual/cowboy_req.headers/index.html b/docs/en/cowboy/2.3/manual/cowboy_req.headers/index.html
index be20a74b..5b8af10f 100644
--- a/docs/en/cowboy/2.3/manual/cowboy_req.headers/index.html
+++ b/docs/en/cowboy/2.3/manual/cowboy_req.headers/index.html
@@ -62,90 +62,47 @@
<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">
+<p>cowboy_req:headers - HTTP headers</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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
+<pre><tt><b><font color="#000000">headers</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <b><font color="#000000">cowboy:http_headers</font></b>()</tt></pre>
+</div></div>
+<p>Return all request headers.</p>
+<p>Request headers can also be obtained using pattern matching:</p>
+<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">
+<pre><tt>#{<font color="#FF6600">headers</font> <font color="#990000">:=</font> <font color="#009900">Headers</font>} <font color="#990000">=</font> <font color="#009900">Req</font><font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<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">
+<p>Headers are returned as a map with keys being lowercase binary strings, and values as binary strings.</p>
<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>
+<ul><li><strong>2.0</strong>: Only the headers are returned, they are no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<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
+<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">
+<pre><tt><font color="#009900">Headers</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:headers</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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>
+<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>
+
diff --git a/docs/en/cowboy/2.3/manual/cowboy_req.host/index.html b/docs/en/cowboy/2.3/manual/cowboy_req.host/index.html
index 11f1f6c2..25e40330 100644
--- a/docs/en/cowboy/2.3/manual/cowboy_req.host/index.html
+++ b/docs/en/cowboy/2.3/manual/cowboy_req.host/index.html
@@ -62,91 +62,47 @@
<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">
+<p>cowboy_req:host - URI host name</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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
+<pre><tt><b><font color="#000000">host</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <font color="#009900">Host</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()</tt></pre>
+</div></div>
+<p>Return the host name of the effective request URI.</p>
+<p>The host name can also be obtained using pattern matching:</p>
+<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">
+<pre><tt>#{<font color="#FF6600">host</font> <font color="#990000">:=</font> <font color="#009900">Host</font>} <font color="#990000">=</font> <font color="#009900">Req</font><font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<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">
+<p>The host name is returned as a lowercase binary string. It is case insensitive.</p>
<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>
+<ul><li><strong>2.0</strong>: Only the host name is returned, it is no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<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
+<div class="listingblock"><div class="title">Get the effective request URI&apos;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">
+<pre><tt><font color="#009900">Host</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:host</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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>
+<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>
+
diff --git a/docs/en/cowboy/2.3/manual/cowboy_req.host_info/index.html b/docs/en/cowboy/2.3/manual/cowboy_req.host_info/index.html
index 17a45108..eb9336d0 100644
--- a/docs/en/cowboy/2.3/manual/cowboy_req.host_info/index.html
+++ b/docs/en/cowboy/2.3/manual/cowboy_req.host_info/index.html
@@ -62,87 +62,41 @@
<h1 class="lined-header"><span>cowboy_req:host_info(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:host_info - Access the route&#8217;s heading host segments</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:host_info - Access the route&apos;s heading host segments</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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_info</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_router:tokens</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Return the tokens for the heading host segments.</p></div>
-<div class="paragraph"><p>This is the part of the host name that was matched using
-the <code>...</code> notation.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">host_info</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <b><font color="#000000">cowboy_router:tokens</font></b>()</tt></pre>
+</div></div>
+<p>Return the tokens for the heading host segments.</p>
+<p>This is the part of the host name that was matched using the <code>...</code> notation.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The tokens are returned as a list of case insensitive
-binary strings.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The tokens are returned as a list of case insensitive binary strings.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Only the tokens are returned, they are no longer wrapped in a tuple.
-</p>
+<ul><li><strong>2.0</strong>: Only the tokens are returned, they are no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Get the host_info tokens</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Get the host_info tokens</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">HostInfo</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:host_info</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">HostInfo</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:host_info</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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>,
-<a href="../cowboy_router">cowboy_router(3)</a></p></div>
-</div>
-</div>
+<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>, <a href="../cowboy_router">cowboy_router(3)</a></p>
+
diff --git a/docs/en/cowboy/2.3/manual/cowboy_req.inform/index.html b/docs/en/cowboy/2.3/manual/cowboy_req.inform/index.html
index a94d8fe5..66a0f468 100644
--- a/docs/en/cowboy/2.3/manual/cowboy_req.inform/index.html
+++ b/docs/en/cowboy/2.3/manual/cowboy_req.inform/index.html
@@ -62,125 +62,66 @@
<h1 class="lined-header"><span>cowboy_req:inform(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:inform - Send an informational response</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:inform - Send an informational response</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">inform</span></span>(<span style="color: #009900">Status</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">inform</span></span>(<span style="color: #009900">StatusCode</span>, #{}, <span style="color: #009900">Req</span>)
-
-<span style="font-weight: bold"><span style="color: #000000">inform</span></span>(<span style="color: #009900">Status</span>, <span style="color: #009900">Headers</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: #FF6600">ok</span>
-
-<span style="color: #009900">Status</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:http_status</span></span>()
-<span style="color: #009900">Headers</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:http_headers</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Send an informational response.</p></div>
-<div class="paragraph"><p>Informational responses use a status code between 100 and 199.
-They cannot include a body. This function will not use any
-of the previously set headers. All headers to be sent must
-be given directly.</p></div>
-<div class="paragraph"><p>Any number of informational responses can be sent as long as
-they are sent before the proper response. Attempting to use
-this function after sending a normal response will result
-in an error.</p></div>
-<div class="paragraph"><p>The header names must be given as lowercase binary strings.
-While header names are case insensitive, Cowboy requires them
-to be given as lowercase to function properly.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">inform</font></b>(<font color="#009900">Status</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> <b><font color="#000000">inform</font></b>(<font color="#009900">StatusCode</font>, #{}, <font color="#009900">Req</font>)
+
+<b><font color="#000000">inform</font></b>(<font color="#009900">Status</font>, <font color="#009900">Headers</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> <font color="#FF6600">ok</font>
+
+<font color="#009900">Status</font> <font color="#990000">::</font> <b><font color="#000000">cowboy:http_status</font></b>()
+<font color="#009900">Headers</font> <font color="#990000">::</font> <b><font color="#000000">cowboy:http_headers</font></b>()</tt></pre>
+</div></div>
+<p>Send an informational response.</p>
+<p>Informational responses use a status code between 100 and 199. They cannot include a body. This function will not use any of the previously set headers. All headers to be sent must be given directly.</p>
+<p>Any number of informational responses can be sent as long as they are sent before the proper response. Attempting to use this function after sending a normal response will result in an error.</p>
+<p>The header names must be given as lowercase binary strings. While header names are case insensitive, Cowboy requires them to be given as lowercase to function properly.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Status
-</dt>
-<dd>
-<p>
-The status code for the response.
-</p>
+<dl><dt>Status</dt>
+<dd><p>The status code for the response.</p>
</dd>
-<dt class="hdlist1">
-Headers
-</dt>
-<dd>
-<p>
-The response headers.
-</p>
+<dt>Headers</dt>
+<dd><p>The response headers.</p>
</dd>
-</dl></div>
-<div class="paragraph"><p>Header names must be given as lowercase binary strings.</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+</dl>
+<p>Header names must be given as lowercase binary strings.</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The atom <code>ok</code> is always returned. It can be safely ignored.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The atom <code>ok</code> is always returned. It can be safely ignored.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.1</strong>: Function introduced.
-</p>
+<ul><li><strong>2.1</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Send an informational response</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Send an informational response</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: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:inform</span></span>(<span style="color: #993399">102</span>, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Send an informational response with headers</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:inform</font></b>(<font color="#993399">102</font>, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Send an informational response with 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">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:inform</span></span>(<span style="color: #993399">103</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"link"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"&lt;/style.css&gt;; rel=preload; as=style"</span><span style="color: #990000">&gt;&gt;</span>,
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"link"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"&lt;/script.js&gt;; rel=preload; as=script"</span><span style="color: #990000">&gt;&gt;</span>
-}, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:inform</font></b>(<font color="#993399">103</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"link"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"&lt;/style.css&gt;; rel=preload; as=style"</font><font color="#990000">&gt;&gt;</font>,
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"link"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"&lt;/script.js&gt;; rel=preload; as=script"</font><font color="#990000">&gt;&gt;</font>
+}, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.reply">cowboy_req:reply(3)</a>,
-<a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a>,
-<a href="../cowboy_req.push">cowboy_req:push(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.reply">cowboy_req:reply(3)</a>, <a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a>, <a href="../cowboy_req.push">cowboy_req:push(3)</a></p>
+
diff --git a/docs/en/cowboy/2.3/manual/cowboy_req.match_cookies/index.html b/docs/en/cowboy/2.3/manual/cowboy_req.match_cookies/index.html
index 251bd7e2..7403f023 100644
--- a/docs/en/cowboy/2.3/manual/cowboy_req.match_cookies/index.html
+++ b/docs/en/cowboy/2.3/manual/cowboy_req.match_cookies/index.html
@@ -62,123 +62,67 @@
<h1 class="lined-header"><span>cowboy_req:match_cookies(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:match_cookies - Match cookies against constraints</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:match_cookies - Match cookies against constraints</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">match_cookies</span></span>(<span style="color: #009900">Fields</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:fields</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: #000080">atom</span></span>() <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>Parse the cookies and match specific values against
-constraints.</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>
-<div class="sect1">
+<pre><tt><b><font color="#000000">match_cookies</font></b>(<font color="#009900">Fields</font> <font color="#990000">::</font> <b><font color="#000000">cowboy:fields</font></b>(), <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> #{<b><font color="#000080">atom</font></b>() <font color="#990000">=&gt;</font> <b><font color="#000000">any</font></b>()}</tt></pre>
+</div></div>
+<p>Parse the cookies and match specific values against constraints.</p>
+<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>
+<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>
+<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>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Fields
-</dt>
-<dd>
-<p>
-Cookies to retrieve.
-</p>
-<div class="paragraph"><p>See <a href="../cowboy">cowboy(3)</a> for a complete description.</p></div>
+<dl><dt>Fields</dt>
+<dd><p>Cookies to retrieve.</p>
+<p>See <a href="../cowboy">cowboy(3)</a> for a complete description.</p>
</dd>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Desired values are returned as a map. The key is the atom
-that was given in the list of fields, and the value is the
-optionally converted value after applying constraints.</p></div>
-<div class="paragraph"><p>The map contains the same keys that were given in the fields.</p></div>
-<div class="paragraph"><p>An exception is triggered when the match fails.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Desired values are returned as a map. The key is the atom that was given in the list of fields, and the value is the optionally converted value after applying constraints.</p>
+<p>The map contains the same keys that were given in the fields.</p>
+<p>An exception is triggered when the match fails.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced.
-</p>
+<ul><li><strong>2.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Match fields</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Match fields</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">%% ID and Lang are binaries.</span></span>
-#{<span style="color: #FF6600">id</span> <span style="color: #990000">:=</span> <span style="color: #009900">ID</span>, <span style="color: #FF6600">lang</span> <span style="color: #990000">:=</span> <span style="color: #009900">Lang</span>}
- <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:match_cookies</span></span>([<span style="color: #FF6600">id</span>, <span style="color: #FF6600">lang</span>], <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Match fields and apply constraints</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><i><font color="#9A1900">%% ID and Lang are binaries.</font></i>
+#{<font color="#FF6600">id</font> <font color="#990000">:=</font> <font color="#009900">ID</font>, <font color="#FF6600">lang</font> <font color="#990000">:=</font> <font color="#009900">Lang</font>}
+ <font color="#990000">=</font> <b><font color="#000000">cowboy_req:match_cookies</font></b>([<font color="#FF6600">id</font>, <font color="#FF6600">lang</font>], <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Match fields and apply constraints</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">%% ID is an integer and Lang a non-empty binary.</span></span>
-#{<span style="color: #FF6600">id</span> <span style="color: #990000">:=</span> <span style="color: #009900">ID</span>, <span style="color: #FF6600">lang</span> <span style="color: #990000">:=</span> <span style="color: #009900">Lang</span>}
- <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:match_cookies</span></span>([{<span style="color: #FF6600">id</span>, <span style="color: #FF6600">int</span>}, {<span style="color: #FF6600">lang</span>, <span style="color: #FF6600">nonempty</span>}], <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Match fields with default values</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><i><font color="#9A1900">%% ID is an integer and Lang a non-empty binary.</font></i>
+#{<font color="#FF6600">id</font> <font color="#990000">:=</font> <font color="#009900">ID</font>, <font color="#FF6600">lang</font> <font color="#990000">:=</font> <font color="#009900">Lang</font>}
+ <font color="#990000">=</font> <b><font color="#000000">cowboy_req:match_cookies</font></b>([{<font color="#FF6600">id</font>, <font color="#FF6600">int</font>}, {<font color="#FF6600">lang</font>, <font color="#FF6600">nonempty</font>}], <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Match fields with default values</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: #FF6600">lang</span> <span style="color: #990000">:=</span> <span style="color: #009900">Lang</span>}
- <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:match_cookies</span></span>([{<span style="color: #FF6600">lang</span>, [], <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"en-US"</span><span style="color: #990000">&gt;&gt;</span>}], <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>#{<font color="#FF6600">lang</font> <font color="#990000">:=</font> <font color="#009900">Lang</font>}
+ <font color="#990000">=</font> <b><font color="#000000">cowboy_req:match_cookies</font></b>([{<font color="#FF6600">lang</font>, [], <font color="#990000">&lt;&lt;</font><font color="#FF0000">"en-US"</font><font color="#990000">&gt;&gt;</font>}], <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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_cookies">cowboy_req:parse_cookies(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.parse_cookies">cowboy_req:parse_cookies(3)</a></p>
+
diff --git a/docs/en/cowboy/2.3/manual/cowboy_req.match_qs/index.html b/docs/en/cowboy/2.3/manual/cowboy_req.match_qs/index.html
index 14396da6..a5eaf848 100644
--- a/docs/en/cowboy/2.3/manual/cowboy_req.match_qs/index.html
+++ b/docs/en/cowboy/2.3/manual/cowboy_req.match_qs/index.html
@@ -62,123 +62,67 @@
<h1 class="lined-header"><span>cowboy_req:match_qs(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:match_qs - Match the query string against constraints</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:match_qs - Match the query string against constraints</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">match_qs</span></span>(<span style="color: #009900">Fields</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:fields</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: #000080">atom</span></span>() <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>Parse the query string and match specific values against
-constraints.</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>
-<div class="sect1">
+<pre><tt><b><font color="#000000">match_qs</font></b>(<font color="#009900">Fields</font> <font color="#990000">::</font> <b><font color="#000000">cowboy:fields</font></b>(), <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> #{<b><font color="#000080">atom</font></b>() <font color="#990000">=&gt;</font> <b><font color="#000000">any</font></b>()}</tt></pre>
+</div></div>
+<p>Parse the query string and match specific values against constraints.</p>
+<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>
+<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>
+<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>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Fields
-</dt>
-<dd>
-<p>
-Fields to retrieve from the query string.
-</p>
-<div class="paragraph"><p>See <a href="../cowboy">cowboy(3)</a> for a complete description.</p></div>
+<dl><dt>Fields</dt>
+<dd><p>Fields to retrieve from the query string.</p>
+<p>See <a href="../cowboy">cowboy(3)</a> for a complete description.</p>
</dd>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Desired values are returned as a map. The key is the atom
-that was given in the list of fields, and the value is the
-optionally converted value after applying constraints.</p></div>
-<div class="paragraph"><p>The map contains the same keys that were given in the fields.</p></div>
-<div class="paragraph"><p>An exception is triggered when the match fails.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Desired values are returned as a map. The key is the atom that was given in the list of fields, and the value is the optionally converted value after applying constraints.</p>
+<p>The map contains the same keys that were given in the fields.</p>
+<p>An exception is triggered when the match fails.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced.
-</p>
+<ul><li><strong>2.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Match fields</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Match fields</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">%% ID and Lang are binaries.</span></span>
-#{<span style="color: #FF6600">id</span> <span style="color: #990000">:=</span> <span style="color: #009900">ID</span>, <span style="color: #FF6600">lang</span> <span style="color: #990000">:=</span> <span style="color: #009900">Lang</span>}
- <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:match_qs</span></span>([<span style="color: #FF6600">id</span>, <span style="color: #FF6600">lang</span>], <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Match fields and apply constraints</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><i><font color="#9A1900">%% ID and Lang are binaries.</font></i>
+#{<font color="#FF6600">id</font> <font color="#990000">:=</font> <font color="#009900">ID</font>, <font color="#FF6600">lang</font> <font color="#990000">:=</font> <font color="#009900">Lang</font>}
+ <font color="#990000">=</font> <b><font color="#000000">cowboy_req:match_qs</font></b>([<font color="#FF6600">id</font>, <font color="#FF6600">lang</font>], <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Match fields and apply constraints</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">%% ID is an integer and Lang a non-empty binary.</span></span>
-#{<span style="color: #FF6600">id</span> <span style="color: #990000">:=</span> <span style="color: #009900">ID</span>, <span style="color: #FF6600">lang</span> <span style="color: #990000">:=</span> <span style="color: #009900">Lang</span>}
- <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:match_qs</span></span>([{<span style="color: #FF6600">id</span>, <span style="color: #FF6600">int</span>}, {<span style="color: #FF6600">lang</span>, <span style="color: #FF6600">nonempty</span>}], <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Match fields with default values</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><i><font color="#9A1900">%% ID is an integer and Lang a non-empty binary.</font></i>
+#{<font color="#FF6600">id</font> <font color="#990000">:=</font> <font color="#009900">ID</font>, <font color="#FF6600">lang</font> <font color="#990000">:=</font> <font color="#009900">Lang</font>}
+ <font color="#990000">=</font> <b><font color="#000000">cowboy_req:match_qs</font></b>([{<font color="#FF6600">id</font>, <font color="#FF6600">int</font>}, {<font color="#FF6600">lang</font>, <font color="#FF6600">nonempty</font>}], <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Match fields with default values</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: #FF6600">lang</span> <span style="color: #990000">:=</span> <span style="color: #009900">Lang</span>}
- <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:match_qs</span></span>([{<span style="color: #FF6600">lang</span>, [], <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"en-US"</span><span style="color: #990000">&gt;&gt;</span>}], <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>#{<font color="#FF6600">lang</font> <font color="#990000">:=</font> <font color="#009900">Lang</font>}
+ <font color="#990000">=</font> <b><font color="#000000">cowboy_req:match_qs</font></b>([{<font color="#FF6600">lang</font>, [], <font color="#990000">&lt;&lt;</font><font color="#FF0000">"en-US"</font><font color="#990000">&gt;&gt;</font>}], <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.qs">cowboy_req:qs(3)</a>,
-<a href="../cowboy_req.parse_qs">cowboy_req:parse_qs(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.qs">cowboy_req:qs(3)</a>, <a href="../cowboy_req.parse_qs">cowboy_req:parse_qs(3)</a></p>
+
diff --git a/docs/en/cowboy/2.3/manual/cowboy_req.method/index.html b/docs/en/cowboy/2.3/manual/cowboy_req.method/index.html
index 38140e1f..514abc5e 100644
--- a/docs/en/cowboy/2.3/manual/cowboy_req.method/index.html
+++ b/docs/en/cowboy/2.3/manual/cowboy_req.method/index.html
@@ -62,100 +62,58 @@
<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">
+<p>cowboy_req:method - HTTP method</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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
+<pre><tt><b><font color="#000000">method</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <font color="#009900">Method</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()</tt></pre>
+</div></div>
+<p>Return the request&apos;s HTTP method.</p>
+<p>The method can also be obtained using pattern matching:</p>
+<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">
+<pre><tt>#{<font color="#FF6600">method</font> <font color="#990000">:=</font> <font color="#009900">Method</font>} <font color="#990000">=</font> <font color="#009900">Req</font><font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<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">
+<p>The request&apos;s HTTP method is returned as a binary string. While methods are case sensitive, standard methods are always uppercase.</p>
<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>
+<ul><li><strong>2.0</strong>: Only the method is returned, it is no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<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
+<div class="listingblock"><div class="title">Ensure the request&apos;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
+<pre><tt><font color="#990000">&lt;&lt;</font><font color="#FF0000">"GET"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:method</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></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">
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">case</font></b> <b><font color="#000000">lists:member</font></b>(<b><font color="#000000">cowboy_req:method</font></b>(<font color="#009900">Req</font>), [<font color="#990000">&lt;&lt;</font><font color="#FF0000">"GET"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"POST"</font><font color="#990000">&gt;&gt;</font>]) <b><font color="#0000FF">of</font></b>
+ <font color="#000080">true</font> <font color="#990000">-&gt;</font> <b><font color="#000000">handle</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>);
+ <font color="#000080">false</font> <font color="#990000">-&gt;</font> <b><font color="#000000">method_not_allowed</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>)
+ <b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
<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>
+<p><a href="../cowboy_req">cowboy_req(3)</a></p>
+
diff --git a/docs/en/cowboy/2.3/manual/cowboy_req.parse_cookies/index.html b/docs/en/cowboy/2.3/manual/cowboy_req.parse_cookies/index.html
index 813c331f..855d20ad 100644
--- a/docs/en/cowboy/2.3/manual/cowboy_req.parse_cookies/index.html
+++ b/docs/en/cowboy/2.3/manual/cowboy_req.parse_cookies/index.html
@@ -62,91 +62,47 @@
<h1 class="lined-header"><span>cowboy_req:parse_cookies(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:parse_cookies - Parse cookie headers</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:parse_cookies - Parse cookie headers</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">parse_cookies</span></span>(<span style="color: #009900">Req</span>) <span style="color: #990000">-&gt;</span> [{<span style="color: #009900">Name</span>, <span style="color: #009900">Value</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="font-style: italic"><span style="color: #9A1900">%% case sensitive</span></span>
-<span style="color: #009900">Value</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></tt></pre></div></div>
-<div class="paragraph"><p>Parse cookie headers.</p></div>
-<div class="paragraph"><p>Alias for <a href="../cowboy_req.parse_header">cowboy_req:parse_header(<a href="#cookie">[cookie]</a>, Req)</a>.</p></div>
-<div class="paragraph"><p>When the cookie header is missing, <code>[]</code> is returned.</p></div>
-<div class="paragraph"><p>While an empty cookie header is not valid, some clients do
-send it. Cowboy will in this case also return <code>[]</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">parse_cookies</font></b>(<font color="#009900">Req</font>) <font color="#990000">-&gt;</font> [{<font color="#009900">Name</font>, <font color="#009900">Value</font>}]
+
+<font color="#009900">Name</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case sensitive</font></i>
+<font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case sensitive</font></i></tt></pre>
+</div></div>
+<p>Parse cookie headers.</p>
+<p>Alias for <a href="../cowboy_req.parse_header">cowboy_req:parse_header(&lt;&lt;&quot;cookie&quot;&gt;&gt;, Req)</a>.</p>
+<p>When the cookie header is missing, <code>[]</code> is returned.</p>
+<p>While an empty cookie header is not valid, some clients do send it. Cowboy will in this case also return <code>[]</code>.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The cookies are returned as a list of key/values. Keys and
-values are case sensitive binary strings.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The cookies are returned as a list of key/values. Keys and values are case sensitive binary strings.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Only the parsed header value is returned, it is no longer wrapped in a tuple.
-</p>
+<ul><li><strong>2.0</strong>: Only the parsed header value is returned, it is no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced. Replaces <code>cookie/2,3</code> and <code>cookies/1</code>.
-</p>
+<li><strong>2.0</strong>: Function introduced. Replaces <code>cookie/2,3</code> and <code>cookies/1</code>.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Look for a specific cookie</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Look for a specific cookie</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">Cookies</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:parse_cookies</span></span>(<span style="color: #009900">Req</span>),
-{<span style="color: #990000">_</span>, <span style="color: #009900">Token</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">lists:keyfind</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"token"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #993399">1</span>, <span style="color: #009900">Cookies</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Cookies</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:parse_cookies</font></b>(<font color="#009900">Req</font>),
+{<font color="#990000">_</font>, <font color="#009900">Token</font>} <font color="#990000">=</font> <b><font color="#000000">lists:keyfind</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"token"</font><font color="#990000">&gt;&gt;</font>, <font color="#993399">1</font>, <font color="#009900">Cookies</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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_header">cowboy_req:parse_header(3)</a>,
-<a href="../cowboy_req.match_cookies">cowboy_req:match_cookies(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.parse_header">cowboy_req:parse_header(3)</a>, <a href="../cowboy_req.match_cookies">cowboy_req:match_cookies(3)</a></p>
+
diff --git a/docs/en/cowboy/2.3/manual/cowboy_req.parse_header/index.html b/docs/en/cowboy/2.3/manual/cowboy_req.parse_header/index.html
index c199e91b..93cff336 100644
--- a/docs/en/cowboy/2.3/manual/cowboy_req.parse_header/index.html
+++ b/docs/en/cowboy/2.3/manual/cowboy_req.parse_header/index.html
@@ -62,283 +62,218 @@
<h1 class="lined-header"><span>cowboy_req:parse_header(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:parse_header - Parse the given HTTP header</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:parse_header - Parse the given HTTP header</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">parse_header</span></span>(<span style="color: #009900">Name</span>, <span style="color: #009900">Req</span>) <span style="color: #990000">-&gt;</span> <span style="color: #009900">ParsedValue</span> | <span style="color: #009900">Default</span>
-<span style="font-weight: bold"><span style="color: #000000">parse_header</span></span>(<span style="color: #009900">Name</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">Default</span>) <span style="color: #990000">-&gt;</span> <span style="color: #009900">ParsedValue</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">binary</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">ParsedValue</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">any</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>Parse 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>The type of the parsed value varies depending on
-the header. Similarly, the default value when calling
-<code>cowboy_req:parse_header/2</code> differs depending on the
-header.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">parse_header</font></b>(<font color="#009900">Name</font>, <font color="#009900">Req</font>) <font color="#990000">-&gt;</font> <font color="#009900">ParsedValue</font> | <font color="#009900">Default</font>
+<b><font color="#000000">parse_header</font></b>(<font color="#009900">Name</font>, <font color="#009900">Req</font>, <font color="#009900">Default</font>) <font color="#990000">-&gt;</font> <font color="#009900">ParsedValue</font> | <font color="#009900">Default</font>
+
+<font color="#009900">Name</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()
+<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()
+<font color="#009900">ParsedValue</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()</tt></pre>
+</div></div>
+<p>Parse the given HTTP header.</p>
+<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>
+<p>The type of the parsed value varies depending on the header. Similarly, the default value when calling <code>cowboy_req:parse_header/2</code> differs depending on the header.</p>
<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 lowercase binary string.
-</p>
+<dl><dt>Name</dt>
+<dd><p>Desired HTTP header name as a lowercase binary string.</p>
</dd>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dt>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>
+<dt>Default</dt>
+<dd><p>Default value returned when the header is missing.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The parsed header value varies depending on the header.
-When the header is missing, the default argument is returned.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The parsed header value varies depending on the header. When the header is missing, the default argument is returned.</p>
<h2 id="_headers">Headers</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The following snippets detail the types returned by the
-different headers. Unless mentioned otherwise, the
-default value when the header is missing will be <code>undefined</code>:</p></div>
-<div class="listingblock">
-<div class="title">accept</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The following snippets detail the types returned by the different headers. Unless mentioned otherwise, the default value when the header is missing will be <code>undefined</code>:</p>
+<div class="listingblock"><div class="title">accept</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">parse_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">-&gt;</span> [{{<span style="color: #009900">Type</span>, <span style="color: #009900">SubType</span>, <span style="color: #009900">Params</span>}, <span style="color: #009900">Quality</span>, <span style="color: #009900">AcceptExt</span>}]
-
-<span style="color: #009900">Type</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 insensitive</span></span>
-<span style="color: #009900">SubType</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 insensitive</span></span>
-<span style="color: #009900">Params</span> <span style="color: #990000">::</span> [{<span style="color: #009900">Key</span>, <span style="color: #009900">Value</span>}]
-<span style="color: #009900">Quality</span> <span style="color: #990000">::</span> <span style="color: #993399">0</span><span style="color: #990000">..</span><span style="color: #993399">1000</span>
-<span style="color: #009900">AcceptExt</span> <span style="color: #990000">::</span> [<span style="color: #009900">Key</span> | {<span style="color: #009900">Key</span>, <span style="color: #009900">Value</span>}]
-<span style="color: #009900">Key</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 insensitive</span></span>
-<span style="color: #009900">Value</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></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">accept-charset, accept-encoding and accept-language</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">parse_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"accept"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>)
+ <font color="#990000">-&gt;</font> [{{<font color="#009900">Type</font>, <font color="#009900">SubType</font>, <font color="#009900">Params</font>}, <font color="#009900">Quality</font>, <font color="#009900">AcceptExt</font>}]
+
+<font color="#009900">Type</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case insensitive</font></i>
+<font color="#009900">SubType</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case insensitive</font></i>
+<font color="#009900">Params</font> <font color="#990000">::</font> [{<font color="#009900">Key</font>, <font color="#009900">Value</font>}]
+<font color="#009900">Quality</font> <font color="#990000">::</font> <font color="#993399">0</font><font color="#990000">..</font><font color="#993399">1000</font>
+<font color="#009900">AcceptExt</font> <font color="#990000">::</font> [<font color="#009900">Key</font> | {<font color="#009900">Key</font>, <font color="#009900">Value</font>}]
+<font color="#009900">Key</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case insensitive</font></i>
+<font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case sensitive</font></i></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">accept-charset, accept-encoding and accept-language</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">parse_header</span></span>(<span style="color: #009900">Name</span>, <span style="color: #009900">Req</span>) <span style="color: #990000">-&gt;</span> [{<span style="color: #009900">Value</span>, <span style="color: #009900">Quality</span>}]
-
-<span style="color: #009900">Name</span> <span style="color: #990000">::</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"accept-charset"</span><span style="color: #990000">&gt;&gt;</span>
- | <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"accept-encoding"</span><span style="color: #990000">&gt;&gt;</span>
- | <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"accept-language"</span><span style="color: #990000">&gt;&gt;</span>
-<span style="color: #009900">Value</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 insensitive</span></span>
-<span style="color: #009900">Quality</span> <span style="color: #990000">::</span> <span style="color: #993399">0</span><span style="color: #990000">..</span><span style="color: #993399">1000</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">authorization</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">parse_header</font></b>(<font color="#009900">Name</font>, <font color="#009900">Req</font>) <font color="#990000">-&gt;</font> [{<font color="#009900">Value</font>, <font color="#009900">Quality</font>}]
+
+<font color="#009900">Name</font> <font color="#990000">::</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"accept-charset"</font><font color="#990000">&gt;&gt;</font>
+ | <font color="#990000">&lt;&lt;</font><font color="#FF0000">"accept-encoding"</font><font color="#990000">&gt;&gt;</font>
+ | <font color="#990000">&lt;&lt;</font><font color="#FF0000">"accept-language"</font><font color="#990000">&gt;&gt;</font>
+<font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case insensitive</font></i>
+<font color="#009900">Quality</font> <font color="#990000">::</font> <font color="#993399">0</font><font color="#990000">..</font><font color="#993399">1000</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">authorization</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">parse_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"authorization"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req</span>)
- <span style="color: #990000">-&gt;</span> {<span style="color: #FF6600">basic</span>, <span style="color: #009900">Username</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="color: #009900">Password</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()}
- | {<span style="color: #FF6600">bearer</span>, <span style="color: #009900">Token</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()}
- | {<span style="color: #FF6600">digest</span>, [{<span style="color: #009900">Key</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="color: #009900">Value</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()}]}</tt></pre></div></div>
-<div class="listingblock">
-<div class="title">content-length</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">parse_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"authorization"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>)
+ <font color="#990000">-&gt;</font> {<font color="#FF6600">basic</font>, <font color="#009900">Username</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">Password</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()}
+ | {<font color="#FF6600">bearer</font>, <font color="#009900">Token</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()}
+ | {<font color="#FF6600">digest</font>, [{<font color="#009900">Key</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()}]}</tt></pre>
+</div></div>
+<!-- @todo Currently also parses connection. Do we want this? Should it be documented? Use case?-->
+<div class="listingblock"><div class="title">content-length</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">parse_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">-&gt;</span> <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>When the content-length header is missing, <code>0</code> is returned.</p></div>
-<div class="listingblock">
-<div class="title">content-type</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">parse_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-length"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>) <font color="#990000">-&gt;</font> <b><font color="#000000">non_neg_integer</font></b>()</tt></pre>
+</div></div>
+<p>When the content-length header is missing, <code>0</code> is returned.</p>
+<div class="listingblock"><div class="title">content-type</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">parse_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req</span>)
- <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Type</span>, <span style="color: #009900">SubType</span>, <span style="color: #009900">Params</span>}
-
-<span style="color: #009900">Type</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 insensitive</span></span>
-<span style="color: #009900">SubType</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 insensitive</span></span>
-<span style="color: #009900">Params</span> <span style="color: #990000">::</span> [{<span style="color: #009900">Key</span>, <span style="color: #009900">Value</span>}]
-<span style="color: #009900">Key</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 insensitive</span></span>
-<span style="color: #009900">Value</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></tt></pre></div></div>
-<div class="paragraph"><p>Note that the value for the charset parameter is case insensitive
-and returned as a lowercase binary string.</p></div>
-<div class="listingblock">
-<div class="title">cookie</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">parse_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>)
+ <font color="#990000">-&gt;</font> {<font color="#009900">Type</font>, <font color="#009900">SubType</font>, <font color="#009900">Params</font>}
+
+<font color="#009900">Type</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case insensitive</font></i>
+<font color="#009900">SubType</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case insensitive</font></i>
+<font color="#009900">Params</font> <font color="#990000">::</font> [{<font color="#009900">Key</font>, <font color="#009900">Value</font>}]
+<font color="#009900">Key</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case insensitive</font></i>
+<font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case sensitive;</font></i></tt></pre>
+</div></div>
+<p>Note that the value for the charset parameter is case insensitive and returned as a lowercase binary string.</p>
+<div class="listingblock"><div class="title">cookie</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">parse_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"cookie"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req</span>) <span style="color: #990000">-&gt;</span> [{<span style="color: #009900">Name</span>, <span style="color: #009900">Value</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="font-style: italic"><span style="color: #9A1900">%% case sensitive</span></span>
-<span style="color: #009900">Value</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></tt></pre></div></div>
-<div class="paragraph"><p>When the cookie header is missing, <code>[]</code> is returned.</p></div>
-<div class="paragraph"><p>While an empty cookie header is not valid, some clients do
-send it. Cowboy will in this case also return <code>[]</code>.</p></div>
-<div class="listingblock">
-<div class="title">expect</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">parse_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"cookie"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>) <font color="#990000">-&gt;</font> [{<font color="#009900">Name</font>, <font color="#009900">Value</font>}]
+
+<font color="#009900">Name</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case sensitive</font></i>
+<font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case sensitive</font></i></tt></pre>
+</div></div>
+<p>When the cookie header is missing, <code>[]</code> is returned.</p>
+<p>While an empty cookie header is not valid, some clients do send it. Cowboy will in this case also return <code>[]</code>.</p>
+<div class="listingblock"><div class="title">expect</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">parse_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"expect"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req</span>) <span style="color: #990000">-&gt;</span> <span style="color: #FF6600">continue</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">if-match and if-none-match</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">parse_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"expect"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>) <font color="#990000">-&gt;</font> <font color="#FF6600">continue</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">if-match and if-none-match</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">parse_header</span></span>(<span style="color: #009900">Name</span>, <span style="color: #009900">Req</span>)
- <span style="color: #990000">-&gt;</span> <span style="color: #FF6600">'*'</span> | [{<span style="color: #FF6600">weak</span> | <span style="color: #FF6600">strong</span>, <span style="color: #009900">OpaqueTag</span>}]
-
-<span style="color: #009900">Name</span> <span style="color: #990000">::</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"if-match"</span><span style="color: #990000">&gt;&gt;</span>
- | <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"if-none-match"</span><span style="color: #990000">&gt;&gt;</span>
-<span style="color: #009900">OpaqueTag</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></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">if-modified-since and if-unmodified-since</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">parse_header</font></b>(<font color="#009900">Name</font>, <font color="#009900">Req</font>)
+ <font color="#990000">-&gt;</font> <font color="#FF6600">'*'</font> | [{<font color="#FF6600">weak</font> | <font color="#FF6600">strong</font>, <font color="#009900">OpaqueTag</font>}]
+
+<font color="#009900">Name</font> <font color="#990000">::</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"if-match"</font><font color="#990000">&gt;&gt;</font>
+ | <font color="#990000">&lt;&lt;</font><font color="#FF0000">"if-none-match"</font><font color="#990000">&gt;&gt;</font>
+<font color="#009900">OpaqueTag</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case sensitive</font></i></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">if-modified-since and if-unmodified-since</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">parse_header</span></span>(<span style="color: #009900">Name</span>, <span style="color: #009900">Req</span>) <span style="color: #990000">-&gt;</span> <span style="font-weight: bold"><span style="color: #000000">calendar:datetime</span></span>()</tt></pre></div></div>
-<div class="listingblock">
-<div class="title">range</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">parse_header</font></b>(<font color="#009900">Name</font>, <font color="#009900">Req</font>) <font color="#990000">-&gt;</font> <b><font color="#000000">calendar:datetime</font></b>()</tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">range</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">parse_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"range"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">From</span>, <span style="color: #009900">To</span>} | <span style="color: #009900">Final</span>
-
-<span style="color: #009900">From</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>()
-<span style="color: #009900">To</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>() | <span style="color: #FF6600">infinity</span>
-<span style="color: #009900">Final</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">neg_integer</span></span>()</tt></pre></div></div>
-<div class="listingblock">
-<div class="title">sec-websocket-extensions</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">parse_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"range"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>) <font color="#990000">-&gt;</font> {<font color="#009900">From</font>, <font color="#009900">To</font>} | <font color="#009900">Final</font>
+
+<font color="#009900">From</font> <font color="#990000">::</font> <b><font color="#000000">non_neg_integer</font></b>()
+<font color="#009900">To</font> <font color="#990000">::</font> <b><font color="#000000">non_neg_integer</font></b>() | <font color="#FF6600">infinity</font>
+<font color="#009900">Final</font> <font color="#990000">::</font> <b><font color="#000000">neg_integer</font></b>()</tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">sec-websocket-extensions</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">parse_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"sec-websocket-extensions"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req</span>)
- <span style="color: #990000">-&gt;</span> [{<span style="color: #009900">Extension</span>, <span style="color: #009900">Params</span>}]
-
-<span style="color: #009900">Extension</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: #009900">Params</span> <span style="color: #990000">::</span> [<span style="color: #009900">Key</span> | {<span style="color: #009900">Key</span>, <span style="color: #009900">Value</span>}]
-<span style="color: #009900">Key</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: #009900">Value</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></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">sec-websocket-protocol and upgrade</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">parse_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"sec-websocket-extensions"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>)
+ <font color="#990000">-&gt;</font> [{<font color="#009900">Extension</font>, <font color="#009900">Params</font>}]
+
+<font color="#009900">Extension</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case sensitive</font></i>
+<font color="#009900">Params</font> <font color="#990000">::</font> [<font color="#009900">Key</font> | {<font color="#009900">Key</font>, <font color="#009900">Value</font>}]
+<font color="#009900">Key</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case sensitive</font></i>
+<font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case sensitive</font></i></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">sec-websocket-protocol and upgrade</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">parse_header</span></span>(<span style="color: #009900">Name</span>, <span style="color: #009900">Req</span>) <span style="color: #990000">-&gt;</span> [<span style="color: #009900">Token</span>]
-
-<span style="color: #009900">Name</span> <span style="color: #990000">::</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"sec-websocket-protocol"</span><span style="color: #990000">&gt;&gt;</span>
- | <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"upgrade"</span><span style="color: #990000">&gt;&gt;</span>
-<span style="color: #009900">Token</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 insensitive</span></span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">x-forwarded-for</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">parse_header</font></b>(<font color="#009900">Name</font>, <font color="#009900">Req</font>) <font color="#990000">-&gt;</font> [<font color="#009900">Token</font>]
+
+<font color="#009900">Name</font> <font color="#990000">::</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"sec-websocket-protocol"</font><font color="#990000">&gt;&gt;</font>
+ | <font color="#990000">&lt;&lt;</font><font color="#FF0000">"upgrade"</font><font color="#990000">&gt;&gt;</font>
+<font color="#009900">Token</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case insensitive</font></i></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">x-forwarded-for</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">parse_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"x-forwarded-for"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req</span>) <span style="color: #990000">-&gt;</span> [<span style="color: #009900">Token</span>]
+<pre><tt><b><font color="#000000">parse_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"x-forwarded-for"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>) <font color="#990000">-&gt;</font> [<font color="#009900">Token</font>]
-<span style="color: #009900">Token</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></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Unknown headers</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<font color="#009900">Token</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case sensitive</font></i></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Unknown 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="font-weight: bold"><span style="color: #000000">parse_header</span></span>(<span style="color: #990000">_</span>, <span style="color: #009900">Req</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #000080">undefined</span>, <span style="color: #009900">RawValue</span>}</tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">parse_header</font></b>(<font color="#990000">_</font>, <font color="#009900">Req</font>) <font color="#990000">-&gt;</font> {<font color="#000080">undefined</font>, <font color="#009900">RawValue</font>}</tt></pre>
+</div></div>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Only the parsed header value is returned, it is no longer wrapped in a tuple.
-</p>
+<ul><li><strong>2.0</strong>: Only the parsed header value is returned, it is no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Parse the accept header with a custom default value</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Parse the accept header with a custom 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="font-style: italic"><span style="color: #9A1900">%% Accept everything when header is missing.</span></span>
-<span style="color: #009900">Accept</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:parse_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">&lt;&lt;</span><span style="color: #FF0000">"*"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"*"</span><span style="color: #990000">&gt;&gt;</span>, []}, <span style="color: #993399">1000</span>, []}])<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Parse the content-length header</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><i><font color="#9A1900">%% Accept everything when header is missing.</font></i>
+<font color="#009900">Accept</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:parse_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"accept"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>,
+ [{{ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"*"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"*"</font><font color="#990000">&gt;&gt;</font>, []}, <font color="#993399">1000</font>, []}])<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Parse the content-length 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">%% Default content-length is 0.</span></span>
-<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">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><i><font color="#9A1900">%% Default content-length is 0.</font></i>
+<font color="#009900">Length</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-length"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.headers">cowboy_req:headers(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.header">cowboy_req:header(3)</a>, <a href="../cowboy_req.headers">cowboy_req:headers(3)</a></p>
+
diff --git a/docs/en/cowboy/2.3/manual/cowboy_req.parse_qs/index.html b/docs/en/cowboy/2.3/manual/cowboy_req.parse_qs/index.html
index 9894f0de..69f99f1b 100644
--- a/docs/en/cowboy/2.3/manual/cowboy_req.parse_qs/index.html
+++ b/docs/en/cowboy/2.3/manual/cowboy_req.parse_qs/index.html
@@ -62,117 +62,55 @@
<h1 class="lined-header"><span>cowboy_req:parse_qs(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:parse_qs - Parse the query string</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:parse_qs - Parse the query string</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">parse_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">Key</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="color: #009900">Value</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>() | <span style="color: #000080">true</span>}]</tt></pre></div></div>
-<div class="paragraph"><p>Parse the query string as a list of key/value pairs.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">parse_qs</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> [{<font color="#009900">Key</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() | <font color="#000080">true</font>}]</tt></pre>
+</div></div>
+<p>Parse the query string as a list of key/value pairs.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The parsed query string is returned as a list of key/value pairs.
-The key is a binary string. The value is either a binary string,
-or the atom <code>true</code>. Both key and value are case sensitive.</p></div>
-<div class="paragraph"><p>The atom <code>true</code> is returned when a key is present in the query
-string without a value. For example, in the following URIs
-the key <code>&lt;&lt;"edit"&gt;&gt;</code> will always have the value <code>true</code>:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<code>/posts/42?edit</code>
-</p>
+<p>The parsed query string is returned as a list of key/value pairs. The key is a binary string. The value is either a binary string, or the atom <code>true</code>. Both key and value are case sensitive.</p>
+<p>The atom <code>true</code> is returned when a key is present in the query string without a value. For example, in the following URIs the key <code>&lt;&lt;&quot;edit&quot;&gt;&gt;</code> will always have the value <code>true</code>:</p>
+<ul><li><code>/posts/42?edit</code>
</li>
-<li>
-<p>
-<code>/posts/42?edit&amp;exclusive=1</code>
-</p>
+<li><code>/posts/42?edit&amp;exclusive=1</code>
</li>
-<li>
-<p>
-<code>/posts/42?exclusive=1&amp;edit</code>
-</p>
+<li><code>/posts/42?exclusive=1&amp;edit</code>
</li>
-<li>
-<p>
-<code>/posts/42?exclusive=1&amp;edit&amp;from=web</code>
-</p>
+<li><code>/posts/42?exclusive=1&amp;edit&amp;from=web</code>
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: The parsed value is not longer cached in the Req object.
-</p>
+<ul><li><strong>2.0</strong>: The parsed value is not longer cached in the Req object.
</li>
-<li>
-<p>
-<strong>2.0</strong>: Only the parsed query string is returned, it is no longer wrapped in a tuple.
-</p>
+<li><strong>2.0</strong>: Only the parsed query string is returned, it is no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced. Replaces <code>qs_val/1</code> and <code>qs_vals/1</code>.
-</p>
+<li><strong>2.0</strong>: Function introduced. Replaces <code>qs_val/1</code> and <code>qs_vals/1</code>.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Parse the query string and convert the keys to atoms</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Parse the query string and convert the keys to atoms</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">ParsedQs</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:parse_qs</span></span>(<span style="color: #009900">Req</span>),
-<span style="color: #009900">AtomsQs</span> <span style="color: #990000">=</span> [{<span style="font-weight: bold"><span style="color: #000000">binary_to_existing_atom</span></span>(<span style="color: #009900">K</span>, <span style="color: #FF6600">latin1</span>), <span style="color: #009900">V</span>}
- || {<span style="color: #009900">K</span>, <span style="color: #009900">V</span>} <span style="color: #990000">&lt;-</span> <span style="color: #009900">ParsedQs</span>]<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">ParsedQs</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:parse_qs</font></b>(<font color="#009900">Req</font>),
+<font color="#009900">AtomsQs</font> <font color="#990000">=</font> [{<b><font color="#000000">binary_to_existing_atom</font></b>(<font color="#009900">K</font>, <font color="#FF6600">latin1</font>), <font color="#009900">V</font>}
+ || {<font color="#009900">K</font>, <font color="#009900">V</font>} <font color="#990000">&lt;-</font> <font color="#009900">ParsedQs</font>]<font color="#990000">.</font></tt></pre>
+</div></div>
<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.qs">cowboy_req:qs(3)</a>,
-<a href="../cowboy_req.match_qs">cowboy_req:match_qs(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.qs">cowboy_req:qs(3)</a>, <a href="../cowboy_req.match_qs">cowboy_req:match_qs(3)</a></p>
+
diff --git a/docs/en/cowboy/2.3/manual/cowboy_req.path/index.html b/docs/en/cowboy/2.3/manual/cowboy_req.path/index.html
index bc55a705..9432bc45 100644
--- a/docs/en/cowboy/2.3/manual/cowboy_req.path/index.html
+++ b/docs/en/cowboy/2.3/manual/cowboy_req.path/index.html
@@ -62,90 +62,47 @@
<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">
+<p>cowboy_req:path - URI path</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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
+<pre><tt><b><font color="#000000">path</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <font color="#009900">Path</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()</tt></pre>
+</div></div>
+<p>Return the path of the effective request URI.</p>
+<p>The path can also be obtained using pattern matching:</p>
+<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">
+<pre><tt>#{<font color="#FF6600">path</font> <font color="#990000">:=</font> <font color="#009900">Path</font>} <font color="#990000">=</font> <font color="#009900">Req</font><font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<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">
+<p>The path is returned as a binary string. It is case sensitive.</p>
<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>
+<ul><li><strong>2.0</strong>: Only the path is returned, it is no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<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
+<div class="listingblock"><div class="title">Get the effective request URI&apos;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">
+<pre><tt><font color="#009900">Path</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:path</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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>
+<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>
+
diff --git a/docs/en/cowboy/2.3/manual/cowboy_req.path_info/index.html b/docs/en/cowboy/2.3/manual/cowboy_req.path_info/index.html
index 328ae0c5..e03ef029 100644
--- a/docs/en/cowboy/2.3/manual/cowboy_req.path_info/index.html
+++ b/docs/en/cowboy/2.3/manual/cowboy_req.path_info/index.html
@@ -62,87 +62,41 @@
<h1 class="lined-header"><span>cowboy_req:path_info(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:path_info - Access the route&#8217;s trailing path segments</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:path_info - Access the route&apos;s trailing path segments</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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_info</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_router:tokens</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Return the tokens for the trailing path segments.</p></div>
-<div class="paragraph"><p>This is the part of the host name that was matched using
-the <code>...</code> notation.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">path_info</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <b><font color="#000000">cowboy_router:tokens</font></b>()</tt></pre>
+</div></div>
+<p>Return the tokens for the trailing path segments.</p>
+<p>This is the part of the host name that was matched using the <code>...</code> notation.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The tokens are returned as a list of case sensitive
-binary strings.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The tokens are returned as a list of case sensitive binary strings.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Only the tokens are returned, they are no longer wrapped in a tuple.
-</p>
+<ul><li><strong>2.0</strong>: Only the tokens are returned, they are no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Get the path_info tokens</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Get the path_info tokens</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">PathInfo</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:path_info</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">PathInfo</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:path_info</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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>,
-<a href="../cowboy_router">cowboy_router(3)</a></p></div>
-</div>
-</div>
+<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>, <a href="../cowboy_router">cowboy_router(3)</a></p>
+
diff --git a/docs/en/cowboy/2.3/manual/cowboy_req.peer/index.html b/docs/en/cowboy/2.3/manual/cowboy_req.peer/index.html
index 46d2262b..f9ec4efb 100644
--- a/docs/en/cowboy/2.3/manual/cowboy_req.peer/index.html
+++ b/docs/en/cowboy/2.3/manual/cowboy_req.peer/index.html
@@ -62,98 +62,51 @@
<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">
+<p>cowboy_req:peer - Peer address and port</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">Info</span>
+<pre><tt><b><font color="#000000">peer</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <font color="#009900">Info</font>
-<span style="color: #009900">Info</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 information can also be obtained using pattern matching:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<font color="#009900">Info</font> <font color="#990000">::</font> {<b><font color="#000000">inet:ip_address</font></b>(), <b><font color="#000000">inet:port_number</font></b>()}</tt></pre>
+</div></div>
+<p>Return the peer&apos;s IP address and port number.</p>
+<p>The peer information can also be obtained using pattern matching:</p>
+<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">
+<pre><tt>#{<font color="#FF6600">peer</font> <font color="#990000">:=</font> {<font color="#009900">IP</font>, <font color="#009900">Port</font>}} <font color="#990000">=</font> <font color="#009900">Req</font><font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<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">
+<p>The peer&apos;s IP address and port number.</p>
+<p>The peer is not necessarily the client&apos;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>
+<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>
<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>
+<ul><li><strong>2.0</strong>: Only the peer is returned, it is no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<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
+<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">
+<pre><tt>{<font color="#009900">IP</font>, <font color="#009900">Port</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:peer</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.sock">cowboy_req:sock(3)</a>,
-<a href="../cowboy_req.cert">cowboy_req:cert(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.sock">cowboy_req:sock(3)</a>, <a href="../cowboy_req.cert">cowboy_req:cert(3)</a></p>
+
diff --git a/docs/en/cowboy/2.3/manual/cowboy_req.port/index.html b/docs/en/cowboy/2.3/manual/cowboy_req.port/index.html
index 4d9e6fc7..4e32535c 100644
--- a/docs/en/cowboy/2.3/manual/cowboy_req.port/index.html
+++ b/docs/en/cowboy/2.3/manual/cowboy_req.port/index.html
@@ -62,90 +62,48 @@
<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">
+<p>cowboy_req:port - URI port number</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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
+<pre><tt><b><font color="#000000">port</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <font color="#009900">Port</font> <font color="#990000">::</font> <b><font color="#000000">inet:port_number</font></b>()</tt></pre>
+</div></div>
+<p>Return the port number of the effective request URI.</p>
+<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>
+<p>The port number can also be obtained using pattern matching:</p>
+<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">
+<pre><tt>#{<font color="#FF6600">port</font> <font color="#990000">:=</font> <font color="#009900">Port</font>} <font color="#990000">=</font> <font color="#009900">Req</font><font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<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">
+<p>The port number is returned as an integer.</p>
<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>
+<ul><li><strong>2.0</strong>: Only the port number is returned, it is no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<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
+<div class="listingblock"><div class="title">Get the effective request URI&apos;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">
+<pre><tt><font color="#009900">Port</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:port</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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>
+<p><a href="../cowboy_req">cowboy_req(3)</a></p>
+
diff --git a/docs/en/cowboy/2.3/manual/cowboy_req.push/index.html b/docs/en/cowboy/2.3/manual/cowboy_req.push/index.html
index ac272086..e1238d72 100644
--- a/docs/en/cowboy/2.3/manual/cowboy_req.push/index.html
+++ b/docs/en/cowboy/2.3/manual/cowboy_req.push/index.html
@@ -62,142 +62,74 @@
<h1 class="lined-header"><span>cowboy_req:push(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:push - Push a resource to the client</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:push - Push a resource to the client</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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</span></span>(<span style="color: #009900">Path</span>, <span style="color: #009900">Headers</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">push</span></span>(<span style="color: #009900">Path</span>, <span style="color: #009900">Headers</span>, <span style="color: #009900">Req</span>, #{})
-
-<span style="font-weight: bold"><span style="color: #000000">push</span></span>(<span style="color: #009900">Path</span>, <span style="color: #009900">Headers</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: #FF6600">ok</span>
-
-<span style="color: #009900">Path</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>() <span style="font-style: italic"><span style="color: #9A1900">%% case sensitive</span></span>
-<span style="color: #009900">Headers</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:http_headers</span></span>()
-<span style="color: #009900">Opts</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:push_opts</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Push a resource to the client.</p></div>
-<div class="paragraph"><p>Cowboy handles push requests the same way as if they came
-from the client, including the creation of a request handling
-process, routing and middlewares and so on.</p></div>
-<div class="paragraph"><p>This function does nothing when the HTTP/1.1 protocol is
-used. You may call it safely without first checking whether
-the connection uses HTTP/2.</p></div>
-<div class="paragraph"><p>The header names must be given as lowercase binary strings.
-While header names are case insensitive, Cowboy requires them
-to be given as lowercase to function properly.</p></div>
-<div class="paragraph"><p>Note that the headers must be the headers the client is expected
-to send if it were to perform the request. They are therefore
-request headers, and not response headers.</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. You can override them by passing options.</p></div>
-<div class="paragraph"><p>It is not possible to push resources after sending a response.
-Any attempt will result in an error.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">push</font></b>(<font color="#009900">Path</font>, <font color="#009900">Headers</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> <b><font color="#000000">push</font></b>(<font color="#009900">Path</font>, <font color="#009900">Headers</font>, <font color="#009900">Req</font>, #{})
+
+<b><font color="#000000">push</font></b>(<font color="#009900">Path</font>, <font color="#009900">Headers</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>(), <font color="#009900">Opts</font>)
+ <font color="#990000">-&gt;</font> <font color="#FF6600">ok</font>
+
+<font color="#009900">Path</font> <font color="#990000">::</font> <b><font color="#000000">iodata</font></b>() <i><font color="#9A1900">%% case sensitive</font></i>
+<font color="#009900">Headers</font> <font color="#990000">::</font> <b><font color="#000000">cowboy:http_headers</font></b>()
+<font color="#009900">Opts</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:push_opts</font></b>()</tt></pre>
+</div></div>
+<p>Push a resource to the client.</p>
+<p>Cowboy handles push requests the same way as if they came from the client, including the creation of a request handling process, routing and middlewares and so on.</p>
+<p>This function does nothing when the HTTP/1.1 protocol is used. You may call it safely without first checking whether the connection uses HTTP/2.</p>
+<p>The header names must be given as lowercase binary strings. While header names are case insensitive, Cowboy requires them to be given as lowercase to function properly.</p>
+<p>Note that the headers must be the headers the client is expected to send if it were to perform the request. They are therefore request headers, and not response headers.</p>
+<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&apos;s URI. You can override them by passing options.</p>
+<p>It is not possible to push resources after sending a response. Any attempt will result in an error.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Path
-</dt>
-<dd>
-<p>
-The status code for the response.
-</p>
+<dl><dt>Path</dt>
+<dd><p>The status code for the response.</p>
</dd>
-<dt class="hdlist1">
-Headers
-</dt>
-<dd>
-<p>
-The response headers.
-</p>
+<dt>Headers</dt>
+<dd><p>The response headers.</p>
</dd>
-</dl></div>
-<div class="paragraph"><p>Header names must be given as lowercase binary strings.</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+</dl>
+<p>Header names must be given as lowercase binary strings.</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-<dt class="hdlist1">
-Opts
-</dt>
-<dd>
-<p>
-Customize the HTTP method or the URI scheme, host, port
-or query string.
-</p>
+<dt>Opts</dt>
+<dd><p>Customize the HTTP method or the URI scheme, host, port or query string.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The atom <code>ok</code> is always returned. It can be safely ignored.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The atom <code>ok</code> is always returned. It can be safely ignored.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced.
-</p>
+<ul><li><strong>2.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Push a resource</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Push a resource</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">cowboy_req:push</span></span>(<span style="color: #FF0000">"/static/style.css"</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"accept"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/css"</span><span style="color: #990000">&gt;&gt;</span>
-}, <span style="color: #009900">Req</span>),</tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Push a resource with a custom host</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">cowboy_req:push</font></b>(<font color="#FF0000">"/static/style.css"</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"accept"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/css"</font><font color="#990000">&gt;&gt;</font>
+}, <font color="#009900">Req</font>),</tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Push a resource with a custom host</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">cowboy_req:push</span></span>(<span style="color: #FF0000">"/static/style.css"</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"accept"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/css"</span><span style="color: #990000">&gt;&gt;</span>
-}, #{<span style="color: #0000FF">host</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"cdn.example.org"</span><span style="color: #990000">&gt;&gt;</span>}, <span style="color: #009900">Req</span>),</tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">cowboy_req:push</font></b>(<font color="#FF0000">"/static/style.css"</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"accept"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/css"</font><font color="#990000">&gt;&gt;</font>
+}, #{<font color="#0000FF">host</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"cdn.example.org"</font><font color="#990000">&gt;&gt;</font>}, <font color="#009900">Req</font>),</tt></pre>
+</div></div>
<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.inform">cowboy_req:inform(3)</a>,
-<a href="../cowboy_req.reply">cowboy_req:reply(3)</a>,
-<a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.inform">cowboy_req:inform(3)</a>, <a href="../cowboy_req.reply">cowboy_req:reply(3)</a>, <a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a></p>
+
diff --git a/docs/en/cowboy/2.3/manual/cowboy_req.qs/index.html b/docs/en/cowboy/2.3/manual/cowboy_req.qs/index.html
index 352719b5..482047e2 100644
--- a/docs/en/cowboy/2.3/manual/cowboy_req.qs/index.html
+++ b/docs/en/cowboy/2.3/manual/cowboy_req.qs/index.html
@@ -62,89 +62,47 @@
<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">
+<p>cowboy_req:qs - URI query string</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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
+<pre><tt><b><font color="#000000">qs</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <font color="#009900">Qs</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()</tt></pre>
+</div></div>
+<p>Return the query string of the effective request URI.</p>
+<p>The query string can also be obtained using pattern matching:</p>
+<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">
+<pre><tt>#{<font color="#FF6600">qs</font> <font color="#990000">:=</font> <font color="#009900">Qs</font>} <font color="#990000">=</font> <font color="#009900">Req</font><font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<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">
+<p>The query string is returned as a binary string. It is case sensitive.</p>
<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>
+<ul><li><strong>2.0</strong>: Only the query string is returned, it is no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<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
+<div class="listingblock"><div class="title">Get the effective request URI&apos;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">
+<pre><tt><font color="#009900">Qs</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:qs</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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>
+<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>
+
diff --git a/docs/en/cowboy/2.3/manual/cowboy_req.read_body/index.html b/docs/en/cowboy/2.3/manual/cowboy_req.read_body/index.html
index deceb1ec..d74da7da 100644
--- a/docs/en/cowboy/2.3/manual/cowboy_req.read_body/index.html
+++ b/docs/en/cowboy/2.3/manual/cowboy_req.read_body/index.html
@@ -62,143 +62,72 @@
<h1 class="lined-header"><span>cowboy_req:read_body(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:read_body - Read the request body</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:read_body - Read the request body</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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</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">read_body</span></span>(<span style="color: #009900">Req</span>, #{})
-
-<span style="font-weight: bold"><span style="color: #000000">read_body</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: #FF6600">ok</span>, <span style="color: #009900">Data</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: #FF6600">more</span>, <span style="color: #009900">Data</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">Opts</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:read_body_opts</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Read the request body.</p></div>
-<div class="paragraph"><p>This function reads a chunk of the request body. A <code>more</code> tuple
-is returned when more data remains to be read. Call the function
-repeatedly until an <code>ok</code> tuple is returned to read the entire body.</p></div>
-<div class="paragraph"><p>An <code>ok</code> tuple with empty data is returned when the request has no body,
-or when calling this function again after the body has already
-been read. It is therefore safe to call this function directly.
-Note that the body can only be read once.</p></div>
-<div class="paragraph"><p>This function reads the request body from the connection process.
-The connection process is responsible for reading from the socket.
-The exact behavior varies depending on the protocol.</p></div>
-<div class="paragraph"><p>The options therefore are only related to the communication
-between the request process and the connection process.</p></div>
-<div class="paragraph"><p>Cowboy will automatically handle protocol details including
-the expect header, chunked transfer-encoding and others.</p></div>
-<div class="paragraph"><p>Once the body has been read fully, Cowboy sets the content-length
-header if it was not previously provided.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">read_body</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> <b><font color="#000000">read_body</font></b>(<font color="#009900">Req</font>, #{})
+
+<b><font color="#000000">read_body</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>(), <font color="#009900">Opts</font>)
+ <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <font color="#009900">Data</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">Req</font>}
+ | {<font color="#FF6600">more</font>, <font color="#009900">Data</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">Req</font>}
+
+<font color="#009900">Opts</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:read_body_opts</font></b>()</tt></pre>
+</div></div>
+<p>Read the request body.</p>
+<p>This function reads a chunk of the request body. A <code>more</code> tuple is returned when more data remains to be read. Call the function repeatedly until an <code>ok</code> tuple is returned to read the entire body.</p>
+<p>An <code>ok</code> tuple with empty data is returned when the request has no body, or when calling this function again after the body has already been read. It is therefore safe to call this function directly. Note that the body can only be read once.</p>
+<p>This function reads the request body from the connection process. The connection process is responsible for reading from the socket. The exact behavior varies depending on the protocol.</p>
+<p>The options therefore are only related to the communication between the request process and the connection process.</p>
+<p>Cowboy will automatically handle protocol details including the expect header, chunked transfer-encoding and others.</p>
+<p>Once the body has been read fully, Cowboy sets the content-length header if it was not previously provided.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-<dt class="hdlist1">
-Opts
-</dt>
-<dd>
-<p>
-A map of body reading options.
-</p>
-<div class="paragraph"><p>The <code>length</code> option can be used to request smaller or bigger
-chunks of data to be sent. It is a best effort approach, Cowboy
-may send more data than configured on occasions. It defaults
-to 8MB.</p></div>
-<div class="paragraph"><p>The <code>period</code> indicates how long the connection process will wait
-before it provides us with the data it received. It defaults
-to 15 seconds.</p></div>
-<div class="paragraph"><p>The connection process sends data to the request process when
-either the <code>length</code> of data or the <code>period</code> of time is reached.</p></div>
-<div class="paragraph"><p>The <code>timeout</code> option is a safeguard in case the connection
-process becomes unresponsive. The function will crash if no
-message was received in that interval. The timeout should be
-larger than the period. It defaults to the period + 1 second.</p></div>
+<dt>Opts</dt>
+<dd><p>A map of body reading options.</p>
+<p>The <code>length</code> option can be used to request smaller or bigger chunks of data to be sent. It is a best effort approach, Cowboy may send more data than configured on occasions. It defaults to 8MB.</p>
+<p>The <code>period</code> indicates how long the connection process will wait before it provides us with the data it received. It defaults to 15 seconds.</p>
+<p>The connection process sends data to the request process when either the <code>length</code> of data or the <code>period</code> of time is reached.</p>
+<p>The <code>timeout</code> option is a safeguard in case the connection process becomes unresponsive. The function will crash if no message was received in that interval. The timeout should be larger than the period. It defaults to the period<br/> 1 second.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A <code>more</code> tuple is returned when there are more data to be read.</p></div>
-<div class="paragraph"><p>An <code>ok</code> tuple is returned when there are no more data to be read,
-either because this is the last chunk of data, the body has already
-been read, or there was no body to begin with.</p></div>
-<div class="paragraph"><p>The data is always returned as a binary.</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.
-For example it may have an added content-length header once the
-body has been read.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>A <code>more</code> tuple is returned when there are more data to be read.</p>
+<p>An <code>ok</code> tuple is returned when there are no more data to be read, either because this is the last chunk of data, the body has already been read, or there was no body to begin with.</p>
+<p>The data is always returned as a binary.</p>
+<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. For example it may have an added content-length header once the body has been read.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced. Replaces <code>body/1,2</code>.
-</p>
+<ul><li><strong>2.0</strong>: Function introduced. Replaces <code>body/1,2</code>.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Read the entire body</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Read the entire body</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">read_body</span></span>(<span style="color: #009900">Req0</span>, <span style="color: #009900">Acc</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">cowboy_req:read_body</span></span>(<span style="color: #009900">Req0</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Data</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">-&gt;</span> {<span style="color: #FF6600">ok</span>, <span style="color: #990000">&lt;&lt;</span> <span style="color: #009900">Acc</span><span style="color: #990000">/</span><span style="font-weight: bold"><span style="color: #000080">binary</span></span>, <span style="color: #009900">Data</span><span style="color: #990000">/</span><span style="font-weight: bold"><span style="color: #000080">binary</span></span> <span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req</span>};
- {<span style="color: #FF6600">more</span>, <span style="color: #009900">Data</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">-&gt;</span> <span style="font-weight: bold"><span style="color: #000000">read_body</span></span>(<span style="color: #009900">Req</span>, <span style="color: #990000">&lt;&lt;</span> <span style="color: #009900">Acc</span><span style="color: #990000">/</span><span style="font-weight: bold"><span style="color: #000080">binary</span></span>, <span style="color: #009900">Data</span><span style="color: #990000">/</span><span style="font-weight: bold"><span style="color: #000080">binary</span></span> <span style="color: #990000">&gt;&gt;</span>)
- <span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Read the body in small chunks</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">read_body</font></b>(<font color="#009900">Req0</font>, <font color="#009900">Acc</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">case</font></b> <b><font color="#000000">cowboy_req:read_body</font></b>(<font color="#009900">Req0</font>) <b><font color="#0000FF">of</font></b>
+ {<font color="#FF6600">ok</font>, <font color="#009900">Data</font>, <font color="#009900">Req</font>} <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <font color="#990000">&lt;&lt;</font> <font color="#009900">Acc</font><font color="#990000">/</font><b><font color="#000080">binary</font></b>, <font color="#009900">Data</font><font color="#990000">/</font><b><font color="#000080">binary</font></b> <font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>};
+ {<font color="#FF6600">more</font>, <font color="#009900">Data</font>, <font color="#009900">Req</font>} <font color="#990000">-&gt;</font> <b><font color="#000000">read_body</font></b>(<font color="#009900">Req</font>, <font color="#990000">&lt;&lt;</font> <font color="#009900">Acc</font><font color="#990000">/</font><b><font color="#000080">binary</font></b>, <font color="#009900">Data</font><font color="#990000">/</font><b><font color="#000080">binary</font></b> <font color="#990000">&gt;&gt;</font>)
+ <b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Read the body in small chunks</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">cowboy_req:read_body</span></span>(<span style="color: #009900">Req</span>, #{<span style="font-weight: bold"><span style="color: #000080">length</span></span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">64000</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">cowboy_req:read_body</font></b>(<font color="#009900">Req</font>, #{<b><font color="#000080">length</font></b> <font color="#990000">=&gt;</font> <font color="#993399">64000</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
<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.has_body">cowboy_req:has_body(3)</a>,
-<a href="../cowboy_req.body_length">cowboy_req:body_length(3)</a>,
-<a href="../cowboy_req.read_urlencoded_body">cowboy_req:read_urlencoded_body(3)</a>,
-<a href="../cowboy_req.read_part">cowboy_req:read_part(3)</a>,
-<a href="../cowboy_req.read_part_body">cowboy_req:read_part_body(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.has_body">cowboy_req:has_body(3)</a>, <a href="../cowboy_req.body_length">cowboy_req:body_length(3)</a>, <a href="../cowboy_req.read_urlencoded_body">cowboy_req:read_urlencoded_body(3)</a>, <a href="../cowboy_req.read_part">cowboy_req:read_part(3)</a>, <a href="../cowboy_req.read_part_body">cowboy_req:read_part_body(3)</a></p>
+
diff --git a/docs/en/cowboy/2.3/manual/cowboy_req.read_part/index.html b/docs/en/cowboy/2.3/manual/cowboy_req.read_part/index.html
index 4a9fa13d..0fa219b0 100644
--- a/docs/en/cowboy/2.3/manual/cowboy_req.read_part/index.html
+++ b/docs/en/cowboy/2.3/manual/cowboy_req.read_part/index.html
@@ -62,162 +62,94 @@
<h1 class="lined-header"><span>cowboy_req:read_part(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:read_part - Read the next multipart headers</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:read_part - Read the next multipart headers</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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_part</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">read_part</span></span>(<span style="color: #009900">Req</span>, #{})
-
-<span style="font-weight: bold"><span style="color: #000000">read_part</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: #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: #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
-their own headers and body. This function parses and returns
-headers. Examples of multipart media types are
-<code>multipart/form-data</code> and <code>multipart/byteranges</code>.</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>Cowboy will read the body before parsing in chunks of size
-up to 64KB, with a period of 5 seconds. This is tailored for
-reading part headers and might not be the most efficient for
-skipping the previous part&#8217;s body.</p></div>
-<div class="paragraph"><p>The headers returned are MIME headers, <strong>NOT</strong> 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 extract information from <code>multipart/form-data</code>
-representations.</p></div>
-<div class="paragraph"><p>Once a part has been read, it can not be read again.</p></div>
-<div class="paragraph"><p>Once the body has been read, Cowboy sets the content-length
-header if it was not previously provided.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">read_part</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> <b><font color="#000000">read_part</font></b>(<font color="#009900">Req</font>, #{})
+
+<b><font color="#000000">read_part</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>(), <font color="#009900">Opts</font>)
+ <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <font color="#009900">Headers</font>, <font color="#009900">Req</font>} | {<font color="#FF6600">done</font>, <font color="#009900">Req</font>}
+
+<font color="#009900">Opts</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:read_body_opts</font></b>()
+<font color="#009900">Headers</font> <font color="#990000">::</font> #{<b><font color="#000080">binary</font></b>() <font color="#990000">=&gt;</font> <b><font color="#000080">binary</font></b>()}</tt></pre>
+</div></div>
+<p>Read the next part of a multipart body.</p>
+<p>This function reads the request body and parses it as multipart. Each parts of a multipart representation have their own headers and body. This function parses and returns headers. Examples of multipart media types are <code>multipart/form-data</code> and <code>multipart/byteranges</code>.</p>
+<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&apos;t been read. Both are skipped automatically when calling this function.</p>
+<p>Cowboy will read the body before parsing in chunks of size up to 64KB, with a period of 5 seconds. This is tailored for reading part headers and might not be the most efficient for skipping the previous part&apos;s body.</p>
+<p>The headers returned are MIME headers, <strong>NOT</strong> 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 extract information from <code>multipart/form-data</code> representations.</p>
+<!-- @todo Proper link to cow_multipart:form_data.-->
+<p>Once a part has been read, it can not be read again.</p>
+<p>Once the body has been read, Cowboy sets the content-length header if it was not previously provided.</p>
+<!-- @todo Limit the maximum size of multipart headers.-->
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-<dt class="hdlist1">
-Opts
-</dt>
-<dd>
-<p>
-A map of body reading options. Please refer to
-<a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a>
-for details about each option.
-</p>
-<div class="paragraph"><p>This function defaults the <code>length</code> to 64KB and the <code>period</code>
-to 5 seconds.</p></div>
+<dt>Opts</dt>
+<dd><p>A map of body reading options. Please refer to <a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a> for details about each option.</p>
+<p>This function defaults the <code>length</code> to 64KB and the <code>period</code> to 5 seconds.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<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 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.
-For example it may have an added content-length header once the
-body has been read.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>An <code>ok</code> tuple is returned containing the next part&apos;s headers as a map.</p>
+<p>A <code>done</code> tuple is returned if there are no more parts to read.</p>
+<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. For example it may have an added content-length header once the body has been read.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced. Replaces <code>part/1,2</code>.
-</p>
+<ul><li><strong>2.0</strong>: Function introduced. Replaces <code>part/1,2</code>.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Read all parts</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Read all parts</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">acc_multipart</span></span>(<span style="color: #009900">Req0</span>, <span style="color: #009900">Acc</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">cowboy_req:read_part</span></span>(<span style="color: #009900">Req0</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Headers</span>, <span style="color: #009900">Req1</span>} <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Body</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">stream_body</span></span>(<span style="color: #009900">Req1</span>, <span style="color: #990000">&lt;&lt;&gt;&gt;</span>),
- <span style="font-weight: bold"><span style="color: #000000">acc_multipart</span></span>(<span style="color: #009900">Req</span>, [{<span style="color: #009900">Headers</span>, <span style="color: #009900">Body</span>}|<span style="color: #009900">Acc</span>]);
- {<span style="color: #FF6600">done</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">-&gt;</span>
- {<span style="font-weight: bold"><span style="color: #000000">lists:reverse</span></span>(<span style="color: #009900">Acc</span>), <span style="color: #009900">Req</span>}
- <span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span>
-
-<span style="font-weight: bold"><span style="color: #000000">stream_body</span></span>(<span style="color: #009900">Req0</span>, <span style="color: #009900">Acc</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">cowboy_req:read_part_body</span></span>(<span style="color: #009900">Req0</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
- {<span style="color: #FF6600">more</span>, <span style="color: #009900">Data</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #000000">stream_body</span></span>(<span style="color: #009900">Req</span>, <span style="color: #990000">&lt;&lt;</span> <span style="color: #009900">Acc</span><span style="color: #990000">/</span><span style="font-weight: bold"><span style="color: #000080">binary</span></span>, <span style="color: #009900">Data</span><span style="color: #990000">/</span><span style="font-weight: bold"><span style="color: #000080">binary</span></span> <span style="color: #990000">&gt;&gt;</span>);
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Data</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #990000">&lt;&lt;</span> <span style="color: #009900">Acc</span><span style="color: #990000">/</span><span style="font-weight: bold"><span style="color: #000080">binary</span></span>, <span style="color: #009900">Data</span><span style="color: #990000">/</span><span style="font-weight: bold"><span style="color: #000080">binary</span></span> <span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req</span>}
- <span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Read all part headers, skipping bodies</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">acc_multipart</font></b>(<font color="#009900">Req0</font>, <font color="#009900">Acc</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">case</font></b> <b><font color="#000000">cowboy_req:read_part</font></b>(<font color="#009900">Req0</font>) <b><font color="#0000FF">of</font></b>
+ {<font color="#FF6600">ok</font>, <font color="#009900">Headers</font>, <font color="#009900">Req1</font>} <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <font color="#009900">Body</font>, <font color="#009900">Req</font>} <font color="#990000">=</font> <b><font color="#000000">stream_body</font></b>(<font color="#009900">Req1</font>, <font color="#990000">&lt;&lt;&gt;&gt;</font>),
+ <b><font color="#000000">acc_multipart</font></b>(<font color="#009900">Req</font>, [{<font color="#009900">Headers</font>, <font color="#009900">Body</font>}|<font color="#009900">Acc</font>]);
+ {<font color="#FF6600">done</font>, <font color="#009900">Req</font>} <font color="#990000">-&gt;</font>
+ {<b><font color="#000000">lists:reverse</font></b>(<font color="#009900">Acc</font>), <font color="#009900">Req</font>}
+ <b><font color="#0000FF">end</font></b><font color="#990000">.</font>
+
+<b><font color="#000000">stream_body</font></b>(<font color="#009900">Req0</font>, <font color="#009900">Acc</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">case</font></b> <b><font color="#000000">cowboy_req:read_part_body</font></b>(<font color="#009900">Req0</font>) <b><font color="#0000FF">of</font></b>
+ {<font color="#FF6600">more</font>, <font color="#009900">Data</font>, <font color="#009900">Req</font>} <font color="#990000">-&gt;</font>
+ <b><font color="#000000">stream_body</font></b>(<font color="#009900">Req</font>, <font color="#990000">&lt;&lt;</font> <font color="#009900">Acc</font><font color="#990000">/</font><b><font color="#000080">binary</font></b>, <font color="#009900">Data</font><font color="#990000">/</font><b><font color="#000080">binary</font></b> <font color="#990000">&gt;&gt;</font>);
+ {<font color="#FF6600">ok</font>, <font color="#009900">Data</font>, <font color="#009900">Req</font>} <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <font color="#990000">&lt;&lt;</font> <font color="#009900">Acc</font><font color="#990000">/</font><b><font color="#000080">binary</font></b>, <font color="#009900">Data</font><font color="#990000">/</font><b><font color="#000080">binary</font></b> <font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>}
+ <b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Read all part headers, skipping bodies</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">skip_body_multipart</span></span>(<span style="color: #009900">Req0</span>, <span style="color: #009900">Acc</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">cowboy_req:read_part</span></span>(<span style="color: #009900">Req0</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Headers</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #000000">skip_body_multipart</span></span>(<span style="color: #009900">Req</span>, [<span style="color: #009900">Headers</span>|<span style="color: #009900">Acc</span>]);
- {<span style="color: #FF6600">done</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">-&gt;</span>
- {<span style="font-weight: bold"><span style="color: #000000">lists:reverse</span></span>(<span style="color: #009900">Acc</span>), <span style="color: #009900">Req</span>}
- <span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Read a part header in larger chunks</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">skip_body_multipart</font></b>(<font color="#009900">Req0</font>, <font color="#009900">Acc</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">case</font></b> <b><font color="#000000">cowboy_req:read_part</font></b>(<font color="#009900">Req0</font>) <b><font color="#0000FF">of</font></b>
+ {<font color="#FF6600">ok</font>, <font color="#009900">Headers</font>, <font color="#009900">Req</font>} <font color="#990000">-&gt;</font>
+ <b><font color="#000000">skip_body_multipart</font></b>(<font color="#009900">Req</font>, [<font color="#009900">Headers</font>|<font color="#009900">Acc</font>]);
+ {<font color="#FF6600">done</font>, <font color="#009900">Req</font>} <font color="#990000">-&gt;</font>
+ {<b><font color="#000000">lists:reverse</font></b>(<font color="#009900">Acc</font>), <font color="#009900">Req</font>}
+ <b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Read a part header in larger chunks</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: #FF6600">ok</span>, <span style="color: #009900">Headers</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:read_part</span></span>(<span style="color: #009900">Req0</span>, #{<span style="font-weight: bold"><span style="color: #000080">length</span></span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">1000000</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#009900">Headers</font>, <font color="#009900">Req</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:read_part</font></b>(<font color="#009900">Req0</font>, #{<b><font color="#000080">length</font></b> <font color="#990000">=&gt;</font> <font color="#993399">1000000</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
<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.has_body">cowboy_req:has_body(3)</a>,
-<a href="../cowboy_req.body_length">cowboy_req:body_length(3)</a>,
-<a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a>,
-<a href="../cowboy_req.read_urlencoded_body">cowboy_req:read_urlencoded_body(3)</a>,
-<a href="../cowboy_req.read_part_body">cowboy_req:read_part_body(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.has_body">cowboy_req:has_body(3)</a>, <a href="../cowboy_req.body_length">cowboy_req:body_length(3)</a>, <a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a>, <a href="../cowboy_req.read_urlencoded_body">cowboy_req:read_urlencoded_body(3)</a>, <a href="../cowboy_req.read_part_body">cowboy_req:read_part_body(3)</a></p>
+
diff --git a/docs/en/cowboy/2.3/manual/cowboy_req.read_part_body/index.html b/docs/en/cowboy/2.3/manual/cowboy_req.read_part_body/index.html
index 21947796..d08ee13e 100644
--- a/docs/en/cowboy/2.3/manual/cowboy_req.read_part_body/index.html
+++ b/docs/en/cowboy/2.3/manual/cowboy_req.read_part_body/index.html
@@ -62,130 +62,70 @@
<h1 class="lined-header"><span>cowboy_req:read_part_body(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:read_part_body - Read the current part&#8217;s body</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:read_part_body - Read the current part&apos;s body</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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_part_body</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">read_part_body</span></span>(<span style="color: #009900">Req</span>, #{})
-
-<span style="font-weight: bold"><span style="color: #000000">read_part_body</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: #FF6600">ok</span>, <span style="color: #009900">Data</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: #FF6600">more</span>, <span style="color: #009900">Data</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">Opts</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:read_body_opts</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Read the body of the current part of the multipart message.</p></div>
-<div class="paragraph"><p>This function reads the request body and parses it as
-multipart. Each parts of a multipart representation have
-their own headers and body. This function returns the
-body of the current part. Examples of multipart media types
-are <code>multipart/form-data</code> and <code>multipart/byteranges</code>.</p></div>
-<div class="paragraph"><p>This function reads a chunk of the part&#8217;s body. A <code>more</code> tuple
-is returned when more data remains to be read. Call the function
-repeatedly until an <code>ok</code> tuple is returned to read the entire body.</p></div>
-<div class="paragraph"><p>Once a part has been read, it can not be read again.</p></div>
-<div class="paragraph"><p>Once the body has been read, Cowboy sets the content-length
-header if it was not previously provided.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">read_part_body</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> <b><font color="#000000">read_part_body</font></b>(<font color="#009900">Req</font>, #{})
+
+<b><font color="#000000">read_part_body</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>(), <font color="#009900">Opts</font>)
+ <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <font color="#009900">Data</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">Req</font>}
+ | {<font color="#FF6600">more</font>, <font color="#009900">Data</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">Req</font>}
+
+<font color="#009900">Opts</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:read_body_opts</font></b>()</tt></pre>
+</div></div>
+<p>Read the body of the current part of the multipart message.</p>
+<p>This function reads the request body and parses it as multipart. Each parts of a multipart representation have their own headers and body. This function returns the body of the current part. Examples of multipart media types are <code>multipart/form-data</code> and <code>multipart/byteranges</code>.</p>
+<p>This function reads a chunk of the part&apos;s body. A <code>more</code> tuple is returned when more data remains to be read. Call the function repeatedly until an <code>ok</code> tuple is returned to read the entire body.</p>
+<p>Once a part has been read, it can not be read again.</p>
+<p>Once the body has been read, Cowboy sets the content-length header if it was not previously provided.</p>
+<!-- @todo Limit the maximum size of multipart headers.-->
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-<dt class="hdlist1">
-Opts
-</dt>
-<dd>
-<p>
-A map of body reading options. Please refer to
-<a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a>
-for details about each option.
-</p>
-<div class="paragraph"><p>This function uses the same default options as the
-<a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a>
-function.</p></div>
+<dt>Opts</dt>
+<dd><p>A map of body reading options. Please refer to <a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a> for details about each option.</p>
+<p>This function uses the same default options as the <a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a> function.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A <code>more</code> tuple is returned when there are more data to be read.</p></div>
-<div class="paragraph"><p>An <code>ok</code> tuple is returned when there are no more data to be read.</p></div>
-<div class="paragraph"><p>The data is always returned as a binary.</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.
-For example it may have an added content-length header once the
-body has been read.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>A <code>more</code> tuple is returned when there are more data to be read.</p>
+<p>An <code>ok</code> tuple is returned when there are no more data to be read.</p>
+<p>The data is always returned as a binary.</p>
+<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. For example it may have an added content-length header once the body has been read.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced. Replaces <code>part_body/1,2</code>.
-</p>
+<ul><li><strong>2.0</strong>: Function introduced. Replaces <code>part_body/1,2</code>.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Read a full part&#8217;s body</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Read a full part&apos;s body</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">stream_body</span></span>(<span style="color: #009900">Req0</span>, <span style="color: #009900">Acc</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">cowboy_req:read_part_body</span></span>(<span style="color: #009900">Req0</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
- {<span style="color: #FF6600">more</span>, <span style="color: #009900">Data</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #000000">stream_body</span></span>(<span style="color: #009900">Req</span>, <span style="color: #990000">&lt;&lt;</span> <span style="color: #009900">Acc</span><span style="color: #990000">/</span><span style="font-weight: bold"><span style="color: #000080">binary</span></span>, <span style="color: #009900">Data</span><span style="color: #990000">/</span><span style="font-weight: bold"><span style="color: #000080">binary</span></span> <span style="color: #990000">&gt;&gt;</span>);
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Data</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #990000">&lt;&lt;</span> <span style="color: #009900">Acc</span><span style="color: #990000">/</span><span style="font-weight: bold"><span style="color: #000080">binary</span></span>, <span style="color: #009900">Data</span><span style="color: #990000">/</span><span style="font-weight: bold"><span style="color: #000080">binary</span></span> <span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req</span>}
- <span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Ensure a part&#8217;s body is smaller than 64KB</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">stream_body</font></b>(<font color="#009900">Req0</font>, <font color="#009900">Acc</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">case</font></b> <b><font color="#000000">cowboy_req:read_part_body</font></b>(<font color="#009900">Req0</font>) <b><font color="#0000FF">of</font></b>
+ {<font color="#FF6600">more</font>, <font color="#009900">Data</font>, <font color="#009900">Req</font>} <font color="#990000">-&gt;</font>
+ <b><font color="#000000">stream_body</font></b>(<font color="#009900">Req</font>, <font color="#990000">&lt;&lt;</font> <font color="#009900">Acc</font><font color="#990000">/</font><b><font color="#000080">binary</font></b>, <font color="#009900">Data</font><font color="#990000">/</font><b><font color="#000080">binary</font></b> <font color="#990000">&gt;&gt;</font>);
+ {<font color="#FF6600">ok</font>, <font color="#009900">Data</font>, <font color="#009900">Req</font>} <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <font color="#990000">&lt;&lt;</font> <font color="#009900">Acc</font><font color="#990000">/</font><b><font color="#000080">binary</font></b>, <font color="#009900">Data</font><font color="#990000">/</font><b><font color="#000080">binary</font></b> <font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>}
+ <b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Ensure a part&apos;s body is smaller than 64KB</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: #FF6600">ok</span>, <span style="color: #009900">Body</span>, <span style="color: #009900">Req</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">Req0</span>, #{<span style="font-weight: bold"><span style="color: #000080">length</span></span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">64000</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#009900">Body</font>, <font color="#009900">Req</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:read_part_body</font></b>(<font color="#009900">Req0</font>, #{<b><font color="#000080">length</font></b> <font color="#990000">=&gt;</font> <font color="#993399">64000</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
<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.has_body">cowboy_req:has_body(3)</a>,
-<a href="../cowboy_req.body_length">cowboy_req:body_length(3)</a>,
-<a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a>,
-<a href="../cowboy_req.read_urlencoded_body">cowboy_req:read_urlencoded_body(3)</a>,
-<a href="../cowboy_req.read_part">cowboy_req:read_part(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.has_body">cowboy_req:has_body(3)</a>, <a href="../cowboy_req.body_length">cowboy_req:body_length(3)</a>, <a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a>, <a href="../cowboy_req.read_urlencoded_body">cowboy_req:read_urlencoded_body(3)</a>, <a href="../cowboy_req.read_part">cowboy_req:read_part(3)</a></p>
+
diff --git a/docs/en/cowboy/2.3/manual/cowboy_req.read_urlencoded_body/index.html b/docs/en/cowboy/2.3/manual/cowboy_req.read_urlencoded_body/index.html
index 23b33f3e..7f229d60 100644
--- a/docs/en/cowboy/2.3/manual/cowboy_req.read_urlencoded_body/index.html
+++ b/docs/en/cowboy/2.3/manual/cowboy_req.read_urlencoded_body/index.html
@@ -62,126 +62,64 @@
<h1 class="lined-header"><span>cowboy_req:read_urlencoded_body(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:read_urlencoded_body - Read and parse a urlencoded request body</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:read_urlencoded_body - Read and parse a urlencoded request body</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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_urlencoded_body</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">read_urlencoded_body</span></span>(<span style="color: #009900">Req</span>, #{})
-
-<span style="font-weight: bold"><span style="color: #000000">read_urlencoded_body</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: #FF6600">ok</span>, <span style="color: #009900">Body</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">Body</span> <span style="color: #990000">::</span> [{<span style="color: #009900">Key</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="color: #009900">Value</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>() | <span style="color: #000080">true</span>}]</tt></pre></div></div>
-<div class="paragraph"><p>Read and parse a urlencoded request body.</p></div>
-<div class="paragraph"><p>This function reads the request body and parses it as
-<code>application/x-www-form-urlencoded</code>. It returns a list
-of key/values.</p></div>
-<div class="paragraph"><p>The urlencoded media type is used by Web browsers when
-submitting HTML forms using the POST method.</p></div>
-<div class="paragraph"><p>Cowboy needs to read the full body before parsing. By default
-it will read bodies of size up to 64KB. It is possible to
-provide options to read larger bodies if required.</p></div>
-<div class="paragraph"><p>Cowboy will automatically handle protocol details including
-the expect header, chunked transfer-encoding and others.</p></div>
-<div class="paragraph"><p>Once the body has been read, Cowboy sets the content-length
-header if it was not previously provided.</p></div>
-<div class="paragraph"><p>This function can only be called once. Calling it again will
-result in undefined behavior.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">read_urlencoded_body</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> <b><font color="#000000">read_urlencoded_body</font></b>(<font color="#009900">Req</font>, #{})
+
+<b><font color="#000000">read_urlencoded_body</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>(), <font color="#009900">Opts</font>)
+ <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <font color="#009900">Body</font>, <font color="#009900">Req</font>}
+
+<font color="#009900">Opts</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:read_body_opts</font></b>()
+<font color="#009900">Body</font> <font color="#990000">::</font> [{<font color="#009900">Key</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() | <font color="#000080">true</font>}]</tt></pre>
+</div></div>
+<p>Read and parse a urlencoded request body.</p>
+<p>This function reads the request body and parses it as <code>application/x-www-form-urlencoded</code>. It returns a list of key/values.</p>
+<p>The urlencoded media type is used by Web browsers when submitting HTML forms using the POST method.</p>
+<p>Cowboy needs to read the full body before parsing. By default it will read bodies of size up to 64KB. It is possible to provide options to read larger bodies if required.</p>
+<p>Cowboy will automatically handle protocol details including the expect header, chunked transfer-encoding and others.</p>
+<p>Once the body has been read, Cowboy sets the content-length header if it was not previously provided.</p>
+<p>This function can only be called once. Calling it again will result in undefined behavior.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-<dt class="hdlist1">
-Opts
-</dt>
-<dd>
-<p>
-A map of body reading options. Please refer to
-<a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a>
-for details about each option.
-</p>
-<div class="paragraph"><p>This function defaults the <code>length</code> to 64KB and the <code>period</code>
-to 5 seconds.</p></div>
+<dt>Opts</dt>
+<dd><p>A map of body reading options. Please refer to <a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a> for details about each option.</p>
+<p>This function defaults the <code>length</code> to 64KB and the <code>period</code> to 5 seconds.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>An <code>ok</code> tuple is returned containing a list of key/values found
-in the body.</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.
-For example it may have an added content-length header once the
-body has been read.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>An <code>ok</code> tuple is returned containing a list of key/values found in the body.</p>
+<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. For example it may have an added content-length header once the body has been read.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced. Replaces <code>body_qs/1,2</code>.
-</p>
+<ul><li><strong>2.0</strong>: Function introduced. Replaces <code>body_qs/1,2</code>.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Read a urlencoded body</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Read a urlencoded body</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: #FF6600">ok</span>, <span style="color: #009900">Body</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:read_urlencoded_body</span></span>(<span style="color: #009900">Req0</span>),
-{<span style="color: #990000">_</span>, <span style="color: #009900">Lang</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">lists:keyfind</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"lang"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #993399">1</span>, <span style="color: #009900">Body</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Allow large urlencoded bodies</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#009900">Body</font>, <font color="#009900">Req</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:read_urlencoded_body</font></b>(<font color="#009900">Req0</font>),
+{<font color="#990000">_</font>, <font color="#009900">Lang</font>} <font color="#990000">=</font> <b><font color="#000000">lists:keyfind</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"lang"</font><font color="#990000">&gt;&gt;</font>, <font color="#993399">1</font>, <font color="#009900">Body</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Allow large urlencoded bodies</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: #FF6600">ok</span>, <span style="color: #009900">Body</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:read_urlencoded_body</span></span>(<span style="color: #009900">Req0</span>, #{<span style="font-weight: bold"><span style="color: #000080">length</span></span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">1000000</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#009900">Body</font>, <font color="#009900">Req</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:read_urlencoded_body</font></b>(<font color="#009900">Req0</font>, #{<b><font color="#000080">length</font></b> <font color="#990000">=&gt;</font> <font color="#993399">1000000</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
<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.has_body">cowboy_req:has_body(3)</a>,
-<a href="../cowboy_req.body_length">cowboy_req:body_length(3)</a>,
-<a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a>,
-<a href="../cowboy_req.read_part">cowboy_req:read_part(3)</a>,
-<a href="../cowboy_req.read_part_body">cowboy_req:read_part_body(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.has_body">cowboy_req:has_body(3)</a>, <a href="../cowboy_req.body_length">cowboy_req:body_length(3)</a>, <a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a>, <a href="../cowboy_req.read_part">cowboy_req:read_part(3)</a>, <a href="../cowboy_req.read_part_body">cowboy_req:read_part_body(3)</a></p>
+
diff --git a/docs/en/cowboy/2.3/manual/cowboy_req.reply/index.html b/docs/en/cowboy/2.3/manual/cowboy_req.reply/index.html
index 602df6ad..564db588 100644
--- a/docs/en/cowboy/2.3/manual/cowboy_req.reply/index.html
+++ b/docs/en/cowboy/2.3/manual/cowboy_req.reply/index.html
@@ -62,165 +62,87 @@
<h1 class="lined-header"><span>cowboy_req:reply(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:reply - Send the response</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:reply - Send the response</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">reply</span></span>(<span style="color: #009900">Status</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">reply</span></span>(<span style="color: #009900">StatusCode</span>, #{}, <span style="color: #009900">Req</span>)
-
-<span style="font-weight: bold"><span style="color: #000000">reply</span></span>(<span style="color: #009900">Status</span>, <span style="color: #009900">Headers</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">Req</span>
-
-<span style="font-weight: bold"><span style="color: #000000">reply</span></span>(<span style="color: #009900">Status</span>, <span style="color: #009900">Headers</span>, <span style="color: #009900">Body</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">Req</span>
-
-<span style="color: #009900">Status</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:http_status</span></span>()
-<span style="color: #009900">Headers</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:http_headers</span></span>()
-<span style="color: #009900">Body</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:resp_body</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Send the response.</p></div>
-<div class="paragraph"><p>The header names must be given as lowercase binary strings.
-While header names are case insensitive, Cowboy requires them
-to be given as lowercase to function properly.</p></div>
-<div class="paragraph"><p>Cowboy does not allow duplicate header names. Headers set
-by this function may overwrite those set by <code>set_resp_header/3</code>
-and <code>set_resp_headers/2</code>.</p></div>
-<div class="paragraph"><p>Use <a href="../cowboy_req.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a>
-instead of this function to set cookies.</p></div>
-<div class="paragraph"><p>The <code>reply/2,3</code> functions will send the body set previously,
-if any. The <code>reply/4</code> function always sends the given body,
-overriding any previously set.</p></div>
-<div class="paragraph"><p>You do not need to set the content-length header when
-sending a response body. Cowboy takes care of it automatically.
-You should however provide a content-type header.</p></div>
-<div class="paragraph"><p>No further data can be transmitted after this function
-returns. This includes the push mechanism. Attempting to
-send two replies, or to push resources after a reply has
-been sent, will result in an error.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">reply</font></b>(<font color="#009900">Status</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> <b><font color="#000000">reply</font></b>(<font color="#009900">StatusCode</font>, #{}, <font color="#009900">Req</font>)
+
+<b><font color="#000000">reply</font></b>(<font color="#009900">Status</font>, <font color="#009900">Headers</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> <font color="#009900">Req</font>
+
+<b><font color="#000000">reply</font></b>(<font color="#009900">Status</font>, <font color="#009900">Headers</font>, <font color="#009900">Body</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> <font color="#009900">Req</font>
+
+<font color="#009900">Status</font> <font color="#990000">::</font> <b><font color="#000000">cowboy:http_status</font></b>()
+<font color="#009900">Headers</font> <font color="#990000">::</font> <b><font color="#000000">cowboy:http_headers</font></b>()
+<font color="#009900">Body</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:resp_body</font></b>()</tt></pre>
+</div></div>
+<p>Send the response.</p>
+<p>The header names must be given as lowercase binary strings. While header names are case insensitive, Cowboy requires them to be given as lowercase to function properly.</p>
+<p>Cowboy does not allow duplicate header names. Headers set by this function may overwrite those set by <code>set_resp_header/3</code> and <code>set_resp_headers/2</code>.</p>
+<p>Use <a href="../cowboy_req.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a> instead of this function to set cookies.</p>
+<p>The <code>reply/2,3</code> functions will send the body set previously, if any. The <code>reply/4</code> function always sends the given body, overriding any previously set.</p>
+<p>You do not need to set the content-length header when sending a response body. Cowboy takes care of it automatically. You should however provide a content-type header.</p>
+<p>No further data can be transmitted after this function returns. This includes the push mechanism. Attempting to send two replies, or to push resources after a reply has been sent, will result in an error.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Status
-</dt>
-<dd>
-<p>
-The status code for the response.
-</p>
+<dl><dt>Status</dt>
+<dd><p>The status code for the response.</p>
</dd>
-<dt class="hdlist1">
-Headers
-</dt>
-<dd>
-<p>
-The response headers.
-</p>
+<dt>Headers</dt>
+<dd><p>The response headers.</p>
</dd>
-</dl></div>
-<div class="paragraph"><p>Header names must be given as lowercase binary strings.</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Body
-</dt>
-<dd>
-<p>
-The body can be either a binary value, an iolist or a
-<code>sendfile</code> tuple telling Cowboy to send the contents of
-a file.
-</p>
+</dl>
+<p>Header names must be given as lowercase binary strings.</p>
+<dl><dt>Body</dt>
+<dd><p>The body can be either a binary value, an iolist or a <code>sendfile</code> tuple telling Cowboy to send the contents of a file.</p>
</dd>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A new Req object is returned.</p></div>
-<div class="paragraph"><p>The returned Req object should be used from that point onward
-as it contains updated information about the state of the request.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>A new Req object is returned.</p>
+<p>The returned Req object should be used from that point onward as it contains updated information about the state of the request.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Only the Req is returned, it is no longer wrapped in a tuple.
-</p>
+<ul><li><strong>2.0</strong>: Only the Req is returned, it is no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Reply</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Reply</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: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:reply</span></span>(<span style="color: #993399">404</span>, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Reply with custom headers</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:reply</font></b>(<font color="#993399">404</font>, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Reply with custom 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">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">401</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"www-authenticate"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Basic realm=\"erlang.org\""</span><span style="color: #990000">&gt;&gt;</span>
-}, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Reply with custom headers and a body</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:reply</font></b>(<font color="#993399">401</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"www-authenticate"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"Basic realm=\"erlang.org\""</font><font color="#990000">&gt;&gt;</font>
+}, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Reply with custom headers and a body</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: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:reply</span></span>(<span style="color: #993399">200</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/plain"</span><span style="color: #990000">&gt;&gt;</span>
-}, <span style="color: #FF0000">"Hello world!"</span>, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:reply</font></b>(<font color="#993399">200</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/plain"</font><font color="#990000">&gt;&gt;</font>
+}, <font color="#FF0000">"Hello world!"</font>, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a>,
-<a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a>,
-<a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a>,
-<a href="../cowboy_req.set_resp_body">cowboy_req:set_resp_body(3)</a>,
-<a href="../cowboy_req.inform">cowboy_req:inform(3)</a>,
-<a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a>,
-<a href="../cowboy_req.push">cowboy_req:push(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a>, <a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a>, <a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a>, <a href="../cowboy_req.set_resp_body">cowboy_req:set_resp_body(3)</a>, <a href="../cowboy_req.inform">cowboy_req:inform(3)</a>, <a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a>, <a href="../cowboy_req.push">cowboy_req:push(3)</a></p>
+
diff --git a/docs/en/cowboy/2.3/manual/cowboy_req.resp_header/index.html b/docs/en/cowboy/2.3/manual/cowboy_req.resp_header/index.html
index 1c82f05d..cf70d271 100644
--- a/docs/en/cowboy/2.3/manual/cowboy_req.resp_header/index.html
+++ b/docs/en/cowboy/2.3/manual/cowboy_req.resp_header/index.html
@@ -62,113 +62,58 @@
<h1 class="lined-header"><span>cowboy_req:resp_header(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:resp_header - Response header</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:resp_header - Response header</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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_header</span></span>(<span style="color: #009900">Name</span>, <span style="color: #009900">Req</span>) <span style="color: #990000">-&gt;</span> <span style="font-weight: bold"><span style="color: #000000">resp_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">resp_header</span></span>(<span style="color: #009900">Name</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">Name</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: #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">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>Return the value for the given response header.</p></div>
-<div class="paragraph"><p>The response header must have been set previously using
-<a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a> or
-<a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a>.</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>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">resp_header</font></b>(<font color="#009900">Name</font>, <font color="#009900">Req</font>) <font color="#990000">-&gt;</font> <b><font color="#000000">resp_header</font></b>(<font color="#009900">Name</font>, <font color="#009900">Req</font>, <font color="#000080">undefined</font>)
+<b><font color="#000000">resp_header</font></b>(<font color="#009900">Name</font>, <font color="#009900">Req</font>, <font color="#009900">Default</font>) <font color="#990000">-&gt;</font> <b><font color="#000080">binary</font></b>() | <font color="#009900">Default</font>
+
+<font color="#009900">Name</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% lowercase; case insensitive</font></i>
+<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()</tt></pre>
+</div></div>
+<p>Return the value for the given response header.</p>
+<p>The response header must have been set previously using <a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a> or <a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a>.</p>
+<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>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Name
-</dt>
-<dd>
-<p>
-Desired response header name as a lowercase binary string.
-</p>
+<dl><dt>Name</dt>
+<dd><p>Desired response header name as a lowercase binary string.</p>
</dd>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dt>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>
+<dt>Default</dt>
+<dd><p>Default value returned when the header is missing.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<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">
+<p>The header value is returned as a binary string. When the header is missing, the default argument is returned.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced.
-</p>
+<ul><li><strong>2.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Get the content-type response header</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Get the content-type response 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">Type</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:resp_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</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-type response header with a default value</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Type</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:resp_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Get the content-type response 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">Type</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:resp_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</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">"text/html"</span><span style="color: #990000">&gt;&gt;</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Type</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:resp_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/html"</font><font color="#990000">&gt;&gt;</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.resp_headers">cowboy_req:resp_headers(3)</a>,
-<a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a>,
-<a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.resp_headers">cowboy_req:resp_headers(3)</a>, <a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a>, <a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a></p>
+
diff --git a/docs/en/cowboy/2.3/manual/cowboy_req.resp_headers/index.html b/docs/en/cowboy/2.3/manual/cowboy_req.resp_headers/index.html
index dcd1aca6..19110153 100644
--- a/docs/en/cowboy/2.3/manual/cowboy_req.resp_headers/index.html
+++ b/docs/en/cowboy/2.3/manual/cowboy_req.resp_headers/index.html
@@ -62,79 +62,38 @@
<h1 class="lined-header"><span>cowboy_req:resp_headers(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:resp_headers - Response headers</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:resp_headers - Response headers</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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_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 response headers.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">resp_headers</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <b><font color="#000000">cowboy:http_headers</font></b>()</tt></pre>
+</div></div>
+<p>Return all response headers.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<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">
+<p>Headers are returned as a map with keys being lowercase binary strings, and values as binary strings.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced.
-</p>
+<ul><li><strong>2.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Get all response headers</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Get all response 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:resp_headers</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Headers</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:resp_headers</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.resp_header">cowboy_req:resp_header(3)</a>,
-<a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a>,
-<a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.resp_header">cowboy_req:resp_header(3)</a>, <a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a>, <a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a></p>
+
diff --git a/docs/en/cowboy/2.3/manual/cowboy_req.scheme/index.html b/docs/en/cowboy/2.3/manual/cowboy_req.scheme/index.html
index 4c83810f..94763a2c 100644
--- a/docs/en/cowboy/2.3/manual/cowboy_req.scheme/index.html
+++ b/docs/en/cowboy/2.3/manual/cowboy_req.scheme/index.html
@@ -62,89 +62,52 @@
<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">
+<p>cowboy_req:scheme - URI scheme</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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
+<pre><tt><b><font color="#000000">scheme</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <font color="#009900">Scheme</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()</tt></pre>
+</div></div>
+<p>Return the scheme of the effective request URI.</p>
+<p>The scheme can also be obtained using pattern matching:</p>
+<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">
+<pre><tt>#{<font color="#FF6600">scheme</font> <font color="#990000">:=</font> <font color="#009900">Scheme</font>} <font color="#990000">=</font> <font color="#009900">Req</font><font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<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">
+<p>The scheme is returned as a binary. It is case insensitive.</p>
+<p>Cowboy will only set the scheme to <code>&lt;&lt;&quot;http&quot;&gt;&gt;</code> or <code>&lt;&lt;&quot;https&quot;&gt;&gt;</code>.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced.
-</p>
+<ul><li><strong>2.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<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
+<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">
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req0</font><font color="#990000">=</font>#{<font color="#FF6600">scheme</font> <font color="#990000">:=</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"http"</font><font color="#990000">&gt;&gt;</font>}, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ <font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:reply</font></b>(<font color="#993399">302</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"location"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <b><font color="#000000">cowboy_req:uri</font></b>(<font color="#009900">Req</font>, #{<font color="#0000FF">scheme</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"https"</font><font color="#990000">&gt;&gt;</font>})
+ }, <font color="#009900">Req0</font>),
+ {<font color="#FF6600">ok</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>};
+<b><font color="#000000">init</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">cowboy_rest</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
<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>
+<p><a href="../cowboy_req">cowboy_req(3)</a></p>
+
diff --git a/docs/en/cowboy/2.3/manual/cowboy_req.set_resp_body/index.html b/docs/en/cowboy/2.3/manual/cowboy_req.set_resp_body/index.html
index da393ed3..f48bf4be 100644
--- a/docs/en/cowboy/2.3/manual/cowboy_req.set_resp_body/index.html
+++ b/docs/en/cowboy/2.3/manual/cowboy_req.set_resp_body/index.html
@@ -62,138 +62,79 @@
<h1 class="lined-header"><span>cowboy_req:set_resp_body(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:set_resp_body - Set the response body</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:set_resp_body - Set the response body</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">set_resp_body</span></span>(<span style="color: #009900">Body</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">Req</span>
-
-<span style="color: #009900">Body</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:resp_body</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Set the response body.</p></div>
-<div class="paragraph"><p>The response body will be sent when a reply is initiated.
-Note that the functions <code>stream_reply/2,3</code> and <code>reply/4</code>
-will override the body set by this function.</p></div>
-<div class="paragraph"><p>This function can also be used to remove a response body
-that was set previously. To do so, simply call this function
-with an empty body.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">set_resp_body</font></b>(<font color="#009900">Body</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> <font color="#009900">Req</font>
+
+<font color="#009900">Body</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:resp_body</font></b>()</tt></pre>
+</div></div>
+<p>Set the response body.</p>
+<p>The response body will be sent when a reply is initiated. Note that the functions <code>stream_reply/2,3</code> and <code>reply/4</code> will override the body set by this function.</p>
+<p>This function can also be used to remove a response body that was set previously. To do so, simply call this function with an empty body.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Body
-</dt>
-<dd>
-<p>
-The body can be either a binary value, an iolist or a
-<code>sendfile</code> tuple telling Cowboy to send the contents of
-a file.
-</p>
+<dl><dt>Body</dt>
+<dd><p>The body can be either a binary value, an iolist or a <code>sendfile</code> tuple telling Cowboy to send the contents of a file.</p>
</dd>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A new Req object is returned.</p></div>
-<div class="paragraph"><p>The returned Req object must be used from that point onward,
-otherwise the body will not be sent in the response.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>A new Req object is returned.</p>
+<p>The returned Req object must be used from that point onward, otherwise the body will not be sent in the response.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: The function now accepts a <code>sendfile</code> tuple.
-</p>
+<ul><li><strong>2.0</strong>: The function now accepts a <code>sendfile</code> tuple.
</li>
-<li>
-<p>
-<strong>2.0</strong>: The <code>set_resp_body_fun/2,3</code> functions were removed.
-</p>
+<li><strong>2.0</strong>: The <code>set_resp_body_fun/2,3</code> functions were removed.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Set the response body</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Set the response body</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: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_body</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Hello world!"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Set the response body as an iolist</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_body</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"Hello world!"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Set the response body as an iolist</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: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_body</span></span>([
- <span style="color: #FF0000">"&lt;html&gt;&lt;head&gt;&lt;title&gt;"</span>,
- <span style="font-weight: bold"><span style="color: #000000">page_title</span></span>(),
- <span style="color: #FF0000">"&lt;/title&gt;&lt;/head&gt;&lt;body&gt;"</span>,
- <span style="font-weight: bold"><span style="color: #000000">page_body</span></span>(),
- <span style="color: #FF0000">"&lt;/body&gt;&lt;/html&gt;"</span>
-], <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Tell Cowboy to send data from a file</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_body</font></b>([
+ <font color="#FF0000">"&lt;html&gt;&lt;head&gt;&lt;title&gt;"</font>,
+ <b><font color="#000000">page_title</font></b>(),
+ <font color="#FF0000">"&lt;/title&gt;&lt;/head&gt;&lt;body&gt;"</font>,
+ <b><font color="#000000">page_body</font></b>(),
+ <font color="#FF0000">"&lt;/body&gt;&lt;/html&gt;"</font>
+], <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Tell Cowboy to send data from a file</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: #FF6600">ok</span>, <span style="color: #008080">#file_info</span>{<span style="font-weight: bold"><span style="color: #000080">size</span></span><span style="color: #990000">=</span><span style="color: #009900">Size</span>}} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">file:read_file_info</span></span>(<span style="color: #009900">Filename</span>),
-<span style="color: #009900">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_body</span></span>({<span style="color: #FF6600">sendfile</span>, <span style="color: #993399">0</span>, <span style="color: #009900">Size</span>, <span style="color: #009900">Filename</span>}, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Clear any previously set response body</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#008080">#file_info</font>{<b><font color="#000080">size</font></b><font color="#990000">=</font><font color="#009900">Size</font>}} <font color="#990000">=</font> <b><font color="#000000">file:read_file_info</font></b>(<font color="#009900">Filename</font>),
+<font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_body</font></b>({<font color="#FF6600">sendfile</font>, <font color="#993399">0</font>, <font color="#009900">Size</font>, <font color="#009900">Filename</font>}, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Clear any previously set response body</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: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_body</span></span>(<span style="color: #990000">&lt;&lt;&gt;&gt;</span>, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_body</font></b>(<font color="#990000">&lt;&lt;&gt;&gt;</font>, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.set_resp_header">cowboy_req:set_resp_header(3)</a>,
-<a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a>,
-<a href="../cowboy_req.reply">cowboy_req:reply(3)</a>,
-<a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a>, <a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a>, <a href="../cowboy_req.reply">cowboy_req:reply(3)</a>, <a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a></p>
+
diff --git a/docs/en/cowboy/2.3/manual/cowboy_req.set_resp_cookie/index.html b/docs/en/cowboy/2.3/manual/cowboy_req.set_resp_cookie/index.html
index d26cd71d..f539ceda 100644
--- a/docs/en/cowboy/2.3/manual/cowboy_req.set_resp_cookie/index.html
+++ b/docs/en/cowboy/2.3/manual/cowboy_req.set_resp_cookie/index.html
@@ -62,167 +62,104 @@
<h1 class="lined-header"><span>cowboy_req:set_resp_cookie(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:set_resp_cookie - Set a cookie</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:set_resp_cookie - Set a cookie</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">set_resp_cookie</span></span>(<span style="color: #009900">Name</span>, <span style="color: #009900">Value</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">set_resp_cookie</span></span>(<span style="color: #009900">Name</span>, <span style="color: #009900">Value</span>, [], <span style="color: #009900">Req</span>)
-
-<span style="font-weight: bold"><span style="color: #000000">set_resp_cookie</span></span>(<span style="color: #009900">Name</span>, <span style="color: #009900">Value</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">Req</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="font-style: italic"><span style="color: #9A1900">%% case sensitive</span></span>
-<span style="color: #009900">Value</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>() <span style="font-style: italic"><span style="color: #9A1900">%% case sensitive</span></span>
-<span style="color: #009900">Opts</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cow_cookie:cookie_opts</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Set a cookie to be sent with the response.</p></div>
-<div class="paragraph"><p>Note that cookie names are case sensitive.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">set_resp_cookie</font></b>(<font color="#009900">Name</font>, <font color="#009900">Value</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> <b><font color="#000000">set_resp_cookie</font></b>(<font color="#009900">Name</font>, <font color="#009900">Value</font>, [], <font color="#009900">Req</font>)
+
+<b><font color="#000000">set_resp_cookie</font></b>(<font color="#009900">Name</font>, <font color="#009900">Value</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>(), <font color="#009900">Opts</font>)
+ <font color="#990000">-&gt;</font> <font color="#009900">Req</font>
+
+<font color="#009900">Name</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case sensitive</font></i>
+<font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000000">iodata</font></b>() <i><font color="#9A1900">%% case sensitive</font></i>
+<font color="#009900">Opts</font> <font color="#990000">::</font> <b><font color="#000000">cow_cookie:cookie_opts</font></b>()</tt></pre>
+</div></div>
+<p>Set a cookie to be sent with the response.</p>
+<p>Note that cookie names are case sensitive.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Name
-</dt>
-<dd>
-<p>
-Cookie name.
-</p>
+<dl><dt>Name</dt>
+<dd><p>Cookie name.</p>
</dd>
-<dt class="hdlist1">
-Value
-</dt>
-<dd>
-<p>
-Cookie value.
-</p>
+<dt>Value</dt>
+<dd><p>Cookie value.</p>
</dd>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-<dt class="hdlist1">
-Opts
-</dt>
-<dd>
-<p>
-Cookie options.
-</p>
+<dt>Opts</dt>
+<dd><p>Cookie options.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A new Req object is returned.</p></div>
-<div class="paragraph"><p>The returned Req object must be used from that point onward,
-otherwise the cookie will not be sent in the response.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>A new Req object is returned.</p>
+<p>The returned Req object must be used from that point onward, otherwise the cookie will not be sent in the response.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: <code>set_resp_cookie/3</code> introduced as an alias to <code>set_resp_cookie/4</code> with no options.
-</p>
+<ul><li><strong>2.0</strong>: <code>set_resp_cookie/3</code> introduced as an alias to <code>set_resp_cookie/4</code> with no options.
</li>
-<li>
-<p>
-<strong>2.0</strong>: The first argument type is now <code>binary()</code> instead of <code>iodata()</code>.
-</p>
+<li><strong>2.0</strong>: The first argument type is now <code>binary()</code> instead of <code>iodata()</code>.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Set a session cookie</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Set a session cookie</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">SessionID</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">base64:encode</span></span>(<span style="font-weight: bold"><span style="color: #000000">crypto:strong_rand_bytes</span></span>(<span style="color: #993399">32</span>)),
-<span style="color: #009900">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_cookie</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"sessionid"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">SessionID</span>, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Set a cookie with an expiration time</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">SessionID</font> <font color="#990000">=</font> <b><font color="#000000">base64:encode</font></b>(<b><font color="#000000">crypto:strong_rand_bytes</font></b>(<font color="#993399">32</font>)),
+<font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_cookie</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"sessionid"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">SessionID</font>, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Set a cookie with an expiration time</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: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_cookie</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"lang"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"fr-FR"</span><span style="color: #990000">&gt;&gt;</span>,
- <span style="color: #009900">Req0</span>, #{<span style="color: #0000FF">max_age</span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">3600</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Delete a cookie</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_cookie</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"lang"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"fr-FR"</font><font color="#990000">&gt;&gt;</font>,
+ <font color="#009900">Req0</font>, #{<font color="#0000FF">max_age</font> <font color="#990000">=&gt;</font> <font color="#993399">3600</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Delete a cookie</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: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_cookie</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"sessionid"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;&gt;&gt;</span>,
- <span style="color: #009900">Req0</span>, #{<span style="color: #0000FF">max_age</span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">0</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Set a cookie for a specific domain and path</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_cookie</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"sessionid"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;&gt;&gt;</font>,
+ <font color="#009900">Req0</font>, #{<font color="#0000FF">max_age</font> <font color="#990000">=&gt;</font> <font color="#993399">0</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Set a cookie for a specific domain and 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">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_cookie</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"inaccount"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"1"</span><span style="color: #990000">&gt;&gt;</span>,
- <span style="color: #009900">Req0</span>, #{<span style="color: #0000FF">domain</span> <span style="color: #990000">=&gt;</span> <span style="color: #FF0000">"my.example.org"</span>, <span style="color: #0000FF">path</span> <span style="color: #990000">=&gt;</span> <span style="color: #FF0000">"/account"</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Restrict a cookie to HTTPS</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_cookie</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"inaccount"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"1"</font><font color="#990000">&gt;&gt;</font>,
+ <font color="#009900">Req0</font>, #{<font color="#0000FF">domain</font> <font color="#990000">=&gt;</font> <font color="#FF0000">"my.example.org"</font>, <font color="#0000FF">path</font> <font color="#990000">=&gt;</font> <font color="#FF0000">"/account"</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Restrict a cookie 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="color: #009900">SessionID</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">base64:encode</span></span>(<span style="font-weight: bold"><span style="color: #000000">crypto:strong_rand_bytes</span></span>(<span style="color: #993399">32</span>)),
-<span style="color: #009900">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_cookie</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"sessionid"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">SessionID</span>,
- <span style="color: #009900">Req0</span>, #{<span style="color: #0000FF">secure</span> <span style="color: #990000">=&gt;</span> <span style="color: #000080">true</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Restrict a cookie to HTTP</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">SessionID</font> <font color="#990000">=</font> <b><font color="#000000">base64:encode</font></b>(<b><font color="#000000">crypto:strong_rand_bytes</font></b>(<font color="#993399">32</font>)),
+<font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_cookie</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"sessionid"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">SessionID</font>,
+ <font color="#009900">Req0</font>, #{<font color="#0000FF">secure</font> <font color="#990000">=&gt;</font> <font color="#000080">true</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Restrict a cookie to HTTP</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">SessionID</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">base64:encode</span></span>(<span style="font-weight: bold"><span style="color: #000000">crypto:strong_rand_bytes</span></span>(<span style="color: #993399">32</span>)),
-<span style="color: #009900">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_cookie</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"sessionid"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">SessionID</span>,
- <span style="color: #009900">Req0</span>, #{<span style="color: #0000FF">http_only</span> <span style="color: #990000">=&gt;</span> <span style="color: #000080">true</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">SessionID</font> <font color="#990000">=</font> <b><font color="#000000">base64:encode</font></b>(<b><font color="#000000">crypto:strong_rand_bytes</font></b>(<font color="#993399">32</font>)),
+<font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_cookie</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"sessionid"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">SessionID</font>,
+ <font color="#009900">Req0</font>, #{<font color="#0000FF">http_only</font> <font color="#990000">=&gt;</font> <font color="#000080">true</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
<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.set_resp_header">cowboy_req:set_resp_header(3)</a>,
-<a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a>,
-<a href="../cowboy_req.reply">cowboy_req:reply(3)</a>,
-<a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a>, <a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a>, <a href="../cowboy_req.reply">cowboy_req:reply(3)</a>, <a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a></p>
+
diff --git a/docs/en/cowboy/2.3/manual/cowboy_req.set_resp_header/index.html b/docs/en/cowboy/2.3/manual/cowboy_req.set_resp_header/index.html
index 5877b7f5..fad10beb 100644
--- a/docs/en/cowboy/2.3/manual/cowboy_req.set_resp_header/index.html
+++ b/docs/en/cowboy/2.3/manual/cowboy_req.set_resp_header/index.html
@@ -62,121 +62,60 @@
<h1 class="lined-header"><span>cowboy_req:set_resp_header(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:set_resp_header - Set a response header</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:set_resp_header - Set a response header</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">set_resp_header</span></span>(<span style="color: #009900">Name</span>, <span style="color: #009900">Value</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">Req</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="font-style: italic"><span style="color: #9A1900">%% lowercase; case insensitive</span></span>
-<span style="color: #009900">Value</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>() <span style="font-style: italic"><span style="color: #9A1900">%% case depends on header</span></span></tt></pre></div></div>
-<div class="paragraph"><p>Set a header to be sent with the response.</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>Cowboy does not allow duplicate header names. Headers set
-by this function may be overwritten by those set from the
-reply functions.</p></div>
-<div class="paragraph"><p>Use <a href="../cowboy_req.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a>
-instead of this function to set cookies.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">set_resp_header</font></b>(<font color="#009900">Name</font>, <font color="#009900">Value</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> <font color="#009900">Req</font>
+
+<font color="#009900">Name</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% lowercase; case insensitive</font></i>
+<font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000000">iodata</font></b>() <i><font color="#9A1900">%% case depends on header</font></i></tt></pre>
+</div></div>
+<p>Set a header to be sent with the response.</p>
+<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>
+<p>Cowboy does not allow duplicate header names. Headers set by this function may be overwritten by those set from the reply functions.</p>
+<p>Use <a href="../cowboy_req.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a> instead of this function to set cookies.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Name
-</dt>
-<dd>
-<p>
-Header name as a lowercase binary string.
-</p>
+<dl><dt>Name</dt>
+<dd><p>Header name as a lowercase binary string.</p>
</dd>
-<dt class="hdlist1">
-Value
-</dt>
-<dd>
-<p>
-Header value.
-</p>
+<dt>Value</dt>
+<dd><p>Header value.</p>
</dd>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A new Req object is returned.</p></div>
-<div class="paragraph"><p>The returned Req object must be used from that point onward,
-otherwise the header will not be sent in the response.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>A new Req object is returned.</p>
+<p>The returned Req object must be used from that point onward, otherwise the header will not be sent in the response.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<ul><li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Set a header in the response</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Set a header in the response</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: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"allow"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #FF0000">"GET"</span>, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Construct a header using iolists</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"allow"</font><font color="#990000">&gt;&gt;</font>, <font color="#FF0000">"GET"</font>, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Construct a header using iolists</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: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"allow"</span><span style="color: #990000">&gt;&gt;</span>,
- [<span style="font-weight: bold"><span style="color: #000000">allowed_methods</span></span>(), <span style="color: #FF0000">", OPTIONS"</span>], <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"allow"</font><font color="#990000">&gt;&gt;</font>,
+ [<b><font color="#000000">allowed_methods</font></b>(), <font color="#FF0000">", OPTIONS"</font>], <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a>,
-<a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a>,
-<a href="../cowboy_req.has_resp_header">cowboy_req:has_resp_header(3)</a>,
-<a href="../cowboy_req.resp_header">cowboy_req:resp_header(3)</a>,
-<a href="../cowboy_req.resp_headers">cowboy_req:resp_headers(3)</a>,
-<a href="../cowboy_req.delete_resp_header">cowboy_req:delete_resp_header(3)</a>,
-<a href="../cowboy_req.reply">cowboy_req:reply(3)</a>,
-<a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a>, <a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a>, <a href="../cowboy_req.has_resp_header">cowboy_req:has_resp_header(3)</a>, <a href="../cowboy_req.resp_header">cowboy_req:resp_header(3)</a>, <a href="../cowboy_req.resp_headers">cowboy_req:resp_headers(3)</a>, <a href="../cowboy_req.delete_resp_header">cowboy_req:delete_resp_header(3)</a>, <a href="../cowboy_req.reply">cowboy_req:reply(3)</a>, <a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a></p>
+
diff --git a/docs/en/cowboy/2.3/manual/cowboy_req.set_resp_headers/index.html b/docs/en/cowboy/2.3/manual/cowboy_req.set_resp_headers/index.html
index 9b76cc9f..e22407e6 100644
--- a/docs/en/cowboy/2.3/manual/cowboy_req.set_resp_headers/index.html
+++ b/docs/en/cowboy/2.3/manual/cowboy_req.set_resp_headers/index.html
@@ -62,109 +62,51 @@
<h1 class="lined-header"><span>cowboy_req:set_resp_headers(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:set_resp_headers - Set several response headers</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:set_resp_headers - Set several response headers</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">set_resp_headers</span></span>(<span style="color: #009900">Headers</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">Req</span>
-
-<span style="color: #009900">Headers</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:http_headers</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Set several headers to be sent with the response.</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>Cowboy does not allow duplicate header names. Headers set
-by this function may be overwritten by those set from the
-reply functions. Likewise, headers set by this function may
-overwrite headers that were set previously.</p></div>
-<div class="paragraph"><p>Use <a href="../cowboy_req.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a>
-instead of this function to set cookies.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">set_resp_headers</font></b>(<font color="#009900">Headers</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> <font color="#009900">Req</font>
+
+<font color="#009900">Headers</font> <font color="#990000">::</font> <b><font color="#000000">cowboy:http_headers</font></b>()</tt></pre>
+</div></div>
+<p>Set several headers to be sent with the response.</p>
+<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>
+<p>Cowboy does not allow duplicate header names. Headers set by this function may be overwritten by those set from the reply functions. Likewise, headers set by this function may overwrite headers that were set previously.</p>
+<p>Use <a href="../cowboy_req.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a> instead of this function to set cookies.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Headers
-</dt>
-<dd>
-<p>
-Headers as a map with keys being lowercase binary strings,
-and values as binary strings.
-</p>
+<dl><dt>Headers</dt>
+<dd><p>Headers as a map with keys being lowercase binary strings, and values as binary strings.</p>
</dd>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A new Req object is returned.</p></div>
-<div class="paragraph"><p>The returned Req object must be used from that point onward,
-otherwise the headers will not be sent in the response.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>A new Req object is returned.</p>
+<p>The returned Req object must be used from that point onward, otherwise the headers will not be sent in the response.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced.
-</p>
+<ul><li><strong>2.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Set several response headers</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Set several response 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">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_headers</span></span>(#{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/html"</span><span style="color: #990000">&gt;&gt;</span>,
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-encoding"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"gzip"</span><span style="color: #990000">&gt;&gt;</span>
-}, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_headers</font></b>(#{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/html"</font><font color="#990000">&gt;&gt;</font>,
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-encoding"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"gzip"</font><font color="#990000">&gt;&gt;</font>
+}, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a>,
-<a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a>,
-<a href="../cowboy_req.has_resp_header">cowboy_req:has_resp_header(3)</a>,
-<a href="../cowboy_req.resp_header">cowboy_req:resp_header(3)</a>,
-<a href="../cowboy_req.resp_headers">cowboy_req:resp_headers(3)</a>,
-<a href="../cowboy_req.delete_resp_header">cowboy_req:delete_resp_header(3)</a>,
-<a href="../cowboy_req.reply">cowboy_req:reply(3)</a>,
-<a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a>, <a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a>, <a href="../cowboy_req.has_resp_header">cowboy_req:has_resp_header(3)</a>, <a href="../cowboy_req.resp_header">cowboy_req:resp_header(3)</a>, <a href="../cowboy_req.resp_headers">cowboy_req:resp_headers(3)</a>, <a href="../cowboy_req.delete_resp_header">cowboy_req:delete_resp_header(3)</a>, <a href="../cowboy_req.reply">cowboy_req:reply(3)</a>, <a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a></p>
+
diff --git a/docs/en/cowboy/2.3/manual/cowboy_req.sock/index.html b/docs/en/cowboy/2.3/manual/cowboy_req.sock/index.html
index 8441d5cb..ca729f96 100644
--- a/docs/en/cowboy/2.3/manual/cowboy_req.sock/index.html
+++ b/docs/en/cowboy/2.3/manual/cowboy_req.sock/index.html
@@ -62,86 +62,47 @@
<h1 class="lined-header"><span>cowboy_req:sock(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:sock - Socket address and port</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:sock - Socket address and port</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">sock</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">Info</span>
+<pre><tt><b><font color="#000000">sock</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <font color="#009900">Info</font>
-<span style="color: #009900">Info</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 socket&#8217;s IP address and port number.</p></div>
-<div class="paragraph"><p>The socket information can also be obtained using pattern matching:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<font color="#009900">Info</font> <font color="#990000">::</font> {<b><font color="#000000">inet:ip_address</font></b>(), <b><font color="#000000">inet:port_number</font></b>()}</tt></pre>
+</div></div>
+<p>Return the socket&apos;s IP address and port number.</p>
+<p>The socket information can also be obtained using pattern matching:</p>
+<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">sock</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">
+<pre><tt>#{<font color="#FF6600">sock</font> <font color="#990000">:=</font> {<font color="#009900">IP</font>, <font color="#009900">Port</font>}} <font color="#990000">=</font> <font color="#009900">Req</font><font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The socket&#8217;s local IP address and port number.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The socket&apos;s local IP address and port number.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.1</strong>: Function introduced.
-</p>
+<ul><li><strong>2.1</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Get the socket&#8217;s IP address and port number.</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Get the socket&apos;s 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:sock</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#009900">IP</font>, <font color="#009900">Port</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:sock</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.peer">cowboy_req:peer(3)</a>,
-<a href="../cowboy_req.cert">cowboy_req:cert(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.peer">cowboy_req:peer(3)</a>, <a href="../cowboy_req.cert">cowboy_req:cert(3)</a></p>
+
diff --git a/docs/en/cowboy/2.3/manual/cowboy_req.stream_body/index.html b/docs/en/cowboy/2.3/manual/cowboy_req.stream_body/index.html
index 350c7e27..cd264e0d 100644
--- a/docs/en/cowboy/2.3/manual/cowboy_req.stream_body/index.html
+++ b/docs/en/cowboy/2.3/manual/cowboy_req.stream_body/index.html
@@ -62,119 +62,56 @@
<h1 class="lined-header"><span>cowboy_req:stream_body(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:stream_body - Stream the response body</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:stream_body - Stream the response body</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">stream_body</span></span>(<span style="color: #009900">Data</span>, <span style="color: #009900">IsFin</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: #FF6600">ok</span>
-
-<span style="color: #009900">Data</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>()
-<span style="color: #009900">IsFin</span> <span style="color: #990000">::</span> <span style="color: #FF6600">fin</span> | <span style="color: #FF6600">nofin</span></tt></pre></div></div>
-<div class="paragraph"><p>Stream the response body.</p></div>
-<div class="paragraph"><p>This function may be called as many times as needed after
-initiating a response using the
-<a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a>
-function.</p></div>
-<div class="paragraph"><p>The second argument indicates if this call is the final
-call. Use the <code>nofin</code> value until you know no more data
-will be sent. The final call should use <code>fin</code> (possibly
-with an empty data value) or be a call to the
-<a href="../cowboy_req.stream_trailers">cowboy_req:stream_trailers(3)</a>
-function.</p></div>
-<div class="paragraph"><p>Note that not using <code>fin</code> for the final call is not an
-error; Cowboy will take care of it when the request
-handler terminates if needed. Depending on the resource
-it may however be more efficient to do it as early as
-possible.</p></div>
-<div class="paragraph"><p>You do not need to handle HEAD requests specifically as
-Cowboy will ensure no data is sent when you call this function.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">stream_body</font></b>(<font color="#009900">Data</font>, <font color="#009900">IsFin</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <font color="#FF6600">ok</font>
+
+<font color="#009900">Data</font> <font color="#990000">::</font> <b><font color="#000000">iodata</font></b>()
+<font color="#009900">IsFin</font> <font color="#990000">::</font> <font color="#FF6600">fin</font> | <font color="#FF6600">nofin</font></tt></pre>
+</div></div>
+<p>Stream the response body.</p>
+<p>This function may be called as many times as needed after initiating a response using the <a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a> function.</p>
+<p>The second argument indicates if this call is the final call. Use the <code>nofin</code> value until you know no more data will be sent. The final call should use <code>fin</code> (possibly with an empty data value) or be a call to the <a href="../cowboy_req.stream_trailers">cowboy_req:stream_trailers(3)</a> function.</p>
+<p>Note that not using <code>fin</code> for the final call is not an error; Cowboy will take care of it when the request handler terminates if needed. Depending on the resource it may however be more efficient to do it as early as possible.</p>
+<p>You do not need to handle HEAD requests specifically as Cowboy will ensure no data is sent when you call this function.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Data
-</dt>
-<dd>
-<p>
-The data to be sent.
-</p>
+<dl><dt>Data</dt>
+<dd><p>The data to be sent.</p>
</dd>
-<dt class="hdlist1">
-IsFin
-</dt>
-<dd>
-<p>
-A flag indicating whether this is the final piece of data
-to be sent.
-</p>
+<dt>IsFin</dt>
+<dd><p>A flag indicating whether this is the final piece of data to be sent.</p>
</dd>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The atom <code>ok</code> is always returned. It can be safely ignored.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The atom <code>ok</code> is always returned. It can be safely ignored.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced. Replaces <code>chunk/2</code>.
-</p>
+<ul><li><strong>2.0</strong>: Function introduced. Replaces <code>chunk/2</code>.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Stream the response body</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Stream the response body</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: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_reply</span></span>(<span style="color: #993399">200</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/plain"</span><span style="color: #990000">&gt;&gt;</span>
-}, <span style="color: #009900">Req0</span>),
-<span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_body</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Hello\n"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #FF6600">nofin</span>, <span style="color: #009900">Req</span>),
-<span style="font-weight: bold"><span style="color: #000000">timer:sleep</span></span>(<span style="color: #993399">1000</span>),
-<span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_body</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"World!\n"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #FF6600">fin</span>, <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:stream_reply</font></b>(<font color="#993399">200</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/plain"</font><font color="#990000">&gt;&gt;</font>
+}, <font color="#009900">Req0</font>),
+<b><font color="#000000">cowboy_req:stream_body</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"Hello\n"</font><font color="#990000">&gt;&gt;</font>, <font color="#FF6600">nofin</font>, <font color="#009900">Req</font>),
+<b><font color="#000000">timer:sleep</font></b>(<font color="#993399">1000</font>),
+<b><font color="#000000">cowboy_req:stream_body</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"World!\n"</font><font color="#990000">&gt;&gt;</font>, <font color="#FF6600">fin</font>, <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.stream_reply">cowboy_req:stream_reply(3)</a>,
-<a href="../cowboy_req.stream_trailers">cowboy_req:stream_trailers(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a>, <a href="../cowboy_req.stream_trailers">cowboy_req:stream_trailers(3)</a></p>
+
diff --git a/docs/en/cowboy/2.3/manual/cowboy_req.stream_reply/index.html b/docs/en/cowboy/2.3/manual/cowboy_req.stream_reply/index.html
index 711b4595..a791e1ae 100644
--- a/docs/en/cowboy/2.3/manual/cowboy_req.stream_reply/index.html
+++ b/docs/en/cowboy/2.3/manual/cowboy_req.stream_reply/index.html
@@ -62,152 +62,76 @@
<h1 class="lined-header"><span>cowboy_req:stream_reply(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:stream_reply - Send the response headers</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:stream_reply - Send the response headers</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">stream_reply</span></span>(<span style="color: #009900">Status</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">stream_reply</span></span>(<span style="color: #009900">StatusCode</span>, #{}, <span style="color: #009900">Req</span>)
-
-<span style="font-weight: bold"><span style="color: #000000">stream_reply</span></span>(<span style="color: #009900">Status</span>, <span style="color: #009900">Headers</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">Req</span>
-
-<span style="color: #009900">Status</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:http_status</span></span>()
-<span style="color: #009900">Headers</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:http_headers</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Send the response headers.</p></div>
-<div class="paragraph"><p>The header names must be given as lowercase binary strings.
-While header names are case insensitive, Cowboy requires them
-to be given as lowercase to function properly.</p></div>
-<div class="paragraph"><p>Cowboy does not allow duplicate header names. Headers set
-by this function may overwrite those set by <code>set_resp_header/3</code>.</p></div>
-<div class="paragraph"><p>Use <a href="../cowboy_req.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a>
-instead of this function to set cookies.</p></div>
-<div class="paragraph"><p>If a response body was set before calling this function,
-it will not be sent.</p></div>
-<div class="paragraph"><p>Use <a href="../cowboy_req.stream_body">cowboy_req:stream_body(3)</a>
-to stream the response body and optionally
-<a href="../cowboy_req.stream_trailers">cowboy_req:stream_trailers(3)</a>
-to send response trailer field values.</p></div>
-<div class="paragraph"><p>You may want to set the content-length header when using
-this function, if it is known in advance. This will allow
-clients using HTTP/2 and HTTP/1.0 to process the response
-more efficiently.</p></div>
-<div class="paragraph"><p>The streaming method varies depending on the protocol being
-used. HTTP/2 will use the usual DATA frames. HTTP/1.1 will
-use chunked transfer-encoding. HTTP/1.0 will send the body
-unmodified and close the connection at the end if no
-content-length was set.</p></div>
-<div class="paragraph"><p>It is not possible to push resources after this function
-returns. Any attempt will result in an error.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">stream_reply</font></b>(<font color="#009900">Status</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> <b><font color="#000000">stream_reply</font></b>(<font color="#009900">StatusCode</font>, #{}, <font color="#009900">Req</font>)
+
+<b><font color="#000000">stream_reply</font></b>(<font color="#009900">Status</font>, <font color="#009900">Headers</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> <font color="#009900">Req</font>
+
+<font color="#009900">Status</font> <font color="#990000">::</font> <b><font color="#000000">cowboy:http_status</font></b>()
+<font color="#009900">Headers</font> <font color="#990000">::</font> <b><font color="#000000">cowboy:http_headers</font></b>()</tt></pre>
+</div></div>
+<p>Send the response headers.</p>
+<p>The header names must be given as lowercase binary strings. While header names are case insensitive, Cowboy requires them to be given as lowercase to function properly.</p>
+<p>Cowboy does not allow duplicate header names. Headers set by this function may overwrite those set by <code>set_resp_header/3</code>.</p>
+<p>Use <a href="../cowboy_req.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a> instead of this function to set cookies.</p>
+<p>If a response body was set before calling this function, it will not be sent.</p>
+<p>Use <a href="../cowboy_req.stream_body">cowboy_req:stream_body(3)</a> to stream the response body and optionally <a href="../cowboy_req.stream_trailers">cowboy_req:stream_trailers(3)</a> to send response trailer field values.</p>
+<p>You may want to set the content-length header when using this function, if it is known in advance. This will allow clients using HTTP/2 and HTTP/1.0 to process the response more efficiently.</p>
+<p>The streaming method varies depending on the protocol being used. HTTP/2 will use the usual DATA frames. HTTP/1.1 will use chunked transfer-encoding. HTTP/1.0 will send the body unmodified and close the connection at the end if no content-length was set.</p>
+<p>It is not possible to push resources after this function returns. Any attempt will result in an error.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Status
-</dt>
-<dd>
-<p>
-The status code for the response.
-</p>
+<dl><dt>Status</dt>
+<dd><p>The status code for the response.</p>
</dd>
-<dt class="hdlist1">
-Headers
-</dt>
-<dd>
-<p>
-The response headers.
-</p>
+<dt>Headers</dt>
+<dd><p>The response headers.</p>
</dd>
-</dl></div>
-<div class="paragraph"><p>Header names must be given as lowercase binary strings.</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+</dl>
+<p>Header names must be given as lowercase binary strings.</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A new Req object is returned.</p></div>
-<div class="paragraph"><p>The returned Req object must be used from that point onward
-in order to be able to stream the response body.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>A new Req object is returned.</p>
+<p>The returned Req object must be used from that point onward in order to be able to stream the response body.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Only the Req is returned, it is no longer wrapped in a tuple.
-</p>
+<ul><li><strong>2.0</strong>: Only the Req is returned, it is no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced. Replaces <code>chunked_reply/1,2</code>.
-</p>
+<li><strong>2.0</strong>: Function introduced. Replaces <code>chunked_reply/1,2</code>.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Initiate the response</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Initiate the response</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: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_reply</span></span>(<span style="color: #993399">200</span>, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Stream the response with custom headers</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:stream_reply</font></b>(<font color="#993399">200</font>, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Stream the response with custom 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">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_reply</span></span>(<span style="color: #993399">200</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/plain"</span><span style="color: #990000">&gt;&gt;</span>
-}, <span style="color: #009900">Req0</span>),
-<span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_body</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Hello\n"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #FF6600">nofin</span>, <span style="color: #009900">Req</span>),
-<span style="font-weight: bold"><span style="color: #000000">timer:sleep</span></span>(<span style="color: #993399">1000</span>),
-<span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_body</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"World!\n"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #FF6600">fin</span>, <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:stream_reply</font></b>(<font color="#993399">200</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/plain"</font><font color="#990000">&gt;&gt;</font>
+}, <font color="#009900">Req0</font>),
+<b><font color="#000000">cowboy_req:stream_body</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"Hello\n"</font><font color="#990000">&gt;&gt;</font>, <font color="#FF6600">nofin</font>, <font color="#009900">Req</font>),
+<b><font color="#000000">timer:sleep</font></b>(<font color="#993399">1000</font>),
+<b><font color="#000000">cowboy_req:stream_body</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"World!\n"</font><font color="#990000">&gt;&gt;</font>, <font color="#FF6600">fin</font>, <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a>,
-<a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a>,
-<a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a>,
-<a href="../cowboy_req.inform">cowboy_req:inform(3)</a>,
-<a href="../cowboy_req.reply">cowboy_req:reply(3)</a>,
-<a href="../cowboy_req.stream_body">cowboy_req:stream_body(3)</a>,
-<a href="../cowboy_req.stream_trailers">cowboy_req:stream_trailers(3)</a>,
-<a href="../cowboy_req.push">cowboy_req:push(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a>, <a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a>, <a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a>, <a href="../cowboy_req.inform">cowboy_req:inform(3)</a>, <a href="../cowboy_req.reply">cowboy_req:reply(3)</a>, <a href="../cowboy_req.stream_body">cowboy_req:stream_body(3)</a>, <a href="../cowboy_req.stream_trailers">cowboy_req:stream_trailers(3)</a>, <a href="../cowboy_req.push">cowboy_req:push(3)</a></p>
+
diff --git a/docs/en/cowboy/2.3/manual/cowboy_req.stream_trailers/index.html b/docs/en/cowboy/2.3/manual/cowboy_req.stream_trailers/index.html
index c65aa4ef..f1840c58 100644
--- a/docs/en/cowboy/2.3/manual/cowboy_req.stream_trailers/index.html
+++ b/docs/en/cowboy/2.3/manual/cowboy_req.stream_trailers/index.html
@@ -62,107 +62,55 @@
<h1 class="lined-header"><span>cowboy_req:stream_trailers(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:stream_trailers - Send the response trailers</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:stream_trailers - Send the response trailers</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">stream_trailers</span></span>(<span style="color: #009900">Trailers</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: #FF6600">ok</span>
-
-<span style="color: #009900">Trailers</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:http_headers</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Send the response trailers and terminate the stream.</p></div>
-<div class="paragraph"><p>This function can only be called once, after initiating
-a response using
-<a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a>
-and sending zero or more body chunks using
-<a href="../cowboy_req.stream_body">cowboy_req:stream_body(3)</a>
-with the <code>nofin</code> argument set. The function <code>stream_trailers/2</code>
-implies <code>fin</code> and automatically terminate the response.</p></div>
-<div class="paragraph"><p>You must list all field names sent in trailers in the
-trailer header, otherwise they might be dropped by intermediaries
-or clients.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">stream_trailers</font></b>(<font color="#009900">Trailers</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <font color="#FF6600">ok</font>
+
+<font color="#009900">Trailers</font> <font color="#990000">::</font> <b><font color="#000000">cowboy:http_headers</font></b>()</tt></pre>
+</div></div>
+<p>Send the response trailers and terminate the stream.</p>
+<p>This function can only be called once, after initiating a response using <a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a> and sending zero or more body chunks using <a href="../cowboy_req.stream_body">cowboy_req:stream_body(3)</a> with the <code>nofin</code> argument set. The function <code>stream_trailers/2</code> implies <code>fin</code> and automatically terminate the response.</p>
+<p>You must list all field names sent in trailers in the trailer header, otherwise they might be dropped by intermediaries or clients.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Trailers
-</dt>
-<dd>
-<p>
-Trailer field values to be sent.
-</p>
+<dl><dt>Trailers</dt>
+<dd><p>Trailer field values to be sent.</p>
</dd>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The atom <code>ok</code> is always returned. It can be safely ignored.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The atom <code>ok</code> is always returned. It can be safely ignored.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.2</strong>: Function introduced.
-</p>
+<ul><li><strong>2.2</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Stream a response body with trailers</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Stream a response body with trailers</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: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_reply</span></span>(<span style="color: #993399">200</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/plain"</span><span style="color: #990000">&gt;&gt;</span>,
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"trailer"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"expires, content-md5"</span><span style="color: #990000">&gt;&gt;</span>
-}, <span style="color: #009900">Req0</span>),
-<span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_body</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Hello\n"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #FF6600">nofin</span>, <span style="color: #009900">Req</span>),
-<span style="font-weight: bold"><span style="color: #000000">timer:sleep</span></span>(<span style="color: #993399">1000</span>),
-<span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_body</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"World!\n"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #FF6600">nofin</span>, <span style="color: #009900">Req</span>)<span style="color: #990000">.</span>
-<span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_trailers</span></span>(#{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"expires"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Sun, 10 Dec 2017 19:13:47 GMT"</span><span style="color: #990000">&gt;&gt;</span>,
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-md5"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"fbf68a8e34b2ded53bba54e68794b4fe"</span><span style="color: #990000">&gt;&gt;</span>
-}, <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:stream_reply</font></b>(<font color="#993399">200</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/plain"</font><font color="#990000">&gt;&gt;</font>,
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"trailer"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"expires, content-md5"</font><font color="#990000">&gt;&gt;</font>
+}, <font color="#009900">Req0</font>),
+<b><font color="#000000">cowboy_req:stream_body</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"Hello\n"</font><font color="#990000">&gt;&gt;</font>, <font color="#FF6600">nofin</font>, <font color="#009900">Req</font>),
+<b><font color="#000000">timer:sleep</font></b>(<font color="#993399">1000</font>),
+<b><font color="#000000">cowboy_req:stream_body</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"World!\n"</font><font color="#990000">&gt;&gt;</font>, <font color="#FF6600">nofin</font>, <font color="#009900">Req</font>)<font color="#990000">.</font>
+<b><font color="#000000">cowboy_req:stream_trailers</font></b>(#{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"expires"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"Sun, 10 Dec 2017 19:13:47 GMT"</font><font color="#990000">&gt;&gt;</font>,
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-md5"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"fbf68a8e34b2ded53bba54e68794b4fe"</font><font color="#990000">&gt;&gt;</font>
+}, <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.stream_reply">cowboy_req:stream_reply(3)</a>,
-<a href="../cowboy_req.stream_body">cowboy_req:stream_body(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a>, <a href="../cowboy_req.stream_body">cowboy_req:stream_body(3)</a></p>
+
diff --git a/docs/en/cowboy/2.3/manual/cowboy_req.uri/index.html b/docs/en/cowboy/2.3/manual/cowboy_req.uri/index.html
index 90a435e3..73ab872d 100644
--- a/docs/en/cowboy/2.3/manual/cowboy_req.uri/index.html
+++ b/docs/en/cowboy/2.3/manual/cowboy_req.uri/index.html
@@ -62,177 +62,106 @@
<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">
+<p>cowboy_req:uri - Reconstructed URI</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">
+<pre><tt><b><font color="#000000">uri</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <b><font color="#000000">uri</font></b>(<font color="#009900">Req</font>, #{})
+<b><font color="#000000">uri</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>(), <font color="#009900">Opts</font>) <font color="#990000">-&gt;</font> <font color="#009900">URI</font> <font color="#990000">::</font> <b><font color="#000000">iodata</font></b>()
+
+<font color="#009900">Opts</font> <font color="#990000">::</font> #{
+ <font color="#0000FF">scheme</font> <font color="#990000">=&gt;</font> <b><font color="#000000">iodata</font></b>() | <font color="#000080">undefined</font>,
+ <font color="#0000FF">host</font> <font color="#990000">=&gt;</font> <b><font color="#000000">iodata</font></b>() | <font color="#000080">undefined</font>,
+ <font color="#0000FF">port</font> <font color="#990000">=&gt;</font> <b><font color="#000000">inet:port_number</font></b>() | <font color="#000080">undefined</font>,
+ <font color="#0000FF">path</font> <font color="#990000">=&gt;</font> <b><font color="#000000">iodata</font></b>() | <font color="#000080">undefined</font>,
+ <font color="#0000FF">qs</font> <font color="#990000">=&gt;</font> <b><font color="#000000">iodata</font></b>() | <font color="#000080">undefined</font>,
+ <font color="#0000FF">fragment</font> <font color="#990000">=&gt;</font> <b><font color="#000000">iodata</font></b>() | <font color="#000080">undefined</font>
+}</tt></pre>
+</div></div>
+<p>Reconstruct the effective request URI, optionally modifying components.</p>
+<p>By default Cowboy will build a URI using the components found in the request. Options allow disabling or replacing individual components.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>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>
+<dt>Opts</dt>
+<dd><p>Map for overriding individual components.</p>
+<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>
+<p>As this function always returns a valid URI, there are some things to note:</p>
+<ul><li>Disabling the host also disables the scheme and port.
</li>
-<li>
-<p>
-There is no fragment component by default as these are
- not sent with the request.
-</p>
+<li>There is no fragment component by default as these are not sent with the request.
</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>The port number may not appear in the resulting URI if it is the default port for the given scheme (http: 80; https: 443).
</li>
-</ul></div>
+</ul>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<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">
+<p>The reconstructed URI is returned as an iolist or a binary string.</p>
<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>
+<ul><li><strong>2.0</strong>: Individual components can be replaced or disabled.
</li>
-<li>
-<p>
-<strong>2.0</strong>: Only the URI is returned, it is no longer wrapped in a tuple.
-</p>
+<li><strong>2.0</strong>: Only the URI is returned, it is no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced. Replaces <code>host_url/1</code> and <code>url/1</code>.
-</p>
+<li><strong>2.0</strong>: Function introduced. Replaces <code>host_url/1</code> and <code>url/1</code>.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<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
+<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 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
+<pre><tt><i><font color="#9A1900">%% //example.org/path/to/res?edit=1</font></i>
+<b><font color="#000000">cowboy_req:uri</font></b>(<font color="#009900">Req</font>, #{<font color="#0000FF">scheme</font> <font color="#990000">=&gt;</font> <font color="#000080">undefined</font>})<font color="#990000">.</font></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
+<pre><tt><i><font color="#9A1900">%% </font></i><u><font color="#0000FF">http://example.org</font></u>
+<b><font color="#000000">cowboy_req:uri</font></b>(<font color="#009900">Req</font>, #{<font color="#0000FF">path</font> <font color="#990000">=&gt;</font> <font color="#000080">undefined</font>, <font color="#0000FF">qs</font> <font color="#990000">=&gt;</font> <font color="#000080">undefined</font>})<font color="#990000">.</font></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
+<pre><tt><i><font color="#9A1900">%% /path/to/res?edit=1</font></i>
+<b><font color="#000000">cowboy_req:uri</font></b>(<font color="#009900">Req</font>, #{<font color="#0000FF">host</font> <font color="#990000">=&gt;</font> <font color="#000080">undefined</font>})<font color="#990000">.</font></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
+<pre><tt><i><font color="#9A1900">%% </font></i><u><font color="#0000FF">http://example.org/path/to/res</font></u><i><font color="#9A1900">?edit=1#errors</font></i>
+<b><font color="#000000">cowboy_req:uri</font></b>(<font color="#009900">Req</font>, #{<font color="#0000FF">fragment</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"errors"</font><font color="#990000">&gt;&gt;</font>})<font color="#990000">.</font></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
+<pre><tt><i><font color="#9A1900">%% </font></i><u><font color="#0000FF">https://example.org/path/to/res</font></u><i><font color="#9A1900">?edit=1</font></i>
+<b><font color="#000000">cowboy_req:uri</font></b>(<font color="#009900">Req</font>, #{<font color="#0000FF">scheme</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"https"</font><font color="#990000">&gt;&gt;</font>})<font color="#990000">.</font></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">
+<pre><tt><b><font color="#000000">iolist_to_binary</font></b>(<b><font color="#000000">cowboy_req:uri</font></b>(<font color="#009900">Req</font>))<font color="#990000">.</font></tt></pre>
+</div></div>
<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>
+<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>
+
diff --git a/docs/en/cowboy/2.3/manual/cowboy_req.version/index.html b/docs/en/cowboy/2.3/manual/cowboy_req.version/index.html
index 82d3d006..4fb41dc0 100644
--- a/docs/en/cowboy/2.3/manual/cowboy_req.version/index.html
+++ b/docs/en/cowboy/2.3/manual/cowboy_req.version/index.html
@@ -62,88 +62,47 @@
<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">
+<p>cowboy_req:version - HTTP version</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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
+<pre><tt><b><font color="#000000">version</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <font color="#009900">Version</font> <font color="#990000">::</font> <b><font color="#000000">cowboy:http_version</font></b>()</tt></pre>
+</div></div>
+<p>Return the HTTP version used for the request.</p>
+<p>The version can also be obtained using pattern matching:</p>
+<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">
+<pre><tt>#{<font color="#FF6600">version</font> <font color="#990000">:=</font> <font color="#009900">Version</font>} <font color="#990000">=</font> <font color="#009900">Req</font><font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<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">
+<p>The HTTP version used for the request is returned as an atom. It is provided for informative purposes only.</p>
<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>
+<ul><li><strong>2.0</strong>: Only the version is returned, it is no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<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
+<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">
+<pre><tt><font color="#009900">Version</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:version</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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>
+<p><a href="../cowboy_req">cowboy_req(3)</a></p>
+
diff --git a/docs/en/cowboy/2.3/manual/cowboy_req/index.html b/docs/en/cowboy/2.3/manual/cowboy_req/index.html
index 3f577b0e..72291d4b 100644
--- a/docs/en/cowboy/2.3/manual/cowboy_req/index.html
+++ b/docs/en/cowboy/2.3/manual/cowboy_req/index.html
@@ -62,414 +62,218 @@
<h1 class="lined-header"><span>cowboy_req(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req - HTTP request and response</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req - HTTP request and response</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<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>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="33%" />
-<col width="33%" />
-<col width="33%" />
-<thead>
-<tr>
-<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">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>
+<p>The module <code>cowboy_req</code> provides functions to access, manipulate and respond to requests.</p>
+<p>There are four types of functions in this module. They can be differentiated by their name and their return type:</p>
+<table rules="all" width="100%" frame="border"
+ cellspacing="0" cellpadding="4">
+<thead><tr><th>Type</th>
+<th>Name pattern</th>
+<th>Return type</th>
+</tr></thead><tbody><tr><td>access</td>
+<td>no verb, parse_*, match_*</td>
+<td><code>Value</code></td>
</tr>
-<tr>
-<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><td>question</td>
+<td>has_*</td>
+<td><code>boolean()</code></td>
</tr>
-<tr>
-<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><td>modification</td>
+<td>set_*</td>
+<td><code>Req</code></td>
</tr>
-<tr>
-<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><td>action</td>
+<td>any other verb</td>
+<td><code>ok | {Result, Value, Req}</code></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>
-<div class="sect1">
+</tbody></table>
+<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&apos;s only possible to send one response, and to read the body once.</p>
<h2 id="_exports">Exports</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Connection:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../cowboy_req.peer">cowboy_req:peer(3)</a> - Peer address and port
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.sock">cowboy_req:sock(3)</a> - Socket address and port
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.cert">cowboy_req:cert(3)</a> - Client TLS certificate
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>Raw request:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../cowboy_req.method">cowboy_req:method(3)</a> - HTTP method
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.version">cowboy_req:version(3)</a> - HTTP version
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.scheme">cowboy_req:scheme(3)</a> - URI scheme
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.host">cowboy_req:host(3)</a> - URI host name
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.port">cowboy_req:port(3)</a> - URI port number
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.path">cowboy_req:path(3)</a> - URI path
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.qs">cowboy_req:qs(3)</a> - URI query string
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.uri">cowboy_req:uri(3)</a> - Reconstructed URI
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.header">cowboy_req:header(3)</a> - HTTP header
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.headers">cowboy_req:headers(3)</a> - HTTP headers
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>Processed request:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../cowboy_req.parse_qs">cowboy_req:parse_qs(3)</a> - Parse the query string
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.match_qs">cowboy_req:match_qs(3)</a> - Match the query string against constraints
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.parse_header">cowboy_req:parse_header(3)</a> - Parse the given HTTP header
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.parse_cookies">cowboy_req:parse_cookies(3)</a> - Parse cookie headers
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.match_cookies">cowboy_req:match_cookies(3)</a> - Match cookies against constraints
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.binding">cowboy_req:binding(3)</a> - Access a value bound from the route
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.bindings">cowboy_req:bindings(3)</a> - Access all values bound from the route
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.host_info">cowboy_req:host_info(3)</a> - Access the route&#8217;s heading host segments
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.path_info">cowboy_req:path_info(3)</a> - Access the route&#8217;s trailing path segments
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>Request body:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../cowboy_req.has_body">cowboy_req:has_body(3)</a> - Is there a request body?
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.body_length">cowboy_req:body_length(3)</a> - Body length
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a> - Read the request body
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.read_urlencoded_body">cowboy_req:read_urlencoded_body(3)</a> - Read and parse a urlencoded request body
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.read_part">cowboy_req:read_part(3)</a> - Read the next multipart headers
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.read_part_body">cowboy_req:read_part_body(3)</a> - Read the current part&#8217;s body
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>Response:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../cowboy_req.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a> - Set a cookie
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a> - Set a response header
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a> - Set several response headers
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.has_resp_header">cowboy_req:has_resp_header(3)</a> - Is the given response header set?
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.resp_header">cowboy_req:resp_header(3)</a> - Response header
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.resp_headers">cowboy_req:resp_headers(3)</a> - Response headers
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.delete_resp_header">cowboy_req:delete_resp_header(3)</a> - Delete a response header
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.set_resp_body">cowboy_req:set_resp_body(3)</a> - Set the response body
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.has_resp_body">cowboy_req:has_resp_body(3)</a> - Is there a response body?
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.inform">cowboy_req:inform(3)</a> - Send an informational response
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.reply">cowboy_req:reply(3)</a> - Send the response
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a> - Send the response headers
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.stream_body">cowboy_req:stream_body(3)</a> - Stream the response body
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.stream_trailers">cowboy_req:stream_trailers(3)</a> - Send the response trailers
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.push">cowboy_req:push(3)</a> - Push a resource to the client
-</p>
-</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+<p>Connection:</p>
+<ul><li><a href="../cowboy_req.peer">cowboy_req:peer(3)</a> - Peer address and port
+</li>
+<li><a href="../cowboy_req.sock">cowboy_req:sock(3)</a> - Socket address and port
+</li>
+<li><a href="../cowboy_req.cert">cowboy_req:cert(3)</a> - Client TLS certificate
+</li>
+</ul>
+<p>Raw request:</p>
+<ul><li><a href="../cowboy_req.method">cowboy_req:method(3)</a> - HTTP method
+</li>
+<li><a href="../cowboy_req.version">cowboy_req:version(3)</a> - HTTP version
+</li>
+<li><a href="../cowboy_req.scheme">cowboy_req:scheme(3)</a> - URI scheme
+</li>
+<li><a href="../cowboy_req.host">cowboy_req:host(3)</a> - URI host name
+</li>
+<li><a href="../cowboy_req.port">cowboy_req:port(3)</a> - URI port number
+</li>
+<li><a href="../cowboy_req.path">cowboy_req:path(3)</a> - URI path
+</li>
+<li><a href="../cowboy_req.qs">cowboy_req:qs(3)</a> - URI query string
+</li>
+<li><a href="../cowboy_req.uri">cowboy_req:uri(3)</a> - Reconstructed URI
+</li>
+<li><a href="../cowboy_req.header">cowboy_req:header(3)</a> - HTTP header
+</li>
+<li><a href="../cowboy_req.headers">cowboy_req:headers(3)</a> - HTTP headers
+</li>
+</ul>
+<p>Processed request:</p>
+<ul><li><a href="../cowboy_req.parse_qs">cowboy_req:parse_qs(3)</a> - Parse the query string
+</li>
+<li><a href="../cowboy_req.match_qs">cowboy_req:match_qs(3)</a> - Match the query string against constraints
+</li>
+<li><a href="../cowboy_req.parse_header">cowboy_req:parse_header(3)</a> - Parse the given HTTP header
+</li>
+<li><a href="../cowboy_req.parse_cookies">cowboy_req:parse_cookies(3)</a> - Parse cookie headers
+</li>
+<li><a href="../cowboy_req.match_cookies">cowboy_req:match_cookies(3)</a> - Match cookies against constraints
+</li>
+<li><a href="../cowboy_req.binding">cowboy_req:binding(3)</a> - Access a value bound from the route
+</li>
+<li><a href="../cowboy_req.bindings">cowboy_req:bindings(3)</a> - Access all values bound from the route
+</li>
+<li><a href="../cowboy_req.host_info">cowboy_req:host_info(3)</a> - Access the route&apos;s heading host segments
+</li>
+<li><a href="../cowboy_req.path_info">cowboy_req:path_info(3)</a> - Access the route&apos;s trailing path segments
+</li>
+</ul>
+<p>Request body:</p>
+<ul><li><a href="../cowboy_req.has_body">cowboy_req:has_body(3)</a> - Is there a request body?
+</li>
+<li><a href="../cowboy_req.body_length">cowboy_req:body_length(3)</a> - Body length
+</li>
+<li><a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a> - Read the request body
+</li>
+<li><a href="../cowboy_req.read_urlencoded_body">cowboy_req:read_urlencoded_body(3)</a> - Read and parse a urlencoded request body
+</li>
+<li><a href="../cowboy_req.read_part">cowboy_req:read_part(3)</a> - Read the next multipart headers
+</li>
+<li><a href="../cowboy_req.read_part_body">cowboy_req:read_part_body(3)</a> - Read the current part&apos;s body
+</li>
+</ul>
+<p>Response:</p>
+<ul><li><a href="../cowboy_req.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a> - Set a cookie
+</li>
+<li><a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a> - Set a response header
+</li>
+<li><a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a> - Set several response headers
+</li>
+<li><a href="../cowboy_req.has_resp_header">cowboy_req:has_resp_header(3)</a> - Is the given response header set?
+</li>
+<li><a href="../cowboy_req.resp_header">cowboy_req:resp_header(3)</a> - Response header
+</li>
+<li><a href="../cowboy_req.resp_headers">cowboy_req:resp_headers(3)</a> - Response headers
+</li>
+<li><a href="../cowboy_req.delete_resp_header">cowboy_req:delete_resp_header(3)</a> - Delete a response header
+</li>
+<li><a href="../cowboy_req.set_resp_body">cowboy_req:set_resp_body(3)</a> - Set the response body
+</li>
+<li><a href="../cowboy_req.has_resp_body">cowboy_req:has_resp_body(3)</a> - Is there a response body?
+</li>
+<li><a href="../cowboy_req.inform">cowboy_req:inform(3)</a> - Send an informational response
+</li>
+<li><a href="../cowboy_req.reply">cowboy_req:reply(3)</a> - Send the response
+</li>
+<li><a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a> - Send the response headers
+</li>
+<li><a href="../cowboy_req.stream_body">cowboy_req:stream_body(3)</a> - Stream the response body
+</li>
+<li><a href="../cowboy_req.stream_trailers">cowboy_req:stream_trailers(3)</a> - Send the response trailers
+</li>
+<li><a href="../cowboy_req.push">cowboy_req:push(3)</a> - Push a resource to the client
+</li>
+</ul>
<h2 id="_types">Types</h2>
-<div class="sectionbody">
-<div class="sect2">
<h3 id="_push_opts">push_opts()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">
+<pre><tt><b><font color="#000000">push_opts</font></b>() <font color="#990000">::</font> #{
+ <font color="#0000FF">method</font> <font color="#990000">=&gt;</font> <b><font color="#000080">binary</font></b>(), <i><font color="#9A1900">%% case sensitive</font></i>
+ <font color="#0000FF">scheme</font> <font color="#990000">=&gt;</font> <b><font color="#000080">binary</font></b>(), <i><font color="#9A1900">%% lowercase; case insensitive</font></i>
+ <font color="#0000FF">host</font> <font color="#990000">=&gt;</font> <b><font color="#000080">binary</font></b>(), <i><font color="#9A1900">%% lowercase; case insensitive</font></i>
+ <font color="#0000FF">port</font> <font color="#990000">=&gt;</font> <b><font color="#000000">inet:port_number</font></b>(),
+ <font color="#0000FF">qs</font> <font color="#990000">=&gt;</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case sensitive</font></i>
+}</tt></pre>
+</div></div>
+<p>Push options.</p>
+<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&apos;s URI.</p>
<h3 id="_read_body_opts">read_body_opts()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">
+<pre><tt><b><font color="#000000">read_body_opts</font></b>() <font color="#990000">::</font> #{
+ <b><font color="#000080">length</font></b> <font color="#990000">=&gt;</font> <b><font color="#000000">non_neg_integer</font></b>(),
+ <font color="#0000FF">period</font> <font color="#990000">=&gt;</font> <b><font color="#000000">non_neg_integer</font></b>(),
+ <font color="#0000FF">timeout</font> <font color="#990000">=&gt;</font> <b><font color="#000000">timeout</font></b>()
+}</tt></pre>
+</div></div>
+<p>Body reading options.</p>
+<p>The defaults are function-specific.</p>
<h3 id="_req">req()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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>()},
- <span style="color: #FF6600">sock</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>()},
- <span style="color: #FF6600">cert</span> <span style="color: #990000">:=</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>() | <span style="color: #000080">undefined</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
+<pre><tt><b><font color="#000000">req</font></b>() <font color="#990000">::</font> #{
+ <font color="#FF6600">method</font> <font color="#990000">:=</font> <b><font color="#000080">binary</font></b>(), <i><font color="#9A1900">%% case sensitive</font></i>
+ <font color="#FF6600">version</font> <font color="#990000">:=</font> <b><font color="#000000">cowboy:http_version</font></b>() | <b><font color="#000080">atom</font></b>(),
+ <font color="#FF6600">scheme</font> <font color="#990000">:=</font> <b><font color="#000080">binary</font></b>(), <i><font color="#9A1900">%% lowercase; case insensitive</font></i>
+ <font color="#FF6600">host</font> <font color="#990000">:=</font> <b><font color="#000080">binary</font></b>(), <i><font color="#9A1900">%% lowercase; case insensitive</font></i>
+ <font color="#FF6600">port</font> <font color="#990000">:=</font> <b><font color="#000000">inet:port_number</font></b>(),
+ <font color="#FF6600">path</font> <font color="#990000">:=</font> <b><font color="#000080">binary</font></b>(), <i><font color="#9A1900">%% case sensitive</font></i>
+ <font color="#FF6600">qs</font> <font color="#990000">:=</font> <b><font color="#000080">binary</font></b>(), <i><font color="#9A1900">%% case sensitive</font></i>
+ <font color="#FF6600">headers</font> <font color="#990000">:=</font> <b><font color="#000000">cowboy:http_headers</font></b>(),
+ <font color="#FF6600">peer</font> <font color="#990000">:=</font> {<b><font color="#000000">inet:ip_address</font></b>(), <b><font color="#000000">inet:port_number</font></b>()},
+ <font color="#FF6600">sock</font> <font color="#990000">:=</font> {<b><font color="#000000">inet:ip_address</font></b>(), <b><font color="#000000">inet:port_number</font></b>()},
+ <font color="#FF6600">cert</font> <font color="#990000">:=</font> <b><font color="#000080">binary</font></b>() | <font color="#000080">undefined</font>
+}</tt></pre>
+</div></div>
+<p>The Req object.</p>
+<p>Contains information about the request and response. While some fields are publicly documented, others aren&apos;t and shouldn&apos;t be used.</p>
+<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 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">
+<pre><tt><font color="#009900">Req</font>#{<font color="#009900">_myapp_auth_method</font> <font color="#990000">=&gt;</font> <font color="#FF6600">pubkey</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
<h3 id="_resp_body">resp_body()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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>}
+<pre><tt><b><font color="#000000">resp_body</font></b>() <font color="#990000">::</font> <b><font color="#000000">iodata</font></b>()
+ | {<font color="#FF6600">sendfile</font>, <font color="#009900">Offset</font>, <font color="#009900">Length</font>, <font color="#009900">Filename</font>}
-<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">non_neg_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
+<font color="#009900">Offset</font> <font color="#990000">::</font> <b><font color="#000000">non_neg_integer</font></b>()
+<font color="#009900">Length</font> <font color="#990000">::</font> <b><font color="#000000">non_neg_integer</font></b>()
+<font color="#009900">Filename</font> <font color="#990000">::</font> <b><font color="#000000">file:name_all</font></b>()</tt></pre>
+</div></div>
+<p>Response body.</p>
+<p>It can take two forms: the actual data to be sent or a tuple indicating which file to send.</p>
+<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 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>Note that the length must be greater than zero for any data
-to be sent. Cowboy will send an empty body when the length
-is zero.</p></div>
-</div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#993399">1</font><font color="#990000">&gt;</font> <font color="#009900">RespBody</font> <font color="#990000">=</font> [<font color="#FF0000">"Hello "</font>, [<font color="#990000">&lt;&lt;</font><font color="#FF0000">"world"</font><font color="#990000">&gt;&gt;</font>, <font color="#FF0000">$!</font>]]<font color="#990000">.</font>
+[<font color="#FF0000">"Hello "</font>,[<font color="#990000">&lt;&lt;</font><font color="#FF0000">"world"</font><font color="#990000">&gt;&gt;</font>,<font color="#993399">33</font>]]
+<font color="#993399">2</font><font color="#990000">&gt;</font> <b><font color="#000000">io:format</font></b>(<font color="#FF0000">"~s~n"</font>, [<font color="#009900">RespBody</font>])<font color="#990000">.</font>
+<font color="#009900">Hello</font> <font color="#FF6600">world</font><font color="#990000">!</font></tt></pre>
+</div></div>
+<p>Note that the length must be greater than zero for any data to be sent. Cowboy will send an empty body when the length is zero.</p>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="..">cowboy(7)</a></p></div>
-</div>
-</div>
+<p><a href="..">cowboy(7)</a></p>
+
diff --git a/docs/en/cowboy/2.3/manual/cowboy_rest/index.html b/docs/en/cowboy/2.3/manual/cowboy_rest/index.html
index 6a8a9b34..f0fdfd09 100644
--- a/docs/en/cowboy/2.3/manual/cowboy_rest/index.html
+++ b/docs/en/cowboy/2.3/manual/cowboy_rest/index.html
@@ -62,670 +62,475 @@
<h1 class="lined-header"><span>cowboy_rest(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_rest - REST handlers</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_rest - REST handlers</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The module <code>cowboy_rest</code> implements the HTTP state machine.</p></div>
-<div class="paragraph"><p>Implementing REST handlers is not enough to provide a REST
-interface; this interface must also follow the REST
-constraints including HATEOAS (hypermedia as the engine
-of application state).</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The module <code>cowboy_rest</code> implements the HTTP state machine.</p>
+<p>Implementing REST handlers is not enough to provide a REST interface; this interface must also follow the REST constraints including HATEOAS (hypermedia as the engine of application state).</p>
<h2 id="_callbacks">Callbacks</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>REST handlers implement the following interface:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
-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="color: #FF6600">cowboy_rest</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
-
-<span style="color: #009900">Callback</span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>)
- <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
- | {<span style="color: #FF6600">stop</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
- | {{<span style="color: #FF6600">switch_handler</span>, <span style="color: #009900">Module</span>}, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
- | {{<span style="color: #FF6600">switch_handler</span>, <span style="color: #009900">Module</span>, <span style="color: #009900">Opts</span>}, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
-
-<span style="font-weight: bold"><span style="color: #000000">terminate</span></span>(<span style="color: #009900">Reason</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> <span style="color: #FF6600">ok</span> <span style="font-style: italic"><span style="color: #9A1900">%% optional</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">State</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()
-<span style="color: #009900">Module</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">module</span></span>()
-<span style="color: #009900">Opts</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()
-<span style="color: #009900">Reason</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">normal</span></span>
- | {<span style="color: #FF6600">crash</span>, <span style="color: #FF6600">error</span> | <span style="font-weight: bold"><span style="color: #000080">exit</span></span> | <span style="font-weight: bold"><span style="color: #000080">throw</span></span>, <span style="font-weight: bold"><span style="color: #000000">any</span></span>()}
-
-<span style="color: #009900">Callback</span> <span style="color: #990000">-</span> <span style="color: #FF6600">see</span> <span style="color: #FF6600">below</span>
-<span style="color: #009900">Result</span> <span style="color: #990000">-</span> <span style="color: #FF6600">see</span> <span style="color: #FF6600">below</span>
-<span style="color: #009900">Default</span> <span style="color: #990000">-</span> <span style="color: #FF6600">see</span> <span style="color: #FF6600">below</span></tt></pre></div></div>
-<div class="paragraph"><p>The <code>init/2</code> callback is common to all handlers. To switch
-to the REST handler behavior, it must return <code>cowboy_rest</code>
-as the first element of the tuple.</p></div>
-<div class="paragraph"><p>The <code>Callback/2</code> above represents all the REST-specific
-callbacks. They are described in the following section
-of this manual. REST-specific callbacks differ by their
-name, semantics, result and default values. The default
-value is the one used when the callback has not been
-implemented. They otherwise all follow the same interface.</p></div>
-<div class="paragraph"><p>The <code>stop</code> tuple can be returned to stop REST processing.
-If no response was sent before then, Cowboy will send a
-<em>204 No Content</em>. The <code>stop</code> tuple can be returned from
-any callback, excluding <code>expires</code>, <code>generate_etag</code>,
-<code>last_modified</code> and <code>variances</code>.</p></div>
-<div class="paragraph"><p>A <code>switch_handler</code> tuple can be returned from these same
-callbacks to stop REST processing and switch to a different
-handler type. This is very useful to, for example, to stream
-the response body.</p></div>
-<div class="paragraph"><p>The optional <code>terminate/3</code> callback will ultimately be called
-with the reason for the termination of the handler.
-Cowboy will terminate the process right after this. There
-is no need to perform any cleanup in this callback.</p></div>
-<div class="paragraph"><p>The following terminate reasons are defined for loop handlers:</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-normal
-</dt>
-<dd>
-<p>
- The handler terminated normally.
-</p>
+<p>REST handlers implement the following interface:</p>
+<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><b><font color="#000000">init</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>)
+ <font color="#990000">-&gt;</font> {<font color="#FF6600">cowboy_rest</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
+
+<font color="#009900">Callback</font>(<font color="#009900">Req</font>, <font color="#009900">State</font>)
+ <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
+ | {<font color="#FF6600">stop</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
+ | {{<font color="#FF6600">switch_handler</font>, <font color="#009900">Module</font>}, <font color="#009900">Req</font>, <font color="#009900">State</font>}
+ | {{<font color="#FF6600">switch_handler</font>, <font color="#009900">Module</font>, <font color="#009900">Opts</font>}, <font color="#009900">Req</font>, <font color="#009900">State</font>}
+
+<b><font color="#000000">terminate</font></b>(<font color="#009900">Reason</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> <font color="#FF6600">ok</font> <i><font color="#9A1900">%% optional</font></i>
+
+<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()
+<font color="#009900">State</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()
+<font color="#009900">Module</font> <font color="#990000">::</font> <b><font color="#000000">module</font></b>()
+<font color="#009900">Opts</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()
+<font color="#009900">Reason</font> <font color="#990000">::</font> <b><font color="#000080">normal</font></b>
+ | {<font color="#FF6600">crash</font>, <font color="#FF6600">error</font> | <b><font color="#000080">exit</font></b> | <b><font color="#000080">throw</font></b>, <b><font color="#000000">any</font></b>()}
+
+<font color="#009900">Callback</font> <font color="#990000">-</font> <font color="#FF6600">see</font> <font color="#FF6600">below</font>
+<font color="#009900">Result</font> <font color="#990000">-</font> <font color="#FF6600">see</font> <font color="#FF6600">below</font>
+<font color="#009900">Default</font> <font color="#990000">-</font> <font color="#FF6600">see</font> <font color="#FF6600">below</font></tt></pre>
+</div></div>
+<p>The <code>init/2</code> callback is common to all handlers. To switch to the REST handler behavior, it must return <code>cowboy_rest</code> as the first element of the tuple.</p>
+<p>The <code>Callback/2</code> above represents all the REST-specific callbacks. They are described in the following section of this manual. REST-specific callbacks differ by their name, semantics, result and default values. The default value is the one used when the callback has not been implemented. They otherwise all follow the same interface.</p>
+<p>The <code>stop</code> tuple can be returned to stop REST processing. If no response was sent before then, Cowboy will send a <em>204 No Content</em>. The <code>stop</code> tuple can be returned from any callback, excluding <code>expires</code>, <code>generate_etag</code>, <code>last_modified</code> and <code>variances</code>.</p>
+<p>A <code>switch_handler</code> tuple can be returned from these same callbacks to stop REST processing and switch to a different handler type. This is very useful to, for example, to stream the response body.</p>
+<p>The optional <code>terminate/3</code> callback will ultimately be called with the reason for the termination of the handler. Cowboy will terminate the process right after this. There is no need to perform any cleanup in this callback.</p>
+<p>The following terminate reasons are defined for loop handlers:</p>
+<dl><dt>normal</dt>
+<dd><p>The handler terminated normally.</p>
</dd>
-<dt class="hdlist1">
-{crash, Class, Reason}
-</dt>
-<dd>
-<p>
- A crash occurred in the handler. <code>Class</code> and <code>Reason</code> can be
- used to obtain more information about the crash. The function
- <code>erlang:get_stacktrace/0</code> can also be called to obtain the
- stacktrace of the process when the crash occurred.
-</p>
+<dt>{crash, Class, Reason}</dt>
+<dd><p>A crash occurred in the handler. <code>Class</code> and <code>Reason</code> can be used to obtain more information about the crash. The function <code>erlang:get_stacktrace/0</code> can also be called to obtain the stacktrace of the process when the crash occurred.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_rest_callbacks">REST callbacks</h2>
-<div class="sectionbody">
-<div class="sect2">
<h3 id="_acceptcallback">AcceptCallback</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #009900">AcceptCallback</span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
-
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="color: #000080">true</span> | {<span style="color: #000080">true</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: #000080">false</span>}
-<span style="color: #009900">Default</span> <span style="color: #990000">-</span> <span style="color: #FF6600">crash</span></tt></pre></div></div>
-<div class="paragraph"><p>Process the request body.</p></div>
-<div class="paragraph"><p>This function should create or update the resource using the
-request body.</p></div>
-<div class="paragraph"><p>For PUT requests, the body is a representation of the resource
-that is being created or replaced.</p></div>
-<div class="paragraph"><p>For POST requests, the body is typically application-specific
-instructions on how to process the request, but it may also
-be a representation of the resource. When creating a new
-resource with POST at a different location, return <code>{true, URI}</code>
-with <code>URI</code> the new location.</p></div>
-<div class="paragraph"><p>For PATCH requests, the body is a series of instructions on
-how to update the resource. Patch files or JSON Patch are
-examples of such media types.</p></div>
-<div class="paragraph"><p>A response body may be sent. The appropriate media type, charset
-and language for the response can be retrieved from the Req
-object using the <code>media_type</code>, <code>charset</code> and <code>language</code> keys,
-respectively. The body can be set using
-<a href="../cowboy_req.set_resp_body">cowboy_req:set_resp_body(3)</a>.</p></div>
-</div>
-<div class="sect2">
+<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><font color="#009900">AcceptCallback</font>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
+
+<font color="#009900">Result</font> <font color="#990000">::</font> <font color="#000080">true</font> | {<font color="#000080">true</font>, <font color="#009900">URI</font> <font color="#990000">::</font> <b><font color="#000000">iodata</font></b>()} | <font color="#000080">false</font>}
+<font color="#009900">Default</font> <font color="#990000">-</font> <font color="#FF6600">crash</font></tt></pre>
+</div></div>
+<p>Process the request body.</p>
+<p>This function should create or update the resource using the request body.</p>
+<p>For PUT requests, the body is a representation of the resource that is being created or replaced.</p>
+<p>For POST requests, the body is typically application-specific instructions on how to process the request, but it may also be a representation of the resource. When creating a new resource with POST at a different location, return <code>{true, URI}</code> with <code>URI</code> the new location.</p>
+<p>For PATCH requests, the body is a series of instructions on how to update the resource. Patch files or JSON Patch are examples of such media types.</p>
+<p>A response body may be sent. The appropriate media type, charset and language for the response can be retrieved from the Req object using the <code>media_type</code>, <code>charset</code> and <code>language</code> keys, respectively. The body can be set using <a href="../cowboy_req.set_resp_body">cowboy_req:set_resp_body(3)</a>.</p>
<h3 id="_allowed_methods">allowed_methods</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">allowed_methods</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">allowed_methods</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</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: #009900">Default</span> <span style="color: #990000">::</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">"HEAD"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"OPTIONS"</span><span style="color: #990000">&gt;&gt;</span>]</tt></pre></div></div>
-<div class="paragraph"><p>Return the list of allowed methods.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> [<b><font color="#000080">binary</font></b>()] <i><font color="#9A1900">%% case sensitive</font></i>
+<font color="#009900">Default</font> <font color="#990000">::</font> [<font color="#990000">&lt;&lt;</font><font color="#FF0000">"GET"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"HEAD"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"OPTIONS"</font><font color="#990000">&gt;&gt;</font>]</tt></pre>
+</div></div>
+<p>Return the list of allowed methods.</p>
<h3 id="_allow_missing_post">allow_missing_post</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">allow_missing_post</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">allow_missing_post</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()
-<span style="color: #009900">Default</span> <span style="color: #990000">::</span> <span style="color: #000080">true</span></tt></pre></div></div>
-<div class="paragraph"><p>Return whether POST is allowed when the resource doesn&#8217;t exist.</p></div>
-<div class="paragraph"><p>Returning <code>true</code> here means that a new resource will be
-created. The URI for the newly created resource should be
-returned from the <code>AcceptCallback</code> function.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> <b><font color="#000000">boolean</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <font color="#000080">true</font></tt></pre>
+</div></div>
+<p>Return whether POST is allowed when the resource doesn&apos;t exist.</p>
+<p>Returning <code>true</code> here means that a new resource will be created. The URI for the newly created resource should be returned from the <code>AcceptCallback</code> function.</p>
<h3 id="_charsets_provided">charsets_provided</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">charsets_provided</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">charsets_provided</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</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: #009900">Default</span> <span style="color: #990000">-</span> <span style="color: #FF6600">skip</span> <span style="color: #FF6600">this</span> <span style="color: #FF6600">step</span></tt></pre></div></div>
-<div class="paragraph"><p>Return the list of charsets the resource provides in order
-of preference.</p></div>
-<div class="paragraph"><p>During content negotiation Cowboy will pick the most
-appropriate charset for the client. The client advertises
-charsets it prefers with the accept-charset header. When
-that header is missing, Cowboy picks the first charset
-from the resource.</p></div>
-<div class="paragraph"><p>Cowboy will add the negotiated <code>charset</code> to the Req object
-after this step completes:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<font color="#009900">Result</font> <font color="#990000">::</font> [<b><font color="#000080">binary</font></b>()] <i><font color="#9A1900">%% lowercase; case insensitive</font></i>
+<font color="#009900">Default</font> <font color="#990000">-</font> <font color="#FF6600">skip</font> <font color="#FF6600">this</font> <font color="#FF6600">step</font></tt></pre>
+</div></div>
+<p>Return the list of charsets the resource provides in order of preference.</p>
+<p>During content negotiation Cowboy will pick the most appropriate charset for the client. The client advertises charsets it prefers with the accept-charset header. When that header is missing, Cowboy picks the first charset from the resource.</p>
+<!-- @todo We should explain precisely how charsets are picked.-->
+<p>Cowboy will add the negotiated <code>charset</code> to the Req object after this step completes:</p>
+<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: #0000FF">charset</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>
-}</tt></pre></div></div>
-</div>
-<div class="sect2">
+<pre><tt><b><font color="#000000">req</font></b>() <font color="#990000">::</font> #{
+ <font color="#0000FF">charset</font> <font color="#990000">=&gt;</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% lowercase; case insensitive</font></i>
+}</tt></pre>
+</div></div>
<h3 id="_content_types_accepted">content_types_accepted</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
-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">content_types_accepted</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
-
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> [{<span style="font-weight: bold"><span style="color: #000080">binary</span></span>() | <span style="color: #009900">ParsedMime</span>, <span style="color: #009900">AcceptCallback</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">atom</span></span>()}]
-<span style="color: #009900">ParsedMime</span> <span style="color: #990000">::</span> {<span style="color: #009900">Type</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="color: #009900">SubType</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="color: #FF6600">'*'</span> | <span style="color: #009900">Params</span>}
-<span style="color: #009900">Params</span> <span style="color: #990000">::</span> [{<span style="color: #009900">Key</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="color: #009900">Value</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()}]
-
-<span style="color: #009900">Default</span> <span style="color: #990000">-</span> <span style="color: #FF6600">crash</span></tt></pre></div></div>
-<div class="paragraph"><p>Return the list of media types the resource accepts in
-order of preference.</p></div>
-<div class="paragraph"><p>A media type is made of different parts. The media type
-<code>text/html;charset=utf-8</code> is of type <code>text</code>, subtype <code>html</code>
-and has a single parameter <code>charset</code> with value <code>utf-8</code>.</p></div>
-<div class="paragraph"><p>Cowboy will match the content-type request header against
-the media types the server accepts and select the appropriate
-callback. When that header is missing, or when the server does not
-accept this media type, the request fails and an error response
-is returned. Cowboy will execute the callback immediately otherwise.</p></div>
-<div class="paragraph"><p>An empty parameters list <code>[]</code> means that no parameters will be
-accepted. When any parameter is acceptable, the tuple form
-should be used with parameters as the atom <code>'*'</code>.</p></div>
-<div class="paragraph"><p>Cowboy treats all parameters as case sensitive, except for the
-<code>charset</code> parameter, which is known to be case insensitive. You
-should therefore always provide the charset as a lowercase
-binary string.</p></div>
-</div>
-<div class="sect2">
+<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><b><font color="#000000">content_types_accepted</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
+
+<font color="#009900">Result</font> <font color="#990000">::</font> [{<b><font color="#000080">binary</font></b>() | <font color="#009900">ParsedMime</font>, <font color="#009900">AcceptCallback</font> <font color="#990000">::</font> <b><font color="#000080">atom</font></b>()}]
+<font color="#009900">ParsedMime</font> <font color="#990000">::</font> {<font color="#009900">Type</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">SubType</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#FF6600">'*'</font> | <font color="#009900">Params</font>}
+<font color="#009900">Params</font> <font color="#990000">::</font> [{<font color="#009900">Key</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()}]
+
+<font color="#009900">Default</font> <font color="#990000">-</font> <font color="#FF6600">crash</font></tt></pre>
+</div></div>
+<!-- @todo Case sensitivity of parsed mime content?-->
+<p>Return the list of media types the resource accepts in order of preference.</p>
+<p>A media type is made of different parts. The media type <code>text/html;charset=utf-8</code> is of type <code>text</code>, subtype <code>html</code> and has a single parameter <code>charset</code> with value <code>utf-8</code>.</p>
+<!-- @todo Cowboy needs to ignore the boundary parameter for-->
+<!-- multipart, as we never want to match against it. Or allow-->
+<!-- ignoring specific parameters at the very least.-->
+<p>Cowboy will match the content-type request header against the media types the server accepts and select the appropriate callback. When that header is missing, or when the server does not accept this media type, the request fails and an error response is returned. Cowboy will execute the callback immediately otherwise.</p>
+<!-- @todo We should explain precisely how media types are picked.-->
+<p>An empty parameters list <code>[]</code> means that no parameters will be accepted. When any parameter is acceptable, the tuple form should be used with parameters as the atom <code>&apos;*&apos;</code>.</p>
+<p>Cowboy treats all parameters as case sensitive, except for the <code>charset</code> parameter, which is known to be case insensitive. You should therefore always provide the charset as a lowercase binary string.</p>
+<!-- @todo Maybe this should be in the user guide instead.-->
+<!-- This function will be called for POST, PUT and PATCH requests.-->
+<!-- It is entirely possible to define different callbacks for different-->
+<!-- methods if the handling of the request differs. Simply verify-->
+<!-- what the method is with `cowboy_req:method/1` and return a-->
+<!-- different list for each methods.-->
<h3 id="_content_types_provided">content_types_provided</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
-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">content_types_provided</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
-
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> [{<span style="font-weight: bold"><span style="color: #000080">binary</span></span>() | <span style="color: #009900">ParsedMime</span>, <span style="color: #009900">ProvideCallback</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">atom</span></span>()}]
-<span style="color: #009900">ParsedMime</span> <span style="color: #990000">::</span> {<span style="color: #009900">Type</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="color: #009900">SubType</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="color: #FF6600">'*'</span> | <span style="color: #009900">Params</span>}
-<span style="color: #009900">Params</span> <span style="color: #990000">::</span> [{<span style="color: #009900">Key</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="color: #009900">Value</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()}]
-
-<span style="color: #009900">Default</span> <span style="color: #990000">-</span> [{{ <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"html"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #FF6600">'*'</span>}, <span style="color: #FF6600">to_html</span>}]</tt></pre></div></div>
-<div class="paragraph"><p>Return the list of media types the resource provides in
-order of preference.</p></div>
-<div class="paragraph"><p>A media type is made of different parts. The media type
-<code>text/html;charset=utf-8</code> is of type <code>text</code>, subtype <code>html</code>
-and has a single parameter <code>charset</code> with value <code>utf-8</code>.</p></div>
-<div class="paragraph"><p>During content negotiation Cowboy will pick the most appropriate
-media type for the client. The client advertises media types it
-prefers with the accept header. When that header is missing,
-the content negotiation fails and an error response is returned.</p></div>
-<div class="paragraph"><p>The callback given for the selected media type will be called
-at the end of the execution of GET and HEAD requests when a
-representation must be sent to the client.</p></div>
-<div class="paragraph"><p>An empty parameters list <code>[]</code> means that no parameters will be
-accepted. When any parameter is acceptable, the tuple form
-should be used with parameters as the atom <code>'*'</code>.</p></div>
-<div class="paragraph"><p>Cowboy treats all parameters as case sensitive, except for the
-<code>charset</code> parameter, which is known to be case insensitive. You
-should therefore always provide the charset as a lowercase
-binary string.</p></div>
-<div class="paragraph"><p>Cowboy will add the negotiated <code>media_type</code> to the Req object
-after this step completes:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
-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: #0000FF">media_type</span> <span style="color: #990000">=&gt;</span> <span style="color: #009900">ParsedMime</span>
-}</tt></pre></div></div>
-</div>
-<div class="sect2">
+<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><b><font color="#000000">content_types_provided</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
+
+<font color="#009900">Result</font> <font color="#990000">::</font> [{<b><font color="#000080">binary</font></b>() | <font color="#009900">ParsedMime</font>, <font color="#009900">ProvideCallback</font> <font color="#990000">::</font> <b><font color="#000080">atom</font></b>()}]
+<font color="#009900">ParsedMime</font> <font color="#990000">::</font> {<font color="#009900">Type</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">SubType</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#FF6600">'*'</font> | <font color="#009900">Params</font>}
+<font color="#009900">Params</font> <font color="#990000">::</font> [{<font color="#009900">Key</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()}]
+
+<font color="#009900">Default</font> <font color="#990000">-</font> [{{ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"html"</font><font color="#990000">&gt;&gt;</font>, <font color="#FF6600">'*'</font>}, <font color="#FF6600">to_html</font>}]</tt></pre>
+</div></div>
+<!-- @todo Case sensitivity of parsed mime content?-->
+<!-- @todo Space required for the time being: https://github.com/spf13/hugo/issues/2398-->
+<p>Return the list of media types the resource provides in order of preference.</p>
+<p>A media type is made of different parts. The media type <code>text/html;charset=utf-8</code> is of type <code>text</code>, subtype <code>html</code> and has a single parameter <code>charset</code> with value <code>utf-8</code>.</p>
+<!-- @todo Cowboy needs to ignore the boundary parameter for-->
+<!-- multipart, as we never want to match against it. Or allow-->
+<!-- ignoring specific parameters at the very least.-->
+<p>During content negotiation Cowboy will pick the most appropriate media type for the client. The client advertises media types it prefers with the accept header. When that header is missing, the content negotiation fails and an error response is returned.</p>
+<p>The callback given for the selected media type will be called at the end of the execution of GET and HEAD requests when a representation must be sent to the client.</p>
+<!-- @todo We should explain precisely how media types are picked.-->
+<p>An empty parameters list <code>[]</code> means that no parameters will be accepted. When any parameter is acceptable, the tuple form should be used with parameters as the atom <code>&apos;*&apos;</code>.</p>
+<p>Cowboy treats all parameters as case sensitive, except for the <code>charset</code> parameter, which is known to be case insensitive. You should therefore always provide the charset as a lowercase binary string.</p>
+<p>Cowboy will add the negotiated <code>media_type</code> to the Req object after this step completes:</p>
+<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><b><font color="#000000">req</font></b>() <font color="#990000">::</font> #{
+ <font color="#0000FF">media_type</font> <font color="#990000">=&gt;</font> <font color="#009900">ParsedMime</font>
+}</tt></pre>
+</div></div>
+<!-- @todo Case sensitivity of parsed mime content?-->
<h3 id="_delete_completed">delete_completed</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">delete_completed</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">delete_completed</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()
-<span style="color: #009900">Default</span> <span style="color: #990000">::</span> <span style="color: #000080">true</span></tt></pre></div></div>
-<div class="paragraph"><p>Return whether the resource has been fully deleted from the
-system, including from any internal cache.</p></div>
-<div class="paragraph"><p>Returning <code>false</code> will result in a <em>202 Accepted</em> response
-being sent instead of a <em>200 OK</em> or <em>204 No Content</em>.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> <b><font color="#000000">boolean</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <font color="#000080">true</font></tt></pre>
+</div></div>
+<p>Return whether the resource has been fully deleted from the system, including from any internal cache.</p>
+<p>Returning <code>false</code> will result in a <em>202 Accepted</em> response being sent instead of a <em>200 OK</em> or <em>204 No Content</em>.</p>
<h3 id="_delete_resource">delete_resource</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">delete_resource</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">delete_resource</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()
-<span style="color: #009900">Default</span> <span style="color: #990000">::</span> <span style="color: #000080">false</span></tt></pre></div></div>
-<div class="paragraph"><p>Delete the resource.</p></div>
-<div class="paragraph"><p>Cowboy will send an error response when this function
-returns <code>false</code>.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> <b><font color="#000000">boolean</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <font color="#000080">false</font></tt></pre>
+</div></div>
+<p>Delete the resource.</p>
+<p>Cowboy will send an error response when this function returns <code>false</code>.</p>
<h3 id="_expires">expires</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">expires</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">expires</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">calendar:datetime</span></span>() | <span style="font-weight: bold"><span style="color: #000080">binary</span></span>() | <span style="color: #000080">undefined</span>
-<span style="color: #009900">Default</span> <span style="color: #990000">::</span> <span style="color: #000080">undefined</span></tt></pre></div></div>
-<div class="paragraph"><p>Return the resource&#8217;s expiration date.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> <b><font color="#000000">calendar:datetime</font></b>() | <b><font color="#000080">binary</font></b>() | <font color="#000080">undefined</font>
+<font color="#009900">Default</font> <font color="#990000">::</font> <font color="#000080">undefined</font></tt></pre>
+</div></div>
+<p>Return the resource&apos;s expiration date.</p>
<h3 id="_forbidden">forbidden</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">forbidden</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">forbidden</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()
-<span style="color: #009900">Default</span> <span style="color: #990000">::</span> <span style="color: #000080">false</span></tt></pre></div></div>
-<div class="paragraph"><p>Return whether access to the resource is forbidden.</p></div>
-<div class="paragraph"><p>A <em>403 Forbidden</em> response will be sent if this
-function returns <code>true</code>. This status code means that
-access is forbidden regardless of authentication,
-and that the request shouldn&#8217;t be repeated.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> <b><font color="#000000">boolean</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <font color="#000080">false</font></tt></pre>
+</div></div>
+<p>Return whether access to the resource is forbidden.</p>
+<p>A <em>403 Forbidden</em> response will be sent if this function returns <code>true</code>. This status code means that access is forbidden regardless of authentication, and that the request shouldn&apos;t be repeated.</p>
<h3 id="_generate_etag">generate_etag</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">generate_etag</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">generate_etag</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>() | {<span style="color: #FF6600">weak</span> | <span style="color: #FF6600">strong</span>, <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()}
-<span style="color: #009900">Default</span> <span style="color: #990000">-</span> <span style="color: #FF6600">no</span> <span style="color: #FF6600">etag</span> <span style="color: #FF6600">value</span></tt></pre></div></div>
-<div class="paragraph"><p>Return the entity tag of the resource.</p></div>
-<div class="paragraph"><p>When a binary is returned, the value is automatically
-parsed to a tuple. The binary must be in the same
-format as the etag header, including quotes.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() | {<font color="#FF6600">weak</font> | <font color="#FF6600">strong</font>, <b><font color="#000080">binary</font></b>()}
+<font color="#009900">Default</font> <font color="#990000">-</font> <font color="#FF6600">no</font> <font color="#FF6600">etag</font> <font color="#FF6600">value</font></tt></pre>
+</div></div>
+<p>Return the entity tag of the resource.</p>
+<p>When a binary is returned, the value is automatically parsed to a tuple. The binary must be in the same format as the etag header, including quotes.</p>
<h3 id="_is_authorized">is_authorized</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">is_authorized</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">is_authorized</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="color: #000080">true</span> | {<span style="color: #000080">false</span>, <span style="color: #009900">AuthHeader</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>()}
-<span style="color: #009900">Default</span> <span style="color: #990000">-</span> <span style="color: #000080">true</span></tt></pre></div></div>
-<div class="paragraph"><p>Return whether the user is authorized to perform the action.</p></div>
-<div class="paragraph"><p>This function should be used to perform any necessary
-authentication of the user before attempting to perform
-any action on the resource.</p></div>
-<div class="paragraph"><p>When authentication fails, the <code>AuthHeader</code> value will
-be sent in the www-authenticate header for the
-<em>401 Unauthorized</em> response.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> <font color="#000080">true</font> | {<font color="#000080">false</font>, <font color="#009900">AuthHeader</font> <font color="#990000">::</font> <b><font color="#000000">iodata</font></b>()}
+<font color="#009900">Default</font> <font color="#990000">-</font> <font color="#000080">true</font></tt></pre>
+</div></div>
+<p>Return whether the user is authorized to perform the action.</p>
+<p>This function should be used to perform any necessary authentication of the user before attempting to perform any action on the resource.</p>
+<p>When authentication fails, the <code>AuthHeader</code> value will be sent in the www-authenticate header for the <em>401 Unauthorized</em> response.</p>
<h3 id="_is_conflict">is_conflict</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">is_conflict</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">is_conflict</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()
-<span style="color: #009900">Default</span> <span style="color: #990000">::</span> <span style="color: #000080">false</span></tt></pre></div></div>
-<div class="paragraph"><p>Return whether the PUT request results in a conflict.</p></div>
-<div class="paragraph"><p>A <em>409 Conflict</em> response is sent when <code>true</code>.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> <b><font color="#000000">boolean</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <font color="#000080">false</font></tt></pre>
+</div></div>
+<p>Return whether the PUT request results in a conflict.</p>
+<p>A <em>409 Conflict</em> response is sent when <code>true</code>.</p>
<h3 id="_known_methods">known_methods</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">known_methods</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">known_methods</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</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: #009900">Default</span> <span style="color: #990000">::</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">"HEAD"</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="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"PUT"</span><span style="color: #990000">&gt;&gt;</span>,
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"PATCH"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"DELETE"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"OPTIONS"</span><span style="color: #990000">&gt;&gt;</span>]</tt></pre></div></div>
-<div class="paragraph"><p>Return the list of known methods.</p></div>
-<div class="paragraph"><p>The full list of methods known by the server should be
-returned, regardless of their use in the resource.</p></div>
-<div class="paragraph"><p>The default value lists the methods Cowboy knows and
-implement in <code>cowboy_rest</code>.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> [<b><font color="#000080">binary</font></b>()] <i><font color="#9A1900">%% case sensitive</font></i>
+<font color="#009900">Default</font> <font color="#990000">::</font> [<font color="#990000">&lt;&lt;</font><font color="#FF0000">"GET"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"HEAD"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"POST"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"PUT"</font><font color="#990000">&gt;&gt;</font>,
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"PATCH"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"DELETE"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"OPTIONS"</font><font color="#990000">&gt;&gt;</font>]</tt></pre>
+</div></div>
+<p>Return the list of known methods.</p>
+<p>The full list of methods known by the server should be returned, regardless of their use in the resource.</p>
+<p>The default value lists the methods Cowboy knows and implement in <code>cowboy_rest</code>.</p>
<h3 id="_languages_provided">languages_provided</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">languages_provided</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">languages_provided</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</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: #009900">Default</span> <span style="color: #990000">-</span> <span style="color: #FF6600">skip</span> <span style="color: #FF6600">this</span> <span style="color: #FF6600">step</span></tt></pre></div></div>
-<div class="paragraph"><p>Return the list of languages the resource provides in order
-of preference.</p></div>
-<div class="paragraph"><p>During content negotiation Cowboy will pick the most
-appropriate language for the client. The client advertises
-languages it prefers with the accept-language header. When
-that header is missing, Cowboy picks the first language
-from the resource.</p></div>
-<div class="paragraph"><p>Cowboy will add the negotiated <code>language</code> to the Req object
-after this step completes:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<font color="#009900">Result</font> <font color="#990000">::</font> [<b><font color="#000080">binary</font></b>()] <i><font color="#9A1900">%% lowercase; case insensitive</font></i>
+<font color="#009900">Default</font> <font color="#990000">-</font> <font color="#FF6600">skip</font> <font color="#FF6600">this</font> <font color="#FF6600">step</font></tt></pre>
+</div></div>
+<p>Return the list of languages the resource provides in order of preference.</p>
+<p>During content negotiation Cowboy will pick the most appropriate language for the client. The client advertises languages it prefers with the accept-language header. When that header is missing, Cowboy picks the first language from the resource.</p>
+<!-- @todo We should explain precisely how languages are picked.-->
+<p>Cowboy will add the negotiated <code>language</code> to the Req object after this step completes:</p>
+<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: #0000FF">language</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>
-}</tt></pre></div></div>
-</div>
-<div class="sect2">
+<pre><tt><b><font color="#000000">req</font></b>() <font color="#990000">::</font> #{
+ <font color="#0000FF">language</font> <font color="#990000">=&gt;</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% lowercase; case insensitive</font></i>
+}</tt></pre>
+</div></div>
<h3 id="_last_modified">last_modified</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">last_modified</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">last_modified</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">calendar:datetime</span></span>()
-<span style="color: #009900">Default</span> <span style="color: #990000">-</span> <span style="color: #FF6600">no</span> <span style="color: #FF6600">last</span> <span style="color: #FF6600">modified</span> <span style="color: #FF6600">value</span></tt></pre></div></div>
-<div class="paragraph"><p>Return the resource&#8217;s last modification date.</p></div>
-<div class="paragraph"><p>This date will be used to test against the if-modified-since
-and if-unmodified-since headers, and sent as the last-modified
-header in the response to GET and HEAD requests.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> <b><font color="#000000">calendar:datetime</font></b>()
+<font color="#009900">Default</font> <font color="#990000">-</font> <font color="#FF6600">no</font> <font color="#FF6600">last</font> <font color="#FF6600">modified</font> <font color="#FF6600">value</font></tt></pre>
+</div></div>
+<p>Return the resource&apos;s last modification date.</p>
+<p>This date will be used to test against the if-modified-since and if-unmodified-since headers, and sent as the last-modified header in the response to GET and HEAD requests.</p>
<h3 id="_malformed_request">malformed_request</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">malformed_request</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">malformed_request</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()
-<span style="color: #009900">Default</span> <span style="color: #990000">::</span> <span style="color: #000080">false</span></tt></pre></div></div>
-<div class="paragraph"><p>Return whether the request is malformed.</p></div>
-<div class="paragraph"><p>A request is malformed when a component required by the
-resource is invalid. This may include the query string
-or individual headers. They should be parsed and validated
-in this function. The body should not be read at this point.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> <b><font color="#000000">boolean</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <font color="#000080">false</font></tt></pre>
+</div></div>
+<p>Return whether the request is malformed.</p>
+<p>A request is malformed when a component required by the resource is invalid. This may include the query string or individual headers. They should be parsed and validated in this function. The body should not be read at this point.</p>
<h3 id="_moved_permanently">moved_permanently</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">moved_permanently</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">moved_permanently</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> {<span style="color: #000080">true</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: #000080">false</span>
-<span style="color: #009900">Default</span> <span style="color: #990000">::</span> <span style="color: #000080">false</span></tt></pre></div></div>
-<div class="paragraph"><p>Return whether the resource was permanently moved, and
-what its new location is.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> {<font color="#000080">true</font>, <font color="#009900">URI</font> <font color="#990000">::</font> <b><font color="#000000">iodata</font></b>()} | <font color="#000080">false</font>
+<font color="#009900">Default</font> <font color="#990000">::</font> <font color="#000080">false</font></tt></pre>
+</div></div>
+<p>Return whether the resource was permanently moved, and what its new location is.</p>
<h3 id="_moved_temporarily">moved_temporarily</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">moved_temporarily</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">moved_temporarily</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> {<span style="color: #000080">true</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: #000080">false</span>
-<span style="color: #009900">Default</span> <span style="color: #990000">::</span> <span style="color: #000080">false</span></tt></pre></div></div>
-<div class="paragraph"><p>Return whether the resource was temporarily moved, and
-what its new location is.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> {<font color="#000080">true</font>, <font color="#009900">URI</font> <font color="#990000">::</font> <b><font color="#000000">iodata</font></b>()} | <font color="#000080">false</font>
+<font color="#009900">Default</font> <font color="#990000">::</font> <font color="#000080">false</font></tt></pre>
+</div></div>
+<p>Return whether the resource was temporarily moved, and what its new location is.</p>
<h3 id="_multiple_choices">multiple_choices</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
-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">multiple_choices</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
-
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()
-<span style="color: #009900">Default</span> <span style="color: #990000">::</span> <span style="color: #000080">false</span></tt></pre></div></div>
-<div class="paragraph"><p>Return whether the client should engage in reactive
-negotiation.</p></div>
-<div class="paragraph"><p>Return <code>true</code> when the server has multiple representations
-of a resource, each with their specific identifier, but is
-unable to determine which is best for the client. For
-example an image might have different sizes and the server
-is unable to determine the capabilities of the client.</p></div>
-<div class="paragraph"><p>When returning <code>true</code> the server should send a body with
-links to the different representations. If the server has
-a preferred representation it can send its link inside a
-location header.</p></div>
-</div>
-<div class="sect2">
+<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><b><font color="#000000">multiple_choices</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
+
+<font color="#009900">Result</font> <font color="#990000">::</font> <b><font color="#000000">boolean</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <font color="#000080">false</font></tt></pre>
+</div></div>
+<p>Return whether the client should engage in reactive negotiation.</p>
+<p>Return <code>true</code> when the server has multiple representations of a resource, each with their specific identifier, but is unable to determine which is best for the client. For example an image might have different sizes and the server is unable to determine the capabilities of the client.</p>
+<p>When returning <code>true</code> the server should send a body with links to the different representations. If the server has a preferred representation it can send its link inside a location header.</p>
<h3 id="_options">options</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">options</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}</tt></pre></div></div>
-<div class="paragraph"><p>Respond to an OPTIONS request.</p></div>
-<div class="paragraph"><p>The response should inform the client the communication
-options available for this resource. By default Cowboy
-will send a <em>200 OK</em> response with the allow header set.</p></div>
-</div>
-<div class="sect2">
+<pre><tt><b><font color="#000000">options</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}</tt></pre>
+</div></div>
+<p>Respond to an OPTIONS request.</p>
+<p>The response should inform the client the communication options available for this resource. By default Cowboy will send a <em>200 OK</em> response with the allow header set.</p>
<h3 id="_previously_existed">previously_existed</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">previously_existed</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">previously_existed</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()
-<span style="color: #009900">Default</span> <span style="color: #990000">::</span> <span style="color: #000080">false</span></tt></pre></div></div>
-<div class="paragraph"><p>Return whether the resource existed previously.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> <b><font color="#000000">boolean</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <font color="#000080">false</font></tt></pre>
+</div></div>
+<p>Return whether the resource existed previously.</p>
<h3 id="_providecallback">ProvideCallback</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">ProvideCallback</span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><font color="#009900">ProvideCallback</font>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:resp_body</span></span>()
-<span style="color: #009900">Default</span> <span style="color: #990000">-</span> <span style="color: #FF6600">crash</span></tt></pre></div></div>
-<div class="paragraph"><p>Return the response body.</p></div>
-<div class="paragraph"><p>The response body can be provided either as the actual data
-to be sent or a tuple indicating which file to send.</p></div>
-<div class="paragraph"><p>This function is called for both GET and HEAD requests. For
-the latter the body is not sent, however.</p></div>
-<div class="paragraph"><p>Note that there used to be a way to stream the response body.
-It was temporarily removed and will be added back in a later
-release.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:resp_body</font></b>()
+<font color="#009900">Default</font> <font color="#990000">-</font> <font color="#FF6600">crash</font></tt></pre>
+</div></div>
+<p>Return the response body.</p>
+<p>The response body can be provided either as the actual data to be sent or a tuple indicating which file to send.</p>
+<p>This function is called for both GET and HEAD requests. For the latter the body is not sent, however.</p>
+<!-- @todo Perhaps we can optimize HEAD requests and just-->
+<!-- allow calculating the length instead of returning the-->
+<!-- whole thing.-->
+<p>Note that there used to be a way to stream the response body. It was temporarily removed and will be added back in a later release.</p>
+<!-- @todo Add a way to switch to loop handler for streaming the body.-->
<h3 id="_resource_exists">resource_exists</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">resource_exists</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">resource_exists</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()
-<span style="color: #009900">Default</span> <span style="color: #990000">::</span> <span style="color: #000080">true</span></tt></pre></div></div>
-<div class="paragraph"><p>Return whether the resource exists.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> <b><font color="#000000">boolean</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <font color="#000080">true</font></tt></pre>
+</div></div>
+<p>Return whether the resource exists.</p>
<h3 id="_service_available">service_available</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">service_available</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">service_available</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()
-<span style="color: #009900">Default</span> <span style="color: #990000">::</span> <span style="color: #000080">true</span></tt></pre></div></div>
-<div class="paragraph"><p>Return whether the service is available.</p></div>
-<div class="paragraph"><p>A <em>503 Service Unavailable</em> response will be sent when this
-function returns <code>false</code>.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> <b><font color="#000000">boolean</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <font color="#000080">true</font></tt></pre>
+</div></div>
+<p>Return whether the service is available.</p>
+<p>A <em>503 Service Unavailable</em> response will be sent when this function returns <code>false</code>.</p>
<h3 id="_uri_too_long">uri_too_long</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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_too_long</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">uri_too_long</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()
-<span style="color: #009900">Default</span> <span style="color: #990000">::</span> <span style="color: #000080">false</span></tt></pre></div></div>
-<div class="paragraph"><p>Return whether the requested URI is too long.</p></div>
-<div class="paragraph"><p>This function can be used to further restrict the length
-of the URI for this specific resource.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> <b><font color="#000000">boolean</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <font color="#000080">false</font></tt></pre>
+</div></div>
+<p>Return whether the requested URI is too long.</p>
+<p>This function can be used to further restrict the length of the URI for this specific resource.</p>
<h3 id="_valid_content_headers">valid_content_headers</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">valid_content_headers</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">valid_content_headers</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()
-<span style="color: #009900">Default</span> <span style="color: #990000">::</span> <span style="color: #000080">true</span></tt></pre></div></div>
-<div class="paragraph"><p>Return whether the content headers are valid.</p></div>
-<div class="paragraph"><p>This callback can be used to reject requests that have
-invalid content header values, for example an unsupported
-content-encoding.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> <b><font color="#000000">boolean</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <font color="#000080">true</font></tt></pre>
+</div></div>
+<p>Return whether the content headers are valid.</p>
+<p>This callback can be used to reject requests that have invalid content header values, for example an unsupported content-encoding.</p>
<h3 id="_valid_entity_length">valid_entity_length</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">valid_entity_length</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">valid_entity_length</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()
-<span style="color: #009900">Default</span> <span style="color: #990000">::</span> <span style="color: #000080">true</span></tt></pre></div></div>
-<div class="paragraph"><p>Return whether the request body length is within acceptable boundaries.</p></div>
-<div class="paragraph"><p>A <em>413 Request Entity Too Large</em> response will be sent if this
-function returns <code>false</code>.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> <b><font color="#000000">boolean</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <font color="#000080">true</font></tt></pre>
+</div></div>
+<p>Return whether the request body length is within acceptable boundaries.</p>
+<p>A <em>413 Request Entity Too Large</em> response will be sent if this function returns <code>false</code>.</p>
<h3 id="_variances">variances</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">variances</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">variances</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</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 insensitive</span></span>
-<span style="color: #009900">Default</span> <span style="color: #990000">::</span> []</tt></pre></div></div>
-<div class="paragraph"><p>Return the list of request headers that affect the
-representation of the resource.</p></div>
-<div class="paragraph"><p>Cowboy automatically adds the accept, accept-charset and
-accept-language headers when necessary. It&#8217;s also useful
-to note that some standard headers also do not need to be
-listed here, like the authorization header.</p></div>
-</div>
-</div>
-</div>
-<div class="sect1">
+<font color="#009900">Result</font> <font color="#990000">::</font> [<b><font color="#000080">binary</font></b>()] <i><font color="#9A1900">%% case insensitive</font></i>
+<font color="#009900">Default</font> <font color="#990000">::</font> []</tt></pre>
+</div></div>
+<p>Return the list of request headers that affect the representation of the resource.</p>
+<p>Cowboy automatically adds the accept, accept-charset and accept-language headers when necessary. It&apos;s also useful to note that some standard headers also do not need to be listed here, like the authorization header.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.1</strong>: The <code>switch_handler</code> return value was added.
-</p>
+<ul><li><strong>2.1</strong>: The <code>switch_handler</code> return value was added.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Behavior introduced.
-</p>
+<li><strong>1.0</strong>: Behavior introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="..">cowboy(7)</a>,
-<a href="../cowboy_handler">cowboy_handler(3)</a></p></div>
-</div>
-</div>
+<p><a href="..">cowboy(7)</a>, <a href="../cowboy_handler">cowboy_handler(3)</a></p>
+
diff --git a/docs/en/cowboy/2.3/manual/cowboy_router.compile/index.html b/docs/en/cowboy/2.3/manual/cowboy_router.compile/index.html
index 1904d026..eb6bb8c8 100644
--- a/docs/en/cowboy/2.3/manual/cowboy_router.compile/index.html
+++ b/docs/en/cowboy/2.3/manual/cowboy_router.compile/index.html
@@ -62,87 +62,48 @@
<h1 class="lined-header"><span>cowboy_router:compile(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_router:compile - Compile routes to the resources</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_router:compile - Compile routes to the resources</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">compile</span></span>(<span style="font-weight: bold"><span style="color: #000000">cowboy_router:routes</span></span>()) <span style="color: #990000">-&gt;</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_router:dispatch_rules</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Compile routes to the resources.</p></div>
-<div class="paragraph"><p>Takes a human readable list of routes and transforms it
-into a form more efficient to process.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">compile</font></b>(<b><font color="#000000">cowboy_router:routes</font></b>()) <font color="#990000">-&gt;</font> <b><font color="#000000">cowboy_router:dispatch_rules</font></b>()</tt></pre>
+</div></div>
+<p>Compile routes to the resources.</p>
+<p>Takes a human readable list of routes and transforms it into a form more efficient to process.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Routes
-</dt>
-<dd>
-<p>
-Human readable list of routes.
-</p>
+<dl><dt>Routes</dt>
+<dd><p>Human readable list of routes.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>An opaque dispatch rules value is returned. This value
-must be given to Cowboy as a middleware environment value.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>An opaque dispatch rules value is returned. This value must be given to Cowboy as a middleware environment value.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<ul><li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Compile routes and start a listener</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Compile routes and start a listener</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">Dispatch</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_router:compile</span></span>([
- {<span style="color: #FF6600">'_'</span>, [
- {<span style="color: #FF0000">"/"</span>, <span style="color: #FF6600">toppage_h</span>, []},
- {<span style="color: #FF0000">"/[...], cowboy_static, {priv_dir, my_example_app, ""}}</span>
-<span style="color: #FF0000"> ]}</span>
-<span style="color: #FF0000">]),</span>
-
-<span style="color: #FF0000">{ok, _} = cowboy:start_clear(example, [{port, 8080}], #{</span>
-<span style="color: #FF0000"> env =&gt; #{dispatch =&gt; Dispatch}</span>
-<span style="color: #FF0000">}).</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Dispatch</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_router:compile</font></b>([
+ {<font color="#FF6600">'_'</font>, [
+ {<font color="#FF0000">"/"</font>, <font color="#FF6600">toppage_h</font>, []},
+ {<font color="#FF0000">"/[...], cowboy_static, {priv_dir, my_example_app, ""}}</font>
+<font color="#FF0000"> ]}</font>
+<font color="#FF0000">]),</font>
+
+<font color="#FF0000">{ok, _} = cowboy:start_clear(example, [{port, 8080}], #{</font>
+<font color="#FF0000"> env =&gt; #{dispatch =&gt; Dispatch}</font>
+<font color="#FF0000">}).</font></tt></pre>
+</div></div>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../cowboy_router">cowboy_router(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_router">cowboy_router(3)</a></p>
+
diff --git a/docs/en/cowboy/2.3/manual/cowboy_router/index.html b/docs/en/cowboy/2.3/manual/cowboy_router/index.html
index dae2a362..a5895995 100644
--- a/docs/en/cowboy/2.3/manual/cowboy_router/index.html
+++ b/docs/en/cowboy/2.3/manual/cowboy_router/index.html
@@ -62,110 +62,65 @@
<h1 class="lined-header"><span>cowboy_router(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_router - Router middleware</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_router - Router middleware</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <code>cowboy_router</code> middleware maps the requested host and
-path to the handler to be used for processing the request.</p></div>
-<div class="paragraph"><p>The router takes the <code>dispatch</code> rules as input from the
-middleware environment. Dispatch rules are generated by
-calling the
-<a href="../cowboy_router.compile">cowboy_router:compile(3)</a>
-function.</p></div>
-<div class="paragraph"><p>When a route matches, the router sets the <code>handler</code> and
-<code>handler_opts</code> middleware environment values containing
-the handler module and initial state, respectively.</p></div>
-<div class="paragraph"><p>The router will stop execution when no route matches.
-It will send a 400 response if no host was found, and
-a 404 response otherwise.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The <code>cowboy_router</code> middleware maps the requested host and path to the handler to be used for processing the request.</p>
+<p>The router takes the <code>dispatch</code> rules as input from the middleware environment. Dispatch rules are generated by calling the <a href="../cowboy_router.compile">cowboy_router:compile(3)</a> function.</p>
+<p>When a route matches, the router sets the <code>handler</code> and <code>handler_opts</code> middleware environment values containing the handler module and initial state, respectively.</p>
+<p>The router will stop execution when no route matches. It will send a 400 response if no host was found, and a 404 response otherwise.</p>
<h2 id="_exports">Exports</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../cowboy_router.compile">cowboy_router:compile(3)</a> - Compile routes to the resources
-</p>
+<ul><li><a href="../cowboy_router.compile">cowboy_router:compile(3)</a> - Compile routes to the resources
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_types">Types</h2>
-<div class="sectionbody">
-<div class="sect2">
<h3 id="_bindings">bindings()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">bindings</span></span>() <span style="color: #990000">::</span> #{<span style="font-weight: bold"><span style="color: #000080">atom</span></span>() <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>Bindings found during routing.</p></div>
-</div>
-<div class="sect2">
+<pre><tt><b><font color="#000000">bindings</font></b>() <font color="#990000">::</font> #{<b><font color="#000080">atom</font></b>() <font color="#990000">=&gt;</font> <b><font color="#000000">any</font></b>()}</tt></pre>
+</div></div>
+<p>Bindings found during routing.</p>
<h3 id="_dispatch_rules">dispatch_rules()</h3>
-<div class="paragraph"><p>Opaque type containing the compiled routes.</p></div>
-</div>
-<div class="sect2">
+<p>Opaque type containing the compiled routes.</p>
<h3 id="_routes">routes()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">routes</span></span>() <span style="color: #990000">=</span> [
- {<span style="color: #009900">Host</span>, <span style="color: #009900">PathList</span>} |
- {<span style="color: #009900">Host</span>, <span style="color: #009900">Fields</span>, <span style="color: #009900">PathList</span>}
+<pre><tt><b><font color="#000000">routes</font></b>() <font color="#990000">=</font> [
+ {<font color="#009900">Host</font>, <font color="#009900">PathList</font>} |
+ {<font color="#009900">Host</font>, <font color="#009900">Fields</font>, <font color="#009900">PathList</font>}
]
-<span style="color: #009900">PathList</span> <span style="color: #990000">::</span> [
- {<span style="color: #009900">Path</span>, <span style="color: #009900">Handler</span>, <span style="color: #009900">InitialState</span>} |
- {<span style="color: #009900">Path</span>, <span style="color: #009900">Fields</span>, <span style="color: #009900">Handler</span>, <span style="color: #009900">InitialState</span>}
+<font color="#009900">PathList</font> <font color="#990000">::</font> [
+ {<font color="#009900">Path</font>, <font color="#009900">Handler</font>, <font color="#009900">InitialState</font>} |
+ {<font color="#009900">Path</font>, <font color="#009900">Fields</font>, <font color="#009900">Handler</font>, <font color="#009900">InitialState</font>}
]
-<span style="color: #009900">Host</span> <span style="color: #990000">::</span> <span style="color: #FF6600">'_'</span> | <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>()
-<span style="color: #009900">Path</span> <span style="color: #990000">::</span> <span style="color: #FF6600">'_'</span> | <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>()
-<span style="color: #009900">Fields</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:fields</span></span>()
-<span style="color: #009900">Handler</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">module</span></span>()
-<span style="color: #009900">InitialState</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>Human readable list of routes to handlers.</p></div>
-<div class="paragraph"><p>Cowboy uses this list to map hosts and paths, optionally
-augmented with constraints applied to the bindings, to
-handler modules.</p></div>
-<div class="paragraph"><p>The syntax for routes is currently defined in the user guide.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Host</font> <font color="#990000">::</font> <font color="#FF6600">'_'</font> | <b><font color="#000000">iodata</font></b>()
+<font color="#009900">Path</font> <font color="#990000">::</font> <font color="#FF6600">'_'</font> | <b><font color="#000000">iodata</font></b>()
+<font color="#009900">Fields</font> <font color="#990000">::</font> <b><font color="#000000">cowboy:fields</font></b>()
+<font color="#009900">Handler</font> <font color="#990000">::</font> <b><font color="#000000">module</font></b>()
+<font color="#009900">InitialState</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()</tt></pre>
+</div></div>
+<p>Human readable list of routes to handlers.</p>
+<p>Cowboy uses this list to map hosts and paths, optionally augmented with constraints applied to the bindings, to handler modules.</p>
+<p>The syntax for routes is currently defined in the user guide.</p>
+<!-- @todo The syntax should probably be in this module,-->
+<!-- and the user guide show more practical examples.-->
<h3 id="_tokens">tokens()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">tokens</span></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>List of <code>host_info</code> and <code>path_info</code> tokens that were found
-using the <code>...</code> syntax.</p></div>
-</div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">tokens</font></b>() <font color="#990000">::</font> [<b><font color="#000080">binary</font></b>()]</tt></pre>
+</div></div>
+<p>List of <code>host_info</code> and <code>path_info</code> tokens that were found using the <code>...</code> syntax.</p>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="..">cowboy(7)</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>,
-<a href="../cowboy_req.path_info">cowboy_req:path_info(3)</a></p></div>
-</div>
-</div>
+<p><a href="..">cowboy(7)</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>, <a href="../cowboy_req.path_info">cowboy_req:path_info(3)</a></p>
+
diff --git a/docs/en/cowboy/2.3/manual/cowboy_static/index.html b/docs/en/cowboy/2.3/manual/cowboy_static/index.html
index 9cb78a3d..b00701d7 100644
--- a/docs/en/cowboy/2.3/manual/cowboy_static/index.html
+++ b/docs/en/cowboy/2.3/manual/cowboy_static/index.html
@@ -62,175 +62,110 @@
<h1 class="lined-header"><span>cowboy_static(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_static - Static file handler</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_static - Static file handler</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The module <code>cowboy_static</code> implements file serving capabilities
-using the REST semantics provided by <code>cowboy_rest</code>.</p></div>
-<div class="paragraph"><p>The static file handler is a pre-written handler coming with
-Cowboy. To serve files, use it in your routes.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The module <code>cowboy_static</code> implements file serving capabilities using the REST semantics provided by <code>cowboy_rest</code>.</p>
+<p>The static file handler is a pre-written handler coming with Cowboy. To serve files, use it in your routes.</p>
<h2 id="_options">Options</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">opts</span></span>() <span style="color: #990000">::</span> {<span style="color: #FF6600">priv_file</span>, <span style="color: #009900">App</span>, <span style="color: #009900">Path</span>}
- | {<span style="color: #FF6600">priv_file</span>, <span style="color: #009900">App</span>, <span style="color: #009900">Path</span>, <span style="color: #009900">Extra</span>}
- | {<span style="color: #FF6600">file</span>, <span style="color: #009900">Path</span>}
- | {<span style="color: #FF6600">file</span>, <span style="color: #009900">Path</span>, <span style="color: #009900">Extra</span>}
- | {<span style="color: #FF6600">priv_dir</span>, <span style="color: #009900">App</span>, <span style="color: #009900">Path</span>}
- | {<span style="color: #FF6600">priv_dir</span>, <span style="color: #009900">App</span>, <span style="color: #009900">Path</span>, <span style="color: #009900">Extra</span>}
- | {<span style="color: #FF6600">dir</span>, <span style="color: #009900">Path</span>}
- | {<span style="color: #FF6600">dir</span>, <span style="color: #009900">Path</span>, <span style="color: #009900">Extra</span>}
-
-<span style="color: #009900">App</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">atom</span></span>()
-<span style="color: #009900">Path</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>() | <span style="font-weight: bold"><span style="color: #000000">string</span></span>()
-<span style="color: #009900">Extra</span> <span style="color: #990000">::</span> [<span style="color: #009900">Etag</span> | <span style="color: #009900">Mimetypes</span>]
-
-<span style="color: #009900">Etag</span> <span style="color: #990000">::</span> {<span style="color: #FF6600">etag</span>, <span style="font-weight: bold"><span style="color: #000000">module</span></span>(), <span style="font-weight: bold"><span style="color: #000080">function</span></span>()}
- | {<span style="color: #FF6600">etag</span>, <span style="color: #000080">false</span>}
-
-<span style="color: #009900">Mimetypes</span> <span style="color: #990000">::</span> {<span style="color: #FF6600">mimetypes</span>, <span style="font-weight: bold"><span style="color: #000000">module</span></span>(), <span style="font-weight: bold"><span style="color: #000080">function</span></span>()}
- | {<span style="color: #FF6600">mimetypes</span>, <span style="font-weight: bold"><span style="color: #000080">binary</span></span>() | <span style="color: #009900">ParsedMime</span>}
-
-<span style="color: #009900">ParsedMime</span> <span style="color: #990000">::</span> {<span style="color: #009900">Type</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="color: #009900">SubType</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="color: #009900">Params</span>}
-<span style="color: #009900">Params</span> <span style="color: #990000">::</span> [{<span style="color: #009900">Key</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="color: #009900">Value</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>Static handler configuration.</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-priv_file
-</dt>
-<dd>
-<p>
-Send a file.
-</p>
-<div class="paragraph"><p>The path is relative to the given application&#8217;s private
-directory.</p></div>
+<pre><tt><b><font color="#000000">opts</font></b>() <font color="#990000">::</font> {<font color="#FF6600">priv_file</font>, <font color="#009900">App</font>, <font color="#009900">Path</font>}
+ | {<font color="#FF6600">priv_file</font>, <font color="#009900">App</font>, <font color="#009900">Path</font>, <font color="#009900">Extra</font>}
+ | {<font color="#FF6600">file</font>, <font color="#009900">Path</font>}
+ | {<font color="#FF6600">file</font>, <font color="#009900">Path</font>, <font color="#009900">Extra</font>}
+ | {<font color="#FF6600">priv_dir</font>, <font color="#009900">App</font>, <font color="#009900">Path</font>}
+ | {<font color="#FF6600">priv_dir</font>, <font color="#009900">App</font>, <font color="#009900">Path</font>, <font color="#009900">Extra</font>}
+ | {<font color="#FF6600">dir</font>, <font color="#009900">Path</font>}
+ | {<font color="#FF6600">dir</font>, <font color="#009900">Path</font>, <font color="#009900">Extra</font>}
+
+<font color="#009900">App</font> <font color="#990000">::</font> <b><font color="#000080">atom</font></b>()
+<font color="#009900">Path</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() | <b><font color="#000000">string</font></b>()
+<font color="#009900">Extra</font> <font color="#990000">::</font> [<font color="#009900">Etag</font> | <font color="#009900">Mimetypes</font>]
+
+<font color="#009900">Etag</font> <font color="#990000">::</font> {<font color="#FF6600">etag</font>, <b><font color="#000000">module</font></b>(), <b><font color="#000080">function</font></b>()}
+ | {<font color="#FF6600">etag</font>, <font color="#000080">false</font>}
+
+<font color="#009900">Mimetypes</font> <font color="#990000">::</font> {<font color="#FF6600">mimetypes</font>, <b><font color="#000000">module</font></b>(), <b><font color="#000080">function</font></b>()}
+ | {<font color="#FF6600">mimetypes</font>, <b><font color="#000080">binary</font></b>() | <font color="#009900">ParsedMime</font>}
+
+<font color="#009900">ParsedMime</font> <font color="#990000">::</font> {<font color="#009900">Type</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">SubType</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">Params</font>}
+<font color="#009900">Params</font> <font color="#990000">::</font> [{<font color="#009900">Key</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()}]</tt></pre>
+</div></div>
+<p>Static handler configuration.</p>
+<dl><dt>priv_file</dt>
+<dd><p>Send a file.</p>
+<p>The path is relative to the given application&apos;s private directory.</p>
</dd>
-<dt class="hdlist1">
-file
-</dt>
-<dd>
-<p>
-Send a file.
-</p>
-<div class="paragraph"><p>The path is either absolute or relative to the Erlang node&#8217;s
-current directory.</p></div>
+<dt>file</dt>
+<dd><p>Send a file.</p>
+<p>The path is either absolute or relative to the Erlang node&apos;s current directory.</p>
</dd>
-<dt class="hdlist1">
-priv_dir
-</dt>
-<dd>
-<p>
-Recursively serve files from a directory.
-</p>
-<div class="paragraph"><p>The path is relative to the given application&#8217;s private
-directory.</p></div>
+<dt>priv_dir</dt>
+<dd><p>Recursively serve files from a directory.</p>
+<p>The path is relative to the given application&apos;s private directory.</p>
</dd>
-<dt class="hdlist1">
-dir
-</dt>
-<dd>
-<p>
-Recursively serve files from a directory.
-</p>
-<div class="paragraph"><p>The path is either absolute or relative to the Erlang node&#8217;s
-current directory.</p></div>
+<dt>dir</dt>
+<dd><p>Recursively serve files from a directory.</p>
+<p>The path is either absolute or relative to the Erlang node&apos;s current directory.</p>
</dd>
-</dl></div>
-<div class="paragraph"><p>The extra options allow you to define how the etag should be
-calculated and how the MIME type of files should be detected.</p></div>
-<div class="paragraph"><p>By default the static handler will generate an etag based
-on the size and modification time of the file. You may disable
-the etag entirely with <code>{etag, false}</code> or provide a module
-and function that will be called when needed:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+</dl>
+<p>The extra options allow you to define how the etag should be calculated and how the MIME type of files should be detected.</p>
+<p>By default the static handler will generate an etag based on the size and modification time of the file. You may disable the etag entirely with <code>{etag, false}</code> or provide a module and function that will be called when needed:</p>
+<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">generate_etag</span></span>(<span style="color: #009900">Path</span>, <span style="color: #009900">Size</span>, <span style="color: #009900">Mtime</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #FF6600">strong</span> | <span style="color: #FF6600">weak</span>, <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()}
-
-<span style="color: #009900">Path</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()
-<span style="color: #009900">Size</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>()
-<span style="color: #009900">Mtime</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">file:date_time</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>By default the static handler will detect Web-related MIME types
-by looking at the file extension. You can provide a specific
-MIME type that will always be used, or a module and function that
-will be called when needed:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">generate_etag</font></b>(<font color="#009900">Path</font>, <font color="#009900">Size</font>, <font color="#009900">Mtime</font>) <font color="#990000">-&gt;</font> {<font color="#FF6600">strong</font> | <font color="#FF6600">weak</font>, <b><font color="#000080">binary</font></b>()}
+
+<font color="#009900">Path</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()
+<font color="#009900">Size</font> <font color="#990000">::</font> <b><font color="#000000">non_neg_integer</font></b>()
+<font color="#009900">Mtime</font> <font color="#990000">::</font> <b><font color="#000000">file:date_time</font></b>()</tt></pre>
+</div></div>
+<p>By default the static handler will detect Web-related MIME types by looking at the file extension. You can provide a specific MIME type that will always be used, or a module and function that will be called when needed:</p>
+<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">detect_mimetype</span></span>(<span style="color: #009900">Path</span>) <span style="color: #990000">-&gt;</span> <span style="color: #009900">ParsedMime</span>
-
-<span style="color: #009900">Path</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()
-<span style="color: #009900">ParsedMime</span> <span style="color: #990000">::</span> {<span style="color: #009900">Type</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="color: #009900">SubType</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="color: #009900">Params</span>}
-<span style="color: #009900">Params</span> <span style="color: #990000">::</span> [{<span style="color: #009900">Key</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="color: #009900">Value</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>Cowboy comes with two such functions; the default function
-<code>cow_mimetypes:web/1</code>, and a second function generated from
-the Apache <em>mime.types</em> file, <code>cow_mimetypes:all/1</code>.</p></div>
-<div class="paragraph"><p>The MIME type function should return
-<code>{&lt;&lt;"application"&gt;&gt;, &lt;&lt;"octet-stream"&gt;&gt;, []}</code>
-when it fails to detect a file&#8217;s MIME type.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">detect_mimetype</font></b>(<font color="#009900">Path</font>) <font color="#990000">-&gt;</font> <font color="#009900">ParsedMime</font>
+
+<font color="#009900">Path</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()
+<font color="#009900">ParsedMime</font> <font color="#990000">::</font> {<font color="#009900">Type</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">SubType</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">Params</font>}
+<font color="#009900">Params</font> <font color="#990000">::</font> [{<font color="#009900">Key</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()}]</tt></pre>
+</div></div>
+<!-- @todo Case sensitivity of parsed mime content?-->
+<p>Cowboy comes with two such functions; the default function <code>cow_mimetypes:web/1</code>, and a second function generated from the Apache <em>mime.types</em> file, <code>cow_mimetypes:all/1</code>.</p>
+<p>The MIME type function should return <code>{&lt;&lt;&quot;application&quot;&gt;&gt;, &lt;&lt;&quot;octet-stream&quot;&gt;&gt;, []}</code> when it fails to detect a file&apos;s MIME type.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>1.0</strong>: Handler introduced.
-</p>
+<ul><li><strong>1.0</strong>: Handler introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Custom etag function</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Custom etag function</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">generate_etag</span></span>(<span style="color: #009900">Path</span>, <span style="color: #009900">Size</span>, <span style="color: #009900">Mtime</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">strong</span>, <span style="font-weight: bold"><span style="color: #000000">integer_to_binary</span></span>(
- <span style="font-weight: bold"><span style="color: #000000">erlang:phash2</span></span>({<span style="color: #009900">Path</span>, <span style="color: #009900">Size</span>, <span style="color: #009900">Mtime</span>}, <span style="color: #993399">16#ffffffff</span>))}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Custom MIME type function</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">generate_etag</font></b>(<font color="#009900">Path</font>, <font color="#009900">Size</font>, <font color="#009900">Mtime</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">strong</font>, <b><font color="#000000">integer_to_binary</font></b>(
+ <b><font color="#000000">erlang:phash2</font></b>({<font color="#009900">Path</font>, <font color="#009900">Size</font>, <font color="#009900">Mtime</font>}, <font color="#993399">16#ffffffff</font>))}<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Custom MIME type function</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">always_octet_stream</span></span>(<span style="color: #009900">_Path</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">filename:extension</span></span>(<span style="color: #009900">Path</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">".erl"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">-&gt;</span> {<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"plain"</span><span style="color: #990000">&gt;&gt;</span>, []};
- <span style="color: #990000">_</span> <span style="color: #990000">-&gt;</span> {<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"application"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"octet-stream"</span><span style="color: #990000">&gt;&gt;</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">
+<pre><tt><b><font color="#000000">always_octet_stream</font></b>(<font color="#009900">_Path</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">case</font></b> <b><font color="#000000">filename:extension</font></b>(<font color="#009900">Path</font>) <b><font color="#0000FF">of</font></b>
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">".erl"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">-&gt;</font> {<font color="#990000">&lt;&lt;</font><font color="#FF0000">"text"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"plain"</font><font color="#990000">&gt;&gt;</font>, []};
+ <font color="#990000">_</font> <font color="#990000">-&gt;</font> {<font color="#990000">&lt;&lt;</font><font color="#FF0000">"application"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"octet-stream"</font><font color="#990000">&gt;&gt;</font>, []}
+ <b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="..">cowboy(7)</a>,
-<a href="../cowboy_router">cowboy_router(3)</a></p></div>
-</div>
-</div>
+<p><a href="..">cowboy(7)</a>, <a href="../cowboy_router">cowboy_router(3)</a></p>
+
diff --git a/docs/en/cowboy/2.3/manual/cowboy_stream/index.html b/docs/en/cowboy/2.3/manual/cowboy_stream/index.html
index 3755a025..298fc18e 100644
--- a/docs/en/cowboy/2.3/manual/cowboy_stream/index.html
+++ b/docs/en/cowboy/2.3/manual/cowboy_stream/index.html
@@ -62,452 +62,307 @@
<h1 class="lined-header"><span>cowboy_stream(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_handler - Stream handlers</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_handler - Stream handlers</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The module <code>cowboy_stream</code> defines a callback interface
-and a protocol for handling HTTP streams.</p></div>
-<div class="paragraph"><p>An HTTP request and its associated response is called
-a stream. A connection may have many streams. In HTTP/1.1
-they are executed sequentially, while in HTTP/2 they are
-executed concurrently.</p></div>
-<div class="paragraph"><p>Cowboy calls the stream handler for nearly all events
-related to a stream. Exceptions vary depending on the
-protocol.</p></div>
-<div class="paragraph"><p>Extra care must be taken when implementing stream handlers
-to ensure compatibility. While some modification of the
-events and commands is allowed, it is generally not a good
-idea to completely omit them.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The module <code>cowboy_stream</code> defines a callback interface and a protocol for handling HTTP streams.</p>
+<p>An HTTP request and its associated response is called a stream. A connection may have many streams. In HTTP/1.1 they are executed sequentially, while in HTTP/2 they are executed concurrently.</p>
+<p>Cowboy calls the stream handler for nearly all events related to a stream. Exceptions vary depending on the protocol.</p>
+<p>Extra care must be taken when implementing stream handlers to ensure compatibility. While some modification of the events and commands is allowed, it is generally not a good idea to completely omit them.</p>
<h2 id="_callbacks">Callbacks</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Stream handlers must implement the following interface:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Stream handlers must implement the following interface:</p>
+<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">init</span></span>(<span style="color: #009900">StreamID</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">Opts</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Commands</span>, <span style="color: #009900">State</span>}
-<span style="font-weight: bold"><span style="color: #000000">data</span></span>(<span style="color: #009900">StreamID</span>, <span style="color: #009900">IsFin</span>, <span style="color: #009900">Data</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Commands</span>, <span style="color: #009900">State</span>}
-<span style="font-weight: bold"><span style="color: #000000">info</span></span>(<span style="color: #009900">StreamID</span>, <span style="color: #009900">Info</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Commands</span>, <span style="color: #009900">State</span>}
-<span style="font-weight: bold"><span style="color: #000000">terminate</span></span>(<span style="color: #009900">StreamID</span>, <span style="color: #009900">Reason</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()
-<span style="font-weight: bold"><span style="color: #000000">early_error</span></span>(<span style="color: #009900">StreamID</span>, <span style="color: #009900">Reason</span>, <span style="color: #009900">PartialReq</span>, <span style="color: #009900">Resp</span>, <span style="color: #009900">Opts</span>) <span style="color: #990000">-&gt;</span> <span style="color: #009900">Resp</span>
-
-<span style="color: #009900">StreamID</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_stream:streamid</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">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:opts</span></span>()
-<span style="color: #009900">Commands</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_stream:commands</span></span>()
-<span style="color: #009900">State</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()
-<span style="color: #009900">IsFin</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_stream:fin</span></span>()
-<span style="color: #009900">Data</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()
-<span style="color: #009900">Info</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()
-<span style="color: #009900">Reason</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_stream:reason</span></span>()
-<span style="color: #009900">PartialReq</span> <span style="color: #990000">-</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:req</span></span>(), <span style="color: #FF6600">except</span> <span style="color: #FF6600">all</span> <span style="color: #FF6600">fields</span> <span style="color: #FF6600">are</span> <span style="color: #FF6600">optional</span>
-<span style="color: #009900">Resp</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_stream:resp_command</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>HTTP/1.1 will initialize a stream only when the request-line
-and all headers have been received. When errors occur before
-that point Cowboy will call the callback <code>early_error/5</code>
-with a partial request, the error reason and the response
-Cowboy intends to send. All other events go throuh the
-stream handler using the normal callbacks.</p></div>
-<div class="paragraph"><p>HTTP/2 will initialize the stream when the <code>HEADERS</code> block has
-been fully received and decoded. Any protocol error occuring
-before that will not result in a response being sent and
-will therefore not go through the stream handler. In addition
-Cowboy may terminate streams without sending an HTTP response
-back.</p></div>
-<div class="paragraph"><p>The stream is initialized by calling <code>init/3</code>. All streams
-that are initialized will eventually be terminated by calling
-<code>terminate/3</code>.</p></div>
-<div class="paragraph"><p>When Cowboy receives data for the stream it will call <code>data/4</code>.
-The data given is the request body after any transfer decoding
-has been applied.</p></div>
-<div class="paragraph"><p>When Cowboy receives a message addressed to a stream, or when
-Cowboy needs to inform the stream handler that an internal
-event has occurred, it will call <code>info/3</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">StreamID</font>, <font color="#009900">Req</font>, <font color="#009900">Opts</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Commands</font>, <font color="#009900">State</font>}
+<b><font color="#000000">data</font></b>(<font color="#009900">StreamID</font>, <font color="#009900">IsFin</font>, <font color="#009900">Data</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Commands</font>, <font color="#009900">State</font>}
+<b><font color="#000000">info</font></b>(<font color="#009900">StreamID</font>, <font color="#009900">Info</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Commands</font>, <font color="#009900">State</font>}
+<b><font color="#000000">terminate</font></b>(<font color="#009900">StreamID</font>, <font color="#009900">Reason</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> <b><font color="#000000">any</font></b>()
+<b><font color="#000000">early_error</font></b>(<font color="#009900">StreamID</font>, <font color="#009900">Reason</font>, <font color="#009900">PartialReq</font>, <font color="#009900">Resp</font>, <font color="#009900">Opts</font>) <font color="#990000">-&gt;</font> <font color="#009900">Resp</font>
+
+<font color="#009900">StreamID</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_stream:streamid</font></b>()
+<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()
+<font color="#009900">Opts</font> <font color="#990000">::</font> <b><font color="#000000">cowboy:opts</font></b>()
+<font color="#009900">Commands</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_stream:commands</font></b>()
+<font color="#009900">State</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()
+<font color="#009900">IsFin</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_stream:fin</font></b>()
+<font color="#009900">Data</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()
+<font color="#009900">Info</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()
+<font color="#009900">Reason</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_stream:reason</font></b>()
+<font color="#009900">PartialReq</font> <font color="#990000">-</font> <b><font color="#000000">cowboy_req:req</font></b>(), <font color="#FF6600">except</font> <font color="#FF6600">all</font> <font color="#FF6600">fields</font> <font color="#FF6600">are</font> <font color="#FF6600">optional</font>
+<font color="#009900">Resp</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_stream:resp_command</font></b>()</tt></pre>
+</div></div>
+<p>HTTP/1.1 will initialize a stream only when the request-line and all headers have been received. When errors occur before that point Cowboy will call the callback <code>early_error/5</code> with a partial request, the error reason and the response Cowboy intends to send. All other events go throuh the stream handler using the normal callbacks.</p>
+<p>HTTP/2 will initialize the stream when the <code>HEADERS</code> block has been fully received and decoded. Any protocol error occuring before that will not result in a response being sent and will therefore not go through the stream handler. In addition Cowboy may terminate streams without sending an HTTP response back.</p>
+<p>The stream is initialized by calling <code>init/3</code>. All streams that are initialized will eventually be terminated by calling <code>terminate/3</code>.</p>
+<p>When Cowboy receives data for the stream it will call <code>data/4</code>. The data given is the request body after any transfer decoding has been applied.</p>
+<p>When Cowboy receives a message addressed to a stream, or when Cowboy needs to inform the stream handler that an internal event has occurred, it will call <code>info/3</code>.</p>
<h2 id="commands">Commands</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Stream handlers can return a list of commands to be executed
-from the <code>init/3</code>, <code>data/4</code> and <code>info/3</code> callbacks. In addition,
-the <code>early_error/5</code> callback must return a response command.</p></div>
-<div class="paragraph"><p>The following commands are defined:</p></div>
-<div class="sect2">
+<p>Stream handlers can return a list of commands to be executed from the <code>init/3</code>, <code>data/4</code> and <code>info/3</code> callbacks. In addition, the <code>early_error/5</code> callback must return a response command.</p>
+<!-- @todo We need a &apos;log&apos; command that would call error_logger.-->
+<!-- It&apos;s better than doing in the handlers directly because-->
+<!-- then we can have other stream handlers manipulate those logs.-->
+<!-- @todo We need a command to send a message so that other-->
+<!-- stream handlers can manipulate these messages if necessary.-->
+<p>The following commands are defined:</p>
<h3 id="inform_command">inform</h3>
-<div class="paragraph"><p>Send an informational response to the client.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Send an informational response to the client.</p>
+<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">inform</span>, <span style="font-weight: bold"><span style="color: #000000">cowboy:http_status</span></span>(), <span style="font-weight: bold"><span style="color: #000000">cowboy:http_headers</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>Any number of informational responses may be sent,
-but only until the final response is sent.</p></div>
-</div>
-<div class="sect2">
+<pre><tt>{<font color="#FF6600">inform</font>, <b><font color="#000000">cowboy:http_status</font></b>(), <b><font color="#000000">cowboy:http_headers</font></b>()}</tt></pre>
+</div></div>
+<p>Any number of informational responses may be sent, but only until the final response is sent.</p>
<h3 id="response_command">response</h3>
-<div class="paragraph"><p>Send a response to the client.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Send a response to the client.</p>
+<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">response</span>, <span style="font-weight: bold"><span style="color: #000000">cowboy:http_status</span></span>(), <span style="font-weight: bold"><span style="color: #000000">cowboy:http_headers</span></span>(),
- <span style="font-weight: bold"><span style="color: #000000">cowboy_req:resp_body</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>No more data can be sent after this command.</p></div>
-</div>
-<div class="sect2">
+<pre><tt>{<font color="#FF6600">response</font>, <b><font color="#000000">cowboy:http_status</font></b>(), <b><font color="#000000">cowboy:http_headers</font></b>(),
+ <b><font color="#000000">cowboy_req:resp_body</font></b>()}</tt></pre>
+</div></div>
+<p>No more data can be sent after this command.</p>
<h3 id="headers_command">headers</h3>
-<div class="paragraph"><p>Initiate a response to the client.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Initiate a response to the client.</p>
+<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="font-weight: bold"><span style="color: #000000">cowboy:http_status</span></span>(), <span style="font-weight: bold"><span style="color: #000000">cowboy:http_headers</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>This initiates a response to the client. The stream
-will end when a data command with the <code>fin</code> flag or
-a trailer command is returned.</p></div>
-</div>
-<div class="sect2">
+<pre><tt>{<font color="#FF6600">headers</font>, <b><font color="#000000">cowboy:http_status</font></b>(), <b><font color="#000000">cowboy:http_headers</font></b>()}</tt></pre>
+</div></div>
+<p>This initiates a response to the client. The stream will end when a data command with the <code>fin</code> flag or a trailer command is returned.</p>
<h3 id="data_command">data</h3>
-<div class="paragraph"><p>Send data to the client.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Send data to the client.</p>
+<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">data</span>, <span style="font-weight: bold"><span style="color: #000000">fin</span></span>(), <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>()}</tt></pre></div></div>
-</div>
-<div class="sect2">
+<pre><tt>{<font color="#FF6600">data</font>, <b><font color="#000000">fin</font></b>(), <b><font color="#000000">iodata</font></b>()}</tt></pre>
+</div></div>
<h3 id="trailers_command">trailers</h3>
-<div class="paragraph"><p>Send response trailers to the client.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Send response trailers to the client.</p>
+<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">trailers</span>, <span style="font-weight: bold"><span style="color: #000000">cowboy:http_headers</span></span>()}</tt></pre></div></div>
-</div>
-<div class="sect2">
+<pre><tt>{<font color="#FF6600">trailers</font>, <b><font color="#000000">cowboy:http_headers</font></b>()}</tt></pre>
+</div></div>
<h3 id="push_command">push</h3>
-<div class="paragraph"><p>Push a resource to the client.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Push a resource to the client.</p>
+<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">push</span>, <span style="color: #009900">Method</span>, <span style="color: #009900">Scheme</span>, <span style="color: #009900">Host</span>, <span style="font-weight: bold"><span style="color: #000000">inet:port_number</span></span>(),
- <span style="color: #009900">Path</span>, <span style="color: #009900">Qs</span>, <span style="font-weight: bold"><span style="color: #000000">cowboy:http_headers</span></span>()}
+<pre><tt>{<font color="#FF6600">push</font>, <font color="#009900">Method</font>, <font color="#009900">Scheme</font>, <font color="#009900">Host</font>, <b><font color="#000000">inet:port_number</font></b>(),
+ <font color="#009900">Path</font>, <font color="#009900">Qs</font>, <b><font color="#000000">cowboy:http_headers</font></b>()}
-<span style="color: #009900">Method</span> <span style="color: #990000">=</span> <span style="color: #009900">Scheme</span> <span style="color: #990000">=</span> <span style="color: #009900">Host</span> <span style="color: #990000">=</span> <span style="color: #009900">Path</span> <span style="color: #990000">=</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>The command will be ignored if the protocol does not provide
-any server push mechanism.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Method</font> <font color="#990000">=</font> <font color="#009900">Scheme</font> <font color="#990000">=</font> <font color="#009900">Host</font> <font color="#990000">=</font> <font color="#009900">Path</font> <font color="#990000">=</font> <font color="#009900">Qs</font> <font color="#990000">=</font> <b><font color="#000080">binary</font></b>()</tt></pre>
+</div></div>
+<p>The command will be ignored if the protocol does not provide any server push mechanism.</p>
<h3 id="_flow">flow</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">flow</span>, <span style="font-weight: bold"><span style="color: #000000">pos_integer</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>Request more data to be read from the request body. The
-exact behavior depends on the protocol.</p></div>
-</div>
-<div class="sect2">
+<pre><tt>{<font color="#FF6600">flow</font>, <b><font color="#000000">pos_integer</font></b>()}</tt></pre>
+</div></div>
+<p>Request more data to be read from the request body. The exact behavior depends on the protocol.</p>
<h3 id="_spawn">spawn</h3>
-<div class="paragraph"><p>Inform Cowboy that a process was spawned and should be
-supervised.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Inform Cowboy that a process was spawned and should be supervised.</p>
+<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: #000080">spawn</span></span>, <span style="font-weight: bold"><span style="color: #000080">pid</span></span>(), <span style="font-weight: bold"><span style="color: #000000">timeout</span></span>()}</tt></pre></div></div>
-</div>
-<div class="sect2">
+<pre><tt>{<b><font color="#000080">spawn</font></b>, <b><font color="#000080">pid</font></b>(), <b><font color="#000000">timeout</font></b>()}</tt></pre>
+</div></div>
<h3 id="_error_response">error_response</h3>
-<div class="paragraph"><p>Send an error response if no response was sent previously.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Send an error response if no response was sent previously.</p>
+<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">error_response</span>, <span style="font-weight: bold"><span style="color: #000000">cowboy:http_status</span></span>(), <span style="font-weight: bold"><span style="color: #000000">cowboy:http_headers</span></span>(), <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>()}</tt></pre></div></div>
-</div>
-<div class="sect2">
+<pre><tt>{<font color="#FF6600">error_response</font>, <b><font color="#000000">cowboy:http_status</font></b>(), <b><font color="#000000">cowboy:http_headers</font></b>(), <b><font color="#000000">iodata</font></b>()}</tt></pre>
+</div></div>
<h3 id="switch_protocol_command">switch_protocol</h3>
-<div class="paragraph"><p>Switch to a different protocol.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Switch to a different protocol.</p>
+<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">switch_protocol</span>, <span style="font-weight: bold"><span style="color: #000000">cowboy:http_headers</span></span>(), <span style="font-weight: bold"><span style="color: #000000">module</span></span>(), <span style="font-weight: bold"><span style="color: #000000">state</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>Contains the headers that will be sent in the 101 response,
-along with the module implementing the protocol we are
-switching to and its initial state.</p></div>
-</div>
-<div class="sect2">
+<pre><tt>{<font color="#FF6600">switch_protocol</font>, <b><font color="#000000">cowboy:http_headers</font></b>(), <b><font color="#000000">module</font></b>(), <b><font color="#000000">state</font></b>()}</tt></pre>
+</div></div>
+<p>Contains the headers that will be sent in the 101 response, along with the module implementing the protocol we are switching to and its initial state.</p>
<h3 id="_stop">stop</h3>
-<div class="paragraph"><p>Stop the stream.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Stop the stream.</p>
+<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">stop</span></tt></pre></div></div>
-<div class="paragraph"><p>While no more data can be sent after the <code>fin</code> flag was set,
-the stream is still tracked by Cowboy until it is stopped by
-the handler.</p></div>
-<div class="paragraph"><p>The behavior when stopping a stream for which no response
-has been sent will vary depending on the protocol. The stream
-will end successfully as far as the client is concerned.</p></div>
-<div class="paragraph"><p>To indicate that an error occurred, either use <code>error_response</code>
-before stopping, or use <code>internal_error</code>.</p></div>
-</div>
-<div class="sect2">
+<pre><tt><font color="#FF6600">stop</font></tt></pre>
+</div></div>
+<p>While no more data can be sent after the <code>fin</code> flag was set, the stream is still tracked by Cowboy until it is stopped by the handler.</p>
+<p>The behavior when stopping a stream for which no response has been sent will vary depending on the protocol. The stream will end successfully as far as the client is concerned.</p>
+<p>To indicate that an error occurred, either use <code>error_response</code> before stopping, or use <code>internal_error</code>.</p>
<h3 id="_internal_error">internal_error</h3>
-<div class="paragraph"><p>Stop the stream with an error.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Stop the stream with an error.</p>
+<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">internal_error</span>, <span style="color: #009900">Reason</span>, <span style="color: #009900">HumanReadable</span>}
-
-<span style="color: #009900">Reason</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()
-<span style="color: #009900">HumanReadable</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000080">atom</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>This command should be used when the stream cannot continue
-because of an internal error. An <code>error_response</code> command
-may be sent before that to advertise to the client why the
-stream is dropped.</p></div>
-</div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#FF6600">internal_error</font>, <font color="#009900">Reason</font>, <font color="#009900">HumanReadable</font>}
+
+<font color="#009900">Reason</font> <font color="#990000">=</font> <b><font color="#000000">any</font></b>()
+<font color="#009900">HumanReadable</font> <font color="#990000">=</font> <b><font color="#000080">atom</font></b>()</tt></pre>
+</div></div>
+<p>This command should be used when the stream cannot continue because of an internal error. An <code>error_response</code> command may be sent before that to advertise to the client why the stream is dropped.</p>
<h2 id="_predefined_events">Predefined events</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy will forward all messages sent to the stream to
-the <code>info/3</code> callback. To send a message to a stream,
-send a message to the connection process with the form
-<code>{{Pid, StreamID}, Msg}</code>. The connection process will
-then forward <code>Msg</code> to the stream handlers.</p></div>
-<div class="paragraph"><p>Cowboy will also forward the exit signals for the
-processes that the stream spawned.</p></div>
-<div class="sect2">
+<p>Cowboy will forward all messages sent to the stream to the <code>info/3</code> callback. To send a message to a stream, send a message to the connection process with the form <code>{{Pid, StreamID}, Msg}</code>. The connection process will then forward <code>Msg</code> to the stream handlers.</p>
+<p>Cowboy will also forward the exit signals for the processes that the stream spawned.</p>
<h3 id="_exit">EXIT</h3>
-<div class="paragraph"><p>A process spawned by this stream has exited.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<!-- info(_StreamID, {&apos;EXIT&apos;, Pid, normal}, State=#state{pid=Pid}) -&gt;-->
+<!-- info(_StreamID, {&apos;EXIT&apos;, Pid, {_Reason, [_, {cow_http_hd, _, _, _}|_]}}, State=#state{pid=Pid}) -&gt;-->
+<!-- info(StreamID, Exit = {&apos;EXIT&apos;, Pid, {Reason, Stacktrace}}, State=#state{ref=Ref, pid=Pid}) -&gt;-->
+<p>A process spawned by this stream has exited.</p>
+<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: #000080">'EXIT'</span>, <span style="font-weight: bold"><span style="color: #000080">pid</span></span>(), <span style="font-weight: bold"><span style="color: #000000">any</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>This is the raw exit message without any modification.</p></div>
-</div>
-<div class="sect2">
+<pre><tt>{<font color="#000080">'EXIT'</font>, <b><font color="#000080">pid</font></b>(), <b><font color="#000000">any</font></b>()}</tt></pre>
+</div></div>
+<p>This is the raw exit message without any modification.</p>
+<!-- === read_body-->
+<!-- -->
+<!-- //info(_StreamID, {read_body, Ref, Length, _},-->
+<!-- //info(StreamID, {read_body, Ref, Length, Period}, State) -&gt;-->
+<!-- -->
+<!-- TODO yeah I am not actually sure this one should be public just yet-->
+<!-- TODO if it is, then we probably shouldn&apos;t send a message directly,-->
+<!-- TODO but rather return a command that will end up sending the message-->
+<!-- -->
+<!-- TODO The problem being that no stream handler has access to that-->
+<!-- TODO message if we send it directly. So we should have a command-->
+<!-- TODO send_message or something that can be seen from all handlers.-->
+<!-- -->
+<!-- TODO The thing is that stream handlers can have 0 to N processes-->
+<!-- TODO so we have to make it easy to say which process should-->
+<!-- TODO receive the message, and perhaps *identify* which process-->
+<!-- TODO gets it?-->
<h3 id="_inform">inform</h3>
-<div class="paragraph"><p>Same as the <a href="../inform_command">inform command</a>.</p></div>
-<div class="paragraph"><p>Sent when the request process reads the body and an
-expect: 100-continue header was present in the request,
-or when the request process sends an informational
-response on its own.</p></div>
-</div>
-<div class="sect2">
+<p>Same as the <a href="../inform_command">inform command</a>.</p>
+<p>Sent when the request process reads the body and an expect: 100-continue header was present in the request, or when the request process sends an informational response on its own.</p>
<h3 id="_response">response</h3>
-<div class="paragraph"><p>Same as the <a href="../response_command">response command</a>.</p></div>
-<div class="paragraph"><p>Usually sent when the request process replies to the client.
-May also be sent by Cowboy internally.</p></div>
-</div>
-<div class="sect2">
+<p>Same as the <a href="../response_command">response command</a>.</p>
+<p>Usually sent when the request process replies to the client. May also be sent by Cowboy internally.</p>
<h3 id="_headers">headers</h3>
-<div class="paragraph"><p>Same as the <a href="../headers_command">headers command</a>.</p></div>
-<div class="paragraph"><p>Sent when the request process starts replying to the client.</p></div>
-</div>
-<div class="sect2">
+<p>Same as the <a href="../headers_command">headers command</a>.</p>
+<p>Sent when the request process starts replying to the client.</p>
<h3 id="_data">data</h3>
-<div class="paragraph"><p>Same as the <a href="../data_command">data command</a>.</p></div>
-<div class="paragraph"><p>Sent when the request process streams data to the client.</p></div>
-</div>
-<div class="sect2">
+<p>Same as the <a href="../data_command">data command</a>.</p>
+<p>Sent when the request process streams data to the client.</p>
<h3 id="_trailers">trailers</h3>
-<div class="paragraph"><p>Same as the <a href="../trailers_command">trailers command</a>.</p></div>
-<div class="paragraph"><p>Sent when the request process sends the trailer field values
-to the client.</p></div>
-</div>
-<div class="sect2">
+<p>Same as the <a href="../trailers_command">trailers command</a>.</p>
+<p>Sent when the request process sends the trailer field values to the client.</p>
<h3 id="_push">push</h3>
-<div class="paragraph"><p>Same as the <a href="../push_command">push command</a>.</p></div>
-<div class="paragraph"><p>Sent when the request process pushes a resource to the client.</p></div>
-</div>
-<div class="sect2">
+<p>Same as the <a href="../push_command">push command</a>.</p>
+<p>Sent when the request process pushes a resource to the client.</p>
<h3 id="_switch_protocol">switch_protocol</h3>
-<div class="paragraph"><p>Same as the <a href="../switch_protocol_command">switch_protocol command</a>.</p></div>
-<div class="paragraph"><p>Sent when switching to the HTTP/2 or Websocket protocol.</p></div>
-</div>
-</div>
-</div>
-<div class="sect1">
+<p>Same as the <a href="../switch_protocol_command">switch_protocol command</a>.</p>
+<!-- @todo Not done for HTTP/2 yet.-->
+<p>Sent when switching to the HTTP/2 or Websocket protocol.</p>
<h2 id="_exports">Exports</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The following function should be called by modules implementing
-stream handlers to execute the next stream handler in the list:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../cowboy_stream.init">cowboy_stream:init(3)</a> - Initialize a stream
-</p>
+<p>The following function should be called by modules implementing stream handlers to execute the next stream handler in the list:</p>
+<ul><li><a href="../cowboy_stream.init">cowboy_stream:init(3)</a> - Initialize a stream
</li>
-<li>
-<p>
-<a href="../cowboy_stream.data">cowboy_stream:data(3)</a> - Handle data for a stream
-</p>
+<li><a href="../cowboy_stream.data">cowboy_stream:data(3)</a> - Handle data for a stream
</li>
-<li>
-<p>
-<a href="../cowboy_stream.info">cowboy_stream:info(3)</a> - Handle a message for a stream
-</p>
+<li><a href="../cowboy_stream.info">cowboy_stream:info(3)</a> - Handle a message for a stream
</li>
-<li>
-<p>
-<a href="../cowboy_stream.terminate">cowboy_stream:terminate(3)</a> - Terminate a stream
-</p>
+<li><a href="../cowboy_stream.terminate">cowboy_stream:terminate(3)</a> - Terminate a stream
</li>
-<li>
-<p>
-<a href="../cowboy_stream.early_error">cowboy_stream:early_error(3)</a> - Handle an early error for a stream
-</p>
+<li><a href="../cowboy_stream.early_error">cowboy_stream:early_error(3)</a> - Handle an early error for a stream
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_types">Types</h2>
-<div class="sectionbody">
-<div class="sect2">
<h3 id="_commands">commands()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">commands</span></span>() <span style="color: #990000">::</span> [<span style="color: #009900">Command</span>]</tt></pre></div></div>
-<div class="paragraph"><p>See the <a href="../commands">list of commands</a> for details.</p></div>
-</div>
-<div class="sect2">
+<pre><tt><b><font color="#000000">commands</font></b>() <font color="#990000">::</font> [<font color="#009900">Command</font>]</tt></pre>
+</div></div>
+<p>See the <a href="../commands">list of commands</a> for details.</p>
<h3 id="_fin">fin()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">fin</span></span>() <span style="color: #990000">::</span> <span style="color: #FF6600">fin</span> | <span style="color: #FF6600">nofin</span></tt></pre></div></div>
-<div class="paragraph"><p>Used in commands and events to indicate that this is
-the end of the stream.</p></div>
-</div>
-<div class="sect2">
+<pre><tt><b><font color="#000000">fin</font></b>() <font color="#990000">::</font> <font color="#FF6600">fin</font> | <font color="#FF6600">nofin</font></tt></pre>
+</div></div>
+<p>Used in commands and events to indicate that this is the end of the stream.</p>
<h3 id="_partial_req">partial_req()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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: #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">version</span> <span style="color: #990000">=&gt;</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: #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">path</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">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>
- <span style="color: #0000FF">headers</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:http_headers</span></span>(),
- <span style="color: #0000FF">peer</span> <span style="color: #990000">=&gt;</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>Partial request information received when an early error is
-detected.</p></div>
-</div>
-<div class="sect2">
+<pre><tt><b><font color="#000000">req</font></b>() <font color="#990000">::</font> #{
+ <font color="#0000FF">method</font> <font color="#990000">=&gt;</font> <b><font color="#000080">binary</font></b>(), <i><font color="#9A1900">%% case sensitive</font></i>
+ <font color="#0000FF">version</font> <font color="#990000">=&gt;</font> <b><font color="#000000">cowboy:http_version</font></b>() | <b><font color="#000080">atom</font></b>(),
+ <font color="#0000FF">scheme</font> <font color="#990000">=&gt;</font> <b><font color="#000080">binary</font></b>(), <i><font color="#9A1900">%% lowercase; case insensitive</font></i>
+ <font color="#0000FF">host</font> <font color="#990000">=&gt;</font> <b><font color="#000080">binary</font></b>(), <i><font color="#9A1900">%% lowercase; case insensitive</font></i>
+ <font color="#0000FF">port</font> <font color="#990000">=&gt;</font> <b><font color="#000000">inet:port_number</font></b>(),
+ <font color="#0000FF">path</font> <font color="#990000">=&gt;</font> <b><font color="#000080">binary</font></b>(), <i><font color="#9A1900">%% case sensitive</font></i>
+ <font color="#0000FF">qs</font> <font color="#990000">=&gt;</font> <b><font color="#000080">binary</font></b>(), <i><font color="#9A1900">%% case sensitive</font></i>
+ <font color="#0000FF">headers</font> <font color="#990000">=&gt;</font> <b><font color="#000000">cowboy:http_headers</font></b>(),
+ <font color="#0000FF">peer</font> <font color="#990000">=&gt;</font> {<b><font color="#000000">inet:ip_address</font></b>(), <b><font color="#000000">inet:port_number</font></b>()}
+}</tt></pre>
+</div></div>
+<p>Partial request information received when an early error is detected.</p>
<h3 id="_reason">reason()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">reason</span></span>() <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">normal</span></span> | <span style="color: #FF6600">switch_protocol</span>
- | {<span style="color: #FF6600">internal_error</span>, <span style="color: #FF6600">timeout</span> | {<span style="color: #FF6600">error</span> | <span style="font-weight: bold"><span style="color: #000080">exit</span></span> | <span style="font-weight: bold"><span style="color: #000080">throw</span></span>, <span style="font-weight: bold"><span style="color: #000000">any</span></span>()}, <span style="color: #009900">HumanReadable</span>}
- | {<span style="color: #FF6600">socket_error</span>, <span style="color: #FF6600">closed</span> | <span style="font-weight: bold"><span style="color: #000080">atom</span></span>(), <span style="color: #009900">HumanReadable</span>}
- | {<span style="color: #FF6600">stream_error</span>, <span style="color: #009900">Error</span>, <span style="color: #009900">HumanReadable</span>}
- | {<span style="color: #FF6600">connection_error</span>, <span style="color: #009900">Error</span>, <span style="color: #009900">HumanReadable</span>}
- | {<span style="color: #FF6600">stop</span>, <span style="font-weight: bold"><span style="color: #000000">cow_http2:frame</span></span>(), <span style="color: #009900">HumanReadable</span>}
-
-<span style="color: #009900">Error</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000080">atom</span></span>()
-<span style="color: #009900">HumanReadable</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000080">atom</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Reason for the stream termination.</p></div>
-</div>
-<div class="sect2">
+<pre><tt><b><font color="#000000">reason</font></b>() <font color="#990000">::</font> <b><font color="#000080">normal</font></b> | <font color="#FF6600">switch_protocol</font>
+ | {<font color="#FF6600">internal_error</font>, <font color="#FF6600">timeout</font> | {<font color="#FF6600">error</font> | <b><font color="#000080">exit</font></b> | <b><font color="#000080">throw</font></b>, <b><font color="#000000">any</font></b>()}, <font color="#009900">HumanReadable</font>}
+ | {<font color="#FF6600">socket_error</font>, <font color="#FF6600">closed</font> | <b><font color="#000080">atom</font></b>(), <font color="#009900">HumanReadable</font>}
+ | {<font color="#FF6600">stream_error</font>, <font color="#009900">Error</font>, <font color="#009900">HumanReadable</font>}
+ | {<font color="#FF6600">connection_error</font>, <font color="#009900">Error</font>, <font color="#009900">HumanReadable</font>}
+ | {<font color="#FF6600">stop</font>, <b><font color="#000000">cow_http2:frame</font></b>(), <font color="#009900">HumanReadable</font>}
+
+<font color="#009900">Error</font> <font color="#990000">=</font> <b><font color="#000080">atom</font></b>()
+<font color="#009900">HumanReadable</font> <font color="#990000">=</font> <b><font color="#000080">atom</font></b>()</tt></pre>
+</div></div>
+<p>Reason for the stream termination.</p>
<h3 id="_resp_command">resp_command()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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_command</span></span>() <span style="color: #990000">::</span> {<span style="color: #FF6600">response</span>, <span style="font-weight: bold"><span style="color: #000000">cowboy:http_status</span></span>(),
- <span style="font-weight: bold"><span style="color: #000000">cowboy:http_headers</span></span>(), <span style="font-weight: bold"><span style="color: #000000">cowboy_req:resp_body</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>See the <a href="../response_command">response command</a> for details.</p></div>
-</div>
-<div class="sect2">
+<pre><tt><b><font color="#000000">resp_command</font></b>() <font color="#990000">::</font> {<font color="#FF6600">response</font>, <b><font color="#000000">cowboy:http_status</font></b>(),
+ <b><font color="#000000">cowboy:http_headers</font></b>(), <b><font color="#000000">cowboy_req:resp_body</font></b>()}</tt></pre>
+</div></div>
+<p>See the <a href="../response_command">response command</a> for details.</p>
<h3 id="_streamid">streamid()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">streamid</span></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>The identifier for this stream.</p></div>
-<div class="paragraph"><p>The identifier is unique over the connection process.
-It is possible to form a unique identifier node-wide and
-cluster-wide by wrapping it in a <code>{self(), StreamID}</code>
-tuple.</p></div>
-</div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">streamid</font></b>() <font color="#990000">::</font> <b><font color="#000000">any</font></b>()</tt></pre>
+</div></div>
+<p>The identifier for this stream.</p>
+<p>The identifier is unique over the connection process. It is possible to form a unique identifier node-wide and cluster-wide by wrapping it in a <code>{self(), StreamID}</code> tuple.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.2</strong>: The trailers command was introduced.
-</p>
+<ul><li><strong>2.2</strong>: The trailers command was introduced.
</li>
-<li>
-<p>
-<strong>2.0</strong>: Module introduced.
-</p>
+<li><strong>2.0</strong>: Module introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="..">cowboy(7)</a>,
-<a href="../cowboy_http">cowboy_http(3)</a>,
-<a href="../cowboy_http2">cowboy_http2(3)</a></p></div>
-</div>
-</div>
+<p><a href="..">cowboy(7)</a>, <a href="../cowboy_http">cowboy_http(3)</a>, <a href="../cowboy_http2">cowboy_http2(3)</a></p>
+
diff --git a/docs/en/cowboy/2.3/manual/cowboy_websocket/index.html b/docs/en/cowboy/2.3/manual/cowboy_websocket/index.html
index 697423aa..7cd153bd 100644
--- a/docs/en/cowboy/2.3/manual/cowboy_websocket/index.html
+++ b/docs/en/cowboy/2.3/manual/cowboy_websocket/index.html
@@ -62,308 +62,148 @@
<h1 class="lined-header"><span>cowboy_websocket(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_websocket - Websocket</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_websocket - Websocket</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The module <code>cowboy_websocket</code> implements Websocket
-as a Ranch protocol. It also defines a callback interface
-for handling Websocket connections.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The module <code>cowboy_websocket</code> implements Websocket as a Ranch protocol. It also defines a callback interface for handling Websocket connections.</p>
<h2 id="_callbacks">Callbacks</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Websocket handlers must implement the following callback
-interface:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Websocket handlers must implement the following callback interface:</p>
+<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">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_websocket</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
- | {<span style="color: #FF6600">cowboy_websocket</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>, <span style="color: #009900">Opts</span>}
-
-<span style="font-weight: bold"><span style="color: #000000">websocket_init</span></span>(<span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> <span style="color: #009900">CallResult</span> <span style="font-style: italic"><span style="color: #9A1900">%% optional</span></span>
-<span style="font-weight: bold"><span style="color: #000000">websocket_handle</span></span>(<span style="color: #009900">InFrame</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> <span style="color: #009900">CallResult</span>
-<span style="font-weight: bold"><span style="color: #000000">websocket_info</span></span>(<span style="color: #009900">Info</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> <span style="color: #009900">CallResult</span>
-
-<span style="font-weight: bold"><span style="color: #000000">terminate</span></span>(<span style="color: #009900">Reason</span>, <span style="color: #009900">PartialReq</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> <span style="color: #FF6600">ok</span> <span style="font-style: italic"><span style="color: #9A1900">%% optional</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">PartialReq</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">map</span></span>()
-<span style="color: #009900">State</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()
-<span style="color: #009900">Opts</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_websocket:opts</span></span>()
-<span style="color: #009900">InFrame</span> <span style="color: #990000">::</span> {<span style="color: #FF6600">text</span> | <span style="font-weight: bold"><span style="color: #000080">binary</span></span> | <span style="color: #FF6600">ping</span> | <span style="color: #FF6600">pong</span>, <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()}
-<span style="color: #009900">OutFrame</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cow_ws:frame</span></span>() <span style="font-style: italic"><span style="color: #9A1900">%% see types below</span></span>
-<span style="color: #009900">Info</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()
-
-<span style="color: #009900">CallResult</span> <span style="color: #990000">::</span> {<span style="color: #FF6600">ok</span>, <span style="color: #009900">State</span>}
- | {<span style="color: #FF6600">ok</span>, <span style="color: #009900">State</span>, <span style="color: #FF6600">hibernate</span>}
- | {<span style="color: #FF6600">reply</span>, <span style="color: #009900">OutFrame</span> | [<span style="color: #009900">OutFrame</span>], <span style="color: #009900">State</span>}
- | {<span style="color: #FF6600">reply</span>, <span style="color: #009900">OutFrame</span> | [<span style="color: #009900">OutFrame</span>], <span style="color: #009900">State</span>, <span style="color: #FF6600">hibernate</span>}
- | {<span style="color: #FF6600">stop</span>, <span style="color: #009900">State</span>}
-
-<span style="color: #009900">Reason</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">normal</span></span> | <span style="color: #FF6600">stop</span> | <span style="color: #FF6600">timeout</span>
- | <span style="color: #FF6600">remote</span> | {<span style="color: #FF6600">remote</span>, <span style="font-weight: bold"><span style="color: #000000">cow_ws:close_code</span></span>(), <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()}
- | {<span style="color: #FF6600">error</span>, <span style="color: #FF6600">badencoding</span> | <span style="color: #FF6600">badframe</span> | <span style="color: #FF6600">closed</span> | <span style="font-weight: bold"><span style="color: #000080">atom</span></span>()}
- | {<span style="color: #FF6600">crash</span>, <span style="color: #FF6600">error</span> | <span style="font-weight: bold"><span style="color: #000080">exit</span></span> | <span style="font-weight: bold"><span style="color: #000080">throw</span></span>, <span style="font-weight: bold"><span style="color: #000000">any</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>The <code>init/2</code> callback is common to all handlers. To upgrade
-the connection to Websocket, it must return <code>cowboy_websocket</code>
-as the first element of the tuple.</p></div>
-<div class="paragraph"><p>Any operation requiring the HTTP request must be done in the
-<code>init/2</code> function, as the Req object will not be available
-after it returns. Websocket sub-protocol selection should
-therefore be done in this function.</p></div>
-<div class="paragraph"><p>The optional <code>websocket_init/1</code> callback will be called once
-the connection has been upgraded to Websocket. It can be used
-to perform any required initialization of the handler.</p></div>
-<div class="paragraph"><p>Note that the <code>init/2</code> function does not run in the same
-process as the Websocket callbacks. Any Websocket-specific
-initialization must be done in <code>websocket_init/1</code>.</p></div>
-<div class="paragraph"><p>The <code>websocket_handle/2</code> callback will be called for every
-frame received. The <code>websocket_info/2</code> callback will be
-called for every Erlang message received.</p></div>
-<div class="paragraph"><p>All three Websocket callbacks may send one or more frames
-back to the client (by returning a <code>reply</code> tuple) or terminate
-the connection (by sending a <code>close</code> frame or returning a <code>stop</code>
-tuple).</p></div>
-<div class="paragraph"><p>The optional <code>terminate/3</code> callback will ultimately be called
-with the reason for the termination of the connection. This
-callback is common to all handlers. Note that Websocket will
-not provide the full Req object by default, to save memory.</p></div>
-<div class="paragraph"><p>Cowboy will terminate the process right after closing the
-Websocket connection. This means that there is no need to
-perform any cleanup in the <code>terminate/3</code> callback.</p></div>
-<div class="paragraph"><p>The following terminate reasons are defined for Websocket
-connections:</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-normal
-</dt>
-<dd>
-<p>
- The connection was closed normally before establishing a Websocket
- connection. This typically happens if an <code>ok</code> tuple is returned
- from the <code>init/2</code> callback.
-</p>
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>)
+ <font color="#990000">-&gt;</font> {<font color="#FF6600">cowboy_websocket</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
+ | {<font color="#FF6600">cowboy_websocket</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>, <font color="#009900">Opts</font>}
+
+<b><font color="#000000">websocket_init</font></b>(<font color="#009900">State</font>) <font color="#990000">-&gt;</font> <font color="#009900">CallResult</font> <i><font color="#9A1900">%% optional</font></i>
+<b><font color="#000000">websocket_handle</font></b>(<font color="#009900">InFrame</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> <font color="#009900">CallResult</font>
+<b><font color="#000000">websocket_info</font></b>(<font color="#009900">Info</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> <font color="#009900">CallResult</font>
+
+<b><font color="#000000">terminate</font></b>(<font color="#009900">Reason</font>, <font color="#009900">PartialReq</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> <font color="#FF6600">ok</font> <i><font color="#9A1900">%% optional</font></i>
+
+<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()
+<font color="#009900">PartialReq</font> <font color="#990000">::</font> <b><font color="#000000">map</font></b>()
+<font color="#009900">State</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()
+<font color="#009900">Opts</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_websocket:opts</font></b>()
+<font color="#009900">InFrame</font> <font color="#990000">::</font> {<font color="#FF6600">text</font> | <b><font color="#000080">binary</font></b> | <font color="#FF6600">ping</font> | <font color="#FF6600">pong</font>, <b><font color="#000080">binary</font></b>()}
+<font color="#009900">OutFrame</font> <font color="#990000">::</font> <b><font color="#000000">cow_ws:frame</font></b>() <i><font color="#9A1900">%% see types below</font></i>
+<font color="#009900">Info</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()
+
+<font color="#009900">CallResult</font> <font color="#990000">::</font> {<font color="#FF6600">ok</font>, <font color="#009900">State</font>}
+ | {<font color="#FF6600">ok</font>, <font color="#009900">State</font>, <font color="#FF6600">hibernate</font>}
+ | {<font color="#FF6600">reply</font>, <font color="#009900">OutFrame</font> | [<font color="#009900">OutFrame</font>], <font color="#009900">State</font>}
+ | {<font color="#FF6600">reply</font>, <font color="#009900">OutFrame</font> | [<font color="#009900">OutFrame</font>], <font color="#009900">State</font>, <font color="#FF6600">hibernate</font>}
+ | {<font color="#FF6600">stop</font>, <font color="#009900">State</font>}
+
+<font color="#009900">Reason</font> <font color="#990000">::</font> <b><font color="#000080">normal</font></b> | <font color="#FF6600">stop</font> | <font color="#FF6600">timeout</font>
+ | <font color="#FF6600">remote</font> | {<font color="#FF6600">remote</font>, <b><font color="#000000">cow_ws:close_code</font></b>(), <b><font color="#000080">binary</font></b>()}
+ | {<font color="#FF6600">error</font>, <font color="#FF6600">badencoding</font> | <font color="#FF6600">badframe</font> | <font color="#FF6600">closed</font> | <b><font color="#000080">atom</font></b>()}
+ | {<font color="#FF6600">crash</font>, <font color="#FF6600">error</font> | <b><font color="#000080">exit</font></b> | <b><font color="#000080">throw</font></b>, <b><font color="#000000">any</font></b>()}</tt></pre>
+</div></div>
+<p>The <code>init/2</code> callback is common to all handlers. To upgrade the connection to Websocket, it must return <code>cowboy_websocket</code> as the first element of the tuple.</p>
+<p>Any operation requiring the HTTP request must be done in the <code>init/2</code> function, as the Req object will not be available after it returns. Websocket sub-protocol selection should therefore be done in this function.</p>
+<p>The optional <code>websocket_init/1</code> callback will be called once the connection has been upgraded to Websocket. It can be used to perform any required initialization of the handler.</p>
+<p>Note that the <code>init/2</code> function does not run in the same process as the Websocket callbacks. Any Websocket-specific initialization must be done in <code>websocket_init/1</code>.</p>
+<p>The <code>websocket_handle/2</code> callback will be called for every frame received. The <code>websocket_info/2</code> callback will be called for every Erlang message received.</p>
+<p>All three Websocket callbacks may send one or more frames back to the client (by returning a <code>reply</code> tuple) or terminate the connection (by sending a <code>close</code> frame or returning a <code>stop</code> tuple).</p>
+<p>The optional <code>terminate/3</code> callback will ultimately be called with the reason for the termination of the connection. This callback is common to all handlers. Note that Websocket will not provide the full Req object by default, to save memory.</p>
+<p>Cowboy will terminate the process right after closing the Websocket connection. This means that there is no need to perform any cleanup in the <code>terminate/3</code> callback.</p>
+<p>The following terminate reasons are defined for Websocket connections:</p>
+<dl><dt>normal</dt>
+<dd><p>The connection was closed normally before establishing a Websocket connection. This typically happens if an <code>ok</code> tuple is returned from the <code>init/2</code> callback.</p>
</dd>
-<dt class="hdlist1">
-remote
-</dt>
-<dd>
-<p>
- The remote endpoint closed the connection without giving any
- further details.
-</p>
+<dt>remote</dt>
+<dd><p>The remote endpoint closed the connection without giving any further details.</p>
</dd>
-<dt class="hdlist1">
-{remote, Code, Payload}
-</dt>
-<dd>
-<p>
- The remote endpoint closed the connection with the given
- <code>Code</code> and <code>Payload</code> as the reason.
-</p>
+<dt>{remote, Code, Payload}</dt>
+<dd><p>The remote endpoint closed the connection with the given <code>Code</code> and <code>Payload</code> as the reason.</p>
</dd>
-<dt class="hdlist1">
-stop
-</dt>
-<dd>
-<p>
- The handler requested to close the connection, either by returning
- a <code>stop</code> tuple or by sending a <code>close</code> frame.
-</p>
+<dt>stop</dt>
+<dd><p>The handler requested to close the connection, either by returning a <code>stop</code> tuple or by sending a <code>close</code> frame.</p>
</dd>
-<dt class="hdlist1">
-timeout
-</dt>
-<dd>
-<p>
- The connection has been closed due to inactivity. The timeout
- value can be configured from <code>init/2</code>.
-</p>
+<dt>timeout</dt>
+<dd><p>The connection has been closed due to inactivity. The timeout value can be configured from <code>init/2</code>.</p>
</dd>
-<dt class="hdlist1">
-{crash, Class, Reason}
-</dt>
-<dd>
-<p>
- A crash occurred in the handler. <code>Class</code> and <code>Reason</code> can be
- used to obtain more information about the crash. The function
- <code>erlang:get_stacktrace/0</code> can also be called to obtain the
- stacktrace of the process when the crash occurred.
-</p>
+<dt>{crash, Class, Reason}</dt>
+<dd><p>A crash occurred in the handler. <code>Class</code> and <code>Reason</code> can be used to obtain more information about the crash. The function <code>erlang:get_stacktrace/0</code> can also be called to obtain the stacktrace of the process when the crash occurred.</p>
</dd>
-<dt class="hdlist1">
-{error, badencoding}
-</dt>
-<dd>
-<p>
- A text frame was sent by the client with invalid encoding. All
- text frames must be valid UTF-8.
-</p>
+<dt>{error, badencoding}</dt>
+<dd><p>A text frame was sent by the client with invalid encoding. All text frames must be valid UTF-8.</p>
</dd>
-<dt class="hdlist1">
-{error, badframe}
-</dt>
-<dd>
-<p>
- A protocol error has been detected.
-</p>
+<dt>{error, badframe}</dt>
+<dd><p>A protocol error has been detected.</p>
</dd>
-<dt class="hdlist1">
-{error, closed}
-</dt>
-<dd>
-<p>
- The socket has been closed brutally without a close frame being
- received first.
-</p>
+<dt>{error, closed}</dt>
+<dd><p>The socket has been closed brutally without a close frame being received first.</p>
</dd>
-<dt class="hdlist1">
-{error, Reason}
-</dt>
-<dd>
-<p>
- A socket error ocurred.
-</p>
+<dt>{error, Reason}</dt>
+<dd><p>A socket error ocurred.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_types">Types</h2>
-<div class="sectionbody">
-<div class="sect3">
<h4 id="_cow_ws_frame">cow_ws:frame()</h4>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">frame</span></span>() <span style="color: #990000">::</span> {<span style="color: #FF6600">text</span>, <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>()}
- | {<span style="font-weight: bold"><span style="color: #000080">binary</span></span>, <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>()}
- | <span style="color: #FF6600">ping</span> | {<span style="color: #FF6600">ping</span>, <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>()}
- | <span style="color: #FF6600">pong</span> | {<span style="color: #FF6600">pong</span>, <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>()}
- | <span style="color: #FF6600">close</span> | {<span style="color: #FF6600">close</span>, <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>()} | {<span style="color: #FF6600">close</span>, <span style="font-weight: bold"><span style="color: #000000">close_code</span></span>(), <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>()}
-
-<span style="font-weight: bold"><span style="color: #000000">close_code</span></span>() <span style="color: #990000">::</span> <span style="color: #993399">1000</span><span style="color: #990000">..</span><span style="color: #993399">1003</span> | <span style="color: #993399">1006</span><span style="color: #990000">..</span><span style="color: #993399">1011</span> | <span style="color: #993399">3000</span><span style="color: #990000">..</span><span style="color: #993399">4999</span></tt></pre></div></div>
-<div class="paragraph"><p>Websocket frames that can be sent as a response.</p></div>
-<div class="paragraph"><p>Note that there is no need to send pong frames back as
-Cowboy does it automatically for you.</p></div>
-</div>
-<div class="sect2">
+<pre><tt><b><font color="#000000">frame</font></b>() <font color="#990000">::</font> {<font color="#FF6600">text</font>, <b><font color="#000000">iodata</font></b>()}
+ | {<b><font color="#000080">binary</font></b>, <b><font color="#000000">iodata</font></b>()}
+ | <font color="#FF6600">ping</font> | {<font color="#FF6600">ping</font>, <b><font color="#000000">iodata</font></b>()}
+ | <font color="#FF6600">pong</font> | {<font color="#FF6600">pong</font>, <b><font color="#000000">iodata</font></b>()}
+ | <font color="#FF6600">close</font> | {<font color="#FF6600">close</font>, <b><font color="#000000">iodata</font></b>()} | {<font color="#FF6600">close</font>, <b><font color="#000000">close_code</font></b>(), <b><font color="#000000">iodata</font></b>()}
+
+<b><font color="#000000">close_code</font></b>() <font color="#990000">::</font> <font color="#993399">1000</font><font color="#990000">..</font><font color="#993399">1003</font> | <font color="#993399">1006</font><font color="#990000">..</font><font color="#993399">1011</font> | <font color="#993399">3000</font><font color="#990000">..</font><font color="#993399">4999</font></tt></pre>
+</div></div>
+<p>Websocket frames that can be sent as a response.</p>
+<p>Note that there is no need to send pong frames back as Cowboy does it automatically for you.</p>
<h3 id="_opts">opts()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">opts</span></span>() <span style="color: #990000">::</span> #{
- <span style="color: #0000FF">compress</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>(),
- <span style="color: #0000FF">idle_timeout</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">timeout</span></span>(),
- <span style="color: #0000FF">max_frame_size</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>() | <span style="color: #FF6600">infinity</span>,
- <span style="color: #0000FF">req_filter</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">fun</span></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">map</span></span>())
-}</tt></pre></div></div>
-<div class="paragraph"><p>Websocket handler options.</p></div>
-<div class="paragraph"><p>This configuration is passed to Cowboy from the <code>init/2</code>
-function:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">opts</font></b>() <font color="#990000">::</font> #{
+ <font color="#0000FF">compress</font> <font color="#990000">=&gt;</font> <b><font color="#000000">boolean</font></b>(),
+ <font color="#0000FF">idle_timeout</font> <font color="#990000">=&gt;</font> <b><font color="#000000">timeout</font></b>(),
+ <font color="#0000FF">max_frame_size</font> <font color="#990000">=&gt;</font> <b><font color="#000000">non_neg_integer</font></b>() | <font color="#FF6600">infinity</font>,
+ <font color="#0000FF">req_filter</font> <font color="#990000">=&gt;</font> <b><font color="#0000FF">fun</font></b>((<b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <b><font color="#000000">map</font></b>())
+}</tt></pre>
+</div></div>
+<p>Websocket handler options.</p>
+<p>This configuration is passed to Cowboy from the <code>init/2</code> function:</p>
+<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">init</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- <span style="color: #009900">Opts</span> <span style="color: #990000">=</span> #{<span style="color: #0000FF">compress</span> <span style="color: #990000">=&gt;</span> <span style="color: #000080">true</span>},
- {<span style="color: #FF6600">cowboy_websocket</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>, <span style="color: #009900">Opts</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>The default value is given next to the option name:</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-compress (false)
-</dt>
-<dd>
-<p>
- Whether to enable the Websocket frame compression
- extension. Frames will only be compressed for the
- clients that support this extension.
-</p>
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ <font color="#009900">Opts</font> <font color="#990000">=</font> #{<font color="#0000FF">compress</font> <font color="#990000">=&gt;</font> <font color="#000080">true</font>},
+ {<font color="#FF6600">cowboy_websocket</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>, <font color="#009900">Opts</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>The default value is given next to the option name:</p>
+<dl><dt>compress (false)</dt>
+<dd><p>Whether to enable the Websocket frame compression extension. Frames will only be compressed for the clients that support this extension.</p>
</dd>
-<dt class="hdlist1">
-idle_timeout (60000)
-</dt>
-<dd>
-<p>
- Time in milliseconds that Cowboy will keep the
- connection open without receiving anything from
- the client.
-</p>
+<dt>idle_timeout (60000)</dt>
+<dd><p>Time in milliseconds that Cowboy will keep the connection open without receiving anything from the client.</p>
</dd>
-<dt class="hdlist1">
-max_frame_size (infinity)
-</dt>
-<dd>
-<p>
- Maximum frame size allowed by this Websocket
- handler. Cowboy will close the connection when
- a client attempts to send a frame that goes over
- this limit. For fragmented frames this applies
- to the size of the reconstituted frame.
-</p>
+<dt>max_frame_size (infinity)</dt>
+<dd><p>Maximum frame size allowed by this Websocket handler. Cowboy will close the connection when a client attempts to send a frame that goes over this limit. For fragmented frames this applies to the size of the reconstituted frame.</p>
</dd>
-<dt class="hdlist1">
-req_filter
-</dt>
-<dd>
-<p>
- A function applied to the Req to compact it and
- only keep required information. The Req is only
- given back in the <code>terminate/3</code> callback. By default
- it keeps the method, version, URI components and peer
- information.
-</p>
+<dt>req_filter</dt>
+<dd><p>A function applied to the Req to compact it and only keep required information. The Req is only given back in the <code>terminate/3</code> callback. By default it keeps the method, version, URI components and peer information.</p>
</dd>
-</dl></div>
-</div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: The Req object is no longer passed to Websocket callbacks.
-</p>
+<ul><li><strong>2.0</strong>: The Req object is no longer passed to Websocket callbacks.
</li>
-<li>
-<p>
-<strong>2.0</strong>: The callback <code>websocket_terminate/3</code> was removed in favor of <code>terminate/3</code>.
-</p>
+<li><strong>2.0</strong>: The callback <code>websocket_terminate/3</code> was removed in favor of <code>terminate/3</code>.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Protocol introduced.
-</p>
+<li><strong>1.0</strong>: Protocol introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="..">cowboy(7)</a>,
-<a href="../cowboy_handler">cowboy_handler(3)</a>,
-<a href="../cowboy_http">cowboy_http(3)</a>,
-<a href="../cowboy_http2">cowboy_http2(3)</a></p></div>
-</div>
-</div>
+<p><a href="..">cowboy(7)</a>, <a href="../cowboy_handler">cowboy_handler(3)</a>, <a href="../cowboy_http">cowboy_http(3)</a>, <a href="../cowboy_http2">cowboy_http2(3)</a></p>
+
diff --git a/docs/en/cowboy/2.3/manual/http_status_codes/index.html b/docs/en/cowboy/2.3/manual/http_status_codes/index.html
index 29aeb53f..77a7be98 100644
--- a/docs/en/cowboy/2.3/manual/http_status_codes/index.html
+++ b/docs/en/cowboy/2.3/manual/http_status_codes/index.html
@@ -62,271 +62,92 @@
<h1 class="lined-header"><span>HTTP status codes(7)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>HTTP status codes - status codes used by Cowboy</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>HTTP status codes - status codes used by Cowboy</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This chapter aims to list all HTTP status codes that Cowboy
-may return, with details on the reasons why. The list given
-here only includes the replies that Cowboy sends, not user
-replies.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This chapter aims to list all HTTP status codes that Cowboy may return, with details on the reasons why. The list given here only includes the replies that Cowboy sends, not user replies.</p>
<h2 id="_100_continue">100 Continue</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>When the client sends an <code>expect: 100-continue</code> header,
-Cowboy automatically sends a this status code before
-trying to read the request body. This behavior can be
-disabled using the appropriate body option.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>When the client sends an <code>expect: 100-continue</code> header, Cowboy automatically sends a this status code before trying to read the request body. This behavior can be disabled using the appropriate body option.</p>
<h2 id="_101_switching_protocols">101 Switching Protocols</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This is the status code sent when switching to the
-Websocket protocol.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This is the status code sent when switching to the Websocket protocol.</p>
<h2 id="_200_ok">200 OK</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_201_created">201 Created</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_202_accepted">202 Accepted</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_204_no_content">204 No Content</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent when the processing of a request
-ends without any reply having been sent. It may also be
-sent by <code>cowboy_rest</code> under normal conditions.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent when the processing of a request ends without any reply having been sent. It may also be sent by <code>cowboy_rest</code> under normal conditions.</p>
<h2 id="_300_multiple_choices">300 Multiple Choices</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_301_moved_permanently">301 Moved Permanently</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_303_see_other">303 See Other</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_304_not_modified">304 Not Modified</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_307_temporary_redirect">307 Temporary Redirect</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_400_bad_request">400 Bad Request</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy will send this status code for any of the
-following reasons:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-Too many empty lines were sent before the request.
-</p>
+<p>Cowboy will send this status code for any of the following reasons:</p>
+<ul><li>Too many empty lines were sent before the request.
</li>
-<li>
-<p>
-The request-line could not be parsed.
-</p>
+<li>The request-line could not be parsed.
</li>
-<li>
-<p>
-Too many headers were sent.
-</p>
+<li>Too many headers were sent.
</li>
-<li>
-<p>
-A header name was too long.
-</p>
+<li>A header name was too long.
</li>
-<li>
-<p>
-A header value was too long.
-</p>
+<li>A header value was too long.
</li>
-<li>
-<p>
-The host header was missing from an HTTP/1.1 request.
-</p>
+<li>The host header was missing from an HTTP/1.1 request.
</li>
-<li>
-<p>
-The host header could not be parsed.
-</p>
+<li>The host header could not be parsed.
</li>
-<li>
-<p>
-The requested host was not found.
-</p>
+<li>The requested host was not found.
</li>
-<li>
-<p>
-The requested path could not be parsed.
-</p>
+<li>The requested path could not be parsed.
</li>
-<li>
-<p>
-The accept header could not be parsed when using REST.
-</p>
+<li>The accept header could not be parsed when using REST.
</li>
-<li>
-<p>
-REST under normal conditions.
-</p>
+<li>REST under normal conditions.
</li>
-<li>
-<p>
-A Websocket upgrade failed.
-</p>
+<li>A Websocket upgrade failed.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_401_unauthorized">401 Unauthorized</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_403_forbidden">403 Forbidden</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_404_not_found">404 Not Found</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent when the router successfully
-resolved the host but didn&#8217;t find a matching path for
-the request. It may also be sent by <code>cowboy_rest</code> under
-normal conditions.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent when the router successfully resolved the host but didn&apos;t find a matching path for the request. It may also be sent by <code>cowboy_rest</code> under normal conditions.</p>
<h2 id="_405_method_not_allowed">405 Method Not Allowed</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_406_not_acceptable">406 Not Acceptable</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_408_request_timeout">408 Request Timeout</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy will send this status code to the client if the
-client started to send a request, indicated by the
-request-line being received fully, but failed to send
-all headers in a reasonable time.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Cowboy will send this status code to the client if the client started to send a request, indicated by the request-line being received fully, but failed to send all headers in a reasonable time.</p>
<h2 id="_409_conflict">409 Conflict</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_410_gone">410 Gone</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_412_precondition_failed">412 Precondition Failed</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_413_request_entity_too_large">413 Request Entity Too Large</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_414_request_uri_too_long">414 Request-URI Too Long</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy will send this status code to the client if the
-request-line is too long. It may also be sent by
-<code>cowboy_rest</code> under normal conditions.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Cowboy will send this status code to the client if the request-line is too long. It may also be sent by <code>cowboy_rest</code> under normal conditions.</p>
<h2 id="_415_unsupported_media_type">415 Unsupported Media Type</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_500_internal_server_error">500 Internal Server Error</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent when a crash occurs in HTTP, loop
-or REST handlers, or when an invalid return value is
-returned. It may also be sent by <code>cowboy_rest</code> under
-normal conditions.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent when a crash occurs in HTTP, loop or REST handlers, or when an invalid return value is returned. It may also be sent by <code>cowboy_rest</code> under normal conditions.</p>
<h2 id="_501_not_implemented">501 Not Implemented</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_503_service_unavailable">503 Service Unavailable</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_505_http_version_not_supported">505 HTTP Version Not Supported</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy only supports the versions 1.0 and 1.1 of HTTP.
-In all other cases this status code is sent back to the
-client and the connection is closed.</p></div>
-</div>
-</div>
+<p>Cowboy only supports the versions 1.0 and 1.1 of HTTP. In all other cases this status code is sent back to the client and the connection is closed.</p>
+
diff --git a/docs/en/cowboy/2.3/manual/index.html b/docs/en/cowboy/2.3/manual/index.html
index bdd44991..29259ec0 100644
--- a/docs/en/cowboy/2.3/manual/index.html
+++ b/docs/en/cowboy/2.3/manual/index.html
@@ -62,171 +62,77 @@
<h1 class="lined-header"><span>Cowboy Function Reference</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy - Small, fast, modern HTTP server for Erlang/OTP</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy - Small, fast, modern HTTP server for Erlang/OTP</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy is an HTTP server for Erlang/OTP with support for the
-HTTP/1.1, HTTP/2 and Websocket protocols.</p></div>
-<div class="paragraph"><p>Cowboy aims to provide a complete HTTP stack. This includes
-the implementation of the HTTP RFCs but also any directly
-related standards, like Websocket or Server-Sent Events.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Cowboy is an HTTP server for Erlang/OTP with support for the HTTP/1.1, HTTP/2 and Websocket protocols.</p>
+<p>Cowboy aims to provide a complete HTTP stack. This includes the implementation of the HTTP RFCs but also any directly related standards, like Websocket or Server-Sent Events.</p>
<h2 id="_modules">Modules</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Functions:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="cowboy">cowboy(3)</a> - Listener management
-</p>
+<p>Functions:</p>
+<ul><li><a href="cowboy">cowboy(3)</a> - Listener management
</li>
-<li>
-<p>
-<a href="cowboy_req">cowboy_req(3)</a> - Request and response
-</p>
+<li><a href="cowboy_req">cowboy_req(3)</a> - Request and response
</li>
-<li>
-<p>
-<a href="cowboy_router">cowboy_router(3)</a> - Router
-</p>
+<li><a href="cowboy_router">cowboy_router(3)</a> - Router
</li>
-<li>
-<p>
-<a href="cowboy_constraints">cowboy_constraints(3)</a> - Constraints
-</p>
+<li><a href="cowboy_constraints">cowboy_constraints(3)</a> - Constraints
</li>
-</ul></div>
-<div class="paragraph"><p>Protocols:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="cowboy_http">cowboy_http(3)</a> - HTTP/1.1
-</p>
+</ul>
+<p>Protocols:</p>
+<ul><li><a href="cowboy_http">cowboy_http(3)</a> - HTTP/1.1
</li>
-<li>
-<p>
-<a href="cowboy_http2">cowboy_http2(3)</a> - HTTP/2
-</p>
+<li><a href="cowboy_http2">cowboy_http2(3)</a> - HTTP/2
</li>
-<li>
-<p>
-<a href="cowboy_websocket">cowboy_websocket(3)</a> - Websocket
-</p>
+<li><a href="cowboy_websocket">cowboy_websocket(3)</a> - Websocket
</li>
-</ul></div>
-<div class="paragraph"><p>Handlers:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="cowboy_static">cowboy_static(3)</a> - Static file handler
-</p>
+</ul>
+<p>Handlers:</p>
+<ul><li><a href="cowboy_static">cowboy_static(3)</a> - Static file handler
</li>
-</ul></div>
-<div class="paragraph"><p>Behaviors:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="cowboy_handler">cowboy_handler(3)</a> - Plain HTTP handlers
-</p>
+</ul>
+<p>Behaviors:</p>
+<ul><li><a href="cowboy_handler">cowboy_handler(3)</a> - Plain HTTP handlers
</li>
-<li>
-<p>
-<a href="cowboy_loop">cowboy_loop(3)</a> - Loop handlers
-</p>
+<li><a href="cowboy_loop">cowboy_loop(3)</a> - Loop handlers
</li>
-<li>
-<p>
-<a href="cowboy_middleware">cowboy_middleware(3)</a> - Middlewares
-</p>
+<li><a href="cowboy_middleware">cowboy_middleware(3)</a> - Middlewares
</li>
-<li>
-<p>
-<a href="cowboy_rest">cowboy_rest(3)</a> - REST handlers
-</p>
+<li><a href="cowboy_rest">cowboy_rest(3)</a> - REST handlers
</li>
-<li>
-<p>
-<a href="cowboy_stream">cowboy_stream(3)</a> - Stream handlers
-</p>
+<li><a href="cowboy_stream">cowboy_stream(3)</a> - Stream handlers
</li>
-<li>
-<p>
-<a href="cowboy_websocket">cowboy_websocket(3)</a> - Websocket handlers
-</p>
+<li><a href="cowboy_websocket">cowboy_websocket(3)</a> - Websocket handlers
</li>
-</ul></div>
-<div class="paragraph"><p>Middlewares:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="cowboy_router">cowboy_router(3)</a> - Router middleware
-</p>
+</ul>
+<p>Middlewares:</p>
+<ul><li><a href="cowboy_router">cowboy_router(3)</a> - Router middleware
</li>
-<li>
-<p>
-<a href="cowboy_handler">cowboy_handler(3)</a> - Handler middleware
-</p>
+<li><a href="cowboy_handler">cowboy_handler(3)</a> - Handler middleware
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
+<!-- @todo http_status_codes is not linked to; what to do with it?-->
<h2 id="_dependencies">Dependencies</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="ranch_app">ranch(7)</a> - Socket acceptor pool for TCP protocols
-</p>
+<ul><li><a href="ranch_app">ranch(7)</a> - Socket acceptor pool for TCP protocols
</li>
-<li>
-<p>
-<a href="cowlib_app">cowlib(7)</a> - Support library for manipulating Web protocols
-</p>
+<li><a href="cowlib_app">cowlib(7)</a> - Support library for manipulating Web protocols
</li>
-<li>
-<p>
-ssl - Secure communication over sockets
-</p>
+<li>ssl - Secure communication over sockets
</li>
-<li>
-<p>
-crypto - Crypto functions
-</p>
+<li>crypto - Crypto functions
</li>
-</ul></div>
-<div class="paragraph"><p>All these applications must be started before the <code>cowboy</code>
-application. To start Cowboy and all dependencies at once:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+</ul>
+<p>All these applications must be started before the <code>cowboy</code> application. To start Cowboy and all dependencies at once:</p>
+<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">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">application:ensure_all_started</span></span>(<span style="color: #FF6600">cowboy</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">application:ensure_all_started</font></b>(<font color="#FF6600">cowboy</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_environment">Environment</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <code>cowboy</code> application does not define any application
-environment configuration parameters.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The <code>cowboy</code> application does not define any application environment configuration parameters.</p>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="ranch_app">ranch(7)</a>,
-<a href="cowlib_app">cowlib(7)</a></p></div>
-</div>
-</div>
+<p><a href="ranch_app">ranch(7)</a>, <a href="cowlib_app">cowlib(7)</a></p>
+
diff --git a/docs/en/cowboy/2.4/guide/constraints/index.html b/docs/en/cowboy/2.4/guide/constraints/index.html
index 619e99d9..de8b94f9 100644
--- a/docs/en/cowboy/2.4/guide/constraints/index.html
+++ b/docs/en/cowboy/2.4/guide/constraints/index.html
@@ -62,141 +62,86 @@
<h1 class="lined-header"><span>Constraints</span></h1>
-<div class="paragraph"><p>Constraints are validation and conversion functions applied
-to user input.</p></div>
-<div class="paragraph"><p>They are used in various places in Cowboy, including the
-router and the <code>cowboy_req</code> match functions.</p></div>
-<div class="sect1">
+<p>Constraints are validation and conversion functions applied to user input.</p>
+<p>They are used in various places in Cowboy, including the router and the <code>cowboy_req</code> match functions.</p>
<h2 id="_syntax">Syntax</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Constraints are provided as a list of fields. For each field
-in the list, specific constraints can be applied, as well as
-a default value if the field is missing.</p></div>
-<div class="paragraph"><p>A field can take the form of an atom <code>field</code>, a tuple with
-constraints <code>{field, Constraints}</code> or a tuple with constraints
-and a default value <code>{field, Constraints, Default}</code>.
-The <code>field</code> form indicates the field is mandatory.</p></div>
-<div class="paragraph"><p>Note that when used with the router, only the second form
-makes sense, as it does not use the default and the field
-is always defined.</p></div>
-<div class="paragraph"><p>Constraints for each field are provided as an ordered list
-of atoms or funs to apply. Built-in constraints are provided
-as atoms, while custom constraints are provided as funs.</p></div>
-<div class="paragraph"><p>When multiple constraints are provided, they are applied in
-the order given. If the value has been modified by a constraint
-then the next one receives the new value.</p></div>
-<div class="paragraph"><p>For example, the following constraints will first validate
-and convert the field <code>my_value</code> to an integer, and then
-check that the integer is positive:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Constraints are provided as a list of fields. For each field in the list, specific constraints can be applied, as well as a default value if the field is missing.</p>
+<p>A field can take the form of an atom <code>field</code>, a tuple with constraints <code>{field, Constraints}</code> or a tuple with constraints and a default value <code>{field, Constraints, Default}</code>. The <code>field</code> form indicates the field is mandatory.</p>
+<p>Note that when used with the router, only the second form makes sense, as it does not use the default and the field is always defined.</p>
+<p>Constraints for each field are provided as an ordered list of atoms or funs to apply. Built-in constraints are provided as atoms, while custom constraints are provided as funs.</p>
+<p>When multiple constraints are provided, they are applied in the order given. If the value has been modified by a constraint then the next one receives the new value.</p>
+<p>For example, the following constraints will first validate and convert the field <code>my_value</code> to an integer, and then check that the integer is positive:</p>
+<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">PositiveFun</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">fun</span></span>
- (<span style="color: #990000">_</span>, <span style="color: #009900">V</span>) <span style="font-weight: bold"><span style="color: #0000FF">when</span></span> <span style="color: #009900">V</span> <span style="color: #990000">&gt;</span> <span style="color: #993399">0</span> <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">V</span>};
- (<span style="color: #990000">_</span>, <span style="color: #990000">_</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">error</span>, <span style="color: #FF6600">not_positive</span>}
-<span style="font-weight: bold"><span style="color: #0000FF">end</span></span>,
-{<span style="color: #FF6600">my_value</span>, [<span style="color: #FF6600">int</span>, <span style="color: #009900">PositiveFun</span>]}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>We ignore the first fun argument in this snippet. We shouldn&#8217;t.
-We will simply learn what it is later in this chapter.</p></div>
-<div class="paragraph"><p>When there&#8217;s only one constraint, it can be provided directly
-without wrapping it into a list:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">PositiveFun</font> <font color="#990000">=</font> <b><font color="#0000FF">fun</font></b>
+ (<font color="#990000">_</font>, <font color="#009900">V</font>) <b><font color="#0000FF">when</font></b> <font color="#009900">V</font> <font color="#990000">&gt;</font> <font color="#993399">0</font> <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <font color="#009900">V</font>};
+ (<font color="#990000">_</font>, <font color="#990000">_</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">error</font>, <font color="#FF6600">not_positive</font>}
+<b><font color="#0000FF">end</font></b>,
+{<font color="#FF6600">my_value</font>, [<font color="#FF6600">int</font>, <font color="#009900">PositiveFun</font>]}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>We ignore the first fun argument in this snippet. We shouldn&apos;t. We will simply learn what it is later in this chapter.</p>
+<p>When there&apos;s only one constraint, it can be provided directly without wrapping it into a list:</p>
+<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">my_value</span>, <span style="color: #FF6600">int</span>}</tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#FF6600">my_value</font>, <font color="#FF6600">int</font>}</tt></pre>
+</div></div>
<h2 id="_built_in_constraints">Built-in constraints</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Built-in constraints are specified as an atom:</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"> Constraint </th>
-<th align="left" valign="top"> Description</th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td align="left" valign="top"><p class="table">int</p></td>
-<td align="left" valign="top"><p class="table">Converts binary value to integer.</p></td>
+<p>Built-in constraints are specified as an atom:</p>
+<table rules="all" width="100%" frame="border"
+ cellspacing="0" cellpadding="4">
+<thead><tr><th>Constraint</th>
+<th>Description</th>
+</tr></thead><tbody><tr><td>int</td>
+<td>Converts binary value to integer.</td>
</tr>
-<tr>
-<td align="left" valign="top"><p class="table">nonempty</p></td>
-<td align="left" valign="top"><p class="table">Ensures the binary value is non-empty.</p></td>
+<tr><td>nonempty</td>
+<td>Ensures the binary value is non-empty.</td>
</tr>
-</tbody>
-</table>
-</div>
-</div>
-</div>
-<div class="sect1">
+</tbody></table>
<h2 id="_custom_constraints">Custom constraints</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Custom constraints are specified as a fun. This fun takes
-two arguments. The first argument indicates the operation
-to be performed, and the second is the value. What the
-value is and what must be returned depends on the operation.</p></div>
-<div class="paragraph"><p>Cowboy currently defines three operations. The operation
-used for validating and converting user input is the <code>forward</code>
-operation.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Custom constraints are specified as a fun. This fun takes two arguments. The first argument indicates the operation to be performed, and the second is the value. What the value is and what must be returned depends on the operation.</p>
+<p>Cowboy currently defines three operations. The operation used for validating and converting user input is the <code>forward</code> operation.</p>
+<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">int</span></span>(<span style="color: #FF6600">forward</span>, <span style="color: #009900">Value</span>) <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #0000FF">try</span></span>
- {<span style="color: #FF6600">ok</span>, <span style="font-weight: bold"><span style="color: #000000">binary_to_integer</span></span>(<span style="color: #009900">Value</span>)}
- <span style="font-weight: bold"><span style="color: #0000FF">catch</span></span> <span style="color: #990000">_:_</span> <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">error</span>, <span style="color: #FF6600">not_an_integer</span>}
- <span style="font-weight: bold"><span style="color: #0000FF">end</span></span>;</tt></pre></div></div>
-<div class="paragraph"><p>The value must be returned even if it is not converted
-by the constraint.</p></div>
-<div class="paragraph"><p>The <code>reverse</code> operation does the opposite: it
-takes a converted value and changes it back to what the
-user input would have been.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">int</font></b>(<font color="#FF6600">forward</font>, <font color="#009900">Value</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">try</font></b>
+ {<font color="#FF6600">ok</font>, <b><font color="#000000">binary_to_integer</font></b>(<font color="#009900">Value</font>)}
+ <b><font color="#0000FF">catch</font></b> <font color="#990000">_:_</font> <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">error</font>, <font color="#FF6600">not_an_integer</font>}
+ <b><font color="#0000FF">end</font></b>;</tt></pre>
+</div></div>
+<p>The value must be returned even if it is not converted by the constraint.</p>
+<p>The <code>reverse</code> operation does the opposite: it takes a converted value and changes it back to what the user input would have been.</p>
+<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">int</span></span>(<span style="color: #FF6600">reverse</span>, <span style="color: #009900">Value</span>) <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #0000FF">try</span></span>
- {<span style="color: #FF6600">ok</span>, <span style="font-weight: bold"><span style="color: #000000">integer_to_binary</span></span>(<span style="color: #009900">Value</span>)}
- <span style="font-weight: bold"><span style="color: #0000FF">catch</span></span> <span style="color: #990000">_:_</span> <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">error</span>, <span style="color: #FF6600">not_an_integer</span>}
- <span style="font-weight: bold"><span style="color: #0000FF">end</span></span>;</tt></pre></div></div>
-<div class="paragraph"><p>Finally, the <code>format_error</code> operation takes an error
-returned by any other operation and returns a formatted
-human-readable error message.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">int</font></b>(<font color="#FF6600">reverse</font>, <font color="#009900">Value</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">try</font></b>
+ {<font color="#FF6600">ok</font>, <b><font color="#000000">integer_to_binary</font></b>(<font color="#009900">Value</font>)}
+ <b><font color="#0000FF">catch</font></b> <font color="#990000">_:_</font> <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">error</font>, <font color="#FF6600">not_an_integer</font>}
+ <b><font color="#0000FF">end</font></b>;</tt></pre>
+</div></div>
+<p>Finally, the <code>format_error</code> operation takes an error returned by any other operation and returns a formatted human-readable error message.</p>
+<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">int</span></span>(<span style="color: #FF6600">format_error</span>, {<span style="color: #FF6600">not_an_integer</span>, <span style="color: #009900">Value</span>}) <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #000000">io_lib:format</span></span>(<span style="color: #FF0000">"The value ~p is not an integer."</span>, [<span style="color: #009900">Value</span>])<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Notice that for this case you get both the error and
-the value that was given to the constraint that produced
-this error.</p></div>
-<div class="paragraph"><p>Cowboy will not catch exceptions coming from constraint
-functions. They should be written to not emit any exceptions.</p></div>
-</div>
-</div>
+<pre><tt><b><font color="#000000">int</font></b>(<font color="#FF6600">format_error</font>, {<font color="#FF6600">not_an_integer</font>, <font color="#009900">Value</font>}) <font color="#990000">-&gt;</font>
+ <b><font color="#000000">io_lib:format</font></b>(<font color="#FF0000">"The value ~p is not an integer."</font>, [<font color="#009900">Value</font>])<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Notice that for this case you get both the error and the value that was given to the constraint that produced this error.</p>
+<p>Cowboy will not catch exceptions coming from constraint functions. They should be written to not emit any exceptions.</p>
+
diff --git a/docs/en/cowboy/2.4/guide/cookies/index.html b/docs/en/cowboy/2.4/guide/cookies/index.html
index d9df673a..3ef48485 100644
--- a/docs/en/cowboy/2.4/guide/cookies/index.html
+++ b/docs/en/cowboy/2.4/guide/cookies/index.html
@@ -62,144 +62,103 @@
<h1 class="lined-header"><span>Using cookies</span></h1>
-<div class="paragraph"><p>Cookies are a mechanism allowing applications to maintain
-state on top of the stateless HTTP protocol.</p></div>
-<div class="paragraph"><p>Cookies are a name/value store where the names and values are
-stored in plain text. They expire either after a delay
-or when the browser closes. They can be configured on a
-specific domain name or path, and restricted to secure
-resources (sent or downloaded over HTTPS), or restricted
-to the server (disallowing access from client-side scripts).</p></div>
-<div class="paragraph"><p>Cookie names are de facto case sensitive.</p></div>
-<div class="paragraph"><p>Cookies are stored client-side and sent with every subsequent
-request that matches the domain and path for which they were
-stored, until they expire. This can create a non-negligible
-cost.</p></div>
-<div class="paragraph"><p>Cookies should not be considered secure. They are stored on
-the user&#8217;s computer in plain text, and can be read by any
-program. They can also be read by proxies when using clear
-connections. Always validate the value before using it,
-and never store any sensitive information inside it.</p></div>
-<div class="paragraph"><p>Cookies set by the server are only available in requests
-following the client reception of the response containing
-them.</p></div>
-<div class="paragraph"><p>Cookies may be sent repeatedly. This is often useful to
-update the expiration time and avoid losing a cookie.</p></div>
-<div class="sect1">
+<p>Cookies are a mechanism allowing applications to maintain state on top of the stateless HTTP protocol.</p>
+<p>Cookies are a name/value store where the names and values are stored in plain text. They expire either after a delay or when the browser closes. They can be configured on a specific domain name or path, and restricted to secure resources (sent or downloaded over HTTPS), or restricted to the server (disallowing access from client-side scripts).</p>
+<p>Cookie names are de facto case sensitive.</p>
+<p>Cookies are stored client-side and sent with every subsequent request that matches the domain and path for which they were stored, until they expire. This can create a non-negligible cost.</p>
+<p>Cookies should not be considered secure. They are stored on the user&apos;s computer in plain text, and can be read by any program. They can also be read by proxies when using clear connections. Always validate the value before using it, and never store any sensitive information inside it.</p>
+<p>Cookies set by the server are only available in requests following the client reception of the response containing them.</p>
+<p>Cookies may be sent repeatedly. This is often useful to update the expiration time and avoid losing a cookie.</p>
<h2 id="_setting_cookies">Setting cookies</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>By default cookies are defined for the duration of the session:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>By default cookies are defined for the duration of the session:</p>
+<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">SessionID</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">generate_session_id</span></span>(),
-<span style="color: #009900">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_cookie</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"sessionid"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">SessionID</span>, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>They can also be set for a duration in seconds:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">SessionID</font> <font color="#990000">=</font> <b><font color="#000000">generate_session_id</font></b>(),
+<font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_cookie</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"sessionid"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">SessionID</font>, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>They can also be set for a duration in seconds:</p>
+<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">SessionID</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">generate_session_id</span></span>(),
-<span style="color: #009900">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_cookie</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"sessionid"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">SessionID</span>, <span style="color: #009900">Req0</span>,
- #{<span style="color: #0000FF">max_age</span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">3600</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>To delete cookies, set <code>max_age</code> to 0:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">SessionID</font> <font color="#990000">=</font> <b><font color="#000000">generate_session_id</font></b>(),
+<font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_cookie</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"sessionid"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">SessionID</font>, <font color="#009900">Req0</font>,
+ #{<font color="#0000FF">max_age</font> <font color="#990000">=&gt;</font> <font color="#993399">3600</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>To delete cookies, set <code>max_age</code> to 0:</p>
+<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">SessionID</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">generate_session_id</span></span>(),
-<span style="color: #009900">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_cookie</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"sessionid"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">SessionID</span>, <span style="color: #009900">Req0</span>,
- #{<span style="color: #0000FF">max_age</span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">0</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>To restrict cookies to a specific domain and path, the options
-of the same name can be used:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">SessionID</font> <font color="#990000">=</font> <b><font color="#000000">generate_session_id</font></b>(),
+<font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_cookie</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"sessionid"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">SessionID</font>, <font color="#009900">Req0</font>,
+ #{<font color="#0000FF">max_age</font> <font color="#990000">=&gt;</font> <font color="#993399">0</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>To restrict cookies to a specific domain and path, the options of the same name can be used:</p>
+<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">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_cookie</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"inaccount"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"1"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req0</span>,
- #{<span style="color: #0000FF">domain</span> <span style="color: #990000">=&gt;</span> <span style="color: #FF0000">"my.example.org"</span>, <span style="color: #0000FF">path</span> <span style="color: #990000">=&gt;</span> <span style="color: #FF0000">"/account"</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Cookies will be sent with requests to this domain and all
-its subdomains, and to resources on this path or deeper
-in the path hierarchy.</p></div>
-<div class="paragraph"><p>To restrict cookies to secure channels (typically resources
-available over HTTPS):</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_cookie</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"inaccount"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"1"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req0</font>,
+ #{<font color="#0000FF">domain</font> <font color="#990000">=&gt;</font> <font color="#FF0000">"my.example.org"</font>, <font color="#0000FF">path</font> <font color="#990000">=&gt;</font> <font color="#FF0000">"/account"</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Cookies will be sent with requests to this domain and all its subdomains, and to resources on this path or deeper in the path hierarchy.</p>
+<p>To restrict cookies to secure channels (typically resources available over HTTPS):</p>
+<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">SessionID</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">generate_session_id</span></span>(),
-<span style="color: #009900">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_cookie</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"sessionid"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">SessionID</span>, <span style="color: #009900">Req0</span>,
- #{<span style="color: #0000FF">secure</span> <span style="color: #990000">=&gt;</span> <span style="color: #000080">true</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>To prevent client-side scripts from accessing a cookie:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">SessionID</font> <font color="#990000">=</font> <b><font color="#000000">generate_session_id</font></b>(),
+<font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_cookie</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"sessionid"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">SessionID</font>, <font color="#009900">Req0</font>,
+ #{<font color="#0000FF">secure</font> <font color="#990000">=&gt;</font> <font color="#000080">true</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>To prevent client-side scripts from accessing a cookie:</p>
+<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">SessionID</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">generate_session_id</span></span>(),
-<span style="color: #009900">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_cookie</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"sessionid"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">SessionID</span>, <span style="color: #009900">Req0</span>,
- #{<span style="color: #0000FF">http_only</span> <span style="color: #990000">=&gt;</span> <span style="color: #000080">true</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Cookies may also be set client-side, for example using
-Javascript.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">SessionID</font> <font color="#990000">=</font> <b><font color="#000000">generate_session_id</font></b>(),
+<font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_cookie</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"sessionid"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">SessionID</font>, <font color="#009900">Req0</font>,
+ #{<font color="#0000FF">http_only</font> <font color="#990000">=&gt;</font> <font color="#000080">true</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Cookies may also be set client-side, for example using Javascript.</p>
<h2 id="_reading_cookies">Reading cookies</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The client only ever sends back the cookie name and value.
-All other options that can be set are never sent back.</p></div>
-<div class="paragraph"><p>Cowboy provides two functions for reading cookies. Both
-involve parsing the cookie header(s) and so should not
-be called repeatedly.</p></div>
-<div class="paragraph"><p>You can get all cookies as a key/value list:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The client only ever sends back the cookie name and value. All other options that can be set are never sent back.</p>
+<p>Cowboy provides two functions for reading cookies. Both involve parsing the cookie header(s) and so should not be called repeatedly.</p>
+<p>You can get all cookies as a key/value list:</p>
+<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">Cookies</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:parse_cookies</span></span>(<span style="color: #009900">Req</span>),
-{<span style="color: #990000">_</span>, <span style="color: #009900">Lang</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">lists:keyfind</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"lang"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #993399">1</span>, <span style="color: #009900">Cookies</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Or you can perform a match against cookies and retrieve
-only the ones you need, while at the same time doing
-any required post processing using <a href="../constraints">constraints</a>.
-This function returns a map:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Cookies</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:parse_cookies</font></b>(<font color="#009900">Req</font>),
+{<font color="#990000">_</font>, <font color="#009900">Lang</font>} <font color="#990000">=</font> <b><font color="#000000">lists:keyfind</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"lang"</font><font color="#990000">&gt;&gt;</font>, <font color="#993399">1</font>, <font color="#009900">Cookies</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Or you can perform a match against cookies and retrieve only the ones you need, while at the same time doing any required post processing using <a href="../constraints">constraints</a>. This function returns a map:</p>
+<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">id</span> <span style="color: #990000">:=</span> <span style="color: #009900">ID</span>, <span style="color: #FF6600">lang</span> <span style="color: #990000">:=</span> <span style="color: #009900">Lang</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:match_cookies</span></span>([<span style="color: #FF6600">id</span>, <span style="color: #FF6600">lang</span>], <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>You can use constraints to validate the values while matching
-them. The following snippet will crash if the <code>id</code> cookie is
-not an integer number or if the <code>lang</code> cookie is empty. Additionally
-the <code>id</code> cookie value will be converted to an integer term:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>#{<font color="#FF6600">id</font> <font color="#990000">:=</font> <font color="#009900">ID</font>, <font color="#FF6600">lang</font> <font color="#990000">:=</font> <font color="#009900">Lang</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:match_cookies</font></b>([<font color="#FF6600">id</font>, <font color="#FF6600">lang</font>], <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>You can use constraints to validate the values while matching them. The following snippet will crash if the <code>id</code> cookie is not an integer number or if the <code>lang</code> cookie is empty. Additionally the <code>id</code> cookie value will be converted to an integer term:</p>
+<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">CookiesMap</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:match_cookies</span></span>([{<span style="color: #FF6600">id</span>, <span style="color: #FF6600">int</span>}, {<span style="color: #FF6600">lang</span>, <span style="color: #FF6600">nonempty</span>}], <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Note that if two cookies share the same name, then the map value
-will be a list of the two cookie values.</p></div>
-<div class="paragraph"><p>A default value can be provided. The default will be used
-if the <code>lang</code> cookie is not found. It will not be used if
-the cookie is found but has an empty value:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">CookiesMap</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:match_cookies</font></b>([{<font color="#FF6600">id</font>, <font color="#FF6600">int</font>}, {<font color="#FF6600">lang</font>, <font color="#FF6600">nonempty</font>}], <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Note that if two cookies share the same name, then the map value will be a list of the two cookie values.</p>
+<p>A default value can be provided. The default will be used if the <code>lang</code> cookie is not found. It will not be used if the cookie is found but has an empty value:</p>
+<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">lang</span> <span style="color: #990000">:=</span> <span style="color: #009900">Lang</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:match_cookies</span></span>([{<span style="color: #FF6600">lang</span>, [], <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"en-US"</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="paragraph"><p>If no default is provided and the value is missing, an
-exception is thrown.</p></div>
-</div>
-</div>
+<pre><tt>#{<font color="#FF6600">lang</font> <font color="#990000">:=</font> <font color="#009900">Lang</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:match_cookies</font></b>([{<font color="#FF6600">lang</font>, [], <font color="#990000">&lt;&lt;</font><font color="#FF0000">"en-US"</font><font color="#990000">&gt;&gt;</font>}], <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>If no default is provided and the value is missing, an exception is thrown.</p>
+
diff --git a/docs/en/cowboy/2.4/guide/erlang_web/index.html b/docs/en/cowboy/2.4/guide/erlang_web/index.html
index a4d5b81a..ef054417 100644
--- a/docs/en/cowboy/2.4/guide/erlang_web/index.html
+++ b/docs/en/cowboy/2.4/guide/erlang_web/index.html
@@ -62,194 +62,52 @@
<h1 class="lined-header"><span>Erlang and the Web</span></h1>
-<div class="paragraph"><p>Erlang is the ideal platform for writing Web applications.
-Its features are a perfect match for the requirements of
-modern Web applications.</p></div>
-<div class="sect1">
+<p>Erlang is the ideal platform for writing Web applications. Its features are a perfect match for the requirements of modern Web applications.</p>
<h2 id="_the_web_is_concurrent">The Web is concurrent</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>When you access a website there is little concurrency
-involved. A few connections are opened and requests
-are sent through these connections. Then the web page
-is displayed on your screen. Your browser will only
-open up to 4 or 8 connections to the server, depending
-on your settings. This isn&#8217;t much.</p></div>
-<div class="paragraph"><p>But think about it. You are not the only one accessing
-the server at the same time. There can be hundreds, if
-not thousands, if not millions of connections to the
-same server at the same time.</p></div>
-<div class="paragraph"><p>Even today a lot of systems used in production haven&#8217;t
-solved the C10K problem (ten thousand concurrent connections).
-And the ones who did are trying hard to get to the next
-step, C100K, and are pretty far from it.</p></div>
-<div class="paragraph"><p>Erlang meanwhile has no problem handling millions of
-connections. At the time of writing there are application
-servers written in Erlang that can handle more than two
-million connections on a single server in a real production
-application, with spare memory and CPU!</p></div>
-<div class="paragraph"><p>The Web is concurrent, and Erlang is a language designed
-for concurrency, so it is a perfect match.</p></div>
-<div class="paragraph"><p>Of course, various platforms need to scale beyond a few
-million connections. This is where Erlang&#8217;s built-in
-distribution mechanisms come in. If one server isn&#8217;t
-enough, add more! Erlang allows you to use the same code
-for talking to local processes or to processes in other
-parts of your cluster, which means you can scale very
-quickly if the need arises.</p></div>
-<div class="paragraph"><p>The Web has large userbases, and the Erlang platform was
-designed to work in a distributed setting, so it is a
-perfect match.</p></div>
-<div class="paragraph"><p>Or is it? Surely you can find solutions to handle that many
-concurrent connections with your favorite language&#8230; But all
-these solutions will break down in the next few years. Why?
-Firstly because servers don&#8217;t get any more powerful, they
-instead get a lot more cores and memory. This is only useful
-if your application can use them properly, and Erlang is
-light-years away from anything else in that area. Secondly,
-today your computer and your phone are online, tomorrow your
-watch, goggles, bike, car, fridge and tons of other devices
-will also connect to various applications on the Internet.</p></div>
-<div class="paragraph"><p>Only Erlang is prepared to deal with what&#8217;s coming.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>When you access a website there is little concurrency involved. A few connections are opened and requests are sent through these connections. Then the web page is displayed on your screen. Your browser will only open up to 4 or 8 connections to the server, depending on your settings. This isn&apos;t much.</p>
+<p>But think about it. You are not the only one accessing the server at the same time. There can be hundreds, if not thousands, if not millions of connections to the same server at the same time.</p>
+<p>Even today a lot of systems used in production haven&apos;t solved the C10K problem (ten thousand concurrent connections). And the ones who did are trying hard to get to the next step, C100K, and are pretty far from it.</p>
+<p>Erlang meanwhile has no problem handling millions of connections. At the time of writing there are application servers written in Erlang that can handle more than two million connections on a single server in a real production application, with spare memory and CPU!</p>
+<p>The Web is concurrent, and Erlang is a language designed for concurrency, so it is a perfect match.</p>
+<p>Of course, various platforms need to scale beyond a few million connections. This is where Erlang&apos;s built-in distribution mechanisms come in. If one server isn&apos;t enough, add more! Erlang allows you to use the same code for talking to local processes or to processes in other parts of your cluster, which means you can scale very quickly if the need arises.</p>
+<p>The Web has large userbases, and the Erlang platform was designed to work in a distributed setting, so it is a perfect match.</p>
+<p>Or is it? Surely you can find solutions to handle that many concurrent connections with your favorite language... But all these solutions will break down in the next few years. Why? Firstly because servers don&apos;t get any more powerful, they instead get a lot more cores and memory. This is only useful if your application can use them properly, and Erlang is light-years away from anything else in that area. Secondly, today your computer and your phone are online, tomorrow your watch, goggles, bike, car, fridge and tons of other devices will also connect to various applications on the Internet.</p>
+<p>Only Erlang is prepared to deal with what&apos;s coming.</p>
<h2 id="_the_web_is_soft_real_time">The Web is soft real time</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>What does soft real time mean, you ask? It means we want the
-operations done as quickly as possible, and in the case of
-web applications, it means we want the data propagated fast.</p></div>
-<div class="paragraph"><p>In comparison, hard real time has a similar meaning, but also
-has a hard time constraint, for example an operation needs to
-be done in under N milliseconds otherwise the system fails
-entirely.</p></div>
-<div class="paragraph"><p>Users aren&#8217;t that needy yet, they just want to get access
-to their content in a reasonable delay, and they want the
-actions they make to register at most a few seconds after
-they submitted them, otherwise they&#8217;ll start worrying about
-whether it successfully went through.</p></div>
-<div class="paragraph"><p>The Web is soft real time because taking longer to perform an
-operation would be seen as bad quality of service.</p></div>
-<div class="paragraph"><p>Erlang is a soft real time system. It will always run
-processes fairly, a little at a time, switching to another
-process after a while and preventing a single process to
-steal resources from all others. This means that Erlang
-can guarantee stable low latency of operations.</p></div>
-<div class="paragraph"><p>Erlang provides the guarantees that the soft real time Web
-requires.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>What does soft real time mean, you ask? It means we want the operations done as quickly as possible, and in the case of web applications, it means we want the data propagated fast.</p>
+<p>In comparison, hard real time has a similar meaning, but also has a hard time constraint, for example an operation needs to be done in under N milliseconds otherwise the system fails entirely.</p>
+<p>Users aren&apos;t that needy yet, they just want to get access to their content in a reasonable delay, and they want the actions they make to register at most a few seconds after they submitted them, otherwise they&apos;ll start worrying about whether it successfully went through.</p>
+<p>The Web is soft real time because taking longer to perform an operation would be seen as bad quality of service.</p>
+<p>Erlang is a soft real time system. It will always run processes fairly, a little at a time, switching to another process after a while and preventing a single process to steal resources from all others. This means that Erlang can guarantee stable low latency of operations.</p>
+<p>Erlang provides the guarantees that the soft real time Web requires.</p>
<h2 id="_the_web_is_asynchronous">The Web is asynchronous</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Long ago, the Web was synchronous because HTTP was synchronous.
-You fired a request, and then waited for a response. Not anymore.
-It all began when XmlHttpRequest started being used. It allowed
-the client to perform asynchronous calls to the server.</p></div>
-<div class="paragraph"><p>Then Websocket appeared and allowed both the server and the client
-to send data to the other endpoint completely asynchronously. The
-data is contained within frames and no response is necessary.</p></div>
-<div class="paragraph"><p>Erlang processes work the same. They send each other data contained
-within messages and then continue running without needing a response.
-They tend to spend most of their time inactive, waiting for a new
-message, and the Erlang VM happily activate them when one is received.</p></div>
-<div class="paragraph"><p>It is therefore quite easy to imagine Erlang being good at receiving
-Websocket frames, which may come in at unpredictable times, pass the
-data to the responsible processes which are always ready waiting for
-new messages, and perform the operations required by only activating
-the required parts of the system.</p></div>
-<div class="paragraph"><p>The more recent Web technologies, like Websocket of course, but also
-HTTP/2.0, are all fully asynchronous protocols. The concept
-of requests and responses is retained of course, but anything could
-be sent in between, by both the client or the browser, and the
-responses could also be received in a completely different order.</p></div>
-<div class="paragraph"><p>Erlang is by nature asynchronous and really good at it thanks to the
-great engineering that has been done in the VM over the years. It&#8217;s
-only natural that it&#8217;s so good at dealing with the asynchronous Web.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Long ago, the Web was synchronous because HTTP was synchronous. You fired a request, and then waited for a response. Not anymore. It all began when XmlHttpRequest started being used. It allowed the client to perform asynchronous calls to the server.</p>
+<p>Then Websocket appeared and allowed both the server and the client to send data to the other endpoint completely asynchronously. The data is contained within frames and no response is necessary.</p>
+<p>Erlang processes work the same. They send each other data contained within messages and then continue running without needing a response. They tend to spend most of their time inactive, waiting for a new message, and the Erlang VM happily activate them when one is received.</p>
+<p>It is therefore quite easy to imagine Erlang being good at receiving Websocket frames, which may come in at unpredictable times, pass the data to the responsible processes which are always ready waiting for new messages, and perform the operations required by only activating the required parts of the system.</p>
+<p>The more recent Web technologies, like Websocket of course, but also HTTP/2.0, are all fully asynchronous protocols. The concept of requests and responses is retained of course, but anything could be sent in between, by both the client or the browser, and the responses could also be received in a completely different order.</p>
+<p>Erlang is by nature asynchronous and really good at it thanks to the great engineering that has been done in the VM over the years. It&apos;s only natural that it&apos;s so good at dealing with the asynchronous Web.</p>
<h2 id="_the_web_is_omnipresent">The Web is omnipresent</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The Web has taken a very important part of our lives. We&#8217;re
-connected at all times, when we&#8217;re on our phone, using our computer,
-passing time using a tablet while in the bathroom&#8230; And this
-isn&#8217;t going to slow down, every single device at home or on us
-will be connected.</p></div>
-<div class="paragraph"><p>All these devices are always connected. And with the number of
-alternatives to give you access to the content you seek, users
-tend to not stick around when problems arise. Users today want
-their applications to be always available and if it&#8217;s having
-too many issues they just move on.</p></div>
-<div class="paragraph"><p>Despite this, when developers choose a product to use for building
-web applications, their only concern seems to be "Is it fast?",
-and they look around for synthetic benchmarks showing which one
-is the fastest at sending "Hello world" with only a handful
-concurrent connections. Web benchmarks haven&#8217;t been representative
-of reality in a long time, and are drifting further away as
-time goes on.</p></div>
-<div class="paragraph"><p>What developers should really ask themselves is "Can I service
-all my users with no interruption?" and they&#8217;d find that they have
-two choices. They can either hope for the best, or they can use
-Erlang.</p></div>
-<div class="paragraph"><p>Erlang is built for fault tolerance. When writing code in any other
-language, you have to check all the return values and act accordingly
-to avoid any unforeseen issues. If you&#8217;re lucky, you won&#8217;t miss
-anything important. When writing Erlang code, you can just check
-the success condition and ignore all errors. If an error happens,
-the Erlang process crashes and is then restarted by a special
-process called a supervisor.</p></div>
-<div class="paragraph"><p>Erlang developers thus have no need to fear unhandled
-errors, and can focus on handling only the errors that should
-give some feedback to the user and let the system take care of
-the rest. This also has the advantage of allowing them to write
-a lot less code, and let them sleep at night.</p></div>
-<div class="paragraph"><p>Erlang&#8217;s fault tolerance oriented design is the first piece of
-what makes it the best choice for the omnipresent, always available
-Web.</p></div>
-<div class="paragraph"><p>The second piece is Erlang&#8217;s built-in distribution. Distribution
-is a key part of building a fault tolerant system, because it
-allows you to handle bigger failures, like a whole server going
-down, or even a data center entirely.</p></div>
-<div class="paragraph"><p>Fault tolerance and distribution are important today, and will be
-vital in the future of the Web. Erlang is ready.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The Web has taken a very important part of our lives. We&apos;re connected at all times, when we&apos;re on our phone, using our computer, passing time using a tablet while in the bathroom... And this isn&apos;t going to slow down, every single device at home or on us will be connected.</p>
+<p>All these devices are always connected. And with the number of alternatives to give you access to the content you seek, users tend to not stick around when problems arise. Users today want their applications to be always available and if it&apos;s having too many issues they just move on.</p>
+<p>Despite this, when developers choose a product to use for building web applications, their only concern seems to be &quot;Is it fast?&quot;, and they look around for synthetic benchmarks showing which one is the fastest at sending &quot;Hello world&quot; with only a handful concurrent connections. Web benchmarks haven&apos;t been representative of reality in a long time, and are drifting further away as time goes on.</p>
+<p>What developers should really ask themselves is &quot;Can I service all my users with no interruption?&quot; and they&apos;d find that they have two choices. They can either hope for the best, or they can use Erlang.</p>
+<p>Erlang is built for fault tolerance. When writing code in any other language, you have to check all the return values and act accordingly to avoid any unforeseen issues. If you&apos;re lucky, you won&apos;t miss anything important. When writing Erlang code, you can just check the success condition and ignore all errors. If an error happens, the Erlang process crashes and is then restarted by a special process called a supervisor.</p>
+<p>Erlang developers thus have no need to fear unhandled errors, and can focus on handling only the errors that should give some feedback to the user and let the system take care of the rest. This also has the advantage of allowing them to write a lot less code, and let them sleep at night.</p>
+<p>Erlang&apos;s fault tolerance oriented design is the first piece of what makes it the best choice for the omnipresent, always available Web.</p>
+<p>The second piece is Erlang&apos;s built-in distribution. Distribution is a key part of building a fault tolerant system, because it allows you to handle bigger failures, like a whole server going down, or even a data center entirely.</p>
+<p>Fault tolerance and distribution are important today, and will be vital in the future of the Web. Erlang is ready.</p>
<h2 id="_learn_erlang">Learn Erlang</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>If you are new to Erlang, you may want to grab a book or
-two to get started. Those are my recommendations as the
-author of Cowboy.</p></div>
-<div class="sect3">
+<p>If you are new to Erlang, you may want to grab a book or two to get started. Those are my recommendations as the author of Cowboy.</p>
<h4 id="_the_erlanger_playbook">The Erlanger Playbook</h4>
-<div class="paragraph"><p>The Erlanger Playbook is an ebook I am currently writing,
-which covers a number of different topics from code to
-documentation to testing Erlang applications. It also has
-an Erlang section where it covers directly the building
-blocks and patterns, rather than details like the syntax.</p></div>
-<div class="paragraph"><p>You can most likely read it as a complete beginner, but
-you will need a companion book to make the most of it.
-Buy it from the <a href="https://ninenines.eu">Nine Nines website</a>.</p></div>
-</div>
-<div class="sect3">
+<p>The Erlanger Playbook is an ebook I am currently writing, which covers a number of different topics from code to documentation to testing Erlang applications. It also has an Erlang section where it covers directly the building blocks and patterns, rather than details like the syntax.</p>
+<p>You can most likely read it as a complete beginner, but you will need a companion book to make the most of it. Buy it from the <a href="https://ninenines.eu">Nine Nines website</a>.</p>
<h4 id="_programming_erlang">Programming Erlang</h4>
-<div class="paragraph"><p>This book is from one of the creator of Erlang, Joe
-Armstrong. It provides a very good explanation of what
-Erlang is and why it is so. It serves as a very good
-introduction to the language and platform.</p></div>
-<div class="paragraph"><p>The book is <a href="http://pragprog.com/book/jaerlang2/programming-erlang">Programming Erlang</a>,
-and it also features a chapter on Cowboy.</p></div>
-</div>
-<div class="sect3">
+<p>This book is from one of the creator of Erlang, Joe Armstrong. It provides a very good explanation of what Erlang is and why it is so. It serves as a very good introduction to the language and platform.</p>
+<p>The book is <a href="http://pragprog.com/book/jaerlang2/programming-erlang">Programming Erlang</a>, and it also features a chapter on Cowboy.</p>
<h4 id="_learn_you_some_erlang_for_great_good">Learn You Some Erlang for Great Good!</h4>
-<div class="paragraph"><p><a href="http://learnyousomeerlang.com">LYSE</a> is a much more complete
-book covering many aspects of Erlang, while also providing
-stories and humor. Be warned: it&#8217;s pretty verbose. It comes
-with a free online version and a more refined paper and
-ebook version.</p></div>
-</div>
-</div>
-</div>
+<p><a href="http://learnyousomeerlang.com">LYSE</a> is a much more complete book covering many aspects of Erlang, while also providing stories and humor. Be warned: it&apos;s pretty verbose. It comes with a free online version and a more refined paper and ebook version.</p>
+
diff --git a/docs/en/cowboy/2.4/guide/flow_diagram/index.html b/docs/en/cowboy/2.4/guide/flow_diagram/index.html
index 1f014904..e76d4b7f 100644
--- a/docs/en/cowboy/2.4/guide/flow_diagram/index.html
+++ b/docs/en/cowboy/2.4/guide/flow_diagram/index.html
@@ -62,113 +62,30 @@
<h1 class="lined-header"><span>Flow diagram</span></h1>
-<div class="paragraph"><p>Cowboy is a lightweight HTTP server with support for HTTP/1.1,
-HTTP/2 and Websocket.</p></div>
-<div class="paragraph"><p>It is built on top of Ranch. Please see the Ranch guide for more
-information about how the network connections are handled.</p></div>
-<div class="sect1">
+<p>Cowboy is a lightweight HTTP server with support for HTTP/1.1, HTTP/2 and Websocket.</p>
+<p>It is built on top of Ranch. Please see the Ranch guide for more information about how the network connections are handled.</p>
<h2 id="_overview">Overview</h2>
-<div class="sectionbody">
-<div class="imageblock">
-<div class="content">
-<img src="../http_req_resp.png" alt="HTTP request/response flowchart" />
-</div>
-</div>
-<div class="paragraph"><p>As you can see on the diagram, the client
-begins by connecting to the server. This step is handled
-by a Ranch acceptor, which is a process dedicated to
-accepting new connections.</p></div>
-<div class="paragraph"><p>After Ranch accepts a new connection, whether it is an
-HTTP/1.1 or HTTP/2 connection, Cowboy starts receiving
-requests and handling them.</p></div>
-<div class="paragraph"><p>In HTTP/1.1 all requests come sequentially. In HTTP/2
-the requests may arrive and be processed concurrently.</p></div>
-<div class="paragraph"><p>When a request comes in, Cowboy creates a stream, which
-is a set of request/response and all the events associated
-with them. The protocol code in Cowboy defers the handling
-of these streams to stream handler modules. When you
-configure Cowboy you may define one or more module that
-will receive all events associated with a stream, including
-the request, response, bodies, Erlang messages and more.</p></div>
-<div class="paragraph"><p>By default Cowboy comes configured with a stream handler
-called <code>cowboy_stream_h</code>. This stream handler will create
-a new process for every request coming in, and then
-communicate with this process to read the body or send
-a response back. The request process executes middlewares
-which, by default, including the router and then the
-execution of handlers. Like stream handlers, middlewares
-may also be customized.</p></div>
-<div class="paragraph"><p>A response may be sent at almost any point in this
-diagram. If the response must be sent before the stream
-is initialized (because an error occurred early, for
-example) then stream handlers receive a special event
-indicating this error.</p></div>
-</div>
-</div>
-<div class="sect1">
+<img src="../http_req_resp.png" alt="HTTP request/response flowchart"/><p>As you can see on the diagram, the client begins by connecting to the server. This step is handled by a Ranch acceptor, which is a process dedicated to accepting new connections.</p>
+<p>After Ranch accepts a new connection, whether it is an HTTP/1.1 or HTTP/2 connection, Cowboy starts receiving requests and handling them.</p>
+<p>In HTTP/1.1 all requests come sequentially. In HTTP/2 the requests may arrive and be processed concurrently.</p>
+<p>When a request comes in, Cowboy creates a stream, which is a set of request/response and all the events associated with them. The protocol code in Cowboy defers the handling of these streams to stream handler modules. When you configure Cowboy you may define one or more module that will receive all events associated with a stream, including the request, response, bodies, Erlang messages and more.</p>
+<p>By default Cowboy comes configured with a stream handler called <code>cowboy_stream_h</code>. This stream handler will create a new process for every request coming in, and then communicate with this process to read the body or send a response back. The request process executes middlewares which, by default, including the router and then the execution of handlers. Like stream handlers, middlewares may also be customized.</p>
+<p>A response may be sent at almost any point in this diagram. If the response must be sent before the stream is initialized (because an error occurred early, for example) then stream handlers receive a special event indicating this error.</p>
<h2 id="_protocol_specific_headers">Protocol-specific headers</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy takes care of protocol-specific headers and prevents
-you from sending them manually. For HTTP/1.1 this includes
-the <code>transfer-encoding</code> and <code>connection</code> headers. For HTTP/2
-this includes the colon headers like <code>:status</code>.</p></div>
-<div class="paragraph"><p>Cowboy will also remove protocol-specific headers from
-requests before passing them to stream handlers. Cowboy
-tries to hide the implementation details of all protocols
-as well as possible.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Cowboy takes care of protocol-specific headers and prevents you from sending them manually. For HTTP/1.1 this includes the <code>transfer-encoding</code> and <code>connection</code> headers. For HTTP/2 this includes the colon headers like <code>:status</code>.</p>
+<p>Cowboy will also remove protocol-specific headers from requests before passing them to stream handlers. Cowboy tries to hide the implementation details of all protocols as well as possible.</p>
<h2 id="_number_of_processes_per_connection">Number of processes per connection</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>By default, Cowboy will use one process per connection,
-plus one process per set of request/response (called a
-stream, internally).</p></div>
-<div class="paragraph"><p>The reason it creates a new process for every request is due
-to the requirements of HTTP/2 where requests are executed
-concurrently and independently from the connection. The
-frames from the different requests end up interleaved on
-the single TCP connection.</p></div>
-<div class="paragraph"><p>The request processes are never reused. There is therefore
-no need to perform any cleanup after the response has been
-sent. The process will terminate and Erlang/OTP will reclaim
-all memory at once.</p></div>
-<div class="paragraph"><p>Cowboy ultimately does not require more than one process
-per connection. It is possible to interact with the connection
-directly from a stream handler, a low level interface to Cowboy.
-They are executed from within the connection process, and can
-handle the incoming requests and send responses. This is however
-not recommended in normal circumstances, as a stream handler
-taking too long to execute could have a negative impact on
-concurrent requests or the state of the connection itself.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>By default, Cowboy will use one process per connection, plus one process per set of request/response (called a stream, internally).</p>
+<p>The reason it creates a new process for every request is due to the requirements of HTTP/2 where requests are executed concurrently and independently from the connection. The frames from the different requests end up interleaved on the single TCP connection.</p>
+<p>The request processes are never reused. There is therefore no need to perform any cleanup after the response has been sent. The process will terminate and Erlang/OTP will reclaim all memory at once.</p>
+<p>Cowboy ultimately does not require more than one process per connection. It is possible to interact with the connection directly from a stream handler, a low level interface to Cowboy. They are executed from within the connection process, and can handle the incoming requests and send responses. This is however not recommended in normal circumstances, as a stream handler taking too long to execute could have a negative impact on concurrent requests or the state of the connection itself.</p>
<h2 id="_date_header">Date header</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Because querying for the current date and time can be expensive,
-Cowboy generates one <em>Date</em> header value every second, shares it
-to all other processes, which then simply copy it in the response.
-This allows compliance with HTTP/1.1 with no actual performance loss.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Because querying for the current date and time can be expensive, Cowboy generates one <em>Date</em> header value every second, shares it to all other processes, which then simply copy it in the response. This allows compliance with HTTP/1.1 with no actual performance loss.</p>
<h2 id="_binaries">Binaries</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy makes extensive use of binaries.</p></div>
-<div class="paragraph"><p>Binaries are more efficient than lists for representing
-strings because they take less memory space. Processing
-performance can vary depending on the operation. Binaries
-are known for generally getting a great boost if the code
-is compiled natively. Please see the HiPE documentation
-for more details.</p></div>
-<div class="paragraph"><p>Binaries may end up being shared between processes. This
-can lead to some large memory usage when one process keeps
-the binary data around forever without freeing it. If you
-see some weird memory usage in your application, this might
-be the cause.</p></div>
-</div>
-</div>
+<p>Cowboy makes extensive use of binaries.</p>
+<p>Binaries are more efficient than lists for representing strings because they take less memory space. Processing performance can vary depending on the operation. Binaries are known for generally getting a great boost if the code is compiled natively. Please see the HiPE documentation for more details.</p>
+<p>Binaries may end up being shared between processes. This can lead to some large memory usage when one process keeps the binary data around forever without freeing it. If you see some weird memory usage in your application, this might be the cause.</p>
+
diff --git a/docs/en/cowboy/2.4/guide/getting_started/index.html b/docs/en/cowboy/2.4/guide/getting_started/index.html
index b2302211..fe40a86a 100644
--- a/docs/en/cowboy/2.4/guide/getting_started/index.html
+++ b/docs/en/cowboy/2.4/guide/getting_started/index.html
@@ -62,161 +62,104 @@
<h1 class="lined-header"><span>Getting started</span></h1>
-<div class="paragraph"><p>Erlang is more than a language, it is also an operating system
-for your applications. Erlang developers rarely write standalone
-modules, they write libraries or applications, and then bundle
-those into what is called a release. A release contains the
-Erlang VM plus all applications required to run the node, so
-it can be pushed to production directly.</p></div>
-<div class="paragraph"><p>This chapter walks you through all the steps of setting up
-Cowboy, writing your first application and generating your first
-release. At the end of this chapter you should know everything
-you need to push your first Cowboy application to production.</p></div>
-<div class="sect1">
+<p>Erlang is more than a language, it is also an operating system for your applications. Erlang developers rarely write standalone modules, they write libraries or applications, and then bundle those into what is called a release. A release contains the Erlang VM plus all applications required to run the node, so it can be pushed to production directly.</p>
+<p>This chapter walks you through all the steps of setting up Cowboy, writing your first application and generating your first release. At the end of this chapter you should know everything you need to push your first Cowboy application to production.</p>
<h2 id="_prerequisites">Prerequisites</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>We are going to use the <a href="https://github.com/ninenines/erlang.mk">Erlang.mk</a>
-build system. If you are using Windows, please check the
-<a href="http://erlang.mk/guide/installation.html">Installation instructions</a>
-to get your environment setup before you continue.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>We are going to use the <a href="https://github.com/ninenines/erlang.mk">Erlang.mk</a> build system. If you are using Windows, please check the <a href="http://erlang.mk/guide/installation.html">Installation instructions</a> to get your environment setup before you continue.</p>
<h2 id="_bootstrap">Bootstrap</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>First, let&#8217;s create the directory for our application.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>First, let&apos;s create the directory for our application.</p>
+<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 hello_erlang
-$ cd hello_erlang</tt></pre></div></div>
-<div class="paragraph"><p>Then we need to download Erlang.mk. Either use the following
-command or download it manually.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+$ cd hello_erlang</tt></pre>
+</div></div>
+<p>Then we need to download Erlang.mk. Either use the following command or download it manually.</p>
+<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>$ wget 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>We can now bootstrap our application. Since we are going to generate
-a release, we will also bootstrap it at the same time.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>$ wget https<font color="#990000">:</font>//erlang<font color="#990000">.</font>mk/erlang<font color="#990000">.</font>mk</tt></pre>
+</div></div>
+<p>We can now bootstrap our application. Since we are going to generate a release, we will also bootstrap it at the same time.</p>
+<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 -f erlang<span style="color: #990000">.</span>mk bootstrap bootstrap-rel</tt></pre></div></div>
-<div class="paragraph"><p>This creates a Makefile, a base application, and the release files
-necessary for creating the release. We can already build and start
-this release.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>$ make -f erlang<font color="#990000">.</font>mk bootstrap bootstrap-rel</tt></pre>
+</div></div>
+<p>This creates a Makefile, a base application, and the release files necessary for creating the release. We can already build and start this release.</p>
+<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 run
-<span style="color: #990000">...</span>
-<span style="color: #990000">(</span>hello_erlang@<span style="color: #993399">127.0</span><span style="color: #990000">.</span><span style="color: #993399">0.1</span><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>Entering the command <code>i().</code> will show the running processes, including
-one called <code>hello_erlang_sup</code>. This is the supervisor for our
-application.</p></div>
-<div class="paragraph"><p>The release currently does nothing. In the rest of this chapter we
-will add Cowboy as a dependency and write a simple "Hello world!"
-handler.</p></div>
-</div>
-</div>
-<div class="sect1">
+<font color="#990000">...</font>
+<font color="#990000">(</font>hello_erlang@<font color="#993399">127.0</font><font color="#990000">.</font><font color="#993399">0.1</font><font color="#990000">)</font><font color="#993399">1</font><font color="#990000">&gt;</font></tt></pre>
+</div></div>
+<p>Entering the command <code>i().</code> will show the running processes, including one called <code>hello_erlang_sup</code>. This is the supervisor for our application.</p>
+<p>The release currently does nothing. In the rest of this chapter we will add Cowboy as a dependency and write a simple &quot;Hello world!&quot; handler.</p>
<h2 id="_cowboy_setup">Cowboy setup</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>We will modify the <em>Makefile</em> to tell the build system it needs to
-fetch and compile Cowboy:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>We will modify the <em>Makefile</em> to tell the build system it needs to fetch and compile Cowboy:</p>
+<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">PROJECT =</span> hello_erlang
+<pre><tt><font color="#009900">PROJECT =</font> hello_erlang
-<span style="color: #009900">DEPS =</span> cowboy
-<span style="color: #009900">dep_cowboy_commit =</span> 2.4.0
+<font color="#009900">DEPS =</font> cowboy
+<font color="#009900">dep_cowboy_commit =</font> 2.4.0
-<span style="color: #009900">DEP_PLUGINS =</span> cowboy
+<font color="#009900">DEP_PLUGINS =</font> cowboy
-include erlang.mk</tt></pre></div></div>
-<div class="paragraph"><p>We also tell the build system to load the plugins Cowboy provides.
-These include predefined templates that we will use soon.</p></div>
-<div class="paragraph"><p>If you do <code>make run</code> now, Cowboy will be included in the release
-and started automatically. This is not enough however, as Cowboy
-doesn&#8217;t do anything by default. We still need to tell Cowboy to
-listen for connections.</p></div>
-</div>
-</div>
-<div class="sect1">
+include erlang.mk</tt></pre>
+</div></div>
+<p>We also tell the build system to load the plugins Cowboy provides. These include predefined templates that we will use soon.</p>
+<p>If you do <code>make run</code> now, Cowboy will be included in the release and started automatically. This is not enough however, as Cowboy doesn&apos;t do anything by default. We still need to tell Cowboy to listen for connections.</p>
<h2 id="_listening_for_connections">Listening for connections</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>First we define the routes that Cowboy will use to map requests
-to handler modules, and then we start the listener. This is best
-done at application startup.</p></div>
-<div class="paragraph"><p>Open the <em>src/hello_erlang_app.erl</em> file and add the necessary
-code to the <code>start/2</code> function to make it look like this:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>First we define the routes that Cowboy will use to map requests to handler modules, and then we start the listener. This is best done at application startup.</p>
+<p>Open the <em>src/hello_erlang_app.erl</em> file and add the necessary code to the <code>start/2</code> function to make it look like this:</p>
+<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">start</span></span>(<span style="color: #009900">_Type</span>, <span style="color: #009900">_Args</span>) <span style="color: #990000">-&gt;</span>
- <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: #FF6600">'_'</span>, [{<span style="color: #FF0000">"/"</span>, <span style="color: #FF6600">hello_handler</span>, []}]}
+<pre><tt><b><font color="#000000">start</font></b>(<font color="#009900">_Type</font>, <font color="#009900">_Args</font>) <font color="#990000">-&gt;</font>
+ <font color="#009900">Dispatch</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_router:compile</font></b>([
+ {<font color="#FF6600">'_'</font>, [{<font color="#FF0000">"/"</font>, <font color="#FF6600">hello_handler</font>, []}]}
]),
- {<span style="color: #FF6600">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:start_clear</span></span>(<span style="color: #FF6600">my_http_listener</span>,
- [{<span style="color: #FF6600">port</span>, <span style="color: #993399">8080</span>}],
- #{<span style="color: #0000FF">env</span> <span style="color: #990000">=&gt;</span> #{<span style="color: #0000FF">dispatch</span> <span style="color: #990000">=&gt;</span> <span style="color: #009900">Dispatch</span>}}
+ {<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy:start_clear</font></b>(<font color="#FF6600">my_http_listener</font>,
+ [{<font color="#FF6600">port</font>, <font color="#993399">8080</font>}],
+ #{<font color="#0000FF">env</font> <font color="#990000">=&gt;</font> #{<font color="#0000FF">dispatch</font> <font color="#990000">=&gt;</font> <font color="#009900">Dispatch</font>}}
),
- <span style="font-weight: bold"><span style="color: #000000">hello_erlang_sup:start_link</span></span>()<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Routes are explained in details in the <a href="../routing">Routing</a>
-chapter. For this tutorial we map the path <code>/</code> to the handler
-module <code>hello_handler</code>. This module doesn&#8217;t exist yet.</p></div>
-<div class="paragraph"><p>Build and start the release, then open <a href="http://localhost:8080">http://localhost:8080</a>
-in your browser. You will get a 500 error because the module is missing.
-Any other URL, like <a href="http://localhost:8080/test">http://localhost:8080/test</a>, will result in a
-404 error.</p></div>
-</div>
-</div>
-<div class="sect1">
+ <b><font color="#000000">hello_erlang_sup:start_link</font></b>()<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Routes are explained in details in the <a href="../routing">Routing</a> chapter. For this tutorial we map the path <code>/</code> to the handler module <code>hello_handler</code>. This module doesn&apos;t exist yet.</p>
+<p>Build and start the release, then open <a href="http://localhost:8080">http://localhost:8080</a> in your browser. You will get a 500 error because the module is missing. Any other URL, like <a href="http://localhost:8080/test">http://localhost:8080/test</a>, will result in a 404 error.</p>
<h2 id="_handling_requests">Handling requests</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy features different kinds of handlers, including REST
-and Websocket handlers. For this tutorial we will use a plain
-HTTP handler.</p></div>
-<div class="paragraph"><p>Generate a handler from a template:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Cowboy features different kinds of handlers, including REST and Websocket handlers. For this tutorial we will use a plain HTTP handler.</p>
+<p>Generate a handler from a template:</p>
+<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 new <span style="color: #009900">t</span><span style="color: #990000">=</span>cowboy<span style="color: #990000">.</span>http <span style="color: #009900">n</span><span style="color: #990000">=</span>hello_handler</tt></pre></div></div>
-<div class="paragraph"><p>Then, open the <em>src/hello_handler.erl</em> file and modify
-the <code>init/2</code> function like this to send a reply.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>$ make new <font color="#009900">t</font><font color="#990000">=</font>cowboy<font color="#990000">.</font>http <font color="#009900">n</font><font color="#990000">=</font>hello_handler</tt></pre>
+</div></div>
+<p>Then, open the <em>src/hello_handler.erl</em> file and modify the <code>init/2</code> function like this to send a reply.</p>
+<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">init</span></span>(<span style="color: #009900">Req0</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">200</span>,
- #{<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/plain"</span><span style="color: #990000">&gt;&gt;</span>},
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Hello Erlang!"</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="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>What the above code does is send a 200 OK reply, with the
-Content-type header set to <code>text/plain</code> and the response
-body set to <code>Hello Erlang!</code>.</p></div>
-<div class="paragraph"><p>If you run the release and open <a href="http://localhost:8080">http://localhost:8080</a>
-in your browser, you should get a nice <code>Hello Erlang!</code> displayed!</p></div>
-</div>
-</div>
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req0</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ <font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:reply</font></b>(<font color="#993399">200</font>,
+ #{<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/plain"</font><font color="#990000">&gt;&gt;</font>},
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"Hello Erlang!"</font><font color="#990000">&gt;&gt;</font>,
+ <font color="#009900">Req0</font>),
+ {<font color="#FF6600">ok</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>What the above code does is send a 200 OK reply, with the Content-type header set to <code>text/plain</code> and the response body set to <code>Hello Erlang!</code>.</p>
+<p>If you run the release and open <a href="http://localhost:8080">http://localhost:8080</a> in your browser, you should get a nice <code>Hello Erlang!</code> displayed!</p>
+
diff --git a/docs/en/cowboy/2.4/guide/handlers/index.html b/docs/en/cowboy/2.4/guide/handlers/index.html
index 255cc546..78f64505 100644
--- a/docs/en/cowboy/2.4/guide/handlers/index.html
+++ b/docs/en/cowboy/2.4/guide/handlers/index.html
@@ -62,91 +62,57 @@
<h1 class="lined-header"><span>Handlers</span></h1>
-<div class="paragraph"><p>Handlers are Erlang modules that handle HTTP requests.</p></div>
-<div class="sect1">
+<p>Handlers are Erlang modules that handle HTTP requests.</p>
<h2 id="_plain_http_handlers">Plain HTTP handlers</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The most basic handler in Cowboy implements the mandatory
-<code>init/2</code> callback, manipulates the request, optionally
-sends a response and then returns.</p></div>
-<div class="paragraph"><p>This callback receives the <a href="../req">Req object</a> and the initial
-state defined in the <a href="../routing">router configuration</a>.</p></div>
-<div class="paragraph"><p>A handler that does nothing would look like this:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The most basic handler in Cowboy implements the mandatory <code>init/2</code> callback, manipulates the request, optionally sends a response and then returns.</p>
+<p>This callback receives the <a href="../req">Req object</a> and the initial state defined in the <a href="../routing">router configuration</a>.</p>
+<p>A handler that does nothing would look like this:</p>
+<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">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">ok</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Despite sending no reply, a <code>204 No Content</code> response will be
-sent to the client, as Cowboy makes sure that a response is
-sent for every request.</p></div>
-<div class="paragraph"><p>We need to use the Req object to reply.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Despite sending no reply, a <code>204 No Content</code> response will be sent to the client, as Cowboy makes sure that a response is sent for every request.</p>
+<p>We need to use the Req object to reply.</p>
+<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">init</span></span>(<span style="color: #009900">Req0</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">200</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/plain"</span><span style="color: #990000">&gt;&gt;</span>
- }, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Hello World!"</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="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Cowboy will immediately send a response when <code>cowboy:reply/4</code>
-is called.</p></div>
-<div class="paragraph"><p>We then return a 3-tuple. <code>ok</code> means that the handler ran
-successfully. We also give the modified Req back to Cowboy.</p></div>
-<div class="paragraph"><p>The last value of the tuple is a state that will be used
-in every subsequent callbacks to this handler. Plain HTTP
-handlers only have one additional callback, the optional
-and rarely used <code>terminate/3</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req0</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ <font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:reply</font></b>(<font color="#993399">200</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/plain"</font><font color="#990000">&gt;&gt;</font>
+ }, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"Hello World!"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req0</font>),
+ {<font color="#FF6600">ok</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Cowboy will immediately send a response when <code>cowboy:reply/4</code> is called.</p>
+<p>We then return a 3-tuple. <code>ok</code> means that the handler ran successfully. We also give the modified Req back to Cowboy.</p>
+<p>The last value of the tuple is a state that will be used in every subsequent callbacks to this handler. Plain HTTP handlers only have one additional callback, the optional and rarely used <code>terminate/3</code>.</p>
<h2 id="_other_handlers">Other handlers</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <code>init/2</code> callback can also be used to inform Cowboy
-that this is a different kind of handler and that Cowboy
-should switch to it. To do this you simply need to return
-the module name of the handler type you want to switch to.</p></div>
-<div class="paragraph"><p>Cowboy comes with three handler types you can switch to:
-<a href="../rest_handlers">cowboy_rest</a>, <a href="#ws_handlers">cowboy_websocket</a>
-and <a href="../loop_handlers">cowboy_loop</a>. In addition to those you
-can define your own handler types.</p></div>
-<div class="paragraph"><p>Switching is simple. Instead of returning <code>ok</code>, you simply
-return the name of the handler type you want to use. The
-following snippet switches to a Websocket handler:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The <code>init/2</code> callback can also be used to inform Cowboy that this is a different kind of handler and that Cowboy should switch to it. To do this you simply need to return the module name of the handler type you want to switch to.</p>
+<p>Cowboy comes with three handler types you can switch to: <a href="../rest_handlers">cowboy_rest</a>, <a href="../ws_handlers">cowboy_websocket</a> and <a href="../loop_handlers">cowboy_loop</a>. In addition to those you can define your own handler types.</p>
+<p>Switching is simple. Instead of returning <code>ok</code>, you simply return the name of the handler type you want to use. The following snippet switches to a Websocket handler:</p>
+<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">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_websocket</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">
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">cowboy_websocket</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_cleaning_up">Cleaning up</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>All handler types provide the optional <code>terminate/3</code> callback.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>All handler types provide the optional <code>terminate/3</code> callback.</p>
+<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">terminate</span></span>(<span style="color: #009900">_Reason</span>, <span style="color: #009900">_Req</span>, <span style="color: #009900">_State</span>) <span style="color: #990000">-&gt;</span>
- <span style="color: #FF6600">ok</span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>This callback is strictly reserved for any required cleanup.
-You cannot send a response from this function. There is no
-other return value.</p></div>
-<div class="paragraph"><p>This callback is optional because it is rarely necessary.
-Cleanup should be done in separate processes directly (by
-monitoring the handler process to detect when it exits).</p></div>
-<div class="paragraph"><p>Cowboy does not reuse processes for different requests. The
-process will terminate soon after this call returns.</p></div>
-</div>
-</div>
+<pre><tt><b><font color="#000000">terminate</font></b>(<font color="#009900">_Reason</font>, <font color="#009900">_Req</font>, <font color="#009900">_State</font>) <font color="#990000">-&gt;</font>
+ <font color="#FF6600">ok</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>This callback is strictly reserved for any required cleanup. You cannot send a response from this function. There is no other return value.</p>
+<p>This callback is optional because it is rarely necessary. Cleanup should be done in separate processes directly (by monitoring the handler process to detect when it exits).</p>
+<p>Cowboy does not reuse processes for different requests. The process will terminate soon after this call returns.</p>
+
diff --git a/docs/en/cowboy/2.4/guide/index.html b/docs/en/cowboy/2.4/guide/index.html
index 06d3b7fa..9a7ac2e9 100644
--- a/docs/en/cowboy/2.4/guide/index.html
+++ b/docs/en/cowboy/2.4/guide/index.html
@@ -62,219 +62,87 @@
<h1 class="lined-header"><span>Cowboy User Guide</span></h1>
-<div class="sect1">
+<!-- REST: where should i handle bindings? init, probably. qs? in media type functions-->
+<!-- REST: explain how a module per media type is good; module may be shared between client/server-->
<h2 id="_rationale">Rationale</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="modern_web/">The modern Web</a>
-</p>
+<ul><li><a href="modern_web/">The modern Web</a>
</li>
-<li>
-<p>
-<a href="erlang_web/">Erlang and the Web</a>
-</p>
+<li><a href="erlang_web/">Erlang and the Web</a>
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_introduction">Introduction</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="introduction/">Introduction</a>
-</p>
+<ul><li><a href="introduction/">Introduction</a>
</li>
-<li>
-<p>
-<a href="getting_started/">Getting started</a>
-</p>
+<li><a href="getting_started/">Getting started</a>
</li>
-<li>
-<p>
-<a href="flow_diagram/">Flow diagram</a>
-</p>
+<li><a href="flow_diagram/">Flow diagram</a>
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_configuration">Configuration</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="listeners/">Listeners</a>
-</p>
+<ul><li><a href="listeners/">Listeners</a>
</li>
-<li>
-<p>
-<a href="routing/">Routing</a>
-</p>
+<li><a href="routing/">Routing</a>
</li>
-<li>
-<p>
-<a href="constraints/">Constraints</a>
-</p>
+<li><a href="constraints/">Constraints</a>
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_handlers">Handlers</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="handlers/">Handlers</a>
-</p>
+<ul><li><a href="handlers/">Handlers</a>
</li>
-<li>
-<p>
-<a href="loop_handlers/">Loop handlers</a>
-</p>
+<li><a href="loop_handlers/">Loop handlers</a>
</li>
-<li>
-<p>
-<a href="static_files/">Static files</a>
-</p>
+<li><a href="static_files/">Static files</a>
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_request_and_response">Request and response</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="req/">Request details</a>
-</p>
+<ul><li><a href="req/">Request details</a>
</li>
-<li>
-<p>
-<a href="req_body/">Reading the request body</a>
-</p>
+<li><a href="req_body/">Reading the request body</a>
</li>
-<li>
-<p>
-<a href="resp/">Sending a response</a>
-</p>
+<li><a href="resp/">Sending a response</a>
</li>
-<li>
-<p>
-<a href="cookies/">Using cookies</a>
-</p>
+<li><a href="cookies/">Using cookies</a>
</li>
-<li>
-<p>
-<a href="multipart/">Multipart</a>
-</p>
+<li><a href="multipart/">Multipart</a>
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_rest">REST</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="rest_principles/">REST principles</a>
-</p>
+<ul><li><a href="rest_principles/">REST principles</a>
</li>
-<li>
-<p>
-<a href="rest_handlers/">Handling REST requests</a>
-</p>
+<li><a href="rest_handlers/">Handling REST requests</a>
</li>
-<li>
-<p>
-<a href="rest_flowcharts/">REST flowcharts</a>
-</p>
+<li><a href="rest_flowcharts/">REST flowcharts</a>
</li>
-<li>
-<p>
-<a href="resource_design/">Designing a resource handler</a>
-</p>
+<li><a href="resource_design/">Designing a resource handler</a>
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_websocket">Websocket</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="ws_protocol/">The Websocket protocol</a>
-</p>
+<ul><li><a href="ws_protocol/">The Websocket protocol</a>
</li>
-<li>
-<p>
-<a href="ws_handlers/">Websocket handlers</a>
-</p>
+<li><a href="ws_handlers/">Websocket handlers</a>
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_advanced">Advanced</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="streams/">Streams</a>
-</p>
+<ul><li><a href="streams/">Streams</a>
</li>
-<li>
-<p>
-<a href="middlewares/">Middlewares</a>
-</p>
+<li><a href="middlewares/">Middlewares</a>
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_additional_information">Additional information</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="migrating_from_2.3/">Migrating from Cowboy 2.3 to 2.4</a>
-</p>
+<ul><li><a href="migrating_from_2.3/">Migrating from Cowboy 2.3 to 2.4</a>
</li>
-<li>
-<p>
-<a href="migrating_from_2.2/">Migrating from Cowboy 2.2 to 2.3</a>
-</p>
+<li><a href="migrating_from_2.2/">Migrating from Cowboy 2.2 to 2.3</a>
</li>
-<li>
-<p>
-<a href="migrating_from_2.1/">Migrating from Cowboy 2.1 to 2.2</a>
-</p>
+<li><a href="migrating_from_2.1/">Migrating from Cowboy 2.1 to 2.2</a>
</li>
-<li>
-<p>
-<a href="migrating_from_2.0/">Migrating from Cowboy 2.0 to 2.1</a>
-</p>
+<li><a href="migrating_from_2.0/">Migrating from Cowboy 2.0 to 2.1</a>
</li>
-<li>
-<p>
-<a href="migrating_from_1.0/">Migrating from Cowboy 1.0 to 2.0</a>
-</p>
+<li><a href="migrating_from_1.0/">Migrating from Cowboy 1.0 to 2.0</a>
</li>
-<li>
-<p>
-<a href="specs/">HTTP and other specifications</a>
-</p>
+<li><a href="specs/">HTTP and other specifications</a>
</li>
-</ul></div>
-</div>
-</div>
+</ul>
+
diff --git a/docs/en/cowboy/2.4/guide/introduction/index.html b/docs/en/cowboy/2.4/guide/introduction/index.html
index ecdfa50e..4eae9298 100644
--- a/docs/en/cowboy/2.4/guide/introduction/index.html
+++ b/docs/en/cowboy/2.4/guide/introduction/index.html
@@ -62,79 +62,40 @@
<h1 class="lined-header"><span>Introduction</span></h1>
-<div class="paragraph"><p>Cowboy is a small, fast and modern HTTP server for Erlang/OTP.</p></div>
-<div class="paragraph"><p>Cowboy aims to provide a complete <a href="../modern_web">modern Web stack</a>.
-This includes HTTP/1.1, HTTP/2, Websocket, Server-Sent Events and
-Webmachine-based REST.</p></div>
-<div class="paragraph"><p>Cowboy comes with functions for introspection and tracing, enabling
-developers to know precisely what is happening at any time. Its modular
-design also easily enable developers to add instrumentation.</p></div>
-<div class="paragraph"><p>Cowboy is a high quality project. It has a small code base, is very
-efficient (both in latency and memory use) and can easily be embedded
-in another application.</p></div>
-<div class="paragraph"><p>Cowboy is clean Erlang code. It includes hundreds of tests and its code
-is fully compliant with the Dialyzer. It is also well documented and
-features a Function Reference, a User Guide and numerous Tutorials.</p></div>
-<div class="sect1">
+<p>Cowboy is a small, fast and modern HTTP server for Erlang/OTP.</p>
+<p>Cowboy aims to provide a complete <a href="../modern_web">modern Web stack</a>. This includes HTTP/1.1, HTTP/2, Websocket, Server-Sent Events and Webmachine-based REST.</p>
+<p>Cowboy comes with functions for introspection and tracing, enabling developers to know precisely what is happening at any time. Its modular design also easily enable developers to add instrumentation.</p>
+<p>Cowboy is a high quality project. It has a small code base, is very efficient (both in latency and memory use) and can easily be embedded in another application.</p>
+<p>Cowboy is clean Erlang code. It includes hundreds of tests and its code is fully compliant with the Dialyzer. It is also well documented and features a Function Reference, a User Guide and numerous Tutorials.</p>
<h2 id="_prerequisites">Prerequisites</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Beginner Erlang knowledge is recommended for reading this guide.</p></div>
-<div class="paragraph"><p>Knowledge of the HTTP protocol is recommended but not required, as it
-will be detailed throughout the guide.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Beginner Erlang knowledge is recommended for reading this guide.</p>
+<p>Knowledge of the HTTP protocol is recommended but not required, as it will be detailed throughout the guide.</p>
<h2 id="_supported_platforms">Supported platforms</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy is tested and supported on Linux, FreeBSD, Windows and OSX.</p></div>
-<div class="paragraph"><p>Cowboy has been reported to work on other platforms, but we make no
-guarantee that the experience will be safe and smooth. You are advised
-to perform the necessary testing and security audits prior to deploying
-on other platforms.</p></div>
-<div class="paragraph"><p>Cowboy is developed for Erlang/OTP 19.0 and newer.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Cowboy is tested and supported on Linux, FreeBSD, Windows and OSX.</p>
+<p>Cowboy has been reported to work on other platforms, but we make no guarantee that the experience will be safe and smooth. You are advised to perform the necessary testing and security audits prior to deploying on other platforms.</p>
+<p>Cowboy is developed for Erlang/OTP 19.0 and newer.</p>
<h2 id="_license">License</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy uses the ISC License.</p></div>
-<div class="listingblock">
-<div class="content">
-<pre><code>Copyright (c) 2011-2017, Loïc Hoguin &lt;[email protected]&gt;
+<p>Cowboy uses the ISC License.</p>
+<div class="listingblock"><div class="content"><pre>Copyright (c) 2011-2017, Loïc Hoguin &lt;[email protected]&gt;
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+THE SOFTWARE IS PROVIDED &quot;AS IS&quot; AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.</code></pre>
-</div></div>
-</div>
-</div>
-<div class="sect1">
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.</pre></div></div>
<h2 id="_versioning">Versioning</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy uses <a href="http://semver.org/">Semantic Versioning 2.0.0</a>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Cowboy uses <a href="http://semver.org/">Semantic Versioning 2.0.0</a>.</p>
<h2 id="_conventions">Conventions</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>In the HTTP protocol, the method name is case sensitive. All standard
-method names are uppercase.</p></div>
-<div class="paragraph"><p>Header names are case insensitive. When using HTTP/1.1, Cowboy converts
-all the request header names to lowercase. HTTP/2 requires clients to
-send them as lowercase. Any other header name is expected to be provided
-lowercased, including when querying information about the request or
-when sending responses.</p></div>
-<div class="paragraph"><p>The same applies to any other case insensitive value.</p></div>
-</div>
-</div>
+<p>In the HTTP protocol, the method name is case sensitive. All standard method names are uppercase.</p>
+<p>Header names are case insensitive. When using HTTP/1.1, Cowboy converts all the request header names to lowercase. HTTP/2 requires clients to send them as lowercase. Any other header name is expected to be provided lowercased, including when querying information about the request or when sending responses.</p>
+<p>The same applies to any other case insensitive value.</p>
+
diff --git a/docs/en/cowboy/2.4/guide/listeners/index.html b/docs/en/cowboy/2.4/guide/listeners/index.html
index 925b4c0f..f6a82645 100644
--- a/docs/en/cowboy/2.4/guide/listeners/index.html
+++ b/docs/en/cowboy/2.4/guide/listeners/index.html
@@ -62,109 +62,61 @@
<h1 class="lined-header"><span>Listeners</span></h1>
-<div class="paragraph"><p>A listener is a set of processes that listens on a port for
-new connections. Incoming connections get handled by Cowboy.
-Depending on the connection handshake, one or another protocol
-may be used.</p></div>
-<div class="paragraph"><p>This chapter is specific to Cowboy. Please refer to the
-<a href="https://ninenines.eu/docs/en/ranch/1.3/guide/listeners/">Ranch User Guide</a>
-for more information about listeners.</p></div>
-<div class="paragraph"><p>Cowboy provides two types of listeners: one listening for
-clear TCP connections, and one listening for secure TLS
-connections. Both of them support the HTTP/1.1 and HTTP/2
-protocols.</p></div>
-<div class="sect1">
+<p>A listener is a set of processes that listens on a port for new connections. Incoming connections get handled by Cowboy. Depending on the connection handshake, one or another protocol may be used.</p>
+<p>This chapter is specific to Cowboy. Please refer to the <a href="https://ninenines.eu/docs/en/ranch/1.3/guide/listeners/">Ranch User Guide</a> for more information about listeners.</p>
+<p>Cowboy provides two types of listeners: one listening for clear TCP connections, and one listening for secure TLS connections. Both of them support the HTTP/1.1 and HTTP/2 protocols.</p>
<h2 id="_clear_tcp_listener">Clear TCP listener</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The clear TCP listener will accept connections on the
-given port. A typical HTTP server would listen on port 80.
-Port 80 requires special permissions on most platforms
-however so a common alternative is port 8080.</p></div>
-<div class="paragraph"><p>The following snippet starts listening for connections
-on port 8080:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The clear TCP listener will accept connections on the given port. A typical HTTP server would listen on port 80. Port 80 requires special permissions on most platforms however so a common alternative is port 8080.</p>
+<p>The following snippet starts listening for connections on port 8080:</p>
+<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">start</span></span>(<span style="color: #009900">_Type</span>, <span style="color: #009900">_Args</span>) <span style="color: #990000">-&gt;</span>
- <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: #FF6600">'_'</span>, [{<span style="color: #FF0000">"/"</span>, <span style="color: #FF6600">hello_handler</span>, []}]}
+<pre><tt><b><font color="#000000">start</font></b>(<font color="#009900">_Type</font>, <font color="#009900">_Args</font>) <font color="#990000">-&gt;</font>
+ <font color="#009900">Dispatch</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_router:compile</font></b>([
+ {<font color="#FF6600">'_'</font>, [{<font color="#FF0000">"/"</font>, <font color="#FF6600">hello_handler</font>, []}]}
]),
- {<span style="color: #FF6600">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:start_clear</span></span>(<span style="color: #FF6600">my_http_listener</span>,
- [{<span style="color: #FF6600">port</span>, <span style="color: #993399">8080</span>}],
- #{<span style="color: #0000FF">env</span> <span style="color: #990000">=&gt;</span> #{<span style="color: #0000FF">dispatch</span> <span style="color: #990000">=&gt;</span> <span style="color: #009900">Dispatch</span>}}
+ {<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy:start_clear</font></b>(<font color="#FF6600">my_http_listener</font>,
+ [{<font color="#FF6600">port</font>, <font color="#993399">8080</font>}],
+ #{<font color="#0000FF">env</font> <font color="#990000">=&gt;</font> #{<font color="#0000FF">dispatch</font> <font color="#990000">=&gt;</font> <font color="#009900">Dispatch</font>}}
),
- <span style="font-weight: bold"><span style="color: #000000">hello_erlang_sup:start_link</span></span>()<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>The <a href="../getting_started">Getting Started</a> chapter uses a
-clear TCP listener.</p></div>
-<div class="paragraph"><p>Clients connecting to Cowboy on the clear listener port are
-expected to use either HTTP/1.1 or HTTP/2.</p></div>
-<div class="paragraph"><p>Cowboy supports both methods of initiating a clear
-HTTP/2 connection: through the Upgrade mechanism
-(<a href="https://tools.ietf.org/html/rfc7540#section-3.2">RFC 7540 3.2</a>)
-or by sending the preface directly
-(<a href="https://tools.ietf.org/html/rfc7540#section-3.4">RFC 7540 3.4</a>).</p></div>
-<div class="paragraph"><p>Compatibility with HTTP/1.0 is provided by Cowboy&#8217;s HTTP/1.1
-implementation.</p></div>
-</div>
-</div>
-<div class="sect1">
+ <b><font color="#000000">hello_erlang_sup:start_link</font></b>()<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>The <a href="../getting_started">Getting Started</a> chapter uses a clear TCP listener.</p>
+<p>Clients connecting to Cowboy on the clear listener port are expected to use either HTTP/1.1 or HTTP/2.</p>
+<p>Cowboy supports both methods of initiating a clear HTTP/2 connection: through the Upgrade mechanism (<a href="https://tools.ietf.org/html/rfc7540#section-3.2">RFC 7540 3.2</a>) or by sending the preface directly (<a href="https://tools.ietf.org/html/rfc7540#section-3.4">RFC 7540 3.4</a>).</p>
+<p>Compatibility with HTTP/1.0 is provided by Cowboy&apos;s HTTP/1.1 implementation.</p>
<h2 id="_secure_tls_listener">Secure TLS listener</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The secure TLS listener will accept connections on the
-given port. A typical HTTPS server would listen on port 443.
-Port 443 requires special permissions on most platforms
-however so a common alternative is port 8443.</p></div>
-<div class="paragraph"><p>The function provided by Cowboy will ensure that the TLS
-options given are following the HTTP/2 RFC with regards
-to security. For example some TLS extensions or ciphers
-may be disabled. This also applies to HTTP/1.1 connections
-on this listener. If this is not desirable, Ranch can be
-used directly to setup a custom listener.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The secure TLS listener will accept connections on the given port. A typical HTTPS server would listen on port 443. Port 443 requires special permissions on most platforms however so a common alternative is port 8443.</p>
+<!-- @todo Make a complete list of restrictions.-->
+<p>The function provided by Cowboy will ensure that the TLS options given are following the HTTP/2 RFC with regards to security. For example some TLS extensions or ciphers may be disabled. This also applies to HTTP/1.1 connections on this listener. If this is not desirable, Ranch can be used directly to setup a custom listener.</p>
+<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">start</span></span>(<span style="color: #009900">_Type</span>, <span style="color: #009900">_Args</span>) <span style="color: #990000">-&gt;</span>
- <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: #FF6600">'_'</span>, [{<span style="color: #FF0000">"/"</span>, <span style="color: #FF6600">hello_handler</span>, []}]}
+<pre><tt><b><font color="#000000">start</font></b>(<font color="#009900">_Type</font>, <font color="#009900">_Args</font>) <font color="#990000">-&gt;</font>
+ <font color="#009900">Dispatch</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_router:compile</font></b>([
+ {<font color="#FF6600">'_'</font>, [{<font color="#FF0000">"/"</font>, <font color="#FF6600">hello_handler</font>, []}]}
]),
- {<span style="color: #FF6600">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:start_tls</span></span>(<span style="color: #FF6600">my_http_listener</span>,
+ {<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy:start_tls</font></b>(<font color="#FF6600">my_http_listener</font>,
[
- {<span style="color: #FF6600">port</span>, <span style="color: #993399">8443</span>},
- {<span style="color: #FF6600">certfile</span>, <span style="color: #FF0000">"/path/to/certfile"</span>},
- {<span style="color: #FF6600">keyfile</span>, <span style="color: #FF0000">"/path/to/keyfile"</span>}
+ {<font color="#FF6600">port</font>, <font color="#993399">8443</font>},
+ {<font color="#FF6600">certfile</font>, <font color="#FF0000">"/path/to/certfile"</font>},
+ {<font color="#FF6600">keyfile</font>, <font color="#FF0000">"/path/to/keyfile"</font>}
],
- #{<span style="color: #0000FF">env</span> <span style="color: #990000">=&gt;</span> #{<span style="color: #0000FF">dispatch</span> <span style="color: #990000">=&gt;</span> <span style="color: #009900">Dispatch</span>}}
+ #{<font color="#0000FF">env</font> <font color="#990000">=&gt;</font> #{<font color="#0000FF">dispatch</font> <font color="#990000">=&gt;</font> <font color="#009900">Dispatch</font>}}
),
- <span style="font-weight: bold"><span style="color: #000000">hello_erlang_sup:start_link</span></span>()<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Clients connecting to Cowboy on the secure listener are
-expected to use the ALPN TLS extension to indicate what
-protocols they understand. Cowboy always prefers HTTP/2
-over HTTP/1.1 when both are supported. When neither are
-supported by the client, or when the ALPN extension was
-missing, Cowboy expects HTTP/1.1 to be used.</p></div>
-<div class="paragraph"><p>Cowboy also advertises HTTP/2 support through the older
-NPN TLS extension for compatibility. Note however that
-this support will likely not be enabled by default when
-Cowboy 2.0 gets released.</p></div>
-<div class="paragraph"><p>Compatibility with HTTP/1.0 is provided by Cowboy&#8217;s HTTP/1.1
-implementation.</p></div>
-</div>
-</div>
-<div class="sect1">
+ <b><font color="#000000">hello_erlang_sup:start_link</font></b>()<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Clients connecting to Cowboy on the secure listener are expected to use the ALPN TLS extension to indicate what protocols they understand. Cowboy always prefers HTTP/2 over HTTP/1.1 when both are supported. When neither are supported by the client, or when the ALPN extension was missing, Cowboy expects HTTP/1.1 to be used.</p>
+<p>Cowboy also advertises HTTP/2 support through the older NPN TLS extension for compatibility. Note however that this support will likely not be enabled by default when Cowboy 2.0 gets released.</p>
+<p>Compatibility with HTTP/1.0 is provided by Cowboy&apos;s HTTP/1.1 implementation.</p>
<h2 id="_protocol_configuration">Protocol configuration</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The HTTP/1.1 and HTTP/2 protocols share the same semantics;
-only their framing differs. The first is a text protocol and
-the second a binary protocol.</p></div>
-<div class="paragraph"><p>Cowboy doesn&#8217;t separate the configuration for HTTP/1.1 and
-HTTP/2. Everything goes into the same map. Many options are
-shared.</p></div>
-</div>
-</div>
+<p>The HTTP/1.1 and HTTP/2 protocols share the same semantics; only their framing differs. The first is a text protocol and the second a binary protocol.</p>
+<p>Cowboy doesn&apos;t separate the configuration for HTTP/1.1 and HTTP/2. Everything goes into the same map. Many options are shared.</p>
+<!-- @todo Describe good to know options for both protocols?-->
+<!-- Maybe do that in separate chapters?-->
+
diff --git a/docs/en/cowboy/2.4/guide/loop_handlers/index.html b/docs/en/cowboy/2.4/guide/loop_handlers/index.html
index 3285fae4..e66ebf77 100644
--- a/docs/en/cowboy/2.4/guide/loop_handlers/index.html
+++ b/docs/en/cowboy/2.4/guide/loop_handlers/index.html
@@ -62,131 +62,72 @@
<h1 class="lined-header"><span>Loop handlers</span></h1>
-<div class="paragraph"><p>Loop handlers are a special kind of HTTP handlers used when the
-response can not be sent right away. The handler enters instead
-a receive loop waiting for the right message before it can send
-a response.</p></div>
-<div class="paragraph"><p>Loop handlers are used for requests where a response might not
-be immediately available, but where you would like to keep the
-connection open for a while in case the response arrives. The
-most known example of such practice is known as long polling.</p></div>
-<div class="paragraph"><p>Loop handlers can also be used for requests where a response is
-partially available and you need to stream the response body
-while the connection is open. The most known example of such
-practice is server-sent events.</p></div>
-<div class="paragraph"><p>While the same can be accomplished using plain HTTP handlers,
-it is recommended to use loop handlers because they are well-tested
-and allow using built-in features like hibernation and timeouts.</p></div>
-<div class="paragraph"><p>Loop handlers essentially wait for one or more Erlang messages
-and feed these messages to the <code>info/3</code> callback. It also features
-the <code>init/2</code> and <code>terminate/3</code> callbacks which work the same as
-for plain HTTP handlers.</p></div>
-<div class="sect1">
+<p>Loop handlers are a special kind of HTTP handlers used when the response can not be sent right away. The handler enters instead a receive loop waiting for the right message before it can send a response.</p>
+<p>Loop handlers are used for requests where a response might not be immediately available, but where you would like to keep the connection open for a while in case the response arrives. The most known example of such practice is known as long polling.</p>
+<p>Loop handlers can also be used for requests where a response is partially available and you need to stream the response body while the connection is open. The most known example of such practice is server-sent events.</p>
+<p>While the same can be accomplished using plain HTTP handlers, it is recommended to use loop handlers because they are well-tested and allow using built-in features like hibernation and timeouts.</p>
+<p>Loop handlers essentially wait for one or more Erlang messages and feed these messages to the <code>info/3</code> callback. It also features the <code>init/2</code> and <code>terminate/3</code> callbacks which work the same as for plain HTTP handlers.</p>
<h2 id="_initialization">Initialization</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <code>init/2</code> function must return a <code>cowboy_loop</code> tuple to enable
-loop handler behavior. This tuple may optionally contain
-a timeout value and/or the atom <code>hibernate</code> to make the
-process enter hibernation until a message is received.</p></div>
-<div class="paragraph"><p>This snippet enables the loop handler:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The <code>init/2</code> function must return a <code>cowboy_loop</code> tuple to enable loop handler behavior. This tuple may optionally contain a timeout value and/or the atom <code>hibernate</code> to make the process enter hibernation until a message is received.</p>
+<p>This snippet enables the loop handler:</p>
+<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">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_loop</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>This also makes the process hibernate:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">cowboy_loop</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>This also makes the process hibernate:</p>
+<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">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_loop</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>, <span style="color: #FF6600">hibernate</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">cowboy_loop</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>, <font color="#FF6600">hibernate</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_receive_loop">Receive loop</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Once initialized, Cowboy will wait for messages to arrive
-in the process' mailbox. When a message arrives, Cowboy
-calls the <code>info/3</code> function with the message, the Req object
-and the handler&#8217;s state.</p></div>
-<div class="paragraph"><p>The following snippet sends a reply when it receives a
-<code>reply</code> message from another process, or waits for another
-message otherwise.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Once initialized, Cowboy will wait for messages to arrive in the process&apos; mailbox. When a message arrives, Cowboy calls the <code>info/3</code> function with the message, the Req object and the handler&apos;s state.</p>
+<p>The following snippet sends a reply when it receives a <code>reply</code> message from another process, or waits for another message otherwise.</p>
+<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">info</span></span>({<span style="color: #FF6600">reply</span>, <span style="color: #009900">Body</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: #000000">cowboy_req:reply</span></span>(<span style="color: #993399">200</span>, #{}, <span style="color: #009900">Body</span>, <span style="color: #009900">Req</span>),
- {<span style="color: #FF6600">stop</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>};
-<span style="font-weight: bold"><span style="color: #000000">info</span></span>(<span style="color: #009900">_Msg</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>, <span style="color: #FF6600">hibernate</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Do note that the <code>reply</code> tuple here may be any message
-and is simply an example.</p></div>
-<div class="paragraph"><p>This callback may perform any necessary operation including
-sending all or parts of a reply, and will subsequently
-return a tuple indicating if more messages are to be expected.</p></div>
-<div class="paragraph"><p>The callback may also choose to do nothing at all and just
-skip the message received.</p></div>
-<div class="paragraph"><p>If a reply is sent, then the <code>stop</code> tuple should be returned.
-This will instruct Cowboy to end the request.</p></div>
-<div class="paragraph"><p>Otherwise an <code>ok</code> tuple should be returned.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">info</font></b>({<font color="#FF6600">reply</font>, <font color="#009900">Body</font>}, <font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#000000">cowboy_req:reply</font></b>(<font color="#993399">200</font>, #{}, <font color="#009900">Body</font>, <font color="#009900">Req</font>),
+ {<font color="#FF6600">stop</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>};
+<b><font color="#000000">info</font></b>(<font color="#009900">_Msg</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>, <font color="#FF6600">hibernate</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Do note that the <code>reply</code> tuple here may be any message and is simply an example.</p>
+<p>This callback may perform any necessary operation including sending all or parts of a reply, and will subsequently return a tuple indicating if more messages are to be expected.</p>
+<p>The callback may also choose to do nothing at all and just skip the message received.</p>
+<p>If a reply is sent, then the <code>stop</code> tuple should be returned. This will instruct Cowboy to end the request.</p>
+<p>Otherwise an <code>ok</code> tuple should be returned.</p>
<h2 id="_streaming_loop">Streaming loop</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Another common case well suited for loop handlers is
-streaming data received in the form of Erlang messages.
-This can be done by initiating a chunked reply in the
-<code>init/2</code> callback and then using <code>cowboy_req:chunk/2</code>
-every time a message is received.</p></div>
-<div class="paragraph"><p>The following snippet does exactly that. As you can see
-a chunk is sent every time an <code>event</code> message is received,
-and the loop is stopped by sending an <code>eof</code> message.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Another common case well suited for loop handlers is streaming data received in the form of Erlang messages. This can be done by initiating a chunked reply in the <code>init/2</code> callback and then using <code>cowboy_req:chunk/2</code> every time a message is received.</p>
+<p>The following snippet does exactly that. As you can see a chunk is sent every time an <code>event</code> message is received, and the loop is stopped by sending an <code>eof</code> message.</p>
+<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">init</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- <span style="color: #009900">Req2</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_reply</span></span>(<span style="color: #993399">200</span>, <span style="color: #009900">Req</span>),
- {<span style="color: #FF6600">cowboy_loop</span>, <span style="color: #009900">Req2</span>, <span style="color: #009900">State</span>}<span style="color: #990000">.</span>
-
-<span style="font-weight: bold"><span style="color: #000000">info</span></span>(<span style="color: #FF6600">eof</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">stop</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>};
-<span style="font-weight: bold"><span style="color: #000000">info</span></span>({<span style="color: #FF6600">event</span>, <span style="color: #009900">Data</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: #000000">cowboy_req:stream_body</span></span>(<span style="color: #009900">Data</span>, <span style="color: #FF6600">nofin</span>, <span style="color: #009900">Req</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">info</span></span>(<span style="color: #009900">_Msg</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">ok</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">
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ <font color="#009900">Req2</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:stream_reply</font></b>(<font color="#993399">200</font>, <font color="#009900">Req</font>),
+ {<font color="#FF6600">cowboy_loop</font>, <font color="#009900">Req2</font>, <font color="#009900">State</font>}<font color="#990000">.</font>
+
+<b><font color="#000000">info</font></b>(<font color="#FF6600">eof</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">stop</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>};
+<b><font color="#000000">info</font></b>({<font color="#FF6600">event</font>, <font color="#009900">Data</font>}, <font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#000000">cowboy_req:stream_body</font></b>(<font color="#009900">Data</font>, <font color="#FF6600">nofin</font>, <font color="#009900">Req</font>),
+ {<font color="#FF6600">ok</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>};
+<b><font color="#000000">info</font></b>(<font color="#009900">_Msg</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_cleaning_up">Cleaning up</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>It is recommended that you set the connection header to
-<code>close</code> when replying, as this process may be reused for
-a subsequent request.</p></div>
-<div class="paragraph"><p>Please refer to the <a href="../handlers">Handlers chapter</a>
-for general instructions about cleaning up.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>It is recommended that you set the connection header to <code>close</code> when replying, as this process may be reused for a subsequent request.</p>
+<p>Please refer to the <a href="../handlers">Handlers chapter</a> for general instructions about cleaning up.</p>
<h2 id="_hibernate">Hibernate</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>To save memory, you may hibernate the process in between
-messages received. This is done by returning the atom
-<code>hibernate</code> as part of the <code>loop</code> tuple callbacks normally
-return. Just add the atom at the end and Cowboy will hibernate
-accordingly.</p></div>
-</div>
-</div>
+<p>To save memory, you may hibernate the process in between messages received. This is done by returning the atom <code>hibernate</code> as part of the <code>loop</code> tuple callbacks normally return. Just add the atom at the end and Cowboy will hibernate accordingly.</p>
+
diff --git a/docs/en/cowboy/2.4/guide/middlewares/index.html b/docs/en/cowboy/2.4/guide/middlewares/index.html
index 094b0a66..4c1c2cd1 100644
--- a/docs/en/cowboy/2.4/guide/middlewares/index.html
+++ b/docs/en/cowboy/2.4/guide/middlewares/index.html
@@ -62,92 +62,38 @@
<h1 class="lined-header"><span>Middlewares</span></h1>
-<div class="paragraph"><p>Cowboy delegates the request processing to middleware components.
-By default, two middlewares are defined, for the routing and handling
-of the request, as is detailed in most of this guide.</p></div>
-<div class="paragraph"><p>Middlewares give you complete control over how requests are to be
-processed. You can add your own middlewares to the mix or completely
-change the chain of middlewares as needed.</p></div>
-<div class="paragraph"><p>Cowboy will execute all middlewares in the given order, unless one
-of them decides to stop processing.</p></div>
-<div class="sect1">
+<p>Cowboy delegates the request processing to middleware components. By default, two middlewares are defined, for the routing and handling of the request, as is detailed in most of this guide.</p>
+<p>Middlewares give you complete control over how requests are to be processed. You can add your own middlewares to the mix or completely change the chain of middlewares as needed.</p>
+<p>Cowboy will execute all middlewares in the given order, unless one of them decides to stop processing.</p>
<h2 id="_usage">Usage</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Middlewares only need to implement a single callback: <code>execute/2</code>.
-It is defined in the <code>cowboy_middleware</code> behavior.</p></div>
-<div class="paragraph"><p>This callback has two arguments. The first is the <code>Req</code> object.
-The second is the environment.</p></div>
-<div class="paragraph"><p>Middlewares can return one of three different values:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<code>{ok, Req, Env}</code> to continue the request processing
-</p>
+<p>Middlewares only need to implement a single callback: <code>execute/2</code>. It is defined in the <code>cowboy_middleware</code> behavior.</p>
+<p>This callback has two arguments. The first is the <code>Req</code> object. The second is the environment.</p>
+<p>Middlewares can return one of three different values:</p>
+<ul><li><code>{ok, Req, Env}</code> to continue the request processing
</li>
-<li>
-<p>
-<code>{suspend, Module, Function, Args}</code> to hibernate
-</p>
+<li><code>{suspend, Module, Function, Args}</code> to hibernate
</li>
-<li>
-<p>
-<code>{stop, Req}</code> to stop processing and move on to the next request
-</p>
+<li><code>{stop, Req}</code> to stop processing and move on to the next request
</li>
-</ul></div>
-<div class="paragraph"><p>Of note is that when hibernating, processing will resume on the given
-MFA, discarding all previous stacktrace. Make sure you keep the <code>Req</code>
-and <code>Env</code> in the arguments of this MFA for later use.</p></div>
-<div class="paragraph"><p>If an error happens during middleware processing, Cowboy will not try
-to send an error back to the socket, the process will just crash. It
-is up to the middleware to make sure that a reply is sent if something
-goes wrong.</p></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
+<p>Of note is that when hibernating, processing will resume on the given MFA, discarding all previous stacktrace. Make sure you keep the <code>Req</code> and <code>Env</code> in the arguments of this MFA for later use.</p>
+<p>If an error happens during middleware processing, Cowboy will not try to send an error back to the socket, the process will just crash. It is up to the middleware to make sure that a reply is sent if something goes wrong.</p>
<h2 id="_configuration">Configuration</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The middleware environment is defined as the <code>env</code> protocol option.
-In the previous chapters we saw it briefly when we needed to pass
-the routing information. It is a list of tuples with the first
-element being an atom and the second any Erlang term.</p></div>
-<div class="paragraph"><p>Two values in the environment are reserved:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<code>listener</code> contains the name of the listener
-</p>
+<p>The middleware environment is defined as the <code>env</code> protocol option. In the previous chapters we saw it briefly when we needed to pass the routing information. It is a list of tuples with the first element being an atom and the second any Erlang term.</p>
+<p>Two values in the environment are reserved:</p>
+<ul><li><code>listener</code> contains the name of the listener
</li>
-<li>
-<p>
-<code>result</code> contains the result of the processing
-</p>
+<li><code>result</code> contains the result of the processing
</li>
-</ul></div>
-<div class="paragraph"><p>The <code>listener</code> value is always defined. The <code>result</code> value can be
-set by any middleware. If set to anything other than <code>ok</code>, Cowboy
-will not process any subsequent requests on this connection.</p></div>
-<div class="paragraph"><p>The middlewares that come with Cowboy may define or require other
-environment values to perform.</p></div>
-<div class="paragraph"><p>You can update the environment by calling the <code>cowboy:set_env/3</code>
-convenience function, adding or replacing a value in the environment.</p></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
+<p>The <code>listener</code> value is always defined. The <code>result</code> value can be set by any middleware. If set to anything other than <code>ok</code>, Cowboy will not process any subsequent requests on this connection.</p>
+<p>The middlewares that come with Cowboy may define or require other environment values to perform.</p>
+<p>You can update the environment by calling the <code>cowboy:set_env/3</code> convenience function, adding or replacing a value in the environment.</p>
<h2 id="_routing_middleware">Routing middleware</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The routing middleware requires the <code>dispatch</code> value. If routing
-succeeds, it will put the handler name and options in the <code>handler</code>
-and <code>handler_opts</code> values of the environment, respectively.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The routing middleware requires the <code>dispatch</code> value. If routing succeeds, it will put the handler name and options in the <code>handler</code> and <code>handler_opts</code> values of the environment, respectively.</p>
<h2 id="_handler_middleware">Handler middleware</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The handler middleware requires the <code>handler</code> and <code>handler_opts</code>
-values. It puts the result of the request handling into <code>result</code>.</p></div>
-</div>
-</div>
+<p>The handler middleware requires the <code>handler</code> and <code>handler_opts</code> values. It puts the result of the request handling into <code>result</code>.</p>
+
diff --git a/docs/en/cowboy/2.4/guide/migrating_from_1.0/index.html b/docs/en/cowboy/2.4/guide/migrating_from_1.0/index.html
index 275ca51c..8acb1595 100644
--- a/docs/en/cowboy/2.4/guide/migrating_from_1.0/index.html
+++ b/docs/en/cowboy/2.4/guide/migrating_from_1.0/index.html
@@ -62,388 +62,120 @@
<h1 class="lined-header"><span>Migrating from Cowboy 1.0 to 2.0</span></h1>
-<div class="paragraph"><p>A lot has changed between Cowboy 1.0 and 2.0. The <code>cowboy_req</code>
-interface in particular has seen a massive revamp. Hooks are
-gone, their functionality can now be achieved via stream
-handlers.</p></div>
-<div class="paragraph"><p>The documentation has seen great work, in particular the
-manual. Each module and each function now has its own dedicated
-manual page with full details and examples.</p></div>
-<div class="sect1">
+<p>A lot has changed between Cowboy 1.0 and 2.0. The <code>cowboy_req</code> interface in particular has seen a massive revamp. Hooks are gone, their functionality can now be achieved via stream handlers.</p>
+<p>The documentation has seen great work, in particular the manual. Each module and each function now has its own dedicated manual page with full details and examples.</p>
<h2 id="_compatibility">Compatibility</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Compatibility with Erlang/OTP R16, 17 and 18 has been dropped.
-Erlang/OTP 19.0 or above is required. It is non-trivial to
-make Cowboy 2.0 work with older Erlang/OTP versions.</p></div>
-<div class="paragraph"><p>Cowboy 2.0 is not compatible with Cowlib versions older than
-2.0. It should be compatible with Ranch 1.0 or above, however
-it has not been tested with Ranch versions older than 1.4.</p></div>
-<div class="paragraph"><p>Cowboy 2.0 is tested on Arch Linux, Ubuntu, FreeBSD, Windows
-and OSX. It is tested with every point release (latest patch
-release) and also with HiPE on the most recent release.</p></div>
-<div class="paragraph"><p>Cowboy 2.0 now comes with Erlang.mk templates.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Compatibility with Erlang/OTP R16, 17 and 18 has been dropped. Erlang/OTP 19.0 or above is required. It is non-trivial to make Cowboy 2.0 work with older Erlang/OTP versions.</p>
+<p>Cowboy 2.0 is not compatible with Cowlib versions older than 2.0. It should be compatible with Ranch 1.0 or above, however it has not been tested with Ranch versions older than 1.4.</p>
+<p>Cowboy 2.0 is tested on Arch Linux, Ubuntu, FreeBSD, Windows and OSX. It is tested with every point release (latest patch release) and also with HiPE on the most recent release.</p>
+<p>Cowboy 2.0 now comes with Erlang.mk templates.</p>
<h2 id="_features_added">Features added</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-The HTTP/2 protocol is now supported.
-</p>
-</li>
-<li>
-<p>
-Cowboy no longer uses only one process per connection.
- It now uses one process per connection plus one process
- per request by default. This is necessary for HTTP/2.
- There might be a slight drop in performance for HTTP/1.1
- connections due to this change.
-</p>
-</li>
-<li>
-<p>
-Cowboy internals have largely been reworked in order to
- support HTTP/2. This opened the way to stream handlers,
- which are a chain of modules that are called whenever
- something happens relating to a request/response.
-</p>
-</li>
-<li>
-<p>
-The <code>cowboy_stream_h</code> stream handler has been added.
- It provides most of Cowboy&#8217;s default behavior.
-</p>
-</li>
-<li>
-<p>
-The <code>cowboy_compress_h</code> stream handler has been added.
- It compresses responses when possible. It&#8217;s worth noting
- that it compresses in more cases than Cowboy 1.0 ever did.
-</p>
-</li>
-<li>
-<p>
-Because of the many changes in the internals of Cowboy,
- many options have been added or modified. Of note is that
- the Websocket options are now given per handler rather
- than for the entire listener.
-</p>
-</li>
-<li>
-<p>
-Websocket permessage-deflate compression is now supported
- via the <code>compress</code> option.
-</p>
-</li>
-<li>
-<p>
-Static file handlers will now correctly find files found
- in <em>.ez</em> archives.
-</p>
-</li>
-<li>
-<p>
-Constraints have been generalized and are now used not only
- in the router but also in some <code>cowboy_req</code> functions. Their
- interface has also been modified to allow for reverse
- operations and formatting of errors.
-</p>
-</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+<ul><li>The HTTP/2 protocol is now supported.
+</li>
+<li>Cowboy no longer uses only one process per connection. It now uses one process per connection plus one process per request by default. This is necessary for HTTP/2. There might be a slight drop in performance for HTTP/1.1 connections due to this change.
+</li>
+<li>Cowboy internals have largely been reworked in order to support HTTP/2. This opened the way to stream handlers, which are a chain of modules that are called whenever something happens relating to a request/response.
+</li>
+<li>The <code>cowboy_stream_h</code> stream handler has been added. It provides most of Cowboy&apos;s default behavior.
+</li>
+<li>The <code>cowboy_compress_h</code> stream handler has been added. It compresses responses when possible. It&apos;s worth noting that it compresses in more cases than Cowboy 1.0 ever did.
+</li>
+<li>Because of the many changes in the internals of Cowboy, many options have been added or modified. Of note is that the Websocket options are now given per handler rather than for the entire listener.
+</li>
+<li>Websocket permessage-deflate compression is now supported via the <code>compress</code> option.
+</li>
+<li>Static file handlers will now correctly find files found in <em>.ez</em> archives.
+</li>
+<li>Constraints have been generalized and are now used not only in the router but also in some <code>cowboy_req</code> functions. Their interface has also been modified to allow for reverse operations and formatting of errors.
+</li>
+</ul>
<h2 id="_features_removed">Features removed</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-SPDY support has been removed. Use HTTP/2 instead.
-</p>
-</li>
-<li>
-<p>
-Hooks have been removed. Use <a href="../streams">stream handlers</a> instead.
-</p>
-</li>
-<li>
-<p>
-The undocumented <code>waiting_stream</code> hack has been removed.
- It allowed disabling chunked transfer-encoding for HTTP/1.1.
- It has no equivalent in Cowboy 2.0. Open a ticket if necessary.
-</p>
-</li>
-<li>
-<p>
-Sub protocols still exist, but their interface has largely changed
- and they are no longer documented for the time being.
-</p>
-</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+<ul><li>SPDY support has been removed. Use HTTP/2 instead.
+</li>
+<li>Hooks have been removed. Use <a href="../streams">stream handlers</a> instead.
+</li>
+<li>The undocumented <code>waiting_stream</code> hack has been removed. It allowed disabling chunked transfer-encoding for HTTP/1.1. It has no equivalent in Cowboy 2.0. Open a ticket if necessary.
+</li>
+<li>Sub protocols still exist, but their interface has largely changed and they are no longer documented for the time being.
+</li>
+</ul>
<h2 id="_changed_behaviors">Changed behaviors</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-The handler behaviors have been renamed and are now <code>cowboy_handler</code>,
- <code>cowboy_loop</code>, <code>cowboy_rest</code> and <code>cowboy_websocket</code>.
-</p>
-</li>
-<li>
-<p>
-Plain HTTP, loop, REST and Websocket handlers have had their
- init and terminate callbacks unified. They now all use the
- <code>init/2</code> and <code>terminate/3</code> callbacks. The latter is now optional.
- The terminate reason has now been documented for all handlers.
-</p>
-</li>
-<li>
-<p>
-The tuple returned to switch to a different handler type has
- changed. It now takes the form <code>{Module, Req, State}</code> or
- <code>{Module, Req, State, Opts}</code>, where <code>Opts</code> is a map of options
- to configure the handler. The timeout and hibernate options
- must now be specified using this map, where applicable.
-</p>
-</li>
-<li>
-<p>
-All behaviors that used to accept <code>halt</code> or <code>shutdown</code> tuples
- as a return value no longer do so. The return value is now
- a <code>stop</code> tuple, consistent across Cowboy.
-</p>
-</li>
-<li>
-<p>
-Middlewares can no longer return an <code>error</code> tuple. They have
- to send the response and return a <code>stop</code> tuple instead.
-</p>
-</li>
-<li>
-<p>
-The <code>known_content_type</code> REST handler callback has been removed
- as it was found unnecessary.
-</p>
-</li>
-<li>
-<p>
-Websocket handlers have both the normal <code>init/2</code> and
- an optional <code>websocket_init/1</code> function. The reason for
- that exception is that the <code>websocket_*</code> callbacks execute
- in a separate process from the <code>init/2</code> callback, and it
- was therefore not obvious how timers or monitors should
- be setup properly. They are effectively initializing the
- handler before and after the HTTP/1.1 upgrade.
-</p>
-</li>
-<li>
-<p>
-Websocket handlers can now send frames directly from
- <code>websocket_init/1</code>. The frames will be sent immediately
- after the handshake.
-</p>
-</li>
-<li>
-<p>
-Websocket handler callbacks no longer receive the Req
- argument. The <code>init/2</code> callback still receives it and
- can be used to extract relevant information. The <code>terminate/3</code>
- callback, if implemented, may still receive the Req
- (see next bullet point).
-</p>
-</li>
-<li>
-<p>
-Websocket handlers have a new <code>req_filter</code> option that
- can be used to customize how much information should be
- discarded from the Req object after the handshake. Note
- that the Req object is only available in <code>terminate/3</code>
- past that point.
-</p>
-</li>
-<li>
-<p>
-Websocket handlers have their timeout default changed
- from infinity to 60 seconds.
-</p>
-</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+<ul><li>The handler behaviors have been renamed and are now <code>cowboy_handler</code>, <code>cowboy_loop</code>, <code>cowboy_rest</code> and <code>cowboy_websocket</code>.
+</li>
+<li>Plain HTTP, loop, REST and Websocket handlers have had their init and terminate callbacks unified. They now all use the <code>init/2</code> and <code>terminate/3</code> callbacks. The latter is now optional. The terminate reason has now been documented for all handlers.
+</li>
+<li>The tuple returned to switch to a different handler type has changed. It now takes the form <code>{Module, Req, State}</code> or <code>{Module, Req, State, Opts}</code>, where <code>Opts</code> is a map of options to configure the handler. The timeout and hibernate options must now be specified using this map, where applicable.
+</li>
+<li>All behaviors that used to accept <code>halt</code> or <code>shutdown</code> tuples as a return value no longer do so. The return value is now a <code>stop</code> tuple, consistent across Cowboy.
+</li>
+<li>Middlewares can no longer return an <code>error</code> tuple. They have to send the response and return a <code>stop</code> tuple instead.
+</li>
+<li>The <code>known_content_type</code> REST handler callback has been removed as it was found unnecessary.
+</li>
+<li>Websocket handlers have both the normal <code>init/2</code> and an optional <code>websocket_init/1</code> function. The reason for that exception is that the <code>websocket_*</code> callbacks execute in a separate process from the <code>init/2</code> callback, and it was therefore not obvious how timers or monitors should be setup properly. They are effectively initializing the handler before and after the HTTP/1.1 upgrade.
+</li>
+<li>Websocket handlers can now send frames directly from <code>websocket_init/1</code>. The frames will be sent immediately after the handshake.
+</li>
+<li>Websocket handler callbacks no longer receive the Req argument. The <code>init/2</code> callback still receives it and can be used to extract relevant information. The <code>terminate/3</code> callback, if implemented, may still receive the Req (see next bullet point).
+</li>
+<li>Websocket handlers have a new <code>req_filter</code> option that can be used to customize how much information should be discarded from the Req object after the handshake. Note that the Req object is only available in <code>terminate/3</code> past that point.
+</li>
+<li>Websocket handlers have their timeout default changed from infinity to 60 seconds.
+</li>
+</ul>
<h2 id="_new_functions">New functions</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-The <code>cowboy_req:scheme/1</code> function has been added.
-</p>
-</li>
-<li>
-<p>
-The <code>cowboy_req:uri/1,2</code> function has been added, replacing the
- less powerful functions <code>cowboy_req:url/1</code> and <code>cowboy_req:host_url/1</code>.
-</p>
-</li>
-<li>
-<p>
-The functions <code>cowboy_req:match_qs/2</code> and <code>cowboy_req:match_cookies/2</code>
- allow matching query string and cookies against constraints.
-</p>
-</li>
-<li>
-<p>
-The function <code>cowboy_req:set_resp_cookie/3</code> has been added to
- complement <code>cowboy_req:set_resp_cookie/4</code>.
-</p>
-</li>
-<li>
-<p>
-The functions <code>cowboy_req:resp_header/2,3</code> and <code>cowboy_req:resp_headers/1</code>
- have been added. They can be used to retrieve response headers
- that were previously set.
-</p>
-</li>
-<li>
-<p>
-The function <code>cowboy_req:set_resp_headers/2</code> has been added. It
- allows setting many response headers at once.
-</p>
-</li>
-<li>
-<p>
-The functions <code>cowboy_req:push/3,4</code> can be used to push resources
- for protocols that support it (by default only HTTP/2).
-</p>
-</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+<ul><li>The <code>cowboy_req:scheme/1</code> function has been added.
+</li>
+<li>The <code>cowboy_req:uri/1,2</code> function has been added, replacing the less powerful functions <code>cowboy_req:url/1</code> and <code>cowboy_req:host_url/1</code>.
+</li>
+<li>The functions <code>cowboy_req:match_qs/2</code> and <code>cowboy_req:match_cookies/2</code> allow matching query string and cookies against constraints.
+</li>
+<li>The function <code>cowboy_req:set_resp_cookie/3</code> has been added to complement <code>cowboy_req:set_resp_cookie/4</code>.
+</li>
+<li>The functions <code>cowboy_req:resp_header/2,3</code> and <code>cowboy_req:resp_headers/1</code> have been added. They can be used to retrieve response headers that were previously set.
+</li>
+<li>The function <code>cowboy_req:set_resp_headers/2</code> has been added. It allows setting many response headers at once.
+</li>
+<li>The functions <code>cowboy_req:push/3,4</code> can be used to push resources for protocols that support it (by default only HTTP/2).
+</li>
+</ul>
<h2 id="_changed_functions">Changed functions</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-The <code>cowboy:start_http/4</code> function was renamed to <code>cowboy:start_clear/3</code>.
-</p>
-</li>
-<li>
-<p>
-The <code>cowboy:start_https/4</code> function was renamed to <code>cowboy:start_tls/3</code>.
-</p>
-</li>
-<li>
-<p>
-Most, if not all, functions in the <code>cowboy_req</code> module have been modified.
- Please consult the changelog of each individual functions. The changes
- are mainly about simplifying and clarifying the interface. The Req is no
- longer returned when not necessary, maps are used wherever possible,
- and some functions have been renamed.
-</p>
-</li>
-<li>
-<p>
-The position of the <code>Opts</code> argument for <code>cowboy_req:set_resp_cookie/4</code>
- has changed to improve consistency. It is now the last argument.
-</p>
-</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+<ul><li>The <code>cowboy:start_http/4</code> function was renamed to <code>cowboy:start_clear/3</code>.
+</li>
+<li>The <code>cowboy:start_https/4</code> function was renamed to <code>cowboy:start_tls/3</code>.
+</li>
+<li>Most, if not all, functions in the <code>cowboy_req</code> module have been modified. Please consult the changelog of each individual functions. The changes are mainly about simplifying and clarifying the interface. The Req is no longer returned when not necessary, maps are used wherever possible, and some functions have been renamed.
+</li>
+<li>The position of the <code>Opts</code> argument for <code>cowboy_req:set_resp_cookie/4</code> has changed to improve consistency. It is now the last argument.
+</li>
+</ul>
<h2 id="_removed_functions">Removed functions</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-The functions <code>cowboy_req:url/1</code> and <code>cowboy_req:host_url/1</code> have been
- removed in favor of the new function <code>cowboy_req:uri/1,2</code>.
-</p>
-</li>
-<li>
-<p>
-The functions <code>cowboy_req:meta/2,3</code> and <code>cowboy_req:set_meta/3</code> have
- been removed. The Req object is now a public map, therefore they became
- unnecessary.
-</p>
-</li>
-<li>
-<p>
-The functions <code>cowboy_req:set_resp_body_fun/2,3</code> have been removed.
- For sending files, the function <code>cowboy_req:set_resp_body/2</code> can now
- take a sendfile tuple.
-</p>
-</li>
-<li>
-<p>
-Remove many undocumented functions from <code>cowboy_req</code>, including the
- functions <code>cowboy_req:get/2</code> and <code>cowboy_req:set/3</code>.
-</p>
-</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+<ul><li>The functions <code>cowboy_req:url/1</code> and <code>cowboy_req:host_url/1</code> have been removed in favor of the new function <code>cowboy_req:uri/1,2</code>.
+</li>
+<li>The functions <code>cowboy_req:meta/2,3</code> and <code>cowboy_req:set_meta/3</code> have been removed. The Req object is now a public map, therefore they became unnecessary.
+</li>
+<li>The functions <code>cowboy_req:set_resp_body_fun/2,3</code> have been removed. For sending files, the function <code>cowboy_req:set_resp_body/2</code> can now take a sendfile tuple.
+</li>
+<li>Remove many undocumented functions from <code>cowboy_req</code>, including the functions <code>cowboy_req:get/2</code> and <code>cowboy_req:set/3</code>.
+</li>
+</ul>
<h2 id="_other_changes">Other changes</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-The correct percent-decoding algorithm is now used for path elements
- during routing. It will no longer decode <code>+</code> characters.
-</p>
-</li>
-<li>
-<p>
-The router will now properly handle path segments <code>.</code> and <code>..</code>.
-</p>
-</li>
-<li>
-<p>
-Routing behavior has changed for URIs containing latin1 characters.
- They are no longer allowed. URIs are expected to be in UTF-8 once
- they are percent-decoded.
-</p>
-</li>
-<li>
-<p>
-Clients that send multiple headers of the same name
- will have the values of those headers concatenated into a
- comma-separated list. This is of special importance in the
- case of the content-type header, as previously only the
- first value was used in the <code>content_types_accepted/2</code> step
- in REST handlers.
-</p>
-</li>
-<li>
-<p>
-Etag comparison in REST handlers has been fixed. Some requests may
- now fail when they succeeded in the past.
-</p>
-</li>
-<li>
-<p>
-The <code>If-*-Since</code> headers are now ignored in REST handlers if
- the corresponding <code>If*-Match</code> header exist. The former is
- largely a backward compatible header and this shouldn&#8217;t create
- any issue. The new behavior follows the current RFCs more closely.
-</p>
-</li>
-<li>
-<p>
-The static file handler has been improved to handle more special
- characters on systems that accept them.
-</p>
-</li>
-</ul></div>
-</div>
-</div>
+<ul><li>The correct percent-decoding algorithm is now used for path elements during routing. It will no longer decode <code>+</code> characters.
+</li>
+<li>The router will now properly handle path segments <code>.</code> and <code>..</code>.
+</li>
+<li>Routing behavior has changed for URIs containing latin1 characters. They are no longer allowed. URIs are expected to be in UTF-8 once they are percent-decoded.
+</li>
+<li>Clients that send multiple headers of the same name will have the values of those headers concatenated into a comma-separated list. This is of special importance in the case of the content-type header, as previously only the first value was used in the <code>content_types_accepted/2</code> step in REST handlers.
+</li>
+<li>Etag comparison in REST handlers has been fixed. Some requests may now fail when they succeeded in the past.
+</li>
+<li>The <code>If-*-Since</code> headers are now ignored in REST handlers if the corresponding <code>If*-Match</code> header exist. The former is largely a backward compatible header and this shouldn&apos;t create any issue. The new behavior follows the current RFCs more closely.
+</li>
+<li>The static file handler has been improved to handle more special characters on systems that accept them.
+</li>
+</ul>
+
diff --git a/docs/en/cowboy/2.4/guide/migrating_from_2.0/index.html b/docs/en/cowboy/2.4/guide/migrating_from_2.0/index.html
index 7be09358..d5a9767f 100644
--- a/docs/en/cowboy/2.4/guide/migrating_from_2.0/index.html
+++ b/docs/en/cowboy/2.4/guide/migrating_from_2.0/index.html
@@ -62,188 +62,55 @@
<h1 class="lined-header"><span>Migrating from Cowboy 2.0 to 2.1</span></h1>
-<div class="paragraph"><p>Cowboy 2.1 focused on adding features that were temporarily
-removed in Cowboy 2.0. A number of bugs found in the 2.0
-release were also fixed.</p></div>
-<div class="sect1">
+<p>Cowboy 2.1 focused on adding features that were temporarily removed in Cowboy 2.0. A number of bugs found in the 2.0 release were also fixed.</p>
<h2 id="_features_added">Features added</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-It is now possible to obtain the client TLS certificate
- and the local IP/port for the connection from the Req object.
-</p>
+<ul><li>It is now possible to obtain the client TLS certificate and the local IP/port for the connection from the Req object.
</li>
-<li>
-<p>
-Informational responses (1XX responses) can now be sent.
- They must be sent before initiating the final response.
-</p>
+<li>Informational responses (1XX responses) can now be sent. They must be sent before initiating the final response.
</li>
-<li>
-<p>
-The <code>expect: 100-continue</code> header is now handled
- automatically. The 100 response will be sent on the
- first <code>cowboy_req:read_body/2,3,4</code> call. This only applies
- when using the default <code>cowboy_stream_h</code> stream handler.
-</p>
+<li>The <code>expect: 100-continue</code> header is now handled automatically. The 100 response will be sent on the first <code>cowboy_req:read_body/2,3,4</code> call. This only applies when using the default <code>cowboy_stream_h</code> stream handler.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_experimental_features_added">Experimental features added</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Experimental features are previews of features that will be
-added in a future release. They are not documented and their
-interface may change at any time. You are welcome to try them
-and provide feedback.</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-The <code>cowboy_metrics_h</code> stream handler can be used to
- extract metrics out of Cowboy. It must be used first in
- the list of stream handlers, and will record all events
- related to requests, responses and spawned processes.
- When the stream terminates it will pass this information
- to a user-defined callback.
-</p>
+<p>Experimental features are previews of features that will be added in a future release. They are not documented and their interface may change at any time. You are welcome to try them and provide feedback.</p>
+<ul><li>The <code>cowboy_metrics_h</code> stream handler can be used to extract metrics out of Cowboy. It must be used first in the list of stream handlers, and will record all events related to requests, responses and spawned processes. When the stream terminates it will pass this information to a user-defined callback.
</li>
-<li>
-<p>
-The <code>cowboy_tracer_h</code> stream handler can be used to setup
- automatic tracing of specific requests. You can conditionally
- enable tracing based on a function, header, path or any other
- element from the request and the trace will apply to the
- entire connection and any processes created by it. This is
- meant to be used for debugging both in tests and production.
-</p>
+<li>The <code>cowboy_tracer_h</code> stream handler can be used to setup automatic tracing of specific requests. You can conditionally enable tracing based on a function, header, path or any other element from the request and the trace will apply to the entire connection and any processes created by it. This is meant to be used for debugging both in tests and production.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_changed_behaviors">Changed behaviors</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-The <code>cowboy_rest</code> handler now implements a mechanism for
- switching to a different type of handler from any callback
- where <code>stop</code> is also allowed. Switch by returning
- <code>{switch_handler, Module}</code> or <code>{switch_handler, Module, Opts}</code>.
- This is especially useful for switching to <code>cowboy_loop</code>
- for streaming the request or response body.
-</p>
+<ul><li>The <code>cowboy_rest</code> handler now implements a mechanism for switching to a different type of handler from any callback where <code>stop</code> is also allowed. Switch by returning <code>{switch_handler, Module}</code> or <code>{switch_handler, Module, Opts}</code>. This is especially useful for switching to <code>cowboy_loop</code> for streaming the request or response body.
</li>
-<li>
-<p>
-REST callbacks that do not allow <code>stop</code> as a return value
- are now explicitly listed in the documentation.
-</p>
+<li>REST callbacks that do not allow <code>stop</code> as a return value are now explicitly listed in the documentation.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_new_functions">New functions</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-The function <code>cowboy_req:sock/1</code> returns the IP/port
- of the local socket.
-</p>
+<ul><li>The function <code>cowboy_req:sock/1</code> returns the IP/port of the local socket.
</li>
-<li>
-<p>
-The function <code>cowboy_req:cert/1</code> returns the client
- TLS certificate or <code>undefined</code> if it isn&#8217;t available.
-</p>
+<li>The function <code>cowboy_req:cert/1</code> returns the client TLS certificate or <code>undefined</code> if it isn&apos;t available.
</li>
-<li>
-<p>
-The function <code>cowboy_req:inform/2,3</code> sends an
- informational response.
-</p>
+<li>The function <code>cowboy_req:inform/2,3</code> sends an informational response.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_bugs_fixed">Bugs fixed</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-Ensure HTTP/2 connections are not closed prematurely
- when the user code does not read the request body.
-</p>
+<ul><li>Ensure HTTP/2 connections are not closed prematurely when the user code does not read the request body.
</li>
-<li>
-<p>
-Ensure HTTP/1.1 streams are not terminated too early.
- Their behavior is now consistent with the HTTP/2 code
- where the stream handler is only terminated when the
- <code>stop</code> command is returned.
-</p>
+<li>Ensure HTTP/1.1 streams are not terminated too early. Their behavior is now consistent with the HTTP/2 code where the stream handler is only terminated when the <code>stop</code> command is returned.
</li>
-<li>
-<p>
-Sending zero-sized data from stream handlers or from
- <code>cowboy_req:stream_body/3</code> could lead to issues with
- HTTP/1.1. This has been fixed.
-</p>
+<li>Sending zero-sized data from stream handlers or from <code>cowboy_req:stream_body/3</code> could lead to issues with HTTP/1.1. This has been fixed.
</li>
-<li>
-<p>
-The final chunk sent by Cowboy when it terminates a
- chunked body after the handler process exits was not
- passed through stream handlers, which could lead to
- issues when <code>cowboy_compress_h</code> was being used. This
- is now corrected.
-</p>
+<li>The final chunk sent by Cowboy when it terminates a chunked body after the handler process exits was not passed through stream handlers, which could lead to issues when <code>cowboy_compress_h</code> was being used. This is now corrected.
</li>
-<li>
-<p>
-The stream handler state was discarded in some cases
- where Cowboy had to send a response or response data
- automatically when ending a stream. This has now
- been corrected.
-</p>
+<li>The stream handler state was discarded in some cases where Cowboy had to send a response or response data automatically when ending a stream. This has now been corrected.
</li>
-<li>
-<p>
-The stream handler callback <code>terminate/3</code> will now be
- called when switching to another protocol using the
- command <code>switch_protocol</code>. This doesn&#8217;t apply when
- doing upgrades to HTTP/2 as those occur before the
- stream is initialized.
-</p>
+<li>The stream handler callback <code>terminate/3</code> will now be called when switching to another protocol using the command <code>switch_protocol</code>. This doesn&apos;t apply when doing upgrades to HTTP/2 as those occur before the stream is initialized.
</li>
-<li>
-<p>
-Cowlib has been updated to 2.0.1 to fix an issue with
- Websocket compression when using Erlang/OTP 20.1. Note
- that at the time of writing all 20.1 versions (from
- 20.1 to 20.1.4) have issues when compression is enabled.
- It is expected to work properly from 20.1.5 onward. In
- the meantime it is recommended to run the plain 20.1
- release and disable Websocket compression, or use a
- release before 20.1.
-</p>
+<li>Cowlib has been updated to 2.0.1 to fix an issue with Websocket compression when using Erlang/OTP 20.1. Note that at the time of writing all 20.1 versions (from 20.1 to 20.1.4) have issues when compression is enabled. It is expected to work properly from 20.1.5 onward. In the meantime it is recommended to run the plain 20.1 release and disable Websocket compression, or use a release before 20.1.
</li>
-<li>
-<p>
-Cowboy will no longer crash when the <code>cowboy_clock</code>
- process is not running. This can happen when Cowboy
- is being restarted during upgrades, for example.
-</p>
+<li>Cowboy will no longer crash when the <code>cowboy_clock</code> process is not running. This can happen when Cowboy is being restarted during upgrades, for example.
</li>
-</ul></div>
-</div>
-</div>
+</ul>
+
diff --git a/docs/en/cowboy/2.4/guide/migrating_from_2.1/index.html b/docs/en/cowboy/2.4/guide/migrating_from_2.1/index.html
index f9afc1c1..5ed0a8f8 100644
--- a/docs/en/cowboy/2.4/guide/migrating_from_2.1/index.html
+++ b/docs/en/cowboy/2.4/guide/migrating_from_2.1/index.html
@@ -62,203 +62,66 @@
<h1 class="lined-header"><span>Migrating from Cowboy 2.1 to 2.2</span></h1>
-<div class="paragraph"><p>Cowboy 2.2 focused on adding features required for writing
-gRPC servers and on completing test suites for the core
-HTTP RFCs, fixing many bugs along the way.</p></div>
-<div class="sect1">
+<p>Cowboy 2.2 focused on adding features required for writing gRPC servers and on completing test suites for the core HTTP RFCs, fixing many bugs along the way.</p>
<h2 id="_features_added">Features added</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-Add support for sending trailers at the end of response bodies.
- Trailers are additional header fields that may be sent after the
- body to add more information to the response. Their usage is
- required in gRPC servers. They are optional and may be discarded
- in other scenarios (for example if the request goes through an
- HTTP/1.0 proxy, as HTTP/1.0 does not support trailers).
-</p>
+<ul><li>Add support for sending trailers at the end of response bodies. Trailers are additional header fields that may be sent after the body to add more information to the response. Their usage is required in gRPC servers. They are optional and may be discarded in other scenarios (for example if the request goes through an HTTP/1.0 proxy, as HTTP/1.0 does not support trailers).
</li>
-<li>
-<p>
-The <code>max_skip_body_length</code> option was added to <code>cowboy_http</code>.
- It controls how much of a request body Cowboy is willing to skip
- when the handler did not touch it. If the remaining body size is
- too large Cowboy instead closes the connection. It defaults to 1MB.
-</p>
+<li>The <code>max_skip_body_length</code> option was added to <code>cowboy_http</code>. It controls how much of a request body Cowboy is willing to skip when the handler did not touch it. If the remaining body size is too large Cowboy instead closes the connection. It defaults to 1MB.
</li>
-<li>
-<p>
-The CONNECT and TRACE methods are now rejected as they are
- currently not implemented and must be handled differently than
- other methods. They will be implemented in a future release.
-</p>
+<li>The CONNECT and TRACE methods are now rejected as they are currently not implemented and must be handled differently than other methods. They will be implemented in a future release.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_new_functions">New functions</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-The function <code>stream_trailers/2</code> has been added. It terminates
- a stream and adds trailer fields at the end of the response. A
- corresponding stream handler command <code>{trailers, Trailers}</code>
- has also been added.
-</p>
+<ul><li>The function <code>stream_trailers/2</code> has been added. It terminates a stream and adds trailer fields at the end of the response. A corresponding stream handler command <code>{trailers, Trailers}</code> has also been added.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_bugs_fixed">Bugs fixed</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-Test suites for the core HTTP RFCs RFC7230, RFC7231 and RFC7540
- have been completed. Many of the bugs listed here were fixed as
- a result of this work.
-</p>
+<ul><li>Test suites for the core HTTP RFCs RFC7230, RFC7231 and RFC7540 have been completed. Many of the bugs listed here were fixed as a result of this work.
</li>
-<li>
-<p>
-Many HTTP/2 edge cases when clients are misbehaving have been
- corrected. This includes many cases where the request is malformed
- (for example when a pseudo-header is present twice).
-</p>
+<li>Many HTTP/2 edge cases when clients are misbehaving have been corrected. This includes many cases where the request is malformed (for example when a pseudo-header is present twice).
</li>
-<li>
-<p>
-When the HTTP/2 SETTINGS_INITIAL_WINDOW_SIZE value changes,
- Cowboy now properly updates the flow control windows.
-</p>
+<li>When the HTTP/2 SETTINGS_INITIAL_WINDOW_SIZE value changes, Cowboy now properly updates the flow control windows.
</li>
-<li>
-<p>
-HTTP/2 could mistakenly log stray messages that actually were
- expected. This is no longer the case.
-</p>
+<li>HTTP/2 could mistakenly log stray messages that actually were expected. This is no longer the case.
</li>
-<li>
-<p>
-We no longer send a GOAWAY frame when the HTTP/2 preface is invalid.
-</p>
+<li>We no longer send a GOAWAY frame when the HTTP/2 preface is invalid.
</li>
-<li>
-<p>
-Some values in the Req object of pushed requests were in the
- wrong type. They are now the expected binary instead of iolist.
-</p>
+<li>Some values in the Req object of pushed requests were in the wrong type. They are now the expected binary instead of iolist.
</li>
-<li>
-<p>
-A response body was sometimes sent in response to HEAD requests
- when using HTTP/2. The body is now ignored.
-</p>
+<li>A response body was sometimes sent in response to HEAD requests when using HTTP/2. The body is now ignored.
</li>
-<li>
-<p>
-The <code>max_headers</code> option for <code>cowboy_http</code> was not always respected
- depending on the contents of the buffer. The limit is now strict.
-</p>
+<li>The <code>max_headers</code> option for <code>cowboy_http</code> was not always respected depending on the contents of the buffer. The limit is now strict.
</li>
-<li>
-<p>
-When an early error occurred on the HTTP/1.1 request line, the
- partial Req given to stream handlers was missing the <code>ref</code> and
- <code>peer</code> information. This has been corrected.
-</p>
+<li>When an early error occurred on the HTTP/1.1 request line, the partial Req given to stream handlers was missing the <code>ref</code> and <code>peer</code> information. This has been corrected.
</li>
-<li>
-<p>
-Absolute URIs with a userinfo component, or without an authority
- component, are now properly rejected for HTTP/1.0 and HTTP/1.1.
-</p>
+<li>Absolute URIs with a userinfo component, or without an authority component, are now properly rejected for HTTP/1.0 and HTTP/1.1.
</li>
-<li>
-<p>
-Whitespace is no longer allowed in header lines before the colon.
-</p>
+<li>Whitespace is no longer allowed in header lines before the colon.
</li>
-<li>
-<p>
-408 responses to HTTP/1.1 requests now properly include a
- connection: close header indicating that we are going to
- close the connection. This header will also be sent for
- other early errors resulting in the closing of the connection.
-</p>
+<li>408 responses to HTTP/1.1 requests now properly include a connection: close header indicating that we are going to close the connection. This header will also be sent for other early errors resulting in the closing of the connection.
</li>
-<li>
-<p>
-When both the transfer-encoding and content-length headers are
- sent in an HTTP/1.1 request, the transfer-encoding now takes
- precedence over the content-length header and the latter is
- removed from the Req object.
-</p>
+<li>When both the transfer-encoding and content-length headers are sent in an HTTP/1.1 request, the transfer-encoding now takes precedence over the content-length header and the latter is removed from the Req object.
</li>
-<li>
-<p>
-A 400 response is now returned when the transfer-encoding
- header is invalid or contains any transfer-coding other
- than chunked.
-</p>
+<li>A 400 response is now returned when the transfer-encoding header is invalid or contains any transfer-coding other than chunked.
</li>
-<li>
-<p>
-Invalid chunk sizes are now rejected immediately.
-</p>
+<li>Invalid chunk sizes are now rejected immediately.
</li>
-<li>
-<p>
-Chunk extensions are now limited to 129 characters. They are
- not used in practice and are still ignored by Cowboy. The limit
- is not configurable.
-</p>
+<li>Chunk extensions are now limited to 129 characters. They are not used in practice and are still ignored by Cowboy. The limit is not configurable.
</li>
-<li>
-<p>
-The final chunk was mistakenly sent in responses to HEAD
- requests. This is now corrected.
-</p>
+<li>The final chunk was mistakenly sent in responses to HEAD requests. This is now corrected.
</li>
-<li>
-<p>
-<code>OPTIONS *</code> requests were broken in Cowboy 2.0. They are now
- working again. Both the routing and <code>cowboy_req:uri/1,2</code> have
- been corrected.
-</p>
+<li><code>OPTIONS *</code> requests were broken in Cowboy 2.0. They are now working again. Both the routing and <code>cowboy_req:uri/1,2</code> have been corrected.
</li>
-<li>
-<p>
-204 responses no longer include a content-length header.
-</p>
+<li>204 responses no longer include a content-length header.
</li>
-<li>
-<p>
-A packet could be lost when switching to Websocket or any
- other protocol via the <code>switch_protocol</code> command. This is
- now fixed.
-</p>
+<li>A packet could be lost when switching to Websocket or any other protocol via the <code>switch_protocol</code> command. This is now fixed.
</li>
-<li>
-<p>
-A 426 response will now be sent when a handler requires
- the client to upgrade to Websocket and the request did not
- include the required headers.
-</p>
+<li>A 426 response will now be sent when a handler requires the client to upgrade to Websocket and the request did not include the required headers.
</li>
-<li>
-<p>
-Both experimental stream handlers <code>cowboy_metrics_h</code> and
- <code>cowboy_tracer_h</code> received a number of fixes and improvements.
-</p>
+<li>Both experimental stream handlers <code>cowboy_metrics_h</code> and <code>cowboy_tracer_h</code> received a number of fixes and improvements.
</li>
-</ul></div>
-</div>
-</div>
+</ul>
+
diff --git a/docs/en/cowboy/2.4/guide/migrating_from_2.2/index.html b/docs/en/cowboy/2.4/guide/migrating_from_2.2/index.html
index 5bc480c7..e21d669b 100644
--- a/docs/en/cowboy/2.4/guide/migrating_from_2.2/index.html
+++ b/docs/en/cowboy/2.4/guide/migrating_from_2.2/index.html
@@ -62,108 +62,38 @@
<h1 class="lined-header"><span>Migrating from Cowboy 2.2 to 2.3</span></h1>
-<div class="paragraph"><p>Cowboy 2.3 focused on making the Cowboy processes behave
-properly according to OTP principles. This version is a
-very good milestone toward that goal and most of everything
-should now work. Release upgrades and a few details will
-be improved in future versions.</p></div>
-<div class="sect1">
+<p>Cowboy 2.3 focused on making the Cowboy processes behave properly according to OTP principles. This version is a very good milestone toward that goal and most of everything should now work. Release upgrades and a few details will be improved in future versions.</p>
<h2 id="_features_added">Features added</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-Add support for all functions from the module <code>sys</code>. Note
- that Cowboy currently does not implement the <code>sys</code> debugging
- mechanisms as tracing is recommended instead.
-</p>
+<ul><li>Add support for all functions from the module <code>sys</code>. Note that Cowboy currently does not implement the <code>sys</code> debugging mechanisms as tracing is recommended instead.
</li>
-<li>
-<p>
-Add a <code>max_frame_size</code> option for Websocket handlers
- to close the connection when the client attempts to
- send a frame that&#8217;s too large. It currently defaults
- to <code>infinity</code> to avoid breaking existing code but will
- be changed in a future version.
-</p>
+<li>Add a <code>max_frame_size</code> option for Websocket handlers to close the connection when the client attempts to send a frame that&apos;s too large. It currently defaults to <code>infinity</code> to avoid breaking existing code but will be changed in a future version.
</li>
-<li>
-<p>
-Update Cowlib to 2.2.1.
-</p>
+<li>Update Cowlib to 2.2.1.
</li>
-<li>
-<p>
-Add support for the 308 status code and a test suite
- for RFC7538 where it is defined.
-</p>
+<li>Add support for the 308 status code and a test suite for RFC7538 where it is defined.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_bugs_fixed">Bugs fixed</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-Ensure timeout options accept the value <code>infinity</code> as
- documented.
-</p>
+<ul><li>Ensure timeout options accept the value <code>infinity</code> as documented.
</li>
-<li>
-<p>
-Properly reject HTTP/2 requests with an invalid content-length
- header instead of simply crashing.
-</p>
+<li>Properly reject HTTP/2 requests with an invalid content-length header instead of simply crashing.
</li>
-<li>
-<p>
-When switching from HTTP/1.1 to Websocket or user protocols
- all the messages in the mailbox were flushed. Only messages
- specific to <code>cowboy_http</code> should now be flushed.
-</p>
+<li>When switching from HTTP/1.1 to Websocket or user protocols all the messages in the mailbox were flushed. Only messages specific to <code>cowboy_http</code> should now be flushed.
</li>
-<li>
-<p>
-Parsing of the x-forwarded-for header has been corrected.
- It now supports IPv6 addresses both with and without port.
-</p>
+<li>Parsing of the x-forwarded-for header has been corrected. It now supports IPv6 addresses both with and without port.
</li>
-<li>
-<p>
-Websocket subprotocol tokens are now parsed in a case
- insensitive manner, according to the spec.
-</p>
+<li>Websocket subprotocol tokens are now parsed in a case insensitive manner, according to the spec.
</li>
-<li>
-<p>
-Cookies without values are now allowed. For example <code>Cookie: foo</code>.
-</p>
+<li>Cookies without values are now allowed. For example <code>Cookie: foo</code>.
</li>
-<li>
-<p>
-Colons are now allowed within path segments in routes provided
- to <code>cowboy_router:compile/1</code> as long as they are not the first
- character of the path segment.
-</p>
+<li>Colons are now allowed within path segments in routes provided to <code>cowboy_router:compile/1</code> as long as they are not the first character of the path segment.
</li>
-<li>
-<p>
-The <code>cowboy_req:delete_resp_header/2</code> function will no longer
- crash when no response header was set before calling it.
-</p>
+<li>The <code>cowboy_req:delete_resp_header/2</code> function will no longer crash when no response header was set before calling it.
</li>
-<li>
-<p>
-A miscount of the output HTTP/2 flow control window has been
- fixed. It prevented sending the response body fully to some
- clients. The issue only affected response bodies sent as iolists.
-</p>
+<li>A miscount of the output HTTP/2 flow control window has been fixed. It prevented sending the response body fully to some clients. The issue only affected response bodies sent as iolists.
</li>
-</ul></div>
-</div>
-</div>
+</ul>
+
diff --git a/docs/en/cowboy/2.4/guide/migrating_from_2.3/index.html b/docs/en/cowboy/2.4/guide/migrating_from_2.3/index.html
index f9f5dd2b..a0437915 100644
--- a/docs/en/cowboy/2.4/guide/migrating_from_2.3/index.html
+++ b/docs/en/cowboy/2.4/guide/migrating_from_2.3/index.html
@@ -62,121 +62,40 @@
<h1 class="lined-header"><span>Migrating from Cowboy 2.3 to 2.4</span></h1>
-<div class="paragraph"><p>Cowboy 2.4 focused on improving the HTTP/2 implementation.
-All existing tests from RFC7540 and the h2spec test suite
-now all pass. Numerous options have been added to control
-SETTINGS and related behavior. In addition experimental
-support for Websocket over HTTP/2 was added.</p></div>
-<div class="sect1">
+<p>Cowboy 2.4 focused on improving the HTTP/2 implementation. All existing tests from RFC7540 and the h2spec test suite now all pass. Numerous options have been added to control SETTINGS and related behavior. In addition experimental support for Websocket over HTTP/2 was added.</p>
<h2 id="_features_added">Features added</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-Add experimental support for Websocket over HTTP/2.
- You can use the <code>enable_connect_protocol</code> option to
- enable. It implements the following draft:
- <a href="https://tools.ietf.org/html/draft-ietf-httpbis-h2-websockets-01">https://tools.ietf.org/html/draft-ietf-httpbis-h2-websockets-01</a>
-</p>
+<ul><li>Add experimental support for Websocket over HTTP/2. You can use the <code>enable_connect_protocol</code> option to enable. It implements the following draft: <a href="https://tools.ietf.org/html/draft-ietf-httpbis-h2-websockets-01">https://tools.ietf.org/html/draft-ietf-httpbis-h2-websockets-01</a>
</li>
-<li>
-<p>
-Add options <code>max_decode_table_size</code> and
- <code>max_encode_table_size</code> to restrict the size of the
- HPACK compression dictionary.
-</p>
+<li>Add options <code>max_decode_table_size</code> and <code>max_encode_table_size</code> to restrict the size of the HPACK compression dictionary.
</li>
-<li>
-<p>
-Add option <code>max_concurrent_streams</code> to restrict the
- number of HTTP/2 streams that can be opened concurrently.
-</p>
+<li>Add option <code>max_concurrent_streams</code> to restrict the number of HTTP/2 streams that can be opened concurrently.
</li>
-<li>
-<p>
-Add options <code>initial_connection_window_size</code> and
- <code>initial_stream_window_size</code> to restrict the size of
- the HTTP/2 request body buffers for the whole connection
- and per stream, respectively.
-</p>
+<li>Add options <code>initial_connection_window_size</code> and <code>initial_stream_window_size</code> to restrict the size of the HTTP/2 request body buffers for the whole connection and per stream, respectively.
</li>
-<li>
-<p>
-Add options <code>max_frame_size_received</code> and
- <code>max_frame_size_sent</code> to restrict the size of
- HTTP/2 frames.
-</p>
+<li>Add options <code>max_frame_size_received</code> and <code>max_frame_size_sent</code> to restrict the size of HTTP/2 frames.
</li>
-<li>
-<p>
-Add option <code>settings_timeout</code> to reject clients that
- did not send a SETTINGS ack. Note that this currently
- may only occur at the beginning of the connection.
-</p>
+<li>Add option <code>settings_timeout</code> to reject clients that did not send a SETTINGS ack. Note that this currently may only occur at the beginning of the connection.
</li>
-<li>
-<p>
-Update Ranch to 1.5.0
-</p>
+<li>Update Ranch to 1.5.0
</li>
-<li>
-<p>
-Update Cowlib to 2.3.0
-</p>
+<li>Update Cowlib to 2.3.0
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_bugs_fixed">Bugs fixed</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-Fix the END_STREAM flag for informational responses
- when using HTTP/2.
-</p>
+<ul><li>Fix the END_STREAM flag for informational responses when using HTTP/2.
</li>
-<li>
-<p>
-Receive and ignore HTTP/2 request trailers if any
- for HTTP/2 requests. Request trailer information will
- be propagated to the user code in a future release.
-</p>
+<li>Receive and ignore HTTP/2 request trailers if any for HTTP/2 requests. Request trailer information will be propagated to the user code in a future release.
</li>
-<li>
-<p>
-Reject WINDOW_UPDATE frames that are sent after the
- client sent an RST_STREAM. Note that Cowboy will not
- keep state information about terminated streams
- forever and so the behavior might differ depending
- on when the stream was reset.
-</p>
+<li>Reject WINDOW_UPDATE frames that are sent after the client sent an RST_STREAM. Note that Cowboy will not keep state information about terminated streams forever and so the behavior might differ depending on when the stream was reset.
</li>
-<li>
-<p>
-Reject streams that depend on themselves. Note that
- Cowboy currently does not implement HTTP/2&#8217;s priority
- mechanisms so this issue was harmless.
-</p>
+<li>Reject streams that depend on themselves. Note that Cowboy currently does not implement HTTP/2&apos;s priority mechanisms so this issue was harmless.
</li>
-<li>
-<p>
-Reject HTTP/2 requests where the body size is different
- than the content-length value. Note that due to how Cowboy
- works some requests might go through regardless, for
- example when the user code does not read the request body.
-</p>
+<li>Reject HTTP/2 requests where the body size is different than the content-length value. Note that due to how Cowboy works some requests might go through regardless, for example when the user code does not read the request body.
</li>
-<li>
-<p>
-Fix all existing test failures from RFC7540. This was
- mostly incorrect test cases or intermittent failures.
-</p>
+<li>Fix all existing test failures from RFC7540. This was mostly incorrect test cases or intermittent failures.
</li>
-</ul></div>
-</div>
-</div>
+</ul>
+
diff --git a/docs/en/cowboy/2.4/guide/modern_web/index.html b/docs/en/cowboy/2.4/guide/modern_web/index.html
index 0a335686..00328997 100644
--- a/docs/en/cowboy/2.4/guide/modern_web/index.html
+++ b/docs/en/cowboy/2.4/guide/modern_web/index.html
@@ -62,115 +62,38 @@
<h1 class="lined-header"><span>The modern Web</span></h1>
-<div class="paragraph"><p>Cowboy is a server for the modern Web. This chapter explains
-what it means and details all the standards involved.</p></div>
-<div class="paragraph"><p>Cowboy supports all the standards listed in this document.</p></div>
-<div class="sect1">
+<p>Cowboy is a server for the modern Web. This chapter explains what it means and details all the standards involved.</p>
+<p>Cowboy supports all the standards listed in this document.</p>
<h2 id="_http_2">HTTP/2</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>HTTP/2 is the most efficient protocol for consuming Web
-services. It enables clients to keep a connection open
-for long periods of time; to send requests concurrently;
-to reduce the size of requests through HTTP headers
-compression; and more. The protocol is binary, greatly
-reducing the resources needed to parse it.</p></div>
-<div class="paragraph"><p>HTTP/2 also enables the server to push messages to the
-client. This can be used for various purposes, including
-the sending of related resources before the client requests
-them, in an effort to reduce latency. This can also be used
-to enable bidirectional communication.</p></div>
-<div class="paragraph"><p>Cowboy provides transparent support for HTTP/2. Clients
-that know it can use it; others fall back to HTTP/1.1
-automatically.</p></div>
-<div class="paragraph"><p>HTTP/2 is compatible with the HTTP/1.1 semantics.</p></div>
-<div class="paragraph"><p>HTTP/2 is defined by RFC 7540 and RFC 7541.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>HTTP/2 is the most efficient protocol for consuming Web services. It enables clients to keep a connection open for long periods of time; to send requests concurrently; to reduce the size of requests through HTTP headers compression; and more. The protocol is binary, greatly reducing the resources needed to parse it.</p>
+<p>HTTP/2 also enables the server to push messages to the client. This can be used for various purposes, including the sending of related resources before the client requests them, in an effort to reduce latency. This can also be used to enable bidirectional communication.</p>
+<p>Cowboy provides transparent support for HTTP/2. Clients that know it can use it; others fall back to HTTP/1.1 automatically.</p>
+<p>HTTP/2 is compatible with the HTTP/1.1 semantics.</p>
+<p>HTTP/2 is defined by RFC 7540 and RFC 7541.</p>
<h2 id="_http_1_1">HTTP/1.1</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>HTTP/1.1 is the previous version of the HTTP protocol.
-The protocol itself is text-based and suffers from numerous
-issues and limitations. In particular it is not possible
-to execute requests concurrently (though pipelining is
-sometimes possible), and it&#8217;s also sometimes difficult
-to detect that a client disconnected.</p></div>
-<div class="paragraph"><p>HTTP/1.1 does provide very good semantics for interacting
-with Web services. It defines the standard methods, headers
-and status codes used by HTTP/1.1 and HTTP/2 clients and
-servers.</p></div>
-<div class="paragraph"><p>HTTP/1.1 also defines compatibility with an older version
-of the protocol, HTTP/1.0, which was never really standardized
-across implementations.</p></div>
-<div class="paragraph"><p>The core of HTTP/1.1 is defined by RFC 7230, RFC 7231,
-RFC 7232, RFC 7233, RFC 7234 and RFC 7235. Numerous RFCs
-and other specifications exist defining additional HTTP
-methods, status codes, headers or semantics.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>HTTP/1.1 is the previous version of the HTTP protocol. The protocol itself is text-based and suffers from numerous issues and limitations. In particular it is not possible to execute requests concurrently (though pipelining is sometimes possible), and it&apos;s also sometimes difficult to detect that a client disconnected.</p>
+<p>HTTP/1.1 does provide very good semantics for interacting with Web services. It defines the standard methods, headers and status codes used by HTTP/1.1 and HTTP/2 clients and servers.</p>
+<p>HTTP/1.1 also defines compatibility with an older version of the protocol, HTTP/1.0, which was never really standardized across implementations.</p>
+<p>The core of HTTP/1.1 is defined by RFC 7230, RFC 7231, RFC 7232, RFC 7233, RFC 7234 and RFC 7235. Numerous RFCs and other specifications exist defining additional HTTP methods, status codes, headers or semantics.</p>
<h2 id="_websocket">Websocket</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../ws_protocol">Websocket</a> is a protocol built on top of HTTP/1.1
-that provides a two-ways communication channel between the client and
-the server. Communication is asynchronous and can occur concurrently.</p></div>
-<div class="paragraph"><p>It consists of a Javascript object allowing setting up a
-Websocket connection to the server, and a binary based
-protocol for sending data to the server or the client.</p></div>
-<div class="paragraph"><p>Websocket connections can transfer either UTF-8 encoded text
-data or binary data. The protocol also includes support for
-implementing a ping/pong mechanism, allowing the server and
-the client to have more confidence that the connection is still
-alive.</p></div>
-<div class="paragraph"><p>A Websocket connection can be used to transfer any kind of data,
-small or big, text or binary. Because of this Websocket is
-sometimes used for communication between systems.</p></div>
-<div class="paragraph"><p>Websocket messages have no semantics on their own. Websocket
-is closer to TCP in that aspect, and requires you to design
-and implement your own protocol on top of it; or adapt an
-existing protocol to Websocket.</p></div>
-<div class="paragraph"><p>Cowboy provides an interface known as <a href="../ws_handlers">Websocket handlers</a>
-that gives complete control over a Websocket connection.</p></div>
-<div class="paragraph"><p>The Websocket protocol is defined by RFC 6455.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p><a href="../ws_protocol">Websocket</a> is a protocol built on top of HTTP/1.1 that provides a two-ways communication channel between the client and the server. Communication is asynchronous and can occur concurrently.</p>
+<p>It consists of a Javascript object allowing setting up a Websocket connection to the server, and a binary based protocol for sending data to the server or the client.</p>
+<p>Websocket connections can transfer either UTF-8 encoded text data or binary data. The protocol also includes support for implementing a ping/pong mechanism, allowing the server and the client to have more confidence that the connection is still alive.</p>
+<p>A Websocket connection can be used to transfer any kind of data, small or big, text or binary. Because of this Websocket is sometimes used for communication between systems.</p>
+<p>Websocket messages have no semantics on their own. Websocket is closer to TCP in that aspect, and requires you to design and implement your own protocol on top of it; or adapt an existing protocol to Websocket.</p>
+<p>Cowboy provides an interface known as <a href="../ws_handlers">Websocket handlers</a> that gives complete control over a Websocket connection.</p>
+<p>The Websocket protocol is defined by RFC 6455.</p>
<h2 id="_long_lived_requests">Long-lived requests</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy provides an interface that can be used to support
-long-polling or to stream large amounts of data reliably,
-including using Server-Sent Events.</p></div>
-<div class="paragraph"><p>Long-polling is a mechanism in which the client performs
-a request which may not be immediately answered by the
-server. It allows clients to request resources that may
-not currently exist, but are expected to be created soon,
-and which will be returned as soon as they are.</p></div>
-<div class="paragraph"><p>Long-polling is essentially a hack, but it is widely used
-to overcome limitations on older clients and servers.</p></div>
-<div class="paragraph"><p>Server-Sent Events is a small protocol defined as a media
-type, <code>text/event-stream</code>, along with a new HTTP header,
-<code>Last-Event-ID</code>. It is defined in the EventSource W3C
-specification.</p></div>
-<div class="paragraph"><p>Cowboy provides an interface known as <a href="../loop_handlers">loop handlers</a>
-that facilitates the implementation of long-polling or stream
-mechanisms. It works regardless of the underlying protocol.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Cowboy provides an interface that can be used to support long-polling or to stream large amounts of data reliably, including using Server-Sent Events.</p>
+<p>Long-polling is a mechanism in which the client performs a request which may not be immediately answered by the server. It allows clients to request resources that may not currently exist, but are expected to be created soon, and which will be returned as soon as they are.</p>
+<p>Long-polling is essentially a hack, but it is widely used to overcome limitations on older clients and servers.</p>
+<p>Server-Sent Events is a small protocol defined as a media type, <code>text/event-stream</code>, along with a new HTTP header, <code>Last-Event-ID</code>. It is defined in the EventSource W3C specification.</p>
+<p>Cowboy provides an interface known as <a href="../loop_handlers">loop handlers</a> that facilitates the implementation of long-polling or stream mechanisms. It works regardless of the underlying protocol.</p>
<h2 id="_rest">REST</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../rest_principles">REST, or REpresentational State Transfer</a>,
-is a style of architecture for loosely connected distributed
-systems. It can easily be implemented on top of HTTP.</p></div>
-<div class="paragraph"><p>REST is essentially a set of constraints to be followed.
-Many of these constraints are purely architectural and
-solved by simply using HTTP. Some constraints must be
-explicitly followed by the developer.</p></div>
-<div class="paragraph"><p>Cowboy provides an interface known as <a href="../rest_handlers">REST handlers</a>
-that simplifies the implementation of a REST API on top of
-the HTTP protocol.</p></div>
-</div>
-</div>
+<p><a href="../rest_principles">REST, or REpresentational State Transfer</a>, is a style of architecture for loosely connected distributed systems. It can easily be implemented on top of HTTP.</p>
+<p>REST is essentially a set of constraints to be followed. Many of these constraints are purely architectural and solved by simply using HTTP. Some constraints must be explicitly followed by the developer.</p>
+<p>Cowboy provides an interface known as <a href="../rest_handlers">REST handlers</a> that simplifies the implementation of a REST API on top of the HTTP protocol.</p>
+
diff --git a/docs/en/cowboy/2.4/guide/multipart/index.html b/docs/en/cowboy/2.4/guide/multipart/index.html
index 2cec2e85..e6a5b0b7 100644
--- a/docs/en/cowboy/2.4/guide/multipart/index.html
+++ b/docs/en/cowboy/2.4/guide/multipart/index.html
@@ -62,169 +62,107 @@
<h1 class="lined-header"><span>Multipart requests</span></h1>
-<div class="paragraph"><p>Multipart originates from MIME, an Internet standard that
-extends the format of emails.</p></div>
-<div class="paragraph"><p>A multipart message is a list of parts. A part contains
-headers and a body. The body of the parts may be
-of any media type, and contain text or binary data.
-It is possible for parts to contain a multipart media
-type.</p></div>
-<div class="paragraph"><p>In the context of HTTP, multipart is most often used
-with the <code>multipart/form-data</code> media type. It is what
-browsers use to upload files through HTML forms.</p></div>
-<div class="paragraph"><p>The <code>multipart/byteranges</code> is also common. It is the
-media type used to send arbitrary bytes from a resource,
-enabling clients to resume downloads.</p></div>
-<div class="sect1">
+<p>Multipart originates from MIME, an Internet standard that extends the format of emails.</p>
+<p>A multipart message is a list of parts. A part contains headers and a body. The body of the parts may be of any media type, and contain text or binary data. It is possible for parts to contain a multipart media type.</p>
+<p>In the context of HTTP, multipart is most often used with the <code>multipart/form-data</code> media type. It is what browsers use to upload files through HTML forms.</p>
+<p>The <code>multipart/byteranges</code> is also common. It is the media type used to send arbitrary bytes from a resource, enabling clients to resume downloads.</p>
<h2 id="_form_data">Form-data</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>In the normal case, when a form is submitted, the
-browser will use the <code>application/x-www-form-urlencoded</code>
-content-type. This type is just a list of keys and
-values and is therefore not fit for uploading files.</p></div>
-<div class="paragraph"><p>That&#8217;s where the <code>multipart/form-data</code> content-type
-comes in. When the form is configured to use this
-content-type, the browser will create a multipart
-message where each part corresponds to a field on
-the form. For files, it also adds some metadata in
-the part headers, like the file name.</p></div>
-<div class="paragraph"><p>A form with a text input, a file input and a select
-choice box will result in a multipart message with
-three parts, one for each field.</p></div>
-<div class="paragraph"><p>The browser does its best to determine the media type
-of the files it sends this way, but you should not
-rely on it for determining the contents of the file.
-Proper investigation of the contents is recommended.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>In the normal case, when a form is submitted, the browser will use the <code>application/x-www-form-urlencoded</code> content-type. This type is just a list of keys and values and is therefore not fit for uploading files.</p>
+<p>That&apos;s where the <code>multipart/form-data</code> content-type comes in. When the form is configured to use this content-type, the browser will create a multipart message where each part corresponds to a field on the form. For files, it also adds some metadata in the part headers, like the file name.</p>
+<p>A form with a text input, a file input and a select choice box will result in a multipart message with three parts, one for each field.</p>
+<p>The browser does its best to determine the media type of the files it sends this way, but you should not rely on it for determining the contents of the file. Proper investigation of the contents is recommended.</p>
<h2 id="_checking_for_multipart_messages">Checking for multipart messages</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The content-type header indicates the presence of
-a multipart message:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The content-type header indicates the presence of a multipart message:</p>
+<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">&lt;&lt;</span><span style="color: #FF0000">"multipart"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"form-data"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">_</span>}
- <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:parse_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#990000">&lt;&lt;</font><font color="#FF0000">"multipart"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"form-data"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">_</font>}
+ <font color="#990000">=</font> <b><font color="#000000">cowboy_req:parse_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_reading_a_multipart_message">Reading a multipart message</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy provides two sets of functions for reading
-request bodies as multipart messages.</p></div>
-<div class="paragraph"><p>The <code>cowboy_req:read_part/1,2</code> functions return the
-next part&#8217;s headers, if any.</p></div>
-<div class="paragraph"><p>The <code>cowboy_req:read_part_body/1,2</code> functions return
-the current part&#8217;s body. For large bodies you may
-need to call the function multiple times.</p></div>
-<div class="paragraph"><p>To read a multipart message you need to iterate over
-all its parts:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Cowboy provides two sets of functions for reading request bodies as multipart messages.</p>
+<p>The <code>cowboy_req:read_part/1,2</code> functions return the next part&apos;s headers, if any.</p>
+<p>The <code>cowboy_req:read_part_body/1,2</code> functions return the current part&apos;s body. For large bodies you may need to call the function multiple times.</p>
+<p>To read a multipart message you need to iterate over all its parts:</p>
+<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">multipart</span></span>(<span style="color: #009900">Req0</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">cowboy_req:read_part</span></span>(<span style="color: #009900">Req0</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">_Headers</span>, <span style="color: #009900">Req1</span>} <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">_Body</span>, <span style="color: #009900">Req</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="font-weight: bold"><span style="color: #000000">multipart</span></span>(<span style="color: #009900">Req</span>);
- {<span style="color: #FF6600">done</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">-&gt;</span>
- <span style="color: #009900">Req</span>
- <span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>When part bodies are too large, Cowboy will return
-a <code>more</code> tuple, and allow you to loop until the part
-body has been fully read.</p></div>
-<div class="paragraph"><p>The function <code>cow_multipart:form_data/1</code> can be used
-to quickly obtain information about a part from a
-<code>multipart/form-data</code> message. The function returns
-a <code>data</code> or a <code>file</code> tuple depending on whether this
-is a normal field or a file being uploaded.</p></div>
-<div class="paragraph"><p>The following snippet will use this function and
-use different strategies depending on whether the
-part is a file:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">multipart</font></b>(<font color="#009900">Req0</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">case</font></b> <b><font color="#000000">cowboy_req:read_part</font></b>(<font color="#009900">Req0</font>) <b><font color="#0000FF">of</font></b>
+ {<font color="#FF6600">ok</font>, <font color="#009900">_Headers</font>, <font color="#009900">Req1</font>} <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <font color="#009900">_Body</font>, <font color="#009900">Req</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:read_part_body</font></b>(<font color="#009900">Req1</font>),
+ <b><font color="#000000">multipart</font></b>(<font color="#009900">Req</font>);
+ {<font color="#FF6600">done</font>, <font color="#009900">Req</font>} <font color="#990000">-&gt;</font>
+ <font color="#009900">Req</font>
+ <b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>When part bodies are too large, Cowboy will return a <code>more</code> tuple, and allow you to loop until the part body has been fully read.</p>
+<p>The function <code>cow_multipart:form_data/1</code> can be used to quickly obtain information about a part from a <code>multipart/form-data</code> message. The function returns a <code>data</code> or a <code>file</code> tuple depending on whether this is a normal field or a file being uploaded.</p>
+<p>The following snippet will use this function and use different strategies depending on whether the part is a file:</p>
+<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">multipart</span></span>(<span style="color: #009900">Req0</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">cowboy_req:read_part</span></span>(<span style="color: #009900">Req0</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Headers</span>, <span style="color: #009900">Req1</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: #0000FF">case</span></span> <span style="font-weight: bold"><span style="color: #000000">cow_multipart:form_data</span></span>(<span style="color: #009900">Headers</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
- {<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: #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>);
- {<span style="color: #FF6600">done</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">-&gt;</span>
- <span style="color: #009900">Req</span>
- <span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span>
-
-<span style="font-weight: bold"><span style="color: #000000">stream_file</span></span>(<span style="color: #009900">Req0</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">cowboy_req:read_part_body</span></span>(<span style="color: #009900">Req0</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">_LastBodyChunk</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">-&gt;</span>
- <span style="color: #009900">Req</span>;
- {<span style="color: #FF6600">more</span>, <span style="color: #009900">_BodyChunk</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #000000">stream_file</span></span>(<span style="color: #009900">Req</span>)
- <span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Both the part header and body reading functions can take
-options that will be given to the request body reading
-functions. By default, <code>cowboy_req:read_part/1</code> reads
-up to 64KB for up to 5 seconds. <code>cowboy_req:read_part_body/1</code>
-has the same defaults as <code>cowboy_req:read_body/1</code>.</p></div>
-<div class="paragraph"><p>To change the defaults for part headers:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">multipart</font></b>(<font color="#009900">Req0</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">case</font></b> <b><font color="#000000">cowboy_req:read_part</font></b>(<font color="#009900">Req0</font>) <b><font color="#0000FF">of</font></b>
+ {<font color="#FF6600">ok</font>, <font color="#009900">Headers</font>, <font color="#009900">Req1</font>} <font color="#990000">-&gt;</font>
+ <font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#0000FF">case</font></b> <b><font color="#000000">cow_multipart:form_data</font></b>(<font color="#009900">Headers</font>) <b><font color="#0000FF">of</font></b>
+ {<font color="#FF6600">data</font>, <font color="#009900">_FieldName</font>} <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <font color="#009900">_Body</font>, <font color="#009900">Req2</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:read_part_body</font></b>(<font color="#009900">Req1</font>),
+ <font color="#009900">Req2</font>;
+ {<font color="#FF6600">file</font>, <font color="#009900">_FieldName</font>, <font color="#009900">_Filename</font>, <font color="#009900">_CType</font>} <font color="#990000">-&gt;</font>
+ <b><font color="#000000">stream_file</font></b>(<font color="#009900">Req1</font>)
+ <b><font color="#0000FF">end</font></b>,
+ <b><font color="#000000">multipart</font></b>(<font color="#009900">Req</font>);
+ {<font color="#FF6600">done</font>, <font color="#009900">Req</font>} <font color="#990000">-&gt;</font>
+ <font color="#009900">Req</font>
+ <b><font color="#0000FF">end</font></b><font color="#990000">.</font>
+
+<b><font color="#000000">stream_file</font></b>(<font color="#009900">Req0</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">case</font></b> <b><font color="#000000">cowboy_req:read_part_body</font></b>(<font color="#009900">Req0</font>) <b><font color="#0000FF">of</font></b>
+ {<font color="#FF6600">ok</font>, <font color="#009900">_LastBodyChunk</font>, <font color="#009900">Req</font>} <font color="#990000">-&gt;</font>
+ <font color="#009900">Req</font>;
+ {<font color="#FF6600">more</font>, <font color="#009900">_BodyChunk</font>, <font color="#009900">Req</font>} <font color="#990000">-&gt;</font>
+ <b><font color="#000000">stream_file</font></b>(<font color="#009900">Req</font>)
+ <b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Both the part header and body reading functions can take options that will be given to the request body reading functions. By default, <code>cowboy_req:read_part/1</code> reads up to 64KB for up to 5 seconds. <code>cowboy_req:read_part_body/1</code> has the same defaults as <code>cowboy_req:read_body/1</code>.</p>
+<p>To change the defaults for part headers:</p>
+<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">cowboy_req:read_part</span></span>(<span style="color: #009900">Req</span>, #{<span style="font-weight: bold"><span style="color: #000080">length</span></span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">128000</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>And for part bodies:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">cowboy_req:read_part</font></b>(<font color="#009900">Req</font>, #{<b><font color="#000080">length</font></b> <font color="#990000">=&gt;</font> <font color="#993399">128000</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>And for part bodies:</p>
+<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">cowboy_req:read_part_body</span></span>(<span style="color: #009900">Req</span>, #{<span style="font-weight: bold"><span style="color: #000080">length</span></span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">1000000</span>, <span style="color: #0000FF">period</span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">7000</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">cowboy_req:read_part_body</font></b>(<font color="#009900">Req</font>, #{<b><font color="#000080">length</font></b> <font color="#990000">=&gt;</font> <font color="#993399">1000000</font>, <font color="#0000FF">period</font> <font color="#990000">=&gt;</font> <font color="#993399">7000</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_skipping_unwanted_parts">Skipping unwanted parts</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Part bodies do not have to be read. Cowboy will automatically
-skip it when you request the next part&#8217;s body.</p></div>
-<div class="paragraph"><p>The following snippet reads all part headers and skips
-all bodies:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Part bodies do not have to be read. Cowboy will automatically skip it when you request the next part&apos;s body.</p>
+<p>The following snippet reads all part headers and skips all bodies:</p>
+<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">multipart</span></span>(<span style="color: #009900">Req0</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">cowboy_req:read_part</span></span>(<span style="color: #009900">Req0</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">_Headers</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #000000">multipart</span></span>(<span style="color: #009900">Req</span>);
- {<span style="color: #FF6600">done</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">-&gt;</span>
- <span style="color: #009900">Req</span>
- <span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Similarly, if you start reading the body and it ends up
-being too big, you can simply continue with the next part.
-Cowboy will automatically skip what remains.</p></div>
-<div class="paragraph"><p>While Cowboy can skip part bodies automatically, the read
-rate is not configurable. Depending on your application
-you may want to skip manually, in particular if you observe
-poor performance while skipping.</p></div>
-<div class="paragraph"><p>You do not have to read all parts either. You can stop
-reading as soon as you find the data you need.</p></div>
-</div>
-</div>
+<pre><tt><b><font color="#000000">multipart</font></b>(<font color="#009900">Req0</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">case</font></b> <b><font color="#000000">cowboy_req:read_part</font></b>(<font color="#009900">Req0</font>) <b><font color="#0000FF">of</font></b>
+ {<font color="#FF6600">ok</font>, <font color="#009900">_Headers</font>, <font color="#009900">Req</font>} <font color="#990000">-&gt;</font>
+ <b><font color="#000000">multipart</font></b>(<font color="#009900">Req</font>);
+ {<font color="#FF6600">done</font>, <font color="#009900">Req</font>} <font color="#990000">-&gt;</font>
+ <font color="#009900">Req</font>
+ <b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Similarly, if you start reading the body and it ends up being too big, you can simply continue with the next part. Cowboy will automatically skip what remains.</p>
+<p>While Cowboy can skip part bodies automatically, the read rate is not configurable. Depending on your application you may want to skip manually, in particular if you observe poor performance while skipping.</p>
+<p>You do not have to read all parts either. You can stop reading as soon as you find the data you need.</p>
+<!-- @todo Cover the building of multipart messages.-->
+
diff --git a/docs/en/cowboy/2.4/guide/req/index.html b/docs/en/cowboy/2.4/guide/req/index.html
index 4c03cb6f..f23bf6c8 100644
--- a/docs/en/cowboy/2.4/guide/req/index.html
+++ b/docs/en/cowboy/2.4/guide/req/index.html
@@ -62,407 +62,282 @@
<h1 class="lined-header"><span>The Req object</span></h1>
-<div class="paragraph"><p>The Req object is a variable used for obtaining information
-about a request, read its body or send a response.</p></div>
-<div class="paragraph"><p>It is not really an object in the object-oriented sense.
-It is a simple map that can be directly accessed or
-used when calling functions from the <code>cowboy_req</code> module.</p></div>
-<div class="paragraph"><p>The Req object is the subject of a few different chapters.
-In this chapter we will learn about the Req object and
-look at how to retrieve information about the request.</p></div>
-<div class="sect1">
+<p>The Req object is a variable used for obtaining information about a request, read its body or send a response.</p>
+<p>It is not really an object in the object-oriented sense. It is a simple map that can be directly accessed or used when calling functions from the <code>cowboy_req</code> module.</p>
+<p>The Req object is the subject of a few different chapters. In this chapter we will learn about the Req object and look at how to retrieve information about the request.</p>
<h2 id="_direct_access">Direct access</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The Req map contains a number of fields which are documented
-and can be accessed directly. They are the fields that have
-a direct mapping to HTTP: the request <code>method</code>; the HTTP
-<code>version</code> used; the effective URI components <code>scheme</code>,
-<code>host</code>, <code>port</code>, <code>path</code> and <code>qs</code>; the request <code>headers</code>;
-and the connection <code>peer</code> address and port.</p></div>
-<div class="paragraph"><p>Note that the <code>version</code> field can be used to determine
-whether a connection is using HTTP/2.</p></div>
-<div class="paragraph"><p>To access a field, you can simply match in the function
-head. The following example sends a simple "Hello world!"
-response when the <code>method</code> is GET, and a 405 error
-otherwise.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The Req map contains a number of fields which are documented and can be accessed directly. They are the fields that have a direct mapping to HTTP: the request <code>method</code>; the HTTP <code>version</code> used; the effective URI components <code>scheme</code>, <code>host</code>, <code>port</code>, <code>path</code> and <code>qs</code>; the request <code>headers</code>; and the connection <code>peer</code> address and port.</p>
+<p>Note that the <code>version</code> field can be used to determine whether a connection is using HTTP/2.</p>
+<p>To access a field, you can simply match in the function head. The following example sends a simple &quot;Hello world!&quot; response when the <code>method</code> is GET, and a 405 error otherwise.</p>
+<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">init</span></span>(<span style="color: #009900">Req0</span><span style="color: #990000">=</span>#{<span style="color: #FF6600">method</span> <span style="color: #990000">:=</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"GET"</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">200</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/plain"</span><span style="color: #990000">&gt;&gt;</span>
- }, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Hello world!"</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">Req0</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">405</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"allow"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"GET"</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="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Any other field is internal and should not be accessed.
-They may change in future releases, including maintenance
-releases, without notice.</p></div>
-<div class="paragraph"><p>Modifying the Req object, while allowed, is not recommended
-unless strictly necessary. If adding new fields, make sure
-to namespace the field names so that no conflict can occur
-with future Cowboy updates or third party projects.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req0</font><font color="#990000">=</font>#{<font color="#FF6600">method</font> <font color="#990000">:=</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"GET"</font><font color="#990000">&gt;&gt;</font>}, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ <font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:reply</font></b>(<font color="#993399">200</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/plain"</font><font color="#990000">&gt;&gt;</font>
+ }, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"Hello world!"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req0</font>),
+ {<font color="#FF6600">ok</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>};
+<b><font color="#000000">init</font></b>(<font color="#009900">Req0</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ <font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:reply</font></b>(<font color="#993399">405</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"allow"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"GET"</font><font color="#990000">&gt;&gt;</font>
+ }, <font color="#009900">Req0</font>),
+ {<font color="#FF6600">ok</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Any other field is internal and should not be accessed. They may change in future releases, including maintenance releases, without notice.</p>
+<p>Modifying the Req object, while allowed, is not recommended unless strictly necessary. If adding new fields, make sure to namespace the field names so that no conflict can occur with future Cowboy updates or third party projects.</p>
<h2 id="_introduction_to_the_cowboy_req_interface">Introduction to the cowboy_req interface</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Functions in the <code>cowboy_req</code> module provide access to
-the request information but also various operations that
-are common when dealing with HTTP requests.</p></div>
-<div class="paragraph"><p>All the functions that begin with a verb indicate an action.
-Other functions simply return the corresponding value
-(sometimes that value does need to be built, but the
-cost of the operation is equivalent to retrieving a value).</p></div>
-<div class="paragraph"><p>Some of the <code>cowboy_req</code> functions return an updated Req
-object. They are the read, reply, set and delete functions.
-While ignoring the returned Req will not cause incorrect
-behavior for some of them, it is highly recommended to
-always keep and use the last returned Req object. The
-manual for <code>cowboy_req</code> details these functions and what
-modifications are done to the Req object.</p></div>
-<div class="paragraph"><p>Some of the calls to <code>cowboy_req</code> have side effects. This
-is the case of the read and reply functions. Cowboy reads
-the request body or replies immediately when the function
-is called.</p></div>
-<div class="paragraph"><p>All functions will crash if something goes wrong. There
-is usually no need to catch these errors, Cowboy will
-send the appropriate 4xx or 5xx response depending on
-where the crash occurred.</p></div>
-</div>
-</div>
-<div class="sect1">
+<!-- @todo Link to cowboy_req manual-->
+<p>Functions in the <code>cowboy_req</code> module provide access to the request information but also various operations that are common when dealing with HTTP requests.</p>
+<p>All the functions that begin with a verb indicate an action. Other functions simply return the corresponding value (sometimes that value does need to be built, but the cost of the operation is equivalent to retrieving a value).</p>
+<p>Some of the <code>cowboy_req</code> functions return an updated Req object. They are the read, reply, set and delete functions. While ignoring the returned Req will not cause incorrect behavior for some of them, it is highly recommended to always keep and use the last returned Req object. The manual for <code>cowboy_req</code> details these functions and what modifications are done to the Req object.</p>
+<p>Some of the calls to <code>cowboy_req</code> have side effects. This is the case of the read and reply functions. Cowboy reads the request body or replies immediately when the function is called.</p>
+<p>All functions will crash if something goes wrong. There is usually no need to catch these errors, Cowboy will send the appropriate 4xx or 5xx response depending on where the crash occurred.</p>
<h2 id="_request_method">Request method</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The request method can be retrieved directly:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The request method can be retrieved directly:</p>
+<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 class="paragraph"><p>Or using a function:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>#{<font color="#FF6600">method</font> <font color="#990000">:=</font> <font color="#009900">Method</font>} <font color="#990000">=</font> <font color="#009900">Req</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Or using a function:</p>
+<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">Method</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="paragraph"><p>The method is a case sensitive binary string. Standard
-methods include GET, HEAD, OPTIONS, PATCH, POST, PUT
-or DELETE.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Method</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:method</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>The method is a case sensitive binary string. Standard methods include GET, HEAD, OPTIONS, PATCH, POST, PUT or DELETE.</p>
<h2 id="_http_version">HTTP version</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The HTTP version is informational. It does not indicate that
-the client implements the protocol well or fully.</p></div>
-<div class="paragraph"><p>There is typically no need to change behavior based on the
-HTTP version: Cowboy already does it for you.</p></div>
-<div class="paragraph"><p>It can be useful in some cases, though. For example, one may
-want to redirect HTTP/1.1 clients to use Websocket, while HTTP/2
-clients keep using HTTP/2.</p></div>
-<div class="paragraph"><p>The HTTP version can be retrieved directly:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The HTTP version is informational. It does not indicate that the client implements the protocol well or fully.</p>
+<p>There is typically no need to change behavior based on the HTTP version: Cowboy already does it for you.</p>
+<p>It can be useful in some cases, though. For example, one may want to redirect HTTP/1.1 clients to use Websocket, while HTTP/2 clients keep using HTTP/2.</p>
+<p>The HTTP version can be retrieved directly:</p>
+<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 class="paragraph"><p>Or using a function:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>#{<font color="#FF6600">version</font> <font color="#990000">:=</font> <font color="#009900">Version</font>} <font color="#990000">=</font> <font color="#009900">Req</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Or using a function:</p>
+<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">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 class="paragraph"><p>Cowboy defines the <code>'HTTP/1.0'</code>, <code>'HTTP/1.1'</code> and <code>'HTTP/2'</code>
-versions. Custom protocols can define their own values as
-atoms.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Version</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:version</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Cowboy defines the <code>&apos;HTTP/1.0&apos;</code>, <code>&apos;HTTP/1.1&apos;</code> and <code>&apos;HTTP/2&apos;</code> versions. Custom protocols can define their own values as atoms.</p>
<h2 id="_effective_request_uri">Effective request URI</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The scheme, host, port, path and query string components
-of the effective request URI can all be retrieved directly:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The scheme, host, port, path and query string components of the effective request URI can all be retrieved directly:</p>
+<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: #FF6600">host</span> <span style="color: #990000">:=</span> <span style="color: #009900">Host</span>,
- <span style="color: #FF6600">port</span> <span style="color: #990000">:=</span> <span style="color: #009900">Port</span>,
- <span style="color: #FF6600">path</span> <span style="color: #990000">:=</span> <span style="color: #009900">Path</span>,
- <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 class="paragraph"><p>Or using the related functions:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+ <font color="#FF6600">scheme</font> <font color="#990000">:=</font> <font color="#009900">Scheme</font>,
+ <font color="#FF6600">host</font> <font color="#990000">:=</font> <font color="#009900">Host</font>,
+ <font color="#FF6600">port</font> <font color="#990000">:=</font> <font color="#009900">Port</font>,
+ <font color="#FF6600">path</font> <font color="#990000">:=</font> <font color="#009900">Path</font>,
+ <font color="#FF6600">qs</font> <font color="#990000">:=</font> <font color="#009900">Qs</font>
+} <font color="#990000">=</font> <font color="#009900">Req</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Or using the related functions:</p>
+<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">Scheme</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:scheme</span></span>(<span style="color: #009900">Req</span>),
-<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: #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: #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>
-<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 class="paragraph"><p>The scheme and host are lowercased case insensitive binary
-strings. The port is an integer representing the port number.
-The path and query string are case sensitive binary strings.</p></div>
-<div class="paragraph"><p>Cowboy defines only the <code>&lt;&lt;"http"&gt;&gt;</code> and <code>&lt;&lt;"https"&gt;&gt;</code> schemes.
-They are chosen so that the scheme will only be <code>&lt;&lt;"https"&gt;&gt;</code>
-for requests on secure HTTP/1.1 or HTTP/2 connections.</p></div>
-<div class="paragraph"><p>The effective request URI itself can be reconstructed with
-the <code>cowboy_req:uri/1,2</code> function. By default, an absolute
-URI is returned:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Scheme</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:scheme</font></b>(<font color="#009900">Req</font>),
+<font color="#009900">Host</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:host</font></b>(<font color="#009900">Req</font>),
+<font color="#009900">Port</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:port</font></b>(<font color="#009900">Req</font>),
+<font color="#009900">Path</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:path</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font>
+<font color="#009900">Qs</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:qs</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>The scheme and host are lowercased case insensitive binary strings. The port is an integer representing the port number. The path and query string are case sensitive binary strings.</p>
+<p>Cowboy defines only the <code>&lt;&lt;&quot;http&quot;&gt;&gt;</code> and <code>&lt;&lt;&quot;https&quot;&gt;&gt;</code> schemes. They are chosen so that the scheme will only be <code>&lt;&lt;&quot;https&quot;&gt;&gt;</code> for requests on secure HTTP/1.1 or HTTP/2 connections.</p>
+<!-- @todo Is that tested well?-->
+<p>The effective request URI itself can be reconstructed with the <code>cowboy_req:uri/1,2</code> function. By default, an absolute URI is returned:</p>
+<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-style: italic"><span style="color: #9A1900">%% </span></span><span style="text-decoration: underline"><span style="color: #0000FF">scheme://host</span></span><span style="font-style: italic"><span style="color: #9A1900">[:port]/path[?qs]</span></span>
-<span style="color: #009900">URI</span> <span style="color: #990000">=</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 class="paragraph"><p>Options are available to either disable or replace some
-or all of the components. Various URIs or URI formats can
-be generated this way, including the origin form:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><i><font color="#9A1900">%% </font></i><u><font color="#0000FF">scheme://host</font></u><i><font color="#9A1900">[:port]/path[?qs]</font></i>
+<font color="#009900">URI</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:uri</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Options are available to either disable or replace some or all of the components. Various URIs or URI formats can be generated this way, including the origin form:</p>
+<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-style: italic"><span style="color: #9A1900">%% /path[?qs]</span></span>
-<span style="color: #009900">URI</span> <span style="color: #990000">=</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="paragraph"><p>The protocol relative form:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><i><font color="#9A1900">%% /path[?qs]</font></i>
+<font color="#009900">URI</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:uri</font></b>(<font color="#009900">Req</font>, #{<font color="#0000FF">host</font> <font color="#990000">=&gt;</font> <font color="#000080">undefined</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>The protocol relative form:</p>
+<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-style: italic"><span style="color: #9A1900">%% //host[:port]/path[?qs]</span></span>
-<span style="color: #009900">URI</span> <span style="color: #990000">=</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="paragraph"><p>The absolute URI without a query string:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><i><font color="#9A1900">%% //host[:port]/path[?qs]</font></i>
+<font color="#009900">URI</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:uri</font></b>(<font color="#009900">Req</font>, #{<font color="#0000FF">scheme</font> <font color="#990000">=&gt;</font> <font color="#000080">undefined</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>The absolute URI without a query string:</p>
+<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">URI</span> <span style="color: #990000">=</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">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="paragraph"><p>A different host:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">URI</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:uri</font></b>(<font color="#009900">Req</font>, #{<font color="#0000FF">qs</font> <font color="#990000">=&gt;</font> <font color="#000080">undefined</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>A different host:</p>
+<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">URI</span> <span style="color: #990000">=</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: #990000">&lt;&lt;</span><span style="color: #FF0000">"example.org"</span><span style="color: #990000">&gt;&gt;</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>And any other combination.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">URI</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:uri</font></b>(<font color="#009900">Req</font>, #{<font color="#0000FF">host</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"example.org"</font><font color="#990000">&gt;&gt;</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>And any other combination.</p>
<h2 id="_bindings">Bindings</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Bindings are the host and path components that you chose
-to extract when defining the routes of your application.
-They are only available after the routing.</p></div>
-<div class="paragraph"><p>Cowboy provides functions to retrieve one or all bindings.</p></div>
-<div class="paragraph"><p>To retrieve a single value:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Bindings are the host and path components that you chose to extract when defining the routes of your application. They are only available after the routing.</p>
+<p>Cowboy provides functions to retrieve one or all bindings.</p>
+<p>To retrieve a single value:</p>
+<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">Value</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:binding</span></span>(<span style="color: #FF6600">userid</span>, <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>When attempting to retrieve a value that was not bound,
-<code>undefined</code> will be returned. A different default value
-can be provided:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Value</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:binding</font></b>(<font color="#FF6600">userid</font>, <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>When attempting to retrieve a value that was not bound, <code>undefined</code> will be returned. A different default value can be provided:</p>
+<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">Value</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:binding</span></span>(<span style="color: #FF6600">userid</span>, <span style="color: #009900">Req</span>, <span style="color: #993399">42</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>To retrieve everything that was bound:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Value</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:binding</font></b>(<font color="#FF6600">userid</font>, <font color="#009900">Req</font>, <font color="#993399">42</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>To retrieve everything that was bound:</p>
+<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">Bindings</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:bindings</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>They are returned as a map, with keys being atoms.</p></div>
-<div class="paragraph"><p>The Cowboy router also allows you to capture many host
-or path segments at once using the <code>...</code> qualifier.</p></div>
-<div class="paragraph"><p>To retrieve the segments captured from the host name:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Bindings</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:bindings</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>They are returned as a map, with keys being atoms.</p>
+<p>The Cowboy router also allows you to capture many host or path segments at once using the <code>...</code> qualifier.</p>
+<p>To retrieve the segments captured from the host name:</p>
+<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">HostInfo</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:host_info</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>And the path segments:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">HostInfo</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:host_info</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>And the path segments:</p>
+<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">PathInfo</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:path_info</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Cowboy will return <code>undefined</code> if <code>...</code> was not used
-in the route.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">PathInfo</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:path_info</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Cowboy will return <code>undefined</code> if <code>...</code> was not used in the route.</p>
<h2 id="_query_parameters">Query parameters</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy provides two functions to access query parameters.
-You can use the first to get the entire list of parameters.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Cowboy provides two functions to access query parameters. You can use the first to get the entire list of parameters.</p>
+<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">QsVals</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:parse_qs</span></span>(<span style="color: #009900">Req</span>),
-{<span style="color: #990000">_</span>, <span style="color: #009900">Lang</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">lists:keyfind</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"lang"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #993399">1</span>, <span style="color: #009900">QsVals</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Cowboy will only parse the query string, and not do any
-transformation. This function may therefore return duplicates,
-or parameter names without an associated value. The order of
-the list returned is undefined.</p></div>
-<div class="paragraph"><p>When a query string is <code>key=1&amp;key=2</code>, the list returned will
-contain two parameters of name <code>key</code>.</p></div>
-<div class="paragraph"><p>The same is true when trying to use the PHP-style suffix <code>[]</code>.
-When a query string is <code>key[]=1&amp;key[]=2</code>, the list returned will
-contain two parameters of name <code>key[]</code>.</p></div>
-<div class="paragraph"><p>When a query string is simply <code>key</code>, Cowboy will return the
-list <code>[{&lt;&lt;"key"&gt;&gt;, true}]</code>, using <code>true</code> to indicate that the
-parameter <code>key</code> was defined, but with no value.</p></div>
-<div class="paragraph"><p>The second function Cowboy provides allows you to match out
-only the parameters you are interested in, and at the same
-time do any post processing you require using <a href="../constraints">constraints</a>.
-This function returns a map.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">QsVals</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:parse_qs</font></b>(<font color="#009900">Req</font>),
+{<font color="#990000">_</font>, <font color="#009900">Lang</font>} <font color="#990000">=</font> <b><font color="#000000">lists:keyfind</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"lang"</font><font color="#990000">&gt;&gt;</font>, <font color="#993399">1</font>, <font color="#009900">QsVals</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Cowboy will only parse the query string, and not do any transformation. This function may therefore return duplicates, or parameter names without an associated value. The order of the list returned is undefined.</p>
+<p>When a query string is <code>key=1&amp;key=2</code>, the list returned will contain two parameters of name <code>key</code>.</p>
+<p>The same is true when trying to use the PHP-style suffix <code>[]</code>. When a query string is <code>key[]=1&amp;key[]=2</code>, the list returned will contain two parameters of name <code>key[]</code>.</p>
+<p>When a query string is simply <code>key</code>, Cowboy will return the list <code>[{&lt;&lt;&quot;key&quot;&gt;&gt;, true}]</code>, using <code>true</code> to indicate that the parameter <code>key</code> was defined, but with no value.</p>
+<p>The second function Cowboy provides allows you to match out only the parameters you are interested in, and at the same time do any post processing you require using <a href="../constraints">constraints</a>. This function returns a map.</p>
+<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">id</span> <span style="color: #990000">:=</span> <span style="color: #009900">ID</span>, <span style="color: #FF6600">lang</span> <span style="color: #990000">:=</span> <span style="color: #009900">Lang</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:match_qs</span></span>([<span style="color: #FF6600">id</span>, <span style="color: #FF6600">lang</span>], <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Constraints can be applied automatically. The following
-snippet will crash when the <code>id</code> parameter is not an integer,
-or when the <code>lang</code> parameter is empty. At the same time, the
-value for <code>id</code> will be converted to an integer term:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>#{<font color="#FF6600">id</font> <font color="#990000">:=</font> <font color="#009900">ID</font>, <font color="#FF6600">lang</font> <font color="#990000">:=</font> <font color="#009900">Lang</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:match_qs</font></b>([<font color="#FF6600">id</font>, <font color="#FF6600">lang</font>], <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Constraints can be applied automatically. The following snippet will crash when the <code>id</code> parameter is not an integer, or when the <code>lang</code> parameter is empty. At the same time, the value for <code>id</code> will be converted to an integer term:</p>
+<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">QsMap</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:match_qs</span></span>([{<span style="color: #FF6600">id</span>, <span style="color: #FF6600">int</span>}, {<span style="color: #FF6600">lang</span>, <span style="color: #FF6600">nonempty</span>}], <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>A default value may also be provided. The default will be used
-if the <code>lang</code> key is not found. It will not be used if
-the key is found but has an empty value.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">QsMap</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:match_qs</font></b>([{<font color="#FF6600">id</font>, <font color="#FF6600">int</font>}, {<font color="#FF6600">lang</font>, <font color="#FF6600">nonempty</font>}], <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>A default value may also be provided. The default will be used if the <code>lang</code> key is not found. It will not be used if the key is found but has an empty value.</p>
+<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">lang</span> <span style="color: #990000">:=</span> <span style="color: #009900">Lang</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:match_qs</span></span>([{<span style="color: #FF6600">lang</span>, [], <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"en-US"</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="paragraph"><p>If no default is provided and the value is missing, the
-query string is deemed invalid and the process will crash.</p></div>
-<div class="paragraph"><p>When the query string is <code>key=1&amp;key=2</code>, the value for <code>key</code>
-will be the list <code>[1, 2]</code>. Parameter names do not need to
-include the PHP-style suffix. Constraints may be used to
-ensure that only one value was passed through.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>#{<font color="#FF6600">lang</font> <font color="#990000">:=</font> <font color="#009900">Lang</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:match_qs</font></b>([{<font color="#FF6600">lang</font>, [], <font color="#990000">&lt;&lt;</font><font color="#FF0000">"en-US"</font><font color="#990000">&gt;&gt;</font>}], <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>If no default is provided and the value is missing, the query string is deemed invalid and the process will crash.</p>
+<p>When the query string is <code>key=1&amp;key=2</code>, the value for <code>key</code> will be the list <code>[1, 2]</code>. Parameter names do not need to include the PHP-style suffix. Constraints may be used to ensure that only one value was passed through.</p>
<h2 id="_headers">Headers</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Header values can be retrieved either as a binary string
-or parsed into a more meaningful representation.</p></div>
-<div class="paragraph"><p>The get the raw value:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Header values can be retrieved either as a binary string or parsed into a more meaningful representation.</p>
+<p>The get the raw value:</p>
+<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">HeaderVal</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-type"</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="paragraph"><p>Cowboy expects all header names to be provided as lowercase
-binary strings. This is true for both requests and responses,
-regardless of the underlying protocol.</p></div>
-<div class="paragraph"><p>When the header is missing from the request, <code>undefined</code>
-will be returned. A different default can be provided:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">HeaderVal</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Cowboy expects all header names to be provided as lowercase binary strings. This is true for both requests and responses, regardless of the underlying protocol.</p>
+<p>When the header is missing from the request, <code>undefined</code> will be returned. A different default can be provided:</p>
+<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">HeaderVal</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-type"</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">"text/plain"</span><span style="color: #990000">&gt;&gt;</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>All headers can be retrieved at once, either directly:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">HeaderVal</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/plain"</font><font color="#990000">&gt;&gt;</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>All headers can be retrieved at once, either directly:</p>
+<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">AllHeaders</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>Or using a function:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>#{<font color="#FF6600">headers</font> <font color="#990000">:=</font> <font color="#009900">AllHeaders</font>} <font color="#990000">=</font> <font color="#009900">Req</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Or using a function:</p>
+<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">AllHeaders</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 class="paragraph"><p>Cowboy provides equivalent functions to parse individual
-headers. There is no function to parse all headers at once.</p></div>
-<div class="paragraph"><p>To parse a specific header:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">AllHeaders</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:headers</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Cowboy provides equivalent functions to parse individual headers. There is no function to parse all headers at once.</p>
+<p>To parse a specific header:</p>
+<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">ParsedVal</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:parse_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</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="paragraph"><p>An exception will be thrown if it doesn&#8217;t know how to parse the
-given header, or if the value is invalid. The list of known headers
-and default values can be found in the manual.</p></div>
-<div class="paragraph"><p>When the header is missing, <code>undefined</code> is returned. You can
-change the default value. Note that it should be the parsed value
-directly:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">ParsedVal</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:parse_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>An exception will be thrown if it doesn&apos;t know how to parse the given header, or if the value is invalid. The list of known headers and default values can be found in the manual.</p>
+<p>When the header is missing, <code>undefined</code> is returned. You can change the default value. Note that it should be the parsed value directly:</p>
+<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">ParsedVal</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:parse_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</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">"text"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"plain"</span><span style="color: #990000">&gt;&gt;</span>, []})<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">ParsedVal</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:parse_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>,
+ {<font color="#990000">&lt;&lt;</font><font color="#FF0000">"text"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"plain"</font><font color="#990000">&gt;&gt;</font>, []})<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_peer">Peer</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The peer address and port number for the connection can be
-retrieved either directly or using a function.</p></div>
-<div class="paragraph"><p>To retrieve the peer directly:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The peer address and port number for the connection can be retrieved either directly or using a function.</p>
+<p>To retrieve the peer directly:</p>
+<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 class="paragraph"><p>And using a function:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>#{<font color="#FF6600">peer</font> <font color="#990000">:=</font> {<font color="#009900">IP</font>, <font color="#009900">Port</font>}} <font color="#990000">=</font> <font color="#009900">Req</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>And using a function:</p>
+<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">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 class="paragraph"><p>Note that the peer corresponds to the remote end of the
-connection to the server, which may or may not be the
-client itself. It may also be a proxy or a gateway.</p></div>
-</div>
-</div>
+<pre><tt>{<font color="#009900">IP</font>, <font color="#009900">Port</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:peer</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Note that the peer corresponds to the remote end of the connection to the server, which may or may not be the client itself. It may also be a proxy or a gateway.</p>
+
diff --git a/docs/en/cowboy/2.4/guide/req_body/index.html b/docs/en/cowboy/2.4/guide/req_body/index.html
index 3ced946f..1f642ae1 100644
--- a/docs/en/cowboy/2.4/guide/req_body/index.html
+++ b/docs/en/cowboy/2.4/guide/req_body/index.html
@@ -62,144 +62,93 @@
<h1 class="lined-header"><span>Reading the request body</span></h1>
-<div class="paragraph"><p>The request body can be read using the Req object.</p></div>
-<div class="paragraph"><p>Cowboy will not attempt to read the body until requested.
-You need to call the body reading functions in order to
-retrieve it.</p></div>
-<div class="paragraph"><p>Cowboy will not cache the body, it is therefore only
-possible to read it once.</p></div>
-<div class="paragraph"><p>You are not required to read it, however. If a body is
-present and was not read, Cowboy will either cancel or
-skip its download, depending on the protocol.</p></div>
-<div class="paragraph"><p>Cowboy provides functions for reading the body raw,
-and read and parse form urlencoded or <a href="../multipart">multipart bodies</a>.
-The latter is covered in its own chapter.</p></div>
-<div class="sect1">
+<p>The request body can be read using the Req object.</p>
+<p>Cowboy will not attempt to read the body until requested. You need to call the body reading functions in order to retrieve it.</p>
+<p>Cowboy will not cache the body, it is therefore only possible to read it once.</p>
+<p>You are not required to read it, however. If a body is present and was not read, Cowboy will either cancel or skip its download, depending on the protocol.</p>
+<p>Cowboy provides functions for reading the body raw, and read and parse form urlencoded or <a href="../multipart">multipart bodies</a>. The latter is covered in its own chapter.</p>
<h2 id="_request_body_presence">Request body presence</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Not all requests come with a body. You can check for
-the presence of a request body with this function:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Not all requests come with a body. You can check for the presence of a request body with this function:</p>
+<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">cowboy_req:has_body</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>It returns <code>true</code> if there is a body; <code>false</code> otherwise.</p></div>
-<div class="paragraph"><p>In practice, this function is rarely used. When the
-method is <code>POST</code>, <code>PUT</code> or <code>PATCH</code>, the request body
-is often required by the application, which should
-just attempt to read it directly.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">cowboy_req:has_body</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>It returns <code>true</code> if there is a body; <code>false</code> otherwise.</p>
+<p>In practice, this function is rarely used. When the method is <code>POST</code>, <code>PUT</code> or <code>PATCH</code>, the request body is often required by the application, which should just attempt to read it directly.</p>
<h2 id="_request_body_length">Request body length</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>You can obtain the length of the body:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>You can obtain the length of the body:</p>
+<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">Length</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:body_length</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Note that the length may not be known in advance. In
-that case <code>undefined</code> will be returned. This can happen
-with HTTP/1.1&#8217;s chunked transfer-encoding, or HTTP/2
-when no content-length was provided.</p></div>
-<div class="paragraph"><p>Cowboy will update the body length in the Req object
-once the body has been read completely. A length will
-always be returned when attempting to call this function
-after reading the body completely.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Length</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:body_length</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Note that the length may not be known in advance. In that case <code>undefined</code> will be returned. This can happen with HTTP/1.1&apos;s chunked transfer-encoding, or HTTP/2 when no content-length was provided.</p>
+<p>Cowboy will update the body length in the Req object once the body has been read completely. A length will always be returned when attempting to call this function after reading the body completely.</p>
<h2 id="_reading_the_body">Reading the body</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>You can read the entire body with one function call:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>You can read the entire body with one function call:</p>
+<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">ok</span>, <span style="color: #009900">Data</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:read_body</span></span>(<span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Cowboy returns an <code>ok</code> tuple when the body has been
-read fully.</p></div>
-<div class="paragraph"><p>By default, Cowboy will attempt to read up to 8MB
-of data, for up to 15 seconds. The call will return
-once Cowboy has read at least 8MB of data, or at
-the end of the 15 seconds period.</p></div>
-<div class="paragraph"><p>These values can be customized. For example, to read
-only up to 1MB for up to 5 seconds:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#009900">Data</font>, <font color="#009900">Req</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:read_body</font></b>(<font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Cowboy returns an <code>ok</code> tuple when the body has been read fully.</p>
+<p>By default, Cowboy will attempt to read up to 8MB of data, for up to 15 seconds. The call will return once Cowboy has read at least 8MB of data, or at the end of the 15 seconds period.</p>
+<p>These values can be customized. For example, to read only up to 1MB for up to 5 seconds:</p>
+<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">ok</span>, <span style="color: #009900">Data</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:read_body</span></span>(<span style="color: #009900">Req0</span>,
- #{<span style="font-weight: bold"><span style="color: #000080">length</span></span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">1000000</span>, <span style="color: #0000FF">period</span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">5000</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>You may also disable the length limit:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#009900">Data</font>, <font color="#009900">Req</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:read_body</font></b>(<font color="#009900">Req0</font>,
+ #{<b><font color="#000080">length</font></b> <font color="#990000">=&gt;</font> <font color="#993399">1000000</font>, <font color="#0000FF">period</font> <font color="#990000">=&gt;</font> <font color="#993399">5000</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>You may also disable the length limit:</p>
+<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">ok</span>, <span style="color: #009900">Data</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:read_body</span></span>(<span style="color: #009900">Req0</span>, #{<span style="font-weight: bold"><span style="color: #000080">length</span></span> <span style="color: #990000">=&gt;</span> <span style="color: #FF6600">infinity</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>This makes the function wait 15 seconds and return with
-whatever arrived during that period. This is not
-recommended for public facing applications.</p></div>
-<div class="paragraph"><p>These two options can effectively be used to control
-the rate of transmission of the request body.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#009900">Data</font>, <font color="#009900">Req</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:read_body</font></b>(<font color="#009900">Req0</font>, #{<b><font color="#000080">length</font></b> <font color="#990000">=&gt;</font> <font color="#FF6600">infinity</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>This makes the function wait 15 seconds and return with whatever arrived during that period. This is not recommended for public facing applications.</p>
+<p>These two options can effectively be used to control the rate of transmission of the request body.</p>
<h2 id="_streaming_the_body">Streaming the body</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>When the body is too large, the first call will return
-a <code>more</code> tuple instead of <code>ok</code>. You can call the
-function again to read more of the body, reading
-it one chunk at a time.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>When the body is too large, the first call will return a <code>more</code> tuple instead of <code>ok</code>. You can call the function again to read more of the body, reading it one chunk at a time.</p>
+<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_to_console</span></span>(<span style="color: #009900">Req0</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">cowboy_req:read_body</span></span>(<span style="color: #009900">Req0</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Data</span>, <span style="color: #009900">Req</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"</span>, [<span style="color: #009900">Data</span>]),
- <span style="color: #009900">Req</span>;
- {<span style="color: #FF6600">more</span>, <span style="color: #009900">Data</span>, <span style="color: #009900">Req</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"</span>, [<span style="color: #009900">Data</span>]),
- <span style="font-weight: bold"><span style="color: #000000">read_body_to_console</span></span>(<span style="color: #009900">Req</span>)
- <span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>The <code>length</code> and <code>period</code> options can also be used.
-They need to be passed for every call.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">read_body_to_console</font></b>(<font color="#009900">Req0</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">case</font></b> <b><font color="#000000">cowboy_req:read_body</font></b>(<font color="#009900">Req0</font>) <b><font color="#0000FF">of</font></b>
+ {<font color="#FF6600">ok</font>, <font color="#009900">Data</font>, <font color="#009900">Req</font>} <font color="#990000">-&gt;</font>
+ <b><font color="#000000">io:format</font></b>(<font color="#FF0000">"~s"</font>, [<font color="#009900">Data</font>]),
+ <font color="#009900">Req</font>;
+ {<font color="#FF6600">more</font>, <font color="#009900">Data</font>, <font color="#009900">Req</font>} <font color="#990000">-&gt;</font>
+ <b><font color="#000000">io:format</font></b>(<font color="#FF0000">"~s"</font>, [<font color="#009900">Data</font>]),
+ <b><font color="#000000">read_body_to_console</font></b>(<font color="#009900">Req</font>)
+ <b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>The <code>length</code> and <code>period</code> options can also be used. They need to be passed for every call.</p>
<h2 id="_reading_a_form_urlencoded_body">Reading a form urlencoded body</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy provides a convenient function for reading and
-parsing bodies sent as application/x-www-form-urlencoded.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Cowboy provides a convenient function for reading and parsing bodies sent as application/x-www-form-urlencoded.</p>
+<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">ok</span>, <span style="color: #009900">KeyValues</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:read_urlencoded_body</span></span>(<span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>This function returns a list of key/values, exactly like
-the function <code>cowboy_req:parse_qs/1</code>.</p></div>
-<div class="paragraph"><p>The defaults for this function are different. Cowboy will
-read for up to 64KB and up to 5 seconds. They can be modified:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#009900">KeyValues</font>, <font color="#009900">Req</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:read_urlencoded_body</font></b>(<font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>This function returns a list of key/values, exactly like the function <code>cowboy_req:parse_qs/1</code>.</p>
+<p>The defaults for this function are different. Cowboy will read for up to 64KB and up to 5 seconds. They can be modified:</p>
+<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">ok</span>, <span style="color: #009900">KeyValues</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:read_urlencoded_body</span></span>(<span style="color: #009900">Req0</span>,
- #{<span style="font-weight: bold"><span style="color: #000080">length</span></span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">4096</span>, <span style="color: #0000FF">period</span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">3000</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#009900">KeyValues</font>, <font color="#009900">Req</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:read_urlencoded_body</font></b>(<font color="#009900">Req0</font>,
+ #{<b><font color="#000080">length</font></b> <font color="#990000">=&gt;</font> <font color="#993399">4096</font>, <font color="#0000FF">period</font> <font color="#990000">=&gt;</font> <font color="#993399">3000</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+
diff --git a/docs/en/cowboy/2.4/guide/resource_design/index.html b/docs/en/cowboy/2.4/guide/resource_design/index.html
index c0b9fc1d..ca63c33d 100644
--- a/docs/en/cowboy/2.4/guide/resource_design/index.html
+++ b/docs/en/cowboy/2.4/guide/resource_design/index.html
@@ -62,213 +62,66 @@
<h1 class="lined-header"><span>Designing a resource handler</span></h1>
-<div class="paragraph"><p>This chapter aims to provide you with a list of questions
-you must answer in order to write a good resource handler.
-It is meant to be usable as a step by step guide.</p></div>
-<div class="sect1">
+<p>This chapter aims to provide you with a list of questions you must answer in order to write a good resource handler. It is meant to be usable as a step by step guide.</p>
<h2 id="_the_service">The service</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Can the service become unavailable, and when it does, can
-we detect it? For example, database connectivity problems
-may be detected early. We may also have planned outages
-of all or parts of the system. Implement the
-<code>service_available</code> callback.</p></div>
-<div class="paragraph"><p>What HTTP methods does the service implement? Do we need
-more than the standard OPTIONS, HEAD, GET, PUT, POST,
-PATCH and DELETE? Are we not using one of those at all?
-Implement the <code>known_methods</code> callback.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Can the service become unavailable, and when it does, can we detect it? For example, database connectivity problems may be detected early. We may also have planned outages of all or parts of the system. Implement the <code>service_available</code> callback.</p>
+<p>What HTTP methods does the service implement? Do we need more than the standard OPTIONS, HEAD, GET, PUT, POST, PATCH and DELETE? Are we not using one of those at all? Implement the <code>known_methods</code> callback.</p>
<h2 id="_type_of_resource_handler">Type of resource handler</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Am I writing a handler for a collection of resources,
-or for a single resource?</p></div>
-<div class="paragraph"><p>The semantics for each of these are quite different.
-You should not mix collection and single resource in
-the same handler.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Am I writing a handler for a collection of resources, or for a single resource?</p>
+<p>The semantics for each of these are quite different. You should not mix collection and single resource in the same handler.</p>
<h2 id="_collection_handler">Collection handler</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Skip this section if you are not doing a collection.</p></div>
-<div class="paragraph"><p>Is the collection hardcoded or dynamic? For example,
-if you use the route <code>/users</code> for the collection of
-users then the collection is hardcoded; if you use
-<code>/forums/:category</code> for the collection of threads
-then it isn&#8217;t. When the collection is hardcoded you
-can safely assume the resource always exists.</p></div>
-<div class="paragraph"><p>What methods should I implement?</p></div>
-<div class="paragraph"><p>OPTIONS is used to get some information about the
-collection. It is recommended to allow it even if you
-do not implement it, as Cowboy has a default
-implementation built-in.</p></div>
-<div class="paragraph"><p>HEAD and GET are used to retrieve the collection.
-If you allow GET, also allow HEAD as there&#8217;s no extra
-work required to make it work.</p></div>
-<div class="paragraph"><p>POST is used to create a new resource inside the
-collection. Creating a resource by using POST on
-the collection is useful when resources may be
-created before knowing their URI, usually because
-parts of it are generated dynamically. A common
-case is some kind of auto incremented integer
-identifier.</p></div>
-<div class="paragraph"><p>The next methods are more rarely allowed.</p></div>
-<div class="paragraph"><p>PUT is used to create a new collection (when
-the collection isn&#8217;t hardcoded), or replace
-the entire collection.</p></div>
-<div class="paragraph"><p>DELETE is used to delete the entire collection.</p></div>
-<div class="paragraph"><p>PATCH is used to modify the collection using
-instructions given in the request body. A PATCH
-operation is atomic. The PATCH operation may
-be used for such things as reordering; adding,
-modifying or deleting parts of the collection.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Skip this section if you are not doing a collection.</p>
+<p>Is the collection hardcoded or dynamic? For example, if you use the route <code>/users</code> for the collection of users then the collection is hardcoded; if you use <code>/forums/:category</code> for the collection of threads then it isn&apos;t. When the collection is hardcoded you can safely assume the resource always exists.</p>
+<p>What methods should I implement?</p>
+<p>OPTIONS is used to get some information about the collection. It is recommended to allow it even if you do not implement it, as Cowboy has a default implementation built-in.</p>
+<p>HEAD and GET are used to retrieve the collection. If you allow GET, also allow HEAD as there&apos;s no extra work required to make it work.</p>
+<p>POST is used to create a new resource inside the collection. Creating a resource by using POST on the collection is useful when resources may be created before knowing their URI, usually because parts of it are generated dynamically. A common case is some kind of auto incremented integer identifier.</p>
+<p>The next methods are more rarely allowed.</p>
+<p>PUT is used to create a new collection (when the collection isn&apos;t hardcoded), or replace the entire collection.</p>
+<p>DELETE is used to delete the entire collection.</p>
+<p>PATCH is used to modify the collection using instructions given in the request body. A PATCH operation is atomic. The PATCH operation may be used for such things as reordering; adding, modifying or deleting parts of the collection.</p>
<h2 id="_single_resource_handler">Single resource handler</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Skip this section if you are doing a collection.</p></div>
-<div class="paragraph"><p>What methods should I implement?</p></div>
-<div class="paragraph"><p>OPTIONS is used to get some information about the
-resource. It is recommended to allow it even if you
-do not implement it, as Cowboy has a default
-implementation built-in.</p></div>
-<div class="paragraph"><p>HEAD and GET are used to retrieve the resource.
-If you allow GET, also allow HEAD as there&#8217;s no extra
-work required to make it work.</p></div>
-<div class="paragraph"><p>POST is used to update the resource.</p></div>
-<div class="paragraph"><p>PUT is used to create a new resource (when it doesn&#8217;t
-already exist) or replace the resource.</p></div>
-<div class="paragraph"><p>DELETE is used to delete the resource.</p></div>
-<div class="paragraph"><p>PATCH is used to modify the resource using
-instructions given in the request body. A PATCH
-operation is atomic. The PATCH operation may
-be used for adding, removing or modifying specific
-values in the resource.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Skip this section if you are doing a collection.</p>
+<p>What methods should I implement?</p>
+<p>OPTIONS is used to get some information about the resource. It is recommended to allow it even if you do not implement it, as Cowboy has a default implementation built-in.</p>
+<p>HEAD and GET are used to retrieve the resource. If you allow GET, also allow HEAD as there&apos;s no extra work required to make it work.</p>
+<p>POST is used to update the resource.</p>
+<p>PUT is used to create a new resource (when it doesn&apos;t already exist) or replace the resource.</p>
+<p>DELETE is used to delete the resource.</p>
+<p>PATCH is used to modify the resource using instructions given in the request body. A PATCH operation is atomic. The PATCH operation may be used for adding, removing or modifying specific values in the resource.</p>
<h2 id="_the_resource">The resource</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Following the above discussion, implement the
-<code>allowed_methods</code> callback.</p></div>
-<div class="paragraph"><p>Does the resource always exist? If it may not, implement
-the <code>resource_exists</code> callback.</p></div>
-<div class="paragraph"><p>Do I need to authenticate the client before they can
-access the resource? What authentication mechanisms
-should I provide? This may include form-based, token-based
-(in the URL or a cookie), HTTP basic, HTTP digest,
-SSL certificate or any other form of authentication.
-Implement the <code>is_authorized</code> callback.</p></div>
-<div class="paragraph"><p>Do I need fine-grained access control? How do I determine
-that they are authorized access? Handle that in your
-<code>is_authorized</code> callback.</p></div>
-<div class="paragraph"><p>Can access to a resource be forbidden regardless of access
-being authorized? A simple example of that is censorship
-of a resource. Implement the <code>forbidden</code> callback.</p></div>
-<div class="paragraph"><p>Are there any constraints on the length of the resource URI?
-For example, the URI may be used as a key in storage and may
-have a limit in length. Implement <code>uri_too_long</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Following the above discussion, implement the <code>allowed_methods</code> callback.</p>
+<p>Does the resource always exist? If it may not, implement the <code>resource_exists</code> callback.</p>
+<p>Do I need to authenticate the client before they can access the resource? What authentication mechanisms should I provide? This may include form-based, token-based (in the URL or a cookie), HTTP basic, HTTP digest, SSL certificate or any other form of authentication. Implement the <code>is_authorized</code> callback.</p>
+<p>Do I need fine-grained access control? How do I determine that they are authorized access? Handle that in your <code>is_authorized</code> callback.</p>
+<p>Can access to a resource be forbidden regardless of access being authorized? A simple example of that is censorship of a resource. Implement the <code>forbidden</code> callback.</p>
+<p>Are there any constraints on the length of the resource URI? For example, the URI may be used as a key in storage and may have a limit in length. Implement <code>uri_too_long</code>.</p>
<h2 id="_representations">Representations</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>What media types do I provide? If text based, what charsets
-are provided? What languages do I provide?</p></div>
-<div class="paragraph"><p>Implement the mandatory <code>content_types_provided</code>. Prefix
-the callbacks with <code>to_</code> for clarity. For example, <code>to_html</code>
-or <code>to_text</code>.</p></div>
-<div class="paragraph"><p>Implement the <code>languages_provided</code> or <code>charsets_provided</code>
-callbacks if applicable.</p></div>
-<div class="paragraph"><p>Is there any other header that may make the representation
-of the resource vary? Implement the <code>variances</code> callback.</p></div>
-<div class="paragraph"><p>Depending on your choices for caching content, you may
-want to implement one or more of the <code>generate_etag</code>,
-<code>last_modified</code> and <code>expires</code> callbacks.</p></div>
-<div class="paragraph"><p>Do I want the user or user agent to actively choose a
-representation available? Send a list of available
-representations in the response body and implement
-the <code>multiple_choices</code> callback.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>What media types do I provide? If text based, what charsets are provided? What languages do I provide?</p>
+<p>Implement the mandatory <code>content_types_provided</code>. Prefix the callbacks with <code>to_</code> for clarity. For example, <code>to_html</code> or <code>to_text</code>.</p>
+<p>Implement the <code>languages_provided</code> or <code>charsets_provided</code> callbacks if applicable.</p>
+<p>Is there any other header that may make the representation of the resource vary? Implement the <code>variances</code> callback.</p>
+<p>Depending on your choices for caching content, you may want to implement one or more of the <code>generate_etag</code>, <code>last_modified</code> and <code>expires</code> callbacks.</p>
+<p>Do I want the user or user agent to actively choose a representation available? Send a list of available representations in the response body and implement the <code>multiple_choices</code> callback.</p>
<h2 id="_redirections">Redirections</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Do I need to keep track of what resources were deleted?
-For example, you may have a mechanism where moving a
-resource leaves a redirect link to its new location.
-Implement the <code>previously_existed</code> callback.</p></div>
-<div class="paragraph"><p>Was the resource moved, and is the move temporary? If
-it is explicitly temporary, for example due to maintenance,
-implement the <code>moved_temporarily</code> callback. Otherwise,
-implement the <code>moved_permanently</code> callback.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Do I need to keep track of what resources were deleted? For example, you may have a mechanism where moving a resource leaves a redirect link to its new location. Implement the <code>previously_existed</code> callback.</p>
+<p>Was the resource moved, and is the move temporary? If it is explicitly temporary, for example due to maintenance, implement the <code>moved_temporarily</code> callback. Otherwise, implement the <code>moved_permanently</code> callback.</p>
<h2 id="_the_request">The request</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Do you need to read the query string? Individual headers?
-Implement <code>malformed_request</code> and do all the parsing and
-validation in this function. Note that the body should not
-be read at this point.</p></div>
-<div class="paragraph"><p>May there be a request body? Will I know its size?
-What&#8217;s the maximum size of the request body I&#8217;m willing
-to accept? Implement <code>valid_entity_length</code>.</p></div>
-<div class="paragraph"><p>Finally, take a look at the sections corresponding to the
-methods you are implementing.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Do you need to read the query string? Individual headers? Implement <code>malformed_request</code> and do all the parsing and validation in this function. Note that the body should not be read at this point.</p>
+<p>May there be a request body? Will I know its size? What&apos;s the maximum size of the request body I&apos;m willing to accept? Implement <code>valid_entity_length</code>.</p>
+<p>Finally, take a look at the sections corresponding to the methods you are implementing.</p>
<h2 id="_options_method">OPTIONS method</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy by default will send back a list of allowed methods.
-Do I need to add more information to the response? Implement
-the <code>options</code> method.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Cowboy by default will send back a list of allowed methods. Do I need to add more information to the response? Implement the <code>options</code> method.</p>
<h2 id="_get_and_head_methods">GET and HEAD methods</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>If you implement the methods GET and/or HEAD, you must
-implement one <code>ProvideResource</code> callback for each
-content-type returned by the <code>content_types_provided</code>
-callback.</p></div>
-</div>
-</div>
-<div class="sect1">
-<h2 id="_put_post_and_patch_methods">PUT, POST and PATCH methods</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>If you implement the methods PUT, POST and/or PATCH,
-you must implement the <code>content_types_accepted</code> callback,
-and one <code>AcceptCallback</code> callback for each content-type
-it returns. Prefix the <code>AcceptCallback</code> callback names
-with <code>from_</code> for clarity. For example, <code>from_html</code> or
-<code>from_json</code>.</p></div>
-<div class="paragraph"><p>Do we want to allow the POST method to create individual
-resources directly through their URI (like PUT)? Implement
-the <code>allow_missing_post</code> callback. It is recommended to
-explicitly use PUT in these cases instead.</p></div>
-<div class="paragraph"><p>May there be conflicts when using PUT to create or replace
-a resource? Do we want to make sure that two updates around
-the same time are not cancelling one another? Implement the
-<code>is_conflict</code> callback.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>If you implement the methods GET and/or HEAD, you must implement one <code>ProvideResource</code> callback for each content-type returned by the <code>content_types_provided</code> callback.</p>
+<h2 id="_put__post_and_patch_methods">PUT, POST and PATCH methods</h2>
+<p>If you implement the methods PUT, POST and/or PATCH, you must implement the <code>content_types_accepted</code> callback, and one <code>AcceptCallback</code> callback for each content-type it returns. Prefix the <code>AcceptCallback</code> callback names with <code>from_</code> for clarity. For example, <code>from_html</code> or <code>from_json</code>.</p>
+<p>Do we want to allow the POST method to create individual resources directly through their URI (like PUT)? Implement the <code>allow_missing_post</code> callback. It is recommended to explicitly use PUT in these cases instead.</p>
+<p>May there be conflicts when using PUT to create or replace a resource? Do we want to make sure that two updates around the same time are not cancelling one another? Implement the <code>is_conflict</code> callback.</p>
<h2 id="_delete_methods">DELETE methods</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>If you implement the method DELETE, you must implement
-the <code>delete_resource</code> callback.</p></div>
-<div class="paragraph"><p>When <code>delete_resource</code> returns, is the resource completely
-removed from the server, including from any caching service?
-If not, and/or if the deletion is asynchronous and we have
-no way of knowing it has been completed yet, implement the
-<code>delete_completed</code> callback.</p></div>
-</div>
-</div>
+<p>If you implement the method DELETE, you must implement the <code>delete_resource</code> callback.</p>
+<p>When <code>delete_resource</code> returns, is the resource completely removed from the server, including from any caching service? If not, and/or if the deletion is asynchronous and we have no way of knowing it has been completed yet, implement the <code>delete_completed</code> callback.</p>
+
diff --git a/docs/en/cowboy/2.4/guide/resp/index.html b/docs/en/cowboy/2.4/guide/resp/index.html
index 4d8a6a52..43106dff 100644
--- a/docs/en/cowboy/2.4/guide/resp/index.html
+++ b/docs/en/cowboy/2.4/guide/resp/index.html
@@ -62,373 +62,249 @@
<h1 class="lined-header"><span>Sending a response</span></h1>
-<div class="paragraph"><p>The response must be sent using the Req object.</p></div>
-<div class="paragraph"><p>Cowboy provides two different ways of sending responses:
-either directly or by streaming the body. Response headers
-and body may be set in advance. The response is sent as
-soon as one of the reply or stream reply function is
-called.</p></div>
-<div class="paragraph"><p>Cowboy also provides a simplified interface for sending
-files. It can also send only specific parts of a file.</p></div>
-<div class="paragraph"><p>While only one response is allowed for every request,
-HTTP/2 introduced a mechanism that allows the server
-to push additional resources related to the response.
-This chapter also describes how this feature works in
-Cowboy.</p></div>
-<div class="sect1">
+<p>The response must be sent using the Req object.</p>
+<p>Cowboy provides two different ways of sending responses: either directly or by streaming the body. Response headers and body may be set in advance. The response is sent as soon as one of the reply or stream reply function is called.</p>
+<p>Cowboy also provides a simplified interface for sending files. It can also send only specific parts of a file.</p>
+<p>While only one response is allowed for every request, HTTP/2 introduced a mechanism that allows the server to push additional resources related to the response. This chapter also describes how this feature works in Cowboy.</p>
<h2 id="_reply">Reply</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy provides three functions for sending the entire reply,
-depending on whether you need to set headers and body. In all
-cases, Cowboy will add any headers required by the protocol
-(for example the date header will always be sent).</p></div>
-<div class="paragraph"><p>When you need to set only the status code,
-use <code>cowboy_req:reply/2</code>:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Cowboy provides three functions for sending the entire reply, depending on whether you need to set headers and body. In all cases, Cowboy will add any headers required by the protocol (for example the date header will always be sent).</p>
+<p>When you need to set only the status code, use <code>cowboy_req:reply/2</code>:</p>
+<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">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">200</span>, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>When you need to set response headers at the same time,
-use <code>cowboy_req:reply/3</code>:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:reply</font></b>(<font color="#993399">200</font>, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>When you need to set response headers at the same time, use <code>cowboy_req:reply/3</code>:</p>
+<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">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">303</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="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"https://ninenines.eu"</span><span style="color: #990000">&gt;&gt;</span>
-}, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Note that the header name must always be a lowercase
-binary.</p></div>
-<div class="paragraph"><p>When you also need to set the response body,
-use <code>cowboy_req:reply/4</code>:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:reply</font></b>(<font color="#993399">303</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"location"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"https://ninenines.eu"</font><font color="#990000">&gt;&gt;</font>
+}, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Note that the header name must always be a lowercase binary.</p>
+<p>When you also need to set the response body, use <code>cowboy_req:reply/4</code>:</p>
+<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">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">200</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/plain"</span><span style="color: #990000">&gt;&gt;</span>
-}, <span style="color: #FF0000">"Hello world!"</span>, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>You should always set the content-type header when the
-response has a body. There is however no need to set
-the content-length header; Cowboy does it automatically.</p></div>
-<div class="paragraph"><p>The response body and the header values must be either
-a binary or an iolist. An iolist is a list containing
-binaries, characters, strings or other iolists. This
-allows you to build a response from different parts
-without having to do any concatenation:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:reply</font></b>(<font color="#993399">200</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/plain"</font><font color="#990000">&gt;&gt;</font>
+}, <font color="#FF0000">"Hello world!"</font>, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>You should always set the content-type header when the response has a body. There is however no need to set the content-length header; Cowboy does it automatically.</p>
+<p>The response body and the header values must be either a binary or an iolist. An iolist is a list containing binaries, characters, strings or other iolists. This allows you to build a response from different parts without having to do any concatenation:</p>
+<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">Title</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"Hello world!"</span>,
-<span style="color: #009900">Body</span> <span style="color: #990000">=</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Hats off!"</span><span style="color: #990000">&gt;&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">200</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/html"</span><span style="color: #990000">&gt;&gt;</span>
-}, [<span style="color: #FF0000">"&lt;html&gt;&lt;head&gt;&lt;title&gt;"</span>, <span style="color: #009900">Title</span>, <span style="color: #FF0000">"&lt;/title&gt;&lt;/head&gt;"</span>,
- <span style="color: #FF0000">"&lt;body&gt;&lt;p&gt;"</span>, <span style="color: #009900">Body</span>, <span style="color: #FF0000">"&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;"</span>], <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>This method of building responses is more efficient than
-concatenating. Behind the scenes, each element of the list
-is simply a pointer, and those pointers are used directly
-when writing to the socket.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Title</font> <font color="#990000">=</font> <font color="#FF0000">"Hello world!"</font>,
+<font color="#009900">Body</font> <font color="#990000">=</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"Hats off!"</font><font color="#990000">&gt;&gt;</font>,
+<font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:reply</font></b>(<font color="#993399">200</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/html"</font><font color="#990000">&gt;&gt;</font>
+}, [<font color="#FF0000">"&lt;html&gt;&lt;head&gt;&lt;title&gt;"</font>, <font color="#009900">Title</font>, <font color="#FF0000">"&lt;/title&gt;&lt;/head&gt;"</font>,
+ <font color="#FF0000">"&lt;body&gt;&lt;p&gt;"</font>, <font color="#009900">Body</font>, <font color="#FF0000">"&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;"</font>], <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>This method of building responses is more efficient than concatenating. Behind the scenes, each element of the list is simply a pointer, and those pointers are used directly when writing to the socket.</p>
<h2 id="_stream_reply">Stream reply</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy provides two functions for initiating a response,
-and an additional function for streaming the response body.
-Cowboy will add any required headers to the response.</p></div>
-<div class="paragraph"><p>When you need to set only the status code,
-use <code>cowboy_req:stream_reply/2</code>:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Cowboy provides two functions for initiating a response, and an additional function for streaming the response body. Cowboy will add any required headers to the response.</p>
+<!-- @todo For HTTP/1.1 Cowboy should probably not use chunked transfer-encoding if the content-length is set.-->
+<p>When you need to set only the status code, use <code>cowboy_req:stream_reply/2</code>:</p>
+<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">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_reply</span></span>(<span style="color: #993399">200</span>, <span style="color: #009900">Req0</span>),
-
-<span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_body</span></span>(<span style="color: #FF0000">"Hello..."</span>, <span style="color: #FF6600">nofin</span>, <span style="color: #009900">Req</span>),
-<span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_body</span></span>(<span style="color: #FF0000">"chunked..."</span>, <span style="color: #FF6600">nofin</span>, <span style="color: #009900">Req</span>),
-<span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_body</span></span>(<span style="color: #FF0000">"world!!"</span>, <span style="color: #FF6600">fin</span>, <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>The second argument to <code>cowboy_req:stream_body/3</code> indicates
-whether this data terminates the body. Use <code>fin</code> for the
-final flag, and <code>nofin</code> otherwise.</p></div>
-<div class="paragraph"><p>This snippet does not set a content-type header. This is
-not recommended. All responses with a body should have
-a content-type. The header can be set beforehand, or
-using the <code>cowboy_req:stream_reply/3</code>:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:stream_reply</font></b>(<font color="#993399">200</font>, <font color="#009900">Req0</font>),
+
+<b><font color="#000000">cowboy_req:stream_body</font></b>(<font color="#FF0000">"Hello..."</font>, <font color="#FF6600">nofin</font>, <font color="#009900">Req</font>),
+<b><font color="#000000">cowboy_req:stream_body</font></b>(<font color="#FF0000">"chunked..."</font>, <font color="#FF6600">nofin</font>, <font color="#009900">Req</font>),
+<b><font color="#000000">cowboy_req:stream_body</font></b>(<font color="#FF0000">"world!!"</font>, <font color="#FF6600">fin</font>, <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>The second argument to <code>cowboy_req:stream_body/3</code> indicates whether this data terminates the body. Use <code>fin</code> for the final flag, and <code>nofin</code> otherwise.</p>
+<p>This snippet does not set a content-type header. This is not recommended. All responses with a body should have a content-type. The header can be set beforehand, or using the <code>cowboy_req:stream_reply/3</code>:</p>
+<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">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_reply</span></span>(<span style="color: #993399">200</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/html"</span><span style="color: #990000">&gt;&gt;</span>
-}, <span style="color: #009900">Req0</span>),
-
-<span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_body</span></span>(<span style="color: #FF0000">"&lt;html&gt;&lt;head&gt;Hello world!&lt;/head&gt;"</span>, <span style="color: #FF6600">nofin</span>, <span style="color: #009900">Req</span>),
-<span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_body</span></span>(<span style="color: #FF0000">"&lt;body&gt;&lt;p&gt;Hats off!&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;"</span>, <span style="color: #FF6600">fin</span>, <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>HTTP provides a few different ways to stream response bodies.
-Cowboy will select the most appropriate one based on the HTTP
-version and the request and response headers.</p></div>
-<div class="paragraph"><p>While not required by any means, it is recommended that you
-set the content-length header in the response if you know it
-in advance. This will ensure that the best response method
-is selected and help clients understand when the response
-is fully received.</p></div>
-<div class="paragraph"><p>Cowboy also provides a function to send response trailers.
-Response trailers are semantically equivalent to the headers
-you send in the response, only they are sent at the end.
-This is especially useful to attach information to the
-response that could not be generated until the response
-body was fully generated.</p></div>
-<div class="paragraph"><p>Trailer fields must be listed in the trailer header. Any
-field not listed might be dropped by the client or an intermediary.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:stream_reply</font></b>(<font color="#993399">200</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/html"</font><font color="#990000">&gt;&gt;</font>
+}, <font color="#009900">Req0</font>),
+
+<b><font color="#000000">cowboy_req:stream_body</font></b>(<font color="#FF0000">"&lt;html&gt;&lt;head&gt;Hello world!&lt;/head&gt;"</font>, <font color="#FF6600">nofin</font>, <font color="#009900">Req</font>),
+<b><font color="#000000">cowboy_req:stream_body</font></b>(<font color="#FF0000">"&lt;body&gt;&lt;p&gt;Hats off!&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;"</font>, <font color="#FF6600">fin</font>, <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>HTTP provides a few different ways to stream response bodies. Cowboy will select the most appropriate one based on the HTTP version and the request and response headers.</p>
+<p>While not required by any means, it is recommended that you set the content-length header in the response if you know it in advance. This will ensure that the best response method is selected and help clients understand when the response is fully received.</p>
+<p>Cowboy also provides a function to send response trailers. Response trailers are semantically equivalent to the headers you send in the response, only they are sent at the end. This is especially useful to attach information to the response that could not be generated until the response body was fully generated.</p>
+<p>Trailer fields must be listed in the trailer header. Any field not listed might be dropped by the client or an intermediary.</p>
+<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">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_reply</span></span>(<span style="color: #993399">200</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/html"</span><span style="color: #990000">&gt;&gt;</span>,
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"trailer"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"expires, content-md5"</span><span style="color: #990000">&gt;&gt;</span>
-}, <span style="color: #009900">Req0</span>),
-
-<span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_body</span></span>(<span style="color: #FF0000">"&lt;html&gt;&lt;head&gt;Hello world!&lt;/head&gt;"</span>, <span style="color: #FF6600">nofin</span>, <span style="color: #009900">Req</span>),
-<span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_body</span></span>(<span style="color: #FF0000">"&lt;body&gt;&lt;p&gt;Hats off!&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;"</span>, <span style="color: #FF6600">nofin</span>, <span style="color: #009900">Req</span>),
-
-<span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_trailers</span></span>(#{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"expires"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Sun, 10 Dec 2017 19:13:47 GMT"</span><span style="color: #990000">&gt;&gt;</span>,
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-md5"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"c6081d20ff41a42ce17048ed1c0345e2"</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="paragraph"><p>The stream ends with trailers. It is no longer possible to
-send data after sending trailers. You cannot send trailers
-after setting the <code>fin</code> flag when streaming the body.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:stream_reply</font></b>(<font color="#993399">200</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/html"</font><font color="#990000">&gt;&gt;</font>,
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"trailer"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"expires, content-md5"</font><font color="#990000">&gt;&gt;</font>
+}, <font color="#009900">Req0</font>),
+
+<b><font color="#000000">cowboy_req:stream_body</font></b>(<font color="#FF0000">"&lt;html&gt;&lt;head&gt;Hello world!&lt;/head&gt;"</font>, <font color="#FF6600">nofin</font>, <font color="#009900">Req</font>),
+<b><font color="#000000">cowboy_req:stream_body</font></b>(<font color="#FF0000">"&lt;body&gt;&lt;p&gt;Hats off!&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;"</font>, <font color="#FF6600">nofin</font>, <font color="#009900">Req</font>),
+
+<b><font color="#000000">cowboy_req:stream_trailers</font></b>(#{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"expires"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"Sun, 10 Dec 2017 19:13:47 GMT"</font><font color="#990000">&gt;&gt;</font>,
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-md5"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"c6081d20ff41a42ce17048ed1c0345e2"</font><font color="#990000">&gt;&gt;</font>
+}, <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>The stream ends with trailers. It is no longer possible to send data after sending trailers. You cannot send trailers after setting the <code>fin</code> flag when streaming the body.</p>
<h2 id="_preset_response_headers">Preset response headers</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy provides functions to set response headers without
-immediately sending them. They are stored in the Req object
-and sent as part of the response when a reply function is
-called.</p></div>
-<div class="paragraph"><p>To set response headers:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Cowboy provides functions to set response headers without immediately sending them. They are stored in the Req object and sent as part of the response when a reply function is called.</p>
+<p>To set response headers:</p>
+<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">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"allow"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #FF0000">"GET"</span>, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Header names must be a lowercase binary.</p></div>
-<div class="paragraph"><p>Do not use this function for setting cookies. Refer to
-the <a href="../cookies">Cookies</a> chapter for more information.</p></div>
-<div class="paragraph"><p>To check if a response header has already been set:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"allow"</font><font color="#990000">&gt;&gt;</font>, <font color="#FF0000">"GET"</font>, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Header names must be a lowercase binary.</p>
+<p>Do not use this function for setting cookies. Refer to the <a href="../cookies">Cookies</a> chapter for more information.</p>
+<p>To check if a response header has already been set:</p>
+<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">cowboy_req:has_resp_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"allow"</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="paragraph"><p>It returns <code>true</code> if the header was set, <code>false</code> otherwise.</p></div>
-<div class="paragraph"><p>To delete a response header that was set previously:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">cowboy_req:has_resp_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"allow"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>It returns <code>true</code> if the header was set, <code>false</code> otherwise.</p>
+<p>To delete a response header that was set previously:</p>
+<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">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:delete_resp_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"allow"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:delete_resp_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"allow"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_overriding_headers">Overriding headers</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>As Cowboy provides different ways of setting response
-headers and body, clashes may occur, so it&#8217;s important
-to understand what happens when a header is set twice.</p></div>
-<div class="paragraph"><p>Headers come from five different origins:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-Protocol-specific headers (for example HTTP/1.1&#8217;s connection header)
-</p>
+<p>As Cowboy provides different ways of setting response headers and body, clashes may occur, so it&apos;s important to understand what happens when a header is set twice.</p>
+<p>Headers come from five different origins:</p>
+<ul><li>Protocol-specific headers (for example HTTP/1.1&apos;s connection header)
</li>
-<li>
-<p>
-Other required headers (for example the date header)
-</p>
+<li>Other required headers (for example the date header)
</li>
-<li>
-<p>
-Preset headers
-</p>
+<li>Preset headers
</li>
-<li>
-<p>
-Headers given to the reply function
-</p>
+<li>Headers given to the reply function
</li>
-<li>
-<p>
-Set-cookie headers
-</p>
+<li>Set-cookie headers
</li>
-</ul></div>
-<div class="paragraph"><p>Cowboy does not allow overriding protocol-specific headers.</p></div>
-<div class="paragraph"><p>Set-cookie headers will always be appended at the end of
-the list of headers before sending the response.</p></div>
-<div class="paragraph"><p>Headers given to the reply function will always override
-preset headers and required headers. If a header is found
-in two or three of these, then the one in the reply function
-is picked and the others are dropped.</p></div>
-<div class="paragraph"><p>Similarly, preset headers will always override required
-headers.</p></div>
-<div class="paragraph"><p>To illustrate, look at the following snippet. Cowboy by
-default sends the server header with the value "Cowboy".
-We can override it:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+</ul>
+<p>Cowboy does not allow overriding protocol-specific headers.</p>
+<p>Set-cookie headers will always be appended at the end of the list of headers before sending the response.</p>
+<p>Headers given to the reply function will always override preset headers and required headers. If a header is found in two or three of these, then the one in the reply function is picked and the others are dropped.</p>
+<p>Similarly, preset headers will always override required headers.</p>
+<p>To illustrate, look at the following snippet. Cowboy by default sends the server header with the value &quot;Cowboy&quot;. We can override it:</p>
+<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">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">200</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"server"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"yaws"</span><span style="color: #990000">&gt;&gt;</span>
-}, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:reply</font></b>(<font color="#993399">200</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"server"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"yaws"</font><font color="#990000">&gt;&gt;</font>
+}, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_preset_response_body">Preset response body</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy provides functions to set the response body without
-immediately sending it. It is stored in the Req object and
-sent when the reply function is called.</p></div>
-<div class="paragraph"><p>To set the response body:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Cowboy provides functions to set the response body without immediately sending it. It is stored in the Req object and sent when the reply function is called.</p>
+<p>To set the response body:</p>
+<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">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_body</span></span>(<span style="color: #FF0000">"Hello world!"</span>, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>To check if a response body has already been set:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_body</font></b>(<font color="#FF0000">"Hello world!"</font>, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<!-- @todo Yeah we probably should add that function that-->
+<!-- also sets the content-type at the same time...-->
+<p>To check if a response body has already been set:</p>
+<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">cowboy_req:has_resp_body</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>It returns <code>true</code> if the body was set and is non-empty,
-<code>false</code> otherwise.</p></div>
-<div class="paragraph"><p>The preset response body is only sent if the reply function
-used is <code>cowboy_req:reply/2</code> or <code>cowboy_req:reply/3</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">cowboy_req:has_resp_body</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>It returns <code>true</code> if the body was set and is non-empty, <code>false</code> otherwise.</p>
+<!-- @todo We probably should also have a function that-->
+<!-- properly removes the response body, including any-->
+<!-- content-* headers.-->
+<p>The preset response body is only sent if the reply function used is <code>cowboy_req:reply/2</code> or <code>cowboy_req:reply/3</code>.</p>
<h2 id="_sending_files">Sending files</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy provides a shortcut for sending files. When
-using <code>cowboy_req:reply/4</code>, or when presetting the
-response header, you can give a <code>sendfile</code> tuple to
-Cowboy:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Cowboy provides a shortcut for sending files. When using <code>cowboy_req:reply/4</code>, or when presetting the response header, you can give a <code>sendfile</code> tuple to Cowboy:</p>
+<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">sendfile</span>, <span style="color: #009900">Offset</span>, <span style="color: #009900">Length</span>, <span style="color: #009900">Filename</span>}</tt></pre></div></div>
-<div class="paragraph"><p>Depending on the values for <code>Offset</code> or <code>Length</code>, the
-entire file may be sent, or just a part of it.</p></div>
-<div class="paragraph"><p>The length is required even for sending the entire file.
-Cowboy sends it in the content-length header.</p></div>
-<div class="paragraph"><p>To send a file while replying:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>{<font color="#FF6600">sendfile</font>, <font color="#009900">Offset</font>, <font color="#009900">Length</font>, <font color="#009900">Filename</font>}</tt></pre>
+</div></div>
+<p>Depending on the values for <code>Offset</code> or <code>Length</code>, the entire file may be sent, or just a part of it.</p>
+<p>The length is required even for sending the entire file. Cowboy sends it in the content-length header.</p>
+<p>To send a file while replying:</p>
+<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">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">200</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #FF0000">"image/png"</span>
-}, {<span style="color: #FF6600">sendfile</span>, <span style="color: #993399">0</span>, <span style="color: #993399">12345</span>, <span style="color: #FF0000">"path/to/logo.png"</span>}, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:reply</font></b>(<font color="#993399">200</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#FF0000">"image/png"</font>
+}, {<font color="#FF6600">sendfile</font>, <font color="#993399">0</font>, <font color="#993399">12345</font>, <font color="#FF0000">"path/to/logo.png"</font>}, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<!-- @todo An example of presetting a file would be useful,-->
+<!-- but let&apos;s wait for the function that can set the-->
+<!-- content-type at the same time.-->
+<!-- @todo What about streaming many files? For example-->
+<!-- it should be possible to build a tar file on the fly-->
+<!-- while still using sendfile. Another example could be-->
+<!-- proper support for multipart byte ranges. Yet another-->
+<!-- example would be automatic concatenation of CSS or JS-->
+<!-- files.-->
<h2 id="_informational_responses">Informational responses</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy allows you to send informational responses.</p></div>
-<div class="paragraph"><p>Informational responses are responses that have a status
-code between 100 and 199. Any number can be sent before
-the proper response. Sending an informational response
-does not change the behavior of the proper response, and
-clients are expected to ignore any informational response
-they do not understand.</p></div>
-<div class="paragraph"><p>The following snippet sends a 103 informational response
-with some headers that are expected to be in the final
-response.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Cowboy allows you to send informational responses.</p>
+<p>Informational responses are responses that have a status code between 100 and 199. Any number can be sent before the proper response. Sending an informational response does not change the behavior of the proper response, and clients are expected to ignore any informational response they do not understand.</p>
+<p>The following snippet sends a 103 informational response with some headers that are expected to be in the final response.</p>
+<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">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:inform</span></span>(<span style="color: #993399">103</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"link"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"&lt;/style.css&gt;; rel=preload; as=style, &lt;/script.js&gt;; rel=preload; as=script"</span><span style="color: #990000">&gt;&gt;</span>
-}, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:inform</font></b>(<font color="#993399">103</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"link"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"&lt;/style.css&gt;; rel=preload; as=style, &lt;/script.js&gt;; rel=preload; as=script"</font><font color="#990000">&gt;&gt;</font>
+}, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_push">Push</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The HTTP/2 protocol introduced the ability to push resources
-related to the one sent in the response. Cowboy provides two
-functions for that purpose: <code>cowboy_req:push/3,4</code>.</p></div>
-<div class="paragraph"><p>Push is only available for HTTP/2. Cowboy will automatically
-ignore push requests if the protocol doesn&#8217;t support it.</p></div>
-<div class="paragraph"><p>The push function must be called before any of the reply
-functions. Doing otherwise will result in a crash.</p></div>
-<div class="paragraph"><p>To push a resource, you need to provide the same information
-as a client performing a request would. This includes the
-HTTP method, the URI and any necessary request headers.</p></div>
-<div class="paragraph"><p>Cowboy by default only requires you to give the path to
-the resource and the request headers. The rest of the URI
-is taken from the current request (excluding the query
-string, set to empty) and the method is GET by default.</p></div>
-<div class="paragraph"><p>The following snippet pushes a CSS file that is linked to
-in the response:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The HTTP/2 protocol introduced the ability to push resources related to the one sent in the response. Cowboy provides two functions for that purpose: <code>cowboy_req:push/3,4</code>.</p>
+<p>Push is only available for HTTP/2. Cowboy will automatically ignore push requests if the protocol doesn&apos;t support it.</p>
+<p>The push function must be called before any of the reply functions. Doing otherwise will result in a crash.</p>
+<p>To push a resource, you need to provide the same information as a client performing a request would. This includes the HTTP method, the URI and any necessary request headers.</p>
+<p>Cowboy by default only requires you to give the path to the resource and the request headers. The rest of the URI is taken from the current request (excluding the query string, set to empty) and the method is GET by default.</p>
+<p>The following snippet pushes a CSS file that is linked to in the response:</p>
+<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">cowboy_req:push</span></span>(<span style="color: #FF0000">"/static/style.css"</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"accept"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/css"</span><span style="color: #990000">&gt;&gt;</span>
-}, <span style="color: #009900">Req0</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">200</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/html"</span><span style="color: #990000">&gt;&gt;</span>
-}, [<span style="color: #FF0000">"&lt;html&gt;&lt;head&gt;&lt;title&gt;My web page&lt;/title&gt;"</span>,
- <span style="color: #FF0000">"&lt;link rel='stylesheet' type='text/css' href='/static/style.css'&gt;"</span>,
- <span style="color: #FF0000">"&lt;body&gt;&lt;p&gt;Welcome to Erlang!&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;"</span>], <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>To override the method, scheme, host, port or query string,
-simply pass in a fourth argument. The following snippet
-uses a different host name:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">cowboy_req:push</font></b>(<font color="#FF0000">"/static/style.css"</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"accept"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/css"</font><font color="#990000">&gt;&gt;</font>
+}, <font color="#009900">Req0</font>),
+<font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:reply</font></b>(<font color="#993399">200</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/html"</font><font color="#990000">&gt;&gt;</font>
+}, [<font color="#FF0000">"&lt;html&gt;&lt;head&gt;&lt;title&gt;My web page&lt;/title&gt;"</font>,
+ <font color="#FF0000">"&lt;link rel='stylesheet' type='text/css' href='/static/style.css'&gt;"</font>,
+ <font color="#FF0000">"&lt;body&gt;&lt;p&gt;Welcome to Erlang!&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;"</font>], <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>To override the method, scheme, host, port or query string, simply pass in a fourth argument. The following snippet uses a different host name:</p>
+<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">cowboy_req:push</span></span>(<span style="color: #FF0000">"/static/style.css"</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"accept"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/css"</span><span style="color: #990000">&gt;&gt;</span>
-}, #{<span style="color: #0000FF">host</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"cdn.example.org"</span><span style="color: #990000">&gt;&gt;</span>}, <span style="color: #009900">Req</span>),</tt></pre></div></div>
-<div class="paragraph"><p>Pushed resources don&#8217;t have to be files. As long as the push
-request is cacheable, safe and does not include a body, the
-resource can be pushed.</p></div>
-<div class="paragraph"><p>Under the hood, Cowboy handles pushed requests the same as
-normal requests: a different process is created which will
-ultimately send a response to the client.</p></div>
-</div>
-</div>
+<pre><tt><b><font color="#000000">cowboy_req:push</font></b>(<font color="#FF0000">"/static/style.css"</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"accept"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/css"</font><font color="#990000">&gt;&gt;</font>
+}, #{<font color="#0000FF">host</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"cdn.example.org"</font><font color="#990000">&gt;&gt;</font>}, <font color="#009900">Req</font>),</tt></pre>
+</div></div>
+<p>Pushed resources don&apos;t have to be files. As long as the push request is cacheable, safe and does not include a body, the resource can be pushed.</p>
+<p>Under the hood, Cowboy handles pushed requests the same as normal requests: a different process is created which will ultimately send a response to the client.</p>
+
diff --git a/docs/en/cowboy/2.4/guide/rest_flowcharts/index.html b/docs/en/cowboy/2.4/guide/rest_flowcharts/index.html
index 3347d7dd..c5662db1 100644
--- a/docs/en/cowboy/2.4/guide/rest_flowcharts/index.html
+++ b/docs/en/cowboy/2.4/guide/rest_flowcharts/index.html
@@ -62,244 +62,64 @@
<h1 class="lined-header"><span>REST flowcharts</span></h1>
-<div class="paragraph"><p>This chapter will explain the REST handler state machine through
-a number of different diagrams.</p></div>
-<div class="paragraph"><p>There are four main paths that requests may follow. One for the
-method OPTIONS; one for the methods GET and HEAD; one for the
-methods PUT, POST and PATCH; and one for the method DELETE.</p></div>
-<div class="paragraph"><p>All paths start with the "Start" diagram, and all paths excluding
-the OPTIONS path go through the "Content negotiation" diagram
-and optionally the "Conditional requests" diagram if the resource
-exists.</p></div>
-<div class="paragraph"><p>The red squares refer to another diagram. The light green squares
-indicate a response. Other squares may be either a callback or a
-question answered by Cowboy itself. Green arrows tend to indicate
-the default behavior if the callback is undefined.</p></div>
-<div class="sect1">
+<p>This chapter will explain the REST handler state machine through a number of different diagrams.</p>
+<p>There are four main paths that requests may follow. One for the method OPTIONS; one for the methods GET and HEAD; one for the methods PUT, POST and PATCH; and one for the method DELETE.</p>
+<p>All paths start with the &quot;Start&quot; diagram, and all paths excluding the OPTIONS path go through the &quot;Content negotiation&quot; diagram and optionally the &quot;Conditional requests&quot; diagram if the resource exists.</p>
+<p>The red squares refer to another diagram. The light green squares indicate a response. Other squares may be either a callback or a question answered by Cowboy itself. Green arrows tend to indicate the default behavior if the callback is undefined.</p>
<h2 id="_start">Start</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>All requests start from here.</p></div>
-<div class="imageblock">
-<div class="content">
-<img src="../rest_start.png" alt="REST starting flowchart" />
-</div>
-</div>
-<div class="paragraph"><p>A series of callbacks are called in succession to perform
-a general checkup of the service, the request line and
-request headers.</p></div>
-<div class="paragraph"><p>The request body, if any, is not expected to have been
-received for any of these steps. It is only processed
-at the end of the "PUT, POST and PATCH methods" diagram,
-when all conditions have been met.</p></div>
-<div class="paragraph"><p>The <code>known_methods</code> and <code>allowed_methods</code> callbacks
-return a list of methods. Cowboy then checks if the request
-method is in the list, and stops otherwise.</p></div>
-<div class="paragraph"><p>The <code>is_authorized</code> callback may be used to check that
-access to the resource is authorized. Authentication
-may also be performed as needed. When authorization is
-denied, the return value from the callback must include
-a challenge applicable to the requested resource, which
-will be sent back to the client in the www-authenticate
-header.</p></div>
-<div class="paragraph"><p>This diagram is immediately followed by either the
-"OPTIONS method" diagram when the request method is
-OPTIONS, or the "Content negotiation" diagram otherwise.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>All requests start from here.</p>
+<img src="../rest_start.png" alt="REST starting flowchart"/><p>A series of callbacks are called in succession to perform a general checkup of the service, the request line and request headers.</p>
+<p>The request body, if any, is not expected to have been received for any of these steps. It is only processed at the end of the &quot;PUT, POST and PATCH methods&quot; diagram, when all conditions have been met.</p>
+<p>The <code>known_methods</code> and <code>allowed_methods</code> callbacks return a list of methods. Cowboy then checks if the request method is in the list, and stops otherwise.</p>
+<p>The <code>is_authorized</code> callback may be used to check that access to the resource is authorized. Authentication may also be performed as needed. When authorization is denied, the return value from the callback must include a challenge applicable to the requested resource, which will be sent back to the client in the www-authenticate header.</p>
+<p>This diagram is immediately followed by either the &quot;OPTIONS method&quot; diagram when the request method is OPTIONS, or the &quot;Content negotiation&quot; diagram otherwise.</p>
<h2 id="_options_method">OPTIONS method</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This diagram only applies to OPTIONS requests.</p></div>
-<div class="imageblock">
-<div class="content">
-<img src="../rest_options.png" alt="REST OPTIONS method flowchart" />
-</div>
-</div>
-<div class="paragraph"><p>The <code>options</code> callback may be used to add information
-about the resource, such as media types or languages
-provided; allowed methods; any extra information. A
-response body may also be set, although clients should
-not be expected to read it.</p></div>
-<div class="paragraph"><p>If the <code>options</code> callback is not defined, Cowboy will
-send a response containing the list of allowed methods
-by default.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This diagram only applies to OPTIONS requests.</p>
+<img src="../rest_options.png" alt="REST OPTIONS method flowchart"/><p>The <code>options</code> callback may be used to add information about the resource, such as media types or languages provided; allowed methods; any extra information. A response body may also be set, although clients should not be expected to read it.</p>
+<p>If the <code>options</code> callback is not defined, Cowboy will send a response containing the list of allowed methods by default.</p>
<h2 id="_content_negotiation">Content negotiation</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This diagram applies to all request methods other than
-OPTIONS. It is executed right after the "Start" diagram
-is completed.</p></div>
-<div class="imageblock">
-<div class="content">
-<img src="../rest_conneg.png" alt="REST content negotiation flowchart" />
-</div>
-</div>
-<div class="paragraph"><p>The purpose of these steps is to determine an appropriate
-representation to be sent back to the client.</p></div>
-<div class="paragraph"><p>The request may contain any of the accept header; the
-accept-language header; or the accept-charset header.
-When present, Cowboy will parse the headers and then
-call the corresponding callback to obtain the list
-of provided content-type, language or charset for this
-resource. It then automatically select the best match
-based on the request.</p></div>
-<div class="paragraph"><p>If a callback is not defined, Cowboy will select the
-content-type, language or charset that the client
-prefers.</p></div>
-<div class="paragraph"><p>The <code>content_types_provided</code> also returns the name of
-a callback for every content-type it accepts. This
-callback will only be called at the end of the
-"GET and HEAD methods" diagram, when all conditions
-have been met.</p></div>
-<div class="paragraph"><p>The selected content-type, language and charset are
-saved as meta values in the Req object. You <strong>should</strong>
-use the appropriate representation if you set a
-response body manually (alongside an error code,
-for example).</p></div>
-<div class="paragraph"><p>This diagram is immediately followed by
-the "GET and HEAD methods" diagram,
-the "PUT, POST and PATCH methods" diagram,
-or the "DELETE method" diagram, depending on the
-method.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This diagram applies to all request methods other than OPTIONS. It is executed right after the &quot;Start&quot; diagram is completed.</p>
+<img src="../rest_conneg.png" alt="REST content negotiation flowchart"/><p>The purpose of these steps is to determine an appropriate representation to be sent back to the client.</p>
+<p>The request may contain any of the accept header; the accept-language header; or the accept-charset header. When present, Cowboy will parse the headers and then call the corresponding callback to obtain the list of provided content-type, language or charset for this resource. It then automatically select the best match based on the request.</p>
+<p>If a callback is not defined, Cowboy will select the content-type, language or charset that the client prefers.</p>
+<p>The <code>content_types_provided</code> also returns the name of a callback for every content-type it accepts. This callback will only be called at the end of the &quot;GET and HEAD methods&quot; diagram, when all conditions have been met.</p>
+<p>The selected content-type, language and charset are saved as meta values in the Req object. You <strong>should</strong> use the appropriate representation if you set a response body manually (alongside an error code, for example).</p>
+<p>This diagram is immediately followed by the &quot;GET and HEAD methods&quot; diagram, the &quot;PUT, POST and PATCH methods&quot; diagram, or the &quot;DELETE method&quot; diagram, depending on the method.</p>
<h2 id="_get_and_head_methods">GET and HEAD methods</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This diagram only applies to GET and HEAD requests.</p></div>
-<div class="paragraph"><p>For a description of the <code>cond</code> step, please see
-the "Conditional requests" diagram.</p></div>
-<div class="imageblock">
-<div class="content">
-<img src="../rest_get_head.png" alt="REST GET/HEAD methods flowchart" />
-</div>
-</div>
-<div class="paragraph"><p>When the resource exists, and the conditional steps
-succeed, the resource can be retrieved.</p></div>
-<div class="paragraph"><p>Cowboy prepares the response by first retrieving
-metadata about the representation, then by calling
-the <code>ProvideResource</code> callback. This is the callback
-you defined for each content-types you returned from
-<code>content_types_provided</code>. This callback returns the body
-that will be sent back to the client, or a fun if the
-body must be streamed.</p></div>
-<div class="paragraph"><p>When the resource does not exist, Cowboy will figure out
-whether the resource existed previously, and if so whether
-it was moved elsewhere in order to redirect the client to
-the new URI.</p></div>
-<div class="paragraph"><p>The <code>moved_permanently</code> and <code>moved_temporarily</code> callbacks
-must return the new location of the resource if it was in
-fact moved.</p></div>
-</div>
-</div>
-<div class="sect1">
-<h2 id="_put_post_and_patch_methods">PUT, POST and PATCH methods</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This diagram only applies to PUT, POST and PATCH requests.</p></div>
-<div class="paragraph"><p>For a description of the <code>cond</code> step, please see
-the "Conditional requests" diagram.</p></div>
-<div class="imageblock">
-<div class="content">
-<img src="../rest_put_post_patch.png" alt="REST PUT/POST/PATCH methods flowchart" />
-</div>
-</div>
-<div class="paragraph"><p>When the resource exists, first the conditional steps
-are executed. When that succeeds, and the method is PUT,
-Cowboy will call the <code>is_conflict</code> callback. This function
-can be used to prevent potential race conditions, by locking
-the resource for example.</p></div>
-<div class="paragraph"><p>Then all three methods reach the <code>content_types_accepted</code>
-step that we will describe in a few paragraphs.</p></div>
-<div class="paragraph"><p>When the resource does not exist, and the method is PUT,
-Cowboy will check for conflicts and then move on to the
-<code>content_types_accepted</code> step. For other methods, Cowboy
-will figure out whether the resource existed previously,
-and if so whether it was moved elsewhere. If the resource
-is truly non-existent, the method is POST and the call
-for <code>allow_missing_post</code> returns <code>true</code>, then Cowboy will
-move on to the <code>content_types_accepted</code> step. Otherwise
-the request processing ends there.</p></div>
-<div class="paragraph"><p>The <code>moved_permanently</code> and <code>moved_temporarily</code> callbacks
-must return the new location of the resource if it was in
-fact moved.</p></div>
-<div class="paragraph"><p>The <code>content_types_accepted</code> returns a list of
-content-types it accepts, but also the name of a callback
-for each of them. Cowboy will select the appropriate
-callback for processing the request body and call it.</p></div>
-<div class="paragraph"><p>This callback may return one of three different return
-values.</p></div>
-<div class="paragraph"><p>If an error occurred while processing the request body,
-it must return <code>false</code> and Cowboy will send an
-appropriate error response.</p></div>
-<div class="paragraph"><p>If the method is POST, then you may return <code>true</code> with
-an URI of where the resource has been created. This is
-especially useful for writing handlers for collections.</p></div>
-<div class="paragraph"><p>Otherwise, return <code>true</code> to indicate success. Cowboy
-will select the appropriate response to be sent depending
-on whether a resource has been created, rather than
-modified, and on the availability of a location header
-or a body in the response.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This diagram only applies to GET and HEAD requests.</p>
+<p>For a description of the <code>cond</code> step, please see the &quot;Conditional requests&quot; diagram.</p>
+<img src="../rest_get_head.png" alt="REST GET/HEAD methods flowchart"/><p>When the resource exists, and the conditional steps succeed, the resource can be retrieved.</p>
+<p>Cowboy prepares the response by first retrieving metadata about the representation, then by calling the <code>ProvideResource</code> callback. This is the callback you defined for each content-types you returned from <code>content_types_provided</code>. This callback returns the body that will be sent back to the client, or a fun if the body must be streamed.</p>
+<p>When the resource does not exist, Cowboy will figure out whether the resource existed previously, and if so whether it was moved elsewhere in order to redirect the client to the new URI.</p>
+<p>The <code>moved_permanently</code> and <code>moved_temporarily</code> callbacks must return the new location of the resource if it was in fact moved.</p>
+<h2 id="_put__post_and_patch_methods">PUT, POST and PATCH methods</h2>
+<p>This diagram only applies to PUT, POST and PATCH requests.</p>
+<p>For a description of the <code>cond</code> step, please see the &quot;Conditional requests&quot; diagram.</p>
+<img src="../rest_put_post_patch.png" alt="REST PUT/POST/PATCH methods flowchart"/><p>When the resource exists, first the conditional steps are executed. When that succeeds, and the method is PUT, Cowboy will call the <code>is_conflict</code> callback. This function can be used to prevent potential race conditions, by locking the resource for example.</p>
+<p>Then all three methods reach the <code>content_types_accepted</code> step that we will describe in a few paragraphs.</p>
+<p>When the resource does not exist, and the method is PUT, Cowboy will check for conflicts and then move on to the <code>content_types_accepted</code> step. For other methods, Cowboy will figure out whether the resource existed previously, and if so whether it was moved elsewhere. If the resource is truly non-existent, the method is POST and the call for <code>allow_missing_post</code> returns <code>true</code>, then Cowboy will move on to the <code>content_types_accepted</code> step. Otherwise the request processing ends there.</p>
+<p>The <code>moved_permanently</code> and <code>moved_temporarily</code> callbacks must return the new location of the resource if it was in fact moved.</p>
+<p>The <code>content_types_accepted</code> returns a list of content-types it accepts, but also the name of a callback for each of them. Cowboy will select the appropriate callback for processing the request body and call it.</p>
+<p>This callback may return one of three different return values.</p>
+<p>If an error occurred while processing the request body, it must return <code>false</code> and Cowboy will send an appropriate error response.</p>
+<p>If the method is POST, then you may return <code>true</code> with an URI of where the resource has been created. This is especially useful for writing handlers for collections.</p>
+<p>Otherwise, return <code>true</code> to indicate success. Cowboy will select the appropriate response to be sent depending on whether a resource has been created, rather than modified, and on the availability of a location header or a body in the response.</p>
<h2 id="_delete_method">DELETE method</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This diagram only applies to DELETE requests.</p></div>
-<div class="paragraph"><p>For a description of the <code>cond</code> step, please see
-the "Conditional requests" diagram.</p></div>
-<div class="imageblock">
-<div class="content">
-<img src="../rest_delete.png" alt="REST DELETE method flowchart" />
-</div>
-</div>
-<div class="paragraph"><p>When the resource exists, and the conditional steps
-succeed, the resource can be deleted.</p></div>
-<div class="paragraph"><p>Deleting the resource is a two steps process. First
-the callback <code>delete_resource</code> is executed. Use this
-callback to delete the resource.</p></div>
-<div class="paragraph"><p>Because the resource may be cached, you must also
-delete all cached representations of this resource
-in the system. This operation may take a while though,
-so you may return before it finished.</p></div>
-<div class="paragraph"><p>Cowboy will then call the <code>delete_completed</code> callback.
-If you know that the resource has been completely
-deleted from your system, including from caches, then
-you can return <code>true</code>. If any doubts persist, return
-<code>false</code>. Cowboy will assume <code>true</code> by default.</p></div>
-<div class="paragraph"><p>To finish, Cowboy checks if you set a response body,
-and depending on that, sends the appropriate response.</p></div>
-<div class="paragraph"><p>When the resource does not exist, Cowboy will figure out
-whether the resource existed previously, and if so whether
-it was moved elsewhere in order to redirect the client to
-the new URI.</p></div>
-<div class="paragraph"><p>The <code>moved_permanently</code> and <code>moved_temporarily</code> callbacks
-must return the new location of the resource if it was in
-fact moved.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This diagram only applies to DELETE requests.</p>
+<p>For a description of the <code>cond</code> step, please see the &quot;Conditional requests&quot; diagram.</p>
+<img src="../rest_delete.png" alt="REST DELETE method flowchart"/><p>When the resource exists, and the conditional steps succeed, the resource can be deleted.</p>
+<p>Deleting the resource is a two steps process. First the callback <code>delete_resource</code> is executed. Use this callback to delete the resource.</p>
+<p>Because the resource may be cached, you must also delete all cached representations of this resource in the system. This operation may take a while though, so you may return before it finished.</p>
+<p>Cowboy will then call the <code>delete_completed</code> callback. If you know that the resource has been completely deleted from your system, including from caches, then you can return <code>true</code>. If any doubts persist, return <code>false</code>. Cowboy will assume <code>true</code> by default.</p>
+<p>To finish, Cowboy checks if you set a response body, and depending on that, sends the appropriate response.</p>
+<p>When the resource does not exist, Cowboy will figure out whether the resource existed previously, and if so whether it was moved elsewhere in order to redirect the client to the new URI.</p>
+<p>The <code>moved_permanently</code> and <code>moved_temporarily</code> callbacks must return the new location of the resource if it was in fact moved.</p>
<h2 id="_conditional_requests">Conditional requests</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This diagram applies to all request methods other than
-OPTIONS. It is executed right after the <code>resource_exists</code>
-callback, when the resource exists.</p></div>
-<div class="imageblock">
-<div class="content">
-<img src="../rest_cond.png" alt="REST conditional requests flowchart" />
-</div>
-</div>
-<div class="paragraph"><p>A request becomes conditional when it includes either of
-the if-match header; the if-unmodified-since header; the
-if-none-match header; or the if-modified-since header.</p></div>
-<div class="paragraph"><p>If the condition fails, the request ends immediately
-without any retrieval or modification of the resource.</p></div>
-<div class="paragraph"><p>The <code>generate_etag</code> and <code>last_modified</code> are called as
-needed. Cowboy will only call them once and then cache
-the results for subsequent use.</p></div>
-</div>
-</div>
+<p>This diagram applies to all request methods other than OPTIONS. It is executed right after the <code>resource_exists</code> callback, when the resource exists.</p>
+<img src="../rest_cond.png" alt="REST conditional requests flowchart"/><p>A request becomes conditional when it includes either of the if-match header; the if-unmodified-since header; the if-none-match header; or the if-modified-since header.</p>
+<p>If the condition fails, the request ends immediately without any retrieval or modification of the resource.</p>
+<p>The <code>generate_etag</code> and <code>last_modified</code> are called as needed. Cowboy will only call them once and then cache the results for subsequent use.</p>
+
diff --git a/docs/en/cowboy/2.4/guide/rest_handlers/index.html b/docs/en/cowboy/2.4/guide/rest_handlers/index.html
index 74a31e9e..5423d553 100644
--- a/docs/en/cowboy/2.4/guide/rest_handlers/index.html
+++ b/docs/en/cowboy/2.4/guide/rest_handlers/index.html
@@ -62,287 +62,162 @@
<h1 class="lined-header"><span>REST handlers</span></h1>
-<div class="paragraph"><p>REST is implemented in Cowboy as a sub protocol. The request
-is handled as a state machine with many optional callbacks
-describing the resource and modifying the machine&#8217;s behavior.</p></div>
-<div class="paragraph"><p>The REST handler is the recommended way to handle HTTP requests.</p></div>
-<div class="sect1">
+<p>REST is implemented in Cowboy as a sub protocol. The request is handled as a state machine with many optional callbacks describing the resource and modifying the machine&apos;s behavior.</p>
+<p>The REST handler is the recommended way to handle HTTP requests.</p>
<h2 id="_initialization">Initialization</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>First, the <code>init/2</code> callback is called. This callback is common
-to all handlers. To use REST for the current request, this function
-must return a <code>cowboy_rest</code> tuple.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>First, the <code>init/2</code> callback is called. This callback is common to all handlers. To use REST for the current request, this function must return a <code>cowboy_rest</code> tuple.</p>
+<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">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 class="paragraph"><p>Cowboy will then switch to the REST protocol and start executing
-the state machine.</p></div>
-<div class="paragraph"><p>After reaching the end of the flowchart, the <code>terminate/3</code> callback
-will be called if it is defined.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">cowboy_rest</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Cowboy will then switch to the REST protocol and start executing the state machine.</p>
+<p>After reaching the end of the flowchart, the <code>terminate/3</code> callback will be called if it is defined.</p>
<h2 id="_methods">Methods</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The REST component has code for handling the following HTTP methods:
-HEAD, GET, POST, PATCH, PUT, DELETE and OPTIONS.</p></div>
-<div class="paragraph"><p>Other methods can be accepted, however they have no specific callback
-defined for them at this time.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The REST component has code for handling the following HTTP methods: HEAD, GET, POST, PATCH, PUT, DELETE and OPTIONS.</p>
+<p>Other methods can be accepted, however they have no specific callback defined for them at this time.</p>
<h2 id="_callbacks">Callbacks</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>All callbacks are optional. Some may become mandatory depending
-on what other defined callbacks return. The various flowcharts
-in the next chapter should be a useful to determine which callbacks
-you need.</p></div>
-<div class="paragraph"><p>All callbacks take two arguments, the Req object and the State,
-and return a three-element tuple of the form <code>{Value, Req, State}</code>.</p></div>
-<div class="paragraph"><p>Nearly all callbacks can also return <code>{stop, Req, State}</code> to
-stop execution of the request, and
-<code>{{switch_handler, Module}, Req, State}</code> or
-<code>{{switch_handler, Module, Opts}, Req, State}</code> to switch to
-a different handler type. The exceptions are <code>expires</code>
-<code>generate_etag</code>, <code>last_modified</code> and <code>variances</code>.</p></div>
-<div class="paragraph"><p>The following table summarizes the callbacks and their default values.
-If the callback isn&#8217;t defined, then the default value will be used.
-Please look at the flowcharts to find out the result of each return
-value.</p></div>
-<div class="paragraph"><p>In the following table, "skip" means the callback is entirely skipped
-if it is undefined, moving directly to the next step. Similarly,
-"none" means there is no default value for this callback.</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"> Callback name </th>
-<th align="center" valign="top"> Default value</th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td align="left" valign="top"><p class="table">allowed_methods</p></td>
-<td align="center" valign="top"><p class="table"><code>[&lt;&lt;"GET"&gt;&gt;, &lt;&lt;"HEAD"&gt;&gt;, &lt;&lt;"OPTIONS"&gt;&gt;]</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">allow_missing_post</p></td>
-<td align="center" valign="top"><p class="table"><code>true</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">charsets_provided</p></td>
-<td align="center" valign="top"><p class="table">skip</p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">content_types_accepted</p></td>
-<td align="center" valign="top"><p class="table">none</p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">content_types_provided</p></td>
-<td align="center" valign="top"><p class="table"><code>[{{ &lt;&lt;"text"&gt;&gt;, &lt;&lt;"html"&gt;&gt;, '*'}, to_html}]</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">delete_completed</p></td>
-<td align="center" valign="top"><p class="table"><code>true</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">delete_resource</p></td>
-<td align="center" valign="top"><p class="table"><code>false</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">expires</p></td>
-<td align="center" valign="top"><p class="table"><code>undefined</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">forbidden</p></td>
-<td align="center" valign="top"><p class="table"><code>false</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">generate_etag</p></td>
-<td align="center" valign="top"><p class="table"><code>undefined</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">is_authorized</p></td>
-<td align="center" valign="top"><p class="table"><code>true</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">is_conflict</p></td>
-<td align="center" valign="top"><p class="table"><code>false</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">known_methods</p></td>
-<td align="center" valign="top"><p class="table"><code>[&lt;&lt;"GET"&gt;&gt;, &lt;&lt;"HEAD"&gt;&gt;, &lt;&lt;"POST"&gt;&gt;, &lt;&lt;"PUT"&gt;&gt;, &lt;&lt;"PATCH"&gt;&gt;, &lt;&lt;"DELETE"&gt;&gt;, &lt;&lt;"OPTIONS"&gt;&gt;]</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">languages_provided</p></td>
-<td align="center" valign="top"><p class="table">skip</p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">last_modified</p></td>
-<td align="center" valign="top"><p class="table"><code>undefined</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">malformed_request</p></td>
-<td align="center" valign="top"><p class="table"><code>false</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">moved_permanently</p></td>
-<td align="center" valign="top"><p class="table"><code>false</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">moved_temporarily</p></td>
-<td align="center" valign="top"><p class="table"><code>false</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">multiple_choices</p></td>
-<td align="center" valign="top"><p class="table"><code>false</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">options</p></td>
-<td align="center" valign="top"><p class="table"><code>ok</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">previously_existed</p></td>
-<td align="center" valign="top"><p class="table"><code>false</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">resource_exists</p></td>
-<td align="center" valign="top"><p class="table"><code>true</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">service_available</p></td>
-<td align="center" valign="top"><p class="table"><code>true</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">uri_too_long</p></td>
-<td align="center" valign="top"><p class="table"><code>false</code></p></td>
+<p>All callbacks are optional. Some may become mandatory depending on what other defined callbacks return. The various flowcharts in the next chapter should be a useful to determine which callbacks you need.</p>
+<p>All callbacks take two arguments, the Req object and the State, and return a three-element tuple of the form <code>{Value, Req, State}</code>.</p>
+<p>Nearly all callbacks can also return <code>{stop, Req, State}</code> to stop execution of the request, and <code>{{switch_handler, Module}, Req, State}</code> or <code>{{switch_handler, Module, Opts}, Req, State}</code> to switch to a different handler type. The exceptions are <code>expires</code> <code>generate_etag</code>, <code>last_modified</code> and <code>variances</code>.</p>
+<p>The following table summarizes the callbacks and their default values. If the callback isn&apos;t defined, then the default value will be used. Please look at the flowcharts to find out the result of each return value.</p>
+<p>In the following table, &quot;skip&quot; means the callback is entirely skipped if it is undefined, moving directly to the next step. Similarly, &quot;none&quot; means there is no default value for this callback.</p>
+<table rules="all" width="100%" frame="border"
+ cellspacing="0" cellpadding="4">
+<thead><tr><th>Callback name</th>
+<th>Default value</th>
+</tr></thead><tbody><tr><td>allowed_methods</td>
+<td><code>[&lt;&lt;&quot;GET&quot;&gt;&gt;, &lt;&lt;&quot;HEAD&quot;&gt;&gt;, &lt;&lt;&quot;OPTIONS&quot;&gt;&gt;]</code></td>
</tr>
-<tr>
-<td align="left" valign="top"><p class="table">valid_content_headers</p></td>
-<td align="center" valign="top"><p class="table"><code>true</code></p></td>
+<tr><td>allow_missing_post</td>
+<td><code>true</code></td>
</tr>
-<tr>
-<td align="left" valign="top"><p class="table">valid_entity_length</p></td>
-<td align="center" valign="top"><p class="table"><code>true</code></p></td>
+<tr><td>charsets_provided</td>
+<td>skip</td>
</tr>
-<tr>
-<td align="left" valign="top"><p class="table">variances</p></td>
-<td align="center" valign="top"><p class="table"><code>[]</code></p></td>
+<tr><td>content_types_accepted</td>
+<td>none</td>
</tr>
-</tbody>
-</table>
-</div>
-<div class="paragraph"><p>As you can see, Cowboy tries to move on with the request whenever
-possible by using well thought out default values.</p></div>
-<div class="paragraph"><p>In addition to these, there can be any number of user-defined
-callbacks that are specified through <code>content_types_accepted/2</code>
-and <code>content_types_provided/2</code>. They can take any name, however
-it is recommended to use a separate prefix for the callbacks of
-each function. For example, <code>from_html</code> and <code>to_html</code> indicate
-in the first case that we&#8217;re accepting a resource given as HTML,
-and in the second case that we send one as HTML.</p></div>
-</div>
-</div>
-<div class="sect1">
+<tr><td>content_types_provided</td>
+<td><code>[{{ &lt;&lt;&quot;text&quot;&gt;&gt;, &lt;&lt;&quot;html&quot;&gt;&gt;, &apos;*&apos;}, to_html}]</code></td>
+</tr>
+<tr><td>delete_completed</td>
+<td><code>true</code></td>
+</tr>
+<tr><td>delete_resource</td>
+<td><code>false</code></td>
+</tr>
+<tr><td>expires</td>
+<td><code>undefined</code></td>
+</tr>
+<tr><td>forbidden</td>
+<td><code>false</code></td>
+</tr>
+<tr><td>generate_etag</td>
+<td><code>undefined</code></td>
+</tr>
+<tr><td>is_authorized</td>
+<td><code>true</code></td>
+</tr>
+<tr><td>is_conflict</td>
+<td><code>false</code></td>
+</tr>
+<tr><td>known_methods</td>
+<td><code>[&lt;&lt;&quot;GET&quot;&gt;&gt;, &lt;&lt;&quot;HEAD&quot;&gt;&gt;, &lt;&lt;&quot;POST&quot;&gt;&gt;, &lt;&lt;&quot;PUT&quot;&gt;&gt;, &lt;&lt;&quot;PATCH&quot;&gt;&gt;, &lt;&lt;&quot;DELETE&quot;&gt;&gt;, &lt;&lt;&quot;OPTIONS&quot;&gt;&gt;]</code></td>
+</tr>
+<tr><td>languages_provided</td>
+<td>skip</td>
+</tr>
+<tr><td>last_modified</td>
+<td><code>undefined</code></td>
+</tr>
+<tr><td>malformed_request</td>
+<td><code>false</code></td>
+</tr>
+<tr><td>moved_permanently</td>
+<td><code>false</code></td>
+</tr>
+<tr><td>moved_temporarily</td>
+<td><code>false</code></td>
+</tr>
+<tr><td>multiple_choices</td>
+<td><code>false</code></td>
+</tr>
+<tr><td>options</td>
+<td><code>ok</code></td>
+</tr>
+<tr><td>previously_existed</td>
+<td><code>false</code></td>
+</tr>
+<tr><td>resource_exists</td>
+<td><code>true</code></td>
+</tr>
+<tr><td>service_available</td>
+<td><code>true</code></td>
+</tr>
+<tr><td>uri_too_long</td>
+<td><code>false</code></td>
+</tr>
+<tr><td>valid_content_headers</td>
+<td><code>true</code></td>
+</tr>
+<tr><td>valid_entity_length</td>
+<td><code>true</code></td>
+</tr>
+<tr><td>variances</td>
+<td><code>[]</code></td>
+</tr>
+</tbody></table>
+<p>As you can see, Cowboy tries to move on with the request whenever possible by using well thought out default values.</p>
+<p>In addition to these, there can be any number of user-defined callbacks that are specified through <code>content_types_accepted/2</code> and <code>content_types_provided/2</code>. They can take any name, however it is recommended to use a separate prefix for the callbacks of each function. For example, <code>from_html</code> and <code>to_html</code> indicate in the first case that we&apos;re accepting a resource given as HTML, and in the second case that we send one as HTML.</p>
<h2 id="_meta_data">Meta data</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy will set informative values to the Req object at various
-points of the execution. You can retrieve them by matching the
-Req object directly. The values are defined in the following table:</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"> Key </th>
-<th align="left" valign="top"> Details</th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td align="left" valign="top"><p class="table">media_type</p></td>
-<td align="left" valign="top"><p class="table">The content-type negotiated for the response entity.</p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">language</p></td>
-<td align="left" valign="top"><p class="table">The language negotiated for the response entity.</p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">charset</p></td>
-<td align="left" valign="top"><p class="table">The charset negotiated for the response entity.</p></td>
-</tr>
-</tbody>
-</table>
-</div>
-<div class="paragraph"><p>They can be used to send a proper body with the response to a
-request that used a method other than HEAD or GET.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Cowboy will set informative values to the Req object at various points of the execution. You can retrieve them by matching the Req object directly. The values are defined in the following table:</p>
+<table rules="all" width="100%" frame="border"
+ cellspacing="0" cellpadding="4">
+<thead><tr><th>Key</th>
+<th>Details</th>
+</tr></thead><tbody><tr><td>media_type</td>
+<td>The content-type negotiated for the response entity.</td>
+</tr>
+<tr><td>language</td>
+<td>The language negotiated for the response entity.</td>
+</tr>
+<tr><td>charset</td>
+<td>The charset negotiated for the response entity.</td>
+</tr>
+</tbody></table>
+<p>They can be used to send a proper body with the response to a request that used a method other than HEAD or GET.</p>
<h2 id="_response_headers">Response headers</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy will set response headers automatically over the execution
-of the REST code. They are listed in the following table.</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="left" valign="top"> Details</th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td align="left" valign="top"><p class="table">content-language</p></td>
-<td align="left" valign="top"><p class="table">Language used in the response body</p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">content-type</p></td>
-<td align="left" valign="top"><p class="table">Media type and charset of the response body</p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">etag</p></td>
-<td align="left" valign="top"><p class="table">Etag of the resource</p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">expires</p></td>
-<td align="left" valign="top"><p class="table">Expiration date of the resource</p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">last-modified</p></td>
-<td align="left" valign="top"><p class="table">Last modification date for the resource</p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">location</p></td>
-<td align="left" valign="top"><p class="table">Relative or absolute URI to the requested resource</p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">vary</p></td>
-<td align="left" valign="top"><p class="table">List of headers that may change the representation of the resource</p></td>
-</tr>
-</tbody>
-</table>
-</div>
-</div>
-</div>
+<p>Cowboy will set response headers automatically over the execution of the REST code. They are listed in the following table.</p>
+<table rules="all" width="100%" frame="border"
+ cellspacing="0" cellpadding="4">
+<thead><tr><th>Header name</th>
+<th>Details</th>
+</tr></thead><tbody><tr><td>content-language</td>
+<td>Language used in the response body</td>
+</tr>
+<tr><td>content-type</td>
+<td>Media type and charset of the response body</td>
+</tr>
+<tr><td>etag</td>
+<td>Etag of the resource</td>
+</tr>
+<tr><td>expires</td>
+<td>Expiration date of the resource</td>
+</tr>
+<tr><td>last-modified</td>
+<td>Last modification date for the resource</td>
+</tr>
+<tr><td>location</td>
+<td>Relative or absolute URI to the requested resource</td>
+</tr>
+<tr><td>vary</td>
+<td>List of headers that may change the representation of the resource</td>
+</tr>
+</tbody></table>
+
diff --git a/docs/en/cowboy/2.4/guide/rest_principles/index.html b/docs/en/cowboy/2.4/guide/rest_principles/index.html
index f8b6b874..7d2e3862 100644
--- a/docs/en/cowboy/2.4/guide/rest_principles/index.html
+++ b/docs/en/cowboy/2.4/guide/rest_principles/index.html
@@ -62,153 +62,38 @@
<h1 class="lined-header"><span>REST principles</span></h1>
-<div class="paragraph"><p>This chapter will attempt to define the concepts behind REST
-and explain what makes a service RESTful.</p></div>
-<div class="paragraph"><p>REST is often confused with performing a distinct operation
-depending on the HTTP method, while using more than the GET
-and POST methods. That&#8217;s highly misguided at best.</p></div>
-<div class="paragraph"><p>We will first attempt to define REST and will look at what
-it means in the context of HTTP and the Web.
-For a more in-depth explanation of REST, you can read
-<a href="http://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm">Roy T. Fielding&#8217;s dissertation</a>
-as it does a great job explaining where it comes from and
-what it achieves.</p></div>
-<div class="sect1">
+<p>This chapter will attempt to define the concepts behind REST and explain what makes a service RESTful.</p>
+<p>REST is often confused with performing a distinct operation depending on the HTTP method, while using more than the GET and POST methods. That&apos;s highly misguided at best.</p>
+<p>We will first attempt to define REST and will look at what it means in the context of HTTP and the Web. For a more in-depth explanation of REST, you can read <a href="http://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm">Roy T. Fielding&apos;s dissertation</a> as it does a great job explaining where it comes from and what it achieves.</p>
<h2 id="_rest_architecture">REST architecture</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>REST is a <strong>client-server</strong> architecture. The client and the server
-both have a different set of concerns. The server stores and/or
-manipulates information and makes it available to the user in
-an efficient manner. The client takes that information and
-displays it to the user and/or uses it to perform subsequent
-requests for information. This separation of concerns allows both
-the client and the server to evolve independently as it only
-requires that the interface stays the same.</p></div>
-<div class="paragraph"><p>REST is <strong>stateless</strong>. That means the communication between the
-client and the server always contains all the information needed
-to perform the request. There is no session state in the server,
-it is kept entirely on the client&#8217;s side. If access to a resource
-requires authentication, then the client needs to authenticate
-itself with every request.</p></div>
-<div class="paragraph"><p>REST is <strong>cacheable</strong>. The client, the server and any intermediary
-components can all cache resources in order to improve performance.</p></div>
-<div class="paragraph"><p>REST provides a <strong>uniform interface</strong> between components. This
-simplifies the architecture, as all components follow the same
-rules to speak to one another. It also makes it easier to understand
-the interactions between the different components of the system.
-A number of constraints are required to achieve this. They are
-covered in the rest of the chapter.</p></div>
-<div class="paragraph"><p>REST is a <strong>layered system</strong>. Individual components cannot see
-beyond the immediate layer with which they are interacting. This
-means that a client connecting to an intermediate component, like
-a proxy, has no knowledge of what lies beyond. This allows
-components to be independent and thus easily replaceable or
-extendable.</p></div>
-<div class="paragraph"><p>REST optionally provides <strong>code on demand</strong>. Code may be downloaded
-to extend client functionality. This is optional however because
-the client may not be able to download or run this code, and so
-a REST component cannot rely on it being executed.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>REST is a <strong>client-server</strong> architecture. The client and the server both have a different set of concerns. The server stores and/or manipulates information and makes it available to the user in an efficient manner. The client takes that information and displays it to the user and/or uses it to perform subsequent requests for information. This separation of concerns allows both the client and the server to evolve independently as it only requires that the interface stays the same.</p>
+<p>REST is <strong>stateless</strong>. That means the communication between the client and the server always contains all the information needed to perform the request. There is no session state in the server, it is kept entirely on the client&apos;s side. If access to a resource requires authentication, then the client needs to authenticate itself with every request.</p>
+<p>REST is <strong>cacheable</strong>. The client, the server and any intermediary components can all cache resources in order to improve performance.</p>
+<p>REST provides a <strong>uniform interface</strong> between components. This simplifies the architecture, as all components follow the same rules to speak to one another. It also makes it easier to understand the interactions between the different components of the system. A number of constraints are required to achieve this. They are covered in the rest of the chapter.</p>
+<p>REST is a <strong>layered system</strong>. Individual components cannot see beyond the immediate layer with which they are interacting. This means that a client connecting to an intermediate component, like a proxy, has no knowledge of what lies beyond. This allows components to be independent and thus easily replaceable or extendable.</p>
+<p>REST optionally provides <strong>code on demand</strong>. Code may be downloaded to extend client functionality. This is optional however because the client may not be able to download or run this code, and so a REST component cannot rely on it being executed.</p>
<h2 id="_resources_and_resource_identifiers">Resources and resource identifiers</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A resource is an abstract concept. In a REST system, any information
-that can be named may be a resource. This includes documents, images,
-a collection of resources and any other information. Any information
-that can be the target of an hypertext link can be a resource.</p></div>
-<div class="paragraph"><p>A resource is a conceptual mapping to a set of entities. The set of
-entities evolves over time; a resource doesn&#8217;t. For example, a resource
-can map to "users who have logged in this past month" and another
-to "all users". At some point in time they may map to the same set of
-entities, because all users logged in this past month. But they are
-still different resources. Similarly, if nobody logged in recently,
-then the first resource may map to the empty set. This resource exists
-regardless of the information it maps to.</p></div>
-<div class="paragraph"><p>Resources are identified by uniform resource identifiers, also known
-as URIs. Sometimes internationalized resource identifiers, or IRIs,
-may also be used, but these can be directly translated into a URI.</p></div>
-<div class="paragraph"><p>In practice we will identify two kinds of resources. Individual
-resources map to a set of one element, for example "user Joe".
-Collection of resources map to a set of 0 to N elements,
-for example "all users".</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>A resource is an abstract concept. In a REST system, any information that can be named may be a resource. This includes documents, images, a collection of resources and any other information. Any information that can be the target of an hypertext link can be a resource.</p>
+<p>A resource is a conceptual mapping to a set of entities. The set of entities evolves over time; a resource doesn&apos;t. For example, a resource can map to &quot;users who have logged in this past month&quot; and another to &quot;all users&quot;. At some point in time they may map to the same set of entities, because all users logged in this past month. But they are still different resources. Similarly, if nobody logged in recently, then the first resource may map to the empty set. This resource exists regardless of the information it maps to.</p>
+<p>Resources are identified by uniform resource identifiers, also known as URIs. Sometimes internationalized resource identifiers, or IRIs, may also be used, but these can be directly translated into a URI.</p>
+<p>In practice we will identify two kinds of resources. Individual resources map to a set of one element, for example &quot;user Joe&quot;. Collection of resources map to a set of 0 to N elements, for example &quot;all users&quot;.</p>
<h2 id="_resource_representations">Resource representations</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The representation of a resource is a sequence of bytes associated
-with metadata.</p></div>
-<div class="paragraph"><p>The metadata comes as a list of key-value pairs, where the name
-corresponds to a standard that defines the value&#8217;s structure and
-semantics. With HTTP, the metadata comes in the form of request
-or response headers. The headers' structure and semantics are well
-defined in the HTTP standard. Metadata includes representation
-metadata, resource metadata and control data.</p></div>
-<div class="paragraph"><p>The representation metadata gives information about the
-representation, such as its media type, the date of last
-modification, or even a checksum.</p></div>
-<div class="paragraph"><p>Resource metadata could be link to related resources or
-information about additional representations of the resource.</p></div>
-<div class="paragraph"><p>Control data allows parameterizing the request or response.
-For example, we may only want the representation returned if
-it is more recent than the one we have in cache. Similarly,
-we may want to instruct the client about how it should cache
-the representation. This isn&#8217;t restricted to caching. We may,
-for example, want to store a new representation of a resource
-only if it wasn&#8217;t modified since we first retrieved it.</p></div>
-<div class="paragraph"><p>The data format of a representation is also known as the media
-type. Some media types are intended for direct rendering to the
-user, while others are intended for automated processing. The
-media type is a key component of the REST architecture.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The representation of a resource is a sequence of bytes associated with metadata.</p>
+<p>The metadata comes as a list of key-value pairs, where the name corresponds to a standard that defines the value&apos;s structure and semantics. With HTTP, the metadata comes in the form of request or response headers. The headers&apos; structure and semantics are well defined in the HTTP standard. Metadata includes representation metadata, resource metadata and control data.</p>
+<p>The representation metadata gives information about the representation, such as its media type, the date of last modification, or even a checksum.</p>
+<p>Resource metadata could be link to related resources or information about additional representations of the resource.</p>
+<p>Control data allows parameterizing the request or response. For example, we may only want the representation returned if it is more recent than the one we have in cache. Similarly, we may want to instruct the client about how it should cache the representation. This isn&apos;t restricted to caching. We may, for example, want to store a new representation of a resource only if it wasn&apos;t modified since we first retrieved it.</p>
+<p>The data format of a representation is also known as the media type. Some media types are intended for direct rendering to the user, while others are intended for automated processing. The media type is a key component of the REST architecture.</p>
<h2 id="_self_descriptive_messages">Self-descriptive messages</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Messages must be self-descriptive. That means that the data
-format of a representation must always come with its media
-type (and similarly requesting a resource involves choosing
-the media type of the representation returned). If you are
-sending HTML, then you must say it is HTML by sending the
-media type with the representation. In HTTP this is done
-using the content-type header.</p></div>
-<div class="paragraph"><p>The media type is often an IANA registered media type, like
-<code>text/html</code> or <code>image/png</code>, but does not need to be. Exactly
-two things are important for respecting this constraint: that
-the media type is well specified, and that the sender and
-recipient agree about what the media type refers to.</p></div>
-<div class="paragraph"><p>This means that you can create your own media types, like
-<code>application/x-mine</code>, and that as long as you write the
-specifications for it and that both endpoints agree about
-it then the constraint is respected.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Messages must be self-descriptive. That means that the data format of a representation must always come with its media type (and similarly requesting a resource involves choosing the media type of the representation returned). If you are sending HTML, then you must say it is HTML by sending the media type with the representation. In HTTP this is done using the content-type header.</p>
+<p>The media type is often an IANA registered media type, like <code>text/html</code> or <code>image/png</code>, but does not need to be. Exactly two things are important for respecting this constraint: that the media type is well specified, and that the sender and recipient agree about what the media type refers to.</p>
+<p>This means that you can create your own media types, like <code>application/x-mine</code>, and that as long as you write the specifications for it and that both endpoints agree about it then the constraint is respected.</p>
<h2 id="_hypermedia_as_the_engine_of_application_state">Hypermedia as the engine of application state</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The last constraint is generally where services that claim
-to be RESTful fail. Interactions with a server must be
-entirely driven by hypermedia. The client does not need
-any prior knowledge of the service in order to use it,
-other than an entry point and of course basic understanding
-of the media type of the representations, at the very least
-enough to find and identify hyperlinks and link relations.</p></div>
-<div class="paragraph"><p>To give a simple example, if your service only works with
-the <code>application/json</code> media type then this constraint
-cannot be respected (as there are no concept of links in
-JSON) and thus your service isn&#8217;t RESTful. This is the case
-for the majority of self-proclaimed REST services.</p></div>
-<div class="paragraph"><p>On the other hand if you create a JSON based media type
-that has a concept of links and link relations, then
-your service might be RESTful.</p></div>
-<div class="paragraph"><p>Respecting this constraint means that the entirety of the
-service becomes self-discoverable, not only the resources
-in it, but also the operations you can perform on it. This
-makes clients very thin as there is no need to implement
-anything specific to the service to operate on it.</p></div>
-</div>
-</div>
+<p>The last constraint is generally where services that claim to be RESTful fail. Interactions with a server must be entirely driven by hypermedia. The client does not need any prior knowledge of the service in order to use it, other than an entry point and of course basic understanding of the media type of the representations, at the very least enough to find and identify hyperlinks and link relations.</p>
+<p>To give a simple example, if your service only works with the <code>application/json</code> media type then this constraint cannot be respected (as there are no concept of links in JSON) and thus your service isn&apos;t RESTful. This is the case for the majority of self-proclaimed REST services.</p>
+<p>On the other hand if you create a JSON based media type that has a concept of links and link relations, then your service might be RESTful.</p>
+<p>Respecting this constraint means that the entirety of the service becomes self-discoverable, not only the resources in it, but also the operations you can perform on it. This makes clients very thin as there is no need to implement anything specific to the service to operate on it.</p>
+
diff --git a/docs/en/cowboy/2.4/guide/routing/index.html b/docs/en/cowboy/2.4/guide/routing/index.html
index bd8d5e12..e61a970d 100644
--- a/docs/en/cowboy/2.4/guide/routing/index.html
+++ b/docs/en/cowboy/2.4/guide/routing/index.html
@@ -62,261 +62,181 @@
<h1 class="lined-header"><span>Routing</span></h1>
-<div class="paragraph"><p>Cowboy does nothing by default.</p></div>
-<div class="paragraph"><p>To make Cowboy useful, you need to map URIs to Erlang modules that will
-handle the requests. This is called routing.</p></div>
-<div class="paragraph"><p>When Cowboy receives a request, it tries to match the requested host and
-path to the configured routes. When there&#8217;s a match, the route&#8217;s
-associated handler is executed.</p></div>
-<div class="paragraph"><p>Routes need to be compiled before they can be used by Cowboy.
-The result of the compilation is the dispatch rules.</p></div>
-<div class="sect1">
+<p>Cowboy does nothing by default.</p>
+<p>To make Cowboy useful, you need to map URIs to Erlang modules that will handle the requests. This is called routing.</p>
+<p>When Cowboy receives a request, it tries to match the requested host and path to the configured routes. When there&apos;s a match, the route&apos;s associated handler is executed.</p>
+<p>Routes need to be compiled before they can be used by Cowboy. The result of the compilation is the dispatch rules.</p>
<h2 id="_syntax">Syntax</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The general structure for the routes is defined as follow.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The general structure for the routes is defined as follow.</p>
+<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">Routes</span> <span style="color: #990000">=</span> [<span style="color: #009900">Host1</span>, <span style="color: #009900">Host2</span>, <span style="color: #990000">...</span> <span style="color: #009900">HostN</span>]<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Each host contains matching rules for the host along with optional
-constraints, and a list of routes for the path component.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Routes</font> <font color="#990000">=</font> [<font color="#009900">Host1</font>, <font color="#009900">Host2</font>, <font color="#990000">...</font> <font color="#009900">HostN</font>]<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Each host contains matching rules for the host along with optional constraints, and a list of routes for the path component.</p>
+<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">Host1</span> <span style="color: #990000">=</span> {<span style="color: #009900">HostMatch</span>, <span style="color: #009900">PathsList</span>}<span style="color: #990000">.</span>
-<span style="color: #009900">Host2</span> <span style="color: #990000">=</span> {<span style="color: #009900">HostMatch</span>, <span style="color: #009900">Constraints</span>, <span style="color: #009900">PathsList</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>The list of routes for the path component is defined similar to the
-list of hosts.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Host1</font> <font color="#990000">=</font> {<font color="#009900">HostMatch</font>, <font color="#009900">PathsList</font>}<font color="#990000">.</font>
+<font color="#009900">Host2</font> <font color="#990000">=</font> {<font color="#009900">HostMatch</font>, <font color="#009900">Constraints</font>, <font color="#009900">PathsList</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>The list of routes for the path component is defined similar to the list of hosts.</p>
+<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">PathsList</span> <span style="color: #990000">=</span> [<span style="color: #009900">Path1</span>, <span style="color: #009900">Path2</span>, <span style="color: #990000">...</span> <span style="color: #009900">PathN</span>]<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Finally, each path contains matching rules for the path along with
-optional constraints, and gives us the handler module to be used
-along with its initial state.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">PathsList</font> <font color="#990000">=</font> [<font color="#009900">Path1</font>, <font color="#009900">Path2</font>, <font color="#990000">...</font> <font color="#009900">PathN</font>]<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Finally, each path contains matching rules for the path along with optional constraints, and gives us the handler module to be used along with its initial state.</p>
+<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">Path1</span> <span style="color: #990000">=</span> {<span style="color: #009900">PathMatch</span>, <span style="color: #009900">Handler</span>, <span style="color: #009900">InitialState</span>}<span style="color: #990000">.</span>
-<span style="color: #009900">Path2</span> <span style="color: #990000">=</span> {<span style="color: #009900">PathMatch</span>, <span style="color: #009900">Constraints</span>, <span style="color: #009900">Handler</span>, <span style="color: #009900">InitialState</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Continue reading to learn more about the match syntax and the optional
-constraints.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Path1</font> <font color="#990000">=</font> {<font color="#009900">PathMatch</font>, <font color="#009900">Handler</font>, <font color="#009900">InitialState</font>}<font color="#990000">.</font>
+<font color="#009900">Path2</font> <font color="#990000">=</font> {<font color="#009900">PathMatch</font>, <font color="#009900">Constraints</font>, <font color="#009900">Handler</font>, <font color="#009900">InitialState</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Continue reading to learn more about the match syntax and the optional constraints.</p>
<h2 id="_match_syntax">Match syntax</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The match syntax is used to associate host names and paths with their
-respective handlers.</p></div>
-<div class="paragraph"><p>The match syntax is the same for host and path with a few subtleties.
-Indeed, the segments separator is different, and the host is matched
-starting from the last segment going to the first. All examples will
-feature both host and path match rules and explain the differences
-when encountered.</p></div>
-<div class="paragraph"><p>Excluding special values that we will explain at the end of this section,
-the simplest match value is a host or a path. It can be given as either
-a <code>string()</code> or a <code>binary()</code>.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The match syntax is used to associate host names and paths with their respective handlers.</p>
+<p>The match syntax is the same for host and path with a few subtleties. Indeed, the segments separator is different, and the host is matched starting from the last segment going to the first. All examples will feature both host and path match rules and explain the differences when encountered.</p>
+<p>Excluding special values that we will explain at the end of this section, the simplest match value is a host or a path. It can be given as either a <code>string()</code> or a <code>binary()</code>.</p>
+<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">PathMatch1</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"/"</span><span style="color: #990000">.</span>
-<span style="color: #009900">PathMatch2</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"/path/to/resource"</span><span style="color: #990000">.</span>
-
-<span style="color: #009900">HostMatch1</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"cowboy.example.org"</span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>As you can see, all paths defined this way must start with a slash
-character. Note that these two paths are identical as far as routing
-is concerned.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">PathMatch1</font> <font color="#990000">=</font> <font color="#FF0000">"/"</font><font color="#990000">.</font>
+<font color="#009900">PathMatch2</font> <font color="#990000">=</font> <font color="#FF0000">"/path/to/resource"</font><font color="#990000">.</font>
+
+<font color="#009900">HostMatch1</font> <font color="#990000">=</font> <font color="#FF0000">"cowboy.example.org"</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>As you can see, all paths defined this way must start with a slash character. Note that these two paths are identical as far as routing is concerned.</p>
+<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">PathMatch2</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"/path/to/resource"</span><span style="color: #990000">.</span>
-<span style="color: #009900">PathMatch3</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"/path/to/resource/"</span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Hosts with and without a trailing dot are equivalent for routing.
-Similarly, hosts with and without a leading dot are also equivalent.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">PathMatch2</font> <font color="#990000">=</font> <font color="#FF0000">"/path/to/resource"</font><font color="#990000">.</font>
+<font color="#009900">PathMatch3</font> <font color="#990000">=</font> <font color="#FF0000">"/path/to/resource/"</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Hosts with and without a trailing dot are equivalent for routing. Similarly, hosts with and without a leading dot are also equivalent.</p>
+<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">HostMatch1</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"cowboy.example.org"</span><span style="color: #990000">.</span>
-<span style="color: #009900">HostMatch2</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"cowboy.example.org."</span><span style="color: #990000">.</span>
-<span style="color: #009900">HostMatch3</span> <span style="color: #990000">=</span> <span style="color: #FF0000">".cowboy.example.org"</span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>It is possible to extract segments of the host and path and to store
-the values in the <code>Req</code> object for later use. We call these kind of
-values bindings.</p></div>
-<div class="paragraph"><p>The syntax for bindings is very simple. A segment that begins with
-the <code>:</code> character means that what follows until the end of the segment
-is the name of the binding in which the segment value will be stored.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">HostMatch1</font> <font color="#990000">=</font> <font color="#FF0000">"cowboy.example.org"</font><font color="#990000">.</font>
+<font color="#009900">HostMatch2</font> <font color="#990000">=</font> <font color="#FF0000">"cowboy.example.org."</font><font color="#990000">.</font>
+<font color="#009900">HostMatch3</font> <font color="#990000">=</font> <font color="#FF0000">".cowboy.example.org"</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>It is possible to extract segments of the host and path and to store the values in the <code>Req</code> object for later use. We call these kind of values bindings.</p>
+<p>The syntax for bindings is very simple. A segment that begins with the <code>:</code> character means that what follows until the end of the segment is the name of the binding in which the segment value will be stored.</p>
+<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">PathMatch</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"/hats/:name/prices"</span><span style="color: #990000">.</span>
-<span style="color: #009900">HostMatch</span> <span style="color: #990000">=</span> <span style="color: #FF0000">":subdomain.example.org"</span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>If these two end up matching when routing, you will end up with two
-bindings defined, <code>subdomain</code> and <code>name</code>, each containing the
-segment value where they were defined. For example, the URL
-<code>http://test.example.org/hats/wild_cowboy_legendary/prices</code> will
-result in having the value <code>test</code> bound to the name <code>subdomain</code>
-and the value <code>wild_cowboy_legendary</code> bound to the name <code>name</code>.
-They can later be retrieved using <code>cowboy_req:binding/{2,3}</code>. The
-binding name must be given as an atom.</p></div>
-<div class="paragraph"><p>There is a special binding name you can use to mimic the underscore
-variable in Erlang. Any match against the <code>_</code> binding will succeed
-but the data will be discarded. This is especially useful for
-matching against many domain names in one go.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">PathMatch</font> <font color="#990000">=</font> <font color="#FF0000">"/hats/:name/prices"</font><font color="#990000">.</font>
+<font color="#009900">HostMatch</font> <font color="#990000">=</font> <font color="#FF0000">":subdomain.example.org"</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>If these two end up matching when routing, you will end up with two bindings defined, <code>subdomain</code> and <code>name</code>, each containing the segment value where they were defined. For example, the URL <code>http://test.example.org/hats/wild_cowboy_legendary/prices</code> will result in having the value <code>test</code> bound to the name <code>subdomain</code> and the value <code>wild_cowboy_legendary</code> bound to the name <code>name</code>. They can later be retrieved using <code>cowboy_req:binding/{2,3}</code>. The binding name must be given as an atom.</p>
+<p>There is a special binding name you can use to mimic the underscore variable in Erlang. Any match against the <code>_</code> binding will succeed but the data will be discarded. This is especially useful for matching against many domain names in one go.</p>
+<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">HostMatch</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"ninenines.:_"</span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Similarly, it is possible to have optional segments. Anything
-between brackets is optional.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">HostMatch</font> <font color="#990000">=</font> <font color="#FF0000">"ninenines.:_"</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Similarly, it is possible to have optional segments. Anything between brackets is optional.</p>
+<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">PathMatch</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"/hats/[page/:number]"</span><span style="color: #990000">.</span>
-<span style="color: #009900">HostMatch</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"[www.]ninenines.eu"</span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>You can also have imbricated optional segments.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">PathMatch</font> <font color="#990000">=</font> <font color="#FF0000">"/hats/[page/:number]"</font><font color="#990000">.</font>
+<font color="#009900">HostMatch</font> <font color="#990000">=</font> <font color="#FF0000">"[www.]ninenines.eu"</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>You can also have imbricated optional segments.</p>
+<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">PathMatch</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"/hats/[page/[:number]]"</span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>You can retrieve the rest of the host or path using <code>[...]</code>.
-In the case of hosts it will match anything before, in the case
-of paths anything after the previously matched segments. It is
-a special case of optional segments, in that it can have
-zero, one or many segments. You can then find the segments using
-<code>cowboy_req:host_info/1</code> and <code>cowboy_req:path_info/1</code> respectively.
-They will be represented as a list of segments.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">PathMatch</font> <font color="#990000">=</font> <font color="#FF0000">"/hats/[page/[:number]]"</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>You can retrieve the rest of the host or path using <code>[...]</code>. In the case of hosts it will match anything before, in the case of paths anything after the previously matched segments. It is a special case of optional segments, in that it can have zero, one or many segments. You can then find the segments using <code>cowboy_req:host_info/1</code> and <code>cowboy_req:path_info/1</code> respectively. They will be represented as a list of segments.</p>
+<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">PathMatch</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"/hats/[...]"</span><span style="color: #990000">.</span>
-<span style="color: #009900">HostMatch</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"[...]ninenines.eu"</span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>If a binding appears twice in the routing rules, then the match
-will succeed only if they share the same value. This copies the
-Erlang pattern matching behavior.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">PathMatch</font> <font color="#990000">=</font> <font color="#FF0000">"/hats/[...]"</font><font color="#990000">.</font>
+<font color="#009900">HostMatch</font> <font color="#990000">=</font> <font color="#FF0000">"[...]ninenines.eu"</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>If a binding appears twice in the routing rules, then the match will succeed only if they share the same value. This copies the Erlang pattern matching behavior.</p>
+<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">PathMatch</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"/hats/:name/:name"</span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>This is also true when an optional segment is present. In this
-case the two values must be identical only if the segment is
-available.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">PathMatch</font> <font color="#990000">=</font> <font color="#FF0000">"/hats/:name/:name"</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>This is also true when an optional segment is present. In this case the two values must be identical only if the segment is available.</p>
+<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">PathMatch</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"/hats/:name/[:name]"</span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>If a binding is defined in both the host and path, then they must
-also share the same value.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">PathMatch</font> <font color="#990000">=</font> <font color="#FF0000">"/hats/:name/[:name]"</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>If a binding is defined in both the host and path, then they must also share the same value.</p>
+<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">PathMatch</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"/:user/[...]"</span><span style="color: #990000">.</span>
-<span style="color: #009900">HostMatch</span> <span style="color: #990000">=</span> <span style="color: #FF0000">":user.github.com"</span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Finally, there are two special match values that can be used. The
-first is the atom <code>'_'</code> which will match any host or path.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">PathMatch</font> <font color="#990000">=</font> <font color="#FF0000">"/:user/[...]"</font><font color="#990000">.</font>
+<font color="#009900">HostMatch</font> <font color="#990000">=</font> <font color="#FF0000">":user.github.com"</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Finally, there are two special match values that can be used. The first is the atom <code>&apos;_&apos;</code> which will match any host or path.</p>
+<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">PathMatch</span> <span style="color: #990000">=</span> <span style="color: #FF6600">'_'</span><span style="color: #990000">.</span>
-<span style="color: #009900">HostMatch</span> <span style="color: #990000">=</span> <span style="color: #FF6600">'_'</span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>The second is the special host match <code>"*"</code> which will match the
-wildcard path, generally used alongside the <code>OPTIONS</code> method.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">PathMatch</font> <font color="#990000">=</font> <font color="#FF6600">'_'</font><font color="#990000">.</font>
+<font color="#009900">HostMatch</font> <font color="#990000">=</font> <font color="#FF6600">'_'</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>The second is the special host match <code>&quot;*&quot;</code> which will match the wildcard path, generally used alongside the <code>OPTIONS</code> method.</p>
+<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">HostMatch</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"*"</span><span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">HostMatch</font> <font color="#990000">=</font> <font color="#FF0000">"*"</font><font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_constraints">Constraints</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>After the matching has completed, the resulting bindings can be tested
-against a set of constraints. Constraints are only tested when the
-binding is defined. They run in the order you defined them. The match
-will succeed only if they all succeed. If the match fails, then Cowboy
-tries the next route in the list.</p></div>
-<div class="paragraph"><p>The format used for constraints is the same as match functions in
-<code>cowboy_req</code>: they are provided as a list of fields which may have
-one or more constraints. While the router accepts the same format,
-it will skip fields with no constraints and will also ignore default
-values, if any.</p></div>
-<div class="paragraph"><p>Read more about <a href="../constraints">constraints</a>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>After the matching has completed, the resulting bindings can be tested against a set of constraints. Constraints are only tested when the binding is defined. They run in the order you defined them. The match will succeed only if they all succeed. If the match fails, then Cowboy tries the next route in the list.</p>
+<p>The format used for constraints is the same as match functions in <code>cowboy_req</code>: they are provided as a list of fields which may have one or more constraints. While the router accepts the same format, it will skip fields with no constraints and will also ignore default values, if any.</p>
+<p>Read more about <a href="../constraints">constraints</a>.</p>
<h2 id="_compilation">Compilation</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The routes must be compiled before Cowboy can use them. The compilation
-step normalizes the routes to simplify the code and speed up the
-execution, but the routes are still looked up one by one in the end.
-Faster compilation strategies could be to compile the routes directly
-to Erlang code, but would require heavier dependencies.</p></div>
-<div class="paragraph"><p>To compile routes, just call the appropriate function:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The routes must be compiled before Cowboy can use them. The compilation step normalizes the routes to simplify the code and speed up the execution, but the routes are still looked up one by one in the end. Faster compilation strategies could be to compile the routes directly to Erlang code, but would require heavier dependencies.</p>
+<p>To compile routes, just call the appropriate function:</p>
+<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">Dispatch</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_router:compile</span></span>([
- <span style="font-style: italic"><span style="color: #9A1900">%% {HostMatch, list({PathMatch, Handler, InitialState})}</span></span>
- {<span style="color: #FF6600">'_'</span>, [{<span style="color: #FF6600">'_'</span>, <span style="color: #FF6600">my_handler</span>, #{}}]}
+<pre><tt><font color="#009900">Dispatch</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_router:compile</font></b>([
+ <i><font color="#9A1900">%% {HostMatch, list({PathMatch, Handler, InitialState})}</font></i>
+ {<font color="#FF6600">'_'</font>, [{<font color="#FF6600">'_'</font>, <font color="#FF6600">my_handler</font>, #{}}]}
]),
-<span style="font-style: italic"><span style="color: #9A1900">%% Name, NbAcceptors, TransOpts, ProtoOpts</span></span>
-<span style="font-weight: bold"><span style="color: #000000">cowboy:start_clear</span></span>(<span style="color: #FF6600">my_http_listener</span>,
- [{<span style="color: #FF6600">port</span>, <span style="color: #993399">8080</span>}],
- #{<span style="color: #0000FF">env</span> <span style="color: #990000">=&gt;</span> #{<span style="color: #0000FF">dispatch</span> <span style="color: #990000">=&gt;</span> <span style="color: #009900">Dispatch</span>}}
-)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<i><font color="#9A1900">%% Name, NbAcceptors, TransOpts, ProtoOpts</font></i>
+<b><font color="#000000">cowboy:start_clear</font></b>(<font color="#FF6600">my_http_listener</font>,
+ [{<font color="#FF6600">port</font>, <font color="#993399">8080</font>}],
+ #{<font color="#0000FF">env</font> <font color="#990000">=&gt;</font> #{<font color="#0000FF">dispatch</font> <font color="#990000">=&gt;</font> <font color="#009900">Dispatch</font>}}
+)<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_live_update">Live update</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>You can use the <code>cowboy:set_env/3</code> function for updating the dispatch
-list used by routing. This will apply to all new connections accepted
-by the listener:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>You can use the <code>cowboy:set_env/3</code> function for updating the dispatch list used by routing. This will apply to all new connections accepted by the listener:</p>
+<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">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>
+<pre><tt><font color="#009900">Dispatch</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_router:compile</font></b>(<font color="#009900">Routes</font>),
+<b><font color="#000000">cowboy:set_env</font></b>(<font color="#FF6600">my_http_listener</font>, <font color="#FF6600">dispatch</font>, <font color="#009900">Dispatch</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Note that you need to compile the routes again before updating.</p>
+
diff --git a/docs/en/cowboy/2.4/guide/specs/index.html b/docs/en/cowboy/2.4/guide/specs/index.html
index 9f34951a..bbee8377 100644
--- a/docs/en/cowboy/2.4/guide/specs/index.html
+++ b/docs/en/cowboy/2.4/guide/specs/index.html
@@ -62,859 +62,345 @@
<h1 class="lined-header"><span>HTTP and other specifications</span></h1>
-<div class="paragraph"><p>This chapter intends to list all the specification documents
-for or related to HTTP.</p></div>
-<div class="sect1">
+<p>This chapter intends to list all the specification documents for or related to HTTP.</p>
<h2 id="_http">HTTP</h2>
-<div class="sectionbody">
-<div class="sect3">
<h4 id="_iana_registries">IANA Registries</h4>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="https://www.iana.org/assignments/http-methods/http-methods.xhtml">HTTP Method Registry</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml">HTTP Status Code Registry</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.iana.org/assignments/message-headers/message-headers.xhtml">Message Headers</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.iana.org/assignments/http-parameters/http-parameters.xhtml">HTTP Parameters</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.iana.org/assignments/http-alt-svc-parameters/http-alt-svc-parameters.xhtml">HTTP Alt-Svc Parameter Registry</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.iana.org/assignments/http-authschemes/http-authschemes.xhtml">HTTP Authentication Scheme Registry</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.iana.org/assignments/http-cache-directives/http-cache-directives.xhtml">HTTP Cache Directive Registry</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.iana.org/assignments/http-dig-alg/http-dig-alg.xhtml">HTTP Digest Algorithm Values</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.iana.org/assignments/hoba-device-identifiers/hoba-device-identifiers.xhtml">HTTP Origin-Bound Authentication Device Identifier Types</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.iana.org/assignments/http-upgrade-tokens/http-upgrade-tokens.xhtml">HTTP Upgrade Token Registry</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.iana.org/assignments/http-warn-codes/http-warn-codes.xhtml">HTTP Warn Codes</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.iana.org/assignments/http2-parameters/http2-parameters.xhtml">HTTP/2 Parameters</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.ietf.org/assignments/websocket/websocket.xml">WebSocket Protocol Registries</a>
-</p>
-</li>
-</ul></div>
-</div>
-<div class="sect3">
+<ul><li><a href="https://www.iana.org/assignments/http-methods/http-methods.xhtml">HTTP Method Registry</a>
+</li>
+<li><a href="https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml">HTTP Status Code Registry</a>
+</li>
+<li><a href="https://www.iana.org/assignments/message-headers/message-headers.xhtml">Message Headers</a>
+</li>
+<li><a href="https://www.iana.org/assignments/http-parameters/http-parameters.xhtml">HTTP Parameters</a>
+</li>
+<li><a href="https://www.iana.org/assignments/http-alt-svc-parameters/http-alt-svc-parameters.xhtml">HTTP Alt-Svc Parameter Registry</a>
+</li>
+<li><a href="https://www.iana.org/assignments/http-authschemes/http-authschemes.xhtml">HTTP Authentication Scheme Registry</a>
+</li>
+<li><a href="https://www.iana.org/assignments/http-cache-directives/http-cache-directives.xhtml">HTTP Cache Directive Registry</a>
+</li>
+<li><a href="https://www.iana.org/assignments/http-dig-alg/http-dig-alg.xhtml">HTTP Digest Algorithm Values</a>
+</li>
+<li><a href="https://www.iana.org/assignments/hoba-device-identifiers/hoba-device-identifiers.xhtml">HTTP Origin-Bound Authentication Device Identifier Types</a>
+</li>
+<li><a href="https://www.iana.org/assignments/http-upgrade-tokens/http-upgrade-tokens.xhtml">HTTP Upgrade Token Registry</a>
+</li>
+<li><a href="https://www.iana.org/assignments/http-warn-codes/http-warn-codes.xhtml">HTTP Warn Codes</a>
+</li>
+<li><a href="https://www.iana.org/assignments/http2-parameters/http2-parameters.xhtml">HTTP/2 Parameters</a>
+</li>
+<li><a href="https://www.ietf.org/assignments/websocket/websocket.xml">WebSocket Protocol Registries</a>
+</li>
+</ul>
<h4 id="_current">Current</h4>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="http://www.w3.org/TR/cors/">CORS</a>: Cross-Origin Resource Sharing
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/CSP2/">CSP2</a>: Content Security Policy Level 2
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/tracking-dnt/">DNT</a>: Tracking Preference Expression (DNT)
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/eventsource/">eventsource</a>: Server-Sent Events
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.w3.org/TR/html4/interact/forms.html#h-17.13.4">Form content types</a>: Form content types
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.w3.org/TR/preload/">Preload</a>: Preload
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.haproxy.org/download/1.8/doc/proxy-protocol.txt">PROXY</a>: The PROXY protocol
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm">REST</a>: Fielding&#8217;s Dissertation
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc1945">RFC 1945</a>: HTTP/1.0
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc1951">RFC 1951</a>: DEFLATE Compressed Data Format Specification version 1.3
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc1952">RFC 1952</a>: GZIP file format specification version 4.3
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc2046#section-5.1">RFC 2046</a>: Multipart media type (in MIME Part Two: Media Types)
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc2295">RFC 2295</a>: Transparent Content Negotiation in HTTP
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc2296">RFC 2296</a>: HTTP Remote Variant Selection Algorithm: RVSA/1.0
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc2817">RFC 2817</a>: Upgrading to TLS Within HTTP/1.1
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc2818">RFC 2818</a>: HTTP Over TLS
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc3230">RFC 3230</a>: Instance Digests in HTTP
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc4559">RFC 4559</a>: SPNEGO-based Kerberos and NTLM HTTP Authentication in Microsoft Windows
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc5789">RFC 5789</a>: PATCH Method for HTTP
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc5843">RFC 5843</a>: Additional Hash Algorithms for HTTP Instance Digests
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc5861">RFC 5861</a>: HTTP Cache-Control Extensions for Stale Content
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc5988">RFC 5988</a>: Web Linking
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6265">RFC 6265</a>: HTTP State Management Mechanism
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6266">RFC 6266</a>: Use of the Content-Disposition Header Field
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6454">RFC 6454</a>: The Web Origin Concept
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6455">RFC 6455</a>: The WebSocket Protocol
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6585">RFC 6585</a>: Additional HTTP Status Codes
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6750">RFC 6750</a>: The OAuth 2.0 Authorization Framework: Bearer Token Usage
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6797">RFC 6797</a>: HTTP Strict Transport Security (HSTS)
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6903">RFC 6903</a>: Additional Link Relation Types
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7034">RFC 7034</a>: HTTP Header Field X-Frame-Options
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7089">RFC 7089</a>: Time-Based Access to Resource States: Memento
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7230">RFC 7230</a>: HTTP/1.1 Message Syntax and Routing
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7231">RFC 7231</a>: HTTP/1.1 Semantics and Content
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>: HTTP/1.1 Conditional Requests
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7233">RFC 7233</a>: HTTP/1.1 Range Requests
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7234">RFC 7234</a>: HTTP/1.1 Caching
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7235">RFC 7235</a>: HTTP/1.1 Authentication
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7239">RFC 7239</a>: Forwarded HTTP Extension
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7240">RFC 7240</a>: Prefer Header for HTTP
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7469">RFC 7469</a>: Public Key Pinning Extension for HTTP
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7486">RFC 7486</a>: HTTP Origin-Bound Authentication (HOBA)
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7538">RFC 7538</a>: HTTP Status Code 308 (Permanent Redirect)
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7540">RFC 7540</a>: Hypertext Transfer Protocol Version 2 (HTTP/2)
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7541">RFC 7541</a>: HPACK: Header Compression for HTTP/2
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7578">RFC 7578</a>: Returning Values from Forms: multipart/form-data
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7615">RFC 7615</a>: HTTP Authentication-Info and Proxy-Authentication-Info Response Header Fields
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7616">RFC 7616</a>: HTTP Digest Access Authentication
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7617">RFC 7617</a>: The <em>Basic</em> HTTP Authentication Scheme
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7639">RFC 7639</a>: The ALPN HTTP Header Field
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7692">RFC 7692</a>: Compression Extensions for WebSocket
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7694">RFC 7694</a>: HTTP Client-Initiated Content-Encoding
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7725">RFC 7725</a>: An HTTP Status Code to Report Legal Obstacles
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7804">RFC 7804</a>: Salted Challenge Response HTTP Authentication Mechanism
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7838">RFC 7838</a>: HTTP Alternative Services
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7932">RFC 7932</a>: Brotli Compressed Data Format
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7936">RFC 7936</a>: Clarifying Registry Procedures for the WebSocket Subprotocol Name Registry
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc8053">RFC 8053</a>: HTTP Authentication Extensions for Interactive Clients
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc8164">RFC 8164</a>: Opportunistic Security for HTTP/2
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc8187">RFC 8187</a>: Indicating Character Encoding and Language for HTTP Header Field Parameters
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc8188">RFC 8188</a>: Encrypted Content-Encoding for HTTP
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc8246">RFC 8246</a>: HTTP Immutable Responses
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc8297">RFC 8297</a>: An HTTP Status Code for Indicating Hints
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc8336">RFC 8336</a>: The ORIGIN HTTP/2 Frame
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.w3.org/TR/webmention/">Webmention</a>: Webmention
-</p>
-</li>
-</ul></div>
-</div>
-<div class="sect3">
+<ul><li><a href="http://www.w3.org/TR/cors/">CORS</a>: Cross-Origin Resource Sharing
+</li>
+<li><a href="http://www.w3.org/TR/CSP2/">CSP2</a>: Content Security Policy Level 2
+</li>
+<li><a href="http://www.w3.org/TR/tracking-dnt/">DNT</a>: Tracking Preference Expression (DNT)
+</li>
+<li><a href="http://www.w3.org/TR/eventsource/">eventsource</a>: Server-Sent Events
+</li>
+<li><a href="https://www.w3.org/TR/html4/interact/forms.html#h-17.13.4">Form content types</a>: Form content types
+</li>
+<li><a href="https://www.w3.org/TR/preload/">Preload</a>: Preload
+</li>
+<li><a href="https://www.haproxy.org/download/1.8/doc/proxy-protocol.txt">PROXY</a>: The PROXY protocol
+</li>
+<li><a href="http://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm">REST</a>: Fielding&apos;s Dissertation
+</li>
+<li><a href="https://tools.ietf.org/html/rfc1945">RFC 1945</a>: HTTP/1.0
+</li>
+<li><a href="https://tools.ietf.org/html/rfc1951">RFC 1951</a>: DEFLATE Compressed Data Format Specification version 1.3
+</li>
+<li><a href="https://tools.ietf.org/html/rfc1952">RFC 1952</a>: GZIP file format specification version 4.3
+</li>
+<li><a href="https://tools.ietf.org/html/rfc2046#section-5.1">RFC 2046</a>: Multipart media type (in MIME Part Two: Media Types)
+</li>
+<li><a href="https://tools.ietf.org/html/rfc2295">RFC 2295</a>: Transparent Content Negotiation in HTTP
+</li>
+<li><a href="https://tools.ietf.org/html/rfc2296">RFC 2296</a>: HTTP Remote Variant Selection Algorithm: RVSA/1.0
+</li>
+<li><a href="https://tools.ietf.org/html/rfc2817">RFC 2817</a>: Upgrading to TLS Within HTTP/1.1
+</li>
+<li><a href="https://tools.ietf.org/html/rfc2818">RFC 2818</a>: HTTP Over TLS
+</li>
+<li><a href="https://tools.ietf.org/html/rfc3230">RFC 3230</a>: Instance Digests in HTTP
+</li>
+<li><a href="https://tools.ietf.org/html/rfc4559">RFC 4559</a>: SPNEGO-based Kerberos and NTLM HTTP Authentication in Microsoft Windows
+</li>
+<li><a href="https://tools.ietf.org/html/rfc5789">RFC 5789</a>: PATCH Method for HTTP
+</li>
+<li><a href="https://tools.ietf.org/html/rfc5843">RFC 5843</a>: Additional Hash Algorithms for HTTP Instance Digests
+</li>
+<li><a href="https://tools.ietf.org/html/rfc5861">RFC 5861</a>: HTTP Cache-Control Extensions for Stale Content
+</li>
+<li><a href="https://tools.ietf.org/html/rfc5988">RFC 5988</a>: Web Linking
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6265">RFC 6265</a>: HTTP State Management Mechanism
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6266">RFC 6266</a>: Use of the Content-Disposition Header Field
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6454">RFC 6454</a>: The Web Origin Concept
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6455">RFC 6455</a>: The WebSocket Protocol
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6585">RFC 6585</a>: Additional HTTP Status Codes
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6750">RFC 6750</a>: The OAuth 2.0 Authorization Framework: Bearer Token Usage
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6797">RFC 6797</a>: HTTP Strict Transport Security (HSTS)
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6903">RFC 6903</a>: Additional Link Relation Types
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7034">RFC 7034</a>: HTTP Header Field X-Frame-Options
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7089">RFC 7089</a>: Time-Based Access to Resource States: Memento
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7230">RFC 7230</a>: HTTP/1.1 Message Syntax and Routing
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7231">RFC 7231</a>: HTTP/1.1 Semantics and Content
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>: HTTP/1.1 Conditional Requests
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7233">RFC 7233</a>: HTTP/1.1 Range Requests
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7234">RFC 7234</a>: HTTP/1.1 Caching
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7235">RFC 7235</a>: HTTP/1.1 Authentication
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7239">RFC 7239</a>: Forwarded HTTP Extension
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7240">RFC 7240</a>: Prefer Header for HTTP
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7469">RFC 7469</a>: Public Key Pinning Extension for HTTP
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7486">RFC 7486</a>: HTTP Origin-Bound Authentication (HOBA)
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7538">RFC 7538</a>: HTTP Status Code 308 (Permanent Redirect)
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7540">RFC 7540</a>: Hypertext Transfer Protocol Version 2 (HTTP/2)
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7541">RFC 7541</a>: HPACK: Header Compression for HTTP/2
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7578">RFC 7578</a>: Returning Values from Forms: multipart/form-data
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7615">RFC 7615</a>: HTTP Authentication-Info and Proxy-Authentication-Info Response Header Fields
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7616">RFC 7616</a>: HTTP Digest Access Authentication
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7617">RFC 7617</a>: The <em>Basic</em> HTTP Authentication Scheme
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7639">RFC 7639</a>: The ALPN HTTP Header Field
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7692">RFC 7692</a>: Compression Extensions for WebSocket
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7694">RFC 7694</a>: HTTP Client-Initiated Content-Encoding
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7725">RFC 7725</a>: An HTTP Status Code to Report Legal Obstacles
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7804">RFC 7804</a>: Salted Challenge Response HTTP Authentication Mechanism
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7838">RFC 7838</a>: HTTP Alternative Services
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7932">RFC 7932</a>: Brotli Compressed Data Format
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7936">RFC 7936</a>: Clarifying Registry Procedures for the WebSocket Subprotocol Name Registry
+</li>
+<li><a href="https://tools.ietf.org/html/rfc8053">RFC 8053</a>: HTTP Authentication Extensions for Interactive Clients
+</li>
+<li><a href="https://tools.ietf.org/html/rfc8164">RFC 8164</a>: Opportunistic Security for HTTP/2
+</li>
+<li><a href="https://tools.ietf.org/html/rfc8187">RFC 8187</a>: Indicating Character Encoding and Language for HTTP Header Field Parameters
+</li>
+<li><a href="https://tools.ietf.org/html/rfc8188">RFC 8188</a>: Encrypted Content-Encoding for HTTP
+</li>
+<li><a href="https://tools.ietf.org/html/rfc8246">RFC 8246</a>: HTTP Immutable Responses
+</li>
+<li><a href="https://tools.ietf.org/html/rfc8297">RFC 8297</a>: An HTTP Status Code for Indicating Hints
+</li>
+<li><a href="https://tools.ietf.org/html/rfc8336">RFC 8336</a>: The ORIGIN HTTP/2 Frame
+</li>
+<li><a href="https://www.w3.org/TR/webmention/">Webmention</a>: Webmention
+</li>
+</ul>
<h4 id="_upcoming">Upcoming</h4>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="https://www.w3.org/TR/csp-cookies/">Content Security Policy: Cookie Controls</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.w3.org/TR/csp-embedded-enforcement/">Content Security Policy: Embedded Enforcement</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.w3.org/TR/CSP3/">Content Security Policy Level 3</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.w3.org/TR/csp-pinning/">Content Security Policy Pinning</a>
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/referrer-policy/">Referrer Policy</a>
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/UISecurity/">User Interface Security Directives for Content Security Policy</a>
-</p>
-</li>
-</ul></div>
-</div>
-<div class="sect3">
+<ul><li><a href="https://www.w3.org/TR/csp-cookies/">Content Security Policy: Cookie Controls</a>
+</li>
+<li><a href="https://www.w3.org/TR/csp-embedded-enforcement/">Content Security Policy: Embedded Enforcement</a>
+</li>
+<li><a href="https://www.w3.org/TR/CSP3/">Content Security Policy Level 3</a>
+</li>
+<li><a href="https://www.w3.org/TR/csp-pinning/">Content Security Policy Pinning</a>
+</li>
+<li><a href="http://www.w3.org/TR/referrer-policy/">Referrer Policy</a>
+</li>
+<li><a href="http://www.w3.org/TR/UISecurity/">User Interface Security Directives for Content Security Policy</a>
+</li>
+</ul>
<h4 id="_informative">Informative</h4>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="http://www.w3.org/TR/webarch/">Architecture of the World Wide Web</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc2936">RFC 2936</a>: HTTP MIME Type Handler Detection
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc2964">RFC 2964</a>: Use of HTTP State Management
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc3143">RFC 3143</a>: Known HTTP Proxy/Caching Problems
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6202">RFC 6202</a>: Known Issues and Best Practices for the Use of Long Polling and Streaming in Bidirectional HTTP
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6838">RFC 6838</a>: Media Type Specifications and Registration Procedures
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7478">RFC 7478</a>: Web Real-Time Communication Use Cases and Requirements
-</p>
-</li>
-</ul></div>
-</div>
-<div class="sect3">
+<ul><li><a href="http://www.w3.org/TR/webarch/">Architecture of the World Wide Web</a>
+</li>
+<li><a href="https://tools.ietf.org/html/rfc2936">RFC 2936</a>: HTTP MIME Type Handler Detection
+</li>
+<li><a href="https://tools.ietf.org/html/rfc2964">RFC 2964</a>: Use of HTTP State Management
+</li>
+<li><a href="https://tools.ietf.org/html/rfc3143">RFC 3143</a>: Known HTTP Proxy/Caching Problems
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6202">RFC 6202</a>: Known Issues and Best Practices for the Use of Long Polling and Streaming in Bidirectional HTTP
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6838">RFC 6838</a>: Media Type Specifications and Registration Procedures
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7478">RFC 7478</a>: Web Real-Time Communication Use Cases and Requirements
+</li>
+</ul>
<h4 id="_related">Related</h4>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="http://www.w3.org/TR/app-uri/">app: URL Scheme</a>
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/beacon/">Beacon</a>
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/FileAPI/">File API</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc8030">Generic Event Delivery Using HTTP Push</a>
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/capability-urls/">Good Practices for Capability URLs</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://html.spec.whatwg.org/multipage/">HTML Living Standard</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://developers.whatwg.org/">HTML Living Standard for Web developers</a>
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/html401/">HTML4.01</a>
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/html5/">HTML5</a>
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/html51/">HTML5.1</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://www.w3.org/TR/html52/">HTML5.2</a>
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/media-frags/">Media Fragments URI 1.0</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6690">RFC 6690</a>: Constrained RESTful Environments (CoRE) Link Format
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7807">RFC 7807</a>: Problem Details for HTTP APIs
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6906">RFC 6906</a>: The <em>profile</em> Link Relation Type
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/SRI/">Subresource Integrity</a>
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/tracking-compliance/">Tracking Compliance and Scope</a>
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/media-frags-reqs/">Use cases and requirements for Media Fragments</a>
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/webrtc/">WebRTC 1.0: Real-time Communication Between Browsers</a>
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/websockets/">Websocket API</a>
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/XMLHttpRequest/">XMLHttpRequest Level 1</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://xhr.spec.whatwg.org/">XMLHttpRequest Living Standard</a>
-</p>
-</li>
-</ul></div>
-</div>
-<div class="sect3">
+<ul><li><a href="http://www.w3.org/TR/app-uri/">app: URL Scheme</a>
+</li>
+<li><a href="http://www.w3.org/TR/beacon/">Beacon</a>
+</li>
+<li><a href="http://www.w3.org/TR/FileAPI/">File API</a>
+</li>
+<li><a href="https://tools.ietf.org/html/rfc8030">Generic Event Delivery Using HTTP Push</a>
+</li>
+<li><a href="http://www.w3.org/TR/capability-urls/">Good Practices for Capability URLs</a>
+</li>
+<li><a href="https://html.spec.whatwg.org/multipage/">HTML Living Standard</a>
+</li>
+<li><a href="https://developers.whatwg.org/">HTML Living Standard for Web developers</a>
+</li>
+<li><a href="http://www.w3.org/TR/html401/">HTML4.01</a>
+</li>
+<li><a href="http://www.w3.org/TR/html5/">HTML5</a>
+</li>
+<li><a href="http://www.w3.org/TR/html51/">HTML5.1</a>
+</li>
+<li><a href="https://www.w3.org/TR/html52/">HTML5.2</a>
+</li>
+<li><a href="http://www.w3.org/TR/media-frags/">Media Fragments URI 1.0</a>
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6690">RFC 6690</a>: Constrained RESTful Environments (CoRE) Link Format
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7807">RFC 7807</a>: Problem Details for HTTP APIs
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6906">RFC 6906</a>: The <em>profile</em> Link Relation Type
+</li>
+<li><a href="http://www.w3.org/TR/SRI/">Subresource Integrity</a>
+</li>
+<li><a href="http://www.w3.org/TR/tracking-compliance/">Tracking Compliance and Scope</a>
+</li>
+<li><a href="http://www.w3.org/TR/media-frags-reqs/">Use cases and requirements for Media Fragments</a>
+</li>
+<li><a href="http://www.w3.org/TR/webrtc/">WebRTC 1.0: Real-time Communication Between Browsers</a>
+</li>
+<li><a href="http://www.w3.org/TR/websockets/">Websocket API</a>
+</li>
+<li><a href="http://www.w3.org/TR/XMLHttpRequest/">XMLHttpRequest Level 1</a>
+</li>
+<li><a href="https://xhr.spec.whatwg.org/">XMLHttpRequest Living Standard</a>
+</li>
+</ul>
<h4 id="_seemingly_obsolete">Seemingly obsolete</h4>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc2227">RFC 2227</a>: Simple Hit-Metering and Usage-Limiting for HTTP
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc2310">RFC 2310</a>: The Safe Response Header Field
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc2324">RFC 2324</a>: Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0)
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc2660">RFC 2660</a>: The Secure HyperText Transfer Protocol
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc2774">RFC 2774</a>: An HTTP Extension Framework
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc2965">RFC 2965</a>: HTTP State Management Mechanism (Cookie2)
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc3229">RFC 3229</a>: Delta encoding in HTTP
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7168">RFC 7168</a>: The Hyper Text Coffee Pot Control Protocol for Tea Efflux Appliances (HTCPCP-TEA)
-</p>
-</li>
-<li>
-<p>
-<a href="http://dev.chromium.org/spdy/spdy-protocol">SPDY</a>: SPDY Protocol
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/draft-tyoshino-hybi-websocket-perframe-deflate-06">x-webkit-deflate-frame</a>: Deprecated Websocket compression
-</p>
-</li>
-</ul></div>
-</div>
-</div>
-</div>
-<div class="sect1">
+<ul><li><a href="https://tools.ietf.org/html/rfc2227">RFC 2227</a>: Simple Hit-Metering and Usage-Limiting for HTTP
+</li>
+<li><a href="https://tools.ietf.org/html/rfc2310">RFC 2310</a>: The Safe Response Header Field
+</li>
+<li><a href="https://tools.ietf.org/html/rfc2324">RFC 2324</a>: Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0)
+</li>
+<li><a href="https://tools.ietf.org/html/rfc2660">RFC 2660</a>: The Secure HyperText Transfer Protocol
+</li>
+<li><a href="https://tools.ietf.org/html/rfc2774">RFC 2774</a>: An HTTP Extension Framework
+</li>
+<li><a href="https://tools.ietf.org/html/rfc2965">RFC 2965</a>: HTTP State Management Mechanism (Cookie2)
+</li>
+<li><a href="https://tools.ietf.org/html/rfc3229">RFC 3229</a>: Delta encoding in HTTP
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7168">RFC 7168</a>: The Hyper Text Coffee Pot Control Protocol for Tea Efflux Appliances (HTCPCP-TEA)
+</li>
+<li><a href="http://dev.chromium.org/spdy/spdy-protocol">SPDY</a>: SPDY Protocol
+</li>
+<li><a href="https://tools.ietf.org/html/draft-tyoshino-hybi-websocket-perframe-deflate-06">x-webkit-deflate-frame</a>: Deprecated Websocket compression
+</li>
+</ul>
<h2 id="_url">URL</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc3986">RFC 3986</a>: URI Generic Syntax
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6570">RFC 6570</a>: URI Template
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6874">RFC 6874</a>: Representing IPv6 Zone Identifiers in Address Literals and URIs
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7320">RFC 7320</a>: URI Design and Ownership
-</p>
-</li>
-<li>
-<p>
-<a href="http://www.w3.org/TR/url-1/">URL</a>
-</p>
-</li>
-<li>
-<p>
-<a href="https://url.spec.whatwg.org/">URL Living Standard</a>
-</p>
-</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+<ul><li><a href="https://tools.ietf.org/html/rfc3986">RFC 3986</a>: URI Generic Syntax
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6570">RFC 6570</a>: URI Template
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6874">RFC 6874</a>: Representing IPv6 Zone Identifiers in Address Literals and URIs
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7320">RFC 7320</a>: URI Design and Ownership
+</li>
+<li><a href="http://www.w3.org/TR/url-1/">URL</a>
+</li>
+<li><a href="https://url.spec.whatwg.org/">URL Living Standard</a>
+</li>
+</ul>
<h2 id="_webdav">WebDAV</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc3253">RFC 3253</a>: Versioning Extensions to WebDAV
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc3648">RFC 3648</a>: WebDAV Ordered Collections Protocol
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc3744">RFC 3744</a>: WebDAV Access Control Protocol
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc4316">RFC 4316</a>: Datatypes for WebDAV Properties
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc4331">RFC 4331</a>: Quota and Size Properties for DAV Collections
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc4437">RFC 4437</a>: WebDAV Redirect Reference Resources
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc4709">RFC 4709</a>: Mounting WebDAV Servers
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc4791">RFC 4791</a>: Calendaring Extensions to WebDAV (CalDAV)
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc4918">RFC 4918</a>: HTTP Extensions for WebDAV
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc5323">RFC 5323</a>: WebDAV SEARCH
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc5397">RFC 5397</a>: WebDAV Current Principal Extension
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc5689">RFC 5689</a>: Extended MKCOL for WebDAV
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc5842">RFC 5842</a>: Binding Extensions to WebDAV
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc5995">RFC 5995</a>: Using POST to Add Members to WebDAV Collections
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6352">RFC 6352</a>: CardDAV: vCard Extensions to WebDAV
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6578">RFC 6578</a>: Collection Synchronization for WebDAV
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6638">RFC 6638</a>: Scheduling Extensions to CalDAV
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc6764">RFC 6764</a>: Locating Services for Calendaring Extensions to WebDAV (CalDAV) and vCard Extensions to WebDAV (CardDAV)
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7809">RFC 7809</a>: Calendaring Extensions to WebDAV (CalDAV): Time Zones by Reference
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7953">RFC 7953</a>: Calendar Availability
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc8144">RFC 8144</a>: Use of the Prefer Header Field in WebDAV
-</p>
-</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+<ul><li><a href="https://tools.ietf.org/html/rfc3253">RFC 3253</a>: Versioning Extensions to WebDAV
+</li>
+<li><a href="https://tools.ietf.org/html/rfc3648">RFC 3648</a>: WebDAV Ordered Collections Protocol
+</li>
+<li><a href="https://tools.ietf.org/html/rfc3744">RFC 3744</a>: WebDAV Access Control Protocol
+</li>
+<li><a href="https://tools.ietf.org/html/rfc4316">RFC 4316</a>: Datatypes for WebDAV Properties
+</li>
+<li><a href="https://tools.ietf.org/html/rfc4331">RFC 4331</a>: Quota and Size Properties for DAV Collections
+</li>
+<li><a href="https://tools.ietf.org/html/rfc4437">RFC 4437</a>: WebDAV Redirect Reference Resources
+</li>
+<li><a href="https://tools.ietf.org/html/rfc4709">RFC 4709</a>: Mounting WebDAV Servers
+</li>
+<li><a href="https://tools.ietf.org/html/rfc4791">RFC 4791</a>: Calendaring Extensions to WebDAV (CalDAV)
+</li>
+<li><a href="https://tools.ietf.org/html/rfc4918">RFC 4918</a>: HTTP Extensions for WebDAV
+</li>
+<li><a href="https://tools.ietf.org/html/rfc5323">RFC 5323</a>: WebDAV SEARCH
+</li>
+<li><a href="https://tools.ietf.org/html/rfc5397">RFC 5397</a>: WebDAV Current Principal Extension
+</li>
+<li><a href="https://tools.ietf.org/html/rfc5689">RFC 5689</a>: Extended MKCOL for WebDAV
+</li>
+<li><a href="https://tools.ietf.org/html/rfc5842">RFC 5842</a>: Binding Extensions to WebDAV
+</li>
+<li><a href="https://tools.ietf.org/html/rfc5995">RFC 5995</a>: Using POST to Add Members to WebDAV Collections
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6352">RFC 6352</a>: CardDAV: vCard Extensions to WebDAV
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6578">RFC 6578</a>: Collection Synchronization for WebDAV
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6638">RFC 6638</a>: Scheduling Extensions to CalDAV
+</li>
+<li><a href="https://tools.ietf.org/html/rfc6764">RFC 6764</a>: Locating Services for Calendaring Extensions to WebDAV (CalDAV) and vCard Extensions to WebDAV (CardDAV)
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7809">RFC 7809</a>: Calendaring Extensions to WebDAV (CalDAV): Time Zones by Reference
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7953">RFC 7953</a>: Calendar Availability
+</li>
+<li><a href="https://tools.ietf.org/html/rfc8144">RFC 8144</a>: Use of the Prefer Header Field in WebDAV
+</li>
+</ul>
<h2 id="_coap">CoAP</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7252">RFC 7252</a>: The Constrained Application Protocol (CoAP)
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7390">RFC 7390</a>: Group Communication for CoAP
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7641">RFC 7641</a>: Observing Resources in CoAP
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7650">RFC 7650</a>: A CoAP Usage for REsource LOcation And Discovery (RELOAD)
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7959">RFC 7959</a>: Block-Wise Transfers in CoAP
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc7967">RFC 7967</a>: CoAP Option for No Server Response
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc8075">RFC 8075</a>: Guidelines for Mapping Implementations: HTTP to CoAP
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc8132">RFC 8132</a>: PATCH and FETCH Methods for CoAP
-</p>
-</li>
-<li>
-<p>
-<a href="https://tools.ietf.org/html/rfc8323">RFC 8323</a>: CoAP over TCP, TLS, and WebSockets
-</p>
-</li>
-</ul></div>
-</div>
-</div>
+<ul><li><a href="https://tools.ietf.org/html/rfc7252">RFC 7252</a>: The Constrained Application Protocol (CoAP)
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7390">RFC 7390</a>: Group Communication for CoAP
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7641">RFC 7641</a>: Observing Resources in CoAP
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7650">RFC 7650</a>: A CoAP Usage for REsource LOcation And Discovery (RELOAD)
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7959">RFC 7959</a>: Block-Wise Transfers in CoAP
+</li>
+<li><a href="https://tools.ietf.org/html/rfc7967">RFC 7967</a>: CoAP Option for No Server Response
+</li>
+<li><a href="https://tools.ietf.org/html/rfc8075">RFC 8075</a>: Guidelines for Mapping Implementations: HTTP to CoAP
+</li>
+<li><a href="https://tools.ietf.org/html/rfc8132">RFC 8132</a>: PATCH and FETCH Methods for CoAP
+</li>
+<li><a href="https://tools.ietf.org/html/rfc8323">RFC 8323</a>: CoAP over TCP, TLS, and WebSockets
+</li>
+</ul>
+
diff --git a/docs/en/cowboy/2.4/guide/static_files/index.html b/docs/en/cowboy/2.4/guide/static_files/index.html
index 4baf89f1..a6d5c7bb 100644
--- a/docs/en/cowboy/2.4/guide/static_files/index.html
+++ b/docs/en/cowboy/2.4/guide/static_files/index.html
@@ -62,173 +62,101 @@
<h1 class="lined-header"><span>Static files</span></h1>
-<div class="paragraph"><p>Cowboy comes with a ready to use handler for serving static
-files. It is provided as a convenience for serving files
-during development.</p></div>
-<div class="paragraph"><p>For systems in production, consider using one of the many
-Content Distribution Network (CDN) available on the market,
-as they are the best solution for serving files.</p></div>
-<div class="paragraph"><p>The static handler can serve either one file or all files
-from a given directory. The etag generation and mime types
-can be configured.</p></div>
-<div class="sect1">
+<p>Cowboy comes with a ready to use handler for serving static files. It is provided as a convenience for serving files during development.</p>
+<p>For systems in production, consider using one of the many Content Distribution Network (CDN) available on the market, as they are the best solution for serving files.</p>
+<p>The static handler can serve either one file or all files from a given directory. The etag generation and mime types can be configured.</p>
<h2 id="_serve_one_file">Serve one file</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>You can use the static handler to serve one specific file
-from an application&#8217;s private directory. This is particularly
-useful to serve an <em>index.html</em> file when the client requests
-the <code>/</code> path, for example. The path configured is relative
-to the given application&#8217;s private directory.</p></div>
-<div class="paragraph"><p>The following rule will serve the file <em>static/index.html</em>
-from the application <code>my_app</code>'s priv directory whenever the
-path <code>/</code> is accessed:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>You can use the static handler to serve one specific file from an application&apos;s private directory. This is particularly useful to serve an <em>index.html</em> file when the client requests the <code>/</code> path, for example. The path configured is relative to the given application&apos;s private directory.</p>
+<p>The following rule will serve the file <em>static/index.html</em> from the application <code>my_app</code>&apos;s priv directory whenever the path <code>/</code> is accessed:</p>
+<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: #FF0000">"/"</span>, <span style="color: #FF6600">cowboy_static</span>, {<span style="color: #FF6600">priv_file</span>, <span style="color: #FF6600">my_app</span>, <span style="color: #FF0000">"static/index.html"</span>}}</tt></pre></div></div>
-<div class="paragraph"><p>You can also specify the absolute path to a file, or the
-path to the file relative to the current directory:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>{<font color="#FF0000">"/"</font>, <font color="#FF6600">cowboy_static</font>, {<font color="#FF6600">priv_file</font>, <font color="#FF6600">my_app</font>, <font color="#FF0000">"static/index.html"</font>}}</tt></pre>
+</div></div>
+<p>You can also specify the absolute path to a file, or the path to the file relative to the current directory:</p>
+<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: #FF0000">"/"</span>, <span style="color: #FF6600">cowboy_static</span>, {<span style="color: #FF6600">file</span>, <span style="color: #FF0000">"/var/www/index.html"</span>}}</tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#FF0000">"/"</font>, <font color="#FF6600">cowboy_static</font>, {<font color="#FF6600">file</font>, <font color="#FF0000">"/var/www/index.html"</font>}}</tt></pre>
+</div></div>
<h2 id="_serve_all_files_from_a_directory">Serve all files from a directory</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>You can also use the static handler to serve all files that
-can be found in the configured directory. The handler will
-use the <code>path_info</code> information to resolve the file location,
-which means that your route must end with a <code>[...]</code> pattern
-for it to work. All files are served, including the ones that
-may be found in subfolders.</p></div>
-<div class="paragraph"><p>You can specify the directory relative to an application&#8217;s
-private directory.</p></div>
-<div class="paragraph"><p>The following rule will serve any file found in the application
-<code>my_app</code>'s priv directory inside the <code>static/assets</code> folder
-whenever the requested path begins with <code>/assets/</code>:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>You can also use the static handler to serve all files that can be found in the configured directory. The handler will use the <code>path_info</code> information to resolve the file location, which means that your route must end with a <code>[...]</code> pattern for it to work. All files are served, including the ones that may be found in subfolders.</p>
+<p>You can specify the directory relative to an application&apos;s private directory.</p>
+<p>The following rule will serve any file found in the application <code>my_app</code>&apos;s priv directory inside the <code>static/assets</code> folder whenever the requested path begins with <code>/assets/</code>:</p>
+<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: #FF0000">"/assets/[...]"</span>, <span style="color: #FF6600">cowboy_static</span>, {<span style="color: #FF6600">priv_dir</span>, <span style="color: #FF6600">my_app</span>, <span style="color: #FF0000">"static/assets"</span>}}</tt></pre></div></div>
-<div class="paragraph"><p>You can also specify the absolute path to the directory or
-set it relative to the current directory:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>{<font color="#FF0000">"/assets/[...]"</font>, <font color="#FF6600">cowboy_static</font>, {<font color="#FF6600">priv_dir</font>, <font color="#FF6600">my_app</font>, <font color="#FF0000">"static/assets"</font>}}</tt></pre>
+</div></div>
+<p>You can also specify the absolute path to the directory or set it relative to the current directory:</p>
+<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: #FF0000">"/assets/[...]"</span>, <span style="color: #FF6600">cowboy_static</span>, {<span style="color: #FF6600">dir</span>, <span style="color: #FF0000">"/var/www/assets"</span>}}</tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#FF0000">"/assets/[...]"</font>, <font color="#FF6600">cowboy_static</font>, {<font color="#FF6600">dir</font>, <font color="#FF0000">"/var/www/assets"</font>}}</tt></pre>
+</div></div>
<h2 id="_customize_the_mimetype_detection">Customize the mimetype detection</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>By default, Cowboy will attempt to recognize the mimetype
-of your static files by looking at the extension.</p></div>
-<div class="paragraph"><p>You can override the function that figures out the mimetype
-of the static files. It can be useful when Cowboy is missing
-a mimetype you need to handle, or when you want to reduce
-the list to make lookups faster. You can also give a
-hard-coded mimetype that will be used unconditionally.</p></div>
-<div class="paragraph"><p>Cowboy comes with two functions built-in. The default
-function only handles common file types used when building
-Web applications. The other function is an extensive list
-of hundreds of mimetypes that should cover almost any need
-you may have. You can of course create your own function.</p></div>
-<div class="paragraph"><p>To use the default function, you should not have to configure
-anything, as it is the default. If you insist, though, the
-following will do the job:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>By default, Cowboy will attempt to recognize the mimetype of your static files by looking at the extension.</p>
+<p>You can override the function that figures out the mimetype of the static files. It can be useful when Cowboy is missing a mimetype you need to handle, or when you want to reduce the list to make lookups faster. You can also give a hard-coded mimetype that will be used unconditionally.</p>
+<p>Cowboy comes with two functions built-in. The default function only handles common file types used when building Web applications. The other function is an extensive list of hundreds of mimetypes that should cover almost any need you may have. You can of course create your own function.</p>
+<p>To use the default function, you should not have to configure anything, as it is the default. If you insist, though, the following will do the job:</p>
+<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: #FF0000">"/assets/[...]"</span>, <span style="color: #FF6600">cowboy_static</span>, {<span style="color: #FF6600">priv_dir</span>, <span style="color: #FF6600">my_app</span>, <span style="color: #FF0000">"static/assets"</span>,
- [{<span style="color: #FF6600">mimetypes</span>, <span style="color: #FF6600">cow_mimetypes</span>, <span style="color: #FF6600">web</span>}]}}</tt></pre></div></div>
-<div class="paragraph"><p>As you can see, there is an optional field that may contain
-a list of less used options, like mimetypes or etag. All option
-types have this optional field.</p></div>
-<div class="paragraph"><p>To use the function that will detect almost any mimetype,
-the following configuration will do:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>{<font color="#FF0000">"/assets/[...]"</font>, <font color="#FF6600">cowboy_static</font>, {<font color="#FF6600">priv_dir</font>, <font color="#FF6600">my_app</font>, <font color="#FF0000">"static/assets"</font>,
+ [{<font color="#FF6600">mimetypes</font>, <font color="#FF6600">cow_mimetypes</font>, <font color="#FF6600">web</font>}]}}</tt></pre>
+</div></div>
+<p>As you can see, there is an optional field that may contain a list of less used options, like mimetypes or etag. All option types have this optional field.</p>
+<p>To use the function that will detect almost any mimetype, the following configuration will do:</p>
+<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: #FF0000">"/assets/[...]"</span>, <span style="color: #FF6600">cowboy_static</span>, {<span style="color: #FF6600">priv_dir</span>, <span style="color: #FF6600">my_app</span>, <span style="color: #FF0000">"static/assets"</span>,
- [{<span style="color: #FF6600">mimetypes</span>, <span style="color: #FF6600">cow_mimetypes</span>, <span style="color: #FF6600">all</span>}]}}</tt></pre></div></div>
-<div class="paragraph"><p>You probably noticed the pattern by now. The configuration
-expects a module and a function name, so you can use any
-of your own functions instead:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>{<font color="#FF0000">"/assets/[...]"</font>, <font color="#FF6600">cowboy_static</font>, {<font color="#FF6600">priv_dir</font>, <font color="#FF6600">my_app</font>, <font color="#FF0000">"static/assets"</font>,
+ [{<font color="#FF6600">mimetypes</font>, <font color="#FF6600">cow_mimetypes</font>, <font color="#FF6600">all</font>}]}}</tt></pre>
+</div></div>
+<p>You probably noticed the pattern by now. The configuration expects a module and a function name, so you can use any of your own functions instead:</p>
+<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: #FF0000">"/assets/[...]"</span>, <span style="color: #FF6600">cowboy_static</span>, {<span style="color: #FF6600">priv_dir</span>, <span style="color: #FF6600">my_app</span>, <span style="color: #FF0000">"static/assets"</span>,
- [{<span style="color: #FF6600">mimetypes</span>, <span style="color: #009900">Module</span>, <span style="color: #009900">Function</span>}]}}</tt></pre></div></div>
-<div class="paragraph"><p>The function that performs the mimetype detection receives
-a single argument that is the path to the file on disk. It
-is recommended to return the mimetype in tuple form, although
-a binary string is also allowed (but will require extra
-processing). If the function can&#8217;t figure out the mimetype,
-then it should return <code>{&lt;&lt;"application"&gt;&gt;, &lt;&lt;"octet-stream"&gt;&gt;, []}</code>.</p></div>
-<div class="paragraph"><p>When the static handler fails to find the extension,
-it will send the file as <code>application/octet-stream</code>.
-A browser receiving such file will attempt to download it
-directly to disk.</p></div>
-<div class="paragraph"><p>Finally, the mimetype can be hard-coded for all files.
-This is especially useful in combination with the <code>file</code>
-and <code>priv_file</code> options as it avoids needless computation:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>{<font color="#FF0000">"/assets/[...]"</font>, <font color="#FF6600">cowboy_static</font>, {<font color="#FF6600">priv_dir</font>, <font color="#FF6600">my_app</font>, <font color="#FF0000">"static/assets"</font>,
+ [{<font color="#FF6600">mimetypes</font>, <font color="#009900">Module</font>, <font color="#009900">Function</font>}]}}</tt></pre>
+</div></div>
+<p>The function that performs the mimetype detection receives a single argument that is the path to the file on disk. It is recommended to return the mimetype in tuple form, although a binary string is also allowed (but will require extra processing). If the function can&apos;t figure out the mimetype, then it should return <code>{&lt;&lt;&quot;application&quot;&gt;&gt;, &lt;&lt;&quot;octet-stream&quot;&gt;&gt;, []}</code>.</p>
+<p>When the static handler fails to find the extension, it will send the file as <code>application/octet-stream</code>. A browser receiving such file will attempt to download it directly to disk.</p>
+<p>Finally, the mimetype can be hard-coded for all files. This is especially useful in combination with the <code>file</code> and <code>priv_file</code> options as it avoids needless computation:</p>
+<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: #FF0000">"/"</span>, <span style="color: #FF6600">cowboy_static</span>, {<span style="color: #FF6600">priv_file</span>, <span style="color: #FF6600">my_app</span>, <span style="color: #FF0000">"static/index.html"</span>,
- [{<span style="color: #FF6600">mimetypes</span>, {<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"html"</span><span style="color: #990000">&gt;&gt;</span>, []}}]}}</tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#FF0000">"/"</font>, <font color="#FF6600">cowboy_static</font>, {<font color="#FF6600">priv_file</font>, <font color="#FF6600">my_app</font>, <font color="#FF0000">"static/index.html"</font>,
+ [{<font color="#FF6600">mimetypes</font>, {<font color="#990000">&lt;&lt;</font><font color="#FF0000">"text"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"html"</font><font color="#990000">&gt;&gt;</font>, []}}]}}</tt></pre>
+</div></div>
<h2 id="_generate_an_etag">Generate an etag</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>By default, the static handler will generate an etag header
-value based on the size and modified time. This solution
-can not be applied to all systems though. It would perform
-rather poorly over a cluster of nodes, for example, as the
-file metadata will vary from server to server, giving a
-different etag on each server.</p></div>
-<div class="paragraph"><p>You can however change the way the etag is calculated:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>By default, the static handler will generate an etag header value based on the size and modified time. This solution can not be applied to all systems though. It would perform rather poorly over a cluster of nodes, for example, as the file metadata will vary from server to server, giving a different etag on each server.</p>
+<p>You can however change the way the etag is calculated:</p>
+<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: #FF0000">"/assets/[...]"</span>, <span style="color: #FF6600">cowboy_static</span>, {<span style="color: #FF6600">priv_dir</span>, <span style="color: #FF6600">my_app</span>, <span style="color: #FF0000">"static/assets"</span>,
- [{<span style="color: #FF6600">etag</span>, <span style="color: #009900">Module</span>, <span style="color: #009900">Function</span>}]}}</tt></pre></div></div>
-<div class="paragraph"><p>This function will receive three arguments: the path to the
-file on disk, the size of the file and the last modification
-time. In a distributed setup, you would typically use the
-file path to retrieve an etag value that is identical across
-all your servers.</p></div>
-<div class="paragraph"><p>You can also completely disable etag handling:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>{<font color="#FF0000">"/assets/[...]"</font>, <font color="#FF6600">cowboy_static</font>, {<font color="#FF6600">priv_dir</font>, <font color="#FF6600">my_app</font>, <font color="#FF0000">"static/assets"</font>,
+ [{<font color="#FF6600">etag</font>, <font color="#009900">Module</font>, <font color="#009900">Function</font>}]}}</tt></pre>
+</div></div>
+<p>This function will receive three arguments: the path to the file on disk, the size of the file and the last modification time. In a distributed setup, you would typically use the file path to retrieve an etag value that is identical across all your servers.</p>
+<p>You can also completely disable etag handling:</p>
+<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: #FF0000">"/assets/[...]"</span>, <span style="color: #FF6600">cowboy_static</span>, {<span style="color: #FF6600">priv_dir</span>, <span style="color: #FF6600">my_app</span>, <span style="color: #FF0000">"static/assets"</span>,
- [{<span style="color: #FF6600">etag</span>, <span style="color: #000080">false</span>}]}}</tt></pre></div></div>
-</div>
-</div>
+<pre><tt>{<font color="#FF0000">"/assets/[...]"</font>, <font color="#FF6600">cowboy_static</font>, {<font color="#FF6600">priv_dir</font>, <font color="#FF6600">my_app</font>, <font color="#FF0000">"static/assets"</font>,
+ [{<font color="#FF6600">etag</font>, <font color="#000080">false</font>}]}}</tt></pre>
+</div></div>
+
diff --git a/docs/en/cowboy/2.4/guide/streams/index.html b/docs/en/cowboy/2.4/guide/streams/index.html
index 2a185fb0..6917f902 100644
--- a/docs/en/cowboy/2.4/guide/streams/index.html
+++ b/docs/en/cowboy/2.4/guide/streams/index.html
@@ -62,61 +62,23 @@
<h1 class="lined-header"><span>Streams</span></h1>
-<div class="paragraph"><p>A stream is the set of messages that form an HTTP
-request/response pair.</p></div>
-<div class="paragraph"><p>The term stream comes from HTTP/2. In Cowboy, it is
-also used when talking about HTTP/1.1 or HTTP/1.0.
-It should not be confused with streaming the request
-or response body.</p></div>
-<div class="paragraph"><p>All versions of HTTP allow clients to initiate
-streams. HTTP/2 is the only one also allowing servers,
-through its server push feature. Both client and
-server-initiated streams go through the same process
-in Cowboy.</p></div>
-<div class="sect1">
+<p>A stream is the set of messages that form an HTTP request/response pair.</p>
+<p>The term stream comes from HTTP/2. In Cowboy, it is also used when talking about HTTP/1.1 or HTTP/1.0. It should not be confused with streaming the request or response body.</p>
+<p>All versions of HTTP allow clients to initiate streams. HTTP/2 is the only one also allowing servers, through its server push feature. Both client and server-initiated streams go through the same process in Cowboy.</p>
<h2 id="_stream_handlers">Stream handlers</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Stream handlers must implement five different callbacks.
-Four of them are directly related; one is special.</p></div>
-<div class="paragraph"><p>All callbacks receives the stream ID as first argument.</p></div>
-<div class="paragraph"><p>Most of them can return a list of commands to be executed
-by Cowboy. When callbacks are chained, it is possible to
-intercept and modify these commands. This can be useful
-for modifying responses for example.</p></div>
-<div class="paragraph"><p>The <code>init/3</code> callback is invoked when a new request
-comes in. It receives the Req object and the protocol options
-for this listener.</p></div>
-<div class="paragraph"><p>The <code>data/4</code> callback is invoked when data from the request
-body is received. It receives both this data and a flag
-indicating whether more is to be expected.</p></div>
-<div class="paragraph"><p>The <code>info/3</code> callback is invoked when an Erlang message is
-received for this stream. They will typically be messages
-sent by the request process.</p></div>
-<div class="paragraph"><p>Finally the <code>terminate/3</code> callback is invoked with the
-terminate reason for the stream. The return value is ignored.
-Note that as with all terminate callbacks in Erlang, there
-is no strong guarantee that it will be called.</p></div>
-<div class="paragraph"><p>The special callback <code>early_error/5</code> is called when an error
-occurs before the request headers were fully received and
-Cowboy is sending a response. It receives the partial Req
-object, the error reason, the protocol options and the response
-Cowboy will send. This response must be returned, possibly
-modified.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Stream handlers must implement five different callbacks. Four of them are directly related; one is special.</p>
+<p>All callbacks receives the stream ID as first argument.</p>
+<p>Most of them can return a list of commands to be executed by Cowboy. When callbacks are chained, it is possible to intercept and modify these commands. This can be useful for modifying responses for example.</p>
+<p>The <code>init/3</code> callback is invoked when a new request comes in. It receives the Req object and the protocol options for this listener.</p>
+<p>The <code>data/4</code> callback is invoked when data from the request body is received. It receives both this data and a flag indicating whether more is to be expected.</p>
+<p>The <code>info/3</code> callback is invoked when an Erlang message is received for this stream. They will typically be messages sent by the request process.</p>
+<p>Finally the <code>terminate/3</code> callback is invoked with the terminate reason for the stream. The return value is ignored. Note that as with all terminate callbacks in Erlang, there is no strong guarantee that it will be called.</p>
+<p>The special callback <code>early_error/5</code> is called when an error occurs before the request headers were fully received and Cowboy is sending a response. It receives the partial Req object, the error reason, the protocol options and the response Cowboy will send. This response must be returned, possibly modified.</p>
<h2 id="_built_in_handlers">Built-in handlers</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy comes with two handlers.</p></div>
-<div class="paragraph"><p><code>cowboy_stream_h</code> is the default stream handler.
-It is the core of much of the functionality of Cowboy.
-All chains of stream handlers should call it last.</p></div>
-<div class="paragraph"><p><code>cowboy_compress_h</code> will automatically compress
-responses when possible. It is not enabled by default.
-It is a good example for writing your own handlers
-that will modify responses.</p></div>
-</div>
-</div>
+<p>Cowboy comes with two handlers.</p>
+<p><code>cowboy_stream_h</code> is the default stream handler. It is the core of much of the functionality of Cowboy. All chains of stream handlers should call it last.</p>
+<p><code>cowboy_compress_h</code> will automatically compress responses when possible. It is not enabled by default. It is a good example for writing your own handlers that will modify responses.</p>
+
diff --git a/docs/en/cowboy/2.4/guide/ws_handlers/index.html b/docs/en/cowboy/2.4/guide/ws_handlers/index.html
index a7783d07..94bf2f9e 100644
--- a/docs/en/cowboy/2.4/guide/ws_handlers/index.html
+++ b/docs/en/cowboy/2.4/guide/ws_handlers/index.html
@@ -62,297 +62,190 @@
<h1 class="lined-header"><span>Websocket handlers</span></h1>
-<div class="paragraph"><p>Websocket handlers provide an interface for upgrading HTTP/1.1
-connections to Websocket and sending or receiving frames on
-the Websocket connection.</p></div>
-<div class="paragraph"><p>As Websocket connections are established through the HTTP/1.1
-upgrade mechanism, Websocket handlers need to be able to first
-receive the HTTP request for the upgrade, before switching to
-Websocket and taking over the connection. They can then receive
-or send Websocket frames, handle incoming Erlang messages or
-close the connection.</p></div>
-<div class="sect1">
+<p>Websocket handlers provide an interface for upgrading HTTP/1.1 connections to Websocket and sending or receiving frames on the Websocket connection.</p>
+<p>As Websocket connections are established through the HTTP/1.1 upgrade mechanism, Websocket handlers need to be able to first receive the HTTP request for the upgrade, before switching to Websocket and taking over the connection. They can then receive or send Websocket frames, handle incoming Erlang messages or close the connection.</p>
<h2 id="_upgrade">Upgrade</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <code>init/2</code> callback is called when the request is received.
-To establish a Websocket connection, you must switch to the
-<code>cowboy_websocket</code> module:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The <code>init/2</code> callback is called when the request is received. To establish a Websocket connection, you must switch to the <code>cowboy_websocket</code> module:</p>
+<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">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_websocket</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Cowboy will perform the Websocket handshake immediately. Note
-that the handshake will fail if the client did not request an
-upgrade to Websocket.</p></div>
-<div class="paragraph"><p>The Req object becomes unavailable after this function returns.
-Any information required for proper execution of the Websocket
-handler must be saved in the state.</p></div>
-</div>
-</div>
-<div class="sect1">
-<h2 id="_subprotocol">Subprotocol</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The client may provide a list of Websocket subprotocols it
-supports in the sec-websocket-protocol header. The server <strong>must</strong>
-select one of them and send it back to the client or the
-handshake will fail.</p></div>
-<div class="paragraph"><p>For example, a client could understand both STOMP and MQTT over
-Websocket, and provide the header:</p></div>
-<div class="listingblock">
-<div class="content">
-<pre><code>sec-websocket-protocol: v12.stomp, mqtt</code></pre>
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">cowboy_websocket</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
</div></div>
-<div class="paragraph"><p>If the server only understands MQTT it can return:</p></div>
-<div class="listingblock">
-<div class="content">
-<pre><code>sec-websocket-protocol: mqtt</code></pre>
-</div></div>
-<div class="paragraph"><p>This selection must be done in <code>init/2</code>. An example usage could
-be:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Cowboy will perform the Websocket handshake immediately. Note that the handshake will fail if the client did not request an upgrade to Websocket.</p>
+<p>The Req object becomes unavailable after this function returns. Any information required for proper execution of the Websocket handler must be saved in the state.</p>
+<h2 id="_subprotocol">Subprotocol</h2>
+<p>The client may provide a list of Websocket subprotocols it supports in the sec-websocket-protocol header. The server <strong>must</strong> select one of them and send it back to the client or the handshake will fail.</p>
+<p>For example, a client could understand both STOMP and MQTT over Websocket, and provide the header:</p>
+<div class="listingblock"><div class="content"><pre>sec-websocket-protocol: v12.stomp, mqtt</pre></div></div>
+<p>If the server only understands MQTT it can return:</p>
+<div class="listingblock"><div class="content"><pre>sec-websocket-protocol: mqtt</pre></div></div>
+<p>This selection must be done in <code>init/2</code>. An example usage could be:</p>
+<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">init</span></span>(<span style="color: #009900">Req0</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">cowboy_req:parse_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"sec-websocket-protocol"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req0</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
- <span style="color: #000080">undefined</span> <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">cowboy_websocket</span>, <span style="color: #009900">Req0</span>, <span style="color: #009900">State</span>};
- <span style="color: #009900">Subprotocols</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:keymember</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"mqtt"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #993399">1</span>, <span style="color: #009900">Subprotocols</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="color: #009900">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"sec-websocket-protocol"</span><span style="color: #990000">&gt;&gt;</span>,
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"mqtt"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req0</span>),
- {<span style="color: #FF6600">cowboy_websocket</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="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">400</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: #0000FF">end</span></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">
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req0</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">case</font></b> <b><font color="#000000">cowboy_req:parse_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"sec-websocket-protocol"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req0</font>) <b><font color="#0000FF">of</font></b>
+ <font color="#000080">undefined</font> <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">cowboy_websocket</font>, <font color="#009900">Req0</font>, <font color="#009900">State</font>};
+ <font color="#009900">Subprotocols</font> <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">case</font></b> <b><font color="#000000">lists:keymember</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"mqtt"</font><font color="#990000">&gt;&gt;</font>, <font color="#993399">1</font>, <font color="#009900">Subprotocols</font>) <b><font color="#0000FF">of</font></b>
+ <font color="#000080">true</font> <font color="#990000">-&gt;</font>
+ <font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"sec-websocket-protocol"</font><font color="#990000">&gt;&gt;</font>,
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"mqtt"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req0</font>),
+ {<font color="#FF6600">cowboy_websocket</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>};
+ <font color="#000080">false</font> <font color="#990000">-&gt;</font>
+ <font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:reply</font></b>(<font color="#993399">400</font>, <font color="#009900">Req0</font>),
+ {<font color="#FF6600">ok</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
+ <b><font color="#0000FF">end</font></b>
+ <b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_post_upgrade_initialization">Post-upgrade initialization</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy has separate processes for handling the connection
-and requests. Because Websocket takes over the connection,
-the Websocket protocol handling occurs in a different
-process than the request handling.</p></div>
-<div class="paragraph"><p>This is reflected in the different callbacks Websocket
-handlers have. The <code>init/2</code> callback is called from the
-temporary request process and the <code>websocket_</code> callbacks
-from the connection process.</p></div>
-<div class="paragraph"><p>This means that some initialization cannot be done from
-<code>init/2</code>. Anything that would require the current pid,
-or be tied to the current pid, will not work as intended.
-The optional <code>websocket_init/1</code> can be used instead:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Cowboy has separate processes for handling the connection and requests. Because Websocket takes over the connection, the Websocket protocol handling occurs in a different process than the request handling.</p>
+<p>This is reflected in the different callbacks Websocket handlers have. The <code>init/2</code> callback is called from the temporary request process and the <code>websocket_</code> callbacks from the connection process.</p>
+<p>This means that some initialization cannot be done from <code>init/2</code>. Anything that would require the current pid, or be tied to the current pid, will not work as intended. The optional <code>websocket_init/1</code> can be used instead:</p>
+<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">websocket_init</span></span>(<span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #000000">erlang:start_timer</span></span>(<span style="color: #993399">1000</span>, <span style="font-weight: bold"><span style="color: #000080">self</span></span>(), <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Hello!"</span><span style="color: #990000">&gt;&gt;</span>),
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">State</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>All Websocket callbacks share the same return values. This
-means that we can send frames to the client right after
-the upgrade:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">websocket_init</font></b>(<font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#000000">erlang:start_timer</font></b>(<font color="#993399">1000</font>, <b><font color="#000080">self</font></b>(), <font color="#990000">&lt;&lt;</font><font color="#FF0000">"Hello!"</font><font color="#990000">&gt;&gt;</font>),
+ {<font color="#FF6600">ok</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>All Websocket callbacks share the same return values. This means that we can send frames to the client right after the upgrade:</p>
+<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">websocket_init</span></span>(<span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">reply</span>, {<span style="color: #FF6600">text</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Hello!"</span><span style="color: #990000">&gt;&gt;</span>}, <span style="color: #009900">State</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">websocket_init</font></b>(<font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">reply</font>, {<font color="#FF6600">text</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"Hello!"</font><font color="#990000">&gt;&gt;</font>}, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_receiving_frames">Receiving frames</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy will call <code>websocket_handle/2</code> whenever a text, binary,
-ping or pong frame arrives from the client.</p></div>
-<div class="paragraph"><p>The handler can handle or ignore the frames. It can also
-send frames back to the client or stop the connection.</p></div>
-<div class="paragraph"><p>The following snippet echoes back any text frame received and
-ignores all others:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Cowboy will call <code>websocket_handle/2</code> whenever a text, binary, ping or pong frame arrives from the client.</p>
+<p>The handler can handle or ignore the frames. It can also send frames back to the client or stop the connection.</p>
+<p>The following snippet echoes back any text frame received and ignores all others:</p>
+<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">websocket_handle</span></span>(<span style="color: #009900">Frame</span> <span style="color: #990000">=</span> {<span style="color: #FF6600">text</span>, <span style="color: #990000">_</span>}, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">reply</span>, <span style="color: #009900">Frame</span>, <span style="color: #009900">State</span>};
-<span style="font-weight: bold"><span style="color: #000000">websocket_handle</span></span>(<span style="color: #009900">_Frame</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">State</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Note that ping and pong frames require no action from the
-handler as Cowboy will automatically reply to ping frames.
-They are provided for informative purposes only.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">websocket_handle</font></b>(<font color="#009900">Frame</font> <font color="#990000">=</font> {<font color="#FF6600">text</font>, <font color="#990000">_</font>}, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">reply</font>, <font color="#009900">Frame</font>, <font color="#009900">State</font>};
+<b><font color="#000000">websocket_handle</font></b>(<font color="#009900">_Frame</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Note that ping and pong frames require no action from the handler as Cowboy will automatically reply to ping frames. They are provided for informative purposes only.</p>
<h2 id="_receiving_erlang_messages">Receiving Erlang messages</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy will call <code>websocket_info/2</code> whenever an Erlang message
-arrives.</p></div>
-<div class="paragraph"><p>The handler can handle or ignore the messages. It can also
-send frames to the client or stop the connection.</p></div>
-<div class="paragraph"><p>The following snippet forwards log messages to the client
-and ignores all others:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Cowboy will call <code>websocket_info/2</code> whenever an Erlang message arrives.</p>
+<p>The handler can handle or ignore the messages. It can also send frames to the client or stop the connection.</p>
+<p>The following snippet forwards log messages to the client and ignores all others:</p>
+<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">websocket_info</span></span>({<span style="font-weight: bold"><span style="color: #000080">log</span></span>, <span style="color: #009900">Text</span>}, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">reply</span>, {<span style="color: #FF6600">text</span>, <span style="color: #009900">Text</span>}, <span style="color: #009900">State</span>};
-<span style="font-weight: bold"><span style="color: #000000">websocket_info</span></span>(<span style="color: #009900">_Info</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">State</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">websocket_info</font></b>({<b><font color="#000080">log</font></b>, <font color="#009900">Text</font>}, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">reply</font>, {<font color="#FF6600">text</font>, <font color="#009900">Text</font>}, <font color="#009900">State</font>};
+<b><font color="#000000">websocket_info</font></b>(<font color="#009900">_Info</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_sending_frames">Sending frames</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>All <code>websocket_</code> callbacks share return values. They may
-send zero, one or many frames to the client.</p></div>
-<div class="paragraph"><p>To send nothing, just return an ok tuple:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<!-- @todo This will be deprecated and eventually replaced with a-->
+<!-- {Commands, State} interface that allows providing more-->
+<!-- functionality easily.-->
+<p>All <code>websocket_</code> callbacks share return values. They may send zero, one or many frames to the client.</p>
+<p>To send nothing, just return an ok tuple:</p>
+<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">websocket_info</span></span>(<span style="color: #009900">_Info</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">State</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>To send one frame, return a reply tuple with the frame to send:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">websocket_info</font></b>(<font color="#009900">_Info</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>To send one frame, return a reply tuple with the frame to send:</p>
+<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">websocket_info</span></span>(<span style="color: #009900">_Info</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">reply</span>, {<span style="color: #FF6600">text</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Hello!"</span><span style="color: #990000">&gt;&gt;</span>}, <span style="color: #009900">State</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>You can send frames of any type: text, binary, ping, pong
-or close frames.</p></div>
-<div class="paragraph"><p>To send many frames at once, return a reply tuple with the
-list of frames to send:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">websocket_info</font></b>(<font color="#009900">_Info</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">reply</font>, {<font color="#FF6600">text</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"Hello!"</font><font color="#990000">&gt;&gt;</font>}, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>You can send frames of any type: text, binary, ping, pong or close frames.</p>
+<p>To send many frames at once, return a reply tuple with the list of frames to send:</p>
+<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">websocket_info</span></span>(<span style="color: #009900">_Info</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">reply</span>, [
- {<span style="color: #FF6600">text</span>, <span style="color: #FF0000">"Hello"</span>},
- {<span style="color: #FF6600">text</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"world!"</span><span style="color: #990000">&gt;&gt;</span>},
- {<span style="font-weight: bold"><span style="color: #000080">binary</span></span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #993399">0</span><span style="color: #990000">:</span><span style="color: #993399">8000</span><span style="color: #990000">&gt;&gt;</span>}
- ], <span style="color: #009900">State</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>They are sent in the given order.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">websocket_info</font></b>(<font color="#009900">_Info</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">reply</font>, [
+ {<font color="#FF6600">text</font>, <font color="#FF0000">"Hello"</font>},
+ {<font color="#FF6600">text</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"world!"</font><font color="#990000">&gt;&gt;</font>},
+ {<b><font color="#000080">binary</font></b>, <font color="#990000">&lt;&lt;</font><font color="#993399">0</font><font color="#990000">:</font><font color="#993399">8000</font><font color="#990000">&gt;&gt;</font>}
+ ], <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>They are sent in the given order.</p>
<h2 id="_keeping_the_connection_alive">Keeping the connection alive</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy will automatically respond to ping frames sent by
-the client. They are still forwarded to the handler for
-informative purposes, but no further action is required.</p></div>
-<div class="paragraph"><p>Cowboy does not send ping frames itself. The handler can
-do it if required. A better solution in most cases is to
-let the client handle pings. Doing it from the handler
-would imply having an additional timer per connection and
-this can be a considerable cost for servers that need to
-handle large numbers of connections.</p></div>
-<div class="paragraph"><p>Cowboy can be configured to close idle connections
-automatically. It is highly recommended to configure
-a timeout here, to avoid having processes linger longer
-than needed.</p></div>
-<div class="paragraph"><p>The <code>init/2</code> callback can set the timeout to be used
-for the connection. For example, this would make Cowboy
-close connections idle for more than 30 seconds:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Cowboy will automatically respond to ping frames sent by the client. They are still forwarded to the handler for informative purposes, but no further action is required.</p>
+<p>Cowboy does not send ping frames itself. The handler can do it if required. A better solution in most cases is to let the client handle pings. Doing it from the handler would imply having an additional timer per connection and this can be a considerable cost for servers that need to handle large numbers of connections.</p>
+<p>Cowboy can be configured to close idle connections automatically. It is highly recommended to configure a timeout here, to avoid having processes linger longer than needed.</p>
+<p>The <code>init/2</code> callback can set the timeout to be used for the connection. For example, this would make Cowboy close connections idle for more than 30 seconds:</p>
+<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">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_websocket</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>, #{
- <span style="color: #0000FF">idle_timeout</span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">30000</span>}}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>This value cannot be changed once it is set. It defaults to
-<code>60000</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">cowboy_websocket</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>, #{
+ <font color="#0000FF">idle_timeout</font> <font color="#990000">=&gt;</font> <font color="#993399">30000</font>}}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>This value cannot be changed once it is set. It defaults to <code>60000</code>.</p>
<h2 id="_limiting_frame_sizes">Limiting frame sizes</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy accepts frames of any size by default. You should
-limit the size depending on what your handler may handle.
-You can do this via the <code>init/2</code> callback:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Cowboy accepts frames of any size by default. You should limit the size depending on what your handler may handle. You can do this via the <code>init/2</code> callback:</p>
+<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">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_websocket</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>, #{
- <span style="color: #0000FF">max_frame_size</span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">8000000</span>}}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>The lack of limit is historical. A future version of
-Cowboy will have a more reasonable default.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">cowboy_websocket</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>, #{
+ <font color="#0000FF">max_frame_size</font> <font color="#990000">=&gt;</font> <font color="#993399">8000000</font>}}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>The lack of limit is historical. A future version of Cowboy will have a more reasonable default.</p>
<h2 id="_saving_memory">Saving memory</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The Websocket connection process can be set to hibernate
-after the callback returns.</p></div>
-<div class="paragraph"><p>Simply add an <code>hibernate</code> field to the ok or reply tuples:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The Websocket connection process can be set to hibernate after the callback returns.</p>
+<p>Simply add an <code>hibernate</code> field to the ok or reply tuples:</p>
+<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">websocket_init</span></span>(<span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">State</span>, <span style="color: #FF6600">hibernate</span>}<span style="color: #990000">.</span>
-
-<span style="font-weight: bold"><span style="color: #000000">websocket_handle</span></span>(<span style="color: #009900">_Frame</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">State</span>, <span style="color: #FF6600">hibernate</span>}<span style="color: #990000">.</span>
-
-<span style="font-weight: bold"><span style="color: #000000">websocket_info</span></span>(<span style="color: #009900">_Info</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">reply</span>, {<span style="color: #FF6600">text</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Hello!"</span><span style="color: #990000">&gt;&gt;</span>}, <span style="color: #009900">State</span>, <span style="color: #FF6600">hibernate</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>It is highly recommended to write your handlers with
-hibernate enabled, as this allows to greatly reduce the
-memory usage. Do note however that an increase in the
-CPU usage or latency can be observed instead, in particular
-for the more busy connections.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">websocket_init</font></b>(<font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <font color="#009900">State</font>, <font color="#FF6600">hibernate</font>}<font color="#990000">.</font>
+
+<b><font color="#000000">websocket_handle</font></b>(<font color="#009900">_Frame</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <font color="#009900">State</font>, <font color="#FF6600">hibernate</font>}<font color="#990000">.</font>
+
+<b><font color="#000000">websocket_info</font></b>(<font color="#009900">_Info</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">reply</font>, {<font color="#FF6600">text</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"Hello!"</font><font color="#990000">&gt;&gt;</font>}, <font color="#009900">State</font>, <font color="#FF6600">hibernate</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>It is highly recommended to write your handlers with hibernate enabled, as this allows to greatly reduce the memory usage. Do note however that an increase in the CPU usage or latency can be observed instead, in particular for the more busy connections.</p>
<h2 id="_closing_the_connection">Closing the connection</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The connection can be closed at any time, either by telling
-Cowboy to stop it or by sending a close frame.</p></div>
-<div class="paragraph"><p>To tell Cowboy to close the connection, use a stop tuple:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The connection can be closed at any time, either by telling Cowboy to stop it or by sending a close frame.</p>
+<p>To tell Cowboy to close the connection, use a stop tuple:</p>
+<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">websocket_info</span></span>(<span style="color: #009900">_Info</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">stop</span>, <span style="color: #009900">State</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Sending a <code>close</code> frame will immediately initiate the closing
-of the Websocket connection. Note that when sending a list of
-frames that include a close frame, any frame found after the
-close frame will not be sent.</p></div>
-<div class="paragraph"><p>The following example sends a close frame with a reason message:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">websocket_info</font></b>(<font color="#009900">_Info</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">stop</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Sending a <code>close</code> frame will immediately initiate the closing of the Websocket connection. Note that when sending a list of frames that include a close frame, any frame found after the close frame will not be sent.</p>
+<p>The following example sends a close frame with a reason message:</p>
+<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">websocket_info</span></span>(<span style="color: #009900">_Info</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">reply</span>, {<span style="color: #FF6600">close</span>, <span style="color: #993399">1000</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"some-reason"</span><span style="color: #990000">&gt;&gt;</span>}, <span style="color: #009900">State</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
+<pre><tt><b><font color="#000000">websocket_info</font></b>(<font color="#009900">_Info</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">reply</font>, {<font color="#FF6600">close</font>, <font color="#993399">1000</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"some-reason"</font><font color="#990000">&gt;&gt;</font>}, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+
diff --git a/docs/en/cowboy/2.4/guide/ws_protocol/index.html b/docs/en/cowboy/2.4/guide/ws_protocol/index.html
index 1bc3bf89..a5766799 100644
--- a/docs/en/cowboy/2.4/guide/ws_protocol/index.html
+++ b/docs/en/cowboy/2.4/guide/ws_protocol/index.html
@@ -62,70 +62,22 @@
<h1 class="lined-header"><span>The Websocket protocol</span></h1>
-<div class="paragraph"><p>This chapter explains what Websocket is and why it is
-a vital component of soft realtime Web applications.</p></div>
-<div class="sect1">
+<p>This chapter explains what Websocket is and why it is a vital component of soft realtime Web applications.</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Websocket is an extension to HTTP that emulates plain TCP
-connections between the client, typically a Web browser,
-and the server. It uses the HTTP Upgrade mechanism to
-establish the connection.</p></div>
-<div class="paragraph"><p>Websocket connections are fully asynchronous, unlike
-HTTP/1.1 (synchronous) and HTTP/2 (asynchronous, but the
-server can only initiate streams in response to requests).
-With Websocket, the client and the server can both send
-frames at any time without any restriction. It is closer
-to TCP than any of the HTTP protocols.</p></div>
-<div class="paragraph"><p>Websocket is an IETF standard. Cowboy supports the standard
-and all drafts that were previously implemented by browsers,
-excluding the initial flawed draft sometimes known as
-"version 0".</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Websocket is an extension to HTTP that emulates plain TCP connections between the client, typically a Web browser, and the server. It uses the HTTP Upgrade mechanism to establish the connection.</p>
+<p>Websocket connections are fully asynchronous, unlike HTTP/1.1 (synchronous) and HTTP/2 (asynchronous, but the server can only initiate streams in response to requests). With Websocket, the client and the server can both send frames at any time without any restriction. It is closer to TCP than any of the HTTP protocols.</p>
+<p>Websocket is an IETF standard. Cowboy supports the standard and all drafts that were previously implemented by browsers, excluding the initial flawed draft sometimes known as &quot;version 0&quot;.</p>
<h2 id="_websocket_vs_http_2">Websocket vs HTTP/2</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>For a few years Websocket was the only way to have a
-bidirectional asynchronous connection with the server.
-This changed when HTTP/2 was introduced. While HTTP/2
-requires the client to first perform a request before
-the server can push data, this is only a minor restriction
-as the client can do so just as it connects.</p></div>
-<div class="paragraph"><p>Websocket was designed as a kind-of-TCP channel to a
-server. It only defines the framing and connection
-management and lets the developer implement a protocol
-on top of it. For example you could implement IRC over
-Websocket and use a Javascript IRC client to speak to
-the server.</p></div>
-<div class="paragraph"><p>HTTP/2 on the other hand is just an improvement over
-the HTTP/1.1 connection and request/response mechanism.
-It has the same semantics as HTTP/1.1.</p></div>
-<div class="paragraph"><p>If all you need is to access an HTTP API, then HTTP/2
-should be your first choice. On the other hand, if what
-you need is a different protocol, then you can use
-Websocket to implement it.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>For a few years Websocket was the only way to have a bidirectional asynchronous connection with the server. This changed when HTTP/2 was introduced. While HTTP/2 requires the client to first perform a request before the server can push data, this is only a minor restriction as the client can do so just as it connects.</p>
+<p>Websocket was designed as a kind-of-TCP channel to a server. It only defines the framing and connection management and lets the developer implement a protocol on top of it. For example you could implement IRC over Websocket and use a Javascript IRC client to speak to the server.</p>
+<p>HTTP/2 on the other hand is just an improvement over the HTTP/1.1 connection and request/response mechanism. It has the same semantics as HTTP/1.1.</p>
+<p>If all you need is to access an HTTP API, then HTTP/2 should be your first choice. On the other hand, if what you need is a different protocol, then you can use Websocket to implement it.</p>
<h2 id="_implementation">Implementation</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy implements Websocket as a protocol upgrade. Once the
-upgrade is performed from the <code>init/2</code> callback, Cowboy
-switches to Websocket. Please consult the next chapter for
-more information on initiating and handling Websocket
-connections.</p></div>
-<div class="paragraph"><p>The implementation of Websocket in Cowboy is validated using
-the Autobahn test suite, which is an extensive suite of tests
-covering all aspects of the protocol. Cowboy passes the
-suite with 100% success, including all optional tests.</p></div>
-<div class="paragraph"><p>Cowboy&#8217;s Websocket implementation also includes the
-permessage-deflate and x-webkit-deflate-frame compression
-extensions.</p></div>
-<div class="paragraph"><p>Cowboy will automatically use compression when the
-<code>compress</code> option is returned from the <code>init/2</code> function.</p></div>
-</div>
-</div>
+<p>Cowboy implements Websocket as a protocol upgrade. Once the upgrade is performed from the <code>init/2</code> callback, Cowboy switches to Websocket. Please consult the next chapter for more information on initiating and handling Websocket connections.</p>
+<p>The implementation of Websocket in Cowboy is validated using the Autobahn test suite, which is an extensive suite of tests covering all aspects of the protocol. Cowboy passes the suite with 100% success, including all optional tests.</p>
+<p>Cowboy&apos;s Websocket implementation also includes the permessage-deflate and x-webkit-deflate-frame compression extensions.</p>
+<p>Cowboy will automatically use compression when the <code>compress</code> option is returned from the <code>init/2</code> function.</p>
+
diff --git a/docs/en/cowboy/2.4/manual/cowboy.set_env/index.html b/docs/en/cowboy/2.4/manual/cowboy.set_env/index.html
index 89ae117c..5ac0bdb2 100644
--- a/docs/en/cowboy/2.4/manual/cowboy.set_env/index.html
+++ b/docs/en/cowboy/2.4/manual/cowboy.set_env/index.html
@@ -62,117 +62,59 @@
<h1 class="lined-header"><span>cowboy:set_env(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy:set_env - Update a listener&#8217;s environment value</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy:set_env - Update a listener&apos;s environment value</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">set_env</span></span>(<span style="color: #009900">Name</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">ranch:ref</span></span>(),
- <span style="color: #009900">Key</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">atom</span></span>(),
- <span style="color: #009900">Value</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>())
- <span style="color: #990000">-&gt;</span> <span style="color: #FF6600">ok</span></tt></pre></div></div>
-<div class="paragraph"><p>Set or update an environment value for a previously started
-listener.</p></div>
-<div class="paragraph"><p>This is most useful for updating the routes dynamically,
-without having to restart the listener.</p></div>
-<div class="paragraph"><p>The new value will only be available to new connections.
-Pre-existing connections will still use the old value.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">set_env</font></b>(<font color="#009900">Name</font> <font color="#990000">::</font> <b><font color="#000000">ranch:ref</font></b>(),
+ <font color="#009900">Key</font> <font color="#990000">::</font> <b><font color="#000080">atom</font></b>(),
+ <font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>())
+ <font color="#990000">-&gt;</font> <font color="#FF6600">ok</font></tt></pre>
+</div></div>
+<p>Set or update an environment value for a previously started listener.</p>
+<p>This is most useful for updating the routes dynamically, without having to restart the listener.</p>
+<p>The new value will only be available to new connections. Pre-existing connections will still use the old value.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Name
-</dt>
-<dd>
-<p>
-The name of the listener to update.
-</p>
-<div class="paragraph"><p>The name of the listener is the first argument given to the
-<a href="../cowboy.start_clear">cowboy:start_clear(3)</a>,
-<a href="../cowboy.start_tls">cowboy:start_tls(3)</a> or
-<a href="../ranch.start_listener">ranch:start_listener(3)</a> function.</p></div>
+<dl><dt>Name</dt>
+<dd><p>The name of the listener to update.</p>
+<p>The name of the listener is the first argument given to the <a href="../cowboy.start_clear">cowboy:start_clear(3)</a>, <a href="../cowboy.start_tls">cowboy:start_tls(3)</a> or <a href="../ranch.start_listener">ranch:start_listener(3)</a> function.</p>
</dd>
-<dt class="hdlist1">
-Key
-</dt>
-<dd>
-<p>
-The key in the environment map. Common keys include <code>dispatch</code>
-and <code>middlewares</code>.
-</p>
+<dt>Key</dt>
+<dd><p>The key in the environment map. Common keys include <code>dispatch</code> and <code>middlewares</code>.</p>
</dd>
-<dt class="hdlist1">
-Value
-</dt>
-<dd>
-<p>
-The new value.
-</p>
-<div class="paragraph"><p>The type of the value differs depending on the key.</p></div>
+<dt>Value</dt>
+<dd><p>The new value.</p>
+<p>The type of the value differs depending on the key.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The atom <code>ok</code> is returned on success.</p></div>
-<div class="paragraph"><p>An <code>exit:badarg</code> exception is thrown when the listener does
-not exist.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The atom <code>ok</code> is returned on success.</p>
+<p>An <code>exit:badarg</code> exception is thrown when the listener does not exist.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<ul><li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Update a listener&#8217;s routes</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Update a listener&apos;s routes</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">Dispatch</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_router:compile</span></span>([
- {<span style="color: #FF6600">'_'</span>, [
- {<span style="color: #FF0000">"/"</span>, <span style="color: #FF6600">toppage_h</span>, []},
- {<span style="color: #FF0000">"/ws"</span>, <span style="color: #FF6600">websocket_h</span>, []}
+<pre><tt><font color="#009900">Dispatch</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_router:compile</font></b>([
+ {<font color="#FF6600">'_'</font>, [
+ {<font color="#FF0000">"/"</font>, <font color="#FF6600">toppage_h</font>, []},
+ {<font color="#FF0000">"/ws"</font>, <font color="#FF6600">websocket_h</font>, []}
]}
]),
-<span style="font-weight: bold"><span style="color: #000000">cowboy:set_env</span></span>(<span style="color: #FF6600">example</span>, <span style="color: #FF6600">dispatch</span>, <span style="color: #009900">Dispatch</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<b><font color="#000000">cowboy:set_env</font></b>(<font color="#FF6600">example</font>, <font color="#FF6600">dispatch</font>, <font color="#009900">Dispatch</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../cowboy">cowboy(3)</a>,
-<a href="../cowboy.start_clear">cowboy:start_clear(3)</a>,
-<a href="../cowboy.start_tls">cowboy:start_tls(3)</a>,
-<a href="../ranch.set_protocol_options">ranch:set_protocol_options(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy">cowboy(3)</a>, <a href="../cowboy.start_clear">cowboy:start_clear(3)</a>, <a href="../cowboy.start_tls">cowboy:start_tls(3)</a>, <a href="../ranch.set_protocol_options">ranch:set_protocol_options(3)</a></p>
+
diff --git a/docs/en/cowboy/2.4/manual/cowboy.start_clear/index.html b/docs/en/cowboy/2.4/manual/cowboy.start_clear/index.html
index 04d9f310..f932cb38 100644
--- a/docs/en/cowboy/2.4/manual/cowboy.start_clear/index.html
+++ b/docs/en/cowboy/2.4/manual/cowboy.start_clear/index.html
@@ -62,148 +62,77 @@
<h1 class="lined-header"><span>cowboy:start_clear(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy:start_clear - Listen for connections using plain TCP</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy:start_clear - Listen for connections using plain TCP</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">start_clear</span></span>(<span style="color: #009900">Name</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">ranch:ref</span></span>(),
- <span style="color: #009900">TransportOpts</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">ranch_tcp:opts</span></span>(),
- <span style="color: #009900">ProtocolOpts</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">opts</span></span>())
- <span style="color: #990000">-&gt;</span> {<span style="color: #FF6600">ok</span>, <span style="color: #009900">ListenerPid</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">pid</span></span>()}
- | {<span style="color: #FF6600">error</span>, <span style="font-weight: bold"><span style="color: #000000">any</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>Start listening for connections over a clear TCP channel.</p></div>
-<div class="paragraph"><p>Both HTTP/1.1 and HTTP/2 are supported on this listener.
-HTTP/2 has two methods of establishing a connection over
-a clear TCP channel. Both the upgrade and the prior knowledge
-methods are supported.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">start_clear</font></b>(<font color="#009900">Name</font> <font color="#990000">::</font> <b><font color="#000000">ranch:ref</font></b>(),
+ <font color="#009900">TransportOpts</font> <font color="#990000">::</font> <b><font color="#000000">ranch_tcp:opts</font></b>(),
+ <font color="#009900">ProtocolOpts</font> <font color="#990000">::</font> <b><font color="#000000">opts</font></b>())
+ <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <font color="#009900">ListenerPid</font> <font color="#990000">::</font> <b><font color="#000080">pid</font></b>()}
+ | {<font color="#FF6600">error</font>, <b><font color="#000000">any</font></b>()}</tt></pre>
+</div></div>
+<p>Start listening for connections over a clear TCP channel.</p>
+<p>Both HTTP/1.1 and HTTP/2 are supported on this listener. HTTP/2 has two methods of establishing a connection over a clear TCP channel. Both the upgrade and the prior knowledge methods are supported.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Name
-</dt>
-<dd>
-<p>
-The listener name is used to refer to this listener in
-future calls, for example when stopping it or when
-updating the routes defined.
-</p>
-<div class="paragraph"><p>It can be any Erlang term. An atom is generally good enough,
-for example <code>api</code>, <code>my_app_clear</code> or <code>my_app_tls</code>.</p></div>
+<dl><dt>Name</dt>
+<dd><p>The listener name is used to refer to this listener in future calls, for example when stopping it or when updating the routes defined.</p>
+<p>It can be any Erlang term. An atom is generally good enough, for example <code>api</code>, <code>my_app_clear</code> or <code>my_app_tls</code>.</p>
</dd>
-<dt class="hdlist1">
-TransportOpts
-</dt>
-<dd>
-<p>
-The transport options are where the TCP options, including
-the listener&#8217;s port number, are defined. Transport options
-are provided as a list of keys and values, for example
-<code>[{port, 8080}]</code>.
-</p>
-<div class="paragraph"><p>The available options are documented in the
-<a href="../ranch_tcp">ranch_tcp(3)</a> manual.</p></div>
+<dt>TransportOpts</dt>
+<dd><p>The transport options are where the TCP options, including the listener&apos;s port number, are defined. Transport options are provided as a list of keys and values, for example <code>[{port, 8080}]</code>.</p>
+<p>The available options are documented in the <a href="../ranch_tcp">ranch_tcp(3)</a> manual.</p>
</dd>
-<dt class="hdlist1">
-ProtocolOpts
-</dt>
-<dd>
-<p>
-The protocol options are in a map containing all the options for
-the different protocols that may be involved when connecting
-to the listener, including HTTP/1.1 and HTTP/2.
-</p>
-<div class="paragraph"><p>The HTTP/1.1 options are documented in the
-<a href="../cowboy_http">cowboy_http(3)</a> manual;
-and the HTTP/2 options in
-<a href="../cowboy_http2">cowboy_http2(3)</a>.</p></div>
+<dt>ProtocolOpts</dt>
+<dd><p>The protocol options are in a map containing all the options for the different protocols that may be involved when connecting to the listener, including HTTP/1.1 and HTTP/2.</p>
+<p>The HTTP/1.1 options are documented in the <a href="../cowboy_http">cowboy_http(3)</a> manual; and the HTTP/2 options in <a href="../cowboy_http2">cowboy_http2(3)</a>.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>An ok tuple is returned on success. It contains the pid of
-the top-level supervisor for the listener.</p></div>
-<div class="paragraph"><p>An error tuple is returned on error. The error reason may
-be any Erlang term.</p></div>
-<div class="paragraph"><p>A common error is <code>eaddrinuse</code>. It indicates that the port
-configured for Cowboy is already in use.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>An ok tuple is returned on success. It contains the pid of the top-level supervisor for the listener.</p>
+<p>An error tuple is returned on error. The error reason may be any Erlang term.</p>
+<p>A common error is <code>eaddrinuse</code>. It indicates that the port configured for Cowboy is already in use.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: HTTP/2 support added.
-</p>
+<ul><li><strong>2.0</strong>: HTTP/2 support added.
</li>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced. Replaces <code>cowboy:start_http/4</code>.
-</p>
+<li><strong>2.0</strong>: Function introduced. Replaces <code>cowboy:start_http/4</code>.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Start a listener</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Start a listener</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">Dispatch</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_router:compile</span></span>([
- {<span style="color: #FF6600">'_'</span>, [
- {<span style="color: #FF0000">"/"</span>, <span style="color: #FF6600">toppage_h</span>, []}
+<pre><tt><font color="#009900">Dispatch</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_router:compile</font></b>([
+ {<font color="#FF6600">'_'</font>, [
+ {<font color="#FF0000">"/"</font>, <font color="#FF6600">toppage_h</font>, []}
]}
]),
-{<span style="color: #FF6600">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:start_clear</span></span>(<span style="color: #FF6600">example</span>, [{<span style="color: #FF6600">port</span>, <span style="color: #993399">8080</span>}], #{
- <span style="color: #0000FF">env</span> <span style="color: #990000">=&gt;</span> #{<span style="color: #0000FF">dispatch</span> <span style="color: #990000">=&gt;</span> <span style="color: #009900">Dispatch</span>}
-})<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Start a listener on a random port</div>
-<div class="content"><!-- Generator: GNU source-highlight
+{<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy:start_clear</font></b>(<font color="#FF6600">example</font>, [{<font color="#FF6600">port</font>, <font color="#993399">8080</font>}], #{
+ <font color="#0000FF">env</font> <font color="#990000">=&gt;</font> #{<font color="#0000FF">dispatch</font> <font color="#990000">=&gt;</font> <font color="#009900">Dispatch</font>}
+})<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Start a listener on a random port</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">Name</span> <span style="color: #990000">=</span> <span style="color: #FF6600">example</span>,
+<pre><tt><font color="#009900">Name</font> <font color="#990000">=</font> <font color="#FF6600">example</font>,
-{<span style="color: #FF6600">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:start_clear</span></span>(<span style="color: #009900">Name</span>, [], #{
- <span style="color: #0000FF">env</span> <span style="color: #990000">=&gt;</span> #{<span style="color: #0000FF">dispatch</span> <span style="color: #990000">=&gt;</span> <span style="color: #009900">Dispatch</span>}
+{<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy:start_clear</font></b>(<font color="#009900">Name</font>, [], #{
+ <font color="#0000FF">env</font> <font color="#990000">=&gt;</font> #{<font color="#0000FF">dispatch</font> <font color="#990000">=&gt;</font> <font color="#009900">Dispatch</font>}
}),
-<span style="color: #009900">Port</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">ranch:get_port</span></span>(<span style="color: #009900">Name</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<font color="#009900">Port</font> <font color="#990000">=</font> <b><font color="#000000">ranch:get_port</font></b>(<font color="#009900">Name</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../cowboy">cowboy(3)</a>,
-<a href="../cowboy.start_tls">cowboy:start_tls(3)</a>,
-<a href="../cowboy.stop_listener">cowboy:stop_listener(3)</a>,
-<a href="../ranch">ranch(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy">cowboy(3)</a>, <a href="../cowboy.start_tls">cowboy:start_tls(3)</a>, <a href="../cowboy.stop_listener">cowboy:stop_listener(3)</a>, <a href="../ranch">ranch(3)</a></p>
+
diff --git a/docs/en/cowboy/2.4/manual/cowboy.start_tls/index.html b/docs/en/cowboy/2.4/manual/cowboy.start_tls/index.html
index 009a39a5..27f8e409 100644
--- a/docs/en/cowboy/2.4/manual/cowboy.start_tls/index.html
+++ b/docs/en/cowboy/2.4/manual/cowboy.start_tls/index.html
@@ -62,153 +62,82 @@
<h1 class="lined-header"><span>cowboy:start_tls(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy:start_tls - Listen for connections using TLS</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy:start_tls - Listen for connections using TLS</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">start_tls</span></span>(<span style="color: #009900">Name</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">ranch:ref</span></span>(),
- <span style="color: #009900">TransportOpts</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">ranch_ssl:opts</span></span>(),
- <span style="color: #009900">ProtocolOpts</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">opts</span></span>())
- <span style="color: #990000">-&gt;</span> {<span style="color: #FF6600">ok</span>, <span style="color: #009900">ListenerPid</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">pid</span></span>()}
- | {<span style="color: #FF6600">error</span>, <span style="font-weight: bold"><span style="color: #000000">any</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>Start listening for connections over a secure TLS channel.</p></div>
-<div class="paragraph"><p>Both HTTP/1.1 and HTTP/2 are supported on this listener.
-The ALPN TLS extension must be used to initiate an HTTP/2
-connection.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">start_tls</font></b>(<font color="#009900">Name</font> <font color="#990000">::</font> <b><font color="#000000">ranch:ref</font></b>(),
+ <font color="#009900">TransportOpts</font> <font color="#990000">::</font> <b><font color="#000000">ranch_ssl:opts</font></b>(),
+ <font color="#009900">ProtocolOpts</font> <font color="#990000">::</font> <b><font color="#000000">opts</font></b>())
+ <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <font color="#009900">ListenerPid</font> <font color="#990000">::</font> <b><font color="#000080">pid</font></b>()}
+ | {<font color="#FF6600">error</font>, <b><font color="#000000">any</font></b>()}</tt></pre>
+</div></div>
+<p>Start listening for connections over a secure TLS channel.</p>
+<p>Both HTTP/1.1 and HTTP/2 are supported on this listener. The ALPN TLS extension must be used to initiate an HTTP/2 connection.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Name
-</dt>
-<dd>
-<p>
-The listener name is used to refer to this listener in
-future calls, for example when stopping it or when
-updating the routes defined.
-</p>
-<div class="paragraph"><p>It can be any Erlang term. An atom is generally good enough,
-for example <code>api</code>, <code>my_app_clear</code> or <code>my_app_tls</code>.</p></div>
+<dl><dt>Name</dt>
+<dd><p>The listener name is used to refer to this listener in future calls, for example when stopping it or when updating the routes defined.</p>
+<p>It can be any Erlang term. An atom is generally good enough, for example <code>api</code>, <code>my_app_clear</code> or <code>my_app_tls</code>.</p>
</dd>
-<dt class="hdlist1">
-TransportOpts
-</dt>
-<dd>
-<p>
-The transport options are where the TCP options, including
-the listener&#8217;s port number, are defined. They also contain
-the TLS options, like the server&#8217;s certificate. Transport options
-are provided as a list of keys and values, for example
-<code>[{port, 8443}, {certfile, "path/to/cert.pem"}]</code>.
-</p>
-<div class="paragraph"><p>The available options are documented in the
-<a href="../ranch_ssl">ranch_ssl(3)</a> manual.</p></div>
+<dt>TransportOpts</dt>
+<dd><p>The transport options are where the TCP options, including the listener&apos;s port number, are defined. They also contain the TLS options, like the server&apos;s certificate. Transport options are provided as a list of keys and values, for example <code>[{port, 8443}, {certfile, &quot;path/to/cert.pem&quot;}]</code>.</p>
+<p>The available options are documented in the <a href="../ranch_ssl">ranch_ssl(3)</a> manual.</p>
</dd>
-<dt class="hdlist1">
-ProtocolOpts
-</dt>
-<dd>
-<p>
-The protocol options are in a map containing all the options for
-the different protocols that may be involved when connecting
-to the listener, including HTTP/1.1 and HTTP/2.
-</p>
-<div class="paragraph"><p>The HTTP/1.1 options are documented in the
-<a href="../cowboy_http">cowboy_http(3)</a> manual;
-and the HTTP/2 options in
-<a href="../cowboy_http2">cowboy_http2(3)</a>.</p></div>
+<dt>ProtocolOpts</dt>
+<dd><p>The protocol options are in a map containing all the options for the different protocols that may be involved when connecting to the listener, including HTTP/1.1 and HTTP/2.</p>
+<p>The HTTP/1.1 options are documented in the <a href="../cowboy_http">cowboy_http(3)</a> manual; and the HTTP/2 options in <a href="../cowboy_http2">cowboy_http2(3)</a>.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>An ok tuple is returned on success. It contains the pid of
-the top-level supervisor for the listener.</p></div>
-<div class="paragraph"><p>An error tuple is returned on error. The error reason may
-be any Erlang term.</p></div>
-<div class="paragraph"><p>A common error is <code>eaddrinuse</code>. It indicates that the port
-configured for Cowboy is already in use.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>An ok tuple is returned on success. It contains the pid of the top-level supervisor for the listener.</p>
+<p>An error tuple is returned on error. The error reason may be any Erlang term.</p>
+<p>A common error is <code>eaddrinuse</code>. It indicates that the port configured for Cowboy is already in use.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: HTTP/2 support added.
-</p>
+<ul><li><strong>2.0</strong>: HTTP/2 support added.
</li>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced. Replaces <code>cowboy:start_https/4</code>.
-</p>
+<li><strong>2.0</strong>: Function introduced. Replaces <code>cowboy:start_https/4</code>.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Start a listener</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Start a listener</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">Dispatch</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_router:compile</span></span>([
- {<span style="color: #FF6600">'_'</span>, [
- {<span style="color: #FF0000">"/"</span>, <span style="color: #FF6600">toppage_h</span>, []}
+<pre><tt><font color="#009900">Dispatch</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_router:compile</font></b>([
+ {<font color="#FF6600">'_'</font>, [
+ {<font color="#FF0000">"/"</font>, <font color="#FF6600">toppage_h</font>, []}
]}
]),
-{<span style="color: #FF6600">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:start_tls</span></span>(<span style="color: #FF6600">example</span>, [
- {<span style="color: #FF6600">port</span>, <span style="color: #993399">8443</span>},
- {<span style="color: #FF6600">cert</span>, <span style="color: #FF0000">"path/to/cert.pem"</span>}
+{<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy:start_tls</font></b>(<font color="#FF6600">example</font>, [
+ {<font color="#FF6600">port</font>, <font color="#993399">8443</font>},
+ {<font color="#FF6600">cert</font>, <font color="#FF0000">"path/to/cert.pem"</font>}
], #{
- <span style="color: #0000FF">env</span> <span style="color: #990000">=&gt;</span> #{<span style="color: #0000FF">dispatch</span> <span style="color: #990000">=&gt;</span> <span style="color: #009900">Dispatch</span>}
-})<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Start a listener on a random port</div>
-<div class="content"><!-- Generator: GNU source-highlight
+ <font color="#0000FF">env</font> <font color="#990000">=&gt;</font> #{<font color="#0000FF">dispatch</font> <font color="#990000">=&gt;</font> <font color="#009900">Dispatch</font>}
+})<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Start a listener on a random port</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">Name</span> <span style="color: #990000">=</span> <span style="color: #FF6600">example</span>,
+<pre><tt><font color="#009900">Name</font> <font color="#990000">=</font> <font color="#FF6600">example</font>,
-{<span style="color: #FF6600">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:start_tls</span></span>(<span style="color: #009900">Name</span>, [
- {<span style="color: #FF6600">cert</span>, <span style="color: #FF0000">"path/to/cert.pem"</span>}
+{<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy:start_tls</font></b>(<font color="#009900">Name</font>, [
+ {<font color="#FF6600">cert</font>, <font color="#FF0000">"path/to/cert.pem"</font>}
], #{
- <span style="color: #0000FF">env</span> <span style="color: #990000">=&gt;</span> #{<span style="color: #0000FF">dispatch</span> <span style="color: #990000">=&gt;</span> <span style="color: #009900">Dispatch</span>}
+ <font color="#0000FF">env</font> <font color="#990000">=&gt;</font> #{<font color="#0000FF">dispatch</font> <font color="#990000">=&gt;</font> <font color="#009900">Dispatch</font>}
}),
-<span style="color: #009900">Port</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">ranch:get_port</span></span>(<span style="color: #009900">Name</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<font color="#009900">Port</font> <font color="#990000">=</font> <b><font color="#000000">ranch:get_port</font></b>(<font color="#009900">Name</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../cowboy">cowboy(3)</a>,
-<a href="../cowboy.start_clear">cowboy:start_clear(3)</a>,
-<a href="../cowboy.stop_listener">cowboy:stop_listener(3)</a>,
-<a href="../ranch">ranch(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy">cowboy(3)</a>, <a href="../cowboy.start_clear">cowboy:start_clear(3)</a>, <a href="../cowboy.stop_listener">cowboy:stop_listener(3)</a>, <a href="../ranch">ranch(3)</a></p>
+
diff --git a/docs/en/cowboy/2.4/manual/cowboy.stop_listener/index.html b/docs/en/cowboy/2.4/manual/cowboy.stop_listener/index.html
index 06b88e2d..59e0c6eb 100644
--- a/docs/en/cowboy/2.4/manual/cowboy.stop_listener/index.html
+++ b/docs/en/cowboy/2.4/manual/cowboy.stop_listener/index.html
@@ -62,87 +62,42 @@
<h1 class="lined-header"><span>cowboy:stop_listener(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy:stop_listener - Stop the given listener</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy:stop_listener - Stop the given listener</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">stop_listener</span></span>(<span style="color: #009900">Name</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">ranch:ref</span></span>())
- <span style="color: #990000">-&gt;</span> <span style="color: #FF6600">ok</span> | {<span style="color: #FF6600">error</span>, <span style="color: #FF6600">not_found</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Stop a previously started listener.</p></div>
-<div class="paragraph"><p>Alias of <a href="../ranch.stop_listener">ranch:stop_listener(3)</a>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">stop_listener</font></b>(<font color="#009900">Name</font> <font color="#990000">::</font> <b><font color="#000000">ranch:ref</font></b>())
+ <font color="#990000">-&gt;</font> <font color="#FF6600">ok</font> | {<font color="#FF6600">error</font>, <font color="#FF6600">not_found</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Stop a previously started listener.</p>
+<p>Alias of <a href="../ranch.stop_listener">ranch:stop_listener(3)</a>.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Name
-</dt>
-<dd>
-<p>
-The name of the listener to be stopped.
-</p>
-<div class="paragraph"><p>The name of the listener is the first argument given to the
-<a href="../cowboy.start_clear">cowboy:start_clear(3)</a>,
-<a href="../cowboy.start_tls">cowboy:start_tls(3)</a> or
-<a href="../ranch.start_listener">ranch:start_listener(3)</a> function.</p></div>
+<dl><dt>Name</dt>
+<dd><p>The name of the listener to be stopped.</p>
+<p>The name of the listener is the first argument given to the <a href="../cowboy.start_clear">cowboy:start_clear(3)</a>, <a href="../cowboy.start_tls">cowboy:start_tls(3)</a> or <a href="../ranch.start_listener">ranch:start_listener(3)</a> function.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The atom <code>ok</code> is returned on success.</p></div>
-<div class="paragraph"><p>The <code>{error, not_found}</code> tuple is returned when the listener
-does not exist.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The atom <code>ok</code> is returned on success.</p>
+<p>The <code>{error, not_found}</code> tuple is returned when the listener does not exist.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<ul><li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Stop a listener</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Stop a listener</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: #0000FF">ok</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:stop_listener</span></span>(<span style="color: #FF6600">example</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#0000FF">ok</font> <font color="#990000">=</font> <b><font color="#000000">cowboy:stop_listener</font></b>(<font color="#FF6600">example</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../cowboy">cowboy(3)</a>,
-<a href="../cowboy.start_clear">cowboy:start_clear(3)</a>,
-<a href="../cowboy.start_tls">cowboy:start_tls(3)</a>,
-<a href="../ranch">ranch(3)</a>,
-<a href="../ranch.start_listener">ranch:start_listener(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy">cowboy(3)</a>, <a href="../cowboy.start_clear">cowboy:start_clear(3)</a>, <a href="../cowboy.start_tls">cowboy:start_tls(3)</a>, <a href="../ranch">ranch(3)</a>, <a href="../ranch.start_listener">ranch:start_listener(3)</a></p>
+
diff --git a/docs/en/cowboy/2.4/manual/cowboy/index.html b/docs/en/cowboy/2.4/manual/cowboy/index.html
index f9e9e279..fb723a60 100644
--- a/docs/en/cowboy/2.4/manual/cowboy/index.html
+++ b/docs/en/cowboy/2.4/manual/cowboy/index.html
@@ -62,129 +62,76 @@
<h1 class="lined-header"><span>cowboy(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy - HTTP server</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy - HTTP server</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The module <code>cowboy</code> provides convenience functions for
-manipulating Ranch listeners.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The module <code>cowboy</code> provides convenience functions for manipulating Ranch listeners.</p>
<h2 id="_exports">Exports</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../cowboy.start_clear">cowboy:start_clear(3)</a> - Listen for connections using plain TCP
-</p>
+<ul><li><a href="../cowboy.start_clear">cowboy:start_clear(3)</a> - Listen for connections using plain TCP
</li>
-<li>
-<p>
-<a href="../cowboy.start_tls">cowboy:start_tls(3)</a> - Listen for connections using TLS
-</p>
+<li><a href="../cowboy.start_tls">cowboy:start_tls(3)</a> - Listen for connections using TLS
</li>
-<li>
-<p>
-<a href="../cowboy.stop_listener">cowboy:stop_listener(3)</a> - Stop the given listener
-</p>
+<li><a href="../cowboy.stop_listener">cowboy:stop_listener(3)</a> - Stop the given listener
</li>
-<li>
-<p>
-<a href="../cowboy.set_env">cowboy:set_env(3)</a> - Update a listener&#8217;s environment value
-</p>
+<li><a href="../cowboy.set_env">cowboy:set_env(3)</a> - Update a listener&apos;s environment value
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_types">Types</h2>
-<div class="sectionbody">
-<div class="sect2">
<h3 id="_fields">fields()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">fields</span></span>() <span style="color: #990000">::</span> [<span style="color: #009900">Name</span>
- | {<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">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>
-<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
-<a href="../cowboy_req">cowboy_req(3)</a>.</p></div>
-</div>
-<div class="sect2">
+<pre><tt><b><font color="#000000">fields</font></b>() <font color="#990000">::</font> [<font color="#009900">Name</font>
+ | {<font color="#009900">Name</font>, <font color="#009900">Constraints</font>}
+ | {<font color="#009900">Name</font>, <font color="#009900">Constraints</font>, <font color="#009900">Default</font>}]
+
+<font color="#009900">Name</font> <font color="#990000">::</font> <b><font color="#000080">atom</font></b>()
+<font color="#009900">Constraints</font> <font color="#990000">::</font> <font color="#009900">Constraint</font> | [<font color="#009900">Constraint</font>]
+<font color="#009900">Constraint</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_constraints:constraint</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()</tt></pre>
+</div></div>
+<p>Fields description for match operations.</p>
+<p>This type is used in <a href="../cowboy_router">cowboy_router(3)</a> for matching bindings and in the match functions found in <a href="../cowboy_req">cowboy_req(3)</a>.</p>
<h3 id="_http_headers">http_headers()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">http_headers</span></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: #000000">iodata</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>HTTP headers.</p></div>
-</div>
-<div class="sect2">
+<pre><tt><b><font color="#000000">http_headers</font></b>() <font color="#990000">::</font> #{<b><font color="#000080">binary</font></b>() <font color="#990000">=&gt;</font> <b><font color="#000000">iodata</font></b>()}</tt></pre>
+</div></div>
+<p>HTTP headers.</p>
<h3 id="_http_status">http_status()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">http_status</span></span>() <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>() | <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>HTTP response status.</p></div>
-<div class="paragraph"><p>A binary status can be used to set a reason phrase. Note
-however that HTTP/2 only sends the status code and drops
-the reason phrase entirely.</p></div>
-</div>
-<div class="sect2">
+<pre><tt><b><font color="#000000">http_status</font></b>() <font color="#990000">::</font> <b><font color="#000000">non_neg_integer</font></b>() | <b><font color="#000080">binary</font></b>()</tt></pre>
+</div></div>
+<p>HTTP response status.</p>
+<p>A binary status can be used to set a reason phrase. Note however that HTTP/2 only sends the status code and drops the reason phrase entirely.</p>
<h3 id="_http_version">http_version()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">http_version</span></span>() <span style="color: #990000">::</span> <span style="color: #FF6600">'HTTP/2'</span> | <span style="color: #FF6600">'HTTP/1.1'</span> | <span style="color: #FF6600">'HTTP/1.0'</span></tt></pre></div></div>
-<div class="paragraph"><p>HTTP version.</p></div>
-<div class="paragraph"><p>Note that semantically, HTTP/1.1 and HTTP/2 are equivalent.</p></div>
-</div>
-<div class="sect2">
+<pre><tt><b><font color="#000000">http_version</font></b>() <font color="#990000">::</font> <font color="#FF6600">'HTTP/2'</font> | <font color="#FF6600">'HTTP/1.1'</font> | <font color="#FF6600">'HTTP/1.0'</font></tt></pre>
+</div></div>
+<p>HTTP version.</p>
+<p>Note that semantically, HTTP/1.1 and HTTP/2 are equivalent.</p>
<h3 id="_opts">opts()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">opts</span></span>() <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">map</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Options for the HTTP/1.1, HTTP/2 and Websocket protocols.</p></div>
-<div class="paragraph"><p>The protocol options are in a map containing all the options for
-the different protocols that may be involved when connecting
-to the listener, including HTTP/1.1 and HTTP/2.</p></div>
-<div class="paragraph"><p>The HTTP/1.1 options are documented in the
-<a href="../cowboy_http">cowboy_http(3)</a> manual
-and the HTTP/2 options in
-<a href="../cowboy_http2">cowboy_http2(3)</a>.</p></div>
-</div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">opts</font></b>() <font color="#990000">::</font> <b><font color="#000000">map</font></b>()</tt></pre>
+</div></div>
+<p>Options for the HTTP/1.1, HTTP/2 and Websocket protocols.</p>
+<p>The protocol options are in a map containing all the options for the different protocols that may be involved when connecting to the listener, including HTTP/1.1 and HTTP/2.</p>
+<p>The HTTP/1.1 options are documented in the <a href="../cowboy_http">cowboy_http(3)</a> manual and the HTTP/2 options in <a href="../cowboy_http2">cowboy_http2(3)</a>.</p>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="..">cowboy(7)</a>,
-<a href="../ranch">ranch(3)</a></p></div>
-</div>
-</div>
+<p><a href="..">cowboy(7)</a>, <a href="../ranch">ranch(3)</a></p>
+
diff --git a/docs/en/cowboy/2.4/manual/cowboy_app/index.html b/docs/en/cowboy/2.4/manual/cowboy_app/index.html
index ab3eecf9..11819440 100644
--- a/docs/en/cowboy/2.4/manual/cowboy_app/index.html
+++ b/docs/en/cowboy/2.4/manual/cowboy_app/index.html
@@ -62,171 +62,77 @@
<h1 class="lined-header"><span>cowboy(7)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy - Small, fast, modern HTTP server for Erlang/OTP</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy - Small, fast, modern HTTP server for Erlang/OTP</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy is an HTTP server for Erlang/OTP with support for the
-HTTP/1.1, HTTP/2 and Websocket protocols.</p></div>
-<div class="paragraph"><p>Cowboy aims to provide a complete HTTP stack. This includes
-the implementation of the HTTP RFCs but also any directly
-related standards, like Websocket or Server-Sent Events.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Cowboy is an HTTP server for Erlang/OTP with support for the HTTP/1.1, HTTP/2 and Websocket protocols.</p>
+<p>Cowboy aims to provide a complete HTTP stack. This includes the implementation of the HTTP RFCs but also any directly related standards, like Websocket or Server-Sent Events.</p>
<h2 id="_modules">Modules</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Functions:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../cowboy">cowboy(3)</a> - Listener management
-</p>
+<p>Functions:</p>
+<ul><li><a href="../cowboy">cowboy(3)</a> - Listener management
</li>
-<li>
-<p>
-<a href="../cowboy_req">cowboy_req(3)</a> - Request and response
-</p>
+<li><a href="../cowboy_req">cowboy_req(3)</a> - Request and response
</li>
-<li>
-<p>
-<a href="../cowboy_router">cowboy_router(3)</a> - Router
-</p>
+<li><a href="../cowboy_router">cowboy_router(3)</a> - Router
</li>
-<li>
-<p>
-<a href="../cowboy_constraints">cowboy_constraints(3)</a> - Constraints
-</p>
+<li><a href="../cowboy_constraints">cowboy_constraints(3)</a> - Constraints
</li>
-</ul></div>
-<div class="paragraph"><p>Protocols:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../cowboy_http">cowboy_http(3)</a> - HTTP/1.1
-</p>
+</ul>
+<p>Protocols:</p>
+<ul><li><a href="../cowboy_http">cowboy_http(3)</a> - HTTP/1.1
</li>
-<li>
-<p>
-<a href="../cowboy_http2">cowboy_http2(3)</a> - HTTP/2
-</p>
+<li><a href="../cowboy_http2">cowboy_http2(3)</a> - HTTP/2
</li>
-<li>
-<p>
-<a href="../cowboy_websocket">cowboy_websocket(3)</a> - Websocket
-</p>
+<li><a href="../cowboy_websocket">cowboy_websocket(3)</a> - Websocket
</li>
-</ul></div>
-<div class="paragraph"><p>Handlers:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../cowboy_static">cowboy_static(3)</a> - Static file handler
-</p>
+</ul>
+<p>Handlers:</p>
+<ul><li><a href="../cowboy_static">cowboy_static(3)</a> - Static file handler
</li>
-</ul></div>
-<div class="paragraph"><p>Behaviors:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../cowboy_handler">cowboy_handler(3)</a> - Plain HTTP handlers
-</p>
+</ul>
+<p>Behaviors:</p>
+<ul><li><a href="../cowboy_handler">cowboy_handler(3)</a> - Plain HTTP handlers
</li>
-<li>
-<p>
-<a href="../cowboy_loop">cowboy_loop(3)</a> - Loop handlers
-</p>
+<li><a href="../cowboy_loop">cowboy_loop(3)</a> - Loop handlers
</li>
-<li>
-<p>
-<a href="../cowboy_middleware">cowboy_middleware(3)</a> - Middlewares
-</p>
+<li><a href="../cowboy_middleware">cowboy_middleware(3)</a> - Middlewares
</li>
-<li>
-<p>
-<a href="../cowboy_rest">cowboy_rest(3)</a> - REST handlers
-</p>
+<li><a href="../cowboy_rest">cowboy_rest(3)</a> - REST handlers
</li>
-<li>
-<p>
-<a href="../cowboy_stream">cowboy_stream(3)</a> - Stream handlers
-</p>
+<li><a href="../cowboy_stream">cowboy_stream(3)</a> - Stream handlers
</li>
-<li>
-<p>
-<a href="../cowboy_websocket">cowboy_websocket(3)</a> - Websocket handlers
-</p>
+<li><a href="../cowboy_websocket">cowboy_websocket(3)</a> - Websocket handlers
</li>
-</ul></div>
-<div class="paragraph"><p>Middlewares:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../cowboy_router">cowboy_router(3)</a> - Router middleware
-</p>
+</ul>
+<p>Middlewares:</p>
+<ul><li><a href="../cowboy_router">cowboy_router(3)</a> - Router middleware
</li>
-<li>
-<p>
-<a href="../cowboy_handler">cowboy_handler(3)</a> - Handler middleware
-</p>
+<li><a href="../cowboy_handler">cowboy_handler(3)</a> - Handler middleware
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
+<!-- @todo http_status_codes is not linked to; what to do with it?-->
<h2 id="_dependencies">Dependencies</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../ranch">ranch(7)</a> - Socket acceptor pool for TCP protocols
-</p>
+<ul><li><a href="../ranch">ranch(7)</a> - Socket acceptor pool for TCP protocols
</li>
-<li>
-<p>
-<a href="../cowlib">cowlib(7)</a> - Support library for manipulating Web protocols
-</p>
+<li><a href="../cowlib">cowlib(7)</a> - Support library for manipulating Web protocols
</li>
-<li>
-<p>
-ssl - Secure communication over sockets
-</p>
+<li>ssl - Secure communication over sockets
</li>
-<li>
-<p>
-crypto - Crypto functions
-</p>
+<li>crypto - Crypto functions
</li>
-</ul></div>
-<div class="paragraph"><p>All these applications must be started before the <code>cowboy</code>
-application. To start Cowboy and all dependencies at once:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+</ul>
+<p>All these applications must be started before the <code>cowboy</code> application. To start Cowboy and all dependencies at once:</p>
+<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">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">application:ensure_all_started</span></span>(<span style="color: #FF6600">cowboy</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">application:ensure_all_started</font></b>(<font color="#FF6600">cowboy</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_environment">Environment</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <code>cowboy</code> application does not define any application
-environment configuration parameters.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The <code>cowboy</code> application does not define any application environment configuration parameters.</p>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../ranch">ranch(7)</a>,
-<a href="../cowlib">cowlib(7)</a></p></div>
-</div>
-</div>
+<p><a href="../ranch">ranch(7)</a>, <a href="../cowlib">cowlib(7)</a></p>
+
diff --git a/docs/en/cowboy/2.4/manual/cowboy_constraints.int/index.html b/docs/en/cowboy/2.4/manual/cowboy_constraints.int/index.html
index aa888d30..38536c3f 100644
--- a/docs/en/cowboy/2.4/manual/cowboy_constraints.int/index.html
+++ b/docs/en/cowboy/2.4/manual/cowboy_constraints.int/index.html
@@ -62,92 +62,52 @@
<h1 class="lined-header"><span>cowboy_constraints:int(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_constraints:int - Integer constraint</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_constraints:int - Integer constraint</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Constraint functions implement a number of different operations.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Constraint functions implement a number of different operations.</p>
+<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">int</span></span>(<span style="color: #FF6600">forward</span>, <span style="color: #009900">Bin</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Int</span>} | {<span style="color: #FF6600">error</span>, <span style="color: #FF6600">not_an_integer</span>}
+<pre><tt><b><font color="#000000">int</font></b>(<font color="#FF6600">forward</font>, <font color="#009900">Bin</font>) <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <font color="#009900">Int</font>} | {<font color="#FF6600">error</font>, <font color="#FF6600">not_an_integer</font>}
-<span style="color: #009900">Bin</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()
-<span style="color: #009900">Int</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">integer</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Validate and convert the text representation of an integer.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<font color="#009900">Bin</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()
+<font color="#009900">Int</font> <font color="#990000">::</font> <b><font color="#000080">integer</font></b>()</tt></pre>
+</div></div>
+<p>Validate and convert the text representation of an integer.</p>
+<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">int</span></span>(<span style="color: #FF6600">reverse</span>, <span style="color: #009900">Int</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Bin</span>} | {<span style="color: #FF6600">error</span>, <span style="color: #FF6600">not_an_integer</span>}</tt></pre></div></div>
-<div class="paragraph"><p>Convert an integer back to its text representation.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">int</font></b>(<font color="#FF6600">reverse</font>, <font color="#009900">Int</font>) <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <font color="#009900">Bin</font>} | {<font color="#FF6600">error</font>, <font color="#FF6600">not_an_integer</font>}</tt></pre>
+</div></div>
+<p>Convert an integer back to its text representation.</p>
+<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">int</span></span>(<span style="color: #FF6600">format_error</span>, <span style="color: #009900">Error</span>) <span style="color: #990000">-&gt;</span> <span style="color: #009900">HumanReadable</span>
+<pre><tt><b><font color="#000000">int</font></b>(<font color="#FF6600">format_error</font>, <font color="#009900">Error</font>) <font color="#990000">-&gt;</font> <font color="#009900">HumanReadable</font>
-<span style="color: #009900">Error</span> <span style="color: #990000">::</span> {<span style="color: #FF6600">not_an_integer</span>, <span style="color: #009900">Bin</span> | <span style="color: #009900">Int</span>}
-<span style="color: #009900">HumanReadable</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">iolist</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Generate a human-readable error message.</p></div>
-</div>
-</div>
-<div class="sect1">
+<font color="#009900">Error</font> <font color="#990000">::</font> {<font color="#FF6600">not_an_integer</font>, <font color="#009900">Bin</font> | <font color="#009900">Int</font>}
+<font color="#009900">HumanReadable</font> <font color="#990000">::</font> <b><font color="#000000">iolist</font></b>()</tt></pre>
+</div></div>
+<p>Generate a human-readable error message.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Arguments vary depending on the operation. Constraint
-functions always take the operation type as first argument,
-and the value as second argument.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Arguments vary depending on the operation. Constraint functions always take the operation type as first argument, and the value as second argument.</p>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The return value varies depending on the operation.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The return value varies depending on the operation.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Interface modified to allow for a variety of operations.
-</p>
+<ul><li><strong>2.0</strong>: Interface modified to allow for a variety of operations.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Constraint introduced.
-</p>
+<li><strong>1.0</strong>: Constraint introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This function is not meant to be called directly.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This function is not meant to be called directly.</p>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../cowboy_constraints">cowboy_constraints(3)</a>,
-<a href="../cowboy_constraints.nonempty">cowboy_constraints:nonempty(3)</a>,
-<a href="../cowboy_router">cowboy_router(3)</a>,
-<a href="../cowboy_req.match_cookies">cowboy_req:match_cookies(3)</a>,
-<a href="../cowboy_req.match_qs">cowboy_req:match_qs(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_constraints">cowboy_constraints(3)</a>, <a href="../cowboy_constraints.nonempty">cowboy_constraints:nonempty(3)</a>, <a href="../cowboy_router">cowboy_router(3)</a>, <a href="../cowboy_req.match_cookies">cowboy_req:match_cookies(3)</a>, <a href="../cowboy_req.match_qs">cowboy_req:match_qs(3)</a></p>
+
diff --git a/docs/en/cowboy/2.4/manual/cowboy_constraints.nonempty/index.html b/docs/en/cowboy/2.4/manual/cowboy_constraints.nonempty/index.html
index 25112067..e0369700 100644
--- a/docs/en/cowboy/2.4/manual/cowboy_constraints.nonempty/index.html
+++ b/docs/en/cowboy/2.4/manual/cowboy_constraints.nonempty/index.html
@@ -62,91 +62,51 @@
<h1 class="lined-header"><span>cowboy_constraints:nonempty(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_constraints:nonempty - Non-empty constraint</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_constraints:nonempty - Non-empty constraint</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Constraint functions implement a number of different operations.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Constraint functions implement a number of different operations.</p>
+<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">nonempty</span></span>(<span style="color: #FF6600">forward</span> | <span style="color: #FF6600">reverse</span>, <span style="color: #990000">&lt;&lt;&gt;&gt;</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #FF6600">error</span>, <span style="color: #FF6600">empty</span>}</tt></pre></div></div>
-<div class="paragraph"><p>Reject empty values.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">nonempty</font></b>(<font color="#FF6600">forward</font> | <font color="#FF6600">reverse</font>, <font color="#990000">&lt;&lt;&gt;&gt;</font>) <font color="#990000">-&gt;</font> {<font color="#FF6600">error</font>, <font color="#FF6600">empty</font>}</tt></pre>
+</div></div>
+<p>Reject empty values.</p>
+<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">nonempty</span></span>(<span style="color: #FF6600">forward</span> | <span style="color: #FF6600">reverse</span>, <span style="color: #009900">Bin</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Bin</span>}
+<pre><tt><b><font color="#000000">nonempty</font></b>(<font color="#FF6600">forward</font> | <font color="#FF6600">reverse</font>, <font color="#009900">Bin</font>) <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <font color="#009900">Bin</font>}
-<span style="color: #009900">Bin</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>Accept any other binary values.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<font color="#009900">Bin</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()</tt></pre>
+</div></div>
+<p>Accept any other binary values.</p>
+<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">nonempty</span></span>(<span style="color: #FF6600">format_error</span>, <span style="color: #009900">Error</span>) <span style="color: #990000">-&gt;</span> <span style="color: #009900">HumanReadable</span>
+<pre><tt><b><font color="#000000">nonempty</font></b>(<font color="#FF6600">format_error</font>, <font color="#009900">Error</font>) <font color="#990000">-&gt;</font> <font color="#009900">HumanReadable</font>
-<span style="color: #009900">Error</span> <span style="color: #990000">::</span> {<span style="color: #FF6600">empty</span>, <span style="color: #009900">Bin</span>}
-<span style="color: #009900">HumanReadable</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">iolist</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Generate a human-readable error message.</p></div>
-</div>
-</div>
-<div class="sect1">
+<font color="#009900">Error</font> <font color="#990000">::</font> {<font color="#FF6600">empty</font>, <font color="#009900">Bin</font>}
+<font color="#009900">HumanReadable</font> <font color="#990000">::</font> <b><font color="#000000">iolist</font></b>()</tt></pre>
+</div></div>
+<p>Generate a human-readable error message.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Arguments vary depending on the operation. Constraint
-functions always take the operation type as first argument,
-and the value as second argument.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Arguments vary depending on the operation. Constraint functions always take the operation type as first argument, and the value as second argument.</p>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The return value varies depending on the operation.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The return value varies depending on the operation.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Interface modified to allow for a variety of operations.
-</p>
+<ul><li><strong>2.0</strong>: Interface modified to allow for a variety of operations.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Constraint introduced.
-</p>
+<li><strong>1.0</strong>: Constraint introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This function is not meant to be called directly.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This function is not meant to be called directly.</p>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../cowboy_constraints">cowboy_constraints(3)</a>,
-<a href="../cowboy_constraints.int">cowboy_constraints:int(3)</a>,
-<a href="../cowboy_router">cowboy_router(3)</a>,
-<a href="../cowboy_req.match_cookies">cowboy_req:match_cookies(3)</a>,
-<a href="../cowboy_req.match_qs">cowboy_req:match_qs(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_constraints">cowboy_constraints(3)</a>, <a href="../cowboy_constraints.int">cowboy_constraints:int(3)</a>, <a href="../cowboy_router">cowboy_router(3)</a>, <a href="../cowboy_req.match_cookies">cowboy_req:match_cookies(3)</a>, <a href="../cowboy_req.match_qs">cowboy_req:match_qs(3)</a></p>
+
diff --git a/docs/en/cowboy/2.4/manual/cowboy_constraints/index.html b/docs/en/cowboy/2.4/manual/cowboy_constraints/index.html
index 09db9803..82c7f1a2 100644
--- a/docs/en/cowboy/2.4/manual/cowboy_constraints/index.html
+++ b/docs/en/cowboy/2.4/manual/cowboy_constraints/index.html
@@ -62,84 +62,43 @@
<h1 class="lined-header"><span>cowboy_constraints(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_constraints - Constraints</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_constraints - Constraints</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The module <code>cowboy_constraints</code> defines the built-in
-constraints in Cowboy and provides an interface for
-manipulating these constraints.</p></div>
-<div class="paragraph"><p>Constraints are functions that define what type of
-input is allowed. They are used throughout Cowboy,
-from the router to query strings to cookies.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The module <code>cowboy_constraints</code> defines the built-in constraints in Cowboy and provides an interface for manipulating these constraints.</p>
+<p>Constraints are functions that define what type of input is allowed. They are used throughout Cowboy, from the router to query strings to cookies.</p>
<h2 id="_exports">Exports</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Built-in constraints:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../cowboy_constraints.int">cowboy_constraints:int(3)</a> - Integer constraint
-</p>
+<p>Built-in constraints:</p>
+<ul><li><a href="../cowboy_constraints.int">cowboy_constraints:int(3)</a> - Integer constraint
</li>
-<li>
-<p>
-<a href="../cowboy_constraints.nonempty">cowboy_constraints:nonempty(3)</a> - Non-empty constraint
-</p>
+<li><a href="../cowboy_constraints.nonempty">cowboy_constraints:nonempty(3)</a> - Non-empty constraint
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_types">Types</h2>
-<div class="sectionbody">
-<div class="sect2">
<h3 id="_constraint">constraint()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">constraint</span></span>() <span style="color: #990000">::</span> <span style="color: #FF6600">int</span> | <span style="color: #FF6600">nonempty</span> | <span style="font-weight: bold"><span style="color: #0000FF">fun</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>A constraint function.</p></div>
-<div class="paragraph"><p>The atom constraints are built-in, see the corresponding
-function in the exports list above.</p></div>
-</div>
-<div class="sect2">
+<pre><tt><b><font color="#000000">constraint</font></b>() <font color="#990000">::</font> <font color="#FF6600">int</font> | <font color="#FF6600">nonempty</font> | <b><font color="#0000FF">fun</font></b>()</tt></pre>
+</div></div>
+<p>A constraint function.</p>
+<p>The atom constraints are built-in, see the corresponding function in the exports list above.</p>
<h3 id="_reason">reason()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">reason</span></span>() <span style="color: #990000">::</span> {<span style="font-weight: bold"><span style="color: #000000">constraint</span></span>(), <span style="color: #009900">Reason</span>, <span style="color: #009900">Value</span>}
-
-<span style="color: #009900">Reason</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()
-<span style="color: #009900">Value</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>Reason for the constraint failure.</p></div>
-<div class="paragraph"><p>It includes the constraint function in question,
-a machine-readable error reason and the value that
-made the constraint fail.</p></div>
-</div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">reason</font></b>() <font color="#990000">::</font> {<b><font color="#000000">constraint</font></b>(), <font color="#009900">Reason</font>, <font color="#009900">Value</font>}
+
+<font color="#009900">Reason</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()
+<font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()</tt></pre>
+</div></div>
+<p>Reason for the constraint failure.</p>
+<p>It includes the constraint function in question, a machine-readable error reason and the value that made the constraint fail.</p>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="..">cowboy(7)</a>,
-<a href="../cowboy">cowboy(3)</a>,
-<a href="../cowboy_router">cowboy_router(3)</a>,
-<a href="../cowboy_req.match_cookies">cowboy_req:match_cookies(3)</a>,
-<a href="../cowboy_req.match_qs">cowboy_req:match_qs(3)</a></p></div>
-</div>
-</div>
+<p><a href="..">cowboy(7)</a>, <a href="../cowboy">cowboy(3)</a>, <a href="../cowboy_router">cowboy_router(3)</a>, <a href="../cowboy_req.match_cookies">cowboy_req:match_cookies(3)</a>, <a href="../cowboy_req.match_qs">cowboy_req:match_qs(3)</a></p>
+
diff --git a/docs/en/cowboy/2.4/manual/cowboy_handler.terminate/index.html b/docs/en/cowboy/2.4/manual/cowboy_handler.terminate/index.html
index 2c010b6a..f677bbab 100644
--- a/docs/en/cowboy/2.4/manual/cowboy_handler.terminate/index.html
+++ b/docs/en/cowboy/2.4/manual/cowboy_handler.terminate/index.html
@@ -62,109 +62,54 @@
<h1 class="lined-header"><span>cowboy_handler:terminate(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_handler:terminate - Terminate the handler</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_handler:terminate - Terminate the handler</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">terminate</span></span>(<span style="color: #009900">Reason</span>, <span style="color: #009900">PartialReq</span>, <span style="color: #009900">State</span>, <span style="color: #009900">Handler</span>) <span style="color: #990000">-&gt;</span> <span style="color: #FF6600">ok</span>
-
-<span style="color: #009900">Reason</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()
-<span style="color: #009900">PartialReq</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">map</span></span>()
-<span style="color: #009900">State</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()
-<span style="color: #009900">Handler</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">module</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Call the optional terminate callback if it is defined.</p></div>
-<div class="paragraph"><p>Make sure to use this function at the end of the execution
-of modules that implement custom handler behaviors.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">terminate</font></b>(<font color="#009900">Reason</font>, <font color="#009900">PartialReq</font>, <font color="#009900">State</font>, <font color="#009900">Handler</font>) <font color="#990000">-&gt;</font> <font color="#FF6600">ok</font>
+
+<font color="#009900">Reason</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()
+<font color="#009900">PartialReq</font> <font color="#990000">::</font> <b><font color="#000000">map</font></b>()
+<font color="#009900">State</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()
+<font color="#009900">Handler</font> <font color="#990000">::</font> <b><font color="#000000">module</font></b>()</tt></pre>
+</div></div>
+<p>Call the optional terminate callback if it is defined.</p>
+<p>Make sure to use this function at the end of the execution of modules that implement custom handler behaviors.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Reason
-</dt>
-<dd>
-<p>
-Reason for termination.
-</p>
+<dl><dt>Reason</dt>
+<dd><p>Reason for termination.</p>
</dd>
-<dt class="hdlist1">
-PartialReq
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
-<div class="paragraph"><p>It is possible to remove fields from the Req object to save memory
-when the handler has no concept of requests/responses. The only
-requirement is that a map is provided.</p></div>
+<dt>PartialReq</dt>
+<dd><p>The Req object.</p>
+<p>It is possible to remove fields from the Req object to save memory when the handler has no concept of requests/responses. The only requirement is that a map is provided.</p>
</dd>
-<dt class="hdlist1">
-State
-</dt>
-<dd>
-<p>
-Handler state.
-</p>
+<dt>State</dt>
+<dd><p>Handler state.</p>
</dd>
-<dt class="hdlist1">
-Handler
-</dt>
-<dd>
-<p>
-Handler module.
-</p>
+<dt>Handler</dt>
+<dd><p>Handler module.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The atom <code>ok</code> is always returned. It can be safely ignored.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The atom <code>ok</code> is always returned. It can be safely ignored.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced.
-</p>
+<ul><li><strong>2.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Terminate a handler normally</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Terminate a handler normally</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">cowboy_handler:terminate</span></span>(<span style="font-weight: bold"><span style="color: #000080">normal</span></span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>, <span style="color: #009900">Handler</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">cowboy_handler:terminate</font></b>(<b><font color="#000080">normal</font></b>, <font color="#009900">Req</font>, <font color="#009900">State</font>, <font color="#009900">Handler</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../cowboy_handler">cowboy_handler(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_handler">cowboy_handler(3)</a></p>
+
diff --git a/docs/en/cowboy/2.4/manual/cowboy_handler/index.html b/docs/en/cowboy/2.4/manual/cowboy_handler/index.html
index 5414b066..e6a0c3f4 100644
--- a/docs/en/cowboy/2.4/manual/cowboy_handler/index.html
+++ b/docs/en/cowboy/2.4/manual/cowboy_handler/index.html
@@ -62,96 +62,46 @@
<h1 class="lined-header"><span>cowboy_handler(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_handler - Plain HTTP handlers</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_handler - Plain HTTP handlers</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <code>cowboy_handler</code> middleware executes the handler selected
-by the router or any other preceding middleware.</p></div>
-<div class="paragraph"><p>This middleware takes the handler module and initial state
-from the <code>handler</code> and <code>handler_opts</code> environment values,
-respectively. On completion, it adds a <code>result</code> value to
-the middleware environment, containing the return value
-of the <code>terminate/3</code> callback (if defined) and <code>ok</code> otherwise.</p></div>
-<div class="paragraph"><p>This module also defines a callback interface for handling
-HTTP requests.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The <code>cowboy_handler</code> middleware executes the handler selected by the router or any other preceding middleware.</p>
+<p>This middleware takes the handler module and initial state from the <code>handler</code> and <code>handler_opts</code> environment values, respectively. On completion, it adds a <code>result</code> value to the middleware environment, containing the return value of the <code>terminate/3</code> callback (if defined) and <code>ok</code> otherwise.</p>
+<p>This module also defines a callback interface for handling HTTP requests.</p>
<h2 id="_callbacks">Callbacks</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Plain HTTP handlers implement the following interface:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Plain HTTP handlers implement the following interface:</p>
+<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">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">ok</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
-
-<span style="font-weight: bold"><span style="color: #000000">terminate</span></span>(<span style="color: #009900">Reason</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> <span style="color: #FF6600">ok</span> <span style="font-style: italic"><span style="color: #9A1900">%% optional</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">State</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()
-<span style="color: #009900">Reason</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">normal</span></span>
- | {<span style="color: #FF6600">crash</span>, <span style="color: #FF6600">error</span> | <span style="font-weight: bold"><span style="color: #000080">exit</span></span> | <span style="font-weight: bold"><span style="color: #000080">throw</span></span>, <span style="font-weight: bold"><span style="color: #000000">any</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>These two callbacks are common to all handlers.</p></div>
-<div class="paragraph"><p>Plain HTTP handlers do all their work in the <code>init/2</code>
-callback. Returning <code>ok</code> terminates the handler. If no
-response is sent, Cowboy will send a <code>204 No Content</code>.</p></div>
-<div class="paragraph"><p>The optional <code>terminate/3</code> callback will ultimately be called
-with the reason for the termination of the handler.
-Cowboy will terminate the process right after this. There
-is no need to perform any cleanup in this callback.</p></div>
-<div class="paragraph"><p>The following terminate reasons are defined for plain HTTP
-handlers:</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-normal
-</dt>
-<dd>
-<p>
- The connection was closed normally.
-</p>
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
+
+<b><font color="#000000">terminate</font></b>(<font color="#009900">Reason</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> <font color="#FF6600">ok</font> <i><font color="#9A1900">%% optional</font></i>
+
+<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()
+<font color="#009900">State</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()
+<font color="#009900">Reason</font> <font color="#990000">::</font> <b><font color="#000080">normal</font></b>
+ | {<font color="#FF6600">crash</font>, <font color="#FF6600">error</font> | <b><font color="#000080">exit</font></b> | <b><font color="#000080">throw</font></b>, <b><font color="#000000">any</font></b>()}</tt></pre>
+</div></div>
+<p>These two callbacks are common to all handlers.</p>
+<p>Plain HTTP handlers do all their work in the <code>init/2</code> callback. Returning <code>ok</code> terminates the handler. If no response is sent, Cowboy will send a <code>204 No Content</code>.</p>
+<p>The optional <code>terminate/3</code> callback will ultimately be called with the reason for the termination of the handler. Cowboy will terminate the process right after this. There is no need to perform any cleanup in this callback.</p>
+<p>The following terminate reasons are defined for plain HTTP handlers:</p>
+<dl><dt>normal</dt>
+<dd><p>The connection was closed normally.</p>
</dd>
-<dt class="hdlist1">
-{crash, Class, Reason}
-</dt>
-<dd>
-<p>
- A crash occurred in the handler. <code>Class</code> and <code>Reason</code> can be
- used to obtain more information about the crash. The function
- <code>erlang:get_stacktrace/0</code> can also be called to obtain the
- stacktrace of the process when the crash occurred.
-</p>
+<dt>{crash, Class, Reason}</dt>
+<dd><p>A crash occurred in the handler. <code>Class</code> and <code>Reason</code> can be used to obtain more information about the crash. The function <code>erlang:get_stacktrace/0</code> can also be called to obtain the stacktrace of the process when the crash occurred.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_exports">Exports</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The following function should be called by modules implementing
-custom handlers to execute the optional terminate callback:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../cowboy_handler.terminate">cowboy_handler:terminate(3)</a> - Terminate the handler
-</p>
+<p>The following function should be called by modules implementing custom handlers to execute the optional terminate callback:</p>
+<ul><li><a href="../cowboy_handler.terminate">cowboy_handler:terminate(3)</a> - Terminate the handler
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="..">cowboy(7)</a></p></div>
-</div>
-</div>
+<p><a href="..">cowboy(7)</a></p>
+
diff --git a/docs/en/cowboy/2.4/manual/cowboy_http/index.html b/docs/en/cowboy/2.4/manual/cowboy_http/index.html
index d7304e5a..467563e1 100644
--- a/docs/en/cowboy/2.4/manual/cowboy_http/index.html
+++ b/docs/en/cowboy/2.4/manual/cowboy_http/index.html
@@ -62,255 +62,116 @@
<h1 class="lined-header"><span>cowboy_http(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_http - HTTP/1.1</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_http - HTTP/1.1</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The module <code>cowboy_http</code> implements HTTP/1.1 and HTTP/1.0
-as a Ranch protocol.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The module <code>cowboy_http</code> implements HTTP/1.1 and HTTP/1.0 as a Ranch protocol.</p>
<h2 id="_options">Options</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<!-- @todo Might be worth moving cowboy_clear/tls/stream_h options-->
+<!-- to their respective manual, when they are added.-->
+<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">opts</span></span>() <span style="color: #990000">::</span> #{
- <span style="color: #0000FF">connection_type</span> <span style="color: #990000">=&gt;</span> <span style="color: #FF6600">worker</span> | <span style="color: #FF6600">supervisor</span>,
- <span style="color: #0000FF">env</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_middleware:env</span></span>(),
- <span style="color: #0000FF">idle_timeout</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">timeout</span></span>(),
- <span style="color: #0000FF">inactivity_timeout</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">timeout</span></span>(),
- <span style="color: #0000FF">max_empty_lines</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">max_header_name_length</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">max_header_value_length</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">max_headers</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">max_keepalive</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">max_method_length</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">max_request_line_length</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">max_skip_body_length</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">middlewares</span> <span style="color: #990000">=&gt;</span> [<span style="font-weight: bold"><span style="color: #000000">module</span></span>()],
- <span style="color: #0000FF">request_timeout</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">timeout</span></span>(),
- <span style="color: #000080">shutdown</span><span style="color: #009900">_timeout</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">timeout</span></span>(),
- <span style="color: #0000FF">stream_handlers</span> <span style="color: #990000">=&gt;</span> [<span style="font-weight: bold"><span style="color: #000000">module</span></span>()]
-}</tt></pre></div></div>
-<div class="paragraph"><p>Configuration for the HTTP/1.1 protocol.</p></div>
-<div class="paragraph"><p>This configuration is passed to Cowboy when starting listeners
-using <code>cowboy:start_clear/3</code> or <code>cowboy:start_tls/3</code> functions.</p></div>
-<div class="paragraph"><p>It can be updated without restarting listeners using the
-Ranch functions <code>ranch:get_protocol_options/1</code> and
-<code>ranch:set_protocol_options/2</code>.</p></div>
-<div class="paragraph"><p>The default value is given next to the option name:</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-connection_type (supervisor)
-</dt>
-<dd>
-<p>
- Whether the connection process also acts as a supervisor.
-</p>
-</dd>
-<dt class="hdlist1">
-env (#{})
-</dt>
-<dd>
-<p>
- Middleware environment.
-</p>
-</dd>
-<dt class="hdlist1">
-idle_timeout (60000)
-</dt>
-<dd>
-<p>
- Time in ms with no data received before Cowboy closes the connection.
-</p>
-</dd>
-<dt class="hdlist1">
-inactivity_timeout (300000)
-</dt>
-<dd>
-<p>
- Time in ms with nothing received at all before Cowboy closes the connection.
-</p>
-</dd>
-<dt class="hdlist1">
-max_empty_lines (5)
-</dt>
-<dd>
-<p>
- Maximum number of empty lines before a request.
-</p>
-</dd>
-<dt class="hdlist1">
-max_header_name_length (64)
-</dt>
-<dd>
-<p>
- Maximum length of header names.
-</p>
-</dd>
-<dt class="hdlist1">
-max_header_value_length (4096)
-</dt>
-<dd>
-<p>
- Maximum length of header values.
-</p>
-</dd>
-<dt class="hdlist1">
-max_headers (100)
-</dt>
-<dd>
-<p>
- Maximum number of headers allowed per request.
-</p>
-</dd>
-<dt class="hdlist1">
-max_keepalive (100)
-</dt>
-<dd>
-<p>
- Maximum number of requests allowed per connection.
-</p>
-</dd>
-<dt class="hdlist1">
-max_method_length (32)
-</dt>
-<dd>
-<p>
- Maximum length of the method.
-</p>
-</dd>
-<dt class="hdlist1">
-max_request_line_length (8000)
-</dt>
-<dd>
-<p>
- Maximum length of the request line.
-</p>
-</dd>
-<dt class="hdlist1">
-max_skip_body_length (1000000)
-</dt>
-<dd>
-<p>
- Maximum length Cowboy is willing to skip when the user code did not read the body fully.
- When the remaining length is too large or unknown Cowboy will close the connection.
-</p>
-</dd>
-<dt class="hdlist1">
-middlewares ([cowboy_router, cowboy_handler])
-</dt>
-<dd>
-<p>
- Middlewares to run for every request.
-</p>
-</dd>
-<dt class="hdlist1">
-request_timeout (5000)
-</dt>
-<dd>
-<p>
- Time in ms with no requests before Cowboy closes the connection.
-</p>
-</dd>
-<dt class="hdlist1">
-shutdown_timeout (5000)
-</dt>
-<dd>
-<p>
- Time in ms Cowboy will wait for child processes to shut down before killing them.
-</p>
-</dd>
-<dt class="hdlist1">
-stream_handlers ([cowboy_stream_h])
-</dt>
-<dd>
-<p>
- Ordered list of stream handlers that will handle all stream events.
-</p>
-</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">opts</font></b>() <font color="#990000">::</font> #{
+ <font color="#0000FF">connection_type</font> <font color="#990000">=&gt;</font> <font color="#FF6600">worker</font> | <font color="#FF6600">supervisor</font>,
+ <font color="#0000FF">env</font> <font color="#990000">=&gt;</font> <b><font color="#000000">cowboy_middleware:env</font></b>(),
+ <font color="#0000FF">idle_timeout</font> <font color="#990000">=&gt;</font> <b><font color="#000000">timeout</font></b>(),
+ <font color="#0000FF">inactivity_timeout</font> <font color="#990000">=&gt;</font> <b><font color="#000000">timeout</font></b>(),
+ <font color="#0000FF">max_empty_lines</font> <font color="#990000">=&gt;</font> <b><font color="#000000">non_neg_integer</font></b>(),
+ <font color="#0000FF">max_header_name_length</font> <font color="#990000">=&gt;</font> <b><font color="#000000">non_neg_integer</font></b>(),
+ <font color="#0000FF">max_header_value_length</font> <font color="#990000">=&gt;</font> <b><font color="#000000">non_neg_integer</font></b>(),
+ <font color="#0000FF">max_headers</font> <font color="#990000">=&gt;</font> <b><font color="#000000">non_neg_integer</font></b>(),
+ <font color="#0000FF">max_keepalive</font> <font color="#990000">=&gt;</font> <b><font color="#000000">non_neg_integer</font></b>(),
+ <font color="#0000FF">max_method_length</font> <font color="#990000">=&gt;</font> <b><font color="#000000">non_neg_integer</font></b>(),
+ <font color="#0000FF">max_request_line_length</font> <font color="#990000">=&gt;</font> <b><font color="#000000">non_neg_integer</font></b>(),
+ <font color="#0000FF">max_skip_body_length</font> <font color="#990000">=&gt;</font> <b><font color="#000000">non_neg_integer</font></b>(),
+ <font color="#0000FF">middlewares</font> <font color="#990000">=&gt;</font> [<b><font color="#000000">module</font></b>()],
+ <font color="#0000FF">request_timeout</font> <font color="#990000">=&gt;</font> <b><font color="#000000">timeout</font></b>(),
+ <font color="#000080">shutdown</font><font color="#009900">_timeout</font> <font color="#990000">=&gt;</font> <b><font color="#000000">timeout</font></b>(),
+ <font color="#0000FF">stream_handlers</font> <font color="#990000">=&gt;</font> [<b><font color="#000000">module</font></b>()]
+}</tt></pre>
+</div></div>
+<p>Configuration for the HTTP/1.1 protocol.</p>
+<p>This configuration is passed to Cowboy when starting listeners using <code>cowboy:start_clear/3</code> or <code>cowboy:start_tls/3</code> functions.</p>
+<p>It can be updated without restarting listeners using the Ranch functions <code>ranch:get_protocol_options/1</code> and <code>ranch:set_protocol_options/2</code>.</p>
+<p>The default value is given next to the option name:</p>
+<dl><dt>connection_type (supervisor)</dt>
+<dd><p>Whether the connection process also acts as a supervisor.</p>
+</dd>
+<dt>env (#{})</dt>
+<dd><p>Middleware environment.</p>
+</dd>
+<dt>idle_timeout (60000)</dt>
+<dd><p>Time in ms with no data received before Cowboy closes the connection.</p>
+</dd>
+<dt>inactivity_timeout (300000)</dt>
+<dd><p>Time in ms with nothing received at all before Cowboy closes the connection.</p>
+</dd>
+<dt>max_empty_lines (5)</dt>
+<dd><p>Maximum number of empty lines before a request.</p>
+</dd>
+<dt>max_header_name_length (64)</dt>
+<dd><p>Maximum length of header names.</p>
+</dd>
+<dt>max_header_value_length (4096)</dt>
+<dd><p>Maximum length of header values.</p>
+</dd>
+<dt>max_headers (100)</dt>
+<dd><p>Maximum number of headers allowed per request.</p>
+</dd>
+<dt>max_keepalive (100)</dt>
+<dd><p>Maximum number of requests allowed per connection.</p>
+</dd>
+<dt>max_method_length (32)</dt>
+<dd><p>Maximum length of the method.</p>
+</dd>
+<dt>max_request_line_length (8000)</dt>
+<dd><p>Maximum length of the request line.</p>
+</dd>
+<dt>max_skip_body_length (1000000)</dt>
+<dd><p>Maximum length Cowboy is willing to skip when the user code did not read the body fully. When the remaining length is too large or unknown Cowboy will close the connection.</p>
+</dd>
+<dt>middlewares ([cowboy_router, cowboy_handler])</dt>
+<dd><p>Middlewares to run for every request.</p>
+</dd>
+<dt>request_timeout (5000)</dt>
+<dd><p>Time in ms with no requests before Cowboy closes the connection.</p>
+</dd>
+<dt>shutdown_timeout (5000)</dt>
+<dd><p>Time in ms Cowboy will wait for child processes to shut down before killing them.</p>
+</dd>
+<dt>stream_handlers ([cowboy_stream_h])</dt>
+<dd><p>Ordered list of stream handlers that will handle all stream events.</p>
+</dd>
+</dl>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.2</strong>: The <code>max_skip_body_length</code> option was added.
-</p>
+<ul><li><strong>2.2</strong>: The <code>max_skip_body_length</code> option was added.
</li>
-<li>
-<p>
-<strong>2.0</strong>: The <code>timeout</code> option was renamed <code>request_timeout</code>.
-</p>
+<li><strong>2.0</strong>: The <code>timeout</code> option was renamed <code>request_timeout</code>.
</li>
-<li>
-<p>
-<strong>2.0</strong>: The <code>idle_timeout</code>, <code>inactivity_timeout</code> and <code>shutdown_timeout</code> options were added.
-</p>
+<li><strong>2.0</strong>: The <code>idle_timeout</code>, <code>inactivity_timeout</code> and <code>shutdown_timeout</code> options were added.
</li>
-<li>
-<p>
-<strong>2.0</strong>: The <code>max_method_length</code> option was added.
-</p>
+<li><strong>2.0</strong>: The <code>max_method_length</code> option was added.
</li>
-<li>
-<p>
-<strong>2.0</strong>: The <code>max_request_line_length</code> default was increased from 4096 to 8000.
-</p>
+<li><strong>2.0</strong>: The <code>max_request_line_length</code> default was increased from 4096 to 8000.
</li>
-<li>
-<p>
-<strong>2.0</strong>: The <code>connection_type</code> option was added.
-</p>
+<li><strong>2.0</strong>: The <code>connection_type</code> option was added.
</li>
-<li>
-<p>
-<strong>2.0</strong>: The <code>env</code> option is now a map instead of a proplist.
-</p>
+<li><strong>2.0</strong>: The <code>env</code> option is now a map instead of a proplist.
</li>
-<li>
-<p>
-<strong>2.0</strong>: The <code>stream_handlers</code> option was added.
-</p>
+<li><strong>2.0</strong>: The <code>stream_handlers</code> option was added.
</li>
-<li>
-<p>
-<strong>2.0</strong>: The <code>compress</code> option was removed in favor of the <code>cowboy_compress_h</code> stream handler.
-</p>
+<li><strong>2.0</strong>: The <code>compress</code> option was removed in favor of the <code>cowboy_compress_h</code> stream handler.
</li>
-<li>
-<p>
-<strong>2.0</strong>: Options are now a map instead of a proplist.
-</p>
+<li><strong>2.0</strong>: Options are now a map instead of a proplist.
</li>
-<li>
-<p>
-<strong>2.0</strong>: Protocol introduced. Replaces <code>cowboy_protocol</code>.
-</p>
+<li><strong>2.0</strong>: Protocol introduced. Replaces <code>cowboy_protocol</code>.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="..">cowboy(7)</a>,
-<a href="../cowboy_http2">cowboy_http2(3)</a>,
-<a href="../cowboy_websocket">cowboy_websocket(3)</a></p></div>
-</div>
-</div>
+<p><a href="..">cowboy(7)</a>, <a href="../cowboy_http2">cowboy_http2(3)</a>, <a href="../cowboy_websocket">cowboy_websocket(3)</a></p>
+
diff --git a/docs/en/cowboy/2.4/manual/cowboy_http2/index.html b/docs/en/cowboy/2.4/manual/cowboy_http2/index.html
index ec1b8d28..9b915b91 100644
--- a/docs/en/cowboy/2.4/manual/cowboy_http2/index.html
+++ b/docs/en/cowboy/2.4/manual/cowboy_http2/index.html
@@ -62,243 +62,102 @@
<h1 class="lined-header"><span>cowboy_http2(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_http2 - HTTP/2</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_http2 - HTTP/2</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The module <code>cowboy_http2</code> implements HTTP/2
-as a Ranch protocol.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The module <code>cowboy_http2</code> implements HTTP/2 as a Ranch protocol.</p>
<h2 id="_options">Options</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<!-- @todo Might be worth moving cowboy_clear/tls/stream_h options-->
+<!-- to their respective manual, when they are added.-->
+<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">opts</span></span>() <span style="color: #990000">::</span> #{
- <span style="color: #0000FF">connection_type</span> <span style="color: #990000">=&gt;</span> <span style="color: #FF6600">worker</span> | <span style="color: #FF6600">supervisor</span>,
- <span style="color: #0000FF">enable_connect_protocol</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>(),
- <span style="color: #0000FF">env</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_middleware:env</span></span>(),
- <span style="color: #0000FF">inactivity_timeout</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">timeout</span></span>(),
- <span style="color: #0000FF">initial_connection_window_size</span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">65535</span><span style="color: #990000">..</span><span style="color: #993399">16#7fffffff</span>,
- <span style="color: #0000FF">initial_stream_window_size</span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">0</span><span style="color: #990000">..</span><span style="color: #993399">16#7fffffff</span>,
- <span style="color: #0000FF">max_concurrent_streams</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>() | <span style="color: #FF6600">infinity</span>,
- <span style="color: #0000FF">max_decode_table_size</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">max_encode_table_size</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">max_frame_size_received</span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">16384</span><span style="color: #990000">..</span><span style="color: #993399">16777215</span>,
- <span style="color: #0000FF">max_frame_size_sent</span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">16384</span><span style="color: #990000">..</span><span style="color: #993399">16777215</span> | <span style="color: #FF6600">infinity</span>,
- <span style="color: #0000FF">middlewares</span> <span style="color: #990000">=&gt;</span> [<span style="font-weight: bold"><span style="color: #000000">module</span></span>()],
- <span style="color: #0000FF">preface_timeout</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">timeout</span></span>(),
- <span style="color: #0000FF">settings_timeout</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">timeout</span></span>(),
- <span style="color: #000080">shutdown</span><span style="color: #009900">_timeout</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">timeout</span></span>(),
- <span style="color: #0000FF">stream_handlers</span> <span style="color: #990000">=&gt;</span> [<span style="font-weight: bold"><span style="color: #000000">module</span></span>()]
-}</tt></pre></div></div>
-<div class="paragraph"><p>Configuration for the HTTP/2 protocol.</p></div>
-<div class="paragraph"><p>This configuration is passed to Cowboy when starting listeners
-using <code>cowboy:start_clear/3</code> or <code>cowboy:start_tls/3</code> functions.</p></div>
-<div class="paragraph"><p>It can be updated without restarting listeners using the
-Ranch functions <code>ranch:get_protocol_options/1</code> and
-<code>ranch:set_protocol_options/2</code>.</p></div>
-<div class="paragraph"><p>The default value is given next to the option name:</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-connection_type (supervisor)
-</dt>
-<dd>
-<p>
- Whether the connection process also acts as a supervisor.
-</p>
+<pre><tt><b><font color="#000000">opts</font></b>() <font color="#990000">::</font> #{
+ <font color="#0000FF">connection_type</font> <font color="#990000">=&gt;</font> <font color="#FF6600">worker</font> | <font color="#FF6600">supervisor</font>,
+ <font color="#0000FF">enable_connect_protocol</font> <font color="#990000">=&gt;</font> <b><font color="#000000">boolean</font></b>(),
+ <font color="#0000FF">env</font> <font color="#990000">=&gt;</font> <b><font color="#000000">cowboy_middleware:env</font></b>(),
+ <font color="#0000FF">inactivity_timeout</font> <font color="#990000">=&gt;</font> <b><font color="#000000">timeout</font></b>(),
+ <font color="#0000FF">initial_connection_window_size</font> <font color="#990000">=&gt;</font> <font color="#993399">65535</font><font color="#990000">..</font><font color="#993399">16#7fffffff</font>,
+ <font color="#0000FF">initial_stream_window_size</font> <font color="#990000">=&gt;</font> <font color="#993399">0</font><font color="#990000">..</font><font color="#993399">16#7fffffff</font>,
+ <font color="#0000FF">max_concurrent_streams</font> <font color="#990000">=&gt;</font> <b><font color="#000000">non_neg_integer</font></b>() | <font color="#FF6600">infinity</font>,
+ <font color="#0000FF">max_decode_table_size</font> <font color="#990000">=&gt;</font> <b><font color="#000000">non_neg_integer</font></b>(),
+ <font color="#0000FF">max_encode_table_size</font> <font color="#990000">=&gt;</font> <b><font color="#000000">non_neg_integer</font></b>(),
+ <font color="#0000FF">max_frame_size_received</font> <font color="#990000">=&gt;</font> <font color="#993399">16384</font><font color="#990000">..</font><font color="#993399">16777215</font>,
+ <font color="#0000FF">max_frame_size_sent</font> <font color="#990000">=&gt;</font> <font color="#993399">16384</font><font color="#990000">..</font><font color="#993399">16777215</font> | <font color="#FF6600">infinity</font>,
+ <font color="#0000FF">middlewares</font> <font color="#990000">=&gt;</font> [<b><font color="#000000">module</font></b>()],
+ <font color="#0000FF">preface_timeout</font> <font color="#990000">=&gt;</font> <b><font color="#000000">timeout</font></b>(),
+ <font color="#0000FF">settings_timeout</font> <font color="#990000">=&gt;</font> <b><font color="#000000">timeout</font></b>(),
+ <font color="#000080">shutdown</font><font color="#009900">_timeout</font> <font color="#990000">=&gt;</font> <b><font color="#000000">timeout</font></b>(),
+ <font color="#0000FF">stream_handlers</font> <font color="#990000">=&gt;</font> [<b><font color="#000000">module</font></b>()]
+}</tt></pre>
+</div></div>
+<p>Configuration for the HTTP/2 protocol.</p>
+<p>This configuration is passed to Cowboy when starting listeners using <code>cowboy:start_clear/3</code> or <code>cowboy:start_tls/3</code> functions.</p>
+<p>It can be updated without restarting listeners using the Ranch functions <code>ranch:get_protocol_options/1</code> and <code>ranch:set_protocol_options/2</code>.</p>
+<p>The default value is given next to the option name:</p>
+<dl><dt>connection_type (supervisor)</dt>
+<dd><p>Whether the connection process also acts as a supervisor.</p>
</dd>
-<dt class="hdlist1">
-enable_connect_protocol (false)
-</dt>
-<dd>
-<p>
- Whether to enable the extended CONNECT method to allow
- protocols like Websocket to be used over an HTTP/2 stream.
- This option is experimental and disabled by default.
-</p>
+<dt>enable_connect_protocol (false)</dt>
+<dd><p>Whether to enable the extended CONNECT method to allow protocols like Websocket to be used over an HTTP/2 stream. This option is experimental and disabled by default.</p>
</dd>
-<dt class="hdlist1">
-env (#{})
-</dt>
-<dd>
-<p>
- Middleware environment.
-</p>
+<dt>env (#{})</dt>
+<dd><p>Middleware environment.</p>
</dd>
-<dt class="hdlist1">
-inactivity_timeout (300000)
-</dt>
-<dd>
-<p>
- Time in ms with nothing received at all before Cowboy closes the connection.
-</p>
+<dt>inactivity_timeout (300000)</dt>
+<dd><p>Time in ms with nothing received at all before Cowboy closes the connection.</p>
</dd>
-<dt class="hdlist1">
-initial_connection_window_size (65535)
-</dt>
-<dd>
-<p>
- Initial window size for the connection. This is the total amount
- of data (from request bodies for example) that may be buffered
- by the connection across all streams before the user code
- explicitly requests it.
-</p>
-<div class="literalblock">
-<div class="content">
-<pre><code>Note that this value cannot be lower than the default.</code></pre>
-</div></div>
+<dt>initial_connection_window_size (65535)</dt>
+<dd><p>Initial window size for the connection. This is the total amount of data (from request bodies for example) that may be buffered by the connection across all streams before the user code explicitly requests it.</p>
+<p>Note that this value cannot be lower than the default.</p>
</dd>
-<dt class="hdlist1">
-initial_stream_window_size (65535)
-</dt>
-<dd>
-<p>
- Initial window size for new streams. This is the total amount
- of data (from request bodies for example) that may be buffered
- by a single stream before the user code explicitly requests it.
-</p>
+<dt>initial_stream_window_size (65535)</dt>
+<dd><p>Initial window size for new streams. This is the total amount of data (from request bodies for example) that may be buffered by a single stream before the user code explicitly requests it.</p>
</dd>
-<dt class="hdlist1">
-max_concurrent_streams (infinity)
-</dt>
-<dd>
-<p>
- Maximum number of concurrent streams allowed on the connection.
-</p>
+<dt>max_concurrent_streams (infinity)</dt>
+<dd><p>Maximum number of concurrent streams allowed on the connection.</p>
</dd>
-<dt class="hdlist1">
-max_decode_table_size (4096)
-</dt>
-<dd>
-<p>
- Maximum header table size used by the decoder. This is the value advertised
- to the client. The client can then choose a header table size equal or lower
- to the advertised value.
-</p>
+<dt>max_decode_table_size (4096)</dt>
+<dd><p>Maximum header table size used by the decoder. This is the value advertised to the client. The client can then choose a header table size equal or lower to the advertised value.</p>
</dd>
-<dt class="hdlist1">
-max_encode_table_size (4096)
-</dt>
-<dd>
-<p>
- Maximum header table size used by the encoder. The server will compare this
- value to what the client advertises and choose the smallest one as the
- encoder&#8217;s header table size.
-</p>
+<dt>max_encode_table_size (4096)</dt>
+<dd><p>Maximum header table size used by the encoder. The server will compare this value to what the client advertises and choose the smallest one as the encoder&apos;s header table size.</p>
</dd>
-<dt class="hdlist1">
-max_frame_size_received (16384)
-</dt>
-<dd>
-<p>
- Maximum size of the frames received by the server. This value is
- advertised to the remote endpoint which can then decide to use
- any value lower or equal for its frame sizes.
-</p>
+<dt>max_frame_size_received (16384)</dt>
+<dd><p>Maximum size of the frames received by the server. This value is advertised to the remote endpoint which can then decide to use any value lower or equal for its frame sizes.</p>
</dd>
-<dt class="hdlist1">
-max_frame_size_sent (infinity)
-</dt>
-<dd>
-<p>
- Maximum size of the frames sent by the server. This option allows
- setting an upper limit to the frame sizes instead of blindly
- following the client&#8217;s advertised maximum.
-</p>
-<div class="literalblock">
-<div class="content">
-<pre><code>Note that actual frame sizes may be lower than the limit when
-there is not enough space left in the flow control window.</code></pre>
-</div></div>
+<dt>max_frame_size_sent (infinity)</dt>
+<dd><p>Maximum size of the frames sent by the server. This option allows setting an upper limit to the frame sizes instead of blindly following the client&apos;s advertised maximum.</p>
+<p>Note that actual frame sizes may be lower than the limit when there is not enough space left in the flow control window.</p>
</dd>
-<dt class="hdlist1">
-middlewares ([cowboy_router, cowboy_handler])
-</dt>
-<dd>
-<p>
- Middlewares to run for every request.
-</p>
+<dt>middlewares ([cowboy_router, cowboy_handler])</dt>
+<dd><p>Middlewares to run for every request.</p>
</dd>
-<dt class="hdlist1">
-preface_timeout (5000)
-</dt>
-<dd>
-<p>
- Time in ms Cowboy is willing to wait for the connection preface.
-</p>
+<dt>preface_timeout (5000)</dt>
+<dd><p>Time in ms Cowboy is willing to wait for the connection preface.</p>
</dd>
-<dt class="hdlist1">
-settings_timeout (5000)
-</dt>
-<dd>
-<p>
- Time in ms Cowboy is willing to wait for a SETTINGS ack.
-</p>
+<dt>settings_timeout (5000)</dt>
+<dd><p>Time in ms Cowboy is willing to wait for a SETTINGS ack.</p>
</dd>
-<dt class="hdlist1">
-shutdown_timeout (5000)
-</dt>
-<dd>
-<p>
- Time in ms Cowboy will wait for child processes to shut down before killing them.
-</p>
+<dt>shutdown_timeout (5000)</dt>
+<dd><p>Time in ms Cowboy will wait for child processes to shut down before killing them.</p>
</dd>
-<dt class="hdlist1">
-stream_handlers ([cowboy_stream_h])
-</dt>
-<dd>
-<p>
- Ordered list of stream handlers that will handle all stream events.
-</p>
+<dt>stream_handlers ([cowboy_stream_h])</dt>
+<dd><p>Ordered list of stream handlers that will handle all stream events.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.4</strong>: Add the options <code>initial_connection_window_size</code>,
- <code>initial_stream_window_size</code>, <code>max_concurrent_streams</code>,
- <code>max_decode_table_size</code>, <code>max_encode_table_size</code>,
- <code>max_frame_size_received</code>, <code>max_frame_size_sent</code>
- and <code>settings_timeout</code> to configure HTTP/2 SETTINGS
- and related behavior.
-</p>
+<ul><li><strong>2.4</strong>: Add the options <code>initial_connection_window_size</code>, <code>initial_stream_window_size</code>, <code>max_concurrent_streams</code>, <code>max_decode_table_size</code>, <code>max_encode_table_size</code>, <code>max_frame_size_received</code>, <code>max_frame_size_sent</code> and <code>settings_timeout</code> to configure HTTP/2 SETTINGS and related behavior.
</li>
-<li>
-<p>
-<strong>2.4</strong>: Add the experimental option <code>enable_connect_protocol</code>.
-</p>
+<li><strong>2.4</strong>: Add the experimental option <code>enable_connect_protocol</code>.
</li>
-<li>
-<p>
-<strong>2.0</strong>: Protocol introduced.
-</p>
+<li><strong>2.0</strong>: Protocol introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="..">cowboy(7)</a>,
-<a href="../cowboy_http">cowboy_http(3)</a>,
-<a href="../cowboy_websocket">cowboy_websocket(3)</a></p></div>
-</div>
-</div>
+<p><a href="..">cowboy(7)</a>, <a href="../cowboy_http">cowboy_http(3)</a>, <a href="../cowboy_websocket">cowboy_websocket(3)</a></p>
+
diff --git a/docs/en/cowboy/2.4/manual/cowboy_loop/index.html b/docs/en/cowboy/2.4/manual/cowboy_loop/index.html
index ea078cb9..a6348946 100644
--- a/docs/en/cowboy/2.4/manual/cowboy_loop/index.html
+++ b/docs/en/cowboy/2.4/manual/cowboy_loop/index.html
@@ -62,120 +62,60 @@
<h1 class="lined-header"><span>cowboy_loop(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_loop - Loop handlers</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_loop - Loop handlers</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The module <code>cowboy_loop</code> defines a callback interface for
-long running HTTP connections.</p></div>
-<div class="paragraph"><p>You should switch to this behavior for long polling,
-server-sent events and similar long-running requests.</p></div>
-<div class="paragraph"><p>There are generally two usage patterns:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-Loop until receiving a specific message, then send
- a response and stop execution (for example long polling);
-</p>
+<p>The module <code>cowboy_loop</code> defines a callback interface for long running HTTP connections.</p>
+<p>You should switch to this behavior for long polling, server-sent events and similar long-running requests.</p>
+<p>There are generally two usage patterns:</p>
+<ul><li>Loop until receiving a specific message, then send a response and stop execution (for example long polling);
</li>
-<li>
-<p>
-Or initiate a response in <code>init/2</code> and stream the
- body in <code>info/3</code> as necessary (for example server-sent events).
-</p>
+<li>Or initiate a response in <code>init/2</code> and stream the body in <code>info/3</code> as necessary (for example server-sent events).
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_callbacks">Callbacks</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Loop handlers implement the following interface:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Loop handlers implement the following interface:</p>
+<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">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_loop</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
- | {<span style="color: #FF6600">cowboy_loop</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>, <span style="color: #FF6600">hibernate</span>}
-
-<span style="font-weight: bold"><span style="color: #000000">info</span></span>(<span style="color: #009900">Info</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>)
- <span style="color: #990000">-&gt;</span> {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
- | {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>, <span style="color: #FF6600">hibernate</span>}
- | {<span style="color: #FF6600">stop</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
-
-<span style="font-weight: bold"><span style="color: #000000">terminate</span></span>(<span style="color: #009900">Reason</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> <span style="color: #FF6600">ok</span> <span style="font-style: italic"><span style="color: #9A1900">%% optional</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">State</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()
-<span style="color: #009900">Info</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()
-<span style="color: #009900">Reason</span> <span style="color: #990000">::</span> <span style="color: #FF6600">stop</span>
- | {<span style="color: #FF6600">crash</span>, <span style="color: #FF6600">error</span> | <span style="font-weight: bold"><span style="color: #000080">exit</span></span> | <span style="font-weight: bold"><span style="color: #000080">throw</span></span>, <span style="font-weight: bold"><span style="color: #000000">any</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>The <code>init/2</code> callback is common to all handlers. To switch
-to the loop behavior, it must return <code>cowboy_loop</code> as the
-first element of the tuple.</p></div>
-<div class="paragraph"><p>The <code>info/3</code> callback will be called for every Erlang message
-received. It may choose to continue the receive loop or stop
-it.</p></div>
-<div class="paragraph"><p>The optional <code>terminate/3</code> callback will ultimately be called
-with the reason for the termination of the handler.
-Cowboy will terminate the process right after this. There
-is no need to perform any cleanup in this callback.</p></div>
-<div class="paragraph"><p>The following terminate reasons are defined for loop handlers:</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-stop
-</dt>
-<dd>
-<p>
- The handler requested to close the connection by returning
- a <code>stop</code> tuple.
-</p>
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>)
+ <font color="#990000">-&gt;</font> {<font color="#FF6600">cowboy_loop</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
+ | {<font color="#FF6600">cowboy_loop</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>, <font color="#FF6600">hibernate</font>}
+
+<b><font color="#000000">info</font></b>(<font color="#009900">Info</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>)
+ <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
+ | {<font color="#FF6600">ok</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>, <font color="#FF6600">hibernate</font>}
+ | {<font color="#FF6600">stop</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
+
+<b><font color="#000000">terminate</font></b>(<font color="#009900">Reason</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> <font color="#FF6600">ok</font> <i><font color="#9A1900">%% optional</font></i>
+
+<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()
+<font color="#009900">State</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()
+<font color="#009900">Info</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()
+<font color="#009900">Reason</font> <font color="#990000">::</font> <font color="#FF6600">stop</font>
+ | {<font color="#FF6600">crash</font>, <font color="#FF6600">error</font> | <b><font color="#000080">exit</font></b> | <b><font color="#000080">throw</font></b>, <b><font color="#000000">any</font></b>()}</tt></pre>
+</div></div>
+<p>The <code>init/2</code> callback is common to all handlers. To switch to the loop behavior, it must return <code>cowboy_loop</code> as the first element of the tuple.</p>
+<p>The <code>info/3</code> callback will be called for every Erlang message received. It may choose to continue the receive loop or stop it.</p>
+<p>The optional <code>terminate/3</code> callback will ultimately be called with the reason for the termination of the handler. Cowboy will terminate the process right after this. There is no need to perform any cleanup in this callback.</p>
+<p>The following terminate reasons are defined for loop handlers:</p>
+<dl><dt>stop</dt>
+<dd><p>The handler requested to close the connection by returning a <code>stop</code> tuple.</p>
</dd>
-<dt class="hdlist1">
-{crash, Class, Reason}
-</dt>
-<dd>
-<p>
- A crash occurred in the handler. <code>Class</code> and <code>Reason</code> can be
- used to obtain more information about the crash. The function
- <code>erlang:get_stacktrace/0</code> can also be called to obtain the
- stacktrace of the process when the crash occurred.
-</p>
+<dt>{crash, Class, Reason}</dt>
+<dd><p>A crash occurred in the handler. <code>Class</code> and <code>Reason</code> can be used to obtain more information about the crash. The function <code>erlang:get_stacktrace/0</code> can also be called to obtain the stacktrace of the process when the crash occurred.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Loop handlers no longer need to handle overflow/timeouts.
-</p>
+<ul><li><strong>2.0</strong>: Loop handlers no longer need to handle overflow/timeouts.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Behavior introduced.
-</p>
+<li><strong>1.0</strong>: Behavior introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="..">cowboy(7)</a>,
-<a href="../cowboy_handler">cowboy_handler(3)</a></p></div>
-</div>
-</div>
+<p><a href="..">cowboy(7)</a>, <a href="../cowboy_handler">cowboy_handler(3)</a></p>
+
diff --git a/docs/en/cowboy/2.4/manual/cowboy_middleware/index.html b/docs/en/cowboy/2.4/manual/cowboy_middleware/index.html
index e7e7de29..8d5a30ad 100644
--- a/docs/en/cowboy/2.4/manual/cowboy_middleware/index.html
+++ b/docs/en/cowboy/2.4/manual/cowboy_middleware/index.html
@@ -62,115 +62,56 @@
<h1 class="lined-header"><span>cowboy_middleware(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_middleware - Middlewares</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_middleware - Middlewares</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The module <code>cowboy_middleware</code> defines a callback interface for
-Cowboy middlewares.</p></div>
-<div class="paragraph"><p>Middlewares process the request sequentially in the order they
-are configured.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The module <code>cowboy_middleware</code> defines a callback interface for Cowboy middlewares.</p>
+<p>Middlewares process the request sequentially in the order they are configured.</p>
<h2 id="_callbacks">Callbacks</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Middlewares implement the following interface:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Middlewares implement the following interface:</p>
+<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">execute</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">Env</span>)
- <span style="color: #990000">-&gt;</span> {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">Env</span>}
- | {<span style="color: #FF6600">suspend</span>, <span style="font-weight: bold"><span style="color: #000000">module</span></span>(), <span style="font-weight: bold"><span style="color: #000080">atom</span></span>(), [<span style="font-weight: bold"><span style="color: #000000">any</span></span>()]}
- | {<span style="color: #FF6600">stop</span>, <span style="color: #009900">Req</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">Env</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_middleware:env</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>The <code>execute/2</code> is the only callback that needs to be
-implemented. It must execute the middleware and return
-with instructions for Cowboy.</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-ok
-</dt>
-<dd>
-<p>
-Cowboy should continue processing the request using the
-returned Req object and environment.
-</p>
+<pre><tt><b><font color="#000000">execute</font></b>(<font color="#009900">Req</font>, <font color="#009900">Env</font>)
+ <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <font color="#009900">Req</font>, <font color="#009900">Env</font>}
+ | {<font color="#FF6600">suspend</font>, <b><font color="#000000">module</font></b>(), <b><font color="#000080">atom</font></b>(), [<b><font color="#000000">any</font></b>()]}
+ | {<font color="#FF6600">stop</font>, <font color="#009900">Req</font>}
+
+<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()
+<font color="#009900">Env</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_middleware:env</font></b>()</tt></pre>
+</div></div>
+<p>The <code>execute/2</code> is the only callback that needs to be implemented. It must execute the middleware and return with instructions for Cowboy.</p>
+<dl><dt>ok</dt>
+<dd><p>Cowboy should continue processing the request using the returned Req object and environment.</p>
</dd>
-<dt class="hdlist1">
-suspend
-</dt>
-<dd>
-<p>
-Cowboy will hibernate the process. When resuming, Cowboy
-will apply the returned module, function and arguments.
-</p>
+<dt>suspend</dt>
+<dd><p>Cowboy will hibernate the process. When resuming, Cowboy will apply the returned module, function and arguments.</p>
</dd>
-<dt class="hdlist1">
-stop
-</dt>
-<dd>
-<p>
-Cowboy will stop middleware execution. No other middleware
-will be executed. This effectively ends the processing of
-the request.
-</p>
+<dt>stop</dt>
+<dd><p>Cowboy will stop middleware execution. No other middleware will be executed. This effectively ends the processing of the request.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_types">Types</h2>
-<div class="sectionbody">
-<div class="sect2">
<h3 id="_env">env()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">env</span></span>() <span style="color: #990000">::</span> #{<span style="font-weight: bold"><span style="color: #000080">atom</span></span>() <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>Middleware environment.</p></div>
-<div class="paragraph"><p>A new environment is created for every request. The initial
-environment contained the user configured environment values
-(like <code>dispatch</code> for example) plus the <code>listener</code> value which
-contains the name of the listener for this connection.</p></div>
-<div class="paragraph"><p>Middlewares may modify the environment as necessary.</p></div>
-</div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">env</font></b>() <font color="#990000">::</font> #{<b><font color="#000080">atom</font></b>() <font color="#990000">=&gt;</font> <b><font color="#000000">any</font></b>()}</tt></pre>
+</div></div>
+<p>Middleware environment.</p>
+<p>A new environment is created for every request. The initial environment contained the user configured environment values (like <code>dispatch</code> for example) plus the <code>listener</code> value which contains the name of the listener for this connection.</p>
+<p>Middlewares may modify the environment as necessary.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: The <code>env</code> type is now a map instead of a proplist.
-</p>
+<ul><li><strong>2.0</strong>: The <code>env</code> type is now a map instead of a proplist.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Behavior introduced.
-</p>
+<li><strong>1.0</strong>: Behavior introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="..">cowboy(7)</a></p></div>
-</div>
-</div>
+<p><a href="..">cowboy(7)</a></p>
+
diff --git a/docs/en/cowboy/2.4/manual/cowboy_req.binding/index.html b/docs/en/cowboy/2.4/manual/cowboy_req.binding/index.html
index 46d46121..95666a38 100644
--- a/docs/en/cowboy/2.4/manual/cowboy_req.binding/index.html
+++ b/docs/en/cowboy/2.4/manual/cowboy_req.binding/index.html
@@ -62,116 +62,60 @@
<h1 class="lined-header"><span>cowboy_req:binding(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:binding - Access a value bound from the route</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:binding - Access a value bound from the route</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">binding</span></span>(<span style="color: #009900">Name</span>, <span style="color: #009900">Req</span>) <span style="color: #990000">-&gt;</span> <span style="font-weight: bold"><span style="color: #000000">binding</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">binding</span></span>(<span style="color: #009900">Name</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: #000000">any</span></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">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">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>Return the value for the given binding.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">binding</font></b>(<font color="#009900">Name</font>, <font color="#009900">Req</font>) <font color="#990000">-&gt;</font> <b><font color="#000000">binding</font></b>(<font color="#009900">Name</font>, <font color="#009900">Req</font>, <font color="#000080">undefined</font>)
+<b><font color="#000000">binding</font></b>(<font color="#009900">Name</font>, <font color="#009900">Req</font>, <font color="#009900">Default</font>) <font color="#990000">-&gt;</font> <b><font color="#000000">any</font></b>() | <font color="#009900">Default</font>
+
+<font color="#009900">Name</font> <font color="#990000">::</font> <b><font color="#000080">atom</font></b>()
+<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()</tt></pre>
+</div></div>
+<p>Return the value for the given binding.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Name
-</dt>
-<dd>
-<p>
-Desired binding name as an atom.
-</p>
+<dl><dt>Name</dt>
+<dd><p>Desired binding name as an atom.</p>
</dd>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-<dt class="hdlist1">
-Default
-</dt>
-<dd>
-<p>
-Default value returned when the binding is missing.
-</p>
+<dt>Default</dt>
+<dd><p>Default value returned when the binding is missing.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>By default the value is a case sensitive binary string, however
-constraints may change the type of this value (for example
-automatically converting numbers to integer).</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>By default the value is a case sensitive binary string, however constraints may change the type of this value (for example automatically converting numbers to integer).</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Only the value is returned, it is no longer wrapped in a tuple.
-</p>
+<ul><li><strong>2.0</strong>: Only the value is returned, it is no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Get the username from the path</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Get the username from the 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="font-style: italic"><span style="color: #9A1900">%% Route is "/users/:user"</span></span>
-<span style="color: #009900">Username</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:binding</span></span>(<span style="color: #FF6600">user</span>, <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Get the branch name, with a default</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><i><font color="#9A1900">%% Route is "/users/:user"</font></i>
+<font color="#009900">Username</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:binding</font></b>(<font color="#FF6600">user</font>, <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Get the branch name, with a default</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">%% Route is "/log[/:branch]"</span></span>
-<span style="color: #009900">Branch</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:binding</span></span>(<span style="color: #FF6600">branch</span>, <span style="color: #009900">Req</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"master"</span><span style="color: #990000">&gt;&gt;</span>)</tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><i><font color="#9A1900">%% Route is "/log[/:branch]"</font></i>
+<font color="#009900">Branch</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:binding</font></b>(<font color="#FF6600">branch</font>, <font color="#009900">Req</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"master"</font><font color="#990000">&gt;&gt;</font>)</tt></pre>
+</div></div>
<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.bindings">cowboy_req:bindings(3)</a>,
-<a href="../cowboy_req.host_info">cowboy_req:host_info(3)</a>,
-<a href="../cowboy_req.path_info">cowboy_req:path_info(3)</a>,
-<a href="../cowboy_router">cowboy_router(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.bindings">cowboy_req:bindings(3)</a>, <a href="../cowboy_req.host_info">cowboy_req:host_info(3)</a>, <a href="../cowboy_req.path_info">cowboy_req:path_info(3)</a>, <a href="../cowboy_router">cowboy_router(3)</a></p>
+
diff --git a/docs/en/cowboy/2.4/manual/cowboy_req.bindings/index.html b/docs/en/cowboy/2.4/manual/cowboy_req.bindings/index.html
index 12415270..aa61c3ac 100644
--- a/docs/en/cowboy/2.4/manual/cowboy_req.bindings/index.html
+++ b/docs/en/cowboy/2.4/manual/cowboy_req.bindings/index.html
@@ -62,86 +62,40 @@
<h1 class="lined-header"><span>cowboy_req:bindings(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:bindings - Access all values bound from the route</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:bindings - Access all values bound from the route</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">bindings</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_router:bindings</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Return a map containing all bindings.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">bindings</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <b><font color="#000000">cowboy_router:bindings</font></b>()</tt></pre>
+</div></div>
+<p>Return a map containing all bindings.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>By default values are case sensitive binary strings, however
-constraints may change the type of this value (for example
-automatically converting numbers to integer).</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>By default values are case sensitive binary strings, however constraints may change the type of this value (for example automatically converting numbers to integer).</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Only the values are returned, they are no longer wrapped in a tuple.
-</p>
+<ul><li><strong>2.0</strong>: Only the values are returned, they are no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Get all bindings</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Get all bindings</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">Bindings</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:bindings</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Bindings</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:bindings</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.host_info">cowboy_req:host_info(3)</a>,
-<a href="../cowboy_req.path_info">cowboy_req:path_info(3)</a>,
-<a href="../cowboy_router">cowboy_router(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.binding">cowboy_req:binding(3)</a>, <a href="../cowboy_req.host_info">cowboy_req:host_info(3)</a>, <a href="../cowboy_req.path_info">cowboy_req:path_info(3)</a>, <a href="../cowboy_router">cowboy_router(3)</a></p>
+
diff --git a/docs/en/cowboy/2.4/manual/cowboy_req.body_length/index.html b/docs/en/cowboy/2.4/manual/cowboy_req.body_length/index.html
index de5f9045..fe1fc5bc 100644
--- a/docs/en/cowboy/2.4/manual/cowboy_req.body_length/index.html
+++ b/docs/en/cowboy/2.4/manual/cowboy_req.body_length/index.html
@@ -62,89 +62,41 @@
<h1 class="lined-header"><span>cowboy_req:body_length(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:body_length - Body length</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:body_length - Body length</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">body_length</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: #000080">undefined</span> | <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Return the length of the request body.</p></div>
-<div class="paragraph"><p>The length is not always known before reading the body.
-In those cases Cowboy will return <code>undefined</code>. The body
-length is available after the body has been fully read.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">body_length</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <font color="#000080">undefined</font> | <b><font color="#000000">non_neg_integer</font></b>()</tt></pre>
+</div></div>
+<p>Return the length of the request body.</p>
+<p>The length is not always known before reading the body. In those cases Cowboy will return <code>undefined</code>. The body length is available after the body has been fully read.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The length of the request body, or <code>undefined</code> if it is
-not known.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The length of the request body, or <code>undefined</code> if it is not known.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Only the length is returned, it is no longer wrapped in a tuple.
-</p>
+<ul><li><strong>2.0</strong>: Only the length is returned, it is no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Get the body length</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Get the body length</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:body_length</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Length</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:body_length</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.has_body">cowboy_req:has_body(3)</a>,
-<a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a>,
-<a href="../cowboy_req.read_urlencoded_body">cowboy_req:read_urlencoded_body(3)</a>,
-<a href="../cowboy_req.read_part">cowboy_req:read_part(3)</a>,
-<a href="../cowboy_req.read_part_body">cowboy_req:read_part_body(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.has_body">cowboy_req:has_body(3)</a>, <a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a>, <a href="../cowboy_req.read_urlencoded_body">cowboy_req:read_urlencoded_body(3)</a>, <a href="../cowboy_req.read_part">cowboy_req:read_part(3)</a>, <a href="../cowboy_req.read_part_body">cowboy_req:read_part_body(3)</a></p>
+
diff --git a/docs/en/cowboy/2.4/manual/cowboy_req.cert/index.html b/docs/en/cowboy/2.4/manual/cowboy_req.cert/index.html
index 5035f160..3222b2f3 100644
--- a/docs/en/cowboy/2.4/manual/cowboy_req.cert/index.html
+++ b/docs/en/cowboy/2.4/manual/cowboy_req.cert/index.html
@@ -62,104 +62,60 @@
<h1 class="lined-header"><span>cowboy_req:cert(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:cert - Client TLS certificate</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:cert - Client TLS certificate</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">cert</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: #000080">binary</span></span>() | <span style="color: #000080">undefined</span></tt></pre></div></div>
-<div class="paragraph"><p>Return the peer&#8217;s TLS certificate.</p></div>
-<div class="paragraph"><p>Using the default configuration this function will always return
-<code>undefined</code>. You need to explicitly configure Cowboy to request
-the client certificate. To do this you need to set the <code>verify</code>
-transport option to <code>verify_peer</code>:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">cert</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <b><font color="#000080">binary</font></b>() | <font color="#000080">undefined</font></tt></pre>
+</div></div>
+<p>Return the peer&apos;s TLS certificate.</p>
+<p>Using the default configuration this function will always return <code>undefined</code>. You need to explicitly configure Cowboy to request the client certificate. To do this you need to set the <code>verify</code> transport option to <code>verify_peer</code>:</p>
+<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">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:start_tls</span></span>(<span style="color: #FF6600">example</span>, [
- {<span style="color: #FF6600">port</span>, <span style="color: #993399">8443</span>},
- {<span style="color: #FF6600">cert</span>, <span style="color: #FF0000">"path/to/cert.pem"</span>},
- {<span style="color: #FF6600">verify</span>, <span style="color: #FF6600">verify_peer</span>}
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy:start_tls</font></b>(<font color="#FF6600">example</font>, [
+ {<font color="#FF6600">port</font>, <font color="#993399">8443</font>},
+ {<font color="#FF6600">cert</font>, <font color="#FF0000">"path/to/cert.pem"</font>},
+ {<font color="#FF6600">verify</font>, <font color="#FF6600">verify_peer</font>}
], #{
- <span style="color: #0000FF">env</span> <span style="color: #990000">=&gt;</span> #{<span style="color: #0000FF">dispatch</span> <span style="color: #990000">=&gt;</span> <span style="color: #009900">Dispatch</span>}
-})<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>You may also want to customize the <code>verify_fun</code> function. Please
-consult the <code>ssl</code> application&#8217;s manual for more details.</p></div>
-<div class="paragraph"><p>TCP connections do not allow a certificate and this function
-will therefore always return <code>undefined</code>.</p></div>
-<div class="paragraph"><p>The certificate can also be obtained using pattern matching:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+ <font color="#0000FF">env</font> <font color="#990000">=&gt;</font> #{<font color="#0000FF">dispatch</font> <font color="#990000">=&gt;</font> <font color="#009900">Dispatch</font>}
+})<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>You may also want to customize the <code>verify_fun</code> function. Please consult the <code>ssl</code> application&apos;s manual for more details.</p>
+<p>TCP connections do not allow a certificate and this function will therefore always return <code>undefined</code>.</p>
+<p>The certificate can also be obtained using pattern matching:</p>
+<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">cert</span> <span style="color: #990000">:=</span> <span style="color: #009900">Cert</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">
+<pre><tt>#{<font color="#FF6600">cert</font> <font color="#990000">:=</font> <font color="#009900">Cert</font>} <font color="#990000">=</font> <font color="#009900">Req</font><font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The client TLS certificate.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The client TLS certificate.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.1</strong>: Function introduced.
-</p>
+<ul><li><strong>2.1</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Get the client TLS certificate.</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Get the client TLS certificate.</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">Cert</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:cert</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Cert</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:cert</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.peer">cowboy_req:peer(3)</a>,
-<a href="../cowboy_req.sock">cowboy_req:sock(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.peer">cowboy_req:peer(3)</a>, <a href="../cowboy_req.sock">cowboy_req:sock(3)</a></p>
+
diff --git a/docs/en/cowboy/2.4/manual/cowboy_req.delete_resp_header/index.html b/docs/en/cowboy/2.4/manual/cowboy_req.delete_resp_header/index.html
index 073d8fb9..8dfbb72d 100644
--- a/docs/en/cowboy/2.4/manual/cowboy_req.delete_resp_header/index.html
+++ b/docs/en/cowboy/2.4/manual/cowboy_req.delete_resp_header/index.html
@@ -62,95 +62,45 @@
<h1 class="lined-header"><span>cowboy_req:delete_resp_header(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:delete_resp_header - Delete a response header</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:delete_resp_header - Delete a response header</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">delete_resp_header</span></span>(<span style="color: #009900">Name</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">Req</span>
+<pre><tt><b><font color="#000000">delete_resp_header</font></b>(<font color="#009900">Name</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <font color="#009900">Req</font>
-<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="font-style: italic"><span style="color: #9A1900">%% lowercase; case insensitive</span></span></tt></pre></div></div>
-<div class="paragraph"><p>Delete the given response 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>
-</div>
-<div class="sect1">
+<font color="#009900">Name</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% lowercase; case insensitive</font></i></tt></pre>
+</div></div>
+<p>Delete the given response header.</p>
+<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>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Name
-</dt>
-<dd>
-<p>
-Header name as a lowercase binary string.
-</p>
+<dl><dt>Name</dt>
+<dd><p>Header name as a lowercase binary string.</p>
</dd>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A new Req object is returned.</p></div>
-<div class="paragraph"><p>The returned Req object must be used from that point onward,
-otherwise the header will still be sent in the response.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>A new Req object is returned.</p>
+<p>The returned Req object must be used from that point onward, otherwise the header will still be sent in the response.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<ul><li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Remove the content-type header from the response</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Remove the content-type header from the response</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: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:delete_resp_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req0</span>),</tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:delete_resp_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req0</font>),</tt></pre>
+</div></div>
<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.set_resp_header">cowboy_req:set_resp_header(3)</a>,
-<a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a>,
-<a href="../cowboy_req.has_resp_header">cowboy_req:has_resp_header(3)</a>,
-<a href="../cowboy_req.resp_header">cowboy_req:resp_header(3)</a>,
-<a href="../cowboy_req.resp_headers">cowboy_req:resp_headers(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a>, <a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a>, <a href="../cowboy_req.has_resp_header">cowboy_req:has_resp_header(3)</a>, <a href="../cowboy_req.resp_header">cowboy_req:resp_header(3)</a>, <a href="../cowboy_req.resp_headers">cowboy_req:resp_headers(3)</a></p>
+
diff --git a/docs/en/cowboy/2.4/manual/cowboy_req.has_body/index.html b/docs/en/cowboy/2.4/manual/cowboy_req.has_body/index.html
index c093e60d..591691aa 100644
--- a/docs/en/cowboy/2.4/manual/cowboy_req.has_body/index.html
+++ b/docs/en/cowboy/2.4/manual/cowboy_req.has_body/index.html
@@ -62,80 +62,38 @@
<h1 class="lined-header"><span>cowboy_req:has_body(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:has_body - Is there a request body?</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:has_body - Is there a request body?</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">has_body</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">boolean</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Return whether the request has a body.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">has_body</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <b><font color="#000000">boolean</font></b>()</tt></pre>
+</div></div>
+<p>Return whether the request has a body.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A boolean indicating whether the request has a body.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>A boolean indicating whether the request has a body.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<ul><li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Ensure the request has a body</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Ensure the request has a body</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: #000080">true</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:has_body</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#000080">true</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:has_body</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.body_length">cowboy_req:body_length(3)</a>,
-<a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a>,
-<a href="../cowboy_req.read_urlencoded_body">cowboy_req:read_urlencoded_body(3)</a>,
-<a href="../cowboy_req.read_part">cowboy_req:read_part(3)</a>,
-<a href="../cowboy_req.read_part_body">cowboy_req:read_part_body(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.body_length">cowboy_req:body_length(3)</a>, <a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a>, <a href="../cowboy_req.read_urlencoded_body">cowboy_req:read_urlencoded_body(3)</a>, <a href="../cowboy_req.read_part">cowboy_req:read_part(3)</a>, <a href="../cowboy_req.read_part_body">cowboy_req:read_part_body(3)</a></p>
+
diff --git a/docs/en/cowboy/2.4/manual/cowboy_req.has_resp_body/index.html b/docs/en/cowboy/2.4/manual/cowboy_req.has_resp_body/index.html
index e99ff1b7..34624718 100644
--- a/docs/en/cowboy/2.4/manual/cowboy_req.has_resp_body/index.html
+++ b/docs/en/cowboy/2.4/manual/cowboy_req.has_resp_body/index.html
@@ -62,82 +62,43 @@
<h1 class="lined-header"><span>cowboy_req:has_resp_body(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:has_resp_body - Is there a response body?</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:has_resp_body - Is there a response body?</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">has_resp_body</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">boolean</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Return whether a response body has been set.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">has_resp_body</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <b><font color="#000000">boolean</font></b>()</tt></pre>
+</div></div>
+<p>Return whether a response body has been set.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A boolean indicating whether a response body has been set.</p></div>
-<div class="paragraph"><p>This function will return <code>false</code> when an empty response
-body has been set.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>A boolean indicating whether a response body has been set.</p>
+<p>This function will return <code>false</code> when an empty response body has been set.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<ul><li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Check whether a body has been set</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Check whether a body has been set</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: #000080">false</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:has_resp_body</span></span>(<span style="color: #009900">Req0</span>),
-<span style="color: #009900">Req1</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_body</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Hello!"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req0</span>),
-<span style="color: #000080">true</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:has_resp_body</span></span>(<span style="color: #009900">Req1</span>),
-<span style="color: #009900">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_body</span></span>(<span style="color: #990000">&lt;&lt;&gt;&gt;</span>, <span style="color: #009900">Req1</span>),
-<span style="color: #000080">false</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:has_resp_body</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#000080">false</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:has_resp_body</font></b>(<font color="#009900">Req0</font>),
+<font color="#009900">Req1</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_body</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"Hello!"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req0</font>),
+<font color="#000080">true</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:has_resp_body</font></b>(<font color="#009900">Req1</font>),
+<font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_body</font></b>(<font color="#990000">&lt;&lt;&gt;&gt;</font>, <font color="#009900">Req1</font>),
+<font color="#000080">false</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:has_resp_body</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.set_resp_body">cowboy_req:set_resp_body(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.set_resp_body">cowboy_req:set_resp_body(3)</a></p>
+
diff --git a/docs/en/cowboy/2.4/manual/cowboy_req.has_resp_header/index.html b/docs/en/cowboy/2.4/manual/cowboy_req.has_resp_header/index.html
index 21eca0bc..2d613eca 100644
--- a/docs/en/cowboy/2.4/manual/cowboy_req.has_resp_header/index.html
+++ b/docs/en/cowboy/2.4/manual/cowboy_req.has_resp_header/index.html
@@ -62,95 +62,46 @@
<h1 class="lined-header"><span>cowboy_req:has_resp_header(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:has_resp_header - Is the given response header set?</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:has_resp_header - Is the given response header set?</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">has_resp_header</span></span>(<span style="color: #009900">Name</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">boolean</span></span>()
+<pre><tt><b><font color="#000000">has_resp_header</font></b>(<font color="#009900">Name</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <b><font color="#000000">boolean</font></b>()
-<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="font-style: italic"><span style="color: #9A1900">%% lowercase; case insensitive</span></span></tt></pre></div></div>
-<div class="paragraph"><p>Return whether the given response header has been set.</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>
-</div>
-<div class="sect1">
+<font color="#009900">Name</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% lowercase; case insensitive</font></i></tt></pre>
+</div></div>
+<p>Return whether the given response header has been set.</p>
+<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>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Name
-</dt>
-<dd>
-<p>
-Header name as a lowercase binary string.
-</p>
+<dl><dt>Name</dt>
+<dd><p>Header name as a lowercase binary string.</p>
</dd>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A boolean indicating whether the given response header has been set.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>A boolean indicating whether the given response header has been set.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<ul><li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Check whether the content-type header has been set</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Check whether the content-type header has been set</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: #000080">false</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:has_resp_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req0</span>),
-<span style="color: #009900">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/html"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req0</span>),
-<span style="color: #000080">true</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:has_resp_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#000080">false</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:has_resp_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req0</font>),
+<font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/html"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req0</font>),
+<font color="#000080">true</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:has_resp_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.set_resp_header">cowboy_req:set_resp_header(3)</a>,
-<a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a>,
-<a href="../cowboy_req.resp_header">cowboy_req:resp_header(3)</a>,
-<a href="../cowboy_req.resp_headers">cowboy_req:resp_headers(3)</a>,
-<a href="../cowboy_req.delete_resp_header">cowboy_req:delete_resp_header(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a>, <a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a>, <a href="../cowboy_req.resp_header">cowboy_req:resp_header(3)</a>, <a href="../cowboy_req.resp_headers">cowboy_req:resp_headers(3)</a>, <a href="../cowboy_req.delete_resp_header">cowboy_req:delete_resp_header(3)</a></p>
+
diff --git a/docs/en/cowboy/2.4/manual/cowboy_req.header/index.html b/docs/en/cowboy/2.4/manual/cowboy_req.header/index.html
index ed2978a7..487a76da 100644
--- a/docs/en/cowboy/2.4/manual/cowboy_req.header/index.html
+++ b/docs/en/cowboy/2.4/manual/cowboy_req.header/index.html
@@ -62,122 +62,67 @@
<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">
+<p>cowboy_req:header - HTTP header</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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: #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: #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">Name</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: #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">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>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
+<pre><tt><b><font color="#000000">header</font></b>(<font color="#009900">Name</font>, <font color="#009900">Req</font>) <font color="#990000">-&gt;</font> <b><font color="#000000">header</font></b>(<font color="#009900">Name</font>, <font color="#009900">Req</font>, <font color="#000080">undefined</font>)
+<b><font color="#000000">header</font></b>(<font color="#009900">Name</font>, <font color="#009900">Req</font>, <font color="#009900">Default</font>) <font color="#990000">-&gt;</font> <b><font color="#000080">binary</font></b>() | <font color="#009900">Default</font>
+
+<font color="#009900">Name</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% lowercase; case insensitive</font></i>
+<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()</tt></pre>
+</div></div>
+<p>Return the value for the given HTTP header.</p>
+<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>
+<p>Headers can also be obtained using pattern matching:</p>
+<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">
+<pre><tt>#{<font color="#FF6600">headers</font> <font color="#990000">:=</font> #{<font color="#009900">Name</font> <font color="#990000">:=</font> <font color="#009900">Value</font>}} <font color="#990000">=</font> <font color="#009900">Req</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Note that this snippet will crash if the header is missing.</p>
<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 lowercase binary string.
-</p>
+<dl><dt>Name</dt>
+<dd><p>Desired HTTP header name as a lowercase binary string.</p>
</dd>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dt>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>
+<dt>Default</dt>
+<dd><p>Default value returned when the header is missing.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<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">
+<p>The header value is returned as a binary string. When the header is missing, the default argument is returned.</p>
<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>
+<ul><li><strong>2.0</strong>: Only the header value is returned, it is no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<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
+<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
+<pre><tt><font color="#009900">Accept</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"accept"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>)<font color="#990000">.</font></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">
+<pre><tt><font color="#009900">Length</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-length"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"0"</font><font color="#990000">&gt;&gt;</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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>
+<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>
+
diff --git a/docs/en/cowboy/2.4/manual/cowboy_req.headers/index.html b/docs/en/cowboy/2.4/manual/cowboy_req.headers/index.html
index 420c594e..514d9f2a 100644
--- a/docs/en/cowboy/2.4/manual/cowboy_req.headers/index.html
+++ b/docs/en/cowboy/2.4/manual/cowboy_req.headers/index.html
@@ -62,90 +62,47 @@
<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">
+<p>cowboy_req:headers - HTTP headers</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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
+<pre><tt><b><font color="#000000">headers</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <b><font color="#000000">cowboy:http_headers</font></b>()</tt></pre>
+</div></div>
+<p>Return all request headers.</p>
+<p>Request headers can also be obtained using pattern matching:</p>
+<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">
+<pre><tt>#{<font color="#FF6600">headers</font> <font color="#990000">:=</font> <font color="#009900">Headers</font>} <font color="#990000">=</font> <font color="#009900">Req</font><font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<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">
+<p>Headers are returned as a map with keys being lowercase binary strings, and values as binary strings.</p>
<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>
+<ul><li><strong>2.0</strong>: Only the headers are returned, they are no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<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
+<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">
+<pre><tt><font color="#009900">Headers</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:headers</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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>
+<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>
+
diff --git a/docs/en/cowboy/2.4/manual/cowboy_req.host/index.html b/docs/en/cowboy/2.4/manual/cowboy_req.host/index.html
index f04f7c16..a8e0e313 100644
--- a/docs/en/cowboy/2.4/manual/cowboy_req.host/index.html
+++ b/docs/en/cowboy/2.4/manual/cowboy_req.host/index.html
@@ -62,91 +62,47 @@
<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">
+<p>cowboy_req:host - URI host name</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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
+<pre><tt><b><font color="#000000">host</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <font color="#009900">Host</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()</tt></pre>
+</div></div>
+<p>Return the host name of the effective request URI.</p>
+<p>The host name can also be obtained using pattern matching:</p>
+<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">
+<pre><tt>#{<font color="#FF6600">host</font> <font color="#990000">:=</font> <font color="#009900">Host</font>} <font color="#990000">=</font> <font color="#009900">Req</font><font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<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">
+<p>The host name is returned as a lowercase binary string. It is case insensitive.</p>
<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>
+<ul><li><strong>2.0</strong>: Only the host name is returned, it is no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<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
+<div class="listingblock"><div class="title">Get the effective request URI&apos;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">
+<pre><tt><font color="#009900">Host</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:host</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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>
+<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>
+
diff --git a/docs/en/cowboy/2.4/manual/cowboy_req.host_info/index.html b/docs/en/cowboy/2.4/manual/cowboy_req.host_info/index.html
index 16947144..bff72d35 100644
--- a/docs/en/cowboy/2.4/manual/cowboy_req.host_info/index.html
+++ b/docs/en/cowboy/2.4/manual/cowboy_req.host_info/index.html
@@ -62,87 +62,41 @@
<h1 class="lined-header"><span>cowboy_req:host_info(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:host_info - Access the route&#8217;s heading host segments</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:host_info - Access the route&apos;s heading host segments</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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_info</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_router:tokens</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Return the tokens for the heading host segments.</p></div>
-<div class="paragraph"><p>This is the part of the host name that was matched using
-the <code>...</code> notation.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">host_info</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <b><font color="#000000">cowboy_router:tokens</font></b>()</tt></pre>
+</div></div>
+<p>Return the tokens for the heading host segments.</p>
+<p>This is the part of the host name that was matched using the <code>...</code> notation.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The tokens are returned as a list of case insensitive
-binary strings.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The tokens are returned as a list of case insensitive binary strings.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Only the tokens are returned, they are no longer wrapped in a tuple.
-</p>
+<ul><li><strong>2.0</strong>: Only the tokens are returned, they are no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Get the host_info tokens</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Get the host_info tokens</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">HostInfo</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:host_info</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">HostInfo</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:host_info</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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>,
-<a href="../cowboy_router">cowboy_router(3)</a></p></div>
-</div>
-</div>
+<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>, <a href="../cowboy_router">cowboy_router(3)</a></p>
+
diff --git a/docs/en/cowboy/2.4/manual/cowboy_req.inform/index.html b/docs/en/cowboy/2.4/manual/cowboy_req.inform/index.html
index b017d12d..b3c27fe1 100644
--- a/docs/en/cowboy/2.4/manual/cowboy_req.inform/index.html
+++ b/docs/en/cowboy/2.4/manual/cowboy_req.inform/index.html
@@ -62,125 +62,66 @@
<h1 class="lined-header"><span>cowboy_req:inform(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:inform - Send an informational response</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:inform - Send an informational response</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">inform</span></span>(<span style="color: #009900">Status</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">inform</span></span>(<span style="color: #009900">StatusCode</span>, #{}, <span style="color: #009900">Req</span>)
-
-<span style="font-weight: bold"><span style="color: #000000">inform</span></span>(<span style="color: #009900">Status</span>, <span style="color: #009900">Headers</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: #FF6600">ok</span>
-
-<span style="color: #009900">Status</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:http_status</span></span>()
-<span style="color: #009900">Headers</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:http_headers</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Send an informational response.</p></div>
-<div class="paragraph"><p>Informational responses use a status code between 100 and 199.
-They cannot include a body. This function will not use any
-of the previously set headers. All headers to be sent must
-be given directly.</p></div>
-<div class="paragraph"><p>Any number of informational responses can be sent as long as
-they are sent before the proper response. Attempting to use
-this function after sending a normal response will result
-in an error.</p></div>
-<div class="paragraph"><p>The header names must be given as lowercase binary strings.
-While header names are case insensitive, Cowboy requires them
-to be given as lowercase to function properly.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">inform</font></b>(<font color="#009900">Status</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> <b><font color="#000000">inform</font></b>(<font color="#009900">StatusCode</font>, #{}, <font color="#009900">Req</font>)
+
+<b><font color="#000000">inform</font></b>(<font color="#009900">Status</font>, <font color="#009900">Headers</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> <font color="#FF6600">ok</font>
+
+<font color="#009900">Status</font> <font color="#990000">::</font> <b><font color="#000000">cowboy:http_status</font></b>()
+<font color="#009900">Headers</font> <font color="#990000">::</font> <b><font color="#000000">cowboy:http_headers</font></b>()</tt></pre>
+</div></div>
+<p>Send an informational response.</p>
+<p>Informational responses use a status code between 100 and 199. They cannot include a body. This function will not use any of the previously set headers. All headers to be sent must be given directly.</p>
+<p>Any number of informational responses can be sent as long as they are sent before the proper response. Attempting to use this function after sending a normal response will result in an error.</p>
+<p>The header names must be given as lowercase binary strings. While header names are case insensitive, Cowboy requires them to be given as lowercase to function properly.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Status
-</dt>
-<dd>
-<p>
-The status code for the response.
-</p>
+<dl><dt>Status</dt>
+<dd><p>The status code for the response.</p>
</dd>
-<dt class="hdlist1">
-Headers
-</dt>
-<dd>
-<p>
-The response headers.
-</p>
+<dt>Headers</dt>
+<dd><p>The response headers.</p>
</dd>
-</dl></div>
-<div class="paragraph"><p>Header names must be given as lowercase binary strings.</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+</dl>
+<p>Header names must be given as lowercase binary strings.</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The atom <code>ok</code> is always returned. It can be safely ignored.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The atom <code>ok</code> is always returned. It can be safely ignored.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.1</strong>: Function introduced.
-</p>
+<ul><li><strong>2.1</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Send an informational response</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Send an informational response</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: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:inform</span></span>(<span style="color: #993399">102</span>, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Send an informational response with headers</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:inform</font></b>(<font color="#993399">102</font>, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Send an informational response with 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">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:inform</span></span>(<span style="color: #993399">103</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"link"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"&lt;/style.css&gt;; rel=preload; as=style"</span><span style="color: #990000">&gt;&gt;</span>,
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"link"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"&lt;/script.js&gt;; rel=preload; as=script"</span><span style="color: #990000">&gt;&gt;</span>
-}, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:inform</font></b>(<font color="#993399">103</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"link"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"&lt;/style.css&gt;; rel=preload; as=style"</font><font color="#990000">&gt;&gt;</font>,
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"link"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"&lt;/script.js&gt;; rel=preload; as=script"</font><font color="#990000">&gt;&gt;</font>
+}, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.reply">cowboy_req:reply(3)</a>,
-<a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a>,
-<a href="../cowboy_req.push">cowboy_req:push(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.reply">cowboy_req:reply(3)</a>, <a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a>, <a href="../cowboy_req.push">cowboy_req:push(3)</a></p>
+
diff --git a/docs/en/cowboy/2.4/manual/cowboy_req.match_cookies/index.html b/docs/en/cowboy/2.4/manual/cowboy_req.match_cookies/index.html
index b5ebef85..9b524b1c 100644
--- a/docs/en/cowboy/2.4/manual/cowboy_req.match_cookies/index.html
+++ b/docs/en/cowboy/2.4/manual/cowboy_req.match_cookies/index.html
@@ -62,123 +62,67 @@
<h1 class="lined-header"><span>cowboy_req:match_cookies(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:match_cookies - Match cookies against constraints</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:match_cookies - Match cookies against constraints</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">match_cookies</span></span>(<span style="color: #009900">Fields</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:fields</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: #000080">atom</span></span>() <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>Parse the cookies and match specific values against
-constraints.</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>
-<div class="sect1">
+<pre><tt><b><font color="#000000">match_cookies</font></b>(<font color="#009900">Fields</font> <font color="#990000">::</font> <b><font color="#000000">cowboy:fields</font></b>(), <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> #{<b><font color="#000080">atom</font></b>() <font color="#990000">=&gt;</font> <b><font color="#000000">any</font></b>()}</tt></pre>
+</div></div>
+<p>Parse the cookies and match specific values against constraints.</p>
+<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>
+<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>
+<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>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Fields
-</dt>
-<dd>
-<p>
-Cookies to retrieve.
-</p>
-<div class="paragraph"><p>See <a href="../cowboy">cowboy(3)</a> for a complete description.</p></div>
+<dl><dt>Fields</dt>
+<dd><p>Cookies to retrieve.</p>
+<p>See <a href="../cowboy">cowboy(3)</a> for a complete description.</p>
</dd>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Desired values are returned as a map. The key is the atom
-that was given in the list of fields, and the value is the
-optionally converted value after applying constraints.</p></div>
-<div class="paragraph"><p>The map contains the same keys that were given in the fields.</p></div>
-<div class="paragraph"><p>An exception is triggered when the match fails.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Desired values are returned as a map. The key is the atom that was given in the list of fields, and the value is the optionally converted value after applying constraints.</p>
+<p>The map contains the same keys that were given in the fields.</p>
+<p>An exception is triggered when the match fails.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced.
-</p>
+<ul><li><strong>2.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Match fields</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Match fields</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">%% ID and Lang are binaries.</span></span>
-#{<span style="color: #FF6600">id</span> <span style="color: #990000">:=</span> <span style="color: #009900">ID</span>, <span style="color: #FF6600">lang</span> <span style="color: #990000">:=</span> <span style="color: #009900">Lang</span>}
- <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:match_cookies</span></span>([<span style="color: #FF6600">id</span>, <span style="color: #FF6600">lang</span>], <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Match fields and apply constraints</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><i><font color="#9A1900">%% ID and Lang are binaries.</font></i>
+#{<font color="#FF6600">id</font> <font color="#990000">:=</font> <font color="#009900">ID</font>, <font color="#FF6600">lang</font> <font color="#990000">:=</font> <font color="#009900">Lang</font>}
+ <font color="#990000">=</font> <b><font color="#000000">cowboy_req:match_cookies</font></b>([<font color="#FF6600">id</font>, <font color="#FF6600">lang</font>], <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Match fields and apply constraints</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">%% ID is an integer and Lang a non-empty binary.</span></span>
-#{<span style="color: #FF6600">id</span> <span style="color: #990000">:=</span> <span style="color: #009900">ID</span>, <span style="color: #FF6600">lang</span> <span style="color: #990000">:=</span> <span style="color: #009900">Lang</span>}
- <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:match_cookies</span></span>([{<span style="color: #FF6600">id</span>, <span style="color: #FF6600">int</span>}, {<span style="color: #FF6600">lang</span>, <span style="color: #FF6600">nonempty</span>}], <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Match fields with default values</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><i><font color="#9A1900">%% ID is an integer and Lang a non-empty binary.</font></i>
+#{<font color="#FF6600">id</font> <font color="#990000">:=</font> <font color="#009900">ID</font>, <font color="#FF6600">lang</font> <font color="#990000">:=</font> <font color="#009900">Lang</font>}
+ <font color="#990000">=</font> <b><font color="#000000">cowboy_req:match_cookies</font></b>([{<font color="#FF6600">id</font>, <font color="#FF6600">int</font>}, {<font color="#FF6600">lang</font>, <font color="#FF6600">nonempty</font>}], <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Match fields with default values</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: #FF6600">lang</span> <span style="color: #990000">:=</span> <span style="color: #009900">Lang</span>}
- <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:match_cookies</span></span>([{<span style="color: #FF6600">lang</span>, [], <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"en-US"</span><span style="color: #990000">&gt;&gt;</span>}], <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>#{<font color="#FF6600">lang</font> <font color="#990000">:=</font> <font color="#009900">Lang</font>}
+ <font color="#990000">=</font> <b><font color="#000000">cowboy_req:match_cookies</font></b>([{<font color="#FF6600">lang</font>, [], <font color="#990000">&lt;&lt;</font><font color="#FF0000">"en-US"</font><font color="#990000">&gt;&gt;</font>}], <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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_cookies">cowboy_req:parse_cookies(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.parse_cookies">cowboy_req:parse_cookies(3)</a></p>
+
diff --git a/docs/en/cowboy/2.4/manual/cowboy_req.match_qs/index.html b/docs/en/cowboy/2.4/manual/cowboy_req.match_qs/index.html
index 634b6723..b46745c6 100644
--- a/docs/en/cowboy/2.4/manual/cowboy_req.match_qs/index.html
+++ b/docs/en/cowboy/2.4/manual/cowboy_req.match_qs/index.html
@@ -62,123 +62,67 @@
<h1 class="lined-header"><span>cowboy_req:match_qs(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:match_qs - Match the query string against constraints</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:match_qs - Match the query string against constraints</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">match_qs</span></span>(<span style="color: #009900">Fields</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:fields</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: #000080">atom</span></span>() <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>Parse the query string and match specific values against
-constraints.</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>
-<div class="sect1">
+<pre><tt><b><font color="#000000">match_qs</font></b>(<font color="#009900">Fields</font> <font color="#990000">::</font> <b><font color="#000000">cowboy:fields</font></b>(), <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> #{<b><font color="#000080">atom</font></b>() <font color="#990000">=&gt;</font> <b><font color="#000000">any</font></b>()}</tt></pre>
+</div></div>
+<p>Parse the query string and match specific values against constraints.</p>
+<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>
+<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>
+<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>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Fields
-</dt>
-<dd>
-<p>
-Fields to retrieve from the query string.
-</p>
-<div class="paragraph"><p>See <a href="../cowboy">cowboy(3)</a> for a complete description.</p></div>
+<dl><dt>Fields</dt>
+<dd><p>Fields to retrieve from the query string.</p>
+<p>See <a href="../cowboy">cowboy(3)</a> for a complete description.</p>
</dd>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Desired values are returned as a map. The key is the atom
-that was given in the list of fields, and the value is the
-optionally converted value after applying constraints.</p></div>
-<div class="paragraph"><p>The map contains the same keys that were given in the fields.</p></div>
-<div class="paragraph"><p>An exception is triggered when the match fails.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Desired values are returned as a map. The key is the atom that was given in the list of fields, and the value is the optionally converted value after applying constraints.</p>
+<p>The map contains the same keys that were given in the fields.</p>
+<p>An exception is triggered when the match fails.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced.
-</p>
+<ul><li><strong>2.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Match fields</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Match fields</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">%% ID and Lang are binaries.</span></span>
-#{<span style="color: #FF6600">id</span> <span style="color: #990000">:=</span> <span style="color: #009900">ID</span>, <span style="color: #FF6600">lang</span> <span style="color: #990000">:=</span> <span style="color: #009900">Lang</span>}
- <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:match_qs</span></span>([<span style="color: #FF6600">id</span>, <span style="color: #FF6600">lang</span>], <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Match fields and apply constraints</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><i><font color="#9A1900">%% ID and Lang are binaries.</font></i>
+#{<font color="#FF6600">id</font> <font color="#990000">:=</font> <font color="#009900">ID</font>, <font color="#FF6600">lang</font> <font color="#990000">:=</font> <font color="#009900">Lang</font>}
+ <font color="#990000">=</font> <b><font color="#000000">cowboy_req:match_qs</font></b>([<font color="#FF6600">id</font>, <font color="#FF6600">lang</font>], <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Match fields and apply constraints</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">%% ID is an integer and Lang a non-empty binary.</span></span>
-#{<span style="color: #FF6600">id</span> <span style="color: #990000">:=</span> <span style="color: #009900">ID</span>, <span style="color: #FF6600">lang</span> <span style="color: #990000">:=</span> <span style="color: #009900">Lang</span>}
- <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:match_qs</span></span>([{<span style="color: #FF6600">id</span>, <span style="color: #FF6600">int</span>}, {<span style="color: #FF6600">lang</span>, <span style="color: #FF6600">nonempty</span>}], <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Match fields with default values</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><i><font color="#9A1900">%% ID is an integer and Lang a non-empty binary.</font></i>
+#{<font color="#FF6600">id</font> <font color="#990000">:=</font> <font color="#009900">ID</font>, <font color="#FF6600">lang</font> <font color="#990000">:=</font> <font color="#009900">Lang</font>}
+ <font color="#990000">=</font> <b><font color="#000000">cowboy_req:match_qs</font></b>([{<font color="#FF6600">id</font>, <font color="#FF6600">int</font>}, {<font color="#FF6600">lang</font>, <font color="#FF6600">nonempty</font>}], <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Match fields with default values</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: #FF6600">lang</span> <span style="color: #990000">:=</span> <span style="color: #009900">Lang</span>}
- <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:match_qs</span></span>([{<span style="color: #FF6600">lang</span>, [], <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"en-US"</span><span style="color: #990000">&gt;&gt;</span>}], <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>#{<font color="#FF6600">lang</font> <font color="#990000">:=</font> <font color="#009900">Lang</font>}
+ <font color="#990000">=</font> <b><font color="#000000">cowboy_req:match_qs</font></b>([{<font color="#FF6600">lang</font>, [], <font color="#990000">&lt;&lt;</font><font color="#FF0000">"en-US"</font><font color="#990000">&gt;&gt;</font>}], <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.qs">cowboy_req:qs(3)</a>,
-<a href="../cowboy_req.parse_qs">cowboy_req:parse_qs(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.qs">cowboy_req:qs(3)</a>, <a href="../cowboy_req.parse_qs">cowboy_req:parse_qs(3)</a></p>
+
diff --git a/docs/en/cowboy/2.4/manual/cowboy_req.method/index.html b/docs/en/cowboy/2.4/manual/cowboy_req.method/index.html
index 5619ed1f..facfa943 100644
--- a/docs/en/cowboy/2.4/manual/cowboy_req.method/index.html
+++ b/docs/en/cowboy/2.4/manual/cowboy_req.method/index.html
@@ -62,100 +62,58 @@
<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">
+<p>cowboy_req:method - HTTP method</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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
+<pre><tt><b><font color="#000000">method</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <font color="#009900">Method</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()</tt></pre>
+</div></div>
+<p>Return the request&apos;s HTTP method.</p>
+<p>The method can also be obtained using pattern matching:</p>
+<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">
+<pre><tt>#{<font color="#FF6600">method</font> <font color="#990000">:=</font> <font color="#009900">Method</font>} <font color="#990000">=</font> <font color="#009900">Req</font><font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<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">
+<p>The request&apos;s HTTP method is returned as a binary string. While methods are case sensitive, standard methods are always uppercase.</p>
<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>
+<ul><li><strong>2.0</strong>: Only the method is returned, it is no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<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
+<div class="listingblock"><div class="title">Ensure the request&apos;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
+<pre><tt><font color="#990000">&lt;&lt;</font><font color="#FF0000">"GET"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:method</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></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">
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">case</font></b> <b><font color="#000000">lists:member</font></b>(<b><font color="#000000">cowboy_req:method</font></b>(<font color="#009900">Req</font>), [<font color="#990000">&lt;&lt;</font><font color="#FF0000">"GET"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"POST"</font><font color="#990000">&gt;&gt;</font>]) <b><font color="#0000FF">of</font></b>
+ <font color="#000080">true</font> <font color="#990000">-&gt;</font> <b><font color="#000000">handle</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>);
+ <font color="#000080">false</font> <font color="#990000">-&gt;</font> <b><font color="#000000">method_not_allowed</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>)
+ <b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
<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>
+<p><a href="../cowboy_req">cowboy_req(3)</a></p>
+
diff --git a/docs/en/cowboy/2.4/manual/cowboy_req.parse_cookies/index.html b/docs/en/cowboy/2.4/manual/cowboy_req.parse_cookies/index.html
index 932f72a3..d8188db0 100644
--- a/docs/en/cowboy/2.4/manual/cowboy_req.parse_cookies/index.html
+++ b/docs/en/cowboy/2.4/manual/cowboy_req.parse_cookies/index.html
@@ -62,91 +62,47 @@
<h1 class="lined-header"><span>cowboy_req:parse_cookies(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:parse_cookies - Parse cookie headers</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:parse_cookies - Parse cookie headers</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">parse_cookies</span></span>(<span style="color: #009900">Req</span>) <span style="color: #990000">-&gt;</span> [{<span style="color: #009900">Name</span>, <span style="color: #009900">Value</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="font-style: italic"><span style="color: #9A1900">%% case sensitive</span></span>
-<span style="color: #009900">Value</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></tt></pre></div></div>
-<div class="paragraph"><p>Parse cookie headers.</p></div>
-<div class="paragraph"><p>Alias for <a href="../cowboy_req.parse_header">cowboy_req:parse_header(<a href="#cookie">[cookie]</a>, Req)</a>.</p></div>
-<div class="paragraph"><p>When the cookie header is missing, <code>[]</code> is returned.</p></div>
-<div class="paragraph"><p>While an empty cookie header is not valid, some clients do
-send it. Cowboy will in this case also return <code>[]</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">parse_cookies</font></b>(<font color="#009900">Req</font>) <font color="#990000">-&gt;</font> [{<font color="#009900">Name</font>, <font color="#009900">Value</font>}]
+
+<font color="#009900">Name</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case sensitive</font></i>
+<font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case sensitive</font></i></tt></pre>
+</div></div>
+<p>Parse cookie headers.</p>
+<p>Alias for <a href="../cowboy_req.parse_header">cowboy_req:parse_header(&lt;&lt;&quot;cookie&quot;&gt;&gt;, Req)</a>.</p>
+<p>When the cookie header is missing, <code>[]</code> is returned.</p>
+<p>While an empty cookie header is not valid, some clients do send it. Cowboy will in this case also return <code>[]</code>.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The cookies are returned as a list of key/values. Keys and
-values are case sensitive binary strings.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The cookies are returned as a list of key/values. Keys and values are case sensitive binary strings.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Only the parsed header value is returned, it is no longer wrapped in a tuple.
-</p>
+<ul><li><strong>2.0</strong>: Only the parsed header value is returned, it is no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced. Replaces <code>cookie/2,3</code> and <code>cookies/1</code>.
-</p>
+<li><strong>2.0</strong>: Function introduced. Replaces <code>cookie/2,3</code> and <code>cookies/1</code>.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Look for a specific cookie</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Look for a specific cookie</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">Cookies</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:parse_cookies</span></span>(<span style="color: #009900">Req</span>),
-{<span style="color: #990000">_</span>, <span style="color: #009900">Token</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">lists:keyfind</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"token"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #993399">1</span>, <span style="color: #009900">Cookies</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Cookies</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:parse_cookies</font></b>(<font color="#009900">Req</font>),
+{<font color="#990000">_</font>, <font color="#009900">Token</font>} <font color="#990000">=</font> <b><font color="#000000">lists:keyfind</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"token"</font><font color="#990000">&gt;&gt;</font>, <font color="#993399">1</font>, <font color="#009900">Cookies</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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_header">cowboy_req:parse_header(3)</a>,
-<a href="../cowboy_req.match_cookies">cowboy_req:match_cookies(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.parse_header">cowboy_req:parse_header(3)</a>, <a href="../cowboy_req.match_cookies">cowboy_req:match_cookies(3)</a></p>
+
diff --git a/docs/en/cowboy/2.4/manual/cowboy_req.parse_header/index.html b/docs/en/cowboy/2.4/manual/cowboy_req.parse_header/index.html
index a074485f..a4e0c4d7 100644
--- a/docs/en/cowboy/2.4/manual/cowboy_req.parse_header/index.html
+++ b/docs/en/cowboy/2.4/manual/cowboy_req.parse_header/index.html
@@ -62,283 +62,218 @@
<h1 class="lined-header"><span>cowboy_req:parse_header(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:parse_header - Parse the given HTTP header</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:parse_header - Parse the given HTTP header</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">parse_header</span></span>(<span style="color: #009900">Name</span>, <span style="color: #009900">Req</span>) <span style="color: #990000">-&gt;</span> <span style="color: #009900">ParsedValue</span> | <span style="color: #009900">Default</span>
-<span style="font-weight: bold"><span style="color: #000000">parse_header</span></span>(<span style="color: #009900">Name</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">Default</span>) <span style="color: #990000">-&gt;</span> <span style="color: #009900">ParsedValue</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">binary</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">ParsedValue</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">any</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>Parse 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>The type of the parsed value varies depending on
-the header. Similarly, the default value when calling
-<code>cowboy_req:parse_header/2</code> differs depending on the
-header.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">parse_header</font></b>(<font color="#009900">Name</font>, <font color="#009900">Req</font>) <font color="#990000">-&gt;</font> <font color="#009900">ParsedValue</font> | <font color="#009900">Default</font>
+<b><font color="#000000">parse_header</font></b>(<font color="#009900">Name</font>, <font color="#009900">Req</font>, <font color="#009900">Default</font>) <font color="#990000">-&gt;</font> <font color="#009900">ParsedValue</font> | <font color="#009900">Default</font>
+
+<font color="#009900">Name</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()
+<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()
+<font color="#009900">ParsedValue</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()</tt></pre>
+</div></div>
+<p>Parse the given HTTP header.</p>
+<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>
+<p>The type of the parsed value varies depending on the header. Similarly, the default value when calling <code>cowboy_req:parse_header/2</code> differs depending on the header.</p>
<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 lowercase binary string.
-</p>
+<dl><dt>Name</dt>
+<dd><p>Desired HTTP header name as a lowercase binary string.</p>
</dd>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dt>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>
+<dt>Default</dt>
+<dd><p>Default value returned when the header is missing.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The parsed header value varies depending on the header.
-When the header is missing, the default argument is returned.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The parsed header value varies depending on the header. When the header is missing, the default argument is returned.</p>
<h2 id="_headers">Headers</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The following snippets detail the types returned by the
-different headers. Unless mentioned otherwise, the
-default value when the header is missing will be <code>undefined</code>:</p></div>
-<div class="listingblock">
-<div class="title">accept</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The following snippets detail the types returned by the different headers. Unless mentioned otherwise, the default value when the header is missing will be <code>undefined</code>:</p>
+<div class="listingblock"><div class="title">accept</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">parse_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">-&gt;</span> [{{<span style="color: #009900">Type</span>, <span style="color: #009900">SubType</span>, <span style="color: #009900">Params</span>}, <span style="color: #009900">Quality</span>, <span style="color: #009900">AcceptExt</span>}]
-
-<span style="color: #009900">Type</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 insensitive</span></span>
-<span style="color: #009900">SubType</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 insensitive</span></span>
-<span style="color: #009900">Params</span> <span style="color: #990000">::</span> [{<span style="color: #009900">Key</span>, <span style="color: #009900">Value</span>}]
-<span style="color: #009900">Quality</span> <span style="color: #990000">::</span> <span style="color: #993399">0</span><span style="color: #990000">..</span><span style="color: #993399">1000</span>
-<span style="color: #009900">AcceptExt</span> <span style="color: #990000">::</span> [<span style="color: #009900">Key</span> | {<span style="color: #009900">Key</span>, <span style="color: #009900">Value</span>}]
-<span style="color: #009900">Key</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 insensitive</span></span>
-<span style="color: #009900">Value</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></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">accept-charset, accept-encoding and accept-language</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">parse_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"accept"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>)
+ <font color="#990000">-&gt;</font> [{{<font color="#009900">Type</font>, <font color="#009900">SubType</font>, <font color="#009900">Params</font>}, <font color="#009900">Quality</font>, <font color="#009900">AcceptExt</font>}]
+
+<font color="#009900">Type</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case insensitive</font></i>
+<font color="#009900">SubType</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case insensitive</font></i>
+<font color="#009900">Params</font> <font color="#990000">::</font> [{<font color="#009900">Key</font>, <font color="#009900">Value</font>}]
+<font color="#009900">Quality</font> <font color="#990000">::</font> <font color="#993399">0</font><font color="#990000">..</font><font color="#993399">1000</font>
+<font color="#009900">AcceptExt</font> <font color="#990000">::</font> [<font color="#009900">Key</font> | {<font color="#009900">Key</font>, <font color="#009900">Value</font>}]
+<font color="#009900">Key</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case insensitive</font></i>
+<font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case sensitive</font></i></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">accept-charset, accept-encoding and accept-language</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">parse_header</span></span>(<span style="color: #009900">Name</span>, <span style="color: #009900">Req</span>) <span style="color: #990000">-&gt;</span> [{<span style="color: #009900">Value</span>, <span style="color: #009900">Quality</span>}]
-
-<span style="color: #009900">Name</span> <span style="color: #990000">::</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"accept-charset"</span><span style="color: #990000">&gt;&gt;</span>
- | <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"accept-encoding"</span><span style="color: #990000">&gt;&gt;</span>
- | <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"accept-language"</span><span style="color: #990000">&gt;&gt;</span>
-<span style="color: #009900">Value</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 insensitive</span></span>
-<span style="color: #009900">Quality</span> <span style="color: #990000">::</span> <span style="color: #993399">0</span><span style="color: #990000">..</span><span style="color: #993399">1000</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">authorization</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">parse_header</font></b>(<font color="#009900">Name</font>, <font color="#009900">Req</font>) <font color="#990000">-&gt;</font> [{<font color="#009900">Value</font>, <font color="#009900">Quality</font>}]
+
+<font color="#009900">Name</font> <font color="#990000">::</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"accept-charset"</font><font color="#990000">&gt;&gt;</font>
+ | <font color="#990000">&lt;&lt;</font><font color="#FF0000">"accept-encoding"</font><font color="#990000">&gt;&gt;</font>
+ | <font color="#990000">&lt;&lt;</font><font color="#FF0000">"accept-language"</font><font color="#990000">&gt;&gt;</font>
+<font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case insensitive</font></i>
+<font color="#009900">Quality</font> <font color="#990000">::</font> <font color="#993399">0</font><font color="#990000">..</font><font color="#993399">1000</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">authorization</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">parse_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"authorization"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req</span>)
- <span style="color: #990000">-&gt;</span> {<span style="color: #FF6600">basic</span>, <span style="color: #009900">Username</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="color: #009900">Password</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()}
- | {<span style="color: #FF6600">bearer</span>, <span style="color: #009900">Token</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()}
- | {<span style="color: #FF6600">digest</span>, [{<span style="color: #009900">Key</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="color: #009900">Value</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()}]}</tt></pre></div></div>
-<div class="listingblock">
-<div class="title">content-length</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">parse_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"authorization"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>)
+ <font color="#990000">-&gt;</font> {<font color="#FF6600">basic</font>, <font color="#009900">Username</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">Password</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()}
+ | {<font color="#FF6600">bearer</font>, <font color="#009900">Token</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()}
+ | {<font color="#FF6600">digest</font>, [{<font color="#009900">Key</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()}]}</tt></pre>
+</div></div>
+<!-- @todo Currently also parses connection. Do we want this? Should it be documented? Use case?-->
+<div class="listingblock"><div class="title">content-length</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">parse_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">-&gt;</span> <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>When the content-length header is missing, <code>0</code> is returned.</p></div>
-<div class="listingblock">
-<div class="title">content-type</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">parse_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-length"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>) <font color="#990000">-&gt;</font> <b><font color="#000000">non_neg_integer</font></b>()</tt></pre>
+</div></div>
+<p>When the content-length header is missing, <code>0</code> is returned.</p>
+<div class="listingblock"><div class="title">content-type</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">parse_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req</span>)
- <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Type</span>, <span style="color: #009900">SubType</span>, <span style="color: #009900">Params</span>}
-
-<span style="color: #009900">Type</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 insensitive</span></span>
-<span style="color: #009900">SubType</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 insensitive</span></span>
-<span style="color: #009900">Params</span> <span style="color: #990000">::</span> [{<span style="color: #009900">Key</span>, <span style="color: #009900">Value</span>}]
-<span style="color: #009900">Key</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 insensitive</span></span>
-<span style="color: #009900">Value</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></tt></pre></div></div>
-<div class="paragraph"><p>Note that the value for the charset parameter is case insensitive
-and returned as a lowercase binary string.</p></div>
-<div class="listingblock">
-<div class="title">cookie</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">parse_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>)
+ <font color="#990000">-&gt;</font> {<font color="#009900">Type</font>, <font color="#009900">SubType</font>, <font color="#009900">Params</font>}
+
+<font color="#009900">Type</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case insensitive</font></i>
+<font color="#009900">SubType</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case insensitive</font></i>
+<font color="#009900">Params</font> <font color="#990000">::</font> [{<font color="#009900">Key</font>, <font color="#009900">Value</font>}]
+<font color="#009900">Key</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case insensitive</font></i>
+<font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case sensitive;</font></i></tt></pre>
+</div></div>
+<p>Note that the value for the charset parameter is case insensitive and returned as a lowercase binary string.</p>
+<div class="listingblock"><div class="title">cookie</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">parse_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"cookie"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req</span>) <span style="color: #990000">-&gt;</span> [{<span style="color: #009900">Name</span>, <span style="color: #009900">Value</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="font-style: italic"><span style="color: #9A1900">%% case sensitive</span></span>
-<span style="color: #009900">Value</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></tt></pre></div></div>
-<div class="paragraph"><p>When the cookie header is missing, <code>[]</code> is returned.</p></div>
-<div class="paragraph"><p>While an empty cookie header is not valid, some clients do
-send it. Cowboy will in this case also return <code>[]</code>.</p></div>
-<div class="listingblock">
-<div class="title">expect</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">parse_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"cookie"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>) <font color="#990000">-&gt;</font> [{<font color="#009900">Name</font>, <font color="#009900">Value</font>}]
+
+<font color="#009900">Name</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case sensitive</font></i>
+<font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case sensitive</font></i></tt></pre>
+</div></div>
+<p>When the cookie header is missing, <code>[]</code> is returned.</p>
+<p>While an empty cookie header is not valid, some clients do send it. Cowboy will in this case also return <code>[]</code>.</p>
+<div class="listingblock"><div class="title">expect</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">parse_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"expect"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req</span>) <span style="color: #990000">-&gt;</span> <span style="color: #FF6600">continue</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">if-match and if-none-match</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">parse_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"expect"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>) <font color="#990000">-&gt;</font> <font color="#FF6600">continue</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">if-match and if-none-match</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">parse_header</span></span>(<span style="color: #009900">Name</span>, <span style="color: #009900">Req</span>)
- <span style="color: #990000">-&gt;</span> <span style="color: #FF6600">'*'</span> | [{<span style="color: #FF6600">weak</span> | <span style="color: #FF6600">strong</span>, <span style="color: #009900">OpaqueTag</span>}]
-
-<span style="color: #009900">Name</span> <span style="color: #990000">::</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"if-match"</span><span style="color: #990000">&gt;&gt;</span>
- | <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"if-none-match"</span><span style="color: #990000">&gt;&gt;</span>
-<span style="color: #009900">OpaqueTag</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></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">if-modified-since and if-unmodified-since</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">parse_header</font></b>(<font color="#009900">Name</font>, <font color="#009900">Req</font>)
+ <font color="#990000">-&gt;</font> <font color="#FF6600">'*'</font> | [{<font color="#FF6600">weak</font> | <font color="#FF6600">strong</font>, <font color="#009900">OpaqueTag</font>}]
+
+<font color="#009900">Name</font> <font color="#990000">::</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"if-match"</font><font color="#990000">&gt;&gt;</font>
+ | <font color="#990000">&lt;&lt;</font><font color="#FF0000">"if-none-match"</font><font color="#990000">&gt;&gt;</font>
+<font color="#009900">OpaqueTag</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case sensitive</font></i></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">if-modified-since and if-unmodified-since</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">parse_header</span></span>(<span style="color: #009900">Name</span>, <span style="color: #009900">Req</span>) <span style="color: #990000">-&gt;</span> <span style="font-weight: bold"><span style="color: #000000">calendar:datetime</span></span>()</tt></pre></div></div>
-<div class="listingblock">
-<div class="title">range</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">parse_header</font></b>(<font color="#009900">Name</font>, <font color="#009900">Req</font>) <font color="#990000">-&gt;</font> <b><font color="#000000">calendar:datetime</font></b>()</tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">range</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">parse_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"range"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">From</span>, <span style="color: #009900">To</span>} | <span style="color: #009900">Final</span>
-
-<span style="color: #009900">From</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>()
-<span style="color: #009900">To</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>() | <span style="color: #FF6600">infinity</span>
-<span style="color: #009900">Final</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">neg_integer</span></span>()</tt></pre></div></div>
-<div class="listingblock">
-<div class="title">sec-websocket-extensions</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">parse_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"range"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>) <font color="#990000">-&gt;</font> {<font color="#009900">From</font>, <font color="#009900">To</font>} | <font color="#009900">Final</font>
+
+<font color="#009900">From</font> <font color="#990000">::</font> <b><font color="#000000">non_neg_integer</font></b>()
+<font color="#009900">To</font> <font color="#990000">::</font> <b><font color="#000000">non_neg_integer</font></b>() | <font color="#FF6600">infinity</font>
+<font color="#009900">Final</font> <font color="#990000">::</font> <b><font color="#000000">neg_integer</font></b>()</tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">sec-websocket-extensions</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">parse_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"sec-websocket-extensions"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req</span>)
- <span style="color: #990000">-&gt;</span> [{<span style="color: #009900">Extension</span>, <span style="color: #009900">Params</span>}]
-
-<span style="color: #009900">Extension</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: #009900">Params</span> <span style="color: #990000">::</span> [<span style="color: #009900">Key</span> | {<span style="color: #009900">Key</span>, <span style="color: #009900">Value</span>}]
-<span style="color: #009900">Key</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: #009900">Value</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></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">sec-websocket-protocol and upgrade</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">parse_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"sec-websocket-extensions"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>)
+ <font color="#990000">-&gt;</font> [{<font color="#009900">Extension</font>, <font color="#009900">Params</font>}]
+
+<font color="#009900">Extension</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case sensitive</font></i>
+<font color="#009900">Params</font> <font color="#990000">::</font> [<font color="#009900">Key</font> | {<font color="#009900">Key</font>, <font color="#009900">Value</font>}]
+<font color="#009900">Key</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case sensitive</font></i>
+<font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case sensitive</font></i></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">sec-websocket-protocol and upgrade</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">parse_header</span></span>(<span style="color: #009900">Name</span>, <span style="color: #009900">Req</span>) <span style="color: #990000">-&gt;</span> [<span style="color: #009900">Token</span>]
-
-<span style="color: #009900">Name</span> <span style="color: #990000">::</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"sec-websocket-protocol"</span><span style="color: #990000">&gt;&gt;</span>
- | <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"upgrade"</span><span style="color: #990000">&gt;&gt;</span>
-<span style="color: #009900">Token</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 insensitive</span></span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">x-forwarded-for</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">parse_header</font></b>(<font color="#009900">Name</font>, <font color="#009900">Req</font>) <font color="#990000">-&gt;</font> [<font color="#009900">Token</font>]
+
+<font color="#009900">Name</font> <font color="#990000">::</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"sec-websocket-protocol"</font><font color="#990000">&gt;&gt;</font>
+ | <font color="#990000">&lt;&lt;</font><font color="#FF0000">"upgrade"</font><font color="#990000">&gt;&gt;</font>
+<font color="#009900">Token</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case insensitive</font></i></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">x-forwarded-for</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">parse_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"x-forwarded-for"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req</span>) <span style="color: #990000">-&gt;</span> [<span style="color: #009900">Token</span>]
+<pre><tt><b><font color="#000000">parse_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"x-forwarded-for"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>) <font color="#990000">-&gt;</font> [<font color="#009900">Token</font>]
-<span style="color: #009900">Token</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></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Unknown headers</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<font color="#009900">Token</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case sensitive</font></i></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Unknown 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="font-weight: bold"><span style="color: #000000">parse_header</span></span>(<span style="color: #990000">_</span>, <span style="color: #009900">Req</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #000080">undefined</span>, <span style="color: #009900">RawValue</span>}</tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">parse_header</font></b>(<font color="#990000">_</font>, <font color="#009900">Req</font>) <font color="#990000">-&gt;</font> {<font color="#000080">undefined</font>, <font color="#009900">RawValue</font>}</tt></pre>
+</div></div>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Only the parsed header value is returned, it is no longer wrapped in a tuple.
-</p>
+<ul><li><strong>2.0</strong>: Only the parsed header value is returned, it is no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Parse the accept header with a custom default value</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Parse the accept header with a custom 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="font-style: italic"><span style="color: #9A1900">%% Accept everything when header is missing.</span></span>
-<span style="color: #009900">Accept</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:parse_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">&lt;&lt;</span><span style="color: #FF0000">"*"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"*"</span><span style="color: #990000">&gt;&gt;</span>, []}, <span style="color: #993399">1000</span>, []}])<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Parse the content-length header</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><i><font color="#9A1900">%% Accept everything when header is missing.</font></i>
+<font color="#009900">Accept</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:parse_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"accept"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>,
+ [{{ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"*"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"*"</font><font color="#990000">&gt;&gt;</font>, []}, <font color="#993399">1000</font>, []}])<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Parse the content-length 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">%% Default content-length is 0.</span></span>
-<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">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><i><font color="#9A1900">%% Default content-length is 0.</font></i>
+<font color="#009900">Length</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-length"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.headers">cowboy_req:headers(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.header">cowboy_req:header(3)</a>, <a href="../cowboy_req.headers">cowboy_req:headers(3)</a></p>
+
diff --git a/docs/en/cowboy/2.4/manual/cowboy_req.parse_qs/index.html b/docs/en/cowboy/2.4/manual/cowboy_req.parse_qs/index.html
index bff11c10..1680b60e 100644
--- a/docs/en/cowboy/2.4/manual/cowboy_req.parse_qs/index.html
+++ b/docs/en/cowboy/2.4/manual/cowboy_req.parse_qs/index.html
@@ -62,117 +62,55 @@
<h1 class="lined-header"><span>cowboy_req:parse_qs(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:parse_qs - Parse the query string</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:parse_qs - Parse the query string</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">parse_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">Key</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="color: #009900">Value</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>() | <span style="color: #000080">true</span>}]</tt></pre></div></div>
-<div class="paragraph"><p>Parse the query string as a list of key/value pairs.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">parse_qs</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> [{<font color="#009900">Key</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() | <font color="#000080">true</font>}]</tt></pre>
+</div></div>
+<p>Parse the query string as a list of key/value pairs.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The parsed query string is returned as a list of key/value pairs.
-The key is a binary string. The value is either a binary string,
-or the atom <code>true</code>. Both key and value are case sensitive.</p></div>
-<div class="paragraph"><p>The atom <code>true</code> is returned when a key is present in the query
-string without a value. For example, in the following URIs
-the key <code>&lt;&lt;"edit"&gt;&gt;</code> will always have the value <code>true</code>:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<code>/posts/42?edit</code>
-</p>
+<p>The parsed query string is returned as a list of key/value pairs. The key is a binary string. The value is either a binary string, or the atom <code>true</code>. Both key and value are case sensitive.</p>
+<p>The atom <code>true</code> is returned when a key is present in the query string without a value. For example, in the following URIs the key <code>&lt;&lt;&quot;edit&quot;&gt;&gt;</code> will always have the value <code>true</code>:</p>
+<ul><li><code>/posts/42?edit</code>
</li>
-<li>
-<p>
-<code>/posts/42?edit&amp;exclusive=1</code>
-</p>
+<li><code>/posts/42?edit&amp;exclusive=1</code>
</li>
-<li>
-<p>
-<code>/posts/42?exclusive=1&amp;edit</code>
-</p>
+<li><code>/posts/42?exclusive=1&amp;edit</code>
</li>
-<li>
-<p>
-<code>/posts/42?exclusive=1&amp;edit&amp;from=web</code>
-</p>
+<li><code>/posts/42?exclusive=1&amp;edit&amp;from=web</code>
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: The parsed value is not longer cached in the Req object.
-</p>
+<ul><li><strong>2.0</strong>: The parsed value is not longer cached in the Req object.
</li>
-<li>
-<p>
-<strong>2.0</strong>: Only the parsed query string is returned, it is no longer wrapped in a tuple.
-</p>
+<li><strong>2.0</strong>: Only the parsed query string is returned, it is no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced. Replaces <code>qs_val/1</code> and <code>qs_vals/1</code>.
-</p>
+<li><strong>2.0</strong>: Function introduced. Replaces <code>qs_val/1</code> and <code>qs_vals/1</code>.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Parse the query string and convert the keys to atoms</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Parse the query string and convert the keys to atoms</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">ParsedQs</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:parse_qs</span></span>(<span style="color: #009900">Req</span>),
-<span style="color: #009900">AtomsQs</span> <span style="color: #990000">=</span> [{<span style="font-weight: bold"><span style="color: #000000">binary_to_existing_atom</span></span>(<span style="color: #009900">K</span>, <span style="color: #FF6600">latin1</span>), <span style="color: #009900">V</span>}
- || {<span style="color: #009900">K</span>, <span style="color: #009900">V</span>} <span style="color: #990000">&lt;-</span> <span style="color: #009900">ParsedQs</span>]<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">ParsedQs</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:parse_qs</font></b>(<font color="#009900">Req</font>),
+<font color="#009900">AtomsQs</font> <font color="#990000">=</font> [{<b><font color="#000000">binary_to_existing_atom</font></b>(<font color="#009900">K</font>, <font color="#FF6600">latin1</font>), <font color="#009900">V</font>}
+ || {<font color="#009900">K</font>, <font color="#009900">V</font>} <font color="#990000">&lt;-</font> <font color="#009900">ParsedQs</font>]<font color="#990000">.</font></tt></pre>
+</div></div>
<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.qs">cowboy_req:qs(3)</a>,
-<a href="../cowboy_req.match_qs">cowboy_req:match_qs(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.qs">cowboy_req:qs(3)</a>, <a href="../cowboy_req.match_qs">cowboy_req:match_qs(3)</a></p>
+
diff --git a/docs/en/cowboy/2.4/manual/cowboy_req.path/index.html b/docs/en/cowboy/2.4/manual/cowboy_req.path/index.html
index 4779baf5..0fe2594d 100644
--- a/docs/en/cowboy/2.4/manual/cowboy_req.path/index.html
+++ b/docs/en/cowboy/2.4/manual/cowboy_req.path/index.html
@@ -62,90 +62,47 @@
<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">
+<p>cowboy_req:path - URI path</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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
+<pre><tt><b><font color="#000000">path</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <font color="#009900">Path</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()</tt></pre>
+</div></div>
+<p>Return the path of the effective request URI.</p>
+<p>The path can also be obtained using pattern matching:</p>
+<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">
+<pre><tt>#{<font color="#FF6600">path</font> <font color="#990000">:=</font> <font color="#009900">Path</font>} <font color="#990000">=</font> <font color="#009900">Req</font><font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<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">
+<p>The path is returned as a binary string. It is case sensitive.</p>
<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>
+<ul><li><strong>2.0</strong>: Only the path is returned, it is no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<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
+<div class="listingblock"><div class="title">Get the effective request URI&apos;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">
+<pre><tt><font color="#009900">Path</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:path</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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>
+<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>
+
diff --git a/docs/en/cowboy/2.4/manual/cowboy_req.path_info/index.html b/docs/en/cowboy/2.4/manual/cowboy_req.path_info/index.html
index 9adc2dfd..cc5a9709 100644
--- a/docs/en/cowboy/2.4/manual/cowboy_req.path_info/index.html
+++ b/docs/en/cowboy/2.4/manual/cowboy_req.path_info/index.html
@@ -62,87 +62,41 @@
<h1 class="lined-header"><span>cowboy_req:path_info(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:path_info - Access the route&#8217;s trailing path segments</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:path_info - Access the route&apos;s trailing path segments</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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_info</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_router:tokens</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Return the tokens for the trailing path segments.</p></div>
-<div class="paragraph"><p>This is the part of the host name that was matched using
-the <code>...</code> notation.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">path_info</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <b><font color="#000000">cowboy_router:tokens</font></b>()</tt></pre>
+</div></div>
+<p>Return the tokens for the trailing path segments.</p>
+<p>This is the part of the host name that was matched using the <code>...</code> notation.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The tokens are returned as a list of case sensitive
-binary strings.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The tokens are returned as a list of case sensitive binary strings.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Only the tokens are returned, they are no longer wrapped in a tuple.
-</p>
+<ul><li><strong>2.0</strong>: Only the tokens are returned, they are no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Get the path_info tokens</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Get the path_info tokens</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">PathInfo</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:path_info</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">PathInfo</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:path_info</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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>,
-<a href="../cowboy_router">cowboy_router(3)</a></p></div>
-</div>
-</div>
+<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>, <a href="../cowboy_router">cowboy_router(3)</a></p>
+
diff --git a/docs/en/cowboy/2.4/manual/cowboy_req.peer/index.html b/docs/en/cowboy/2.4/manual/cowboy_req.peer/index.html
index bbce29da..9271abc7 100644
--- a/docs/en/cowboy/2.4/manual/cowboy_req.peer/index.html
+++ b/docs/en/cowboy/2.4/manual/cowboy_req.peer/index.html
@@ -62,98 +62,51 @@
<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">
+<p>cowboy_req:peer - Peer address and port</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">Info</span>
+<pre><tt><b><font color="#000000">peer</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <font color="#009900">Info</font>
-<span style="color: #009900">Info</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 information can also be obtained using pattern matching:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<font color="#009900">Info</font> <font color="#990000">::</font> {<b><font color="#000000">inet:ip_address</font></b>(), <b><font color="#000000">inet:port_number</font></b>()}</tt></pre>
+</div></div>
+<p>Return the peer&apos;s IP address and port number.</p>
+<p>The peer information can also be obtained using pattern matching:</p>
+<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">
+<pre><tt>#{<font color="#FF6600">peer</font> <font color="#990000">:=</font> {<font color="#009900">IP</font>, <font color="#009900">Port</font>}} <font color="#990000">=</font> <font color="#009900">Req</font><font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<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">
+<p>The peer&apos;s IP address and port number.</p>
+<p>The peer is not necessarily the client&apos;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>
+<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>
<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>
+<ul><li><strong>2.0</strong>: Only the peer is returned, it is no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<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
+<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">
+<pre><tt>{<font color="#009900">IP</font>, <font color="#009900">Port</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:peer</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.sock">cowboy_req:sock(3)</a>,
-<a href="../cowboy_req.cert">cowboy_req:cert(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.sock">cowboy_req:sock(3)</a>, <a href="../cowboy_req.cert">cowboy_req:cert(3)</a></p>
+
diff --git a/docs/en/cowboy/2.4/manual/cowboy_req.port/index.html b/docs/en/cowboy/2.4/manual/cowboy_req.port/index.html
index 30c8840e..6db57560 100644
--- a/docs/en/cowboy/2.4/manual/cowboy_req.port/index.html
+++ b/docs/en/cowboy/2.4/manual/cowboy_req.port/index.html
@@ -62,90 +62,48 @@
<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">
+<p>cowboy_req:port - URI port number</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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
+<pre><tt><b><font color="#000000">port</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <font color="#009900">Port</font> <font color="#990000">::</font> <b><font color="#000000">inet:port_number</font></b>()</tt></pre>
+</div></div>
+<p>Return the port number of the effective request URI.</p>
+<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>
+<p>The port number can also be obtained using pattern matching:</p>
+<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">
+<pre><tt>#{<font color="#FF6600">port</font> <font color="#990000">:=</font> <font color="#009900">Port</font>} <font color="#990000">=</font> <font color="#009900">Req</font><font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<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">
+<p>The port number is returned as an integer.</p>
<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>
+<ul><li><strong>2.0</strong>: Only the port number is returned, it is no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<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
+<div class="listingblock"><div class="title">Get the effective request URI&apos;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">
+<pre><tt><font color="#009900">Port</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:port</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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>
+<p><a href="../cowboy_req">cowboy_req(3)</a></p>
+
diff --git a/docs/en/cowboy/2.4/manual/cowboy_req.push/index.html b/docs/en/cowboy/2.4/manual/cowboy_req.push/index.html
index 1ad3e8f8..6b2f47a5 100644
--- a/docs/en/cowboy/2.4/manual/cowboy_req.push/index.html
+++ b/docs/en/cowboy/2.4/manual/cowboy_req.push/index.html
@@ -62,142 +62,74 @@
<h1 class="lined-header"><span>cowboy_req:push(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:push - Push a resource to the client</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:push - Push a resource to the client</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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</span></span>(<span style="color: #009900">Path</span>, <span style="color: #009900">Headers</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">push</span></span>(<span style="color: #009900">Path</span>, <span style="color: #009900">Headers</span>, <span style="color: #009900">Req</span>, #{})
-
-<span style="font-weight: bold"><span style="color: #000000">push</span></span>(<span style="color: #009900">Path</span>, <span style="color: #009900">Headers</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: #FF6600">ok</span>
-
-<span style="color: #009900">Path</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>() <span style="font-style: italic"><span style="color: #9A1900">%% case sensitive</span></span>
-<span style="color: #009900">Headers</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:http_headers</span></span>()
-<span style="color: #009900">Opts</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:push_opts</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Push a resource to the client.</p></div>
-<div class="paragraph"><p>Cowboy handles push requests the same way as if they came
-from the client, including the creation of a request handling
-process, routing and middlewares and so on.</p></div>
-<div class="paragraph"><p>This function does nothing when the HTTP/1.1 protocol is
-used. You may call it safely without first checking whether
-the connection uses HTTP/2.</p></div>
-<div class="paragraph"><p>The header names must be given as lowercase binary strings.
-While header names are case insensitive, Cowboy requires them
-to be given as lowercase to function properly.</p></div>
-<div class="paragraph"><p>Note that the headers must be the headers the client is expected
-to send if it were to perform the request. They are therefore
-request headers, and not response headers.</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. You can override them by passing options.</p></div>
-<div class="paragraph"><p>It is not possible to push resources after sending a response.
-Any attempt will result in an error.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">push</font></b>(<font color="#009900">Path</font>, <font color="#009900">Headers</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> <b><font color="#000000">push</font></b>(<font color="#009900">Path</font>, <font color="#009900">Headers</font>, <font color="#009900">Req</font>, #{})
+
+<b><font color="#000000">push</font></b>(<font color="#009900">Path</font>, <font color="#009900">Headers</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>(), <font color="#009900">Opts</font>)
+ <font color="#990000">-&gt;</font> <font color="#FF6600">ok</font>
+
+<font color="#009900">Path</font> <font color="#990000">::</font> <b><font color="#000000">iodata</font></b>() <i><font color="#9A1900">%% case sensitive</font></i>
+<font color="#009900">Headers</font> <font color="#990000">::</font> <b><font color="#000000">cowboy:http_headers</font></b>()
+<font color="#009900">Opts</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:push_opts</font></b>()</tt></pre>
+</div></div>
+<p>Push a resource to the client.</p>
+<p>Cowboy handles push requests the same way as if they came from the client, including the creation of a request handling process, routing and middlewares and so on.</p>
+<p>This function does nothing when the HTTP/1.1 protocol is used. You may call it safely without first checking whether the connection uses HTTP/2.</p>
+<p>The header names must be given as lowercase binary strings. While header names are case insensitive, Cowboy requires them to be given as lowercase to function properly.</p>
+<p>Note that the headers must be the headers the client is expected to send if it were to perform the request. They are therefore request headers, and not response headers.</p>
+<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&apos;s URI. You can override them by passing options.</p>
+<p>It is not possible to push resources after sending a response. Any attempt will result in an error.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Path
-</dt>
-<dd>
-<p>
-The status code for the response.
-</p>
+<dl><dt>Path</dt>
+<dd><p>The status code for the response.</p>
</dd>
-<dt class="hdlist1">
-Headers
-</dt>
-<dd>
-<p>
-The response headers.
-</p>
+<dt>Headers</dt>
+<dd><p>The response headers.</p>
</dd>
-</dl></div>
-<div class="paragraph"><p>Header names must be given as lowercase binary strings.</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+</dl>
+<p>Header names must be given as lowercase binary strings.</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-<dt class="hdlist1">
-Opts
-</dt>
-<dd>
-<p>
-Customize the HTTP method or the URI scheme, host, port
-or query string.
-</p>
+<dt>Opts</dt>
+<dd><p>Customize the HTTP method or the URI scheme, host, port or query string.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The atom <code>ok</code> is always returned. It can be safely ignored.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The atom <code>ok</code> is always returned. It can be safely ignored.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced.
-</p>
+<ul><li><strong>2.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Push a resource</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Push a resource</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">cowboy_req:push</span></span>(<span style="color: #FF0000">"/static/style.css"</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"accept"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/css"</span><span style="color: #990000">&gt;&gt;</span>
-}, <span style="color: #009900">Req</span>),</tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Push a resource with a custom host</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">cowboy_req:push</font></b>(<font color="#FF0000">"/static/style.css"</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"accept"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/css"</font><font color="#990000">&gt;&gt;</font>
+}, <font color="#009900">Req</font>),</tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Push a resource with a custom host</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">cowboy_req:push</span></span>(<span style="color: #FF0000">"/static/style.css"</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"accept"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/css"</span><span style="color: #990000">&gt;&gt;</span>
-}, #{<span style="color: #0000FF">host</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"cdn.example.org"</span><span style="color: #990000">&gt;&gt;</span>}, <span style="color: #009900">Req</span>),</tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">cowboy_req:push</font></b>(<font color="#FF0000">"/static/style.css"</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"accept"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/css"</font><font color="#990000">&gt;&gt;</font>
+}, #{<font color="#0000FF">host</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"cdn.example.org"</font><font color="#990000">&gt;&gt;</font>}, <font color="#009900">Req</font>),</tt></pre>
+</div></div>
<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.inform">cowboy_req:inform(3)</a>,
-<a href="../cowboy_req.reply">cowboy_req:reply(3)</a>,
-<a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.inform">cowboy_req:inform(3)</a>, <a href="../cowboy_req.reply">cowboy_req:reply(3)</a>, <a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a></p>
+
diff --git a/docs/en/cowboy/2.4/manual/cowboy_req.qs/index.html b/docs/en/cowboy/2.4/manual/cowboy_req.qs/index.html
index ef4fd23f..66e4ebbd 100644
--- a/docs/en/cowboy/2.4/manual/cowboy_req.qs/index.html
+++ b/docs/en/cowboy/2.4/manual/cowboy_req.qs/index.html
@@ -62,89 +62,47 @@
<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">
+<p>cowboy_req:qs - URI query string</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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
+<pre><tt><b><font color="#000000">qs</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <font color="#009900">Qs</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()</tt></pre>
+</div></div>
+<p>Return the query string of the effective request URI.</p>
+<p>The query string can also be obtained using pattern matching:</p>
+<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">
+<pre><tt>#{<font color="#FF6600">qs</font> <font color="#990000">:=</font> <font color="#009900">Qs</font>} <font color="#990000">=</font> <font color="#009900">Req</font><font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<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">
+<p>The query string is returned as a binary string. It is case sensitive.</p>
<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>
+<ul><li><strong>2.0</strong>: Only the query string is returned, it is no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<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
+<div class="listingblock"><div class="title">Get the effective request URI&apos;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">
+<pre><tt><font color="#009900">Qs</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:qs</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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>
+<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>
+
diff --git a/docs/en/cowboy/2.4/manual/cowboy_req.read_body/index.html b/docs/en/cowboy/2.4/manual/cowboy_req.read_body/index.html
index d4c2157a..1be995a0 100644
--- a/docs/en/cowboy/2.4/manual/cowboy_req.read_body/index.html
+++ b/docs/en/cowboy/2.4/manual/cowboy_req.read_body/index.html
@@ -62,143 +62,72 @@
<h1 class="lined-header"><span>cowboy_req:read_body(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:read_body - Read the request body</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:read_body - Read the request body</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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</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">read_body</span></span>(<span style="color: #009900">Req</span>, #{})
-
-<span style="font-weight: bold"><span style="color: #000000">read_body</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: #FF6600">ok</span>, <span style="color: #009900">Data</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: #FF6600">more</span>, <span style="color: #009900">Data</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">Opts</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:read_body_opts</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Read the request body.</p></div>
-<div class="paragraph"><p>This function reads a chunk of the request body. A <code>more</code> tuple
-is returned when more data remains to be read. Call the function
-repeatedly until an <code>ok</code> tuple is returned to read the entire body.</p></div>
-<div class="paragraph"><p>An <code>ok</code> tuple with empty data is returned when the request has no body,
-or when calling this function again after the body has already
-been read. It is therefore safe to call this function directly.
-Note that the body can only be read once.</p></div>
-<div class="paragraph"><p>This function reads the request body from the connection process.
-The connection process is responsible for reading from the socket.
-The exact behavior varies depending on the protocol.</p></div>
-<div class="paragraph"><p>The options therefore are only related to the communication
-between the request process and the connection process.</p></div>
-<div class="paragraph"><p>Cowboy will automatically handle protocol details including
-the expect header, chunked transfer-encoding and others.</p></div>
-<div class="paragraph"><p>Once the body has been read fully, Cowboy sets the content-length
-header if it was not previously provided.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">read_body</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> <b><font color="#000000">read_body</font></b>(<font color="#009900">Req</font>, #{})
+
+<b><font color="#000000">read_body</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>(), <font color="#009900">Opts</font>)
+ <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <font color="#009900">Data</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">Req</font>}
+ | {<font color="#FF6600">more</font>, <font color="#009900">Data</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">Req</font>}
+
+<font color="#009900">Opts</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:read_body_opts</font></b>()</tt></pre>
+</div></div>
+<p>Read the request body.</p>
+<p>This function reads a chunk of the request body. A <code>more</code> tuple is returned when more data remains to be read. Call the function repeatedly until an <code>ok</code> tuple is returned to read the entire body.</p>
+<p>An <code>ok</code> tuple with empty data is returned when the request has no body, or when calling this function again after the body has already been read. It is therefore safe to call this function directly. Note that the body can only be read once.</p>
+<p>This function reads the request body from the connection process. The connection process is responsible for reading from the socket. The exact behavior varies depending on the protocol.</p>
+<p>The options therefore are only related to the communication between the request process and the connection process.</p>
+<p>Cowboy will automatically handle protocol details including the expect header, chunked transfer-encoding and others.</p>
+<p>Once the body has been read fully, Cowboy sets the content-length header if it was not previously provided.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-<dt class="hdlist1">
-Opts
-</dt>
-<dd>
-<p>
-A map of body reading options.
-</p>
-<div class="paragraph"><p>The <code>length</code> option can be used to request smaller or bigger
-chunks of data to be sent. It is a best effort approach, Cowboy
-may send more data than configured on occasions. It defaults
-to 8MB.</p></div>
-<div class="paragraph"><p>The <code>period</code> indicates how long the connection process will wait
-before it provides us with the data it received. It defaults
-to 15 seconds.</p></div>
-<div class="paragraph"><p>The connection process sends data to the request process when
-either the <code>length</code> of data or the <code>period</code> of time is reached.</p></div>
-<div class="paragraph"><p>The <code>timeout</code> option is a safeguard in case the connection
-process becomes unresponsive. The function will crash if no
-message was received in that interval. The timeout should be
-larger than the period. It defaults to the period + 1 second.</p></div>
+<dt>Opts</dt>
+<dd><p>A map of body reading options.</p>
+<p>The <code>length</code> option can be used to request smaller or bigger chunks of data to be sent. It is a best effort approach, Cowboy may send more data than configured on occasions. It defaults to 8MB.</p>
+<p>The <code>period</code> indicates how long the connection process will wait before it provides us with the data it received. It defaults to 15 seconds.</p>
+<p>The connection process sends data to the request process when either the <code>length</code> of data or the <code>period</code> of time is reached.</p>
+<p>The <code>timeout</code> option is a safeguard in case the connection process becomes unresponsive. The function will crash if no message was received in that interval. The timeout should be larger than the period. It defaults to the period<br/> 1 second.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A <code>more</code> tuple is returned when there are more data to be read.</p></div>
-<div class="paragraph"><p>An <code>ok</code> tuple is returned when there are no more data to be read,
-either because this is the last chunk of data, the body has already
-been read, or there was no body to begin with.</p></div>
-<div class="paragraph"><p>The data is always returned as a binary.</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.
-For example it may have an added content-length header once the
-body has been read.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>A <code>more</code> tuple is returned when there are more data to be read.</p>
+<p>An <code>ok</code> tuple is returned when there are no more data to be read, either because this is the last chunk of data, the body has already been read, or there was no body to begin with.</p>
+<p>The data is always returned as a binary.</p>
+<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. For example it may have an added content-length header once the body has been read.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced. Replaces <code>body/1,2</code>.
-</p>
+<ul><li><strong>2.0</strong>: Function introduced. Replaces <code>body/1,2</code>.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Read the entire body</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Read the entire body</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">read_body</span></span>(<span style="color: #009900">Req0</span>, <span style="color: #009900">Acc</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">cowboy_req:read_body</span></span>(<span style="color: #009900">Req0</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Data</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">-&gt;</span> {<span style="color: #FF6600">ok</span>, <span style="color: #990000">&lt;&lt;</span> <span style="color: #009900">Acc</span><span style="color: #990000">/</span><span style="font-weight: bold"><span style="color: #000080">binary</span></span>, <span style="color: #009900">Data</span><span style="color: #990000">/</span><span style="font-weight: bold"><span style="color: #000080">binary</span></span> <span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req</span>};
- {<span style="color: #FF6600">more</span>, <span style="color: #009900">Data</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">-&gt;</span> <span style="font-weight: bold"><span style="color: #000000">read_body</span></span>(<span style="color: #009900">Req</span>, <span style="color: #990000">&lt;&lt;</span> <span style="color: #009900">Acc</span><span style="color: #990000">/</span><span style="font-weight: bold"><span style="color: #000080">binary</span></span>, <span style="color: #009900">Data</span><span style="color: #990000">/</span><span style="font-weight: bold"><span style="color: #000080">binary</span></span> <span style="color: #990000">&gt;&gt;</span>)
- <span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Read the body in small chunks</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">read_body</font></b>(<font color="#009900">Req0</font>, <font color="#009900">Acc</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">case</font></b> <b><font color="#000000">cowboy_req:read_body</font></b>(<font color="#009900">Req0</font>) <b><font color="#0000FF">of</font></b>
+ {<font color="#FF6600">ok</font>, <font color="#009900">Data</font>, <font color="#009900">Req</font>} <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <font color="#990000">&lt;&lt;</font> <font color="#009900">Acc</font><font color="#990000">/</font><b><font color="#000080">binary</font></b>, <font color="#009900">Data</font><font color="#990000">/</font><b><font color="#000080">binary</font></b> <font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>};
+ {<font color="#FF6600">more</font>, <font color="#009900">Data</font>, <font color="#009900">Req</font>} <font color="#990000">-&gt;</font> <b><font color="#000000">read_body</font></b>(<font color="#009900">Req</font>, <font color="#990000">&lt;&lt;</font> <font color="#009900">Acc</font><font color="#990000">/</font><b><font color="#000080">binary</font></b>, <font color="#009900">Data</font><font color="#990000">/</font><b><font color="#000080">binary</font></b> <font color="#990000">&gt;&gt;</font>)
+ <b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Read the body in small chunks</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">cowboy_req:read_body</span></span>(<span style="color: #009900">Req</span>, #{<span style="font-weight: bold"><span style="color: #000080">length</span></span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">64000</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">cowboy_req:read_body</font></b>(<font color="#009900">Req</font>, #{<b><font color="#000080">length</font></b> <font color="#990000">=&gt;</font> <font color="#993399">64000</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
<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.has_body">cowboy_req:has_body(3)</a>,
-<a href="../cowboy_req.body_length">cowboy_req:body_length(3)</a>,
-<a href="../cowboy_req.read_urlencoded_body">cowboy_req:read_urlencoded_body(3)</a>,
-<a href="../cowboy_req.read_part">cowboy_req:read_part(3)</a>,
-<a href="../cowboy_req.read_part_body">cowboy_req:read_part_body(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.has_body">cowboy_req:has_body(3)</a>, <a href="../cowboy_req.body_length">cowboy_req:body_length(3)</a>, <a href="../cowboy_req.read_urlencoded_body">cowboy_req:read_urlencoded_body(3)</a>, <a href="../cowboy_req.read_part">cowboy_req:read_part(3)</a>, <a href="../cowboy_req.read_part_body">cowboy_req:read_part_body(3)</a></p>
+
diff --git a/docs/en/cowboy/2.4/manual/cowboy_req.read_part/index.html b/docs/en/cowboy/2.4/manual/cowboy_req.read_part/index.html
index 50931838..7746b475 100644
--- a/docs/en/cowboy/2.4/manual/cowboy_req.read_part/index.html
+++ b/docs/en/cowboy/2.4/manual/cowboy_req.read_part/index.html
@@ -62,162 +62,94 @@
<h1 class="lined-header"><span>cowboy_req:read_part(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:read_part - Read the next multipart headers</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:read_part - Read the next multipart headers</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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_part</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">read_part</span></span>(<span style="color: #009900">Req</span>, #{})
-
-<span style="font-weight: bold"><span style="color: #000000">read_part</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: #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: #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
-their own headers and body. This function parses and returns
-headers. Examples of multipart media types are
-<code>multipart/form-data</code> and <code>multipart/byteranges</code>.</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>Cowboy will read the body before parsing in chunks of size
-up to 64KB, with a period of 5 seconds. This is tailored for
-reading part headers and might not be the most efficient for
-skipping the previous part&#8217;s body.</p></div>
-<div class="paragraph"><p>The headers returned are MIME headers, <strong>NOT</strong> 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 extract information from <code>multipart/form-data</code>
-representations.</p></div>
-<div class="paragraph"><p>Once a part has been read, it can not be read again.</p></div>
-<div class="paragraph"><p>Once the body has been read, Cowboy sets the content-length
-header if it was not previously provided.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">read_part</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> <b><font color="#000000">read_part</font></b>(<font color="#009900">Req</font>, #{})
+
+<b><font color="#000000">read_part</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>(), <font color="#009900">Opts</font>)
+ <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <font color="#009900">Headers</font>, <font color="#009900">Req</font>} | {<font color="#FF6600">done</font>, <font color="#009900">Req</font>}
+
+<font color="#009900">Opts</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:read_body_opts</font></b>()
+<font color="#009900">Headers</font> <font color="#990000">::</font> #{<b><font color="#000080">binary</font></b>() <font color="#990000">=&gt;</font> <b><font color="#000080">binary</font></b>()}</tt></pre>
+</div></div>
+<p>Read the next part of a multipart body.</p>
+<p>This function reads the request body and parses it as multipart. Each parts of a multipart representation have their own headers and body. This function parses and returns headers. Examples of multipart media types are <code>multipart/form-data</code> and <code>multipart/byteranges</code>.</p>
+<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&apos;t been read. Both are skipped automatically when calling this function.</p>
+<p>Cowboy will read the body before parsing in chunks of size up to 64KB, with a period of 5 seconds. This is tailored for reading part headers and might not be the most efficient for skipping the previous part&apos;s body.</p>
+<p>The headers returned are MIME headers, <strong>NOT</strong> 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 extract information from <code>multipart/form-data</code> representations.</p>
+<!-- @todo Proper link to cow_multipart:form_data.-->
+<p>Once a part has been read, it can not be read again.</p>
+<p>Once the body has been read, Cowboy sets the content-length header if it was not previously provided.</p>
+<!-- @todo Limit the maximum size of multipart headers.-->
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-<dt class="hdlist1">
-Opts
-</dt>
-<dd>
-<p>
-A map of body reading options. Please refer to
-<a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a>
-for details about each option.
-</p>
-<div class="paragraph"><p>This function defaults the <code>length</code> to 64KB and the <code>period</code>
-to 5 seconds.</p></div>
+<dt>Opts</dt>
+<dd><p>A map of body reading options. Please refer to <a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a> for details about each option.</p>
+<p>This function defaults the <code>length</code> to 64KB and the <code>period</code> to 5 seconds.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<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 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.
-For example it may have an added content-length header once the
-body has been read.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>An <code>ok</code> tuple is returned containing the next part&apos;s headers as a map.</p>
+<p>A <code>done</code> tuple is returned if there are no more parts to read.</p>
+<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. For example it may have an added content-length header once the body has been read.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced. Replaces <code>part/1,2</code>.
-</p>
+<ul><li><strong>2.0</strong>: Function introduced. Replaces <code>part/1,2</code>.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Read all parts</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Read all parts</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">acc_multipart</span></span>(<span style="color: #009900">Req0</span>, <span style="color: #009900">Acc</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">cowboy_req:read_part</span></span>(<span style="color: #009900">Req0</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Headers</span>, <span style="color: #009900">Req1</span>} <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Body</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">stream_body</span></span>(<span style="color: #009900">Req1</span>, <span style="color: #990000">&lt;&lt;&gt;&gt;</span>),
- <span style="font-weight: bold"><span style="color: #000000">acc_multipart</span></span>(<span style="color: #009900">Req</span>, [{<span style="color: #009900">Headers</span>, <span style="color: #009900">Body</span>}|<span style="color: #009900">Acc</span>]);
- {<span style="color: #FF6600">done</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">-&gt;</span>
- {<span style="font-weight: bold"><span style="color: #000000">lists:reverse</span></span>(<span style="color: #009900">Acc</span>), <span style="color: #009900">Req</span>}
- <span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span>
-
-<span style="font-weight: bold"><span style="color: #000000">stream_body</span></span>(<span style="color: #009900">Req0</span>, <span style="color: #009900">Acc</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">cowboy_req:read_part_body</span></span>(<span style="color: #009900">Req0</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
- {<span style="color: #FF6600">more</span>, <span style="color: #009900">Data</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #000000">stream_body</span></span>(<span style="color: #009900">Req</span>, <span style="color: #990000">&lt;&lt;</span> <span style="color: #009900">Acc</span><span style="color: #990000">/</span><span style="font-weight: bold"><span style="color: #000080">binary</span></span>, <span style="color: #009900">Data</span><span style="color: #990000">/</span><span style="font-weight: bold"><span style="color: #000080">binary</span></span> <span style="color: #990000">&gt;&gt;</span>);
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Data</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #990000">&lt;&lt;</span> <span style="color: #009900">Acc</span><span style="color: #990000">/</span><span style="font-weight: bold"><span style="color: #000080">binary</span></span>, <span style="color: #009900">Data</span><span style="color: #990000">/</span><span style="font-weight: bold"><span style="color: #000080">binary</span></span> <span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req</span>}
- <span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Read all part headers, skipping bodies</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">acc_multipart</font></b>(<font color="#009900">Req0</font>, <font color="#009900">Acc</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">case</font></b> <b><font color="#000000">cowboy_req:read_part</font></b>(<font color="#009900">Req0</font>) <b><font color="#0000FF">of</font></b>
+ {<font color="#FF6600">ok</font>, <font color="#009900">Headers</font>, <font color="#009900">Req1</font>} <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <font color="#009900">Body</font>, <font color="#009900">Req</font>} <font color="#990000">=</font> <b><font color="#000000">stream_body</font></b>(<font color="#009900">Req1</font>, <font color="#990000">&lt;&lt;&gt;&gt;</font>),
+ <b><font color="#000000">acc_multipart</font></b>(<font color="#009900">Req</font>, [{<font color="#009900">Headers</font>, <font color="#009900">Body</font>}|<font color="#009900">Acc</font>]);
+ {<font color="#FF6600">done</font>, <font color="#009900">Req</font>} <font color="#990000">-&gt;</font>
+ {<b><font color="#000000">lists:reverse</font></b>(<font color="#009900">Acc</font>), <font color="#009900">Req</font>}
+ <b><font color="#0000FF">end</font></b><font color="#990000">.</font>
+
+<b><font color="#000000">stream_body</font></b>(<font color="#009900">Req0</font>, <font color="#009900">Acc</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">case</font></b> <b><font color="#000000">cowboy_req:read_part_body</font></b>(<font color="#009900">Req0</font>) <b><font color="#0000FF">of</font></b>
+ {<font color="#FF6600">more</font>, <font color="#009900">Data</font>, <font color="#009900">Req</font>} <font color="#990000">-&gt;</font>
+ <b><font color="#000000">stream_body</font></b>(<font color="#009900">Req</font>, <font color="#990000">&lt;&lt;</font> <font color="#009900">Acc</font><font color="#990000">/</font><b><font color="#000080">binary</font></b>, <font color="#009900">Data</font><font color="#990000">/</font><b><font color="#000080">binary</font></b> <font color="#990000">&gt;&gt;</font>);
+ {<font color="#FF6600">ok</font>, <font color="#009900">Data</font>, <font color="#009900">Req</font>} <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <font color="#990000">&lt;&lt;</font> <font color="#009900">Acc</font><font color="#990000">/</font><b><font color="#000080">binary</font></b>, <font color="#009900">Data</font><font color="#990000">/</font><b><font color="#000080">binary</font></b> <font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>}
+ <b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Read all part headers, skipping bodies</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">skip_body_multipart</span></span>(<span style="color: #009900">Req0</span>, <span style="color: #009900">Acc</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">cowboy_req:read_part</span></span>(<span style="color: #009900">Req0</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Headers</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #000000">skip_body_multipart</span></span>(<span style="color: #009900">Req</span>, [<span style="color: #009900">Headers</span>|<span style="color: #009900">Acc</span>]);
- {<span style="color: #FF6600">done</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">-&gt;</span>
- {<span style="font-weight: bold"><span style="color: #000000">lists:reverse</span></span>(<span style="color: #009900">Acc</span>), <span style="color: #009900">Req</span>}
- <span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Read a part header in larger chunks</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">skip_body_multipart</font></b>(<font color="#009900">Req0</font>, <font color="#009900">Acc</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">case</font></b> <b><font color="#000000">cowboy_req:read_part</font></b>(<font color="#009900">Req0</font>) <b><font color="#0000FF">of</font></b>
+ {<font color="#FF6600">ok</font>, <font color="#009900">Headers</font>, <font color="#009900">Req</font>} <font color="#990000">-&gt;</font>
+ <b><font color="#000000">skip_body_multipart</font></b>(<font color="#009900">Req</font>, [<font color="#009900">Headers</font>|<font color="#009900">Acc</font>]);
+ {<font color="#FF6600">done</font>, <font color="#009900">Req</font>} <font color="#990000">-&gt;</font>
+ {<b><font color="#000000">lists:reverse</font></b>(<font color="#009900">Acc</font>), <font color="#009900">Req</font>}
+ <b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Read a part header in larger chunks</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: #FF6600">ok</span>, <span style="color: #009900">Headers</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:read_part</span></span>(<span style="color: #009900">Req0</span>, #{<span style="font-weight: bold"><span style="color: #000080">length</span></span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">1000000</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#009900">Headers</font>, <font color="#009900">Req</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:read_part</font></b>(<font color="#009900">Req0</font>, #{<b><font color="#000080">length</font></b> <font color="#990000">=&gt;</font> <font color="#993399">1000000</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
<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.has_body">cowboy_req:has_body(3)</a>,
-<a href="../cowboy_req.body_length">cowboy_req:body_length(3)</a>,
-<a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a>,
-<a href="../cowboy_req.read_urlencoded_body">cowboy_req:read_urlencoded_body(3)</a>,
-<a href="../cowboy_req.read_part_body">cowboy_req:read_part_body(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.has_body">cowboy_req:has_body(3)</a>, <a href="../cowboy_req.body_length">cowboy_req:body_length(3)</a>, <a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a>, <a href="../cowboy_req.read_urlencoded_body">cowboy_req:read_urlencoded_body(3)</a>, <a href="../cowboy_req.read_part_body">cowboy_req:read_part_body(3)</a></p>
+
diff --git a/docs/en/cowboy/2.4/manual/cowboy_req.read_part_body/index.html b/docs/en/cowboy/2.4/manual/cowboy_req.read_part_body/index.html
index 340bb2cb..403a6271 100644
--- a/docs/en/cowboy/2.4/manual/cowboy_req.read_part_body/index.html
+++ b/docs/en/cowboy/2.4/manual/cowboy_req.read_part_body/index.html
@@ -62,130 +62,70 @@
<h1 class="lined-header"><span>cowboy_req:read_part_body(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:read_part_body - Read the current part&#8217;s body</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:read_part_body - Read the current part&apos;s body</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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_part_body</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">read_part_body</span></span>(<span style="color: #009900">Req</span>, #{})
-
-<span style="font-weight: bold"><span style="color: #000000">read_part_body</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: #FF6600">ok</span>, <span style="color: #009900">Data</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: #FF6600">more</span>, <span style="color: #009900">Data</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">Opts</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:read_body_opts</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Read the body of the current part of the multipart message.</p></div>
-<div class="paragraph"><p>This function reads the request body and parses it as
-multipart. Each parts of a multipart representation have
-their own headers and body. This function returns the
-body of the current part. Examples of multipart media types
-are <code>multipart/form-data</code> and <code>multipart/byteranges</code>.</p></div>
-<div class="paragraph"><p>This function reads a chunk of the part&#8217;s body. A <code>more</code> tuple
-is returned when more data remains to be read. Call the function
-repeatedly until an <code>ok</code> tuple is returned to read the entire body.</p></div>
-<div class="paragraph"><p>Once a part has been read, it can not be read again.</p></div>
-<div class="paragraph"><p>Once the body has been read, Cowboy sets the content-length
-header if it was not previously provided.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">read_part_body</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> <b><font color="#000000">read_part_body</font></b>(<font color="#009900">Req</font>, #{})
+
+<b><font color="#000000">read_part_body</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>(), <font color="#009900">Opts</font>)
+ <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <font color="#009900">Data</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">Req</font>}
+ | {<font color="#FF6600">more</font>, <font color="#009900">Data</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">Req</font>}
+
+<font color="#009900">Opts</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:read_body_opts</font></b>()</tt></pre>
+</div></div>
+<p>Read the body of the current part of the multipart message.</p>
+<p>This function reads the request body and parses it as multipart. Each parts of a multipart representation have their own headers and body. This function returns the body of the current part. Examples of multipart media types are <code>multipart/form-data</code> and <code>multipart/byteranges</code>.</p>
+<p>This function reads a chunk of the part&apos;s body. A <code>more</code> tuple is returned when more data remains to be read. Call the function repeatedly until an <code>ok</code> tuple is returned to read the entire body.</p>
+<p>Once a part has been read, it can not be read again.</p>
+<p>Once the body has been read, Cowboy sets the content-length header if it was not previously provided.</p>
+<!-- @todo Limit the maximum size of multipart headers.-->
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-<dt class="hdlist1">
-Opts
-</dt>
-<dd>
-<p>
-A map of body reading options. Please refer to
-<a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a>
-for details about each option.
-</p>
-<div class="paragraph"><p>This function uses the same default options as the
-<a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a>
-function.</p></div>
+<dt>Opts</dt>
+<dd><p>A map of body reading options. Please refer to <a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a> for details about each option.</p>
+<p>This function uses the same default options as the <a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a> function.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A <code>more</code> tuple is returned when there are more data to be read.</p></div>
-<div class="paragraph"><p>An <code>ok</code> tuple is returned when there are no more data to be read.</p></div>
-<div class="paragraph"><p>The data is always returned as a binary.</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.
-For example it may have an added content-length header once the
-body has been read.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>A <code>more</code> tuple is returned when there are more data to be read.</p>
+<p>An <code>ok</code> tuple is returned when there are no more data to be read.</p>
+<p>The data is always returned as a binary.</p>
+<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. For example it may have an added content-length header once the body has been read.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced. Replaces <code>part_body/1,2</code>.
-</p>
+<ul><li><strong>2.0</strong>: Function introduced. Replaces <code>part_body/1,2</code>.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Read a full part&#8217;s body</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Read a full part&apos;s body</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">stream_body</span></span>(<span style="color: #009900">Req0</span>, <span style="color: #009900">Acc</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">cowboy_req:read_part_body</span></span>(<span style="color: #009900">Req0</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
- {<span style="color: #FF6600">more</span>, <span style="color: #009900">Data</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #000000">stream_body</span></span>(<span style="color: #009900">Req</span>, <span style="color: #990000">&lt;&lt;</span> <span style="color: #009900">Acc</span><span style="color: #990000">/</span><span style="font-weight: bold"><span style="color: #000080">binary</span></span>, <span style="color: #009900">Data</span><span style="color: #990000">/</span><span style="font-weight: bold"><span style="color: #000080">binary</span></span> <span style="color: #990000">&gt;&gt;</span>);
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Data</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #990000">&lt;&lt;</span> <span style="color: #009900">Acc</span><span style="color: #990000">/</span><span style="font-weight: bold"><span style="color: #000080">binary</span></span>, <span style="color: #009900">Data</span><span style="color: #990000">/</span><span style="font-weight: bold"><span style="color: #000080">binary</span></span> <span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req</span>}
- <span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Ensure a part&#8217;s body is smaller than 64KB</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">stream_body</font></b>(<font color="#009900">Req0</font>, <font color="#009900">Acc</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">case</font></b> <b><font color="#000000">cowboy_req:read_part_body</font></b>(<font color="#009900">Req0</font>) <b><font color="#0000FF">of</font></b>
+ {<font color="#FF6600">more</font>, <font color="#009900">Data</font>, <font color="#009900">Req</font>} <font color="#990000">-&gt;</font>
+ <b><font color="#000000">stream_body</font></b>(<font color="#009900">Req</font>, <font color="#990000">&lt;&lt;</font> <font color="#009900">Acc</font><font color="#990000">/</font><b><font color="#000080">binary</font></b>, <font color="#009900">Data</font><font color="#990000">/</font><b><font color="#000080">binary</font></b> <font color="#990000">&gt;&gt;</font>);
+ {<font color="#FF6600">ok</font>, <font color="#009900">Data</font>, <font color="#009900">Req</font>} <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <font color="#990000">&lt;&lt;</font> <font color="#009900">Acc</font><font color="#990000">/</font><b><font color="#000080">binary</font></b>, <font color="#009900">Data</font><font color="#990000">/</font><b><font color="#000080">binary</font></b> <font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>}
+ <b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Ensure a part&apos;s body is smaller than 64KB</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: #FF6600">ok</span>, <span style="color: #009900">Body</span>, <span style="color: #009900">Req</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">Req0</span>, #{<span style="font-weight: bold"><span style="color: #000080">length</span></span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">64000</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#009900">Body</font>, <font color="#009900">Req</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:read_part_body</font></b>(<font color="#009900">Req0</font>, #{<b><font color="#000080">length</font></b> <font color="#990000">=&gt;</font> <font color="#993399">64000</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
<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.has_body">cowboy_req:has_body(3)</a>,
-<a href="../cowboy_req.body_length">cowboy_req:body_length(3)</a>,
-<a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a>,
-<a href="../cowboy_req.read_urlencoded_body">cowboy_req:read_urlencoded_body(3)</a>,
-<a href="../cowboy_req.read_part">cowboy_req:read_part(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.has_body">cowboy_req:has_body(3)</a>, <a href="../cowboy_req.body_length">cowboy_req:body_length(3)</a>, <a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a>, <a href="../cowboy_req.read_urlencoded_body">cowboy_req:read_urlencoded_body(3)</a>, <a href="../cowboy_req.read_part">cowboy_req:read_part(3)</a></p>
+
diff --git a/docs/en/cowboy/2.4/manual/cowboy_req.read_urlencoded_body/index.html b/docs/en/cowboy/2.4/manual/cowboy_req.read_urlencoded_body/index.html
index 9565153e..be73fe71 100644
--- a/docs/en/cowboy/2.4/manual/cowboy_req.read_urlencoded_body/index.html
+++ b/docs/en/cowboy/2.4/manual/cowboy_req.read_urlencoded_body/index.html
@@ -62,126 +62,64 @@
<h1 class="lined-header"><span>cowboy_req:read_urlencoded_body(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:read_urlencoded_body - Read and parse a urlencoded request body</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:read_urlencoded_body - Read and parse a urlencoded request body</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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_urlencoded_body</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">read_urlencoded_body</span></span>(<span style="color: #009900">Req</span>, #{})
-
-<span style="font-weight: bold"><span style="color: #000000">read_urlencoded_body</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: #FF6600">ok</span>, <span style="color: #009900">Body</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">Body</span> <span style="color: #990000">::</span> [{<span style="color: #009900">Key</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="color: #009900">Value</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>() | <span style="color: #000080">true</span>}]</tt></pre></div></div>
-<div class="paragraph"><p>Read and parse a urlencoded request body.</p></div>
-<div class="paragraph"><p>This function reads the request body and parses it as
-<code>application/x-www-form-urlencoded</code>. It returns a list
-of key/values.</p></div>
-<div class="paragraph"><p>The urlencoded media type is used by Web browsers when
-submitting HTML forms using the POST method.</p></div>
-<div class="paragraph"><p>Cowboy needs to read the full body before parsing. By default
-it will read bodies of size up to 64KB. It is possible to
-provide options to read larger bodies if required.</p></div>
-<div class="paragraph"><p>Cowboy will automatically handle protocol details including
-the expect header, chunked transfer-encoding and others.</p></div>
-<div class="paragraph"><p>Once the body has been read, Cowboy sets the content-length
-header if it was not previously provided.</p></div>
-<div class="paragraph"><p>This function can only be called once. Calling it again will
-result in undefined behavior.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">read_urlencoded_body</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> <b><font color="#000000">read_urlencoded_body</font></b>(<font color="#009900">Req</font>, #{})
+
+<b><font color="#000000">read_urlencoded_body</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>(), <font color="#009900">Opts</font>)
+ <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <font color="#009900">Body</font>, <font color="#009900">Req</font>}
+
+<font color="#009900">Opts</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:read_body_opts</font></b>()
+<font color="#009900">Body</font> <font color="#990000">::</font> [{<font color="#009900">Key</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() | <font color="#000080">true</font>}]</tt></pre>
+</div></div>
+<p>Read and parse a urlencoded request body.</p>
+<p>This function reads the request body and parses it as <code>application/x-www-form-urlencoded</code>. It returns a list of key/values.</p>
+<p>The urlencoded media type is used by Web browsers when submitting HTML forms using the POST method.</p>
+<p>Cowboy needs to read the full body before parsing. By default it will read bodies of size up to 64KB. It is possible to provide options to read larger bodies if required.</p>
+<p>Cowboy will automatically handle protocol details including the expect header, chunked transfer-encoding and others.</p>
+<p>Once the body has been read, Cowboy sets the content-length header if it was not previously provided.</p>
+<p>This function can only be called once. Calling it again will result in undefined behavior.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-<dt class="hdlist1">
-Opts
-</dt>
-<dd>
-<p>
-A map of body reading options. Please refer to
-<a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a>
-for details about each option.
-</p>
-<div class="paragraph"><p>This function defaults the <code>length</code> to 64KB and the <code>period</code>
-to 5 seconds.</p></div>
+<dt>Opts</dt>
+<dd><p>A map of body reading options. Please refer to <a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a> for details about each option.</p>
+<p>This function defaults the <code>length</code> to 64KB and the <code>period</code> to 5 seconds.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>An <code>ok</code> tuple is returned containing a list of key/values found
-in the body.</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.
-For example it may have an added content-length header once the
-body has been read.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>An <code>ok</code> tuple is returned containing a list of key/values found in the body.</p>
+<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. For example it may have an added content-length header once the body has been read.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced. Replaces <code>body_qs/1,2</code>.
-</p>
+<ul><li><strong>2.0</strong>: Function introduced. Replaces <code>body_qs/1,2</code>.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Read a urlencoded body</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Read a urlencoded body</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: #FF6600">ok</span>, <span style="color: #009900">Body</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:read_urlencoded_body</span></span>(<span style="color: #009900">Req0</span>),
-{<span style="color: #990000">_</span>, <span style="color: #009900">Lang</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">lists:keyfind</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"lang"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #993399">1</span>, <span style="color: #009900">Body</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Allow large urlencoded bodies</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#009900">Body</font>, <font color="#009900">Req</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:read_urlencoded_body</font></b>(<font color="#009900">Req0</font>),
+{<font color="#990000">_</font>, <font color="#009900">Lang</font>} <font color="#990000">=</font> <b><font color="#000000">lists:keyfind</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"lang"</font><font color="#990000">&gt;&gt;</font>, <font color="#993399">1</font>, <font color="#009900">Body</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Allow large urlencoded bodies</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: #FF6600">ok</span>, <span style="color: #009900">Body</span>, <span style="color: #009900">Req</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:read_urlencoded_body</span></span>(<span style="color: #009900">Req0</span>, #{<span style="font-weight: bold"><span style="color: #000080">length</span></span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">1000000</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#009900">Body</font>, <font color="#009900">Req</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:read_urlencoded_body</font></b>(<font color="#009900">Req0</font>, #{<b><font color="#000080">length</font></b> <font color="#990000">=&gt;</font> <font color="#993399">1000000</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
<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.has_body">cowboy_req:has_body(3)</a>,
-<a href="../cowboy_req.body_length">cowboy_req:body_length(3)</a>,
-<a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a>,
-<a href="../cowboy_req.read_part">cowboy_req:read_part(3)</a>,
-<a href="../cowboy_req.read_part_body">cowboy_req:read_part_body(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.has_body">cowboy_req:has_body(3)</a>, <a href="../cowboy_req.body_length">cowboy_req:body_length(3)</a>, <a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a>, <a href="../cowboy_req.read_part">cowboy_req:read_part(3)</a>, <a href="../cowboy_req.read_part_body">cowboy_req:read_part_body(3)</a></p>
+
diff --git a/docs/en/cowboy/2.4/manual/cowboy_req.reply/index.html b/docs/en/cowboy/2.4/manual/cowboy_req.reply/index.html
index e980e297..bb8a0c83 100644
--- a/docs/en/cowboy/2.4/manual/cowboy_req.reply/index.html
+++ b/docs/en/cowboy/2.4/manual/cowboy_req.reply/index.html
@@ -62,165 +62,87 @@
<h1 class="lined-header"><span>cowboy_req:reply(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:reply - Send the response</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:reply - Send the response</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">reply</span></span>(<span style="color: #009900">Status</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">reply</span></span>(<span style="color: #009900">StatusCode</span>, #{}, <span style="color: #009900">Req</span>)
-
-<span style="font-weight: bold"><span style="color: #000000">reply</span></span>(<span style="color: #009900">Status</span>, <span style="color: #009900">Headers</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">Req</span>
-
-<span style="font-weight: bold"><span style="color: #000000">reply</span></span>(<span style="color: #009900">Status</span>, <span style="color: #009900">Headers</span>, <span style="color: #009900">Body</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">Req</span>
-
-<span style="color: #009900">Status</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:http_status</span></span>()
-<span style="color: #009900">Headers</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:http_headers</span></span>()
-<span style="color: #009900">Body</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:resp_body</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Send the response.</p></div>
-<div class="paragraph"><p>The header names must be given as lowercase binary strings.
-While header names are case insensitive, Cowboy requires them
-to be given as lowercase to function properly.</p></div>
-<div class="paragraph"><p>Cowboy does not allow duplicate header names. Headers set
-by this function may overwrite those set by <code>set_resp_header/3</code>
-and <code>set_resp_headers/2</code>.</p></div>
-<div class="paragraph"><p>Use <a href="../cowboy_req.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a>
-instead of this function to set cookies.</p></div>
-<div class="paragraph"><p>The <code>reply/2,3</code> functions will send the body set previously,
-if any. The <code>reply/4</code> function always sends the given body,
-overriding any previously set.</p></div>
-<div class="paragraph"><p>You do not need to set the content-length header when
-sending a response body. Cowboy takes care of it automatically.
-You should however provide a content-type header.</p></div>
-<div class="paragraph"><p>No further data can be transmitted after this function
-returns. This includes the push mechanism. Attempting to
-send two replies, or to push resources after a reply has
-been sent, will result in an error.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">reply</font></b>(<font color="#009900">Status</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> <b><font color="#000000">reply</font></b>(<font color="#009900">StatusCode</font>, #{}, <font color="#009900">Req</font>)
+
+<b><font color="#000000">reply</font></b>(<font color="#009900">Status</font>, <font color="#009900">Headers</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> <font color="#009900">Req</font>
+
+<b><font color="#000000">reply</font></b>(<font color="#009900">Status</font>, <font color="#009900">Headers</font>, <font color="#009900">Body</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> <font color="#009900">Req</font>
+
+<font color="#009900">Status</font> <font color="#990000">::</font> <b><font color="#000000">cowboy:http_status</font></b>()
+<font color="#009900">Headers</font> <font color="#990000">::</font> <b><font color="#000000">cowboy:http_headers</font></b>()
+<font color="#009900">Body</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:resp_body</font></b>()</tt></pre>
+</div></div>
+<p>Send the response.</p>
+<p>The header names must be given as lowercase binary strings. While header names are case insensitive, Cowboy requires them to be given as lowercase to function properly.</p>
+<p>Cowboy does not allow duplicate header names. Headers set by this function may overwrite those set by <code>set_resp_header/3</code> and <code>set_resp_headers/2</code>.</p>
+<p>Use <a href="../cowboy_req.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a> instead of this function to set cookies.</p>
+<p>The <code>reply/2,3</code> functions will send the body set previously, if any. The <code>reply/4</code> function always sends the given body, overriding any previously set.</p>
+<p>You do not need to set the content-length header when sending a response body. Cowboy takes care of it automatically. You should however provide a content-type header.</p>
+<p>No further data can be transmitted after this function returns. This includes the push mechanism. Attempting to send two replies, or to push resources after a reply has been sent, will result in an error.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Status
-</dt>
-<dd>
-<p>
-The status code for the response.
-</p>
+<dl><dt>Status</dt>
+<dd><p>The status code for the response.</p>
</dd>
-<dt class="hdlist1">
-Headers
-</dt>
-<dd>
-<p>
-The response headers.
-</p>
+<dt>Headers</dt>
+<dd><p>The response headers.</p>
</dd>
-</dl></div>
-<div class="paragraph"><p>Header names must be given as lowercase binary strings.</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Body
-</dt>
-<dd>
-<p>
-The body can be either a binary value, an iolist or a
-<code>sendfile</code> tuple telling Cowboy to send the contents of
-a file.
-</p>
+</dl>
+<p>Header names must be given as lowercase binary strings.</p>
+<dl><dt>Body</dt>
+<dd><p>The body can be either a binary value, an iolist or a <code>sendfile</code> tuple telling Cowboy to send the contents of a file.</p>
</dd>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A new Req object is returned.</p></div>
-<div class="paragraph"><p>The returned Req object should be used from that point onward
-as it contains updated information about the state of the request.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>A new Req object is returned.</p>
+<p>The returned Req object should be used from that point onward as it contains updated information about the state of the request.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Only the Req is returned, it is no longer wrapped in a tuple.
-</p>
+<ul><li><strong>2.0</strong>: Only the Req is returned, it is no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Reply</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Reply</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: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:reply</span></span>(<span style="color: #993399">404</span>, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Reply with custom headers</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:reply</font></b>(<font color="#993399">404</font>, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Reply with custom 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">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">401</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"www-authenticate"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Basic realm=\"erlang.org\""</span><span style="color: #990000">&gt;&gt;</span>
-}, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Reply with custom headers and a body</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:reply</font></b>(<font color="#993399">401</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"www-authenticate"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"Basic realm=\"erlang.org\""</font><font color="#990000">&gt;&gt;</font>
+}, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Reply with custom headers and a body</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: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:reply</span></span>(<span style="color: #993399">200</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/plain"</span><span style="color: #990000">&gt;&gt;</span>
-}, <span style="color: #FF0000">"Hello world!"</span>, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:reply</font></b>(<font color="#993399">200</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/plain"</font><font color="#990000">&gt;&gt;</font>
+}, <font color="#FF0000">"Hello world!"</font>, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a>,
-<a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a>,
-<a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a>,
-<a href="../cowboy_req.set_resp_body">cowboy_req:set_resp_body(3)</a>,
-<a href="../cowboy_req.inform">cowboy_req:inform(3)</a>,
-<a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a>,
-<a href="../cowboy_req.push">cowboy_req:push(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a>, <a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a>, <a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a>, <a href="../cowboy_req.set_resp_body">cowboy_req:set_resp_body(3)</a>, <a href="../cowboy_req.inform">cowboy_req:inform(3)</a>, <a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a>, <a href="../cowboy_req.push">cowboy_req:push(3)</a></p>
+
diff --git a/docs/en/cowboy/2.4/manual/cowboy_req.resp_header/index.html b/docs/en/cowboy/2.4/manual/cowboy_req.resp_header/index.html
index 76d70761..9a11c12d 100644
--- a/docs/en/cowboy/2.4/manual/cowboy_req.resp_header/index.html
+++ b/docs/en/cowboy/2.4/manual/cowboy_req.resp_header/index.html
@@ -62,113 +62,58 @@
<h1 class="lined-header"><span>cowboy_req:resp_header(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:resp_header - Response header</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:resp_header - Response header</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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_header</span></span>(<span style="color: #009900">Name</span>, <span style="color: #009900">Req</span>) <span style="color: #990000">-&gt;</span> <span style="font-weight: bold"><span style="color: #000000">resp_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">resp_header</span></span>(<span style="color: #009900">Name</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">Name</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: #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">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>Return the value for the given response header.</p></div>
-<div class="paragraph"><p>The response header must have been set previously using
-<a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a> or
-<a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a>.</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>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">resp_header</font></b>(<font color="#009900">Name</font>, <font color="#009900">Req</font>) <font color="#990000">-&gt;</font> <b><font color="#000000">resp_header</font></b>(<font color="#009900">Name</font>, <font color="#009900">Req</font>, <font color="#000080">undefined</font>)
+<b><font color="#000000">resp_header</font></b>(<font color="#009900">Name</font>, <font color="#009900">Req</font>, <font color="#009900">Default</font>) <font color="#990000">-&gt;</font> <b><font color="#000080">binary</font></b>() | <font color="#009900">Default</font>
+
+<font color="#009900">Name</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% lowercase; case insensitive</font></i>
+<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()</tt></pre>
+</div></div>
+<p>Return the value for the given response header.</p>
+<p>The response header must have been set previously using <a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a> or <a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a>.</p>
+<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>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Name
-</dt>
-<dd>
-<p>
-Desired response header name as a lowercase binary string.
-</p>
+<dl><dt>Name</dt>
+<dd><p>Desired response header name as a lowercase binary string.</p>
</dd>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dt>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>
+<dt>Default</dt>
+<dd><p>Default value returned when the header is missing.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<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">
+<p>The header value is returned as a binary string. When the header is missing, the default argument is returned.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced.
-</p>
+<ul><li><strong>2.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Get the content-type response header</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Get the content-type response 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">Type</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:resp_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</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-type response header with a default value</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Type</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:resp_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Get the content-type response 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">Type</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:resp_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</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">"text/html"</span><span style="color: #990000">&gt;&gt;</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Type</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:resp_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/html"</font><font color="#990000">&gt;&gt;</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.resp_headers">cowboy_req:resp_headers(3)</a>,
-<a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a>,
-<a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.resp_headers">cowboy_req:resp_headers(3)</a>, <a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a>, <a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a></p>
+
diff --git a/docs/en/cowboy/2.4/manual/cowboy_req.resp_headers/index.html b/docs/en/cowboy/2.4/manual/cowboy_req.resp_headers/index.html
index 54cc8537..a0c4ff34 100644
--- a/docs/en/cowboy/2.4/manual/cowboy_req.resp_headers/index.html
+++ b/docs/en/cowboy/2.4/manual/cowboy_req.resp_headers/index.html
@@ -62,79 +62,38 @@
<h1 class="lined-header"><span>cowboy_req:resp_headers(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:resp_headers - Response headers</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:resp_headers - Response headers</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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_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 response headers.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">resp_headers</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <b><font color="#000000">cowboy:http_headers</font></b>()</tt></pre>
+</div></div>
+<p>Return all response headers.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<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">
+<p>Headers are returned as a map with keys being lowercase binary strings, and values as binary strings.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced.
-</p>
+<ul><li><strong>2.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Get all response headers</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Get all response 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:resp_headers</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Headers</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:resp_headers</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.resp_header">cowboy_req:resp_header(3)</a>,
-<a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a>,
-<a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.resp_header">cowboy_req:resp_header(3)</a>, <a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a>, <a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a></p>
+
diff --git a/docs/en/cowboy/2.4/manual/cowboy_req.scheme/index.html b/docs/en/cowboy/2.4/manual/cowboy_req.scheme/index.html
index a1227edf..3f73db92 100644
--- a/docs/en/cowboy/2.4/manual/cowboy_req.scheme/index.html
+++ b/docs/en/cowboy/2.4/manual/cowboy_req.scheme/index.html
@@ -62,89 +62,52 @@
<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">
+<p>cowboy_req:scheme - URI scheme</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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
+<pre><tt><b><font color="#000000">scheme</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <font color="#009900">Scheme</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()</tt></pre>
+</div></div>
+<p>Return the scheme of the effective request URI.</p>
+<p>The scheme can also be obtained using pattern matching:</p>
+<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">
+<pre><tt>#{<font color="#FF6600">scheme</font> <font color="#990000">:=</font> <font color="#009900">Scheme</font>} <font color="#990000">=</font> <font color="#009900">Req</font><font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<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">
+<p>The scheme is returned as a binary. It is case insensitive.</p>
+<p>Cowboy will only set the scheme to <code>&lt;&lt;&quot;http&quot;&gt;&gt;</code> or <code>&lt;&lt;&quot;https&quot;&gt;&gt;</code>.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced.
-</p>
+<ul><li><strong>2.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<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
+<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">
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req0</font><font color="#990000">=</font>#{<font color="#FF6600">scheme</font> <font color="#990000">:=</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"http"</font><font color="#990000">&gt;&gt;</font>}, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ <font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:reply</font></b>(<font color="#993399">302</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"location"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <b><font color="#000000">cowboy_req:uri</font></b>(<font color="#009900">Req</font>, #{<font color="#0000FF">scheme</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"https"</font><font color="#990000">&gt;&gt;</font>})
+ }, <font color="#009900">Req0</font>),
+ {<font color="#FF6600">ok</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>};
+<b><font color="#000000">init</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">cowboy_rest</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
<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>
+<p><a href="../cowboy_req">cowboy_req(3)</a></p>
+
diff --git a/docs/en/cowboy/2.4/manual/cowboy_req.set_resp_body/index.html b/docs/en/cowboy/2.4/manual/cowboy_req.set_resp_body/index.html
index a41023dd..20331259 100644
--- a/docs/en/cowboy/2.4/manual/cowboy_req.set_resp_body/index.html
+++ b/docs/en/cowboy/2.4/manual/cowboy_req.set_resp_body/index.html
@@ -62,138 +62,79 @@
<h1 class="lined-header"><span>cowboy_req:set_resp_body(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:set_resp_body - Set the response body</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:set_resp_body - Set the response body</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">set_resp_body</span></span>(<span style="color: #009900">Body</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">Req</span>
-
-<span style="color: #009900">Body</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:resp_body</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Set the response body.</p></div>
-<div class="paragraph"><p>The response body will be sent when a reply is initiated.
-Note that the functions <code>stream_reply/2,3</code> and <code>reply/4</code>
-will override the body set by this function.</p></div>
-<div class="paragraph"><p>This function can also be used to remove a response body
-that was set previously. To do so, simply call this function
-with an empty body.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">set_resp_body</font></b>(<font color="#009900">Body</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> <font color="#009900">Req</font>
+
+<font color="#009900">Body</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:resp_body</font></b>()</tt></pre>
+</div></div>
+<p>Set the response body.</p>
+<p>The response body will be sent when a reply is initiated. Note that the functions <code>stream_reply/2,3</code> and <code>reply/4</code> will override the body set by this function.</p>
+<p>This function can also be used to remove a response body that was set previously. To do so, simply call this function with an empty body.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Body
-</dt>
-<dd>
-<p>
-The body can be either a binary value, an iolist or a
-<code>sendfile</code> tuple telling Cowboy to send the contents of
-a file.
-</p>
+<dl><dt>Body</dt>
+<dd><p>The body can be either a binary value, an iolist or a <code>sendfile</code> tuple telling Cowboy to send the contents of a file.</p>
</dd>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A new Req object is returned.</p></div>
-<div class="paragraph"><p>The returned Req object must be used from that point onward,
-otherwise the body will not be sent in the response.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>A new Req object is returned.</p>
+<p>The returned Req object must be used from that point onward, otherwise the body will not be sent in the response.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: The function now accepts a <code>sendfile</code> tuple.
-</p>
+<ul><li><strong>2.0</strong>: The function now accepts a <code>sendfile</code> tuple.
</li>
-<li>
-<p>
-<strong>2.0</strong>: The <code>set_resp_body_fun/2,3</code> functions were removed.
-</p>
+<li><strong>2.0</strong>: The <code>set_resp_body_fun/2,3</code> functions were removed.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Set the response body</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Set the response body</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: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_body</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Hello world!"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Set the response body as an iolist</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_body</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"Hello world!"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Set the response body as an iolist</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: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_body</span></span>([
- <span style="color: #FF0000">"&lt;html&gt;&lt;head&gt;&lt;title&gt;"</span>,
- <span style="font-weight: bold"><span style="color: #000000">page_title</span></span>(),
- <span style="color: #FF0000">"&lt;/title&gt;&lt;/head&gt;&lt;body&gt;"</span>,
- <span style="font-weight: bold"><span style="color: #000000">page_body</span></span>(),
- <span style="color: #FF0000">"&lt;/body&gt;&lt;/html&gt;"</span>
-], <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Tell Cowboy to send data from a file</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_body</font></b>([
+ <font color="#FF0000">"&lt;html&gt;&lt;head&gt;&lt;title&gt;"</font>,
+ <b><font color="#000000">page_title</font></b>(),
+ <font color="#FF0000">"&lt;/title&gt;&lt;/head&gt;&lt;body&gt;"</font>,
+ <b><font color="#000000">page_body</font></b>(),
+ <font color="#FF0000">"&lt;/body&gt;&lt;/html&gt;"</font>
+], <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Tell Cowboy to send data from a file</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: #FF6600">ok</span>, <span style="color: #008080">#file_info</span>{<span style="font-weight: bold"><span style="color: #000080">size</span></span><span style="color: #990000">=</span><span style="color: #009900">Size</span>}} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">file:read_file_info</span></span>(<span style="color: #009900">Filename</span>),
-<span style="color: #009900">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_body</span></span>({<span style="color: #FF6600">sendfile</span>, <span style="color: #993399">0</span>, <span style="color: #009900">Size</span>, <span style="color: #009900">Filename</span>}, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Clear any previously set response body</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#008080">#file_info</font>{<b><font color="#000080">size</font></b><font color="#990000">=</font><font color="#009900">Size</font>}} <font color="#990000">=</font> <b><font color="#000000">file:read_file_info</font></b>(<font color="#009900">Filename</font>),
+<font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_body</font></b>({<font color="#FF6600">sendfile</font>, <font color="#993399">0</font>, <font color="#009900">Size</font>, <font color="#009900">Filename</font>}, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Clear any previously set response body</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: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_body</span></span>(<span style="color: #990000">&lt;&lt;&gt;&gt;</span>, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_body</font></b>(<font color="#990000">&lt;&lt;&gt;&gt;</font>, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.set_resp_header">cowboy_req:set_resp_header(3)</a>,
-<a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a>,
-<a href="../cowboy_req.reply">cowboy_req:reply(3)</a>,
-<a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a>, <a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a>, <a href="../cowboy_req.reply">cowboy_req:reply(3)</a>, <a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a></p>
+
diff --git a/docs/en/cowboy/2.4/manual/cowboy_req.set_resp_cookie/index.html b/docs/en/cowboy/2.4/manual/cowboy_req.set_resp_cookie/index.html
index 157e9162..6844dc8e 100644
--- a/docs/en/cowboy/2.4/manual/cowboy_req.set_resp_cookie/index.html
+++ b/docs/en/cowboy/2.4/manual/cowboy_req.set_resp_cookie/index.html
@@ -62,167 +62,104 @@
<h1 class="lined-header"><span>cowboy_req:set_resp_cookie(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:set_resp_cookie - Set a cookie</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:set_resp_cookie - Set a cookie</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">set_resp_cookie</span></span>(<span style="color: #009900">Name</span>, <span style="color: #009900">Value</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">set_resp_cookie</span></span>(<span style="color: #009900">Name</span>, <span style="color: #009900">Value</span>, [], <span style="color: #009900">Req</span>)
-
-<span style="font-weight: bold"><span style="color: #000000">set_resp_cookie</span></span>(<span style="color: #009900">Name</span>, <span style="color: #009900">Value</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">Req</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="font-style: italic"><span style="color: #9A1900">%% case sensitive</span></span>
-<span style="color: #009900">Value</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>() <span style="font-style: italic"><span style="color: #9A1900">%% case sensitive</span></span>
-<span style="color: #009900">Opts</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cow_cookie:cookie_opts</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Set a cookie to be sent with the response.</p></div>
-<div class="paragraph"><p>Note that cookie names are case sensitive.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">set_resp_cookie</font></b>(<font color="#009900">Name</font>, <font color="#009900">Value</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> <b><font color="#000000">set_resp_cookie</font></b>(<font color="#009900">Name</font>, <font color="#009900">Value</font>, [], <font color="#009900">Req</font>)
+
+<b><font color="#000000">set_resp_cookie</font></b>(<font color="#009900">Name</font>, <font color="#009900">Value</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>(), <font color="#009900">Opts</font>)
+ <font color="#990000">-&gt;</font> <font color="#009900">Req</font>
+
+<font color="#009900">Name</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case sensitive</font></i>
+<font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000000">iodata</font></b>() <i><font color="#9A1900">%% case sensitive</font></i>
+<font color="#009900">Opts</font> <font color="#990000">::</font> <b><font color="#000000">cow_cookie:cookie_opts</font></b>()</tt></pre>
+</div></div>
+<p>Set a cookie to be sent with the response.</p>
+<p>Note that cookie names are case sensitive.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Name
-</dt>
-<dd>
-<p>
-Cookie name.
-</p>
+<dl><dt>Name</dt>
+<dd><p>Cookie name.</p>
</dd>
-<dt class="hdlist1">
-Value
-</dt>
-<dd>
-<p>
-Cookie value.
-</p>
+<dt>Value</dt>
+<dd><p>Cookie value.</p>
</dd>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-<dt class="hdlist1">
-Opts
-</dt>
-<dd>
-<p>
-Cookie options.
-</p>
+<dt>Opts</dt>
+<dd><p>Cookie options.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A new Req object is returned.</p></div>
-<div class="paragraph"><p>The returned Req object must be used from that point onward,
-otherwise the cookie will not be sent in the response.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>A new Req object is returned.</p>
+<p>The returned Req object must be used from that point onward, otherwise the cookie will not be sent in the response.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: <code>set_resp_cookie/3</code> introduced as an alias to <code>set_resp_cookie/4</code> with no options.
-</p>
+<ul><li><strong>2.0</strong>: <code>set_resp_cookie/3</code> introduced as an alias to <code>set_resp_cookie/4</code> with no options.
</li>
-<li>
-<p>
-<strong>2.0</strong>: The first argument type is now <code>binary()</code> instead of <code>iodata()</code>.
-</p>
+<li><strong>2.0</strong>: The first argument type is now <code>binary()</code> instead of <code>iodata()</code>.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Set a session cookie</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Set a session cookie</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">SessionID</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">base64:encode</span></span>(<span style="font-weight: bold"><span style="color: #000000">crypto:strong_rand_bytes</span></span>(<span style="color: #993399">32</span>)),
-<span style="color: #009900">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_cookie</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"sessionid"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">SessionID</span>, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Set a cookie with an expiration time</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">SessionID</font> <font color="#990000">=</font> <b><font color="#000000">base64:encode</font></b>(<b><font color="#000000">crypto:strong_rand_bytes</font></b>(<font color="#993399">32</font>)),
+<font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_cookie</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"sessionid"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">SessionID</font>, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Set a cookie with an expiration time</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: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_cookie</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"lang"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"fr-FR"</span><span style="color: #990000">&gt;&gt;</span>,
- <span style="color: #009900">Req0</span>, #{<span style="color: #0000FF">max_age</span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">3600</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Delete a cookie</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_cookie</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"lang"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"fr-FR"</font><font color="#990000">&gt;&gt;</font>,
+ <font color="#009900">Req0</font>, #{<font color="#0000FF">max_age</font> <font color="#990000">=&gt;</font> <font color="#993399">3600</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Delete a cookie</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: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_cookie</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"sessionid"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;&gt;&gt;</span>,
- <span style="color: #009900">Req0</span>, #{<span style="color: #0000FF">max_age</span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">0</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Set a cookie for a specific domain and path</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_cookie</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"sessionid"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;&gt;&gt;</font>,
+ <font color="#009900">Req0</font>, #{<font color="#0000FF">max_age</font> <font color="#990000">=&gt;</font> <font color="#993399">0</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Set a cookie for a specific domain and 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">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_cookie</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"inaccount"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"1"</span><span style="color: #990000">&gt;&gt;</span>,
- <span style="color: #009900">Req0</span>, #{<span style="color: #0000FF">domain</span> <span style="color: #990000">=&gt;</span> <span style="color: #FF0000">"my.example.org"</span>, <span style="color: #0000FF">path</span> <span style="color: #990000">=&gt;</span> <span style="color: #FF0000">"/account"</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Restrict a cookie to HTTPS</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_cookie</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"inaccount"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"1"</font><font color="#990000">&gt;&gt;</font>,
+ <font color="#009900">Req0</font>, #{<font color="#0000FF">domain</font> <font color="#990000">=&gt;</font> <font color="#FF0000">"my.example.org"</font>, <font color="#0000FF">path</font> <font color="#990000">=&gt;</font> <font color="#FF0000">"/account"</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Restrict a cookie 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="color: #009900">SessionID</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">base64:encode</span></span>(<span style="font-weight: bold"><span style="color: #000000">crypto:strong_rand_bytes</span></span>(<span style="color: #993399">32</span>)),
-<span style="color: #009900">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_cookie</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"sessionid"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">SessionID</span>,
- <span style="color: #009900">Req0</span>, #{<span style="color: #0000FF">secure</span> <span style="color: #990000">=&gt;</span> <span style="color: #000080">true</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Restrict a cookie to HTTP</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">SessionID</font> <font color="#990000">=</font> <b><font color="#000000">base64:encode</font></b>(<b><font color="#000000">crypto:strong_rand_bytes</font></b>(<font color="#993399">32</font>)),
+<font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_cookie</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"sessionid"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">SessionID</font>,
+ <font color="#009900">Req0</font>, #{<font color="#0000FF">secure</font> <font color="#990000">=&gt;</font> <font color="#000080">true</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Restrict a cookie to HTTP</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">SessionID</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">base64:encode</span></span>(<span style="font-weight: bold"><span style="color: #000000">crypto:strong_rand_bytes</span></span>(<span style="color: #993399">32</span>)),
-<span style="color: #009900">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_cookie</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"sessionid"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">SessionID</span>,
- <span style="color: #009900">Req0</span>, #{<span style="color: #0000FF">http_only</span> <span style="color: #990000">=&gt;</span> <span style="color: #000080">true</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">SessionID</font> <font color="#990000">=</font> <b><font color="#000000">base64:encode</font></b>(<b><font color="#000000">crypto:strong_rand_bytes</font></b>(<font color="#993399">32</font>)),
+<font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_cookie</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"sessionid"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">SessionID</font>,
+ <font color="#009900">Req0</font>, #{<font color="#0000FF">http_only</font> <font color="#990000">=&gt;</font> <font color="#000080">true</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
<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.set_resp_header">cowboy_req:set_resp_header(3)</a>,
-<a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a>,
-<a href="../cowboy_req.reply">cowboy_req:reply(3)</a>,
-<a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a>, <a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a>, <a href="../cowboy_req.reply">cowboy_req:reply(3)</a>, <a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a></p>
+
diff --git a/docs/en/cowboy/2.4/manual/cowboy_req.set_resp_header/index.html b/docs/en/cowboy/2.4/manual/cowboy_req.set_resp_header/index.html
index 9bb6ad4a..64350df0 100644
--- a/docs/en/cowboy/2.4/manual/cowboy_req.set_resp_header/index.html
+++ b/docs/en/cowboy/2.4/manual/cowboy_req.set_resp_header/index.html
@@ -62,121 +62,60 @@
<h1 class="lined-header"><span>cowboy_req:set_resp_header(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:set_resp_header - Set a response header</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:set_resp_header - Set a response header</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">set_resp_header</span></span>(<span style="color: #009900">Name</span>, <span style="color: #009900">Value</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">Req</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="font-style: italic"><span style="color: #9A1900">%% lowercase; case insensitive</span></span>
-<span style="color: #009900">Value</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>() <span style="font-style: italic"><span style="color: #9A1900">%% case depends on header</span></span></tt></pre></div></div>
-<div class="paragraph"><p>Set a header to be sent with the response.</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>Cowboy does not allow duplicate header names. Headers set
-by this function may be overwritten by those set from the
-reply functions.</p></div>
-<div class="paragraph"><p>Use <a href="../cowboy_req.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a>
-instead of this function to set cookies.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">set_resp_header</font></b>(<font color="#009900">Name</font>, <font color="#009900">Value</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> <font color="#009900">Req</font>
+
+<font color="#009900">Name</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% lowercase; case insensitive</font></i>
+<font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000000">iodata</font></b>() <i><font color="#9A1900">%% case depends on header</font></i></tt></pre>
+</div></div>
+<p>Set a header to be sent with the response.</p>
+<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>
+<p>Cowboy does not allow duplicate header names. Headers set by this function may be overwritten by those set from the reply functions.</p>
+<p>Use <a href="../cowboy_req.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a> instead of this function to set cookies.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Name
-</dt>
-<dd>
-<p>
-Header name as a lowercase binary string.
-</p>
+<dl><dt>Name</dt>
+<dd><p>Header name as a lowercase binary string.</p>
</dd>
-<dt class="hdlist1">
-Value
-</dt>
-<dd>
-<p>
-Header value.
-</p>
+<dt>Value</dt>
+<dd><p>Header value.</p>
</dd>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A new Req object is returned.</p></div>
-<div class="paragraph"><p>The returned Req object must be used from that point onward,
-otherwise the header will not be sent in the response.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>A new Req object is returned.</p>
+<p>The returned Req object must be used from that point onward, otherwise the header will not be sent in the response.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<ul><li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Set a header in the response</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Set a header in the response</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: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"allow"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #FF0000">"GET"</span>, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Construct a header using iolists</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"allow"</font><font color="#990000">&gt;&gt;</font>, <font color="#FF0000">"GET"</font>, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Construct a header using iolists</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: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"allow"</span><span style="color: #990000">&gt;&gt;</span>,
- [<span style="font-weight: bold"><span style="color: #000000">allowed_methods</span></span>(), <span style="color: #FF0000">", OPTIONS"</span>], <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_header</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"allow"</font><font color="#990000">&gt;&gt;</font>,
+ [<b><font color="#000000">allowed_methods</font></b>(), <font color="#FF0000">", OPTIONS"</font>], <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a>,
-<a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a>,
-<a href="../cowboy_req.has_resp_header">cowboy_req:has_resp_header(3)</a>,
-<a href="../cowboy_req.resp_header">cowboy_req:resp_header(3)</a>,
-<a href="../cowboy_req.resp_headers">cowboy_req:resp_headers(3)</a>,
-<a href="../cowboy_req.delete_resp_header">cowboy_req:delete_resp_header(3)</a>,
-<a href="../cowboy_req.reply">cowboy_req:reply(3)</a>,
-<a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a>, <a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a>, <a href="../cowboy_req.has_resp_header">cowboy_req:has_resp_header(3)</a>, <a href="../cowboy_req.resp_header">cowboy_req:resp_header(3)</a>, <a href="../cowboy_req.resp_headers">cowboy_req:resp_headers(3)</a>, <a href="../cowboy_req.delete_resp_header">cowboy_req:delete_resp_header(3)</a>, <a href="../cowboy_req.reply">cowboy_req:reply(3)</a>, <a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a></p>
+
diff --git a/docs/en/cowboy/2.4/manual/cowboy_req.set_resp_headers/index.html b/docs/en/cowboy/2.4/manual/cowboy_req.set_resp_headers/index.html
index cbd6ade8..7481bf57 100644
--- a/docs/en/cowboy/2.4/manual/cowboy_req.set_resp_headers/index.html
+++ b/docs/en/cowboy/2.4/manual/cowboy_req.set_resp_headers/index.html
@@ -62,109 +62,51 @@
<h1 class="lined-header"><span>cowboy_req:set_resp_headers(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:set_resp_headers - Set several response headers</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:set_resp_headers - Set several response headers</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">set_resp_headers</span></span>(<span style="color: #009900">Headers</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">Req</span>
-
-<span style="color: #009900">Headers</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:http_headers</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Set several headers to be sent with the response.</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>Cowboy does not allow duplicate header names. Headers set
-by this function may be overwritten by those set from the
-reply functions. Likewise, headers set by this function may
-overwrite headers that were set previously.</p></div>
-<div class="paragraph"><p>Use <a href="../cowboy_req.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a>
-instead of this function to set cookies.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">set_resp_headers</font></b>(<font color="#009900">Headers</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> <font color="#009900">Req</font>
+
+<font color="#009900">Headers</font> <font color="#990000">::</font> <b><font color="#000000">cowboy:http_headers</font></b>()</tt></pre>
+</div></div>
+<p>Set several headers to be sent with the response.</p>
+<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>
+<p>Cowboy does not allow duplicate header names. Headers set by this function may be overwritten by those set from the reply functions. Likewise, headers set by this function may overwrite headers that were set previously.</p>
+<p>Use <a href="../cowboy_req.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a> instead of this function to set cookies.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Headers
-</dt>
-<dd>
-<p>
-Headers as a map with keys being lowercase binary strings,
-and values as binary strings.
-</p>
+<dl><dt>Headers</dt>
+<dd><p>Headers as a map with keys being lowercase binary strings, and values as binary strings.</p>
</dd>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A new Req object is returned.</p></div>
-<div class="paragraph"><p>The returned Req object must be used from that point onward,
-otherwise the headers will not be sent in the response.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>A new Req object is returned.</p>
+<p>The returned Req object must be used from that point onward, otherwise the headers will not be sent in the response.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced.
-</p>
+<ul><li><strong>2.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Set several response headers</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Set several response 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">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_headers</span></span>(#{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/html"</span><span style="color: #990000">&gt;&gt;</span>,
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-encoding"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"gzip"</span><span style="color: #990000">&gt;&gt;</span>
-}, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:set_resp_headers</font></b>(#{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/html"</font><font color="#990000">&gt;&gt;</font>,
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-encoding"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"gzip"</font><font color="#990000">&gt;&gt;</font>
+}, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a>,
-<a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a>,
-<a href="../cowboy_req.has_resp_header">cowboy_req:has_resp_header(3)</a>,
-<a href="../cowboy_req.resp_header">cowboy_req:resp_header(3)</a>,
-<a href="../cowboy_req.resp_headers">cowboy_req:resp_headers(3)</a>,
-<a href="../cowboy_req.delete_resp_header">cowboy_req:delete_resp_header(3)</a>,
-<a href="../cowboy_req.reply">cowboy_req:reply(3)</a>,
-<a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a>, <a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a>, <a href="../cowboy_req.has_resp_header">cowboy_req:has_resp_header(3)</a>, <a href="../cowboy_req.resp_header">cowboy_req:resp_header(3)</a>, <a href="../cowboy_req.resp_headers">cowboy_req:resp_headers(3)</a>, <a href="../cowboy_req.delete_resp_header">cowboy_req:delete_resp_header(3)</a>, <a href="../cowboy_req.reply">cowboy_req:reply(3)</a>, <a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a></p>
+
diff --git a/docs/en/cowboy/2.4/manual/cowboy_req.sock/index.html b/docs/en/cowboy/2.4/manual/cowboy_req.sock/index.html
index 5bfb7e57..c9da79f7 100644
--- a/docs/en/cowboy/2.4/manual/cowboy_req.sock/index.html
+++ b/docs/en/cowboy/2.4/manual/cowboy_req.sock/index.html
@@ -62,86 +62,47 @@
<h1 class="lined-header"><span>cowboy_req:sock(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:sock - Socket address and port</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:sock - Socket address and port</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">sock</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">Info</span>
+<pre><tt><b><font color="#000000">sock</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <font color="#009900">Info</font>
-<span style="color: #009900">Info</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 socket&#8217;s IP address and port number.</p></div>
-<div class="paragraph"><p>The socket information can also be obtained using pattern matching:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<font color="#009900">Info</font> <font color="#990000">::</font> {<b><font color="#000000">inet:ip_address</font></b>(), <b><font color="#000000">inet:port_number</font></b>()}</tt></pre>
+</div></div>
+<p>Return the socket&apos;s IP address and port number.</p>
+<p>The socket information can also be obtained using pattern matching:</p>
+<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">sock</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">
+<pre><tt>#{<font color="#FF6600">sock</font> <font color="#990000">:=</font> {<font color="#009900">IP</font>, <font color="#009900">Port</font>}} <font color="#990000">=</font> <font color="#009900">Req</font><font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The socket&#8217;s local IP address and port number.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The socket&apos;s local IP address and port number.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.1</strong>: Function introduced.
-</p>
+<ul><li><strong>2.1</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Get the socket&#8217;s IP address and port number.</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Get the socket&apos;s 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:sock</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#009900">IP</font>, <font color="#009900">Port</font>} <font color="#990000">=</font> <b><font color="#000000">cowboy_req:sock</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.peer">cowboy_req:peer(3)</a>,
-<a href="../cowboy_req.cert">cowboy_req:cert(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.peer">cowboy_req:peer(3)</a>, <a href="../cowboy_req.cert">cowboy_req:cert(3)</a></p>
+
diff --git a/docs/en/cowboy/2.4/manual/cowboy_req.stream_body/index.html b/docs/en/cowboy/2.4/manual/cowboy_req.stream_body/index.html
index 97ae71b6..0a3ca04f 100644
--- a/docs/en/cowboy/2.4/manual/cowboy_req.stream_body/index.html
+++ b/docs/en/cowboy/2.4/manual/cowboy_req.stream_body/index.html
@@ -62,119 +62,56 @@
<h1 class="lined-header"><span>cowboy_req:stream_body(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:stream_body - Stream the response body</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:stream_body - Stream the response body</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">stream_body</span></span>(<span style="color: #009900">Data</span>, <span style="color: #009900">IsFin</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: #FF6600">ok</span>
-
-<span style="color: #009900">Data</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>()
-<span style="color: #009900">IsFin</span> <span style="color: #990000">::</span> <span style="color: #FF6600">fin</span> | <span style="color: #FF6600">nofin</span></tt></pre></div></div>
-<div class="paragraph"><p>Stream the response body.</p></div>
-<div class="paragraph"><p>This function may be called as many times as needed after
-initiating a response using the
-<a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a>
-function.</p></div>
-<div class="paragraph"><p>The second argument indicates if this call is the final
-call. Use the <code>nofin</code> value until you know no more data
-will be sent. The final call should use <code>fin</code> (possibly
-with an empty data value) or be a call to the
-<a href="../cowboy_req.stream_trailers">cowboy_req:stream_trailers(3)</a>
-function.</p></div>
-<div class="paragraph"><p>Note that not using <code>fin</code> for the final call is not an
-error; Cowboy will take care of it when the request
-handler terminates if needed. Depending on the resource
-it may however be more efficient to do it as early as
-possible.</p></div>
-<div class="paragraph"><p>You do not need to handle HEAD requests specifically as
-Cowboy will ensure no data is sent when you call this function.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">stream_body</font></b>(<font color="#009900">Data</font>, <font color="#009900">IsFin</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <font color="#FF6600">ok</font>
+
+<font color="#009900">Data</font> <font color="#990000">::</font> <b><font color="#000000">iodata</font></b>()
+<font color="#009900">IsFin</font> <font color="#990000">::</font> <font color="#FF6600">fin</font> | <font color="#FF6600">nofin</font></tt></pre>
+</div></div>
+<p>Stream the response body.</p>
+<p>This function may be called as many times as needed after initiating a response using the <a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a> function.</p>
+<p>The second argument indicates if this call is the final call. Use the <code>nofin</code> value until you know no more data will be sent. The final call should use <code>fin</code> (possibly with an empty data value) or be a call to the <a href="../cowboy_req.stream_trailers">cowboy_req:stream_trailers(3)</a> function.</p>
+<p>Note that not using <code>fin</code> for the final call is not an error; Cowboy will take care of it when the request handler terminates if needed. Depending on the resource it may however be more efficient to do it as early as possible.</p>
+<p>You do not need to handle HEAD requests specifically as Cowboy will ensure no data is sent when you call this function.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Data
-</dt>
-<dd>
-<p>
-The data to be sent.
-</p>
+<dl><dt>Data</dt>
+<dd><p>The data to be sent.</p>
</dd>
-<dt class="hdlist1">
-IsFin
-</dt>
-<dd>
-<p>
-A flag indicating whether this is the final piece of data
-to be sent.
-</p>
+<dt>IsFin</dt>
+<dd><p>A flag indicating whether this is the final piece of data to be sent.</p>
</dd>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The atom <code>ok</code> is always returned. It can be safely ignored.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The atom <code>ok</code> is always returned. It can be safely ignored.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced. Replaces <code>chunk/2</code>.
-</p>
+<ul><li><strong>2.0</strong>: Function introduced. Replaces <code>chunk/2</code>.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Stream the response body</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Stream the response body</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: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_reply</span></span>(<span style="color: #993399">200</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/plain"</span><span style="color: #990000">&gt;&gt;</span>
-}, <span style="color: #009900">Req0</span>),
-<span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_body</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Hello\n"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #FF6600">nofin</span>, <span style="color: #009900">Req</span>),
-<span style="font-weight: bold"><span style="color: #000000">timer:sleep</span></span>(<span style="color: #993399">1000</span>),
-<span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_body</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"World!\n"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #FF6600">fin</span>, <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:stream_reply</font></b>(<font color="#993399">200</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/plain"</font><font color="#990000">&gt;&gt;</font>
+}, <font color="#009900">Req0</font>),
+<b><font color="#000000">cowboy_req:stream_body</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"Hello\n"</font><font color="#990000">&gt;&gt;</font>, <font color="#FF6600">nofin</font>, <font color="#009900">Req</font>),
+<b><font color="#000000">timer:sleep</font></b>(<font color="#993399">1000</font>),
+<b><font color="#000000">cowboy_req:stream_body</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"World!\n"</font><font color="#990000">&gt;&gt;</font>, <font color="#FF6600">fin</font>, <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.stream_reply">cowboy_req:stream_reply(3)</a>,
-<a href="../cowboy_req.stream_trailers">cowboy_req:stream_trailers(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a>, <a href="../cowboy_req.stream_trailers">cowboy_req:stream_trailers(3)</a></p>
+
diff --git a/docs/en/cowboy/2.4/manual/cowboy_req.stream_reply/index.html b/docs/en/cowboy/2.4/manual/cowboy_req.stream_reply/index.html
index 9534020b..17382cf6 100644
--- a/docs/en/cowboy/2.4/manual/cowboy_req.stream_reply/index.html
+++ b/docs/en/cowboy/2.4/manual/cowboy_req.stream_reply/index.html
@@ -62,152 +62,76 @@
<h1 class="lined-header"><span>cowboy_req:stream_reply(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:stream_reply - Send the response headers</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:stream_reply - Send the response headers</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">stream_reply</span></span>(<span style="color: #009900">Status</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">stream_reply</span></span>(<span style="color: #009900">StatusCode</span>, #{}, <span style="color: #009900">Req</span>)
-
-<span style="font-weight: bold"><span style="color: #000000">stream_reply</span></span>(<span style="color: #009900">Status</span>, <span style="color: #009900">Headers</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">Req</span>
-
-<span style="color: #009900">Status</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:http_status</span></span>()
-<span style="color: #009900">Headers</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:http_headers</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Send the response headers.</p></div>
-<div class="paragraph"><p>The header names must be given as lowercase binary strings.
-While header names are case insensitive, Cowboy requires them
-to be given as lowercase to function properly.</p></div>
-<div class="paragraph"><p>Cowboy does not allow duplicate header names. Headers set
-by this function may overwrite those set by <code>set_resp_header/3</code>.</p></div>
-<div class="paragraph"><p>Use <a href="../cowboy_req.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a>
-instead of this function to set cookies.</p></div>
-<div class="paragraph"><p>If a response body was set before calling this function,
-it will not be sent.</p></div>
-<div class="paragraph"><p>Use <a href="../cowboy_req.stream_body">cowboy_req:stream_body(3)</a>
-to stream the response body and optionally
-<a href="../cowboy_req.stream_trailers">cowboy_req:stream_trailers(3)</a>
-to send response trailer field values.</p></div>
-<div class="paragraph"><p>You may want to set the content-length header when using
-this function, if it is known in advance. This will allow
-clients using HTTP/2 and HTTP/1.0 to process the response
-more efficiently.</p></div>
-<div class="paragraph"><p>The streaming method varies depending on the protocol being
-used. HTTP/2 will use the usual DATA frames. HTTP/1.1 will
-use chunked transfer-encoding. HTTP/1.0 will send the body
-unmodified and close the connection at the end if no
-content-length was set.</p></div>
-<div class="paragraph"><p>It is not possible to push resources after this function
-returns. Any attempt will result in an error.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">stream_reply</font></b>(<font color="#009900">Status</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> <b><font color="#000000">stream_reply</font></b>(<font color="#009900">StatusCode</font>, #{}, <font color="#009900">Req</font>)
+
+<b><font color="#000000">stream_reply</font></b>(<font color="#009900">Status</font>, <font color="#009900">Headers</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> <font color="#009900">Req</font>
+
+<font color="#009900">Status</font> <font color="#990000">::</font> <b><font color="#000000">cowboy:http_status</font></b>()
+<font color="#009900">Headers</font> <font color="#990000">::</font> <b><font color="#000000">cowboy:http_headers</font></b>()</tt></pre>
+</div></div>
+<p>Send the response headers.</p>
+<p>The header names must be given as lowercase binary strings. While header names are case insensitive, Cowboy requires them to be given as lowercase to function properly.</p>
+<p>Cowboy does not allow duplicate header names. Headers set by this function may overwrite those set by <code>set_resp_header/3</code>.</p>
+<p>Use <a href="../cowboy_req.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a> instead of this function to set cookies.</p>
+<p>If a response body was set before calling this function, it will not be sent.</p>
+<p>Use <a href="../cowboy_req.stream_body">cowboy_req:stream_body(3)</a> to stream the response body and optionally <a href="../cowboy_req.stream_trailers">cowboy_req:stream_trailers(3)</a> to send response trailer field values.</p>
+<p>You may want to set the content-length header when using this function, if it is known in advance. This will allow clients using HTTP/2 and HTTP/1.0 to process the response more efficiently.</p>
+<p>The streaming method varies depending on the protocol being used. HTTP/2 will use the usual DATA frames. HTTP/1.1 will use chunked transfer-encoding. HTTP/1.0 will send the body unmodified and close the connection at the end if no content-length was set.</p>
+<p>It is not possible to push resources after this function returns. Any attempt will result in an error.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Status
-</dt>
-<dd>
-<p>
-The status code for the response.
-</p>
+<dl><dt>Status</dt>
+<dd><p>The status code for the response.</p>
</dd>
-<dt class="hdlist1">
-Headers
-</dt>
-<dd>
-<p>
-The response headers.
-</p>
+<dt>Headers</dt>
+<dd><p>The response headers.</p>
</dd>
-</dl></div>
-<div class="paragraph"><p>Header names must be given as lowercase binary strings.</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+</dl>
+<p>Header names must be given as lowercase binary strings.</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A new Req object is returned.</p></div>
-<div class="paragraph"><p>The returned Req object must be used from that point onward
-in order to be able to stream the response body.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>A new Req object is returned.</p>
+<p>The returned Req object must be used from that point onward in order to be able to stream the response body.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Only the Req is returned, it is no longer wrapped in a tuple.
-</p>
+<ul><li><strong>2.0</strong>: Only the Req is returned, it is no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced. Replaces <code>chunked_reply/1,2</code>.
-</p>
+<li><strong>2.0</strong>: Function introduced. Replaces <code>chunked_reply/1,2</code>.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Initiate the response</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Initiate the response</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: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_reply</span></span>(<span style="color: #993399">200</span>, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Stream the response with custom headers</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:stream_reply</font></b>(<font color="#993399">200</font>, <font color="#009900">Req0</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Stream the response with custom 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">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_reply</span></span>(<span style="color: #993399">200</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/plain"</span><span style="color: #990000">&gt;&gt;</span>
-}, <span style="color: #009900">Req0</span>),
-<span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_body</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Hello\n"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #FF6600">nofin</span>, <span style="color: #009900">Req</span>),
-<span style="font-weight: bold"><span style="color: #000000">timer:sleep</span></span>(<span style="color: #993399">1000</span>),
-<span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_body</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"World!\n"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #FF6600">fin</span>, <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:stream_reply</font></b>(<font color="#993399">200</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/plain"</font><font color="#990000">&gt;&gt;</font>
+}, <font color="#009900">Req0</font>),
+<b><font color="#000000">cowboy_req:stream_body</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"Hello\n"</font><font color="#990000">&gt;&gt;</font>, <font color="#FF6600">nofin</font>, <font color="#009900">Req</font>),
+<b><font color="#000000">timer:sleep</font></b>(<font color="#993399">1000</font>),
+<b><font color="#000000">cowboy_req:stream_body</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"World!\n"</font><font color="#990000">&gt;&gt;</font>, <font color="#FF6600">fin</font>, <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a>,
-<a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a>,
-<a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a>,
-<a href="../cowboy_req.inform">cowboy_req:inform(3)</a>,
-<a href="../cowboy_req.reply">cowboy_req:reply(3)</a>,
-<a href="../cowboy_req.stream_body">cowboy_req:stream_body(3)</a>,
-<a href="../cowboy_req.stream_trailers">cowboy_req:stream_trailers(3)</a>,
-<a href="../cowboy_req.push">cowboy_req:push(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a>, <a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a>, <a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a>, <a href="../cowboy_req.inform">cowboy_req:inform(3)</a>, <a href="../cowboy_req.reply">cowboy_req:reply(3)</a>, <a href="../cowboy_req.stream_body">cowboy_req:stream_body(3)</a>, <a href="../cowboy_req.stream_trailers">cowboy_req:stream_trailers(3)</a>, <a href="../cowboy_req.push">cowboy_req:push(3)</a></p>
+
diff --git a/docs/en/cowboy/2.4/manual/cowboy_req.stream_trailers/index.html b/docs/en/cowboy/2.4/manual/cowboy_req.stream_trailers/index.html
index 9f08091c..6a96ed52 100644
--- a/docs/en/cowboy/2.4/manual/cowboy_req.stream_trailers/index.html
+++ b/docs/en/cowboy/2.4/manual/cowboy_req.stream_trailers/index.html
@@ -62,107 +62,55 @@
<h1 class="lined-header"><span>cowboy_req:stream_trailers(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:stream_trailers - Send the response trailers</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:stream_trailers - Send the response trailers</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">stream_trailers</span></span>(<span style="color: #009900">Trailers</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: #FF6600">ok</span>
-
-<span style="color: #009900">Trailers</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:http_headers</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Send the response trailers and terminate the stream.</p></div>
-<div class="paragraph"><p>This function can only be called once, after initiating
-a response using
-<a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a>
-and sending zero or more body chunks using
-<a href="../cowboy_req.stream_body">cowboy_req:stream_body(3)</a>
-with the <code>nofin</code> argument set. The function <code>stream_trailers/2</code>
-implies <code>fin</code> and automatically terminate the response.</p></div>
-<div class="paragraph"><p>You must list all field names sent in trailers in the
-trailer header, otherwise they might be dropped by intermediaries
-or clients.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">stream_trailers</font></b>(<font color="#009900">Trailers</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <font color="#FF6600">ok</font>
+
+<font color="#009900">Trailers</font> <font color="#990000">::</font> <b><font color="#000000">cowboy:http_headers</font></b>()</tt></pre>
+</div></div>
+<p>Send the response trailers and terminate the stream.</p>
+<p>This function can only be called once, after initiating a response using <a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a> and sending zero or more body chunks using <a href="../cowboy_req.stream_body">cowboy_req:stream_body(3)</a> with the <code>nofin</code> argument set. The function <code>stream_trailers/2</code> implies <code>fin</code> and automatically terminate the response.</p>
+<p>You must list all field names sent in trailers in the trailer header, otherwise they might be dropped by intermediaries or clients.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Trailers
-</dt>
-<dd>
-<p>
-Trailer field values to be sent.
-</p>
+<dl><dt>Trailers</dt>
+<dd><p>Trailer field values to be sent.</p>
</dd>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The atom <code>ok</code> is always returned. It can be safely ignored.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The atom <code>ok</code> is always returned. It can be safely ignored.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.2</strong>: Function introduced.
-</p>
+<ul><li><strong>2.2</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Stream a response body with trailers</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Stream a response body with trailers</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: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_reply</span></span>(<span style="color: #993399">200</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/plain"</span><span style="color: #990000">&gt;&gt;</span>,
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"trailer"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"expires, content-md5"</span><span style="color: #990000">&gt;&gt;</span>
-}, <span style="color: #009900">Req0</span>),
-<span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_body</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Hello\n"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #FF6600">nofin</span>, <span style="color: #009900">Req</span>),
-<span style="font-weight: bold"><span style="color: #000000">timer:sleep</span></span>(<span style="color: #993399">1000</span>),
-<span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_body</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"World!\n"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #FF6600">nofin</span>, <span style="color: #009900">Req</span>)<span style="color: #990000">.</span>
-<span style="font-weight: bold"><span style="color: #000000">cowboy_req:stream_trailers</span></span>(#{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"expires"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Sun, 10 Dec 2017 19:13:47 GMT"</span><span style="color: #990000">&gt;&gt;</span>,
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-md5"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"fbf68a8e34b2ded53bba54e68794b4fe"</span><span style="color: #990000">&gt;&gt;</span>
-}, <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Req</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:stream_reply</font></b>(<font color="#993399">200</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/plain"</font><font color="#990000">&gt;&gt;</font>,
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"trailer"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"expires, content-md5"</font><font color="#990000">&gt;&gt;</font>
+}, <font color="#009900">Req0</font>),
+<b><font color="#000000">cowboy_req:stream_body</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"Hello\n"</font><font color="#990000">&gt;&gt;</font>, <font color="#FF6600">nofin</font>, <font color="#009900">Req</font>),
+<b><font color="#000000">timer:sleep</font></b>(<font color="#993399">1000</font>),
+<b><font color="#000000">cowboy_req:stream_body</font></b>(<font color="#990000">&lt;&lt;</font><font color="#FF0000">"World!\n"</font><font color="#990000">&gt;&gt;</font>, <font color="#FF6600">nofin</font>, <font color="#009900">Req</font>)<font color="#990000">.</font>
+<b><font color="#000000">cowboy_req:stream_trailers</font></b>(#{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"expires"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"Sun, 10 Dec 2017 19:13:47 GMT"</font><font color="#990000">&gt;&gt;</font>,
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-md5"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"fbf68a8e34b2ded53bba54e68794b4fe"</font><font color="#990000">&gt;&gt;</font>
+}, <font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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.stream_reply">cowboy_req:stream_reply(3)</a>,
-<a href="../cowboy_req.stream_body">cowboy_req:stream_body(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a>, <a href="../cowboy_req.stream_body">cowboy_req:stream_body(3)</a></p>
+
diff --git a/docs/en/cowboy/2.4/manual/cowboy_req.uri/index.html b/docs/en/cowboy/2.4/manual/cowboy_req.uri/index.html
index c7e9efc4..e70c3d45 100644
--- a/docs/en/cowboy/2.4/manual/cowboy_req.uri/index.html
+++ b/docs/en/cowboy/2.4/manual/cowboy_req.uri/index.html
@@ -62,177 +62,106 @@
<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">
+<p>cowboy_req:uri - Reconstructed URI</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">
+<pre><tt><b><font color="#000000">uri</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <b><font color="#000000">uri</font></b>(<font color="#009900">Req</font>, #{})
+<b><font color="#000000">uri</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>(), <font color="#009900">Opts</font>) <font color="#990000">-&gt;</font> <font color="#009900">URI</font> <font color="#990000">::</font> <b><font color="#000000">iodata</font></b>()
+
+<font color="#009900">Opts</font> <font color="#990000">::</font> #{
+ <font color="#0000FF">scheme</font> <font color="#990000">=&gt;</font> <b><font color="#000000">iodata</font></b>() | <font color="#000080">undefined</font>,
+ <font color="#0000FF">host</font> <font color="#990000">=&gt;</font> <b><font color="#000000">iodata</font></b>() | <font color="#000080">undefined</font>,
+ <font color="#0000FF">port</font> <font color="#990000">=&gt;</font> <b><font color="#000000">inet:port_number</font></b>() | <font color="#000080">undefined</font>,
+ <font color="#0000FF">path</font> <font color="#990000">=&gt;</font> <b><font color="#000000">iodata</font></b>() | <font color="#000080">undefined</font>,
+ <font color="#0000FF">qs</font> <font color="#990000">=&gt;</font> <b><font color="#000000">iodata</font></b>() | <font color="#000080">undefined</font>,
+ <font color="#0000FF">fragment</font> <font color="#990000">=&gt;</font> <b><font color="#000000">iodata</font></b>() | <font color="#000080">undefined</font>
+}</tt></pre>
+</div></div>
+<p>Reconstruct the effective request URI, optionally modifying components.</p>
+<p>By default Cowboy will build a URI using the components found in the request. Options allow disabling or replacing individual components.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>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>
+<dt>Opts</dt>
+<dd><p>Map for overriding individual components.</p>
+<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>
+<p>As this function always returns a valid URI, there are some things to note:</p>
+<ul><li>Disabling the host also disables the scheme and port.
</li>
-<li>
-<p>
-There is no fragment component by default as these are
- not sent with the request.
-</p>
+<li>There is no fragment component by default as these are not sent with the request.
</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>The port number may not appear in the resulting URI if it is the default port for the given scheme (http: 80; https: 443).
</li>
-</ul></div>
+</ul>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<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">
+<p>The reconstructed URI is returned as an iolist or a binary string.</p>
<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>
+<ul><li><strong>2.0</strong>: Individual components can be replaced or disabled.
</li>
-<li>
-<p>
-<strong>2.0</strong>: Only the URI is returned, it is no longer wrapped in a tuple.
-</p>
+<li><strong>2.0</strong>: Only the URI is returned, it is no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced. Replaces <code>host_url/1</code> and <code>url/1</code>.
-</p>
+<li><strong>2.0</strong>: Function introduced. Replaces <code>host_url/1</code> and <code>url/1</code>.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<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
+<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 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
+<pre><tt><i><font color="#9A1900">%% //example.org/path/to/res?edit=1</font></i>
+<b><font color="#000000">cowboy_req:uri</font></b>(<font color="#009900">Req</font>, #{<font color="#0000FF">scheme</font> <font color="#990000">=&gt;</font> <font color="#000080">undefined</font>})<font color="#990000">.</font></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
+<pre><tt><i><font color="#9A1900">%% </font></i><u><font color="#0000FF">http://example.org</font></u>
+<b><font color="#000000">cowboy_req:uri</font></b>(<font color="#009900">Req</font>, #{<font color="#0000FF">path</font> <font color="#990000">=&gt;</font> <font color="#000080">undefined</font>, <font color="#0000FF">qs</font> <font color="#990000">=&gt;</font> <font color="#000080">undefined</font>})<font color="#990000">.</font></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
+<pre><tt><i><font color="#9A1900">%% /path/to/res?edit=1</font></i>
+<b><font color="#000000">cowboy_req:uri</font></b>(<font color="#009900">Req</font>, #{<font color="#0000FF">host</font> <font color="#990000">=&gt;</font> <font color="#000080">undefined</font>})<font color="#990000">.</font></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
+<pre><tt><i><font color="#9A1900">%% </font></i><u><font color="#0000FF">http://example.org/path/to/res</font></u><i><font color="#9A1900">?edit=1#errors</font></i>
+<b><font color="#000000">cowboy_req:uri</font></b>(<font color="#009900">Req</font>, #{<font color="#0000FF">fragment</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"errors"</font><font color="#990000">&gt;&gt;</font>})<font color="#990000">.</font></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
+<pre><tt><i><font color="#9A1900">%% </font></i><u><font color="#0000FF">https://example.org/path/to/res</font></u><i><font color="#9A1900">?edit=1</font></i>
+<b><font color="#000000">cowboy_req:uri</font></b>(<font color="#009900">Req</font>, #{<font color="#0000FF">scheme</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"https"</font><font color="#990000">&gt;&gt;</font>})<font color="#990000">.</font></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">
+<pre><tt><b><font color="#000000">iolist_to_binary</font></b>(<b><font color="#000000">cowboy_req:uri</font></b>(<font color="#009900">Req</font>))<font color="#990000">.</font></tt></pre>
+</div></div>
<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>
+<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>
+
diff --git a/docs/en/cowboy/2.4/manual/cowboy_req.version/index.html b/docs/en/cowboy/2.4/manual/cowboy_req.version/index.html
index ad6cb189..ecf55796 100644
--- a/docs/en/cowboy/2.4/manual/cowboy_req.version/index.html
+++ b/docs/en/cowboy/2.4/manual/cowboy_req.version/index.html
@@ -62,88 +62,47 @@
<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">
+<p>cowboy_req:version - HTTP version</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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
+<pre><tt><b><font color="#000000">version</font></b>(<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <font color="#009900">Version</font> <font color="#990000">::</font> <b><font color="#000000">cowboy:http_version</font></b>()</tt></pre>
+</div></div>
+<p>Return the HTTP version used for the request.</p>
+<p>The version can also be obtained using pattern matching:</p>
+<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">
+<pre><tt>#{<font color="#FF6600">version</font> <font color="#990000">:=</font> <font color="#009900">Version</font>} <font color="#990000">=</font> <font color="#009900">Req</font><font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<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">
+<p>The HTTP version used for the request is returned as an atom. It is provided for informative purposes only.</p>
<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>
+<ul><li><strong>2.0</strong>: Only the version is returned, it is no longer wrapped in a tuple.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<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
+<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">
+<pre><tt><font color="#009900">Version</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_req:version</font></b>(<font color="#009900">Req</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<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>
+<p><a href="../cowboy_req">cowboy_req(3)</a></p>
+
diff --git a/docs/en/cowboy/2.4/manual/cowboy_req/index.html b/docs/en/cowboy/2.4/manual/cowboy_req/index.html
index 27795e51..f8d793ab 100644
--- a/docs/en/cowboy/2.4/manual/cowboy_req/index.html
+++ b/docs/en/cowboy/2.4/manual/cowboy_req/index.html
@@ -62,414 +62,218 @@
<h1 class="lined-header"><span>cowboy_req(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req - HTTP request and response</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req - HTTP request and response</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<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>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="33%" />
-<col width="33%" />
-<col width="33%" />
-<thead>
-<tr>
-<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">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>
+<p>The module <code>cowboy_req</code> provides functions to access, manipulate and respond to requests.</p>
+<p>There are four types of functions in this module. They can be differentiated by their name and their return type:</p>
+<table rules="all" width="100%" frame="border"
+ cellspacing="0" cellpadding="4">
+<thead><tr><th>Type</th>
+<th>Name pattern</th>
+<th>Return type</th>
+</tr></thead><tbody><tr><td>access</td>
+<td>no verb, parse_*, match_*</td>
+<td><code>Value</code></td>
</tr>
-<tr>
-<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><td>question</td>
+<td>has_*</td>
+<td><code>boolean()</code></td>
</tr>
-<tr>
-<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><td>modification</td>
+<td>set_*</td>
+<td><code>Req</code></td>
</tr>
-<tr>
-<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><td>action</td>
+<td>any other verb</td>
+<td><code>ok | {Result, Value, Req}</code></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>
-<div class="sect1">
+</tbody></table>
+<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&apos;s only possible to send one response, and to read the body once.</p>
<h2 id="_exports">Exports</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Connection:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../cowboy_req.peer">cowboy_req:peer(3)</a> - Peer address and port
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.sock">cowboy_req:sock(3)</a> - Socket address and port
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.cert">cowboy_req:cert(3)</a> - Client TLS certificate
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>Raw request:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../cowboy_req.method">cowboy_req:method(3)</a> - HTTP method
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.version">cowboy_req:version(3)</a> - HTTP version
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.scheme">cowboy_req:scheme(3)</a> - URI scheme
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.host">cowboy_req:host(3)</a> - URI host name
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.port">cowboy_req:port(3)</a> - URI port number
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.path">cowboy_req:path(3)</a> - URI path
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.qs">cowboy_req:qs(3)</a> - URI query string
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.uri">cowboy_req:uri(3)</a> - Reconstructed URI
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.header">cowboy_req:header(3)</a> - HTTP header
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.headers">cowboy_req:headers(3)</a> - HTTP headers
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>Processed request:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../cowboy_req.parse_qs">cowboy_req:parse_qs(3)</a> - Parse the query string
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.match_qs">cowboy_req:match_qs(3)</a> - Match the query string against constraints
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.parse_header">cowboy_req:parse_header(3)</a> - Parse the given HTTP header
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.parse_cookies">cowboy_req:parse_cookies(3)</a> - Parse cookie headers
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.match_cookies">cowboy_req:match_cookies(3)</a> - Match cookies against constraints
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.binding">cowboy_req:binding(3)</a> - Access a value bound from the route
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.bindings">cowboy_req:bindings(3)</a> - Access all values bound from the route
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.host_info">cowboy_req:host_info(3)</a> - Access the route&#8217;s heading host segments
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.path_info">cowboy_req:path_info(3)</a> - Access the route&#8217;s trailing path segments
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>Request body:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../cowboy_req.has_body">cowboy_req:has_body(3)</a> - Is there a request body?
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.body_length">cowboy_req:body_length(3)</a> - Body length
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a> - Read the request body
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.read_urlencoded_body">cowboy_req:read_urlencoded_body(3)</a> - Read and parse a urlencoded request body
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.read_part">cowboy_req:read_part(3)</a> - Read the next multipart headers
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.read_part_body">cowboy_req:read_part_body(3)</a> - Read the current part&#8217;s body
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>Response:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../cowboy_req.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a> - Set a cookie
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a> - Set a response header
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a> - Set several response headers
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.has_resp_header">cowboy_req:has_resp_header(3)</a> - Is the given response header set?
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.resp_header">cowboy_req:resp_header(3)</a> - Response header
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.resp_headers">cowboy_req:resp_headers(3)</a> - Response headers
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.delete_resp_header">cowboy_req:delete_resp_header(3)</a> - Delete a response header
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.set_resp_body">cowboy_req:set_resp_body(3)</a> - Set the response body
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.has_resp_body">cowboy_req:has_resp_body(3)</a> - Is there a response body?
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.inform">cowboy_req:inform(3)</a> - Send an informational response
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.reply">cowboy_req:reply(3)</a> - Send the response
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a> - Send the response headers
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.stream_body">cowboy_req:stream_body(3)</a> - Stream the response body
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.stream_trailers">cowboy_req:stream_trailers(3)</a> - Send the response trailers
-</p>
-</li>
-<li>
-<p>
-<a href="../cowboy_req.push">cowboy_req:push(3)</a> - Push a resource to the client
-</p>
-</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+<p>Connection:</p>
+<ul><li><a href="../cowboy_req.peer">cowboy_req:peer(3)</a> - Peer address and port
+</li>
+<li><a href="../cowboy_req.sock">cowboy_req:sock(3)</a> - Socket address and port
+</li>
+<li><a href="../cowboy_req.cert">cowboy_req:cert(3)</a> - Client TLS certificate
+</li>
+</ul>
+<p>Raw request:</p>
+<ul><li><a href="../cowboy_req.method">cowboy_req:method(3)</a> - HTTP method
+</li>
+<li><a href="../cowboy_req.version">cowboy_req:version(3)</a> - HTTP version
+</li>
+<li><a href="../cowboy_req.scheme">cowboy_req:scheme(3)</a> - URI scheme
+</li>
+<li><a href="../cowboy_req.host">cowboy_req:host(3)</a> - URI host name
+</li>
+<li><a href="../cowboy_req.port">cowboy_req:port(3)</a> - URI port number
+</li>
+<li><a href="../cowboy_req.path">cowboy_req:path(3)</a> - URI path
+</li>
+<li><a href="../cowboy_req.qs">cowboy_req:qs(3)</a> - URI query string
+</li>
+<li><a href="../cowboy_req.uri">cowboy_req:uri(3)</a> - Reconstructed URI
+</li>
+<li><a href="../cowboy_req.header">cowboy_req:header(3)</a> - HTTP header
+</li>
+<li><a href="../cowboy_req.headers">cowboy_req:headers(3)</a> - HTTP headers
+</li>
+</ul>
+<p>Processed request:</p>
+<ul><li><a href="../cowboy_req.parse_qs">cowboy_req:parse_qs(3)</a> - Parse the query string
+</li>
+<li><a href="../cowboy_req.match_qs">cowboy_req:match_qs(3)</a> - Match the query string against constraints
+</li>
+<li><a href="../cowboy_req.parse_header">cowboy_req:parse_header(3)</a> - Parse the given HTTP header
+</li>
+<li><a href="../cowboy_req.parse_cookies">cowboy_req:parse_cookies(3)</a> - Parse cookie headers
+</li>
+<li><a href="../cowboy_req.match_cookies">cowboy_req:match_cookies(3)</a> - Match cookies against constraints
+</li>
+<li><a href="../cowboy_req.binding">cowboy_req:binding(3)</a> - Access a value bound from the route
+</li>
+<li><a href="../cowboy_req.bindings">cowboy_req:bindings(3)</a> - Access all values bound from the route
+</li>
+<li><a href="../cowboy_req.host_info">cowboy_req:host_info(3)</a> - Access the route&apos;s heading host segments
+</li>
+<li><a href="../cowboy_req.path_info">cowboy_req:path_info(3)</a> - Access the route&apos;s trailing path segments
+</li>
+</ul>
+<p>Request body:</p>
+<ul><li><a href="../cowboy_req.has_body">cowboy_req:has_body(3)</a> - Is there a request body?
+</li>
+<li><a href="../cowboy_req.body_length">cowboy_req:body_length(3)</a> - Body length
+</li>
+<li><a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a> - Read the request body
+</li>
+<li><a href="../cowboy_req.read_urlencoded_body">cowboy_req:read_urlencoded_body(3)</a> - Read and parse a urlencoded request body
+</li>
+<li><a href="../cowboy_req.read_part">cowboy_req:read_part(3)</a> - Read the next multipart headers
+</li>
+<li><a href="../cowboy_req.read_part_body">cowboy_req:read_part_body(3)</a> - Read the current part&apos;s body
+</li>
+</ul>
+<p>Response:</p>
+<ul><li><a href="../cowboy_req.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a> - Set a cookie
+</li>
+<li><a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a> - Set a response header
+</li>
+<li><a href="../cowboy_req.set_resp_headers">cowboy_req:set_resp_headers(3)</a> - Set several response headers
+</li>
+<li><a href="../cowboy_req.has_resp_header">cowboy_req:has_resp_header(3)</a> - Is the given response header set?
+</li>
+<li><a href="../cowboy_req.resp_header">cowboy_req:resp_header(3)</a> - Response header
+</li>
+<li><a href="../cowboy_req.resp_headers">cowboy_req:resp_headers(3)</a> - Response headers
+</li>
+<li><a href="../cowboy_req.delete_resp_header">cowboy_req:delete_resp_header(3)</a> - Delete a response header
+</li>
+<li><a href="../cowboy_req.set_resp_body">cowboy_req:set_resp_body(3)</a> - Set the response body
+</li>
+<li><a href="../cowboy_req.has_resp_body">cowboy_req:has_resp_body(3)</a> - Is there a response body?
+</li>
+<li><a href="../cowboy_req.inform">cowboy_req:inform(3)</a> - Send an informational response
+</li>
+<li><a href="../cowboy_req.reply">cowboy_req:reply(3)</a> - Send the response
+</li>
+<li><a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a> - Send the response headers
+</li>
+<li><a href="../cowboy_req.stream_body">cowboy_req:stream_body(3)</a> - Stream the response body
+</li>
+<li><a href="../cowboy_req.stream_trailers">cowboy_req:stream_trailers(3)</a> - Send the response trailers
+</li>
+<li><a href="../cowboy_req.push">cowboy_req:push(3)</a> - Push a resource to the client
+</li>
+</ul>
<h2 id="_types">Types</h2>
-<div class="sectionbody">
-<div class="sect2">
<h3 id="_push_opts">push_opts()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">
+<pre><tt><b><font color="#000000">push_opts</font></b>() <font color="#990000">::</font> #{
+ <font color="#0000FF">method</font> <font color="#990000">=&gt;</font> <b><font color="#000080">binary</font></b>(), <i><font color="#9A1900">%% case sensitive</font></i>
+ <font color="#0000FF">scheme</font> <font color="#990000">=&gt;</font> <b><font color="#000080">binary</font></b>(), <i><font color="#9A1900">%% lowercase; case insensitive</font></i>
+ <font color="#0000FF">host</font> <font color="#990000">=&gt;</font> <b><font color="#000080">binary</font></b>(), <i><font color="#9A1900">%% lowercase; case insensitive</font></i>
+ <font color="#0000FF">port</font> <font color="#990000">=&gt;</font> <b><font color="#000000">inet:port_number</font></b>(),
+ <font color="#0000FF">qs</font> <font color="#990000">=&gt;</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% case sensitive</font></i>
+}</tt></pre>
+</div></div>
+<p>Push options.</p>
+<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&apos;s URI.</p>
<h3 id="_read_body_opts">read_body_opts()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">
+<pre><tt><b><font color="#000000">read_body_opts</font></b>() <font color="#990000">::</font> #{
+ <b><font color="#000080">length</font></b> <font color="#990000">=&gt;</font> <b><font color="#000000">non_neg_integer</font></b>(),
+ <font color="#0000FF">period</font> <font color="#990000">=&gt;</font> <b><font color="#000000">non_neg_integer</font></b>(),
+ <font color="#0000FF">timeout</font> <font color="#990000">=&gt;</font> <b><font color="#000000">timeout</font></b>()
+}</tt></pre>
+</div></div>
+<p>Body reading options.</p>
+<p>The defaults are function-specific.</p>
<h3 id="_req">req()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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>()},
- <span style="color: #FF6600">sock</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>()},
- <span style="color: #FF6600">cert</span> <span style="color: #990000">:=</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>() | <span style="color: #000080">undefined</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
+<pre><tt><b><font color="#000000">req</font></b>() <font color="#990000">::</font> #{
+ <font color="#FF6600">method</font> <font color="#990000">:=</font> <b><font color="#000080">binary</font></b>(), <i><font color="#9A1900">%% case sensitive</font></i>
+ <font color="#FF6600">version</font> <font color="#990000">:=</font> <b><font color="#000000">cowboy:http_version</font></b>() | <b><font color="#000080">atom</font></b>(),
+ <font color="#FF6600">scheme</font> <font color="#990000">:=</font> <b><font color="#000080">binary</font></b>(), <i><font color="#9A1900">%% lowercase; case insensitive</font></i>
+ <font color="#FF6600">host</font> <font color="#990000">:=</font> <b><font color="#000080">binary</font></b>(), <i><font color="#9A1900">%% lowercase; case insensitive</font></i>
+ <font color="#FF6600">port</font> <font color="#990000">:=</font> <b><font color="#000000">inet:port_number</font></b>(),
+ <font color="#FF6600">path</font> <font color="#990000">:=</font> <b><font color="#000080">binary</font></b>(), <i><font color="#9A1900">%% case sensitive</font></i>
+ <font color="#FF6600">qs</font> <font color="#990000">:=</font> <b><font color="#000080">binary</font></b>(), <i><font color="#9A1900">%% case sensitive</font></i>
+ <font color="#FF6600">headers</font> <font color="#990000">:=</font> <b><font color="#000000">cowboy:http_headers</font></b>(),
+ <font color="#FF6600">peer</font> <font color="#990000">:=</font> {<b><font color="#000000">inet:ip_address</font></b>(), <b><font color="#000000">inet:port_number</font></b>()},
+ <font color="#FF6600">sock</font> <font color="#990000">:=</font> {<b><font color="#000000">inet:ip_address</font></b>(), <b><font color="#000000">inet:port_number</font></b>()},
+ <font color="#FF6600">cert</font> <font color="#990000">:=</font> <b><font color="#000080">binary</font></b>() | <font color="#000080">undefined</font>
+}</tt></pre>
+</div></div>
+<p>The Req object.</p>
+<p>Contains information about the request and response. While some fields are publicly documented, others aren&apos;t and shouldn&apos;t be used.</p>
+<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 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">
+<pre><tt><font color="#009900">Req</font>#{<font color="#009900">_myapp_auth_method</font> <font color="#990000">=&gt;</font> <font color="#FF6600">pubkey</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
<h3 id="_resp_body">resp_body()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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>}
+<pre><tt><b><font color="#000000">resp_body</font></b>() <font color="#990000">::</font> <b><font color="#000000">iodata</font></b>()
+ | {<font color="#FF6600">sendfile</font>, <font color="#009900">Offset</font>, <font color="#009900">Length</font>, <font color="#009900">Filename</font>}
-<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">non_neg_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
+<font color="#009900">Offset</font> <font color="#990000">::</font> <b><font color="#000000">non_neg_integer</font></b>()
+<font color="#009900">Length</font> <font color="#990000">::</font> <b><font color="#000000">non_neg_integer</font></b>()
+<font color="#009900">Filename</font> <font color="#990000">::</font> <b><font color="#000000">file:name_all</font></b>()</tt></pre>
+</div></div>
+<p>Response body.</p>
+<p>It can take two forms: the actual data to be sent or a tuple indicating which file to send.</p>
+<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 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>Note that the length must be greater than zero for any data
-to be sent. Cowboy will send an empty body when the length
-is zero.</p></div>
-</div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#993399">1</font><font color="#990000">&gt;</font> <font color="#009900">RespBody</font> <font color="#990000">=</font> [<font color="#FF0000">"Hello "</font>, [<font color="#990000">&lt;&lt;</font><font color="#FF0000">"world"</font><font color="#990000">&gt;&gt;</font>, <font color="#FF0000">$!</font>]]<font color="#990000">.</font>
+[<font color="#FF0000">"Hello "</font>,[<font color="#990000">&lt;&lt;</font><font color="#FF0000">"world"</font><font color="#990000">&gt;&gt;</font>,<font color="#993399">33</font>]]
+<font color="#993399">2</font><font color="#990000">&gt;</font> <b><font color="#000000">io:format</font></b>(<font color="#FF0000">"~s~n"</font>, [<font color="#009900">RespBody</font>])<font color="#990000">.</font>
+<font color="#009900">Hello</font> <font color="#FF6600">world</font><font color="#990000">!</font></tt></pre>
+</div></div>
+<p>Note that the length must be greater than zero for any data to be sent. Cowboy will send an empty body when the length is zero.</p>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="..">cowboy(7)</a></p></div>
-</div>
-</div>
+<p><a href="..">cowboy(7)</a></p>
+
diff --git a/docs/en/cowboy/2.4/manual/cowboy_rest/index.html b/docs/en/cowboy/2.4/manual/cowboy_rest/index.html
index 1c8bed7c..77a021bb 100644
--- a/docs/en/cowboy/2.4/manual/cowboy_rest/index.html
+++ b/docs/en/cowboy/2.4/manual/cowboy_rest/index.html
@@ -62,670 +62,475 @@
<h1 class="lined-header"><span>cowboy_rest(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_rest - REST handlers</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_rest - REST handlers</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The module <code>cowboy_rest</code> implements the HTTP state machine.</p></div>
-<div class="paragraph"><p>Implementing REST handlers is not enough to provide a REST
-interface; this interface must also follow the REST
-constraints including HATEOAS (hypermedia as the engine
-of application state).</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The module <code>cowboy_rest</code> implements the HTTP state machine.</p>
+<p>Implementing REST handlers is not enough to provide a REST interface; this interface must also follow the REST constraints including HATEOAS (hypermedia as the engine of application state).</p>
<h2 id="_callbacks">Callbacks</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>REST handlers implement the following interface:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
-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="color: #FF6600">cowboy_rest</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
-
-<span style="color: #009900">Callback</span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>)
- <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
- | {<span style="color: #FF6600">stop</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
- | {{<span style="color: #FF6600">switch_handler</span>, <span style="color: #009900">Module</span>}, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
- | {{<span style="color: #FF6600">switch_handler</span>, <span style="color: #009900">Module</span>, <span style="color: #009900">Opts</span>}, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
-
-<span style="font-weight: bold"><span style="color: #000000">terminate</span></span>(<span style="color: #009900">Reason</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> <span style="color: #FF6600">ok</span> <span style="font-style: italic"><span style="color: #9A1900">%% optional</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">State</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()
-<span style="color: #009900">Module</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">module</span></span>()
-<span style="color: #009900">Opts</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()
-<span style="color: #009900">Reason</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">normal</span></span>
- | {<span style="color: #FF6600">crash</span>, <span style="color: #FF6600">error</span> | <span style="font-weight: bold"><span style="color: #000080">exit</span></span> | <span style="font-weight: bold"><span style="color: #000080">throw</span></span>, <span style="font-weight: bold"><span style="color: #000000">any</span></span>()}
-
-<span style="color: #009900">Callback</span> <span style="color: #990000">-</span> <span style="color: #FF6600">see</span> <span style="color: #FF6600">below</span>
-<span style="color: #009900">Result</span> <span style="color: #990000">-</span> <span style="color: #FF6600">see</span> <span style="color: #FF6600">below</span>
-<span style="color: #009900">Default</span> <span style="color: #990000">-</span> <span style="color: #FF6600">see</span> <span style="color: #FF6600">below</span></tt></pre></div></div>
-<div class="paragraph"><p>The <code>init/2</code> callback is common to all handlers. To switch
-to the REST handler behavior, it must return <code>cowboy_rest</code>
-as the first element of the tuple.</p></div>
-<div class="paragraph"><p>The <code>Callback/2</code> above represents all the REST-specific
-callbacks. They are described in the following section
-of this manual. REST-specific callbacks differ by their
-name, semantics, result and default values. The default
-value is the one used when the callback has not been
-implemented. They otherwise all follow the same interface.</p></div>
-<div class="paragraph"><p>The <code>stop</code> tuple can be returned to stop REST processing.
-If no response was sent before then, Cowboy will send a
-<em>204 No Content</em>. The <code>stop</code> tuple can be returned from
-any callback, excluding <code>expires</code>, <code>generate_etag</code>,
-<code>last_modified</code> and <code>variances</code>.</p></div>
-<div class="paragraph"><p>A <code>switch_handler</code> tuple can be returned from these same
-callbacks to stop REST processing and switch to a different
-handler type. This is very useful to, for example, to stream
-the response body.</p></div>
-<div class="paragraph"><p>The optional <code>terminate/3</code> callback will ultimately be called
-with the reason for the termination of the handler.
-Cowboy will terminate the process right after this. There
-is no need to perform any cleanup in this callback.</p></div>
-<div class="paragraph"><p>The following terminate reasons are defined for loop handlers:</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-normal
-</dt>
-<dd>
-<p>
- The handler terminated normally.
-</p>
+<p>REST handlers implement the following interface:</p>
+<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><b><font color="#000000">init</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>)
+ <font color="#990000">-&gt;</font> {<font color="#FF6600">cowboy_rest</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
+
+<font color="#009900">Callback</font>(<font color="#009900">Req</font>, <font color="#009900">State</font>)
+ <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
+ | {<font color="#FF6600">stop</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
+ | {{<font color="#FF6600">switch_handler</font>, <font color="#009900">Module</font>}, <font color="#009900">Req</font>, <font color="#009900">State</font>}
+ | {{<font color="#FF6600">switch_handler</font>, <font color="#009900">Module</font>, <font color="#009900">Opts</font>}, <font color="#009900">Req</font>, <font color="#009900">State</font>}
+
+<b><font color="#000000">terminate</font></b>(<font color="#009900">Reason</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> <font color="#FF6600">ok</font> <i><font color="#9A1900">%% optional</font></i>
+
+<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()
+<font color="#009900">State</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()
+<font color="#009900">Module</font> <font color="#990000">::</font> <b><font color="#000000">module</font></b>()
+<font color="#009900">Opts</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()
+<font color="#009900">Reason</font> <font color="#990000">::</font> <b><font color="#000080">normal</font></b>
+ | {<font color="#FF6600">crash</font>, <font color="#FF6600">error</font> | <b><font color="#000080">exit</font></b> | <b><font color="#000080">throw</font></b>, <b><font color="#000000">any</font></b>()}
+
+<font color="#009900">Callback</font> <font color="#990000">-</font> <font color="#FF6600">see</font> <font color="#FF6600">below</font>
+<font color="#009900">Result</font> <font color="#990000">-</font> <font color="#FF6600">see</font> <font color="#FF6600">below</font>
+<font color="#009900">Default</font> <font color="#990000">-</font> <font color="#FF6600">see</font> <font color="#FF6600">below</font></tt></pre>
+</div></div>
+<p>The <code>init/2</code> callback is common to all handlers. To switch to the REST handler behavior, it must return <code>cowboy_rest</code> as the first element of the tuple.</p>
+<p>The <code>Callback/2</code> above represents all the REST-specific callbacks. They are described in the following section of this manual. REST-specific callbacks differ by their name, semantics, result and default values. The default value is the one used when the callback has not been implemented. They otherwise all follow the same interface.</p>
+<p>The <code>stop</code> tuple can be returned to stop REST processing. If no response was sent before then, Cowboy will send a <em>204 No Content</em>. The <code>stop</code> tuple can be returned from any callback, excluding <code>expires</code>, <code>generate_etag</code>, <code>last_modified</code> and <code>variances</code>.</p>
+<p>A <code>switch_handler</code> tuple can be returned from these same callbacks to stop REST processing and switch to a different handler type. This is very useful to, for example, to stream the response body.</p>
+<p>The optional <code>terminate/3</code> callback will ultimately be called with the reason for the termination of the handler. Cowboy will terminate the process right after this. There is no need to perform any cleanup in this callback.</p>
+<p>The following terminate reasons are defined for loop handlers:</p>
+<dl><dt>normal</dt>
+<dd><p>The handler terminated normally.</p>
</dd>
-<dt class="hdlist1">
-{crash, Class, Reason}
-</dt>
-<dd>
-<p>
- A crash occurred in the handler. <code>Class</code> and <code>Reason</code> can be
- used to obtain more information about the crash. The function
- <code>erlang:get_stacktrace/0</code> can also be called to obtain the
- stacktrace of the process when the crash occurred.
-</p>
+<dt>{crash, Class, Reason}</dt>
+<dd><p>A crash occurred in the handler. <code>Class</code> and <code>Reason</code> can be used to obtain more information about the crash. The function <code>erlang:get_stacktrace/0</code> can also be called to obtain the stacktrace of the process when the crash occurred.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_rest_callbacks">REST callbacks</h2>
-<div class="sectionbody">
-<div class="sect2">
<h3 id="_acceptcallback">AcceptCallback</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #009900">AcceptCallback</span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
-
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="color: #000080">true</span> | {<span style="color: #000080">true</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: #000080">false</span>}
-<span style="color: #009900">Default</span> <span style="color: #990000">-</span> <span style="color: #FF6600">crash</span></tt></pre></div></div>
-<div class="paragraph"><p>Process the request body.</p></div>
-<div class="paragraph"><p>This function should create or update the resource using the
-request body.</p></div>
-<div class="paragraph"><p>For PUT requests, the body is a representation of the resource
-that is being created or replaced.</p></div>
-<div class="paragraph"><p>For POST requests, the body is typically application-specific
-instructions on how to process the request, but it may also
-be a representation of the resource. When creating a new
-resource with POST at a different location, return <code>{true, URI}</code>
-with <code>URI</code> the new location.</p></div>
-<div class="paragraph"><p>For PATCH requests, the body is a series of instructions on
-how to update the resource. Patch files or JSON Patch are
-examples of such media types.</p></div>
-<div class="paragraph"><p>A response body may be sent. The appropriate media type, charset
-and language for the response can be retrieved from the Req
-object using the <code>media_type</code>, <code>charset</code> and <code>language</code> keys,
-respectively. The body can be set using
-<a href="../cowboy_req.set_resp_body">cowboy_req:set_resp_body(3)</a>.</p></div>
-</div>
-<div class="sect2">
+<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><font color="#009900">AcceptCallback</font>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
+
+<font color="#009900">Result</font> <font color="#990000">::</font> <font color="#000080">true</font> | {<font color="#000080">true</font>, <font color="#009900">URI</font> <font color="#990000">::</font> <b><font color="#000000">iodata</font></b>()} | <font color="#000080">false</font>}
+<font color="#009900">Default</font> <font color="#990000">-</font> <font color="#FF6600">crash</font></tt></pre>
+</div></div>
+<p>Process the request body.</p>
+<p>This function should create or update the resource using the request body.</p>
+<p>For PUT requests, the body is a representation of the resource that is being created or replaced.</p>
+<p>For POST requests, the body is typically application-specific instructions on how to process the request, but it may also be a representation of the resource. When creating a new resource with POST at a different location, return <code>{true, URI}</code> with <code>URI</code> the new location.</p>
+<p>For PATCH requests, the body is a series of instructions on how to update the resource. Patch files or JSON Patch are examples of such media types.</p>
+<p>A response body may be sent. The appropriate media type, charset and language for the response can be retrieved from the Req object using the <code>media_type</code>, <code>charset</code> and <code>language</code> keys, respectively. The body can be set using <a href="../cowboy_req.set_resp_body">cowboy_req:set_resp_body(3)</a>.</p>
<h3 id="_allowed_methods">allowed_methods</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">allowed_methods</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">allowed_methods</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</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: #009900">Default</span> <span style="color: #990000">::</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">"HEAD"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"OPTIONS"</span><span style="color: #990000">&gt;&gt;</span>]</tt></pre></div></div>
-<div class="paragraph"><p>Return the list of allowed methods.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> [<b><font color="#000080">binary</font></b>()] <i><font color="#9A1900">%% case sensitive</font></i>
+<font color="#009900">Default</font> <font color="#990000">::</font> [<font color="#990000">&lt;&lt;</font><font color="#FF0000">"GET"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"HEAD"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"OPTIONS"</font><font color="#990000">&gt;&gt;</font>]</tt></pre>
+</div></div>
+<p>Return the list of allowed methods.</p>
<h3 id="_allow_missing_post">allow_missing_post</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">allow_missing_post</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">allow_missing_post</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()
-<span style="color: #009900">Default</span> <span style="color: #990000">::</span> <span style="color: #000080">true</span></tt></pre></div></div>
-<div class="paragraph"><p>Return whether POST is allowed when the resource doesn&#8217;t exist.</p></div>
-<div class="paragraph"><p>Returning <code>true</code> here means that a new resource will be
-created. The URI for the newly created resource should be
-returned from the <code>AcceptCallback</code> function.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> <b><font color="#000000">boolean</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <font color="#000080">true</font></tt></pre>
+</div></div>
+<p>Return whether POST is allowed when the resource doesn&apos;t exist.</p>
+<p>Returning <code>true</code> here means that a new resource will be created. The URI for the newly created resource should be returned from the <code>AcceptCallback</code> function.</p>
<h3 id="_charsets_provided">charsets_provided</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">charsets_provided</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">charsets_provided</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</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: #009900">Default</span> <span style="color: #990000">-</span> <span style="color: #FF6600">skip</span> <span style="color: #FF6600">this</span> <span style="color: #FF6600">step</span></tt></pre></div></div>
-<div class="paragraph"><p>Return the list of charsets the resource provides in order
-of preference.</p></div>
-<div class="paragraph"><p>During content negotiation Cowboy will pick the most
-appropriate charset for the client. The client advertises
-charsets it prefers with the accept-charset header. When
-that header is missing, Cowboy picks the first charset
-from the resource.</p></div>
-<div class="paragraph"><p>Cowboy will add the negotiated <code>charset</code> to the Req object
-after this step completes:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<font color="#009900">Result</font> <font color="#990000">::</font> [<b><font color="#000080">binary</font></b>()] <i><font color="#9A1900">%% lowercase; case insensitive</font></i>
+<font color="#009900">Default</font> <font color="#990000">-</font> <font color="#FF6600">skip</font> <font color="#FF6600">this</font> <font color="#FF6600">step</font></tt></pre>
+</div></div>
+<p>Return the list of charsets the resource provides in order of preference.</p>
+<p>During content negotiation Cowboy will pick the most appropriate charset for the client. The client advertises charsets it prefers with the accept-charset header. When that header is missing, Cowboy picks the first charset from the resource.</p>
+<!-- @todo We should explain precisely how charsets are picked.-->
+<p>Cowboy will add the negotiated <code>charset</code> to the Req object after this step completes:</p>
+<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: #0000FF">charset</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>
-}</tt></pre></div></div>
-</div>
-<div class="sect2">
+<pre><tt><b><font color="#000000">req</font></b>() <font color="#990000">::</font> #{
+ <font color="#0000FF">charset</font> <font color="#990000">=&gt;</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% lowercase; case insensitive</font></i>
+}</tt></pre>
+</div></div>
<h3 id="_content_types_accepted">content_types_accepted</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
-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">content_types_accepted</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
-
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> [{<span style="font-weight: bold"><span style="color: #000080">binary</span></span>() | <span style="color: #009900">ParsedMime</span>, <span style="color: #009900">AcceptCallback</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">atom</span></span>()}]
-<span style="color: #009900">ParsedMime</span> <span style="color: #990000">::</span> {<span style="color: #009900">Type</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="color: #009900">SubType</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="color: #FF6600">'*'</span> | <span style="color: #009900">Params</span>}
-<span style="color: #009900">Params</span> <span style="color: #990000">::</span> [{<span style="color: #009900">Key</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="color: #009900">Value</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()}]
-
-<span style="color: #009900">Default</span> <span style="color: #990000">-</span> <span style="color: #FF6600">crash</span></tt></pre></div></div>
-<div class="paragraph"><p>Return the list of media types the resource accepts in
-order of preference.</p></div>
-<div class="paragraph"><p>A media type is made of different parts. The media type
-<code>text/html;charset=utf-8</code> is of type <code>text</code>, subtype <code>html</code>
-and has a single parameter <code>charset</code> with value <code>utf-8</code>.</p></div>
-<div class="paragraph"><p>Cowboy will match the content-type request header against
-the media types the server accepts and select the appropriate
-callback. When that header is missing, or when the server does not
-accept this media type, the request fails and an error response
-is returned. Cowboy will execute the callback immediately otherwise.</p></div>
-<div class="paragraph"><p>An empty parameters list <code>[]</code> means that no parameters will be
-accepted. When any parameter is acceptable, the tuple form
-should be used with parameters as the atom <code>'*'</code>.</p></div>
-<div class="paragraph"><p>Cowboy treats all parameters as case sensitive, except for the
-<code>charset</code> parameter, which is known to be case insensitive. You
-should therefore always provide the charset as a lowercase
-binary string.</p></div>
-</div>
-<div class="sect2">
+<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><b><font color="#000000">content_types_accepted</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
+
+<font color="#009900">Result</font> <font color="#990000">::</font> [{<b><font color="#000080">binary</font></b>() | <font color="#009900">ParsedMime</font>, <font color="#009900">AcceptCallback</font> <font color="#990000">::</font> <b><font color="#000080">atom</font></b>()}]
+<font color="#009900">ParsedMime</font> <font color="#990000">::</font> {<font color="#009900">Type</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">SubType</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#FF6600">'*'</font> | <font color="#009900">Params</font>}
+<font color="#009900">Params</font> <font color="#990000">::</font> [{<font color="#009900">Key</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()}]
+
+<font color="#009900">Default</font> <font color="#990000">-</font> <font color="#FF6600">crash</font></tt></pre>
+</div></div>
+<!-- @todo Case sensitivity of parsed mime content?-->
+<p>Return the list of media types the resource accepts in order of preference.</p>
+<p>A media type is made of different parts. The media type <code>text/html;charset=utf-8</code> is of type <code>text</code>, subtype <code>html</code> and has a single parameter <code>charset</code> with value <code>utf-8</code>.</p>
+<!-- @todo Cowboy needs to ignore the boundary parameter for-->
+<!-- multipart, as we never want to match against it. Or allow-->
+<!-- ignoring specific parameters at the very least.-->
+<p>Cowboy will match the content-type request header against the media types the server accepts and select the appropriate callback. When that header is missing, or when the server does not accept this media type, the request fails and an error response is returned. Cowboy will execute the callback immediately otherwise.</p>
+<!-- @todo We should explain precisely how media types are picked.-->
+<p>An empty parameters list <code>[]</code> means that no parameters will be accepted. When any parameter is acceptable, the tuple form should be used with parameters as the atom <code>&apos;*&apos;</code>.</p>
+<p>Cowboy treats all parameters as case sensitive, except for the <code>charset</code> parameter, which is known to be case insensitive. You should therefore always provide the charset as a lowercase binary string.</p>
+<!-- @todo Maybe this should be in the user guide instead.-->
+<!-- This function will be called for POST, PUT and PATCH requests.-->
+<!-- It is entirely possible to define different callbacks for different-->
+<!-- methods if the handling of the request differs. Simply verify-->
+<!-- what the method is with `cowboy_req:method/1` and return a-->
+<!-- different list for each methods.-->
<h3 id="_content_types_provided">content_types_provided</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
-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">content_types_provided</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
-
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> [{<span style="font-weight: bold"><span style="color: #000080">binary</span></span>() | <span style="color: #009900">ParsedMime</span>, <span style="color: #009900">ProvideCallback</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">atom</span></span>()}]
-<span style="color: #009900">ParsedMime</span> <span style="color: #990000">::</span> {<span style="color: #009900">Type</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="color: #009900">SubType</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="color: #FF6600">'*'</span> | <span style="color: #009900">Params</span>}
-<span style="color: #009900">Params</span> <span style="color: #990000">::</span> [{<span style="color: #009900">Key</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="color: #009900">Value</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()}]
-
-<span style="color: #009900">Default</span> <span style="color: #990000">-</span> [{{ <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"html"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #FF6600">'*'</span>}, <span style="color: #FF6600">to_html</span>}]</tt></pre></div></div>
-<div class="paragraph"><p>Return the list of media types the resource provides in
-order of preference.</p></div>
-<div class="paragraph"><p>A media type is made of different parts. The media type
-<code>text/html;charset=utf-8</code> is of type <code>text</code>, subtype <code>html</code>
-and has a single parameter <code>charset</code> with value <code>utf-8</code>.</p></div>
-<div class="paragraph"><p>During content negotiation Cowboy will pick the most appropriate
-media type for the client. The client advertises media types it
-prefers with the accept header. When that header is missing,
-the content negotiation fails and an error response is returned.</p></div>
-<div class="paragraph"><p>The callback given for the selected media type will be called
-at the end of the execution of GET and HEAD requests when a
-representation must be sent to the client.</p></div>
-<div class="paragraph"><p>An empty parameters list <code>[]</code> means that no parameters will be
-accepted. When any parameter is acceptable, the tuple form
-should be used with parameters as the atom <code>'*'</code>.</p></div>
-<div class="paragraph"><p>Cowboy treats all parameters as case sensitive, except for the
-<code>charset</code> parameter, which is known to be case insensitive. You
-should therefore always provide the charset as a lowercase
-binary string.</p></div>
-<div class="paragraph"><p>Cowboy will add the negotiated <code>media_type</code> to the Req object
-after this step completes:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
-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: #0000FF">media_type</span> <span style="color: #990000">=&gt;</span> <span style="color: #009900">ParsedMime</span>
-}</tt></pre></div></div>
-</div>
-<div class="sect2">
+<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><b><font color="#000000">content_types_provided</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
+
+<font color="#009900">Result</font> <font color="#990000">::</font> [{<b><font color="#000080">binary</font></b>() | <font color="#009900">ParsedMime</font>, <font color="#009900">ProvideCallback</font> <font color="#990000">::</font> <b><font color="#000080">atom</font></b>()}]
+<font color="#009900">ParsedMime</font> <font color="#990000">::</font> {<font color="#009900">Type</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">SubType</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#FF6600">'*'</font> | <font color="#009900">Params</font>}
+<font color="#009900">Params</font> <font color="#990000">::</font> [{<font color="#009900">Key</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()}]
+
+<font color="#009900">Default</font> <font color="#990000">-</font> [{{ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"html"</font><font color="#990000">&gt;&gt;</font>, <font color="#FF6600">'*'</font>}, <font color="#FF6600">to_html</font>}]</tt></pre>
+</div></div>
+<!-- @todo Case sensitivity of parsed mime content?-->
+<!-- @todo Space required for the time being: https://github.com/spf13/hugo/issues/2398-->
+<p>Return the list of media types the resource provides in order of preference.</p>
+<p>A media type is made of different parts. The media type <code>text/html;charset=utf-8</code> is of type <code>text</code>, subtype <code>html</code> and has a single parameter <code>charset</code> with value <code>utf-8</code>.</p>
+<!-- @todo Cowboy needs to ignore the boundary parameter for-->
+<!-- multipart, as we never want to match against it. Or allow-->
+<!-- ignoring specific parameters at the very least.-->
+<p>During content negotiation Cowboy will pick the most appropriate media type for the client. The client advertises media types it prefers with the accept header. When that header is missing, the content negotiation fails and an error response is returned.</p>
+<p>The callback given for the selected media type will be called at the end of the execution of GET and HEAD requests when a representation must be sent to the client.</p>
+<!-- @todo We should explain precisely how media types are picked.-->
+<p>An empty parameters list <code>[]</code> means that no parameters will be accepted. When any parameter is acceptable, the tuple form should be used with parameters as the atom <code>&apos;*&apos;</code>.</p>
+<p>Cowboy treats all parameters as case sensitive, except for the <code>charset</code> parameter, which is known to be case insensitive. You should therefore always provide the charset as a lowercase binary string.</p>
+<p>Cowboy will add the negotiated <code>media_type</code> to the Req object after this step completes:</p>
+<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><b><font color="#000000">req</font></b>() <font color="#990000">::</font> #{
+ <font color="#0000FF">media_type</font> <font color="#990000">=&gt;</font> <font color="#009900">ParsedMime</font>
+}</tt></pre>
+</div></div>
+<!-- @todo Case sensitivity of parsed mime content?-->
<h3 id="_delete_completed">delete_completed</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">delete_completed</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">delete_completed</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()
-<span style="color: #009900">Default</span> <span style="color: #990000">::</span> <span style="color: #000080">true</span></tt></pre></div></div>
-<div class="paragraph"><p>Return whether the resource has been fully deleted from the
-system, including from any internal cache.</p></div>
-<div class="paragraph"><p>Returning <code>false</code> will result in a <em>202 Accepted</em> response
-being sent instead of a <em>200 OK</em> or <em>204 No Content</em>.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> <b><font color="#000000">boolean</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <font color="#000080">true</font></tt></pre>
+</div></div>
+<p>Return whether the resource has been fully deleted from the system, including from any internal cache.</p>
+<p>Returning <code>false</code> will result in a <em>202 Accepted</em> response being sent instead of a <em>200 OK</em> or <em>204 No Content</em>.</p>
<h3 id="_delete_resource">delete_resource</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">delete_resource</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">delete_resource</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()
-<span style="color: #009900">Default</span> <span style="color: #990000">::</span> <span style="color: #000080">false</span></tt></pre></div></div>
-<div class="paragraph"><p>Delete the resource.</p></div>
-<div class="paragraph"><p>Cowboy will send an error response when this function
-returns <code>false</code>.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> <b><font color="#000000">boolean</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <font color="#000080">false</font></tt></pre>
+</div></div>
+<p>Delete the resource.</p>
+<p>Cowboy will send an error response when this function returns <code>false</code>.</p>
<h3 id="_expires">expires</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">expires</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">expires</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">calendar:datetime</span></span>() | <span style="font-weight: bold"><span style="color: #000080">binary</span></span>() | <span style="color: #000080">undefined</span>
-<span style="color: #009900">Default</span> <span style="color: #990000">::</span> <span style="color: #000080">undefined</span></tt></pre></div></div>
-<div class="paragraph"><p>Return the resource&#8217;s expiration date.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> <b><font color="#000000">calendar:datetime</font></b>() | <b><font color="#000080">binary</font></b>() | <font color="#000080">undefined</font>
+<font color="#009900">Default</font> <font color="#990000">::</font> <font color="#000080">undefined</font></tt></pre>
+</div></div>
+<p>Return the resource&apos;s expiration date.</p>
<h3 id="_forbidden">forbidden</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">forbidden</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">forbidden</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()
-<span style="color: #009900">Default</span> <span style="color: #990000">::</span> <span style="color: #000080">false</span></tt></pre></div></div>
-<div class="paragraph"><p>Return whether access to the resource is forbidden.</p></div>
-<div class="paragraph"><p>A <em>403 Forbidden</em> response will be sent if this
-function returns <code>true</code>. This status code means that
-access is forbidden regardless of authentication,
-and that the request shouldn&#8217;t be repeated.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> <b><font color="#000000">boolean</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <font color="#000080">false</font></tt></pre>
+</div></div>
+<p>Return whether access to the resource is forbidden.</p>
+<p>A <em>403 Forbidden</em> response will be sent if this function returns <code>true</code>. This status code means that access is forbidden regardless of authentication, and that the request shouldn&apos;t be repeated.</p>
<h3 id="_generate_etag">generate_etag</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">generate_etag</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">generate_etag</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>() | {<span style="color: #FF6600">weak</span> | <span style="color: #FF6600">strong</span>, <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()}
-<span style="color: #009900">Default</span> <span style="color: #990000">-</span> <span style="color: #FF6600">no</span> <span style="color: #FF6600">etag</span> <span style="color: #FF6600">value</span></tt></pre></div></div>
-<div class="paragraph"><p>Return the entity tag of the resource.</p></div>
-<div class="paragraph"><p>When a binary is returned, the value is automatically
-parsed to a tuple. The binary must be in the same
-format as the etag header, including quotes.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() | {<font color="#FF6600">weak</font> | <font color="#FF6600">strong</font>, <b><font color="#000080">binary</font></b>()}
+<font color="#009900">Default</font> <font color="#990000">-</font> <font color="#FF6600">no</font> <font color="#FF6600">etag</font> <font color="#FF6600">value</font></tt></pre>
+</div></div>
+<p>Return the entity tag of the resource.</p>
+<p>When a binary is returned, the value is automatically parsed to a tuple. The binary must be in the same format as the etag header, including quotes.</p>
<h3 id="_is_authorized">is_authorized</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">is_authorized</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">is_authorized</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="color: #000080">true</span> | {<span style="color: #000080">false</span>, <span style="color: #009900">AuthHeader</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>()}
-<span style="color: #009900">Default</span> <span style="color: #990000">-</span> <span style="color: #000080">true</span></tt></pre></div></div>
-<div class="paragraph"><p>Return whether the user is authorized to perform the action.</p></div>
-<div class="paragraph"><p>This function should be used to perform any necessary
-authentication of the user before attempting to perform
-any action on the resource.</p></div>
-<div class="paragraph"><p>When authentication fails, the <code>AuthHeader</code> value will
-be sent in the www-authenticate header for the
-<em>401 Unauthorized</em> response.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> <font color="#000080">true</font> | {<font color="#000080">false</font>, <font color="#009900">AuthHeader</font> <font color="#990000">::</font> <b><font color="#000000">iodata</font></b>()}
+<font color="#009900">Default</font> <font color="#990000">-</font> <font color="#000080">true</font></tt></pre>
+</div></div>
+<p>Return whether the user is authorized to perform the action.</p>
+<p>This function should be used to perform any necessary authentication of the user before attempting to perform any action on the resource.</p>
+<p>When authentication fails, the <code>AuthHeader</code> value will be sent in the www-authenticate header for the <em>401 Unauthorized</em> response.</p>
<h3 id="_is_conflict">is_conflict</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">is_conflict</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">is_conflict</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()
-<span style="color: #009900">Default</span> <span style="color: #990000">::</span> <span style="color: #000080">false</span></tt></pre></div></div>
-<div class="paragraph"><p>Return whether the PUT request results in a conflict.</p></div>
-<div class="paragraph"><p>A <em>409 Conflict</em> response is sent when <code>true</code>.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> <b><font color="#000000">boolean</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <font color="#000080">false</font></tt></pre>
+</div></div>
+<p>Return whether the PUT request results in a conflict.</p>
+<p>A <em>409 Conflict</em> response is sent when <code>true</code>.</p>
<h3 id="_known_methods">known_methods</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">known_methods</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">known_methods</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</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: #009900">Default</span> <span style="color: #990000">::</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">"HEAD"</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="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"PUT"</span><span style="color: #990000">&gt;&gt;</span>,
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"PATCH"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"DELETE"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"OPTIONS"</span><span style="color: #990000">&gt;&gt;</span>]</tt></pre></div></div>
-<div class="paragraph"><p>Return the list of known methods.</p></div>
-<div class="paragraph"><p>The full list of methods known by the server should be
-returned, regardless of their use in the resource.</p></div>
-<div class="paragraph"><p>The default value lists the methods Cowboy knows and
-implement in <code>cowboy_rest</code>.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> [<b><font color="#000080">binary</font></b>()] <i><font color="#9A1900">%% case sensitive</font></i>
+<font color="#009900">Default</font> <font color="#990000">::</font> [<font color="#990000">&lt;&lt;</font><font color="#FF0000">"GET"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"HEAD"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"POST"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"PUT"</font><font color="#990000">&gt;&gt;</font>,
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"PATCH"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"DELETE"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"OPTIONS"</font><font color="#990000">&gt;&gt;</font>]</tt></pre>
+</div></div>
+<p>Return the list of known methods.</p>
+<p>The full list of methods known by the server should be returned, regardless of their use in the resource.</p>
+<p>The default value lists the methods Cowboy knows and implement in <code>cowboy_rest</code>.</p>
<h3 id="_languages_provided">languages_provided</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">languages_provided</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">languages_provided</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</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: #009900">Default</span> <span style="color: #990000">-</span> <span style="color: #FF6600">skip</span> <span style="color: #FF6600">this</span> <span style="color: #FF6600">step</span></tt></pre></div></div>
-<div class="paragraph"><p>Return the list of languages the resource provides in order
-of preference.</p></div>
-<div class="paragraph"><p>During content negotiation Cowboy will pick the most
-appropriate language for the client. The client advertises
-languages it prefers with the accept-language header. When
-that header is missing, Cowboy picks the first language
-from the resource.</p></div>
-<div class="paragraph"><p>Cowboy will add the negotiated <code>language</code> to the Req object
-after this step completes:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<font color="#009900">Result</font> <font color="#990000">::</font> [<b><font color="#000080">binary</font></b>()] <i><font color="#9A1900">%% lowercase; case insensitive</font></i>
+<font color="#009900">Default</font> <font color="#990000">-</font> <font color="#FF6600">skip</font> <font color="#FF6600">this</font> <font color="#FF6600">step</font></tt></pre>
+</div></div>
+<p>Return the list of languages the resource provides in order of preference.</p>
+<p>During content negotiation Cowboy will pick the most appropriate language for the client. The client advertises languages it prefers with the accept-language header. When that header is missing, Cowboy picks the first language from the resource.</p>
+<!-- @todo We should explain precisely how languages are picked.-->
+<p>Cowboy will add the negotiated <code>language</code> to the Req object after this step completes:</p>
+<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: #0000FF">language</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>
-}</tt></pre></div></div>
-</div>
-<div class="sect2">
+<pre><tt><b><font color="#000000">req</font></b>() <font color="#990000">::</font> #{
+ <font color="#0000FF">language</font> <font color="#990000">=&gt;</font> <b><font color="#000080">binary</font></b>() <i><font color="#9A1900">%% lowercase; case insensitive</font></i>
+}</tt></pre>
+</div></div>
<h3 id="_last_modified">last_modified</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">last_modified</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">last_modified</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">calendar:datetime</span></span>()
-<span style="color: #009900">Default</span> <span style="color: #990000">-</span> <span style="color: #FF6600">no</span> <span style="color: #FF6600">last</span> <span style="color: #FF6600">modified</span> <span style="color: #FF6600">value</span></tt></pre></div></div>
-<div class="paragraph"><p>Return the resource&#8217;s last modification date.</p></div>
-<div class="paragraph"><p>This date will be used to test against the if-modified-since
-and if-unmodified-since headers, and sent as the last-modified
-header in the response to GET and HEAD requests.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> <b><font color="#000000">calendar:datetime</font></b>()
+<font color="#009900">Default</font> <font color="#990000">-</font> <font color="#FF6600">no</font> <font color="#FF6600">last</font> <font color="#FF6600">modified</font> <font color="#FF6600">value</font></tt></pre>
+</div></div>
+<p>Return the resource&apos;s last modification date.</p>
+<p>This date will be used to test against the if-modified-since and if-unmodified-since headers, and sent as the last-modified header in the response to GET and HEAD requests.</p>
<h3 id="_malformed_request">malformed_request</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">malformed_request</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">malformed_request</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()
-<span style="color: #009900">Default</span> <span style="color: #990000">::</span> <span style="color: #000080">false</span></tt></pre></div></div>
-<div class="paragraph"><p>Return whether the request is malformed.</p></div>
-<div class="paragraph"><p>A request is malformed when a component required by the
-resource is invalid. This may include the query string
-or individual headers. They should be parsed and validated
-in this function. The body should not be read at this point.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> <b><font color="#000000">boolean</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <font color="#000080">false</font></tt></pre>
+</div></div>
+<p>Return whether the request is malformed.</p>
+<p>A request is malformed when a component required by the resource is invalid. This may include the query string or individual headers. They should be parsed and validated in this function. The body should not be read at this point.</p>
<h3 id="_moved_permanently">moved_permanently</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">moved_permanently</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">moved_permanently</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> {<span style="color: #000080">true</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: #000080">false</span>
-<span style="color: #009900">Default</span> <span style="color: #990000">::</span> <span style="color: #000080">false</span></tt></pre></div></div>
-<div class="paragraph"><p>Return whether the resource was permanently moved, and
-what its new location is.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> {<font color="#000080">true</font>, <font color="#009900">URI</font> <font color="#990000">::</font> <b><font color="#000000">iodata</font></b>()} | <font color="#000080">false</font>
+<font color="#009900">Default</font> <font color="#990000">::</font> <font color="#000080">false</font></tt></pre>
+</div></div>
+<p>Return whether the resource was permanently moved, and what its new location is.</p>
<h3 id="_moved_temporarily">moved_temporarily</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">moved_temporarily</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">moved_temporarily</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> {<span style="color: #000080">true</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: #000080">false</span>
-<span style="color: #009900">Default</span> <span style="color: #990000">::</span> <span style="color: #000080">false</span></tt></pre></div></div>
-<div class="paragraph"><p>Return whether the resource was temporarily moved, and
-what its new location is.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> {<font color="#000080">true</font>, <font color="#009900">URI</font> <font color="#990000">::</font> <b><font color="#000000">iodata</font></b>()} | <font color="#000080">false</font>
+<font color="#009900">Default</font> <font color="#990000">::</font> <font color="#000080">false</font></tt></pre>
+</div></div>
+<p>Return whether the resource was temporarily moved, and what its new location is.</p>
<h3 id="_multiple_choices">multiple_choices</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
-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">multiple_choices</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
-
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()
-<span style="color: #009900">Default</span> <span style="color: #990000">::</span> <span style="color: #000080">false</span></tt></pre></div></div>
-<div class="paragraph"><p>Return whether the client should engage in reactive
-negotiation.</p></div>
-<div class="paragraph"><p>Return <code>true</code> when the server has multiple representations
-of a resource, each with their specific identifier, but is
-unable to determine which is best for the client. For
-example an image might have different sizes and the server
-is unable to determine the capabilities of the client.</p></div>
-<div class="paragraph"><p>When returning <code>true</code> the server should send a body with
-links to the different representations. If the server has
-a preferred representation it can send its link inside a
-location header.</p></div>
-</div>
-<div class="sect2">
+<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><b><font color="#000000">multiple_choices</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
+
+<font color="#009900">Result</font> <font color="#990000">::</font> <b><font color="#000000">boolean</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <font color="#000080">false</font></tt></pre>
+</div></div>
+<p>Return whether the client should engage in reactive negotiation.</p>
+<p>Return <code>true</code> when the server has multiple representations of a resource, each with their specific identifier, but is unable to determine which is best for the client. For example an image might have different sizes and the server is unable to determine the capabilities of the client.</p>
+<p>When returning <code>true</code> the server should send a body with links to the different representations. If the server has a preferred representation it can send its link inside a location header.</p>
<h3 id="_options">options</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">options</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}</tt></pre></div></div>
-<div class="paragraph"><p>Respond to an OPTIONS request.</p></div>
-<div class="paragraph"><p>The response should inform the client the communication
-options available for this resource. By default Cowboy
-will send a <em>200 OK</em> response with the allow header set.</p></div>
-</div>
-<div class="sect2">
+<pre><tt><b><font color="#000000">options</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}</tt></pre>
+</div></div>
+<p>Respond to an OPTIONS request.</p>
+<p>The response should inform the client the communication options available for this resource. By default Cowboy will send a <em>200 OK</em> response with the allow header set.</p>
<h3 id="_previously_existed">previously_existed</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">previously_existed</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">previously_existed</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()
-<span style="color: #009900">Default</span> <span style="color: #990000">::</span> <span style="color: #000080">false</span></tt></pre></div></div>
-<div class="paragraph"><p>Return whether the resource existed previously.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> <b><font color="#000000">boolean</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <font color="#000080">false</font></tt></pre>
+</div></div>
+<p>Return whether the resource existed previously.</p>
<h3 id="_providecallback">ProvideCallback</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">ProvideCallback</span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><font color="#009900">ProvideCallback</font>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:resp_body</span></span>()
-<span style="color: #009900">Default</span> <span style="color: #990000">-</span> <span style="color: #FF6600">crash</span></tt></pre></div></div>
-<div class="paragraph"><p>Return the response body.</p></div>
-<div class="paragraph"><p>The response body can be provided either as the actual data
-to be sent or a tuple indicating which file to send.</p></div>
-<div class="paragraph"><p>This function is called for both GET and HEAD requests. For
-the latter the body is not sent, however.</p></div>
-<div class="paragraph"><p>Note that there used to be a way to stream the response body.
-It was temporarily removed and will be added back in a later
-release.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:resp_body</font></b>()
+<font color="#009900">Default</font> <font color="#990000">-</font> <font color="#FF6600">crash</font></tt></pre>
+</div></div>
+<p>Return the response body.</p>
+<p>The response body can be provided either as the actual data to be sent or a tuple indicating which file to send.</p>
+<p>This function is called for both GET and HEAD requests. For the latter the body is not sent, however.</p>
+<!-- @todo Perhaps we can optimize HEAD requests and just-->
+<!-- allow calculating the length instead of returning the-->
+<!-- whole thing.-->
+<p>Note that there used to be a way to stream the response body. It was temporarily removed and will be added back in a later release.</p>
+<!-- @todo Add a way to switch to loop handler for streaming the body.-->
<h3 id="_resource_exists">resource_exists</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">resource_exists</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">resource_exists</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()
-<span style="color: #009900">Default</span> <span style="color: #990000">::</span> <span style="color: #000080">true</span></tt></pre></div></div>
-<div class="paragraph"><p>Return whether the resource exists.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> <b><font color="#000000">boolean</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <font color="#000080">true</font></tt></pre>
+</div></div>
+<p>Return whether the resource exists.</p>
<h3 id="_service_available">service_available</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">service_available</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">service_available</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()
-<span style="color: #009900">Default</span> <span style="color: #990000">::</span> <span style="color: #000080">true</span></tt></pre></div></div>
-<div class="paragraph"><p>Return whether the service is available.</p></div>
-<div class="paragraph"><p>A <em>503 Service Unavailable</em> response will be sent when this
-function returns <code>false</code>.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> <b><font color="#000000">boolean</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <font color="#000080">true</font></tt></pre>
+</div></div>
+<p>Return whether the service is available.</p>
+<p>A <em>503 Service Unavailable</em> response will be sent when this function returns <code>false</code>.</p>
<h3 id="_uri_too_long">uri_too_long</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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_too_long</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">uri_too_long</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()
-<span style="color: #009900">Default</span> <span style="color: #990000">::</span> <span style="color: #000080">false</span></tt></pre></div></div>
-<div class="paragraph"><p>Return whether the requested URI is too long.</p></div>
-<div class="paragraph"><p>This function can be used to further restrict the length
-of the URI for this specific resource.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> <b><font color="#000000">boolean</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <font color="#000080">false</font></tt></pre>
+</div></div>
+<p>Return whether the requested URI is too long.</p>
+<p>This function can be used to further restrict the length of the URI for this specific resource.</p>
<h3 id="_valid_content_headers">valid_content_headers</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">valid_content_headers</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">valid_content_headers</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()
-<span style="color: #009900">Default</span> <span style="color: #990000">::</span> <span style="color: #000080">true</span></tt></pre></div></div>
-<div class="paragraph"><p>Return whether the content headers are valid.</p></div>
-<div class="paragraph"><p>This callback can be used to reject requests that have
-invalid content header values, for example an unsupported
-content-encoding.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> <b><font color="#000000">boolean</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <font color="#000080">true</font></tt></pre>
+</div></div>
+<p>Return whether the content headers are valid.</p>
+<p>This callback can be used to reject requests that have invalid content header values, for example an unsupported content-encoding.</p>
<h3 id="_valid_entity_length">valid_entity_length</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">valid_entity_length</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">valid_entity_length</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()
-<span style="color: #009900">Default</span> <span style="color: #990000">::</span> <span style="color: #000080">true</span></tt></pre></div></div>
-<div class="paragraph"><p>Return whether the request body length is within acceptable boundaries.</p></div>
-<div class="paragraph"><p>A <em>413 Request Entity Too Large</em> response will be sent if this
-function returns <code>false</code>.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Result</font> <font color="#990000">::</font> <b><font color="#000000">boolean</font></b>()
+<font color="#009900">Default</font> <font color="#990000">::</font> <font color="#000080">true</font></tt></pre>
+</div></div>
+<p>Return whether the request body length is within acceptable boundaries.</p>
+<p>A <em>413 Request Entity Too Large</em> response will be sent if this function returns <code>false</code>.</p>
<h3 id="_variances">variances</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">variances</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Result</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+<pre><tt><b><font color="#000000">variances</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Result</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
-<span style="color: #009900">Result</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 insensitive</span></span>
-<span style="color: #009900">Default</span> <span style="color: #990000">::</span> []</tt></pre></div></div>
-<div class="paragraph"><p>Return the list of request headers that affect the
-representation of the resource.</p></div>
-<div class="paragraph"><p>Cowboy automatically adds the accept, accept-charset and
-accept-language headers when necessary. It&#8217;s also useful
-to note that some standard headers also do not need to be
-listed here, like the authorization header.</p></div>
-</div>
-</div>
-</div>
-<div class="sect1">
+<font color="#009900">Result</font> <font color="#990000">::</font> [<b><font color="#000080">binary</font></b>()] <i><font color="#9A1900">%% case insensitive</font></i>
+<font color="#009900">Default</font> <font color="#990000">::</font> []</tt></pre>
+</div></div>
+<p>Return the list of request headers that affect the representation of the resource.</p>
+<p>Cowboy automatically adds the accept, accept-charset and accept-language headers when necessary. It&apos;s also useful to note that some standard headers also do not need to be listed here, like the authorization header.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.1</strong>: The <code>switch_handler</code> return value was added.
-</p>
+<ul><li><strong>2.1</strong>: The <code>switch_handler</code> return value was added.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Behavior introduced.
-</p>
+<li><strong>1.0</strong>: Behavior introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="..">cowboy(7)</a>,
-<a href="../cowboy_handler">cowboy_handler(3)</a></p></div>
-</div>
-</div>
+<p><a href="..">cowboy(7)</a>, <a href="../cowboy_handler">cowboy_handler(3)</a></p>
+
diff --git a/docs/en/cowboy/2.4/manual/cowboy_router.compile/index.html b/docs/en/cowboy/2.4/manual/cowboy_router.compile/index.html
index c3eb3884..1aac627b 100644
--- a/docs/en/cowboy/2.4/manual/cowboy_router.compile/index.html
+++ b/docs/en/cowboy/2.4/manual/cowboy_router.compile/index.html
@@ -62,87 +62,48 @@
<h1 class="lined-header"><span>cowboy_router:compile(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_router:compile - Compile routes to the resources</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_router:compile - Compile routes to the resources</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">compile</span></span>(<span style="font-weight: bold"><span style="color: #000000">cowboy_router:routes</span></span>()) <span style="color: #990000">-&gt;</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_router:dispatch_rules</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Compile routes to the resources.</p></div>
-<div class="paragraph"><p>Takes a human readable list of routes and transforms it
-into a form more efficient to process.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">compile</font></b>(<b><font color="#000000">cowboy_router:routes</font></b>()) <font color="#990000">-&gt;</font> <b><font color="#000000">cowboy_router:dispatch_rules</font></b>()</tt></pre>
+</div></div>
+<p>Compile routes to the resources.</p>
+<p>Takes a human readable list of routes and transforms it into a form more efficient to process.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Routes
-</dt>
-<dd>
-<p>
-Human readable list of routes.
-</p>
+<dl><dt>Routes</dt>
+<dd><p>Human readable list of routes.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>An opaque dispatch rules value is returned. This value
-must be given to Cowboy as a middleware environment value.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>An opaque dispatch rules value is returned. This value must be given to Cowboy as a middleware environment value.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<ul><li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Compile routes and start a listener</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Compile routes and start a listener</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">Dispatch</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_router:compile</span></span>([
- {<span style="color: #FF6600">'_'</span>, [
- {<span style="color: #FF0000">"/"</span>, <span style="color: #FF6600">toppage_h</span>, []},
- {<span style="color: #FF0000">"/[...], cowboy_static, {priv_dir, my_example_app, ""}}</span>
-<span style="color: #FF0000"> ]}</span>
-<span style="color: #FF0000">]),</span>
-
-<span style="color: #FF0000">{ok, _} = cowboy:start_clear(example, [{port, 8080}], #{</span>
-<span style="color: #FF0000"> env =&gt; #{dispatch =&gt; Dispatch}</span>
-<span style="color: #FF0000">}).</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Dispatch</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_router:compile</font></b>([
+ {<font color="#FF6600">'_'</font>, [
+ {<font color="#FF0000">"/"</font>, <font color="#FF6600">toppage_h</font>, []},
+ {<font color="#FF0000">"/[...], cowboy_static, {priv_dir, my_example_app, ""}}</font>
+<font color="#FF0000"> ]}</font>
+<font color="#FF0000">]),</font>
+
+<font color="#FF0000">{ok, _} = cowboy:start_clear(example, [{port, 8080}], #{</font>
+<font color="#FF0000"> env =&gt; #{dispatch =&gt; Dispatch}</font>
+<font color="#FF0000">}).</font></tt></pre>
+</div></div>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../cowboy_router">cowboy_router(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_router">cowboy_router(3)</a></p>
+
diff --git a/docs/en/cowboy/2.4/manual/cowboy_router/index.html b/docs/en/cowboy/2.4/manual/cowboy_router/index.html
index 0169ae42..e08c3983 100644
--- a/docs/en/cowboy/2.4/manual/cowboy_router/index.html
+++ b/docs/en/cowboy/2.4/manual/cowboy_router/index.html
@@ -62,110 +62,65 @@
<h1 class="lined-header"><span>cowboy_router(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_router - Router middleware</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_router - Router middleware</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <code>cowboy_router</code> middleware maps the requested host and
-path to the handler to be used for processing the request.</p></div>
-<div class="paragraph"><p>The router takes the <code>dispatch</code> rules as input from the
-middleware environment. Dispatch rules are generated by
-calling the
-<a href="../cowboy_router.compile">cowboy_router:compile(3)</a>
-function.</p></div>
-<div class="paragraph"><p>When a route matches, the router sets the <code>handler</code> and
-<code>handler_opts</code> middleware environment values containing
-the handler module and initial state, respectively.</p></div>
-<div class="paragraph"><p>The router will stop execution when no route matches.
-It will send a 400 response if no host was found, and
-a 404 response otherwise.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The <code>cowboy_router</code> middleware maps the requested host and path to the handler to be used for processing the request.</p>
+<p>The router takes the <code>dispatch</code> rules as input from the middleware environment. Dispatch rules are generated by calling the <a href="../cowboy_router.compile">cowboy_router:compile(3)</a> function.</p>
+<p>When a route matches, the router sets the <code>handler</code> and <code>handler_opts</code> middleware environment values containing the handler module and initial state, respectively.</p>
+<p>The router will stop execution when no route matches. It will send a 400 response if no host was found, and a 404 response otherwise.</p>
<h2 id="_exports">Exports</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../cowboy_router.compile">cowboy_router:compile(3)</a> - Compile routes to the resources
-</p>
+<ul><li><a href="../cowboy_router.compile">cowboy_router:compile(3)</a> - Compile routes to the resources
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_types">Types</h2>
-<div class="sectionbody">
-<div class="sect2">
<h3 id="_bindings">bindings()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">bindings</span></span>() <span style="color: #990000">::</span> #{<span style="font-weight: bold"><span style="color: #000080">atom</span></span>() <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>Bindings found during routing.</p></div>
-</div>
-<div class="sect2">
+<pre><tt><b><font color="#000000">bindings</font></b>() <font color="#990000">::</font> #{<b><font color="#000080">atom</font></b>() <font color="#990000">=&gt;</font> <b><font color="#000000">any</font></b>()}</tt></pre>
+</div></div>
+<p>Bindings found during routing.</p>
<h3 id="_dispatch_rules">dispatch_rules()</h3>
-<div class="paragraph"><p>Opaque type containing the compiled routes.</p></div>
-</div>
-<div class="sect2">
+<p>Opaque type containing the compiled routes.</p>
<h3 id="_routes">routes()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">routes</span></span>() <span style="color: #990000">=</span> [
- {<span style="color: #009900">Host</span>, <span style="color: #009900">PathList</span>} |
- {<span style="color: #009900">Host</span>, <span style="color: #009900">Fields</span>, <span style="color: #009900">PathList</span>}
+<pre><tt><b><font color="#000000">routes</font></b>() <font color="#990000">=</font> [
+ {<font color="#009900">Host</font>, <font color="#009900">PathList</font>} |
+ {<font color="#009900">Host</font>, <font color="#009900">Fields</font>, <font color="#009900">PathList</font>}
]
-<span style="color: #009900">PathList</span> <span style="color: #990000">::</span> [
- {<span style="color: #009900">Path</span>, <span style="color: #009900">Handler</span>, <span style="color: #009900">InitialState</span>} |
- {<span style="color: #009900">Path</span>, <span style="color: #009900">Fields</span>, <span style="color: #009900">Handler</span>, <span style="color: #009900">InitialState</span>}
+<font color="#009900">PathList</font> <font color="#990000">::</font> [
+ {<font color="#009900">Path</font>, <font color="#009900">Handler</font>, <font color="#009900">InitialState</font>} |
+ {<font color="#009900">Path</font>, <font color="#009900">Fields</font>, <font color="#009900">Handler</font>, <font color="#009900">InitialState</font>}
]
-<span style="color: #009900">Host</span> <span style="color: #990000">::</span> <span style="color: #FF6600">'_'</span> | <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>()
-<span style="color: #009900">Path</span> <span style="color: #990000">::</span> <span style="color: #FF6600">'_'</span> | <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>()
-<span style="color: #009900">Fields</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:fields</span></span>()
-<span style="color: #009900">Handler</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">module</span></span>()
-<span style="color: #009900">InitialState</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>Human readable list of routes to handlers.</p></div>
-<div class="paragraph"><p>Cowboy uses this list to map hosts and paths, optionally
-augmented with constraints applied to the bindings, to
-handler modules.</p></div>
-<div class="paragraph"><p>The syntax for routes is currently defined in the user guide.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Host</font> <font color="#990000">::</font> <font color="#FF6600">'_'</font> | <b><font color="#000000">iodata</font></b>()
+<font color="#009900">Path</font> <font color="#990000">::</font> <font color="#FF6600">'_'</font> | <b><font color="#000000">iodata</font></b>()
+<font color="#009900">Fields</font> <font color="#990000">::</font> <b><font color="#000000">cowboy:fields</font></b>()
+<font color="#009900">Handler</font> <font color="#990000">::</font> <b><font color="#000000">module</font></b>()
+<font color="#009900">InitialState</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()</tt></pre>
+</div></div>
+<p>Human readable list of routes to handlers.</p>
+<p>Cowboy uses this list to map hosts and paths, optionally augmented with constraints applied to the bindings, to handler modules.</p>
+<p>The syntax for routes is currently defined in the user guide.</p>
+<!-- @todo The syntax should probably be in this module,-->
+<!-- and the user guide show more practical examples.-->
<h3 id="_tokens">tokens()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">tokens</span></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>List of <code>host_info</code> and <code>path_info</code> tokens that were found
-using the <code>...</code> syntax.</p></div>
-</div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">tokens</font></b>() <font color="#990000">::</font> [<b><font color="#000080">binary</font></b>()]</tt></pre>
+</div></div>
+<p>List of <code>host_info</code> and <code>path_info</code> tokens that were found using the <code>...</code> syntax.</p>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="..">cowboy(7)</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>,
-<a href="../cowboy_req.path_info">cowboy_req:path_info(3)</a></p></div>
-</div>
-</div>
+<p><a href="..">cowboy(7)</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>, <a href="../cowboy_req.path_info">cowboy_req:path_info(3)</a></p>
+
diff --git a/docs/en/cowboy/2.4/manual/cowboy_static/index.html b/docs/en/cowboy/2.4/manual/cowboy_static/index.html
index d1bfd062..0bad63bb 100644
--- a/docs/en/cowboy/2.4/manual/cowboy_static/index.html
+++ b/docs/en/cowboy/2.4/manual/cowboy_static/index.html
@@ -62,175 +62,110 @@
<h1 class="lined-header"><span>cowboy_static(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_static - Static file handler</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_static - Static file handler</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The module <code>cowboy_static</code> implements file serving capabilities
-using the REST semantics provided by <code>cowboy_rest</code>.</p></div>
-<div class="paragraph"><p>The static file handler is a pre-written handler coming with
-Cowboy. To serve files, use it in your routes.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The module <code>cowboy_static</code> implements file serving capabilities using the REST semantics provided by <code>cowboy_rest</code>.</p>
+<p>The static file handler is a pre-written handler coming with Cowboy. To serve files, use it in your routes.</p>
<h2 id="_options">Options</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">opts</span></span>() <span style="color: #990000">::</span> {<span style="color: #FF6600">priv_file</span>, <span style="color: #009900">App</span>, <span style="color: #009900">Path</span>}
- | {<span style="color: #FF6600">priv_file</span>, <span style="color: #009900">App</span>, <span style="color: #009900">Path</span>, <span style="color: #009900">Extra</span>}
- | {<span style="color: #FF6600">file</span>, <span style="color: #009900">Path</span>}
- | {<span style="color: #FF6600">file</span>, <span style="color: #009900">Path</span>, <span style="color: #009900">Extra</span>}
- | {<span style="color: #FF6600">priv_dir</span>, <span style="color: #009900">App</span>, <span style="color: #009900">Path</span>}
- | {<span style="color: #FF6600">priv_dir</span>, <span style="color: #009900">App</span>, <span style="color: #009900">Path</span>, <span style="color: #009900">Extra</span>}
- | {<span style="color: #FF6600">dir</span>, <span style="color: #009900">Path</span>}
- | {<span style="color: #FF6600">dir</span>, <span style="color: #009900">Path</span>, <span style="color: #009900">Extra</span>}
-
-<span style="color: #009900">App</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">atom</span></span>()
-<span style="color: #009900">Path</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>() | <span style="font-weight: bold"><span style="color: #000000">string</span></span>()
-<span style="color: #009900">Extra</span> <span style="color: #990000">::</span> [<span style="color: #009900">Etag</span> | <span style="color: #009900">Mimetypes</span>]
-
-<span style="color: #009900">Etag</span> <span style="color: #990000">::</span> {<span style="color: #FF6600">etag</span>, <span style="font-weight: bold"><span style="color: #000000">module</span></span>(), <span style="font-weight: bold"><span style="color: #000080">function</span></span>()}
- | {<span style="color: #FF6600">etag</span>, <span style="color: #000080">false</span>}
-
-<span style="color: #009900">Mimetypes</span> <span style="color: #990000">::</span> {<span style="color: #FF6600">mimetypes</span>, <span style="font-weight: bold"><span style="color: #000000">module</span></span>(), <span style="font-weight: bold"><span style="color: #000080">function</span></span>()}
- | {<span style="color: #FF6600">mimetypes</span>, <span style="font-weight: bold"><span style="color: #000080">binary</span></span>() | <span style="color: #009900">ParsedMime</span>}
-
-<span style="color: #009900">ParsedMime</span> <span style="color: #990000">::</span> {<span style="color: #009900">Type</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="color: #009900">SubType</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="color: #009900">Params</span>}
-<span style="color: #009900">Params</span> <span style="color: #990000">::</span> [{<span style="color: #009900">Key</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="color: #009900">Value</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>Static handler configuration.</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-priv_file
-</dt>
-<dd>
-<p>
-Send a file.
-</p>
-<div class="paragraph"><p>The path is relative to the given application&#8217;s private
-directory.</p></div>
+<pre><tt><b><font color="#000000">opts</font></b>() <font color="#990000">::</font> {<font color="#FF6600">priv_file</font>, <font color="#009900">App</font>, <font color="#009900">Path</font>}
+ | {<font color="#FF6600">priv_file</font>, <font color="#009900">App</font>, <font color="#009900">Path</font>, <font color="#009900">Extra</font>}
+ | {<font color="#FF6600">file</font>, <font color="#009900">Path</font>}
+ | {<font color="#FF6600">file</font>, <font color="#009900">Path</font>, <font color="#009900">Extra</font>}
+ | {<font color="#FF6600">priv_dir</font>, <font color="#009900">App</font>, <font color="#009900">Path</font>}
+ | {<font color="#FF6600">priv_dir</font>, <font color="#009900">App</font>, <font color="#009900">Path</font>, <font color="#009900">Extra</font>}
+ | {<font color="#FF6600">dir</font>, <font color="#009900">Path</font>}
+ | {<font color="#FF6600">dir</font>, <font color="#009900">Path</font>, <font color="#009900">Extra</font>}
+
+<font color="#009900">App</font> <font color="#990000">::</font> <b><font color="#000080">atom</font></b>()
+<font color="#009900">Path</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>() | <b><font color="#000000">string</font></b>()
+<font color="#009900">Extra</font> <font color="#990000">::</font> [<font color="#009900">Etag</font> | <font color="#009900">Mimetypes</font>]
+
+<font color="#009900">Etag</font> <font color="#990000">::</font> {<font color="#FF6600">etag</font>, <b><font color="#000000">module</font></b>(), <b><font color="#000080">function</font></b>()}
+ | {<font color="#FF6600">etag</font>, <font color="#000080">false</font>}
+
+<font color="#009900">Mimetypes</font> <font color="#990000">::</font> {<font color="#FF6600">mimetypes</font>, <b><font color="#000000">module</font></b>(), <b><font color="#000080">function</font></b>()}
+ | {<font color="#FF6600">mimetypes</font>, <b><font color="#000080">binary</font></b>() | <font color="#009900">ParsedMime</font>}
+
+<font color="#009900">ParsedMime</font> <font color="#990000">::</font> {<font color="#009900">Type</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">SubType</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">Params</font>}
+<font color="#009900">Params</font> <font color="#990000">::</font> [{<font color="#009900">Key</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()}]</tt></pre>
+</div></div>
+<p>Static handler configuration.</p>
+<dl><dt>priv_file</dt>
+<dd><p>Send a file.</p>
+<p>The path is relative to the given application&apos;s private directory.</p>
</dd>
-<dt class="hdlist1">
-file
-</dt>
-<dd>
-<p>
-Send a file.
-</p>
-<div class="paragraph"><p>The path is either absolute or relative to the Erlang node&#8217;s
-current directory.</p></div>
+<dt>file</dt>
+<dd><p>Send a file.</p>
+<p>The path is either absolute or relative to the Erlang node&apos;s current directory.</p>
</dd>
-<dt class="hdlist1">
-priv_dir
-</dt>
-<dd>
-<p>
-Recursively serve files from a directory.
-</p>
-<div class="paragraph"><p>The path is relative to the given application&#8217;s private
-directory.</p></div>
+<dt>priv_dir</dt>
+<dd><p>Recursively serve files from a directory.</p>
+<p>The path is relative to the given application&apos;s private directory.</p>
</dd>
-<dt class="hdlist1">
-dir
-</dt>
-<dd>
-<p>
-Recursively serve files from a directory.
-</p>
-<div class="paragraph"><p>The path is either absolute or relative to the Erlang node&#8217;s
-current directory.</p></div>
+<dt>dir</dt>
+<dd><p>Recursively serve files from a directory.</p>
+<p>The path is either absolute or relative to the Erlang node&apos;s current directory.</p>
</dd>
-</dl></div>
-<div class="paragraph"><p>The extra options allow you to define how the etag should be
-calculated and how the MIME type of files should be detected.</p></div>
-<div class="paragraph"><p>By default the static handler will generate an etag based
-on the size and modification time of the file. You may disable
-the etag entirely with <code>{etag, false}</code> or provide a module
-and function that will be called when needed:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+</dl>
+<p>The extra options allow you to define how the etag should be calculated and how the MIME type of files should be detected.</p>
+<p>By default the static handler will generate an etag based on the size and modification time of the file. You may disable the etag entirely with <code>{etag, false}</code> or provide a module and function that will be called when needed:</p>
+<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">generate_etag</span></span>(<span style="color: #009900">Path</span>, <span style="color: #009900">Size</span>, <span style="color: #009900">Mtime</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #FF6600">strong</span> | <span style="color: #FF6600">weak</span>, <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()}
-
-<span style="color: #009900">Path</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()
-<span style="color: #009900">Size</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>()
-<span style="color: #009900">Mtime</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">file:date_time</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>By default the static handler will detect Web-related MIME types
-by looking at the file extension. You can provide a specific
-MIME type that will always be used, or a module and function that
-will be called when needed:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">generate_etag</font></b>(<font color="#009900">Path</font>, <font color="#009900">Size</font>, <font color="#009900">Mtime</font>) <font color="#990000">-&gt;</font> {<font color="#FF6600">strong</font> | <font color="#FF6600">weak</font>, <b><font color="#000080">binary</font></b>()}
+
+<font color="#009900">Path</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()
+<font color="#009900">Size</font> <font color="#990000">::</font> <b><font color="#000000">non_neg_integer</font></b>()
+<font color="#009900">Mtime</font> <font color="#990000">::</font> <b><font color="#000000">file:date_time</font></b>()</tt></pre>
+</div></div>
+<p>By default the static handler will detect Web-related MIME types by looking at the file extension. You can provide a specific MIME type that will always be used, or a module and function that will be called when needed:</p>
+<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">detect_mimetype</span></span>(<span style="color: #009900">Path</span>) <span style="color: #990000">-&gt;</span> <span style="color: #009900">ParsedMime</span>
-
-<span style="color: #009900">Path</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()
-<span style="color: #009900">ParsedMime</span> <span style="color: #990000">::</span> {<span style="color: #009900">Type</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="color: #009900">SubType</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="color: #009900">Params</span>}
-<span style="color: #009900">Params</span> <span style="color: #990000">::</span> [{<span style="color: #009900">Key</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="color: #009900">Value</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>Cowboy comes with two such functions; the default function
-<code>cow_mimetypes:web/1</code>, and a second function generated from
-the Apache <em>mime.types</em> file, <code>cow_mimetypes:all/1</code>.</p></div>
-<div class="paragraph"><p>The MIME type function should return
-<code>{&lt;&lt;"application"&gt;&gt;, &lt;&lt;"octet-stream"&gt;&gt;, []}</code>
-when it fails to detect a file&#8217;s MIME type.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">detect_mimetype</font></b>(<font color="#009900">Path</font>) <font color="#990000">-&gt;</font> <font color="#009900">ParsedMime</font>
+
+<font color="#009900">Path</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()
+<font color="#009900">ParsedMime</font> <font color="#990000">::</font> {<font color="#009900">Type</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">SubType</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">Params</font>}
+<font color="#009900">Params</font> <font color="#990000">::</font> [{<font color="#009900">Key</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>(), <font color="#009900">Value</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()}]</tt></pre>
+</div></div>
+<!-- @todo Case sensitivity of parsed mime content?-->
+<p>Cowboy comes with two such functions; the default function <code>cow_mimetypes:web/1</code>, and a second function generated from the Apache <em>mime.types</em> file, <code>cow_mimetypes:all/1</code>.</p>
+<p>The MIME type function should return <code>{&lt;&lt;&quot;application&quot;&gt;&gt;, &lt;&lt;&quot;octet-stream&quot;&gt;&gt;, []}</code> when it fails to detect a file&apos;s MIME type.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>1.0</strong>: Handler introduced.
-</p>
+<ul><li><strong>1.0</strong>: Handler introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Custom etag function</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Custom etag function</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">generate_etag</span></span>(<span style="color: #009900">Path</span>, <span style="color: #009900">Size</span>, <span style="color: #009900">Mtime</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">strong</span>, <span style="font-weight: bold"><span style="color: #000000">integer_to_binary</span></span>(
- <span style="font-weight: bold"><span style="color: #000000">erlang:phash2</span></span>({<span style="color: #009900">Path</span>, <span style="color: #009900">Size</span>, <span style="color: #009900">Mtime</span>}, <span style="color: #993399">16#ffffffff</span>))}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Custom MIME type function</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">generate_etag</font></b>(<font color="#009900">Path</font>, <font color="#009900">Size</font>, <font color="#009900">Mtime</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">strong</font>, <b><font color="#000000">integer_to_binary</font></b>(
+ <b><font color="#000000">erlang:phash2</font></b>({<font color="#009900">Path</font>, <font color="#009900">Size</font>, <font color="#009900">Mtime</font>}, <font color="#993399">16#ffffffff</font>))}<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Custom MIME type function</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">always_octet_stream</span></span>(<span style="color: #009900">_Path</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">filename:extension</span></span>(<span style="color: #009900">Path</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">".erl"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">-&gt;</span> {<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"plain"</span><span style="color: #990000">&gt;&gt;</span>, []};
- <span style="color: #990000">_</span> <span style="color: #990000">-&gt;</span> {<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"application"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"octet-stream"</span><span style="color: #990000">&gt;&gt;</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">
+<pre><tt><b><font color="#000000">always_octet_stream</font></b>(<font color="#009900">_Path</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">case</font></b> <b><font color="#000000">filename:extension</font></b>(<font color="#009900">Path</font>) <b><font color="#0000FF">of</font></b>
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">".erl"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">-&gt;</font> {<font color="#990000">&lt;&lt;</font><font color="#FF0000">"text"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"plain"</font><font color="#990000">&gt;&gt;</font>, []};
+ <font color="#990000">_</font> <font color="#990000">-&gt;</font> {<font color="#990000">&lt;&lt;</font><font color="#FF0000">"application"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"octet-stream"</font><font color="#990000">&gt;&gt;</font>, []}
+ <b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="..">cowboy(7)</a>,
-<a href="../cowboy_router">cowboy_router(3)</a></p></div>
-</div>
-</div>
+<p><a href="..">cowboy(7)</a>, <a href="../cowboy_router">cowboy_router(3)</a></p>
+
diff --git a/docs/en/cowboy/2.4/manual/cowboy_stream/index.html b/docs/en/cowboy/2.4/manual/cowboy_stream/index.html
index bd9ef67b..b3ff1222 100644
--- a/docs/en/cowboy/2.4/manual/cowboy_stream/index.html
+++ b/docs/en/cowboy/2.4/manual/cowboy_stream/index.html
@@ -62,452 +62,306 @@
<h1 class="lined-header"><span>cowboy_stream(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_handler - Stream handlers</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_handler - Stream handlers</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The module <code>cowboy_stream</code> defines a callback interface
-and a protocol for handling HTTP streams.</p></div>
-<div class="paragraph"><p>An HTTP request and its associated response is called
-a stream. A connection may have many streams. In HTTP/1.1
-they are executed sequentially, while in HTTP/2 they are
-executed concurrently.</p></div>
-<div class="paragraph"><p>Cowboy calls the stream handler for nearly all events
-related to a stream. Exceptions vary depending on the
-protocol.</p></div>
-<div class="paragraph"><p>Extra care must be taken when implementing stream handlers
-to ensure compatibility. While some modification of the
-events and commands is allowed, it is generally not a good
-idea to completely omit them.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The module <code>cowboy_stream</code> defines a callback interface and a protocol for handling HTTP streams.</p>
+<p>An HTTP request and its associated response is called a stream. A connection may have many streams. In HTTP/1.1 they are executed sequentially, while in HTTP/2 they are executed concurrently.</p>
+<p>Cowboy calls the stream handler for nearly all events related to a stream. Exceptions vary depending on the protocol.</p>
+<p>Extra care must be taken when implementing stream handlers to ensure compatibility. While some modification of the events and commands is allowed, it is generally not a good idea to completely omit them.</p>
<h2 id="_callbacks">Callbacks</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Stream handlers must implement the following interface:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Stream handlers must implement the following interface:</p>
+<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">init</span></span>(<span style="color: #009900">StreamID</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">Opts</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Commands</span>, <span style="color: #009900">State</span>}
-<span style="font-weight: bold"><span style="color: #000000">data</span></span>(<span style="color: #009900">StreamID</span>, <span style="color: #009900">IsFin</span>, <span style="color: #009900">Data</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Commands</span>, <span style="color: #009900">State</span>}
-<span style="font-weight: bold"><span style="color: #000000">info</span></span>(<span style="color: #009900">StreamID</span>, <span style="color: #009900">Info</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #009900">Commands</span>, <span style="color: #009900">State</span>}
-<span style="font-weight: bold"><span style="color: #000000">terminate</span></span>(<span style="color: #009900">StreamID</span>, <span style="color: #009900">Reason</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()
-<span style="font-weight: bold"><span style="color: #000000">early_error</span></span>(<span style="color: #009900">StreamID</span>, <span style="color: #009900">Reason</span>, <span style="color: #009900">PartialReq</span>, <span style="color: #009900">Resp</span>, <span style="color: #009900">Opts</span>) <span style="color: #990000">-&gt;</span> <span style="color: #009900">Resp</span>
-
-<span style="color: #009900">StreamID</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_stream:streamid</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">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:opts</span></span>()
-<span style="color: #009900">Commands</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_stream:commands</span></span>()
-<span style="color: #009900">State</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()
-<span style="color: #009900">IsFin</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_stream:fin</span></span>()
-<span style="color: #009900">Data</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()
-<span style="color: #009900">Info</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()
-<span style="color: #009900">Reason</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_stream:reason</span></span>()
-<span style="color: #009900">PartialReq</span> <span style="color: #990000">-</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:req</span></span>(), <span style="color: #FF6600">except</span> <span style="color: #FF6600">all</span> <span style="color: #FF6600">fields</span> <span style="color: #FF6600">are</span> <span style="color: #FF6600">optional</span>
-<span style="color: #009900">Resp</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_stream:resp_command</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>HTTP/1.1 will initialize a stream only when the request-line
-and all headers have been received. When errors occur before
-that point Cowboy will call the callback <code>early_error/5</code>
-with a partial request, the error reason and the response
-Cowboy intends to send. All other events go throuh the
-stream handler using the normal callbacks.</p></div>
-<div class="paragraph"><p>HTTP/2 will initialize the stream when the <code>HEADERS</code> block has
-been fully received and decoded. Any protocol error occuring
-before that will not result in a response being sent and
-will therefore not go through the stream handler. In addition
-Cowboy may terminate streams without sending an HTTP response
-back.</p></div>
-<div class="paragraph"><p>The stream is initialized by calling <code>init/3</code>. All streams
-that are initialized will eventually be terminated by calling
-<code>terminate/3</code>.</p></div>
-<div class="paragraph"><p>When Cowboy receives data for the stream it will call <code>data/4</code>.
-The data given is the request body after any transfer decoding
-has been applied.</p></div>
-<div class="paragraph"><p>When Cowboy receives a message addressed to a stream, or when
-Cowboy needs to inform the stream handler that an internal
-event has occurred, it will call <code>info/3</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">StreamID</font>, <font color="#009900">Req</font>, <font color="#009900">Opts</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Commands</font>, <font color="#009900">State</font>}
+<b><font color="#000000">data</font></b>(<font color="#009900">StreamID</font>, <font color="#009900">IsFin</font>, <font color="#009900">Data</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Commands</font>, <font color="#009900">State</font>}
+<b><font color="#000000">info</font></b>(<font color="#009900">StreamID</font>, <font color="#009900">Info</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> {<font color="#009900">Commands</font>, <font color="#009900">State</font>}
+<b><font color="#000000">terminate</font></b>(<font color="#009900">StreamID</font>, <font color="#009900">Reason</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> <b><font color="#000000">any</font></b>()
+<b><font color="#000000">early_error</font></b>(<font color="#009900">StreamID</font>, <font color="#009900">Reason</font>, <font color="#009900">PartialReq</font>, <font color="#009900">Resp</font>, <font color="#009900">Opts</font>) <font color="#990000">-&gt;</font> <font color="#009900">Resp</font>
+
+<font color="#009900">StreamID</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_stream:streamid</font></b>()
+<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()
+<font color="#009900">Opts</font> <font color="#990000">::</font> <b><font color="#000000">cowboy:opts</font></b>()
+<font color="#009900">Commands</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_stream:commands</font></b>()
+<font color="#009900">State</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()
+<font color="#009900">IsFin</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_stream:fin</font></b>()
+<font color="#009900">Data</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()
+<font color="#009900">Info</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()
+<font color="#009900">Reason</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_stream:reason</font></b>()
+<font color="#009900">PartialReq</font> <font color="#990000">-</font> <b><font color="#000000">cowboy_req:req</font></b>(), <font color="#FF6600">except</font> <font color="#FF6600">all</font> <font color="#FF6600">fields</font> <font color="#FF6600">are</font> <font color="#FF6600">optional</font>
+<font color="#009900">Resp</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_stream:resp_command</font></b>()</tt></pre>
+</div></div>
+<p>HTTP/1.1 will initialize a stream only when the request-line and all headers have been received. When errors occur before that point Cowboy will call the callback <code>early_error/5</code> with a partial request, the error reason and the response Cowboy intends to send. All other events go throuh the stream handler using the normal callbacks.</p>
+<p>HTTP/2 will initialize the stream when the <code>HEADERS</code> block has been fully received and decoded. Any protocol error occuring before that will not result in a response being sent and will therefore not go through the stream handler. In addition Cowboy may terminate streams without sending an HTTP response back.</p>
+<p>The stream is initialized by calling <code>init/3</code>. All streams that are initialized will eventually be terminated by calling <code>terminate/3</code>.</p>
+<p>When Cowboy receives data for the stream it will call <code>data/4</code>. The data given is the request body after any transfer decoding has been applied.</p>
+<p>When Cowboy receives a message addressed to a stream, or when Cowboy needs to inform the stream handler that an internal event has occurred, it will call <code>info/3</code>.</p>
<h2 id="commands">Commands</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Stream handlers can return a list of commands to be executed
-from the <code>init/3</code>, <code>data/4</code> and <code>info/3</code> callbacks. In addition,
-the <code>early_error/5</code> callback must return a response command.</p></div>
-<div class="paragraph"><p>The following commands are defined:</p></div>
-<div class="sect2">
+<p>Stream handlers can return a list of commands to be executed from the <code>init/3</code>, <code>data/4</code> and <code>info/3</code> callbacks. In addition, the <code>early_error/5</code> callback must return a response command.</p>
+<!-- @todo We need a &apos;log&apos; command that would call error_logger.-->
+<!-- It&apos;s better than doing in the handlers directly because-->
+<!-- then we can have other stream handlers manipulate those logs.-->
+<!-- @todo We need a command to send a message so that other-->
+<!-- stream handlers can manipulate these messages if necessary.-->
+<p>The following commands are defined:</p>
<h3 id="inform_command">inform</h3>
-<div class="paragraph"><p>Send an informational response to the client.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Send an informational response to the client.</p>
+<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">inform</span>, <span style="font-weight: bold"><span style="color: #000000">cowboy:http_status</span></span>(), <span style="font-weight: bold"><span style="color: #000000">cowboy:http_headers</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>Any number of informational responses may be sent,
-but only until the final response is sent.</p></div>
-</div>
-<div class="sect2">
+<pre><tt>{<font color="#FF6600">inform</font>, <b><font color="#000000">cowboy:http_status</font></b>(), <b><font color="#000000">cowboy:http_headers</font></b>()}</tt></pre>
+</div></div>
+<p>Any number of informational responses may be sent, but only until the final response is sent.</p>
<h3 id="response_command">response</h3>
-<div class="paragraph"><p>Send a response to the client.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Send a response to the client.</p>
+<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">response</span>, <span style="font-weight: bold"><span style="color: #000000">cowboy:http_status</span></span>(), <span style="font-weight: bold"><span style="color: #000000">cowboy:http_headers</span></span>(),
- <span style="font-weight: bold"><span style="color: #000000">cowboy_req:resp_body</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>No more data can be sent after this command.</p></div>
-</div>
-<div class="sect2">
+<pre><tt>{<font color="#FF6600">response</font>, <b><font color="#000000">cowboy:http_status</font></b>(), <b><font color="#000000">cowboy:http_headers</font></b>(),
+ <b><font color="#000000">cowboy_req:resp_body</font></b>()}</tt></pre>
+</div></div>
+<p>No more data can be sent after this command.</p>
<h3 id="headers_command">headers</h3>
-<div class="paragraph"><p>Initiate a response to the client.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Initiate a response to the client.</p>
+<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="font-weight: bold"><span style="color: #000000">cowboy:http_status</span></span>(), <span style="font-weight: bold"><span style="color: #000000">cowboy:http_headers</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>This initiates a response to the client. The stream
-will end when a data command with the <code>fin</code> flag or
-a trailer command is returned.</p></div>
-</div>
-<div class="sect2">
+<pre><tt>{<font color="#FF6600">headers</font>, <b><font color="#000000">cowboy:http_status</font></b>(), <b><font color="#000000">cowboy:http_headers</font></b>()}</tt></pre>
+</div></div>
+<p>This initiates a response to the client. The stream will end when a data command with the <code>fin</code> flag or a trailer command is returned.</p>
<h3 id="data_command">data</h3>
-<div class="paragraph"><p>Send data to the client.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Send data to the client.</p>
+<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">data</span>, <span style="font-weight: bold"><span style="color: #000000">fin</span></span>(), <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>()}</tt></pre></div></div>
-</div>
-<div class="sect2">
+<pre><tt>{<font color="#FF6600">data</font>, <b><font color="#000000">fin</font></b>(), <b><font color="#000000">iodata</font></b>()}</tt></pre>
+</div></div>
<h3 id="trailers_command">trailers</h3>
-<div class="paragraph"><p>Send response trailers to the client.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Send response trailers to the client.</p>
+<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">trailers</span>, <span style="font-weight: bold"><span style="color: #000000">cowboy:http_headers</span></span>()}</tt></pre></div></div>
-</div>
-<div class="sect2">
+<pre><tt>{<font color="#FF6600">trailers</font>, <b><font color="#000000">cowboy:http_headers</font></b>()}</tt></pre>
+</div></div>
<h3 id="push_command">push</h3>
-<div class="paragraph"><p>Push a resource to the client.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Push a resource to the client.</p>
+<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">push</span>, <span style="color: #009900">Method</span>, <span style="color: #009900">Scheme</span>, <span style="color: #009900">Host</span>, <span style="font-weight: bold"><span style="color: #000000">inet:port_number</span></span>(),
- <span style="color: #009900">Path</span>, <span style="color: #009900">Qs</span>, <span style="font-weight: bold"><span style="color: #000000">cowboy:http_headers</span></span>()}
+<pre><tt>{<font color="#FF6600">push</font>, <font color="#009900">Method</font>, <font color="#009900">Scheme</font>, <font color="#009900">Host</font>, <b><font color="#000000">inet:port_number</font></b>(),
+ <font color="#009900">Path</font>, <font color="#009900">Qs</font>, <b><font color="#000000">cowboy:http_headers</font></b>()}
-<span style="color: #009900">Method</span> <span style="color: #990000">=</span> <span style="color: #009900">Scheme</span> <span style="color: #990000">=</span> <span style="color: #009900">Host</span> <span style="color: #990000">=</span> <span style="color: #009900">Path</span> <span style="color: #990000">=</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>The command will be ignored if the protocol does not provide
-any server push mechanism.</p></div>
-</div>
-<div class="sect2">
+<font color="#009900">Method</font> <font color="#990000">=</font> <font color="#009900">Scheme</font> <font color="#990000">=</font> <font color="#009900">Host</font> <font color="#990000">=</font> <font color="#009900">Path</font> <font color="#990000">=</font> <font color="#009900">Qs</font> <font color="#990000">=</font> <b><font color="#000080">binary</font></b>()</tt></pre>
+</div></div>
+<p>The command will be ignored if the protocol does not provide any server push mechanism.</p>
<h3 id="_flow">flow</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">flow</span>, <span style="font-weight: bold"><span style="color: #000000">pos_integer</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>Request more data to be read from the request body. The
-exact behavior depends on the protocol.</p></div>
-</div>
-<div class="sect2">
+<pre><tt>{<font color="#FF6600">flow</font>, <b><font color="#000000">pos_integer</font></b>()}</tt></pre>
+</div></div>
+<p>Request more data to be read from the request body. The exact behavior depends on the protocol.</p>
<h3 id="_spawn">spawn</h3>
-<div class="paragraph"><p>Inform Cowboy that a process was spawned and should be
-supervised.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Inform Cowboy that a process was spawned and should be supervised.</p>
+<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: #000080">spawn</span></span>, <span style="font-weight: bold"><span style="color: #000080">pid</span></span>(), <span style="font-weight: bold"><span style="color: #000000">timeout</span></span>()}</tt></pre></div></div>
-</div>
-<div class="sect2">
+<pre><tt>{<b><font color="#000080">spawn</font></b>, <b><font color="#000080">pid</font></b>(), <b><font color="#000000">timeout</font></b>()}</tt></pre>
+</div></div>
<h3 id="_error_response">error_response</h3>
-<div class="paragraph"><p>Send an error response if no response was sent previously.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Send an error response if no response was sent previously.</p>
+<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">error_response</span>, <span style="font-weight: bold"><span style="color: #000000">cowboy:http_status</span></span>(), <span style="font-weight: bold"><span style="color: #000000">cowboy:http_headers</span></span>(), <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>()}</tt></pre></div></div>
-</div>
-<div class="sect2">
+<pre><tt>{<font color="#FF6600">error_response</font>, <b><font color="#000000">cowboy:http_status</font></b>(), <b><font color="#000000">cowboy:http_headers</font></b>(), <b><font color="#000000">iodata</font></b>()}</tt></pre>
+</div></div>
<h3 id="switch_protocol_command">switch_protocol</h3>
-<div class="paragraph"><p>Switch to a different protocol.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Switch to a different protocol.</p>
+<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">switch_protocol</span>, <span style="font-weight: bold"><span style="color: #000000">cowboy:http_headers</span></span>(), <span style="font-weight: bold"><span style="color: #000000">module</span></span>(), <span style="font-weight: bold"><span style="color: #000000">state</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>Contains the headers that will be sent in the 101 response,
-along with the module implementing the protocol we are
-switching to and its initial state.</p></div>
-</div>
-<div class="sect2">
+<pre><tt>{<font color="#FF6600">switch_protocol</font>, <b><font color="#000000">cowboy:http_headers</font></b>(), <b><font color="#000000">module</font></b>(), <b><font color="#000000">state</font></b>()}</tt></pre>
+</div></div>
+<p>Contains the headers that will be sent in the 101 response, along with the module implementing the protocol we are switching to and its initial state.</p>
<h3 id="_stop">stop</h3>
-<div class="paragraph"><p>Stop the stream.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Stop the stream.</p>
+<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">stop</span></tt></pre></div></div>
-<div class="paragraph"><p>While no more data can be sent after the <code>fin</code> flag was set,
-the stream is still tracked by Cowboy until it is stopped by
-the handler.</p></div>
-<div class="paragraph"><p>The behavior when stopping a stream for which no response
-has been sent will vary depending on the protocol. The stream
-will end successfully as far as the client is concerned.</p></div>
-<div class="paragraph"><p>To indicate that an error occurred, either use <code>error_response</code>
-before stopping, or use <code>internal_error</code>.</p></div>
-</div>
-<div class="sect2">
+<pre><tt><font color="#FF6600">stop</font></tt></pre>
+</div></div>
+<p>While no more data can be sent after the <code>fin</code> flag was set, the stream is still tracked by Cowboy until it is stopped by the handler.</p>
+<p>The behavior when stopping a stream for which no response has been sent will vary depending on the protocol. The stream will end successfully as far as the client is concerned.</p>
+<p>To indicate that an error occurred, either use <code>error_response</code> before stopping, or use <code>internal_error</code>.</p>
<h3 id="_internal_error">internal_error</h3>
-<div class="paragraph"><p>Stop the stream with an error.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Stop the stream with an error.</p>
+<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">internal_error</span>, <span style="color: #009900">Reason</span>, <span style="color: #009900">HumanReadable</span>}
-
-<span style="color: #009900">Reason</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()
-<span style="color: #009900">HumanReadable</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000080">atom</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>This command should be used when the stream cannot continue
-because of an internal error. An <code>error_response</code> command
-may be sent before that to advertise to the client why the
-stream is dropped.</p></div>
-</div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#FF6600">internal_error</font>, <font color="#009900">Reason</font>, <font color="#009900">HumanReadable</font>}
+
+<font color="#009900">Reason</font> <font color="#990000">=</font> <b><font color="#000000">any</font></b>()
+<font color="#009900">HumanReadable</font> <font color="#990000">=</font> <b><font color="#000080">atom</font></b>()</tt></pre>
+</div></div>
+<p>This command should be used when the stream cannot continue because of an internal error. An <code>error_response</code> command may be sent before that to advertise to the client why the stream is dropped.</p>
<h2 id="_predefined_events">Predefined events</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy will forward all messages sent to the stream to
-the <code>info/3</code> callback. To send a message to a stream,
-send a message to the connection process with the form
-<code>{{Pid, StreamID}, Msg}</code>. The connection process will
-then forward <code>Msg</code> to the stream handlers.</p></div>
-<div class="paragraph"><p>Cowboy will also forward the exit signals for the
-processes that the stream spawned.</p></div>
-<div class="sect2">
+<p>Cowboy will forward all messages sent to the stream to the <code>info/3</code> callback. To send a message to a stream, send a message to the connection process with the form <code>{{Pid, StreamID}, Msg}</code>. The connection process will then forward <code>Msg</code> to the stream handlers.</p>
+<p>Cowboy will also forward the exit signals for the processes that the stream spawned.</p>
<h3 id="_exit">EXIT</h3>
-<div class="paragraph"><p>A process spawned by this stream has exited.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<!-- info(_StreamID, {&apos;EXIT&apos;, Pid, normal}, State=#state{pid=Pid}) -&gt;-->
+<!-- info(_StreamID, {&apos;EXIT&apos;, Pid, {_Reason, [_, {cow_http_hd, _, _, _}|_]}}, State=#state{pid=Pid}) -&gt;-->
+<!-- info(StreamID, Exit = {&apos;EXIT&apos;, Pid, {Reason, Stacktrace}}, State=#state{ref=Ref, pid=Pid}) -&gt;-->
+<p>A process spawned by this stream has exited.</p>
+<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: #000080">'EXIT'</span>, <span style="font-weight: bold"><span style="color: #000080">pid</span></span>(), <span style="font-weight: bold"><span style="color: #000000">any</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>This is the raw exit message without any modification.</p></div>
-</div>
-<div class="sect2">
+<pre><tt>{<font color="#000080">'EXIT'</font>, <b><font color="#000080">pid</font></b>(), <b><font color="#000000">any</font></b>()}</tt></pre>
+</div></div>
+<p>This is the raw exit message without any modification.</p>
+<!-- === read_body-->
+<!-- -->
+<!-- //info(_StreamID, {read_body, Ref, Length, _},-->
+<!-- //info(StreamID, {read_body, Ref, Length, Period}, State) -&gt;-->
+<!-- -->
+<!-- TODO yeah I am not actually sure this one should be public just yet-->
+<!-- TODO if it is, then we probably shouldn&apos;t send a message directly,-->
+<!-- TODO but rather return a command that will end up sending the message-->
+<!-- -->
+<!-- TODO The problem being that no stream handler has access to that-->
+<!-- TODO message if we send it directly. So we should have a command-->
+<!-- TODO send_message or something that can be seen from all handlers.-->
+<!-- -->
+<!-- TODO The thing is that stream handlers can have 0 to N processes-->
+<!-- TODO so we have to make it easy to say which process should-->
+<!-- TODO receive the message, and perhaps *identify* which process-->
+<!-- TODO gets it?-->
<h3 id="_inform">inform</h3>
-<div class="paragraph"><p>Same as the <a href="../inform_command">inform command</a>.</p></div>
-<div class="paragraph"><p>Sent when the request process reads the body and an
-expect: 100-continue header was present in the request,
-or when the request process sends an informational
-response on its own.</p></div>
-</div>
-<div class="sect2">
+<p>Same as the <a href="../inform_command">inform command</a>.</p>
+<p>Sent when the request process reads the body and an expect: 100-continue header was present in the request, or when the request process sends an informational response on its own.</p>
<h3 id="_response">response</h3>
-<div class="paragraph"><p>Same as the <a href="../response_command">response command</a>.</p></div>
-<div class="paragraph"><p>Usually sent when the request process replies to the client.
-May also be sent by Cowboy internally.</p></div>
-</div>
-<div class="sect2">
+<p>Same as the <a href="../response_command">response command</a>.</p>
+<p>Usually sent when the request process replies to the client. May also be sent by Cowboy internally.</p>
<h3 id="_headers">headers</h3>
-<div class="paragraph"><p>Same as the <a href="../headers_command">headers command</a>.</p></div>
-<div class="paragraph"><p>Sent when the request process starts replying to the client.</p></div>
-</div>
-<div class="sect2">
+<p>Same as the <a href="../headers_command">headers command</a>.</p>
+<p>Sent when the request process starts replying to the client.</p>
<h3 id="_data">data</h3>
-<div class="paragraph"><p>Same as the <a href="../data_command">data command</a>.</p></div>
-<div class="paragraph"><p>Sent when the request process streams data to the client.</p></div>
-</div>
-<div class="sect2">
+<p>Same as the <a href="../data_command">data command</a>.</p>
+<p>Sent when the request process streams data to the client.</p>
<h3 id="_trailers">trailers</h3>
-<div class="paragraph"><p>Same as the <a href="../trailers_command">trailers command</a>.</p></div>
-<div class="paragraph"><p>Sent when the request process sends the trailer field values
-to the client.</p></div>
-</div>
-<div class="sect2">
+<p>Same as the <a href="../trailers_command">trailers command</a>.</p>
+<p>Sent when the request process sends the trailer field values to the client.</p>
<h3 id="_push">push</h3>
-<div class="paragraph"><p>Same as the <a href="../push_command">push command</a>.</p></div>
-<div class="paragraph"><p>Sent when the request process pushes a resource to the client.</p></div>
-</div>
-<div class="sect2">
+<p>Same as the <a href="../push_command">push command</a>.</p>
+<p>Sent when the request process pushes a resource to the client.</p>
<h3 id="_switch_protocol">switch_protocol</h3>
-<div class="paragraph"><p>Same as the <a href="../switch_protocol_command">switch_protocol command</a>.</p></div>
-<div class="paragraph"><p>Sent when switching to the HTTP/2 or Websocket protocol.</p></div>
-</div>
-</div>
-</div>
-<div class="sect1">
+<p>Same as the <a href="../switch_protocol_command">switch_protocol command</a>.</p>
+<p>Sent when switching to the HTTP/2 or Websocket protocol.</p>
<h2 id="_exports">Exports</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The following function should be called by modules implementing
-stream handlers to execute the next stream handler in the list:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../cowboy_stream.init">cowboy_stream:init(3)</a> - Initialize a stream
-</p>
+<p>The following function should be called by modules implementing stream handlers to execute the next stream handler in the list:</p>
+<ul><li><a href="../cowboy_stream.init">cowboy_stream:init(3)</a> - Initialize a stream
</li>
-<li>
-<p>
-<a href="../cowboy_stream.data">cowboy_stream:data(3)</a> - Handle data for a stream
-</p>
+<li><a href="../cowboy_stream.data">cowboy_stream:data(3)</a> - Handle data for a stream
</li>
-<li>
-<p>
-<a href="../cowboy_stream.info">cowboy_stream:info(3)</a> - Handle a message for a stream
-</p>
+<li><a href="../cowboy_stream.info">cowboy_stream:info(3)</a> - Handle a message for a stream
</li>
-<li>
-<p>
-<a href="../cowboy_stream.terminate">cowboy_stream:terminate(3)</a> - Terminate a stream
-</p>
+<li><a href="../cowboy_stream.terminate">cowboy_stream:terminate(3)</a> - Terminate a stream
</li>
-<li>
-<p>
-<a href="../cowboy_stream.early_error">cowboy_stream:early_error(3)</a> - Handle an early error for a stream
-</p>
+<li><a href="../cowboy_stream.early_error">cowboy_stream:early_error(3)</a> - Handle an early error for a stream
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_types">Types</h2>
-<div class="sectionbody">
-<div class="sect2">
<h3 id="_commands">commands()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">commands</span></span>() <span style="color: #990000">::</span> [<span style="color: #009900">Command</span>]</tt></pre></div></div>
-<div class="paragraph"><p>See the <a href="../commands">list of commands</a> for details.</p></div>
-</div>
-<div class="sect2">
+<pre><tt><b><font color="#000000">commands</font></b>() <font color="#990000">::</font> [<font color="#009900">Command</font>]</tt></pre>
+</div></div>
+<p>See the <a href="../commands">list of commands</a> for details.</p>
<h3 id="_fin">fin()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">fin</span></span>() <span style="color: #990000">::</span> <span style="color: #FF6600">fin</span> | <span style="color: #FF6600">nofin</span></tt></pre></div></div>
-<div class="paragraph"><p>Used in commands and events to indicate that this is
-the end of the stream.</p></div>
-</div>
-<div class="sect2">
+<pre><tt><b><font color="#000000">fin</font></b>() <font color="#990000">::</font> <font color="#FF6600">fin</font> | <font color="#FF6600">nofin</font></tt></pre>
+</div></div>
+<p>Used in commands and events to indicate that this is the end of the stream.</p>
<h3 id="_partial_req">partial_req()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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: #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">version</span> <span style="color: #990000">=&gt;</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: #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">path</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">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>
- <span style="color: #0000FF">headers</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:http_headers</span></span>(),
- <span style="color: #0000FF">peer</span> <span style="color: #990000">=&gt;</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>Partial request information received when an early error is
-detected.</p></div>
-</div>
-<div class="sect2">
+<pre><tt><b><font color="#000000">req</font></b>() <font color="#990000">::</font> #{
+ <font color="#0000FF">method</font> <font color="#990000">=&gt;</font> <b><font color="#000080">binary</font></b>(), <i><font color="#9A1900">%% case sensitive</font></i>
+ <font color="#0000FF">version</font> <font color="#990000">=&gt;</font> <b><font color="#000000">cowboy:http_version</font></b>() | <b><font color="#000080">atom</font></b>(),
+ <font color="#0000FF">scheme</font> <font color="#990000">=&gt;</font> <b><font color="#000080">binary</font></b>(), <i><font color="#9A1900">%% lowercase; case insensitive</font></i>
+ <font color="#0000FF">host</font> <font color="#990000">=&gt;</font> <b><font color="#000080">binary</font></b>(), <i><font color="#9A1900">%% lowercase; case insensitive</font></i>
+ <font color="#0000FF">port</font> <font color="#990000">=&gt;</font> <b><font color="#000000">inet:port_number</font></b>(),
+ <font color="#0000FF">path</font> <font color="#990000">=&gt;</font> <b><font color="#000080">binary</font></b>(), <i><font color="#9A1900">%% case sensitive</font></i>
+ <font color="#0000FF">qs</font> <font color="#990000">=&gt;</font> <b><font color="#000080">binary</font></b>(), <i><font color="#9A1900">%% case sensitive</font></i>
+ <font color="#0000FF">headers</font> <font color="#990000">=&gt;</font> <b><font color="#000000">cowboy:http_headers</font></b>(),
+ <font color="#0000FF">peer</font> <font color="#990000">=&gt;</font> {<b><font color="#000000">inet:ip_address</font></b>(), <b><font color="#000000">inet:port_number</font></b>()}
+}</tt></pre>
+</div></div>
+<p>Partial request information received when an early error is detected.</p>
<h3 id="_reason">reason()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">reason</span></span>() <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">normal</span></span> | <span style="color: #FF6600">switch_protocol</span>
- | {<span style="color: #FF6600">internal_error</span>, <span style="color: #FF6600">timeout</span> | {<span style="color: #FF6600">error</span> | <span style="font-weight: bold"><span style="color: #000080">exit</span></span> | <span style="font-weight: bold"><span style="color: #000080">throw</span></span>, <span style="font-weight: bold"><span style="color: #000000">any</span></span>()}, <span style="color: #009900">HumanReadable</span>}
- | {<span style="color: #FF6600">socket_error</span>, <span style="color: #FF6600">closed</span> | <span style="font-weight: bold"><span style="color: #000080">atom</span></span>(), <span style="color: #009900">HumanReadable</span>}
- | {<span style="color: #FF6600">stream_error</span>, <span style="color: #009900">Error</span>, <span style="color: #009900">HumanReadable</span>}
- | {<span style="color: #FF6600">connection_error</span>, <span style="color: #009900">Error</span>, <span style="color: #009900">HumanReadable</span>}
- | {<span style="color: #FF6600">stop</span>, <span style="font-weight: bold"><span style="color: #000000">cow_http2:frame</span></span>(), <span style="color: #009900">HumanReadable</span>}
-
-<span style="color: #009900">Error</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000080">atom</span></span>()
-<span style="color: #009900">HumanReadable</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000080">atom</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Reason for the stream termination.</p></div>
-</div>
-<div class="sect2">
+<pre><tt><b><font color="#000000">reason</font></b>() <font color="#990000">::</font> <b><font color="#000080">normal</font></b> | <font color="#FF6600">switch_protocol</font>
+ | {<font color="#FF6600">internal_error</font>, <font color="#FF6600">timeout</font> | {<font color="#FF6600">error</font> | <b><font color="#000080">exit</font></b> | <b><font color="#000080">throw</font></b>, <b><font color="#000000">any</font></b>()}, <font color="#009900">HumanReadable</font>}
+ | {<font color="#FF6600">socket_error</font>, <font color="#FF6600">closed</font> | <b><font color="#000080">atom</font></b>(), <font color="#009900">HumanReadable</font>}
+ | {<font color="#FF6600">stream_error</font>, <font color="#009900">Error</font>, <font color="#009900">HumanReadable</font>}
+ | {<font color="#FF6600">connection_error</font>, <font color="#009900">Error</font>, <font color="#009900">HumanReadable</font>}
+ | {<font color="#FF6600">stop</font>, <b><font color="#000000">cow_http2:frame</font></b>(), <font color="#009900">HumanReadable</font>}
+
+<font color="#009900">Error</font> <font color="#990000">=</font> <b><font color="#000080">atom</font></b>()
+<font color="#009900">HumanReadable</font> <font color="#990000">=</font> <b><font color="#000080">atom</font></b>()</tt></pre>
+</div></div>
+<p>Reason for the stream termination.</p>
<h3 id="_resp_command">resp_command()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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_command</span></span>() <span style="color: #990000">::</span> {<span style="color: #FF6600">response</span>, <span style="font-weight: bold"><span style="color: #000000">cowboy:http_status</span></span>(),
- <span style="font-weight: bold"><span style="color: #000000">cowboy:http_headers</span></span>(), <span style="font-weight: bold"><span style="color: #000000">cowboy_req:resp_body</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>See the <a href="../response_command">response command</a> for details.</p></div>
-</div>
-<div class="sect2">
+<pre><tt><b><font color="#000000">resp_command</font></b>() <font color="#990000">::</font> {<font color="#FF6600">response</font>, <b><font color="#000000">cowboy:http_status</font></b>(),
+ <b><font color="#000000">cowboy:http_headers</font></b>(), <b><font color="#000000">cowboy_req:resp_body</font></b>()}</tt></pre>
+</div></div>
+<p>See the <a href="../response_command">response command</a> for details.</p>
<h3 id="_streamid">streamid()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">streamid</span></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>The identifier for this stream.</p></div>
-<div class="paragraph"><p>The identifier is unique over the connection process.
-It is possible to form a unique identifier node-wide and
-cluster-wide by wrapping it in a <code>{self(), StreamID}</code>
-tuple.</p></div>
-</div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">streamid</font></b>() <font color="#990000">::</font> <b><font color="#000000">any</font></b>()</tt></pre>
+</div></div>
+<p>The identifier for this stream.</p>
+<p>The identifier is unique over the connection process. It is possible to form a unique identifier node-wide and cluster-wide by wrapping it in a <code>{self(), StreamID}</code> tuple.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.2</strong>: The trailers command was introduced.
-</p>
+<ul><li><strong>2.2</strong>: The trailers command was introduced.
</li>
-<li>
-<p>
-<strong>2.0</strong>: Module introduced.
-</p>
+<li><strong>2.0</strong>: Module introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="..">cowboy(7)</a>,
-<a href="../cowboy_http">cowboy_http(3)</a>,
-<a href="../cowboy_http2">cowboy_http2(3)</a></p></div>
-</div>
-</div>
+<p><a href="..">cowboy(7)</a>, <a href="../cowboy_http">cowboy_http(3)</a>, <a href="../cowboy_http2">cowboy_http2(3)</a></p>
+
diff --git a/docs/en/cowboy/2.4/manual/cowboy_websocket/index.html b/docs/en/cowboy/2.4/manual/cowboy_websocket/index.html
index 01b70c1c..4fd95da2 100644
--- a/docs/en/cowboy/2.4/manual/cowboy_websocket/index.html
+++ b/docs/en/cowboy/2.4/manual/cowboy_websocket/index.html
@@ -62,308 +62,148 @@
<h1 class="lined-header"><span>cowboy_websocket(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_websocket - Websocket</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_websocket - Websocket</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The module <code>cowboy_websocket</code> implements Websocket
-as a Ranch protocol. It also defines a callback interface
-for handling Websocket connections.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The module <code>cowboy_websocket</code> implements Websocket as a Ranch protocol. It also defines a callback interface for handling Websocket connections.</p>
<h2 id="_callbacks">Callbacks</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Websocket handlers must implement the following callback
-interface:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Websocket handlers must implement the following callback interface:</p>
+<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">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_websocket</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
- | {<span style="color: #FF6600">cowboy_websocket</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>, <span style="color: #009900">Opts</span>}
-
-<span style="font-weight: bold"><span style="color: #000000">websocket_init</span></span>(<span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> <span style="color: #009900">CallResult</span> <span style="font-style: italic"><span style="color: #9A1900">%% optional</span></span>
-<span style="font-weight: bold"><span style="color: #000000">websocket_handle</span></span>(<span style="color: #009900">InFrame</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> <span style="color: #009900">CallResult</span>
-<span style="font-weight: bold"><span style="color: #000000">websocket_info</span></span>(<span style="color: #009900">Info</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> <span style="color: #009900">CallResult</span>
-
-<span style="font-weight: bold"><span style="color: #000000">terminate</span></span>(<span style="color: #009900">Reason</span>, <span style="color: #009900">PartialReq</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span> <span style="color: #FF6600">ok</span> <span style="font-style: italic"><span style="color: #9A1900">%% optional</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">PartialReq</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">map</span></span>()
-<span style="color: #009900">State</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()
-<span style="color: #009900">Opts</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_websocket:opts</span></span>()
-<span style="color: #009900">InFrame</span> <span style="color: #990000">::</span> {<span style="color: #FF6600">text</span> | <span style="font-weight: bold"><span style="color: #000080">binary</span></span> | <span style="color: #FF6600">ping</span> | <span style="color: #FF6600">pong</span>, <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()}
-<span style="color: #009900">OutFrame</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cow_ws:frame</span></span>() <span style="font-style: italic"><span style="color: #9A1900">%% see types below</span></span>
-<span style="color: #009900">Info</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()
-
-<span style="color: #009900">CallResult</span> <span style="color: #990000">::</span> {<span style="color: #FF6600">ok</span>, <span style="color: #009900">State</span>}
- | {<span style="color: #FF6600">ok</span>, <span style="color: #009900">State</span>, <span style="color: #FF6600">hibernate</span>}
- | {<span style="color: #FF6600">reply</span>, <span style="color: #009900">OutFrame</span> | [<span style="color: #009900">OutFrame</span>], <span style="color: #009900">State</span>}
- | {<span style="color: #FF6600">reply</span>, <span style="color: #009900">OutFrame</span> | [<span style="color: #009900">OutFrame</span>], <span style="color: #009900">State</span>, <span style="color: #FF6600">hibernate</span>}
- | {<span style="color: #FF6600">stop</span>, <span style="color: #009900">State</span>}
-
-<span style="color: #009900">Reason</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">normal</span></span> | <span style="color: #FF6600">stop</span> | <span style="color: #FF6600">timeout</span>
- | <span style="color: #FF6600">remote</span> | {<span style="color: #FF6600">remote</span>, <span style="font-weight: bold"><span style="color: #000000">cow_ws:close_code</span></span>(), <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()}
- | {<span style="color: #FF6600">error</span>, <span style="color: #FF6600">badencoding</span> | <span style="color: #FF6600">badframe</span> | <span style="color: #FF6600">closed</span> | <span style="font-weight: bold"><span style="color: #000080">atom</span></span>()}
- | {<span style="color: #FF6600">crash</span>, <span style="color: #FF6600">error</span> | <span style="font-weight: bold"><span style="color: #000080">exit</span></span> | <span style="font-weight: bold"><span style="color: #000080">throw</span></span>, <span style="font-weight: bold"><span style="color: #000000">any</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>The <code>init/2</code> callback is common to all handlers. To upgrade
-the connection to Websocket, it must return <code>cowboy_websocket</code>
-as the first element of the tuple.</p></div>
-<div class="paragraph"><p>Any operation requiring the HTTP request must be done in the
-<code>init/2</code> function, as the Req object will not be available
-after it returns. Websocket sub-protocol selection should
-therefore be done in this function.</p></div>
-<div class="paragraph"><p>The optional <code>websocket_init/1</code> callback will be called once
-the connection has been upgraded to Websocket. It can be used
-to perform any required initialization of the handler.</p></div>
-<div class="paragraph"><p>Note that the <code>init/2</code> function does not run in the same
-process as the Websocket callbacks. Any Websocket-specific
-initialization must be done in <code>websocket_init/1</code>.</p></div>
-<div class="paragraph"><p>The <code>websocket_handle/2</code> callback will be called for every
-frame received. The <code>websocket_info/2</code> callback will be
-called for every Erlang message received.</p></div>
-<div class="paragraph"><p>All three Websocket callbacks may send one or more frames
-back to the client (by returning a <code>reply</code> tuple) or terminate
-the connection (by sending a <code>close</code> frame or returning a <code>stop</code>
-tuple).</p></div>
-<div class="paragraph"><p>The optional <code>terminate/3</code> callback will ultimately be called
-with the reason for the termination of the connection. This
-callback is common to all handlers. Note that Websocket will
-not provide the full Req object by default, to save memory.</p></div>
-<div class="paragraph"><p>Cowboy will terminate the process right after closing the
-Websocket connection. This means that there is no need to
-perform any cleanup in the <code>terminate/3</code> callback.</p></div>
-<div class="paragraph"><p>The following terminate reasons are defined for Websocket
-connections:</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-normal
-</dt>
-<dd>
-<p>
- The connection was closed normally before establishing a Websocket
- connection. This typically happens if an <code>ok</code> tuple is returned
- from the <code>init/2</code> callback.
-</p>
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>)
+ <font color="#990000">-&gt;</font> {<font color="#FF6600">cowboy_websocket</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}
+ | {<font color="#FF6600">cowboy_websocket</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>, <font color="#009900">Opts</font>}
+
+<b><font color="#000000">websocket_init</font></b>(<font color="#009900">State</font>) <font color="#990000">-&gt;</font> <font color="#009900">CallResult</font> <i><font color="#9A1900">%% optional</font></i>
+<b><font color="#000000">websocket_handle</font></b>(<font color="#009900">InFrame</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> <font color="#009900">CallResult</font>
+<b><font color="#000000">websocket_info</font></b>(<font color="#009900">Info</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> <font color="#009900">CallResult</font>
+
+<b><font color="#000000">terminate</font></b>(<font color="#009900">Reason</font>, <font color="#009900">PartialReq</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font> <font color="#FF6600">ok</font> <i><font color="#9A1900">%% optional</font></i>
+
+<font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>()
+<font color="#009900">PartialReq</font> <font color="#990000">::</font> <b><font color="#000000">map</font></b>()
+<font color="#009900">State</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()
+<font color="#009900">Opts</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_websocket:opts</font></b>()
+<font color="#009900">InFrame</font> <font color="#990000">::</font> {<font color="#FF6600">text</font> | <b><font color="#000080">binary</font></b> | <font color="#FF6600">ping</font> | <font color="#FF6600">pong</font>, <b><font color="#000080">binary</font></b>()}
+<font color="#009900">OutFrame</font> <font color="#990000">::</font> <b><font color="#000000">cow_ws:frame</font></b>() <i><font color="#9A1900">%% see types below</font></i>
+<font color="#009900">Info</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()
+
+<font color="#009900">CallResult</font> <font color="#990000">::</font> {<font color="#FF6600">ok</font>, <font color="#009900">State</font>}
+ | {<font color="#FF6600">ok</font>, <font color="#009900">State</font>, <font color="#FF6600">hibernate</font>}
+ | {<font color="#FF6600">reply</font>, <font color="#009900">OutFrame</font> | [<font color="#009900">OutFrame</font>], <font color="#009900">State</font>}
+ | {<font color="#FF6600">reply</font>, <font color="#009900">OutFrame</font> | [<font color="#009900">OutFrame</font>], <font color="#009900">State</font>, <font color="#FF6600">hibernate</font>}
+ | {<font color="#FF6600">stop</font>, <font color="#009900">State</font>}
+
+<font color="#009900">Reason</font> <font color="#990000">::</font> <b><font color="#000080">normal</font></b> | <font color="#FF6600">stop</font> | <font color="#FF6600">timeout</font>
+ | <font color="#FF6600">remote</font> | {<font color="#FF6600">remote</font>, <b><font color="#000000">cow_ws:close_code</font></b>(), <b><font color="#000080">binary</font></b>()}
+ | {<font color="#FF6600">error</font>, <font color="#FF6600">badencoding</font> | <font color="#FF6600">badframe</font> | <font color="#FF6600">closed</font> | <b><font color="#000080">atom</font></b>()}
+ | {<font color="#FF6600">crash</font>, <font color="#FF6600">error</font> | <b><font color="#000080">exit</font></b> | <b><font color="#000080">throw</font></b>, <b><font color="#000000">any</font></b>()}</tt></pre>
+</div></div>
+<p>The <code>init/2</code> callback is common to all handlers. To upgrade the connection to Websocket, it must return <code>cowboy_websocket</code> as the first element of the tuple.</p>
+<p>Any operation requiring the HTTP request must be done in the <code>init/2</code> function, as the Req object will not be available after it returns. Websocket sub-protocol selection should therefore be done in this function.</p>
+<p>The optional <code>websocket_init/1</code> callback will be called once the connection has been upgraded to Websocket. It can be used to perform any required initialization of the handler.</p>
+<p>Note that the <code>init/2</code> function does not run in the same process as the Websocket callbacks. Any Websocket-specific initialization must be done in <code>websocket_init/1</code>.</p>
+<p>The <code>websocket_handle/2</code> callback will be called for every frame received. The <code>websocket_info/2</code> callback will be called for every Erlang message received.</p>
+<p>All three Websocket callbacks may send one or more frames back to the client (by returning a <code>reply</code> tuple) or terminate the connection (by sending a <code>close</code> frame or returning a <code>stop</code> tuple).</p>
+<p>The optional <code>terminate/3</code> callback will ultimately be called with the reason for the termination of the connection. This callback is common to all handlers. Note that Websocket will not provide the full Req object by default, to save memory.</p>
+<p>Cowboy will terminate the process right after closing the Websocket connection. This means that there is no need to perform any cleanup in the <code>terminate/3</code> callback.</p>
+<p>The following terminate reasons are defined for Websocket connections:</p>
+<dl><dt>normal</dt>
+<dd><p>The connection was closed normally before establishing a Websocket connection. This typically happens if an <code>ok</code> tuple is returned from the <code>init/2</code> callback.</p>
</dd>
-<dt class="hdlist1">
-remote
-</dt>
-<dd>
-<p>
- The remote endpoint closed the connection without giving any
- further details.
-</p>
+<dt>remote</dt>
+<dd><p>The remote endpoint closed the connection without giving any further details.</p>
</dd>
-<dt class="hdlist1">
-{remote, Code, Payload}
-</dt>
-<dd>
-<p>
- The remote endpoint closed the connection with the given
- <code>Code</code> and <code>Payload</code> as the reason.
-</p>
+<dt>{remote, Code, Payload}</dt>
+<dd><p>The remote endpoint closed the connection with the given <code>Code</code> and <code>Payload</code> as the reason.</p>
</dd>
-<dt class="hdlist1">
-stop
-</dt>
-<dd>
-<p>
- The handler requested to close the connection, either by returning
- a <code>stop</code> tuple or by sending a <code>close</code> frame.
-</p>
+<dt>stop</dt>
+<dd><p>The handler requested to close the connection, either by returning a <code>stop</code> tuple or by sending a <code>close</code> frame.</p>
</dd>
-<dt class="hdlist1">
-timeout
-</dt>
-<dd>
-<p>
- The connection has been closed due to inactivity. The timeout
- value can be configured from <code>init/2</code>.
-</p>
+<dt>timeout</dt>
+<dd><p>The connection has been closed due to inactivity. The timeout value can be configured from <code>init/2</code>.</p>
</dd>
-<dt class="hdlist1">
-{crash, Class, Reason}
-</dt>
-<dd>
-<p>
- A crash occurred in the handler. <code>Class</code> and <code>Reason</code> can be
- used to obtain more information about the crash. The function
- <code>erlang:get_stacktrace/0</code> can also be called to obtain the
- stacktrace of the process when the crash occurred.
-</p>
+<dt>{crash, Class, Reason}</dt>
+<dd><p>A crash occurred in the handler. <code>Class</code> and <code>Reason</code> can be used to obtain more information about the crash. The function <code>erlang:get_stacktrace/0</code> can also be called to obtain the stacktrace of the process when the crash occurred.</p>
</dd>
-<dt class="hdlist1">
-{error, badencoding}
-</dt>
-<dd>
-<p>
- A text frame was sent by the client with invalid encoding. All
- text frames must be valid UTF-8.
-</p>
+<dt>{error, badencoding}</dt>
+<dd><p>A text frame was sent by the client with invalid encoding. All text frames must be valid UTF-8.</p>
</dd>
-<dt class="hdlist1">
-{error, badframe}
-</dt>
-<dd>
-<p>
- A protocol error has been detected.
-</p>
+<dt>{error, badframe}</dt>
+<dd><p>A protocol error has been detected.</p>
</dd>
-<dt class="hdlist1">
-{error, closed}
-</dt>
-<dd>
-<p>
- The socket has been closed brutally without a close frame being
- received first.
-</p>
+<dt>{error, closed}</dt>
+<dd><p>The socket has been closed brutally without a close frame being received first.</p>
</dd>
-<dt class="hdlist1">
-{error, Reason}
-</dt>
-<dd>
-<p>
- A socket error ocurred.
-</p>
+<dt>{error, Reason}</dt>
+<dd><p>A socket error ocurred.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_types">Types</h2>
-<div class="sectionbody">
-<div class="sect3">
<h4 id="_cow_ws_frame">cow_ws:frame()</h4>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">frame</span></span>() <span style="color: #990000">::</span> {<span style="color: #FF6600">text</span>, <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>()}
- | {<span style="font-weight: bold"><span style="color: #000080">binary</span></span>, <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>()}
- | <span style="color: #FF6600">ping</span> | {<span style="color: #FF6600">ping</span>, <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>()}
- | <span style="color: #FF6600">pong</span> | {<span style="color: #FF6600">pong</span>, <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>()}
- | <span style="color: #FF6600">close</span> | {<span style="color: #FF6600">close</span>, <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>()} | {<span style="color: #FF6600">close</span>, <span style="font-weight: bold"><span style="color: #000000">close_code</span></span>(), <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>()}
-
-<span style="font-weight: bold"><span style="color: #000000">close_code</span></span>() <span style="color: #990000">::</span> <span style="color: #993399">1000</span><span style="color: #990000">..</span><span style="color: #993399">1003</span> | <span style="color: #993399">1006</span><span style="color: #990000">..</span><span style="color: #993399">1011</span> | <span style="color: #993399">3000</span><span style="color: #990000">..</span><span style="color: #993399">4999</span></tt></pre></div></div>
-<div class="paragraph"><p>Websocket frames that can be sent as a response.</p></div>
-<div class="paragraph"><p>Note that there is no need to send pong frames back as
-Cowboy does it automatically for you.</p></div>
-</div>
-<div class="sect2">
+<pre><tt><b><font color="#000000">frame</font></b>() <font color="#990000">::</font> {<font color="#FF6600">text</font>, <b><font color="#000000">iodata</font></b>()}
+ | {<b><font color="#000080">binary</font></b>, <b><font color="#000000">iodata</font></b>()}
+ | <font color="#FF6600">ping</font> | {<font color="#FF6600">ping</font>, <b><font color="#000000">iodata</font></b>()}
+ | <font color="#FF6600">pong</font> | {<font color="#FF6600">pong</font>, <b><font color="#000000">iodata</font></b>()}
+ | <font color="#FF6600">close</font> | {<font color="#FF6600">close</font>, <b><font color="#000000">iodata</font></b>()} | {<font color="#FF6600">close</font>, <b><font color="#000000">close_code</font></b>(), <b><font color="#000000">iodata</font></b>()}
+
+<b><font color="#000000">close_code</font></b>() <font color="#990000">::</font> <font color="#993399">1000</font><font color="#990000">..</font><font color="#993399">1003</font> | <font color="#993399">1006</font><font color="#990000">..</font><font color="#993399">1011</font> | <font color="#993399">3000</font><font color="#990000">..</font><font color="#993399">4999</font></tt></pre>
+</div></div>
+<p>Websocket frames that can be sent as a response.</p>
+<p>Note that there is no need to send pong frames back as Cowboy does it automatically for you.</p>
<h3 id="_opts">opts()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">opts</span></span>() <span style="color: #990000">::</span> #{
- <span style="color: #0000FF">compress</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>(),
- <span style="color: #0000FF">idle_timeout</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">timeout</span></span>(),
- <span style="color: #0000FF">max_frame_size</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>() | <span style="color: #FF6600">infinity</span>,
- <span style="color: #0000FF">req_filter</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">fun</span></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">map</span></span>())
-}</tt></pre></div></div>
-<div class="paragraph"><p>Websocket handler options.</p></div>
-<div class="paragraph"><p>This configuration is passed to Cowboy from the <code>init/2</code>
-function:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">opts</font></b>() <font color="#990000">::</font> #{
+ <font color="#0000FF">compress</font> <font color="#990000">=&gt;</font> <b><font color="#000000">boolean</font></b>(),
+ <font color="#0000FF">idle_timeout</font> <font color="#990000">=&gt;</font> <b><font color="#000000">timeout</font></b>(),
+ <font color="#0000FF">max_frame_size</font> <font color="#990000">=&gt;</font> <b><font color="#000000">non_neg_integer</font></b>() | <font color="#FF6600">infinity</font>,
+ <font color="#0000FF">req_filter</font> <font color="#990000">=&gt;</font> <b><font color="#0000FF">fun</font></b>((<b><font color="#000000">cowboy_req:req</font></b>()) <font color="#990000">-&gt;</font> <b><font color="#000000">map</font></b>())
+}</tt></pre>
+</div></div>
+<p>Websocket handler options.</p>
+<p>This configuration is passed to Cowboy from the <code>init/2</code> function:</p>
+<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">init</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
- <span style="color: #009900">Opts</span> <span style="color: #990000">=</span> #{<span style="color: #0000FF">compress</span> <span style="color: #990000">=&gt;</span> <span style="color: #000080">true</span>},
- {<span style="color: #FF6600">cowboy_websocket</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>, <span style="color: #009900">Opts</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>The default value is given next to the option name:</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-compress (false)
-</dt>
-<dd>
-<p>
- Whether to enable the Websocket frame compression
- extension. Frames will only be compressed for the
- clients that support this extension.
-</p>
+<pre><tt><b><font color="#000000">init</font></b>(<font color="#009900">Req</font>, <font color="#009900">State</font>) <font color="#990000">-&gt;</font>
+ <font color="#009900">Opts</font> <font color="#990000">=</font> #{<font color="#0000FF">compress</font> <font color="#990000">=&gt;</font> <font color="#000080">true</font>},
+ {<font color="#FF6600">cowboy_websocket</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>, <font color="#009900">Opts</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>The default value is given next to the option name:</p>
+<dl><dt>compress (false)</dt>
+<dd><p>Whether to enable the Websocket frame compression extension. Frames will only be compressed for the clients that support this extension.</p>
</dd>
-<dt class="hdlist1">
-idle_timeout (60000)
-</dt>
-<dd>
-<p>
- Time in milliseconds that Cowboy will keep the
- connection open without receiving anything from
- the client.
-</p>
+<dt>idle_timeout (60000)</dt>
+<dd><p>Time in milliseconds that Cowboy will keep the connection open without receiving anything from the client.</p>
</dd>
-<dt class="hdlist1">
-max_frame_size (infinity)
-</dt>
-<dd>
-<p>
- Maximum frame size allowed by this Websocket
- handler. Cowboy will close the connection when
- a client attempts to send a frame that goes over
- this limit. For fragmented frames this applies
- to the size of the reconstituted frame.
-</p>
+<dt>max_frame_size (infinity)</dt>
+<dd><p>Maximum frame size allowed by this Websocket handler. Cowboy will close the connection when a client attempts to send a frame that goes over this limit. For fragmented frames this applies to the size of the reconstituted frame.</p>
</dd>
-<dt class="hdlist1">
-req_filter
-</dt>
-<dd>
-<p>
- A function applied to the Req to compact it and
- only keep required information. The Req is only
- given back in the <code>terminate/3</code> callback. By default
- it keeps the method, version, URI components and peer
- information.
-</p>
+<dt>req_filter</dt>
+<dd><p>A function applied to the Req to compact it and only keep required information. The Req is only given back in the <code>terminate/3</code> callback. By default it keeps the method, version, URI components and peer information.</p>
</dd>
-</dl></div>
-</div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: The Req object is no longer passed to Websocket callbacks.
-</p>
+<ul><li><strong>2.0</strong>: The Req object is no longer passed to Websocket callbacks.
</li>
-<li>
-<p>
-<strong>2.0</strong>: The callback <code>websocket_terminate/3</code> was removed in favor of <code>terminate/3</code>.
-</p>
+<li><strong>2.0</strong>: The callback <code>websocket_terminate/3</code> was removed in favor of <code>terminate/3</code>.
</li>
-<li>
-<p>
-<strong>1.0</strong>: Protocol introduced.
-</p>
+<li><strong>1.0</strong>: Protocol introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="..">cowboy(7)</a>,
-<a href="../cowboy_handler">cowboy_handler(3)</a>,
-<a href="../cowboy_http">cowboy_http(3)</a>,
-<a href="../cowboy_http2">cowboy_http2(3)</a></p></div>
-</div>
-</div>
+<p><a href="..">cowboy(7)</a>, <a href="../cowboy_handler">cowboy_handler(3)</a>, <a href="../cowboy_http">cowboy_http(3)</a>, <a href="../cowboy_http2">cowboy_http2(3)</a></p>
+
diff --git a/docs/en/cowboy/2.4/manual/http_status_codes/index.html b/docs/en/cowboy/2.4/manual/http_status_codes/index.html
index e6d2cc5a..0d858a45 100644
--- a/docs/en/cowboy/2.4/manual/http_status_codes/index.html
+++ b/docs/en/cowboy/2.4/manual/http_status_codes/index.html
@@ -62,271 +62,92 @@
<h1 class="lined-header"><span>HTTP status codes(7)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>HTTP status codes - status codes used by Cowboy</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>HTTP status codes - status codes used by Cowboy</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This chapter aims to list all HTTP status codes that Cowboy
-may return, with details on the reasons why. The list given
-here only includes the replies that Cowboy sends, not user
-replies.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This chapter aims to list all HTTP status codes that Cowboy may return, with details on the reasons why. The list given here only includes the replies that Cowboy sends, not user replies.</p>
<h2 id="_100_continue">100 Continue</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>When the client sends an <code>expect: 100-continue</code> header,
-Cowboy automatically sends a this status code before
-trying to read the request body. This behavior can be
-disabled using the appropriate body option.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>When the client sends an <code>expect: 100-continue</code> header, Cowboy automatically sends a this status code before trying to read the request body. This behavior can be disabled using the appropriate body option.</p>
<h2 id="_101_switching_protocols">101 Switching Protocols</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This is the status code sent when switching to the
-Websocket protocol.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This is the status code sent when switching to the Websocket protocol.</p>
<h2 id="_200_ok">200 OK</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_201_created">201 Created</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_202_accepted">202 Accepted</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_204_no_content">204 No Content</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent when the processing of a request
-ends without any reply having been sent. It may also be
-sent by <code>cowboy_rest</code> under normal conditions.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent when the processing of a request ends without any reply having been sent. It may also be sent by <code>cowboy_rest</code> under normal conditions.</p>
<h2 id="_300_multiple_choices">300 Multiple Choices</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_301_moved_permanently">301 Moved Permanently</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_303_see_other">303 See Other</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_304_not_modified">304 Not Modified</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_307_temporary_redirect">307 Temporary Redirect</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_400_bad_request">400 Bad Request</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy will send this status code for any of the
-following reasons:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-Too many empty lines were sent before the request.
-</p>
+<p>Cowboy will send this status code for any of the following reasons:</p>
+<ul><li>Too many empty lines were sent before the request.
</li>
-<li>
-<p>
-The request-line could not be parsed.
-</p>
+<li>The request-line could not be parsed.
</li>
-<li>
-<p>
-Too many headers were sent.
-</p>
+<li>Too many headers were sent.
</li>
-<li>
-<p>
-A header name was too long.
-</p>
+<li>A header name was too long.
</li>
-<li>
-<p>
-A header value was too long.
-</p>
+<li>A header value was too long.
</li>
-<li>
-<p>
-The host header was missing from an HTTP/1.1 request.
-</p>
+<li>The host header was missing from an HTTP/1.1 request.
</li>
-<li>
-<p>
-The host header could not be parsed.
-</p>
+<li>The host header could not be parsed.
</li>
-<li>
-<p>
-The requested host was not found.
-</p>
+<li>The requested host was not found.
</li>
-<li>
-<p>
-The requested path could not be parsed.
-</p>
+<li>The requested path could not be parsed.
</li>
-<li>
-<p>
-The accept header could not be parsed when using REST.
-</p>
+<li>The accept header could not be parsed when using REST.
</li>
-<li>
-<p>
-REST under normal conditions.
-</p>
+<li>REST under normal conditions.
</li>
-<li>
-<p>
-A Websocket upgrade failed.
-</p>
+<li>A Websocket upgrade failed.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_401_unauthorized">401 Unauthorized</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_403_forbidden">403 Forbidden</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_404_not_found">404 Not Found</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent when the router successfully
-resolved the host but didn&#8217;t find a matching path for
-the request. It may also be sent by <code>cowboy_rest</code> under
-normal conditions.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent when the router successfully resolved the host but didn&apos;t find a matching path for the request. It may also be sent by <code>cowboy_rest</code> under normal conditions.</p>
<h2 id="_405_method_not_allowed">405 Method Not Allowed</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_406_not_acceptable">406 Not Acceptable</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_408_request_timeout">408 Request Timeout</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy will send this status code to the client if the
-client started to send a request, indicated by the
-request-line being received fully, but failed to send
-all headers in a reasonable time.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Cowboy will send this status code to the client if the client started to send a request, indicated by the request-line being received fully, but failed to send all headers in a reasonable time.</p>
<h2 id="_409_conflict">409 Conflict</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_410_gone">410 Gone</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_412_precondition_failed">412 Precondition Failed</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_413_request_entity_too_large">413 Request Entity Too Large</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_414_request_uri_too_long">414 Request-URI Too Long</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy will send this status code to the client if the
-request-line is too long. It may also be sent by
-<code>cowboy_rest</code> under normal conditions.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Cowboy will send this status code to the client if the request-line is too long. It may also be sent by <code>cowboy_rest</code> under normal conditions.</p>
<h2 id="_415_unsupported_media_type">415 Unsupported Media Type</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_500_internal_server_error">500 Internal Server Error</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent when a crash occurs in HTTP, loop
-or REST handlers, or when an invalid return value is
-returned. It may also be sent by <code>cowboy_rest</code> under
-normal conditions.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent when a crash occurs in HTTP, loop or REST handlers, or when an invalid return value is returned. It may also be sent by <code>cowboy_rest</code> under normal conditions.</p>
<h2 id="_501_not_implemented">501 Not Implemented</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_503_service_unavailable">503 Service Unavailable</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>This status code is sent by <code>cowboy_rest</code>.</p>
<h2 id="_505_http_version_not_supported">505 HTTP Version Not Supported</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy only supports the versions 1.0 and 1.1 of HTTP.
-In all other cases this status code is sent back to the
-client and the connection is closed.</p></div>
-</div>
-</div>
+<p>Cowboy only supports the versions 1.0 and 1.1 of HTTP. In all other cases this status code is sent back to the client and the connection is closed.</p>
+
diff --git a/docs/en/cowboy/2.4/manual/index.html b/docs/en/cowboy/2.4/manual/index.html
index 78e44814..91caacbe 100644
--- a/docs/en/cowboy/2.4/manual/index.html
+++ b/docs/en/cowboy/2.4/manual/index.html
@@ -62,171 +62,77 @@
<h1 class="lined-header"><span>Cowboy Function Reference</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy - Small, fast, modern HTTP server for Erlang/OTP</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy - Small, fast, modern HTTP server for Erlang/OTP</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Cowboy is an HTTP server for Erlang/OTP with support for the
-HTTP/1.1, HTTP/2 and Websocket protocols.</p></div>
-<div class="paragraph"><p>Cowboy aims to provide a complete HTTP stack. This includes
-the implementation of the HTTP RFCs but also any directly
-related standards, like Websocket or Server-Sent Events.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Cowboy is an HTTP server for Erlang/OTP with support for the HTTP/1.1, HTTP/2 and Websocket protocols.</p>
+<p>Cowboy aims to provide a complete HTTP stack. This includes the implementation of the HTTP RFCs but also any directly related standards, like Websocket or Server-Sent Events.</p>
<h2 id="_modules">Modules</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Functions:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="cowboy">cowboy(3)</a> - Listener management
-</p>
+<p>Functions:</p>
+<ul><li><a href="cowboy">cowboy(3)</a> - Listener management
</li>
-<li>
-<p>
-<a href="cowboy_req">cowboy_req(3)</a> - Request and response
-</p>
+<li><a href="cowboy_req">cowboy_req(3)</a> - Request and response
</li>
-<li>
-<p>
-<a href="cowboy_router">cowboy_router(3)</a> - Router
-</p>
+<li><a href="cowboy_router">cowboy_router(3)</a> - Router
</li>
-<li>
-<p>
-<a href="cowboy_constraints">cowboy_constraints(3)</a> - Constraints
-</p>
+<li><a href="cowboy_constraints">cowboy_constraints(3)</a> - Constraints
</li>
-</ul></div>
-<div class="paragraph"><p>Protocols:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="cowboy_http">cowboy_http(3)</a> - HTTP/1.1
-</p>
+</ul>
+<p>Protocols:</p>
+<ul><li><a href="cowboy_http">cowboy_http(3)</a> - HTTP/1.1
</li>
-<li>
-<p>
-<a href="cowboy_http2">cowboy_http2(3)</a> - HTTP/2
-</p>
+<li><a href="cowboy_http2">cowboy_http2(3)</a> - HTTP/2
</li>
-<li>
-<p>
-<a href="cowboy_websocket">cowboy_websocket(3)</a> - Websocket
-</p>
+<li><a href="cowboy_websocket">cowboy_websocket(3)</a> - Websocket
</li>
-</ul></div>
-<div class="paragraph"><p>Handlers:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="cowboy_static">cowboy_static(3)</a> - Static file handler
-</p>
+</ul>
+<p>Handlers:</p>
+<ul><li><a href="cowboy_static">cowboy_static(3)</a> - Static file handler
</li>
-</ul></div>
-<div class="paragraph"><p>Behaviors:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="cowboy_handler">cowboy_handler(3)</a> - Plain HTTP handlers
-</p>
+</ul>
+<p>Behaviors:</p>
+<ul><li><a href="cowboy_handler">cowboy_handler(3)</a> - Plain HTTP handlers
</li>
-<li>
-<p>
-<a href="cowboy_loop">cowboy_loop(3)</a> - Loop handlers
-</p>
+<li><a href="cowboy_loop">cowboy_loop(3)</a> - Loop handlers
</li>
-<li>
-<p>
-<a href="cowboy_middleware">cowboy_middleware(3)</a> - Middlewares
-</p>
+<li><a href="cowboy_middleware">cowboy_middleware(3)</a> - Middlewares
</li>
-<li>
-<p>
-<a href="cowboy_rest">cowboy_rest(3)</a> - REST handlers
-</p>
+<li><a href="cowboy_rest">cowboy_rest(3)</a> - REST handlers
</li>
-<li>
-<p>
-<a href="cowboy_stream">cowboy_stream(3)</a> - Stream handlers
-</p>
+<li><a href="cowboy_stream">cowboy_stream(3)</a> - Stream handlers
</li>
-<li>
-<p>
-<a href="cowboy_websocket">cowboy_websocket(3)</a> - Websocket handlers
-</p>
+<li><a href="cowboy_websocket">cowboy_websocket(3)</a> - Websocket handlers
</li>
-</ul></div>
-<div class="paragraph"><p>Middlewares:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="cowboy_router">cowboy_router(3)</a> - Router middleware
-</p>
+</ul>
+<p>Middlewares:</p>
+<ul><li><a href="cowboy_router">cowboy_router(3)</a> - Router middleware
</li>
-<li>
-<p>
-<a href="cowboy_handler">cowboy_handler(3)</a> - Handler middleware
-</p>
+<li><a href="cowboy_handler">cowboy_handler(3)</a> - Handler middleware
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
+<!-- @todo http_status_codes is not linked to; what to do with it?-->
<h2 id="_dependencies">Dependencies</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="ranch_app">ranch(7)</a> - Socket acceptor pool for TCP protocols
-</p>
+<ul><li><a href="ranch_app">ranch(7)</a> - Socket acceptor pool for TCP protocols
</li>
-<li>
-<p>
-<a href="cowlib_app">cowlib(7)</a> - Support library for manipulating Web protocols
-</p>
+<li><a href="cowlib_app">cowlib(7)</a> - Support library for manipulating Web protocols
</li>
-<li>
-<p>
-ssl - Secure communication over sockets
-</p>
+<li>ssl - Secure communication over sockets
</li>
-<li>
-<p>
-crypto - Crypto functions
-</p>
+<li>crypto - Crypto functions
</li>
-</ul></div>
-<div class="paragraph"><p>All these applications must be started before the <code>cowboy</code>
-application. To start Cowboy and all dependencies at once:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+</ul>
+<p>All these applications must be started before the <code>cowboy</code> application. To start Cowboy and all dependencies at once:</p>
+<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">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">application:ensure_all_started</span></span>(<span style="color: #FF6600">cowboy</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">application:ensure_all_started</font></b>(<font color="#FF6600">cowboy</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_environment">Environment</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <code>cowboy</code> application does not define any application
-environment configuration parameters.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The <code>cowboy</code> application does not define any application environment configuration parameters.</p>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="ranch_app">ranch(7)</a>,
-<a href="cowlib_app">cowlib(7)</a></p></div>
-</div>
-</div>
+<p><a href="ranch_app">ranch(7)</a>, <a href="cowlib_app">cowlib(7)</a></p>
+
diff --git a/docs/en/erlang.mk/1/guide/app/index.html b/docs/en/erlang.mk/1/guide/app/index.html
index 55c2d223..3c4d62d3 100644
--- a/docs/en/erlang.mk/1/guide/app/index.html
+++ b/docs/en/erlang.mk/1/guide/app/index.html
@@ -62,642 +62,348 @@
<h1 class="lined-header"><span>Building</span></h1>
-<div class="paragraph"><p>Erlang.mk can do a lot of things, but it is, first and
-foremost, a build tool. In this chapter we will cover
-the basics of building a project with Erlang.mk.</p></div>
-<div class="paragraph"><p>For most of this chapter, we will assume that you are
-using a project <a href="../getting_started">generated by Erlang.mk</a>.</p></div>
-<div class="sect1">
+<p>Erlang.mk can do a lot of things, but it is, first and foremost, a build tool. In this chapter we will cover the basics of building a project with Erlang.mk.</p>
+<p>For most of this chapter, we will assume that you are using a project <a href="../getting_started">generated by Erlang.mk</a>.</p>
<h2 id="_how_to_build">How to build</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>To build a project, all you have to do is type <code>make</code>:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>To build a project, all you have to do is type <code>make</code>:</p>
+<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</tt></pre></div></div>
-<div class="paragraph"><p>It will work regardless of your project: OTP applications,
-library applications, NIFs, port drivers or even releases.
-Erlang.mk also automatically downloads and compiles the
-dependencies for your project.</p></div>
-<div class="paragraph"><p>All this is possible thanks to a combination of configuration
-and conventions. Most of the conventions come from Erlang/OTP
-itself so any seasoned Erlang developers should feel right at
-home.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>$ make</tt></pre>
+</div></div>
+<p>It will work regardless of your project: OTP applications, library applications, NIFs, port drivers or even releases. Erlang.mk also automatically downloads and compiles the dependencies for your project.</p>
+<p>All this is possible thanks to a combination of configuration and conventions. Most of the conventions come from Erlang/OTP itself so any seasoned Erlang developers should feel right at home.</p>
<h2 id="_what_to_build">What to build</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Erlang.mk gives you control over three steps of the build
-process, allowing you to do a partial build if needed.</p></div>
-<div class="paragraph"><p>A build has three phases: first any dependency is fetched
-and built, then the project itself is built and finally a
-release may be generated when applicable. A release is only
-generated for projects specifically configured to do so.</p></div>
-<div class="paragraph"><p>Erlang.mk handles those three phases automatically when you
-type <code>make</code>. But sometimes you just want to repeat one or
-two of them.</p></div>
-<div class="paragraph"><p>The commands detailed in this section are most useful after
-you have a successful build as they allow you to quickly
-redo a step instead of going through everything. This is
-especially useful for large projects or projects that end
-up generating releases.</p></div>
-<div class="sect3">
+<p>Erlang.mk gives you control over three steps of the build process, allowing you to do a partial build if needed.</p>
+<p>A build has three phases: first any dependency is fetched and built, then the project itself is built and finally a release may be generated when applicable. A release is only generated for projects specifically configured to do so.</p>
+<p>Erlang.mk handles those three phases automatically when you type <code>make</code>. But sometimes you just want to repeat one or two of them.</p>
+<p>The commands detailed in this section are most useful after you have a successful build as they allow you to quickly redo a step instead of going through everything. This is especially useful for large projects or projects that end up generating releases.</p>
<h4 id="_application">Application</h4>
-<div class="paragraph"><p>You can build your application and dependencies without
-generating a release by running the following command:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>You can build your application and dependencies without generating a release by running the following command:</p>
+<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 app</tt></pre></div></div>
-<div class="paragraph"><p>To build your application without touching dependencies
-at all, you can use the <code>SKIP_DEPS</code> variable:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>$ make app</tt></pre>
+</div></div>
+<p>To build your application without touching dependencies at all, you can use the <code>SKIP_DEPS</code> variable:</p>
+<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 app <span style="color: #009900">SKIP_DEPS</span><span style="color: #990000">=</span><span style="color: #993399">1</span></tt></pre></div></div>
-<div class="paragraph"><p>This command is very useful if you have a lot of dependencies
-and develop on a machine with slow file access, like the
-Raspberry Pi and many other embedded devices.</p></div>
-<div class="paragraph"><p>Note that this command may fail if a required dependency
-is missing.</p></div>
-</div>
-<div class="sect3">
+<pre><tt>$ make app <font color="#009900">SKIP_DEPS</font><font color="#990000">=</font><font color="#993399">1</font></tt></pre>
+</div></div>
+<p>This command is very useful if you have a lot of dependencies and develop on a machine with slow file access, like the Raspberry Pi and many other embedded devices.</p>
+<p>Note that this command may fail if a required dependency is missing.</p>
<h4 id="_dependencies">Dependencies</h4>
-<div class="paragraph"><p>You can build all dependencies, and nothing else, by
-running the following command:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>You can build all dependencies, and nothing else, by running the following command:</p>
+<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 deps</tt></pre></div></div>
-<div class="paragraph"><p>This will fetch and compile all dependencies and their
-dependencies, recursively.</p></div>
-<div class="paragraph"><p><a href="../deps">Packages and dependencies</a> are covered
-in the next chapter.</p></div>
-</div>
-<div class="sect3">
+<pre><tt>$ make deps</tt></pre>
+</div></div>
+<p>This will fetch and compile all dependencies and their dependencies, recursively.</p>
+<p><a href="../deps">Packages and dependencies</a> are covered in the next chapter.</p>
<h4 id="_release">Release</h4>
-<div class="paragraph"><p>It is not possible to build the release without at least
-building the application itself, unless of course if there&#8217;s
-no application to begin with.</p></div>
-<div class="paragraph"><p>To generate the release, <code>make</code> will generally suffice with
-a normal Erlang.mk. A separate target is however available,
-and will take care of building the release, after building
-the application and all dependencies:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>It is not possible to build the release without at least building the application itself, unless of course if there&apos;s no application to begin with.</p>
+<p>To generate the release, <code>make</code> will generally suffice with a normal Erlang.mk. A separate target is however available, and will take care of building the release, after building the application and all dependencies:</p>
+<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 rel</tt></pre></div></div>
-<div class="paragraph"><p>Consult the <a href="../relx">Releases</a> chapter for more
-information about what releases are and how they are generated.</p></div>
-</div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>$ make rel</tt></pre>
+</div></div>
+<p>Consult the <a href="../relx">Releases</a> chapter for more information about what releases are and how they are generated.</p>
<h2 id="_application_resource_file">Application resource file</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>When building your application, Erlang.mk will generate the
-<a href="http://www.erlang.org/doc/man/app.html">application resource file</a>.
-This file is mandatory for all Erlang applications and is
-found in <em>ebin/$(PROJECT).app</em>.</p></div>
-<div class="paragraph"><p><code>PROJECT</code> is a variable defined in your Makefile and taken
-from the name of the directory when Erlang.mk bootstraps
-your project.</p></div>
-<div class="paragraph"><p>Erlang.mk can build the <em>ebin/$(PROJECT).app</em> in two different
-ways: from the configuration found in the Makefile, or from
-the <em>src/$(PROJECT).app.src</em> file.</p></div>
-<div class="sect3">
+<p>When building your application, Erlang.mk will generate the <a href="http://www.erlang.org/doc/man/app.html">application resource file</a>. This file is mandatory for all Erlang applications and is found in <em>ebin/$(PROJECT).app</em>.</p>
+<p><code>PROJECT</code> is a variable defined in your Makefile and taken from the name of the directory when Erlang.mk bootstraps your project.</p>
+<p>Erlang.mk can build the <em>ebin/$(PROJECT).app</em> in two different ways: from the configuration found in the Makefile, or from the <em>src/$(PROJECT).app.src</em> file.</p>
<h4 id="_application_configuration">Application configuration</h4>
-<div class="paragraph"><p>Erlang.mk automatically fills the <code>PROJECT</code> variable when
-bootstrapping a new project, but everything else is up to
-you. None of the values are required to build your project,
-although it is recommended to fill everything relevant to
-your situation.</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-<code>PROJECT</code>
-</dt>
-<dd>
-<p>
- The name of the OTP application or library.
-</p>
+<p>Erlang.mk automatically fills the <code>PROJECT</code> variable when bootstrapping a new project, but everything else is up to you. None of the values are required to build your project, although it is recommended to fill everything relevant to your situation.</p>
+<dl><dt><code>PROJECT</code></dt>
+<dd><p>The name of the OTP application or library.</p>
</dd>
-<dt class="hdlist1">
-<code>PROJECT_DESCRIPTION</code>
-</dt>
-<dd>
-<p>
- Short description of the project.
-</p>
+<dt><code>PROJECT_DESCRIPTION</code></dt>
+<dd><p>Short description of the project.</p>
</dd>
-<dt class="hdlist1">
-<code>PROJECT_VERSION</code>
-</dt>
-<dd>
-<p>
- Current version of the project.
-</p>
+<dt><code>PROJECT_VERSION</code></dt>
+<dd><p>Current version of the project.</p>
</dd>
-<dt class="hdlist1">
-<code>PROJECT_MOD</code>
-</dt>
-<dd>
-<p>
- The application callback module.
-</p>
+<dt><code>PROJECT_MOD</code></dt>
+<dd><p>The application callback module.</p>
</dd>
-<dt class="hdlist1">
-<code>PROJECT_REGISTERED</code>
-</dt>
-<dd>
-<p>
- List of the names of all registered processes.
-</p>
+<dt><code>PROJECT_REGISTERED</code></dt>
+<dd><p>List of the names of all registered processes.</p>
</dd>
-<dt class="hdlist1">
-<code>PROJECT_ENV</code>
-</dt>
-<dd>
-<p>
- Configuration parameters used by the application.
-</p>
+<dt><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>
+<dt><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>
-<p>
- List of Erlang/OTP applications this project depends on,
- excluding <code>erts</code>, <code>kernel</code> and <code>stdlib</code>, or list of
- dependencies local to this repository (in <code>APPS_DIR</code>).
-</p>
+<dt><code>LOCAL_DEPS</code></dt>
+<dd><p>List of Erlang/OTP applications this project depends on, excluding <code>erts</code>, <code>kernel</code> and <code>stdlib</code>, or list of dependencies local to this repository (in <code>APPS_DIR</code>).</p>
</dd>
-<dt class="hdlist1">
-<code>DEPS</code>
-</dt>
-<dd>
-<p>
- List of applications this project depends on that need
- to be fetched by Erlang.mk.
-</p>
+<dt><code>DEPS</code></dt>
+<dd><p>List of applications this project depends on that need to be fetched by Erlang.mk.</p>
</dd>
-</dl></div>
-<div class="paragraph"><p>There&#8217;s no need for quotes or anything. The relevant part of
-the Cowboy Makefile follows, if you need an example:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+</dl>
+<p>There&apos;s no need for quotes or anything. The relevant part of the Cowboy Makefile follows, if you need an example:</p>
+<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">PROJECT =</span> cowboy
-<span style="color: #009900">PROJECT_DESCRIPTION =</span> Small<span style="color: #990000">,</span> fast<span style="color: #990000">,</span> modular HTTP server<span style="color: #990000">.</span>
-<span style="color: #009900">PROJECT_VERSION =</span> 2.0.0-pre.2
-<span style="color: #009900">PROJECT_REGISTERED =</span> cowboy_clock
-
-<span style="color: #009900">LOCAL_DEPS =</span> crypto
-<span style="color: #009900">DEPS =</span> cowlib ranch</tt></pre></div></div>
-<div class="paragraph"><p>Any space before and after the value is dropped.</p></div>
-<div class="paragraph"><p><a href="../deps">Dependencies</a> are covered in details in
-the next chapter.</p></div>
-</div>
-<div class="sect3">
+<pre><tt><font color="#009900">PROJECT =</font> cowboy
+<font color="#009900">PROJECT_DESCRIPTION =</font> Small<font color="#990000">,</font> fast<font color="#990000">,</font> modular HTTP server<font color="#990000">.</font>
+<font color="#009900">PROJECT_VERSION =</font> 2.0.0-pre.2
+<font color="#009900">PROJECT_REGISTERED =</font> cowboy_clock
+
+<font color="#009900">LOCAL_DEPS =</font> crypto
+<font color="#009900">DEPS =</font> cowlib ranch</tt></pre>
+</div></div>
+<p>Any space before and after the value is dropped.</p>
+<p><a href="../deps">Dependencies</a> are covered in details in the next chapter.</p>
<h4 id="_application_environment">Application environment</h4>
-<div class="paragraph"><p>The <code>PROJECT_ENV</code> variable is used to set the application
-environment:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The <code>PROJECT_ENV</code> variable is used to set the application environment:</p>
+<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>define PROJECT_ENV
-<span style="color: #990000">[</span>
- {chips<span style="color: #990000">,</span> <span style="color: #990000">[</span>currysauce<span style="color: #990000">,</span>{mushypeas<span style="color: #990000">,</span><span style="font-weight: bold"><span style="color: #0000FF">false</span></span>}<span style="color: #990000">]</span>}<span style="color: #990000">,</span>
- {pizza<span style="color: #990000">,</span> <span style="color: #990000">[</span>{size<span style="color: #990000">,</span>large}<span style="color: #990000">,</span>{toppings<span style="color: #990000">,[</span>anchovies<span style="color: #990000">]</span>}<span style="color: #990000">]</span>}
-<span style="color: #990000">]</span>
-endef</tt></pre></div></div>
-<div class="paragraph"><p>If you have a large set of environment variables, you may find it
-easier to use a separate file. Do this by including the following
-in your Makefile:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<font color="#990000">[</font>
+ {chips<font color="#990000">,</font> <font color="#990000">[</font>currysauce<font color="#990000">,</font>{mushypeas<font color="#990000">,</font><b><font color="#0000FF">false</font></b>}<font color="#990000">]</font>}<font color="#990000">,</font>
+ {pizza<font color="#990000">,</font> <font color="#990000">[</font>{size<font color="#990000">,</font>large}<font color="#990000">,</font>{toppings<font color="#990000">,[</font>anchovies<font color="#990000">]</font>}<font color="#990000">]</font>}
+<font color="#990000">]</font>
+endef</tt></pre>
+</div></div>
+<p>If you have a large set of environment variables, you may find it easier to use a separate file. Do this by including the following in your Makefile:</p>
+<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">PROJECT_ENV_FILE =</span> src/env.src
-<span style="color: #009900">PROJECT_ENV =</span> <span style="color: #009900">$(</span>subst <span style="color: #990000">\</span>n<span style="color: #990000">,</span><span style="color: #009900">$(newline)</span><span style="color: #990000">,</span><span style="color: #009900">$(</span>shell cat <span style="color: #009900">$(PROJECT_ENV_FILE)</span> <span style="color: #990000">|</span> sed -e <span style="color: #FF0000">'s/$$/</span><span style="color: #CC33CC">\\</span><span style="color: #FF0000">n/;'</span><span style="color: #990000">))</span>
-ebin<span style="color: #990000">/</span><span style="color: #009900">$(PROJECT)</span>.app<span style="color: #990000">::</span> <span style="color: #009900">$(PROJECT_ENV_FILE)</span></tt></pre></div></div>
-<div class="paragraph"><p>The file has the same contents as the <code>PROJECT_ENV</code> variable:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">PROJECT_ENV_FILE =</font> src/env.src
+<font color="#009900">PROJECT_ENV =</font> <font color="#009900">$(</font>subst <font color="#990000">\</font>n<font color="#990000">,</font><font color="#009900">$(newline)</font><font color="#990000">,</font><font color="#009900">$(</font>shell cat <font color="#009900">$(PROJECT_ENV_FILE)</font> <font color="#990000">|</font> sed -e <font color="#FF0000">'s/$$/</font><font color="#CC33CC">\\</font><font color="#FF0000">n/;'</font><font color="#990000">))</font>
+ebin<font color="#990000">/</font><font color="#009900">$(PROJECT)</font>.app<font color="#990000">::</font> <font color="#009900">$(PROJECT_ENV_FILE)</font></tt></pre>
+</div></div>
+<p>The file has the same contents as the <code>PROJECT_ENV</code> variable:</p>
+<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">chips</span>, [<span style="color: #FF6600">currysauce</span>,{<span style="color: #FF6600">mushypeas</span>,<span style="color: #000080">false</span>}]},
- {<span style="color: #FF6600">pizza</span>, [{<span style="font-weight: bold"><span style="color: #000080">size</span></span>,<span style="color: #FF6600">large</span>},{<span style="color: #FF6600">toppings</span>,[<span style="color: #FF6600">anchovies</span>]}]}
-]</tt></pre></div></div>
-</div>
-<div class="sect3">
+ {<font color="#FF6600">chips</font>, [<font color="#FF6600">currysauce</font>,{<font color="#FF6600">mushypeas</font>,<font color="#000080">false</font>}]},
+ {<font color="#FF6600">pizza</font>, [{<b><font color="#000080">size</font></b>,<font color="#FF6600">large</font>},{<font color="#FF6600">toppings</font>,[<font color="#FF6600">anchovies</font>]}]}
+]</tt></pre>
+</div></div>
<h4 id="_legacy_method">Legacy method</h4>
-<div class="paragraph"><p>The <em>src/$(PROJECT).app.src</em> file is a legacy method of
-building Erlang applications. It was introduced by the original
-<code>rebar</code> build tool, of which Erlang.mk owes a great deal as it
-is its main inspiration.</p></div>
-<div class="paragraph"><p>The <em>.app.src</em> file serves as a template to generate the <em>.app</em>
-file. Erlang.mk will take it, fill in the <code>modules</code> value
-dynamically, and save the result in <em>ebin/$(PROJECT).app</em>.</p></div>
-<div class="paragraph"><p>When using this method, Erlang.mk cannot fill the <code>applications</code>
-key from dependencies automatically, which means you need to
-add them to Erlang.mk and to the <em>.app.src</em> at the same time,
-duplicating the work.</p></div>
-<div class="paragraph"><p>If you really can&#8217;t live without the legacy method, for one
-reason or another, worry not; Erlang.mk will support it. And
-if you need to create a new project that uses this method, you
-just have to say so when bootstrapping:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The <em>src/$(PROJECT).app.src</em> file is a legacy method of building Erlang applications. It was introduced by the original <code>rebar</code> build tool, of which Erlang.mk owes a great deal as it is its main inspiration.</p>
+<p>The <em>.app.src</em> file serves as a template to generate the <em>.app</em> file. Erlang.mk will take it, fill in the <code>modules</code> value dynamically, and save the result in <em>ebin/$(PROJECT).app</em>.</p>
+<p>When using this method, Erlang.mk cannot fill the <code>applications</code> key from dependencies automatically, which means you need to add them to Erlang.mk and to the <em>.app.src</em> at the same time, duplicating the work.</p>
+<p>If you really can&apos;t live without the legacy method, for one reason or another, worry not; Erlang.mk will support it. And if you need to create a new project that uses this method, you just have to say so when bootstrapping:</p>
+<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 -f erlang<span style="color: #990000">.</span>mk bootstrap-lib <span style="color: #009900">LEGACY</span><span style="color: #990000">=</span><span style="color: #993399">1</span></tt></pre></div></div>
-</div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>$ make -f erlang<font color="#990000">.</font>mk bootstrap-lib <font color="#009900">LEGACY</font><font color="#990000">=</font><font color="#993399">1</font></tt></pre>
+</div></div>
<h2 id="_automatic_application_resource_file_values">Automatic application resource file values</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>When building the application resource file, Erlang.mk may
-automatically add an <code>id</code> key with information about the
-Git commit (if using Git), or an empty string otherwise.
-It will only do this under specific conditions:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-The application was built as a dependency of another, or
-</p>
+<p>When building the application resource file, Erlang.mk may automatically add an <code>id</code> key with information about the Git commit (if using Git), or an empty string otherwise. It will only do this under specific conditions:</p>
+<ul><li>The application was built as a dependency of another, or
</li>
-<li>
-<p>
-The legacy method was used, and the <em>.app.src</em> file contained <code>{id, "git"}</code>
-</p>
+<li>The legacy method was used, and the <em>.app.src</em> file contained <code>{id, &quot;git&quot;}</code>
</li>
-</ul></div>
-<div class="paragraph"><p>This value is most useful when you need to help your users,
-as it allows you to know which version they run exactly by
-asking them to look in the file, or by running a simple
-command on their production server:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+</ul>
+<p>This value is most useful when you need to help your users, as it allows you to know which version they run exactly by asking them to look in the file, or by running a simple command on their production server:</p>
+<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: #993399">1</span><span style="color: #990000">&gt;</span> <span style="font-weight: bold"><span style="color: #000000">application:get_all_key</span></span>(<span style="color: #FF6600">cowboy</span>)<span style="color: #990000">.</span>
-{<span style="color: #FF6600">ok</span>,[{<span style="color: #FF6600">description</span>,<span style="color: #FF0000">"Small, fast, modular HTTP server."</span>},
- {<span style="color: #FF6600">id</span>,<span style="color: #FF0000">"2.0.0-pre.2-25-g0ffde50-dirty"</span>},</tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#993399">1</font><font color="#990000">&gt;</font> <b><font color="#000000">application:get_all_key</font></b>(<font color="#FF6600">cowboy</font>)<font color="#990000">.</font>
+{<font color="#FF6600">ok</font>,[{<font color="#FF6600">description</font>,<font color="#FF0000">"Small, fast, modular HTTP server."</font>},
+ {<font color="#FF6600">id</font>,<font color="#FF0000">"2.0.0-pre.2-25-g0ffde50-dirty"</font>},</tt></pre>
+</div></div>
<h2 id="_file_formats">File formats</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Erlang.mk supports a variety of different source file formats.
-The following formats are supported natively:</p></div>
-<div class="tableblock">
-<table rules="all"
-width="100%"
-frame="border"
-cellspacing="0" cellpadding="4">
-<col width="25%" />
-<col width="25%" />
-<col width="25%" />
-<col width="25%" />
-<thead>
-<tr>
-<th align="left" valign="top"> Extension </th>
-<th align="center" valign="top"> Location </th>
-<th align="center" valign="top"> Description </th>
-<th align="center" valign="top"> Output</th>
+<p>Erlang.mk supports a variety of different source file formats. The following formats are supported natively:</p>
+<table rules="all" width="100%" frame="border"
+ cellspacing="0" cellpadding="4">
+<thead><tr><th>Extension</th>
+<th>Location</th>
+<th>Description</th>
+<th>Output</th>
+</tr></thead><tbody><tr><td>.erl</td>
+<td>src/</td>
+<td>Erlang source</td>
+<td>ebin/*.beam</td>
</tr>
-</thead>
-<tbody>
-<tr>
-<td align="left" valign="top"><p class="table">.erl</p></td>
-<td align="center" valign="top"><p class="table">src/</p></td>
-<td align="center" valign="top"><p class="table">Erlang source</p></td>
-<td align="center" valign="top"><p class="table">ebin/*.beam</p></td>
+<tr><td>.core</td>
+<td>src/</td>
+<td>Core Erlang source</td>
+<td>ebin/*.beam</td>
</tr>
-<tr>
-<td align="left" valign="top"><p class="table">.core</p></td>
-<td align="center" valign="top"><p class="table">src/</p></td>
-<td align="center" valign="top"><p class="table">Core Erlang source</p></td>
-<td align="center" valign="top"><p class="table">ebin/*.beam</p></td>
+<tr><td>.xrl</td>
+<td>src/</td>
+<td>Leex source</td>
+<td>src/*.erl</td>
</tr>
-<tr>
-<td align="left" valign="top"><p class="table">.xrl</p></td>
-<td align="center" valign="top"><p class="table">src/</p></td>
-<td align="center" valign="top"><p class="table">Leex source</p></td>
-<td align="center" valign="top"><p class="table">src/*.erl</p></td>
+<tr><td>.yrl</td>
+<td>src/</td>
+<td>Yecc source</td>
+<td>src/*.erl</td>
</tr>
-<tr>
-<td align="left" valign="top"><p class="table">.yrl</p></td>
-<td align="center" valign="top"><p class="table">src/</p></td>
-<td align="center" valign="top"><p class="table">Yecc source</p></td>
-<td align="center" valign="top"><p class="table">src/*.erl</p></td>
+<tr><td>.asn1</td>
+<td>asn1/</td>
+<td>ASN.1 files</td>
+<td>include/*.hrl include/*.asn1db src/*.erl</td>
</tr>
-<tr>
-<td align="left" valign="top"><p class="table">.asn1</p></td>
-<td align="center" valign="top"><p class="table">asn1/</p></td>
-<td align="center" valign="top"><p class="table">ASN.1 files</p></td>
-<td align="center" valign="top"><p class="table">include/<strong>.hrl include/</strong>.asn1db src/*.erl</p></td>
+<tr><td>.mib</td>
+<td>mibs/</td>
+<td>SNMP MIB files</td>
+<td>include/*.hrl priv/mibs/*.bin</td>
</tr>
-<tr>
-<td align="left" valign="top"><p class="table">.mib</p></td>
-<td align="center" valign="top"><p class="table">mibs/</p></td>
-<td align="center" valign="top"><p class="table">SNMP MIB files</p></td>
-<td align="center" valign="top"><p class="table">include/<strong>.hrl priv/mibs/</strong>.bin</p></td>
+</tbody></table>
+<p>Files are always searched recursively.</p>
+<p>The build is ordered, so that files that generate Erlang source files are run before, and the resulting Erlang source files are then built normally.</p>
+<p>In addition, Erlang.mk keeps track of header files (<code>.hrl</code>) as described at the end of this chapter. It can also compile C code, as described in the <a href="../ports">NIFs and port drivers</a> chapter.</p>
+<p>Erlang.mk also comes with plugins for the following formats:</p>
+<table rules="all" width="100%" frame="border"
+ cellspacing="0" cellpadding="4">
+<thead><tr><th>Extension</th>
+<th>Location</th>
+<th>Description</th>
+<th>Output</th>
+</tr></thead><tbody><tr><td>.dtl</td>
+<td>templates/</td>
+<td>Django templates</td>
+<td>ebin/*.beam</td>
</tr>
-</tbody>
-</table>
-</div>
-<div class="paragraph"><p>Files are always searched recursively.</p></div>
-<div class="paragraph"><p>The build is ordered, so that files that generate Erlang source
-files are run before, and the resulting Erlang source files are
-then built normally.</p></div>
-<div class="paragraph"><p>In addition, Erlang.mk keeps track of header files (<code>.hrl</code>)
-as described at the end of this chapter. It can also compile
-C code, as described in the <a href="../ports">NIFs and port drivers</a>
-chapter.</p></div>
-<div class="paragraph"><p>Erlang.mk also comes with plugins for the following formats:</p></div>
-<div class="tableblock">
-<table rules="all"
-width="100%"
-frame="border"
-cellspacing="0" cellpadding="4">
-<col width="25%" />
-<col width="25%" />
-<col width="25%" />
-<col width="25%" />
-<thead>
-<tr>
-<th align="left" valign="top"> Extension </th>
-<th align="center" valign="top"> Location </th>
-<th align="center" valign="top"> Description </th>
-<th align="center" valign="top"> Output</th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td align="left" valign="top"><p class="table">.dtl</p></td>
-<td align="center" valign="top"><p class="table">templates/</p></td>
-<td align="center" valign="top"><p class="table">Django templates</p></td>
-<td align="center" valign="top"><p class="table">ebin/*.beam</p></td>
+<tr><td>.proto</td>
+<td>src/</td>
+<td>Protocol buffers</td>
+<td>ebin/*.beam</td>
</tr>
-<tr>
-<td align="left" valign="top"><p class="table">.proto</p></td>
-<td align="center" valign="top"><p class="table">src/</p></td>
-<td align="center" valign="top"><p class="table">Protocol buffers</p></td>
-<td align="center" valign="top"><p class="table">ebin/*.beam</p></td>
-</tr>
-</tbody>
-</table>
-</div>
-</div>
-</div>
-<div class="sect1">
+</tbody></table>
<h2 id="_compilation_options">Compilation options</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Erlang.mk provides a few variables that you can use to customize
-the build process and the resulting files.</p></div>
-<div class="sect3">
+<p>Erlang.mk provides a few variables that you can use to customize the build process and the resulting files.</p>
<h4 id="_erlc_opts">ERLC_OPTS</h4>
-<div class="paragraph"><p><code>ERLC_OPTS</code> can be used to pass some options to <code>erlc</code>, the Erlang
-compiler. Erlang.mk does not restrict any option. Please refer to
-the <a href="http://www.erlang.org/doc/man/erlc.html">erlc Manual</a> for the
-full list.</p></div>
-<div class="paragraph"><p>By default, Erlang.mk will set the following options:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p><code>ERLC_OPTS</code> can be used to pass some options to <code>erlc</code>, the Erlang compiler. Erlang.mk does not restrict any option. Please refer to the <a href="http://www.erlang.org/doc/man/erlc.html">erlc Manual</a> for the full list.</p>
+<p>By default, Erlang.mk will set the following options:</p>
+<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">ERLC_OPTS =</span> -Werror <span style="color: #990000">+</span>debug_info <span style="color: #990000">+</span>warn_export_vars <span style="color: #990000">+</span>warn_shadow_vars <span style="color: #990000">+</span>warn_obsolete_guard</tt></pre></div></div>
-<div class="paragraph"><p>In other words: warnings as errors, debug info (recommended) and
-enable warnings for exported variables, shadow variables and
-obsolete guard functions.</p></div>
-<div class="paragraph"><p>You can redefine this variable in your Makefile to change it
-completely, either before or after including Erlang.mk:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">ERLC_OPTS =</font> -Werror <font color="#990000">+</font>debug_info <font color="#990000">+</font>warn_export_vars <font color="#990000">+</font>warn_shadow_vars <font color="#990000">+</font>warn_obsolete_guard</tt></pre>
+</div></div>
+<p>In other words: warnings as errors, debug info (recommended) and enable warnings for exported variables, shadow variables and obsolete guard functions.</p>
+<p>You can redefine this variable in your Makefile to change it completely, either before or after including Erlang.mk:</p>
+<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">ERLC_OPTS =</span> <span style="color: #990000">+</span>debug_info</tt></pre></div></div>
-<div class="paragraph"><p>You can also filter out some options from the defaults Erlang.mk
-sets, by defining ERLC_OPTS after including Erlang.mk using the
-<code>:=</code> operator.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">ERLC_OPTS =</font> <font color="#990000">+</font>debug_info</tt></pre>
+</div></div>
+<p>You can also filter out some options from the defaults Erlang.mk sets, by defining ERLC_OPTS after including Erlang.mk using the <code>:=</code> operator.</p>
+<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>include erlang.mk
-<span style="color: #990000">ERLC_OPTS :=</span> <span style="color: #009900">$(</span>filter-out -Werror<span style="color: #990000">,</span><span style="color: #009900">$(ERLC_OPTS))</span></tt></pre></div></div>
-</div>
-<div class="sect3">
+<font color="#990000">ERLC_OPTS :=</font> <font color="#009900">$(</font>filter-out -Werror<font color="#990000">,</font><font color="#009900">$(ERLC_OPTS))</font></tt></pre>
+</div></div>
<h4 id="_erlc_asn1_opts">ERLC_ASN1_OPTS</h4>
-<div class="paragraph"><p><code>ERLC_ASN1_OPTS</code> can be used to pass compiler options when compiling
-ASN.1 files. Please refer to the
-<a href="http://erlang.org/doc/man/asn1ct.html">asn1ct manual</a> for the full list.</p></div>
-<div class="paragraph"><p>By default, Erlang.mk will leave this empty.</p></div>
-<div class="paragraph"><p>You can redefine this variable in your Makefile.
-Please see the <code>ERLC_OPTS</code> section for instructions.</p></div>
-</div>
-<div class="sect3">
+<p><code>ERLC_ASN1_OPTS</code> can be used to pass compiler options when compiling ASN.1 files. Please refer to the <a href="http://erlang.org/doc/man/asn1ct.html">asn1ct manual</a> for the full list.</p>
+<p>By default, Erlang.mk will leave this empty.</p>
+<p>You can redefine this variable in your Makefile. Please see the <code>ERLC_OPTS</code> section for instructions.</p>
<h4 id="_erlc_exclude">ERLC_EXCLUDE</h4>
-<div class="paragraph"><p><code>ERLC_EXCLUDE</code> can be used to exclude some modules from the
-compilation. It&#8217;s there for handling special cases, you should
-not normally need it.</p></div>
-<div class="paragraph"><p>To exclude a module, simply list it in the variable, either
-before or after including Erlang.mk:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p><code>ERLC_EXCLUDE</code> can be used to exclude some modules from the compilation. It&apos;s there for handling special cases, you should not normally need it.</p>
+<p>To exclude a module, simply list it in the variable, either before or after including Erlang.mk:</p>
+<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">ERLC_EXCLUDE =</span> cowboy_http2</tt></pre></div></div>
-</div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">ERLC_EXCLUDE =</font> cowboy_http2</tt></pre>
+</div></div>
<h2 id="_cold_and_hot_builds">Cold and hot builds</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The first time you run <code>make</code>, Erlang.mk will build everything.</p></div>
-<div class="paragraph"><p>The second time you run <code>make</code>, and all subsequent times, Erlang.mk
-will only rebuild what changed. Erlang.mk has been optimized for
-this use case, as it is the most common during development.</p></div>
-<div class="paragraph"><p>Erlang.mk figures out what changed by using the dependency tracking
-feature of Make. Make automatically rebuilds a target if one of its
-dependency has changed (for example if a header file has changed,
-all the source files that include it will be rebuilt), and Erlang.mk
-leverages this feature to cut down on rebuild times.</p></div>
-<div class="paragraph"><p>Note that this applies only to building; some other features of
-Erlang.mk will run every time they are called regardless of files
-changed.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The first time you run <code>make</code>, Erlang.mk will build everything.</p>
+<p>The second time you run <code>make</code>, and all subsequent times, Erlang.mk will only rebuild what changed. Erlang.mk has been optimized for this use case, as it is the most common during development.</p>
+<p>Erlang.mk figures out what changed by using the dependency tracking feature of Make. Make automatically rebuilds a target if one of its dependency has changed (for example if a header file has changed, all the source files that include it will be rebuilt), and Erlang.mk leverages this feature to cut down on rebuild times.</p>
+<p>Note that this applies only to building; some other features of Erlang.mk will run every time they are called regardless of files changed.</p>
<h2 id="_dependency_tracking">Dependency tracking</h2>
-<div class="sectionbody">
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<div class="title">Note</div>
-</td>
-<td class="content">This section is about the dependency tracking between files
-inside your project, not application dependencies.</td>
-</tr></table>
-</div>
-<div class="paragraph"><p>Erlang.mk keeps track of the dependencies between the different
-files in your project. This information is kept in the <em>$(PROJECT).d</em>
-file in your directory. It is generated if missing, and will be
-generated again after every file change, by default.</p></div>
-<div class="paragraph"><p>Dependency tracking is what allows Erlang.mk to know when to
-rebuild Erlang files when header files, behaviors or parse
-transforms have changed. Erlang.mk also automatically keeps
-track of which files should be compiled first, for example
-when you have behaviors used by other modules in your project.</p></div>
-<div class="paragraph"><p>If your project is stable, you may want to disable generating
-the dependency tracking file every time you compile. You can
-do this by adding the following line to your <em>Makefile</em>:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>NOTE: This section is about the dependency tracking between files inside your project, not application dependencies.</p>
+<p>Erlang.mk keeps track of the dependencies between the different files in your project. This information is kept in the <em>$(PROJECT).d</em> file in your directory. It is generated if missing, and will be generated again after every file change, by default.</p>
+<p>Dependency tracking is what allows Erlang.mk to know when to rebuild Erlang files when header files, behaviors or parse transforms have changed. Erlang.mk also automatically keeps track of which files should be compiled first, for example when you have behaviors used by other modules in your project.</p>
+<p>If your project is stable, you may want to disable generating the dependency tracking file every time you compile. You can do this by adding the following line to your <em>Makefile</em>:</p>
+<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>NO_MAKEDEP <span style="color: #990000">?=</span> <span style="color: #993399">1</span></tt></pre></div></div>
-<div class="paragraph"><p>As you can see, the snippet above uses <code>?=</code> instead of a
-simple equal sign. This is to allow you to temporarily override
-this value when you do make substantial changes to your project
-(including a new header file, new module with dependencies, etc.)
-and want to rebuild the dependency tracking file. You&#8217;ll be
-able to use the following command:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>NO_MAKEDEP <font color="#990000">?=</font> <font color="#993399">1</font></tt></pre>
+</div></div>
+<p>As you can see, the snippet above uses <code>?=</code> instead of a simple equal sign. This is to allow you to temporarily override this value when you do make substantial changes to your project (including a new header file, new module with dependencies, etc.) and want to rebuild the dependency tracking file. You&apos;ll be able to use the following command:</p>
+<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">NO_MAKEDEP</span><span style="color: #990000">=</span> make</tt></pre></div></div>
-<div class="paragraph"><p>Otherwise, <code>make clean app</code> will of course force the
-recompilation of your project.</p></div>
-<div class="paragraph"><p>Erlang.mk can also keep track of the source files generated
-by other means, for example if you generate code from a data
-file in your repository.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>$ <font color="#009900">NO_MAKEDEP</font><font color="#990000">=</font> make</tt></pre>
+</div></div>
+<p>Otherwise, <code>make clean app</code> will of course force the recompilation of your project.</p>
+<p>Erlang.mk can also keep track of the source files generated by other means, for example if you generate code from a data file in your repository.</p>
<h2 id="_generating_erlang_source">Generating Erlang source</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Erlang.mk provides hooks at different stages of the build process.
-When your goal is to generate Erlang source files, you can
-add your own rules before or after the dependency tracking
-file is generated. To do this, you would add your hook before
-or after including the <em>erlang.mk</em> file.</p></div>
-<div class="paragraph"><p>The easiest way is after:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Erlang.mk provides hooks at different stages of the build process. When your goal is to generate Erlang source files, you can add your own rules before or after the dependency tracking file is generated. To do this, you would add your hook before or after including the <em>erlang.mk</em> file.</p>
+<p>The easiest way is after:</p>
+<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">PROJECT =</span> example
+<pre><tt><font color="#009900">PROJECT =</font> example
include erlang.mk
-<span style="color: #009900">$(PROJECT)</span>.d<span style="color: #990000">::</span> src/generated_mod.erl
-
-src/generated_mod.erl<span style="color: #990000">::</span> gen-mod.sh
- <span style="color: #009900">$(gen_verbose)</span> <span style="color: #990000">.</span>/gen-mod.sh <span style="color: #009900">$@</span></tt></pre></div></div>
-<div class="paragraph"><p>In this case we use <code>$(gen_verbose)</code> to hide the details of
-the build by default. Erlang.mk will simply say what file
-is it currently generating.</p></div>
-<div class="paragraph"><p>When using an external script to generate the Erlang source
-file, it is recommended to depend on that script, so that
-the source file gets generated again when the script gets
-modified.</p></div>
-<div class="paragraph"><p>If for whatever reason you prefer to hook before including
-Erlang.mk, don&#8217;t forget to set the <code>.DEFAULT_GOAL</code> variable,
-otherwise nothing will get built:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<font color="#009900">$(PROJECT)</font>.d<font color="#990000">::</font> src/generated_mod.erl
+
+src/generated_mod.erl<font color="#990000">::</font> gen-mod.sh
+ <font color="#009900">$(gen_verbose)</font> <font color="#990000">.</font>/gen-mod.sh <font color="#009900">$@</font></tt></pre>
+</div></div>
+<p>In this case we use <code>$(gen_verbose)</code> to hide the details of the build by default. Erlang.mk will simply say what file is it currently generating.</p>
+<p>When using an external script to generate the Erlang source file, it is recommended to depend on that script, so that the source file gets generated again when the script gets modified.</p>
+<p>If for whatever reason you prefer to hook before including Erlang.mk, don&apos;t forget to set the <code>.DEFAULT_GOAL</code> variable, otherwise nothing will get built:</p>
+<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">PROJECT =</span> example
+<pre><tt><font color="#009900">PROJECT =</font> example
-.DEFAULT_GOAL <span style="color: #990000">=</span> all
+.DEFAULT_GOAL <font color="#990000">=</font> all
-<span style="color: #009900">$(PROJECT)</span>.d<span style="color: #990000">::</span> src/generated_mod.erl
+<font color="#009900">$(PROJECT)</font>.d<font color="#990000">::</font> src/generated_mod.erl
include erlang.mk
-src/generated_mod.erl<span style="color: #990000">::</span> gen-mod.sh
- <span style="color: #009900">$(gen_verbose)</span> <span style="color: #990000">.</span>/gen-mod.sh <span style="color: #009900">$@</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+src/generated_mod.erl<font color="#990000">::</font> gen-mod.sh
+ <font color="#009900">$(gen_verbose)</font> <font color="#990000">.</font>/gen-mod.sh <font color="#009900">$@</font></tt></pre>
+</div></div>
<h2 id="_cleaning">Cleaning</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Building typically involves creating a lot of new files. Some
-are reused in rebuilds, some are simply replaced. All can be
-removed safely.</p></div>
-<div class="paragraph"><p>Erlang.mk provides two commands to remove them: <code>clean</code> and
-<code>distclean</code>. <code>clean</code> removes all the intermediate files that
-were created as a result of building, including the BEAM files,
-the dependency tracking file and the generated documentation.
-<code>distclean</code> removes these and more, including the downloaded
-dependencies, Dialyzer&#8217;s PLT file and the generated release,
-putting your directory back to the state it was before you
-started working on it.</p></div>
-<div class="paragraph"><p>To clean:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Building typically involves creating a lot of new files. Some are reused in rebuilds, some are simply replaced. All can be removed safely.</p>
+<p>Erlang.mk provides two commands to remove them: <code>clean</code> and <code>distclean</code>. <code>clean</code> removes all the intermediate files that were created as a result of building, including the BEAM files, the dependency tracking file and the generated documentation. <code>distclean</code> removes these and more, including the downloaded dependencies, Dialyzer&apos;s PLT file and the generated release, putting your directory back to the state it was before you started working on it.</p>
+<p>To clean:</p>
+<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 clean</tt></pre></div></div>
-<div class="paragraph"><p>Or distclean:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>$ make clean</tt></pre>
+</div></div>
+<p>Or distclean:</p>
+<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 distclean</tt></pre></div></div>
-<div class="paragraph"><p>That is the question.</p></div>
-<div class="paragraph"><p>Note that Erlang.mk will automatically clean some files as
-part of other targets, but it will never run <code>distclean</code> if
-you don&#8217;t explicitly use it.</p></div>
-</div>
-</div>
+<pre><tt>$ make distclean</tt></pre>
+</div></div>
+<p>That is the question.</p>
+<p>Note that Erlang.mk will automatically clean some files as part of other targets, but it will never run <code>distclean</code> if you don&apos;t explicitly use it.</p>
+
diff --git a/docs/en/erlang.mk/1/guide/asciidoc/index.html b/docs/en/erlang.mk/1/guide/asciidoc/index.html
index bb13a400..530c81cc 100644
--- a/docs/en/erlang.mk/1/guide/asciidoc/index.html
+++ b/docs/en/erlang.mk/1/guide/asciidoc/index.html
@@ -62,100 +62,63 @@
<h1 class="lined-header"><span>AsciiDoc documentation</span></h1>
-<div class="paragraph"><p>Erlang.mk provides rules for generating documentation from
-AsciiDoc files. It can automatically build a user guide PDF,
-chunked HTML documentation and Unix manual pages.</p></div>
-<div class="sect1">
+<p>Erlang.mk provides rules for generating documentation from AsciiDoc files. It can automatically build a user guide PDF, chunked HTML documentation and Unix manual pages.</p>
<h2 id="_requirements">Requirements</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>It is necessary to have <a href="http://asciidoc.org/">AsciiDoc</a>,
-<a href="http://xmlsoft.org/XSLT/xsltproc2.html">xsltproc</a> and
-<a href="http://dblatex.sourceforge.net/">dblatex</a> installed on your
-system for Erlang.mk to generate documentation from AsciiDoc sources.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>It is necessary to have <a href="http://asciidoc.org/">AsciiDoc</a>, <a href="http://xmlsoft.org/XSLT/xsltproc2.html">xsltproc</a> and <a href="http://dblatex.sourceforge.net/">dblatex</a> installed on your system for Erlang.mk to generate documentation from AsciiDoc sources.</p>
<h2 id="_writing_asciidoc_documentation">Writing AsciiDoc documentation</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="http://asciidoc.org/">AsciiDoc</a> is a text document format for
-writing notes, documentation, articles, books, ebooks, slideshows,
-web pages, man pages and blogs. AsciiDoc files can be translated
-to many formats including HTML, PDF, EPUB, man page.</p></div>
-<div class="paragraph"><p>The <a href="http://asciidoc.org/userguide.html">AsciiDoc user guide</a>
-describes the AsciiDoc syntax.</p></div>
-<div class="paragraph"><p>The <a href="https://github.com/ninenines/erlang.mk/tree/master/doc/src/guide">Erlang.mk user guide</a>
-is written in AsciiDoc and can be used as an example. The entry
-file is <a href="https://github.com/ninenines/erlang.mk/blob/master/doc/src/guide/book.asciidoc">book.asciidoc</a>.</p></div>
-<div class="paragraph"><p>Erlang.mk expects you to put your documentation in a specific
-location. This is <em>doc/src/guide/</em> for the user guide, and
-<em>doc/src/manual/</em> for the function reference. In the case of
-the user guide, the entry point is always <em>doc/src/guide/book.asciidoc</em>.</p></div>
-<div class="paragraph"><p>For manual pages, it is good practice to use section 3 for
-modules, and section 7 for the application itself.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p><a href="http://asciidoc.org/">AsciiDoc</a> is a text document format for writing notes, documentation, articles, books, ebooks, slideshows, web pages, man pages and blogs. AsciiDoc files can be translated to many formats including HTML, PDF, EPUB, man page.</p>
+<p>The <a href="http://asciidoc.org/userguide.html">AsciiDoc user guide</a> describes the AsciiDoc syntax.</p>
+<p>The <a href="https://github.com/ninenines/erlang.mk/tree/master/doc/src/guide">Erlang.mk user guide</a> is written in AsciiDoc and can be used as an example. The entry file is <a href="https://github.com/ninenines/erlang.mk/blob/master/doc/src/guide/book.asciidoc">book.asciidoc</a>.</p>
+<p>Erlang.mk expects you to put your documentation in a specific location. This is <em>doc/src/guide/</em> for the user guide, and <em>doc/src/manual/</em> for the function reference. In the case of the user guide, the entry point is always <em>doc/src/guide/book.asciidoc</em>.</p>
+<p>For manual pages, it is good practice to use section 3 for modules, and section 7 for the application itself.</p>
<h2 id="_configuration">Configuration</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>All of the AsciiDoc related configuration can be done directly
-inside the files themselves.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>All of the AsciiDoc related configuration can be done directly inside the files themselves.</p>
<h2 id="_usage">Usage</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>To build all documentation:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>To build all documentation:</p>
+<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 docs</tt></pre></div></div>
-<div class="paragraph"><p>To build only the AsciiDoc documentation:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>$ make docs</tt></pre>
+</div></div>
+<p>To build only the AsciiDoc documentation:</p>
+<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 asciidoc</tt></pre></div></div>
-<div class="paragraph"><p>To build only the user guide:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>$ make asciidoc</tt></pre>
+</div></div>
+<p>To build only the user guide:</p>
+<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 asciidoc-guide</tt></pre></div></div>
-<div class="paragraph"><p>To build only the manual:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>$ make asciidoc-guide</tt></pre>
+</div></div>
+<p>To build only the manual:</p>
+<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 asciidoc-manual</tt></pre></div></div>
-<div class="paragraph"><p>To install man pages on Unix:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>$ make asciidoc-manual</tt></pre>
+</div></div>
+<p>To install man pages on Unix:</p>
+<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 install-docs</tt></pre></div></div>
-<div class="paragraph"><p>Erlang.mk allows customizing the installation path and sections
-of the man pages to be installed. The <code>MAN_INSTALL_PATH</code> variable
-defines where man pages will be installed. It defaults to
-<em>/usr/local/share/man</em>. The <code>MAN_SECTIONS</code> variable defines
-which manual sections are to be installed. It defaults to <code>3 7</code>.</p></div>
-<div class="paragraph"><p>To install man pages to a custom location:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>$ make install-docs</tt></pre>
+</div></div>
+<p>Erlang.mk allows customizing the installation path and sections of the man pages to be installed. The <code>MAN_INSTALL_PATH</code> variable defines where man pages will be installed. It defaults to <em>/usr/local/share/man</em>. The <code>MAN_SECTIONS</code> variable defines which manual sections are to be installed. It defaults to <code>3 7</code>.</p>
+<p>To install man pages to a custom location:</p>
+<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 install-docs <span style="color: #009900">MAN_INSTALL_PATH</span><span style="color: #990000">=</span>/opt/share/man</tt></pre></div></div>
-<div class="paragraph"><p>Note that you may need to run the install commands using
-<code>sudo</code> or equivalent if the location is not writeable by
-your user.</p></div>
-</div>
-</div>
+<pre><tt>$ make install-docs <font color="#009900">MAN_INSTALL_PATH</font><font color="#990000">=</font>/opt/share/man</tt></pre>
+</div></div>
+<p>Note that you may need to run the install commands using <code>sudo</code> or equivalent if the location is not writeable by your user.</p>
+
diff --git a/docs/en/erlang.mk/1/guide/ci/index.html b/docs/en/erlang.mk/1/guide/ci/index.html
index cacdb813..c5cd6e97 100644
--- a/docs/en/erlang.mk/1/guide/ci/index.html
+++ b/docs/en/erlang.mk/1/guide/ci/index.html
@@ -62,80 +62,51 @@
<h1 class="lined-header"><span>Continuous integration</span></h1>
-<div class="paragraph"><p>Erlang.mk comes with some support for continuous integration,
-aimed at open source projects that need to support more than
-one specific Erlang/OTP release. (If you target one specific
-release, check the <a href="../otp_version_pinning">OTP version pinning</a>
-section of the <a href="../kerl">OTP version management</a> chapter.)</p></div>
-<div class="sect1">
+<p>Erlang.mk comes with some support for continuous integration, aimed at open source projects that need to support more than one specific Erlang/OTP release. (If you target one specific release, check the <a href="../otp_version_pinning">OTP version pinning</a> section of the <a href="../kerl">OTP version management</a> chapter.)</p>
<h2 id="_configuring_erlang_otp_versions_to_test">Configuring Erlang/OTP versions to test</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>To use the CI plugin you must first configure which versions
-of Erlang/OTP will be used. Erlang.mk provides three separate
-configuration variables depending on whether you need a normal
-OTP release, a HiPE-enabled release or an ErLLVM-enabled release.</p></div>
-<div class="paragraph"><p>At the time of writing, this is how you would test against all
-the most recent patch releases of Erlang/OTP 19 and above:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>To use the CI plugin you must first configure which versions of Erlang/OTP will be used. Erlang.mk provides three separate configuration variables depending on whether you need a normal OTP release, a HiPE-enabled release or an ErLLVM-enabled release.</p>
+<p>At the time of writing, this is how you would test against all the most recent patch releases of Erlang/OTP 19 and above:</p>
+<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">CI_OTP =</span> OTP-19.0.7 OTP-19.1.6 OTP-19.2.3 OTP-19.3.6.2 OTP-20.0.4</tt></pre></div></div>
-<div class="paragraph"><p>If you want to test against HiPE and ErLLVM but only with the
-latest version of Erlang/OTP, the following could work:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">CI_OTP =</font> OTP-19.0.7 OTP-19.1.6 OTP-19.2.3 OTP-19.3.6.2 OTP-20.0.4</tt></pre>
+</div></div>
+<p>If you want to test against HiPE and ErLLVM but only with the latest version of Erlang/OTP, the following could work:</p>
+<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">CI_HIPE =</span> <span style="color: #009900">$(</span>lastword <span style="color: #009900">$(CI_OTP))</span>
-<span style="color: #009900">CI_ERLLVM =</span> <span style="color: #009900">$(CI_HIPE)</span></tt></pre></div></div>
-<div class="paragraph"><p>Consult the <a href="../kerl">OTP version management</a> chapter for more
-information about Erlang/OTP versions and customization of the
-Erlang/OTP builds.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">CI_HIPE =</font> <font color="#009900">$(</font>lastword <font color="#009900">$(CI_OTP))</font>
+<font color="#009900">CI_ERLLVM =</font> <font color="#009900">$(CI_HIPE)</font></tt></pre>
+</div></div>
+<p>Consult the <a href="../kerl">OTP version management</a> chapter for more information about Erlang/OTP versions and customization of the Erlang/OTP builds.</p>
<h2 id="_running_tests_across_all_configured_versions">Running tests across all configured versions</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The recommended way to run the <code>ci</code> target is with the option
-<code>-k</code>. It will ensure that tests are run for all configured
-Erlang/OTP versions, even if there are errors:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The recommended way to run the <code>ci</code> target is with the option <code>-k</code>. It will ensure that tests are run for all configured Erlang/OTP versions, even if there are errors:</p>
+<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 ci -k</tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>$ make ci -k</tt></pre>
+</div></div>
<h2 id="_extending_the_ci_targets">Extending the CI targets</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <code>ci</code> target can be extended. For example to run Dialyzer
-at the end of CI:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The <code>ci</code> target can be extended. For example to run Dialyzer at the end of CI:</p>
+<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">ci::</span> dialyze</tt></pre></div></div>
-<div class="paragraph"><p>Additional setup can be done by extending the <code>ci-setup</code>
-target. This target is ran before testing each individual
-Erlang/OTP version.</p></div>
-<div class="paragraph"><p>For example, to ensure dependencies are re-fetched/built
-before testing individual Erlang/OTP releases:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#990000">ci::</font> dialyze</tt></pre>
+</div></div>
+<p>Additional setup can be done by extending the <code>ci-setup</code> target. This target is ran before testing each individual Erlang/OTP version.</p>
+<p>For example, to ensure dependencies are re-fetched/built before testing individual Erlang/OTP releases:</p>
+<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">ci-setup::</span> distclean</tt></pre></div></div>
-<div class="paragraph"><p>Similarly, the <code>ci-extra</code> target can be extended to run
-extra commands after an Erlang/OTP version has been tested.</p></div>
-</div>
-</div>
+<pre><tt><font color="#990000">ci-setup::</font> distclean</tt></pre>
+</div></div>
+<p>Similarly, the <code>ci-extra</code> target can be extended to run extra commands after an Erlang/OTP version has been tested.</p>
+
diff --git a/docs/en/erlang.mk/1/guide/common_test/index.html b/docs/en/erlang.mk/1/guide/common_test/index.html
index f6430831..a5af0283 100644
--- a/docs/en/erlang.mk/1/guide/common_test/index.html
+++ b/docs/en/erlang.mk/1/guide/common_test/index.html
@@ -62,127 +62,92 @@
<h1 class="lined-header"><span>Common Test</span></h1>
-<div class="paragraph"><p>Common Test is Erlang&#8217;s functional testing framework.
-Erlang.mk automates the discovery and running of Common
-Test suites.</p></div>
-<div class="sect1">
+<p>Common Test is Erlang&apos;s functional testing framework. Erlang.mk automates the discovery and running of Common Test suites.</p>
<h2 id="_writing_tests">Writing tests</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <a href="http://www.erlang.org/doc/apps/common_test/write_test_chapter.html">Common Test user guide</a>
-is the best place to learn how to write tests. Erlang.mk
-requires that file names for test suites end with <em>_SUITE.erl</em>
-and that the files be located in the <em>$(TEST_DIR)</em> directory.
-This defaults to <em>test/</em>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The <a href="http://www.erlang.org/doc/apps/common_test/write_test_chapter.html">Common Test user guide</a> is the best place to learn how to write tests. Erlang.mk requires that file names for test suites end with <em>_SUITE.erl</em> and that the files be located in the <em>$(TEST_DIR)</em> directory. This defaults to <em>test/</em>.</p>
<h2 id="_configuration">Configuration</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <code>CT_OPTS</code> variable allows you to set extra Common Test
-options. Options are documented in the
-<a href="http://www.erlang.org/doc/apps/common_test/run_test_chapter.html">Common Test user guide</a>.
-You can use it to set Common Test hooks, for example:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The <code>CT_OPTS</code> variable allows you to set extra Common Test options. Options are documented in the <a href="http://www.erlang.org/doc/apps/common_test/run_test_chapter.html">Common Test user guide</a>. You can use it to set Common Test hooks, for example:</p>
+<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">CT_OPTS =</span> -ct_hooks cowboy_ct_hook</tt></pre></div></div>
-<div class="paragraph"><p>The <code>CT_SUITES</code> variable can be used to override what
-Common Test suites Erlang.mk will be aware of. It does
-not normally need to be set as Erlang.mk will find the
-test suites automatically.</p></div>
-<div class="paragraph"><p>The name of the suite is the part before <code>_SUITE.erl</code>.
-If the file is named <em>http_SUITE.erl</em>, the test suite
-is <code>http</code>:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">CT_OPTS =</font> -ct_hooks cowboy_ct_hook</tt></pre>
+</div></div>
+<p>The <code>CT_SUITES</code> variable can be used to override what Common Test suites Erlang.mk will be aware of. It does not normally need to be set as Erlang.mk will find the test suites automatically.</p>
+<p>The name of the suite is the part before <code>_SUITE.erl</code>. If the file is named <em>http_SUITE.erl</em>, the test suite is <code>http</code>:</p>
+<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">CT_SUITES =</span> http ws</tt></pre></div></div>
-<div class="paragraph"><p>The <code>CT_LOGS_DIR</code> variable can be used to set where HTML
-log files are to be written. This defaults to <em>logs/</em>.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">CT_SUITES =</font> http ws</tt></pre>
+</div></div>
+<p>The <code>CT_LOGS_DIR</code> variable can be used to set where HTML log files are to be written. This defaults to <em>logs/</em>.</p>
+<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">CT_LOGS_DIR =</span> ct_output_log_dir</tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">CT_LOGS_DIR =</font> ct_output_log_dir</tt></pre>
+</div></div>
<h2 id="_usage">Usage</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>To run all tests (including Common Test):</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>To run all tests (including Common Test):</p>
+<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 tests</tt></pre></div></div>
-<div class="paragraph"><p>To run all tests and static checks (including Common Test):</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>$ make tests</tt></pre>
+</div></div>
+<p>To run all tests and static checks (including Common Test):</p>
+<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 check</tt></pre></div></div>
-<div class="paragraph"><p>You can also run Common Test separately:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>$ make check</tt></pre>
+</div></div>
+<p>You can also run Common Test separately:</p>
+<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 ct</tt></pre></div></div>
-<div class="paragraph"><p>Erlang.mk will create targets for all test suites it finds.
-If you have a file named <em>test/http_SUITE.erl</em>, then the
-target <code>ct-http</code> will run that specific test suite:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>$ make ct</tt></pre>
+</div></div>
+<p>Erlang.mk will create targets for all test suites it finds. If you have a file named <em>test/http_SUITE.erl</em>, then the target <code>ct-http</code> will run that specific test suite:</p>
+<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 ct-http</tt></pre></div></div>
-<div class="paragraph"><p>Erlang.mk provides a convenient way to run a specific
-group or a specific test case within a specific group,
-using the variable <code>t</code>. Note that this only applies to
-suite-specific targets, like the <code>ct-http</code> example above.</p></div>
-<div class="paragraph"><p>To run all tests from the <code>http_compress</code> group in the
-<code>http_SUITE</code> test suite, write:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>$ make ct-http</tt></pre>
+</div></div>
+<p>Erlang.mk provides a convenient way to run a specific group or a specific test case within a specific group, using the variable <code>t</code>. Note that this only applies to suite-specific targets, like the <code>ct-http</code> example above.</p>
+<p>To run all tests from the <code>http_compress</code> group in the <code>http_SUITE</code> test suite, write:</p>
+<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 ct-http <span style="color: #009900">t</span><span style="color: #990000">=</span>http_compress</tt></pre></div></div>
-<div class="paragraph"><p>Similarly, to run a specific test case in that group:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>$ make ct-http <font color="#009900">t</font><font color="#990000">=</font>http_compress</tt></pre>
+</div></div>
+<p>Similarly, to run a specific test case in that group:</p>
+<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 ct-http <span style="color: #009900">t</span><span style="color: #990000">=</span>http_compress<span style="color: #990000">:</span>headers_dupe</tt></pre></div></div>
-<div class="paragraph"><p>To do the same against a multi-application repository,
-you can use the <code>-C</code> option:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>$ make ct-http <font color="#009900">t</font><font color="#990000">=</font>http_compress<font color="#990000">:</font>headers_dupe</tt></pre>
+</div></div>
+<p>To do the same against a multi-application repository, you can use the <code>-C</code> option:</p>
+<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 -C apps/my_app ct-http <span style="color: #009900">t</span><span style="color: #990000">=</span>my_group<span style="color: #990000">:</span>my_case</tt></pre></div></div>
-<div class="paragraph"><p>Note that this also applies to dependencies. When using Cowboy
-as a dependency, you can run the following directly:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>$ make -C apps/my_app ct-http <font color="#009900">t</font><font color="#990000">=</font>my_group<font color="#990000">:</font>my_case</tt></pre>
+</div></div>
+<p>Note that this also applies to dependencies. When using Cowboy as a dependency, you can run the following directly:</p>
+<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 -C deps/cowboy ct-http <span style="color: #009900">t</span><span style="color: #990000">=</span>http_compress</tt></pre></div></div>
-<div class="paragraph"><p>Finally, <a href="../coverage">code coverage</a> is available,
-but covered in its own chapter.</p></div>
-</div>
-</div>
+<pre><tt>$ make -C deps/cowboy ct-http <font color="#009900">t</font><font color="#990000">=</font>http_compress</tt></pre>
+</div></div>
+<p>Finally, <a href="../coverage">code coverage</a> is available, but covered in its own chapter.</p>
+
diff --git a/docs/en/erlang.mk/1/guide/compat/index.html b/docs/en/erlang.mk/1/guide/compat/index.html
index 56ec41dc..a4420e66 100644
--- a/docs/en/erlang.mk/1/guide/compat/index.html
+++ b/docs/en/erlang.mk/1/guide/compat/index.html
@@ -62,90 +62,39 @@
<h1 class="lined-header"><span>Compatibility with other build tools</span></h1>
-<div class="paragraph"><p>Erlang.mk tries its best to be compatible with the other Erlang
-build tools. It can use dependencies written with other build
-tools in mind, and can also make your projects usable by those
-build tools as well. Erlang.mk is like the cool kid that gets
-along with everybody.</p></div>
-<div class="paragraph"><p>In this chapter I will use the term <em>Rebar project</em> to refer
-to a project built using Rebar 2, Rebar 3 or Mad. These three
-build tools are very similar and share the same configuration
-file.</p></div>
-<div class="sect1">
+<p>Erlang.mk tries its best to be compatible with the other Erlang build tools. It can use dependencies written with other build tools in mind, and can also make your projects usable by those build tools as well. Erlang.mk is like the cool kid that gets along with everybody.</p>
+<p>In this chapter I will use the term <em>Rebar project</em> to refer to a project built using Rebar 2, Rebar 3 or Mad. These three build tools are very similar and share the same configuration file.</p>
<h2 id="_rebar_projects_as_erlang_mk_dependencies">Rebar projects as Erlang.mk dependencies</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Erlang.mk comes with a feature called <em>Autoload</em> which will
-use Rebar 2 to patch any Rebar project and make it compatible
-with Erlang.mk. This feature essentially patches Rebar out
-and adds a Makefile to the project that Erlang.mk can then
-use for building:</p></div>
-<div class="paragraph"><p><em>Autoload</em> is documented in more details in the
-<a href="../deps">Packages and dependencies</a> chapter.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Erlang.mk comes with a feature called <em>Autoload</em> which will use Rebar 2 to patch any Rebar project and make it compatible with Erlang.mk. This feature essentially patches Rebar out and adds a Makefile to the project that Erlang.mk can then use for building:</p>
+<p><em>Autoload</em> is documented in more details in the <a href="../deps">Packages and dependencies</a> chapter.</p>
<h2 id="_erlang_mk_projects_as_rebar_dependencies">Erlang.mk projects as Rebar dependencies</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Erlang.mk projects can be made compatible with the Rebar family
-of build tools pretty easily, as Erlang.mk will generate
-all the files they require for building.</p></div>
-<div class="paragraph"><p>The Rebar family requires two files: a <em>rebar.config</em> file
-containing compilation options and the list of dependencies,
-and the application resource file, found either at
-<em>ebin/$(PROJECT).app</em> or at <em>src/$(PROJECT).app.src</em>.</p></div>
-<div class="sect3">
+<p>Erlang.mk projects can be made compatible with the Rebar family of build tools pretty easily, as Erlang.mk will generate all the files they require for building.</p>
+<p>The Rebar family requires two files: a <em>rebar.config</em> file containing compilation options and the list of dependencies, and the application resource file, found either at <em>ebin/$(PROJECT).app</em> or at <em>src/$(PROJECT).app.src</em>.</p>
<h4 id="_rebar_configuration">Rebar configuration</h4>
-<div class="paragraph"><p>Erlang.mk comes with a target that generates a <em>rebar.config</em>
-file when invoked:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Erlang.mk comes with a target that generates a <em>rebar.config</em> file when invoked:</p>
+<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 rebar<span style="color: #990000">.</span>config</tt></pre></div></div>
-<div class="paragraph"><p>Careful! This will build the file even if it already existed
-before.</p></div>
-<div class="paragraph"><p>To build this file, Erlang.mk uses information it finds in
-the <code>DEPS</code> and <code>ERLC_OPTS</code> variables, among others. This
-means that the Rebar family builds your project much the
-same way as Erlang.mk.</p></div>
-<div class="paragraph"><p>Careful though! Different build tools have different fetching
-strategies. If some applications provide differing dependencies,
-they might be fetched differently by other build tools. Check
-the upcoming Sanity check chapter to find out how to detect such
-issues.</p></div>
-<div class="paragraph"><p>You can automatically generate this file when you build
-your application, by making it a dependency of the <code>app</code>
-target:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>$ make rebar<font color="#990000">.</font>config</tt></pre>
+</div></div>
+<p>Careful! This will build the file even if it already existed before.</p>
+<p>To build this file, Erlang.mk uses information it finds in the <code>DEPS</code> and <code>ERLC_OPTS</code> variables, among others. This means that the Rebar family builds your project much the same way as Erlang.mk.</p>
+<!-- @todo Sanity check chapter.-->
+<p>Careful though! Different build tools have different fetching strategies. If some applications provide differing dependencies, they might be fetched differently by other build tools. Check the upcoming Sanity check chapter to find out how to detect such issues.</p>
+<p>You can automatically generate this file when you build your application, by making it a dependency of the <code>app</code> target:</p>
+<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">app::</span> rebar.config</tt></pre></div></div>
-<div class="paragraph"><p>Don&#8217;t forget to commit the file when it changes!</p></div>
-<div class="paragraph"><p>If you run into other issues, it&#8217;s probably because you use a
-feature specific to Erlang.mk, like the <code>cp</code> fetch method.
-It could also be that we forgot to handle something! Sorry.
-We are of course interested to hear about any compatibility
-problems you may have, just open a ticket!</p></div>
-</div>
-<div class="sect3">
+<pre><tt><font color="#990000">app::</font> rebar.config</tt></pre>
+</div></div>
+<p>Don&apos;t forget to commit the file when it changes!</p>
+<p>If you run into other issues, it&apos;s probably because you use a feature specific to Erlang.mk, like the <code>cp</code> fetch method. It could also be that we forgot to handle something! Sorry. We are of course interested to hear about any compatibility problems you may have, just open a ticket!</p>
<h4 id="_application_resource_file">Application resource file</h4>
-<div class="paragraph"><p>Erlang.mk has two ways to generate an application resource
-file: from the information found in the Makefile, or from
-the information found in the <em>src/$(PROJECT).app.src</em> file.
-Needless to say, if you have this file in your repository,
-then you don&#8217;t need to worry about compatibility with other
-build tools.</p></div>
-<div class="paragraph"><p>If you don&#8217;t, however, it&#8217;s not much harder. Every time
-Erlang.mk will compile your application, it will produce
-a new <em>ebin/$(PROJECT).app</em> file. Simply commit this file
-when it changes. It will only change when you modify the
-configuration, add or remove modules.</p></div>
-</div>
-</div>
-</div>
+<p>Erlang.mk has two ways to generate an application resource file: from the information found in the Makefile, or from the information found in the <em>src/$(PROJECT).app.src</em> file. Needless to say, if you have this file in your repository, then you don&apos;t need to worry about compatibility with other build tools.</p>
+<p>If you don&apos;t, however, it&apos;s not much harder. Every time Erlang.mk will compile your application, it will produce a new <em>ebin/$(PROJECT).app</em> file. Simply commit this file when it changes. It will only change when you modify the configuration, add or remove modules.</p>
+
diff --git a/docs/en/erlang.mk/1/guide/contributing/index.html b/docs/en/erlang.mk/1/guide/contributing/index.html
index 97a00e86..9ba72273 100644
--- a/docs/en/erlang.mk/1/guide/contributing/index.html
+++ b/docs/en/erlang.mk/1/guide/contributing/index.html
@@ -62,131 +62,57 @@
<h1 class="lined-header"><span>Contributing</span></h1>
-<div class="paragraph"><p>You are welcome and encouraged to contribute.</p></div>
-<div class="paragraph"><p>This is how.</p></div>
-<div class="sect1">
+<p>You are welcome and encouraged to contribute.</p>
+<p>This is how.</p>
<h2 id="_priorities">Priorities</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>From the most important to the least important:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-Bugs
-</p>
+<p>From the most important to the least important:</p>
+<ul><li>Bugs
</li>
-<li>
-<p>
-Package issues/additions
-</p>
+<li>Package issues/additions
</li>
-<li>
-<p>
-Refactoring
-</p>
+<li>Refactoring
</li>
-<li>
-<p>
-Features
-</p>
+<li>Features
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_bugs">Bugs</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>If you have found a bug, you should open a ticket. Include
-everything relevant including the command you used, output,
-a link to the code that triggers the issue, why you think
-this is a bug, etc.</p></div>
-<div class="paragraph"><p>If you think you have found a bug but you are not sure, you
-should open a ticket as previously explained.</p></div>
-<div class="paragraph"><p>If you have found a bug and you need it to be solved RIGHT
-NOW, open a ticket as previously explained.</p></div>
-<div class="paragraph"><p>Once you have opened a ticket, be patient, try to answer
-questions in a timely manner and confirm that the bug was
-indeed fixed when it is.</p></div>
-<div class="paragraph"><p>If you can&#8217;t be patient, either try to solve the bug and
-contribute the fix back or become a paying customer.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>If you have found a bug, you should open a ticket. Include everything relevant including the command you used, output, a link to the code that triggers the issue, why you think this is a bug, etc.</p>
+<p>If you think you have found a bug but you are not sure, you should open a ticket as previously explained.</p>
+<p>If you have found a bug and you need it to be solved RIGHT NOW, open a ticket as previously explained.</p>
+<p>Once you have opened a ticket, be patient, try to answer questions in a timely manner and confirm that the bug was indeed fixed when it is.</p>
+<p>If you can&apos;t be patient, either try to solve the bug and contribute the fix back or become a paying customer.</p>
<h2 id="_code">Code</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The code is located in the <em>core/*.mk</em> and <em>plugins/*.mk</em> files.
-The tests are located in the <em>test/Makefile</em> and <em>test/*.mk</em> files.</p></div>
-<div class="paragraph"><p>If you have a fix or a hack for a bug, you should open a
-pull request. Any fix should include a test case that fails
-before the fix and is working after.</p></div>
-<div class="paragraph"><p>If you have a test case that reproduces a bug, but no fix for
-it, you should open a pull request.</p></div>
-<div class="paragraph"><p>Changes need to be tested with at least the <code>make check</code>
-command. A specific test case can be tested using <code>make check c=CASE</code>
-with <code>CASE</code> the name of the target to run. Output can be
-modulated using the <code>V</code> variable, which is an integer
-from 0 to 4. A typical use would be <code>make check c=dialyzer V=3</code>.
-The value 4 is particular and shows expanded commands right
-before they are executed.</p></div>
-<div class="paragraph"><p>To run tests in parallel, use the <code>-j</code> option. It is generally
-a good idea to also use the <code>-k</code> option to run all tests even
-if one fails. For example: <code>make check -j 32 -k</code>.</p></div>
-<div class="paragraph"><p>Some changes should be tested against all packages. Continue
-reading for more details on testing them.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The code is located in the <em>core/\*.mk</em> and <em>plugins/\*.mk</em> files. The tests are located in the <em>test/Makefile</em> and <em>test/*.mk</em> files.</p>
+<p>If you have a fix or a hack for a bug, you should open a pull request. Any fix should include a test case that fails before the fix and is working after.</p>
+<p>If you have a test case that reproduces a bug, but no fix for it, you should open a pull request.</p>
+<p>Changes need to be tested with at least the <code>make check</code> command. A specific test case can be tested using <code>make check c=CASE</code> with <code>CASE</code> the name of the target to run. Output can be modulated using the <code>V</code> variable, which is an integer from 0 to 4. A typical use would be <code>make check c=dialyzer V=3</code>. The value 4 is particular and shows expanded commands right before they are executed.</p>
+<p>To run tests in parallel, use the <code>-j</code> option. It is generally a good idea to also use the <code>-k</code> option to run all tests even if one fails. For example: <code>make check -j 32 -k</code>.</p>
+<p>Some changes should be tested against all packages. Continue reading for more details on testing them.</p>
<h2 id="_packages">Packages</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>You can search existing packages using the <code>make search q=STRING</code>
-command. This can be done both from an Erlang.mk project or
-directly from the Erlang.mk repository.</p></div>
-<div class="paragraph"><p>Packages can be added to the index using the <code>pkg_add.sh</code> script.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>You can search existing packages using the <code>make search q=STRING</code> command. This can be done both from an Erlang.mk project or directly from the Erlang.mk repository.</p>
+<p>Packages can be added to the index using the <code>pkg_add.sh</code> script.</p>
+<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>$ git clone https<span style="color: #990000">:</span>//github<span style="color: #990000">.</span>com<span style="color: #990000">/</span><span style="color: #009900">$YOURUSERNAME</span>/erlang<span style="color: #990000">.</span>mk
-$ cd erlang<span style="color: #990000">.</span>mk
-$ <span style="color: #990000">.</span>/pkg_add<span style="color: #990000">.</span>sh cowboy git https<span style="color: #990000">:</span>//github<span style="color: #990000">.</span>com/ninenines/cowboy <span style="color: #993399">1.0</span><span style="color: #990000">.</span><span style="color: #993399">0</span>
- http<span style="color: #990000">:</span>//ninenines<span style="color: #990000">.</span>eu <span style="color: #FF0000">"Small, fast and modular HTTP server."</span>
-$ git push origin master</tt></pre></div></div>
-<div class="paragraph"><p>Before sending a pull request, you should test your package.
-You can use the following command: <code>make check p=PACKAGE</code>,
-where <code>PACKAGE</code> is the name of the package, for example
-<code>cowboy</code>.</p></div>
-<div class="paragraph"><p>To test all packages, the <code>make packages</code> command can be used.
-This can take a long time. Some packages will fail with certain
-versions of Erlang, or if a prerequisite is missing from your system.
-You can of course speed things up using the <code>-j</code> and <code>-k</code> flags.</p></div>
-<div class="paragraph"><p>After all packages have been tested, you can run the command
-<code>make summary</code> to know what changed since the previous run.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>$ git clone https<font color="#990000">:</font>//github<font color="#990000">.</font>com<font color="#990000">/</font><font color="#009900">$YOURUSERNAME</font>/erlang<font color="#990000">.</font>mk
+$ cd erlang<font color="#990000">.</font>mk
+$ <font color="#990000">.</font>/pkg_add<font color="#990000">.</font>sh cowboy git https<font color="#990000">:</font>//github<font color="#990000">.</font>com/ninenines/cowboy <font color="#993399">1.0</font><font color="#990000">.</font><font color="#993399">0</font>
+ http<font color="#990000">:</font>//ninenines<font color="#990000">.</font>eu <font color="#FF0000">"Small, fast and modular HTTP server."</font>
+$ git push origin master</tt></pre>
+</div></div>
+<p>Before sending a pull request, you should test your package. You can use the following command: <code>make check p=PACKAGE</code>, where <code>PACKAGE</code> is the name of the package, for example <code>cowboy</code>.</p>
+<p>To test all packages, the <code>make packages</code> command can be used. This can take a long time. Some packages will fail with certain versions of Erlang, or if a prerequisite is missing from your system. You can of course speed things up using the <code>-j</code> and <code>-k</code> flags.</p>
+<p>After all packages have been tested, you can run the command <code>make summary</code> to know what changed since the previous run.</p>
<h2 id="_documentation">Documentation</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The documentation is always right.</p></div>
-<div class="paragraph"><p>If you think you have found a mistake in the documentation,
-this is a bug. You can either open a ticket or send a pull
-request.</p></div>
-<div class="paragraph"><p>To make sure that the documentation changes work, install
-the listed <a href="../asciidoc">Requirements</a> on your system and
-run <code>make docs</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The documentation is always right.</p>
+<p>If you think you have found a mistake in the documentation, this is a bug. You can either open a ticket or send a pull request.</p>
+<p>To make sure that the documentation changes work, install the listed <a href="../asciidoc">Requirements</a> on your system and run <code>make docs</code>.</p>
<h2 id="_feature_requests">Feature requests</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>If you have an awesome idea or need something that Erlang.mk
-doesn&#8217;t provide yet, open a ticket. Provide as much detail as
-possible.</p></div>
-<div class="paragraph"><p>If you have code, great! Open a pull request as previously
-explained.</p></div>
-<div class="paragraph"><p>If not, you can still improve your feature request by writing
-the related documentation.</p></div>
-</div>
-</div>
+<p>If you have an awesome idea or need something that Erlang.mk doesn&apos;t provide yet, open a ticket. Provide as much detail as possible.</p>
+<p>If you have code, great! Open a pull request as previously explained.</p>
+<p>If not, you can still improve your feature request by writing the related documentation.</p>
+
diff --git a/docs/en/erlang.mk/1/guide/coverage/index.html b/docs/en/erlang.mk/1/guide/coverage/index.html
index aa986318..b740872c 100644
--- a/docs/en/erlang.mk/1/guide/coverage/index.html
+++ b/docs/en/erlang.mk/1/guide/coverage/index.html
@@ -62,7 +62,9 @@
<h1 class="lined-header"><span>Code coverage</span></h1>
-<div class="paragraph"><p>Placeholder chapter.</p></div>
+<!-- @todo Write it.-->
+<p>Placeholder chapter.</p>
+
diff --git a/docs/en/erlang.mk/1/guide/deps/index.html b/docs/en/erlang.mk/1/guide/deps/index.html
index 845cfd09..a582e021 100644
--- a/docs/en/erlang.mk/1/guide/deps/index.html
+++ b/docs/en/erlang.mk/1/guide/deps/index.html
@@ -62,708 +62,387 @@
<h1 class="lined-header"><span>Packages and dependencies</span></h1>
-<div class="paragraph"><p>Erlang.mk can fetch and compile the dependencies that your
-project requires. Erlang.mk improves upon the concepts
-introduced by Rebar, so they should be familiar to many
-seasoned Erlang developers.</p></div>
-<div class="paragraph"><p>Erlang.mk is not a package manager, nor is it trying to be,
-but it does include an index of Erlang packages to make
-discovering useful projects easier.</p></div>
-<div class="paragraph"><p>This chapter will explain how to use packages, add
-dependencies to your project or bundle them directly
-in a single repository.</p></div>
-<div class="sect1">
+<p>Erlang.mk can fetch and compile the dependencies that your project requires. Erlang.mk improves upon the concepts introduced by Rebar, so they should be familiar to many seasoned Erlang developers.</p>
+<p>Erlang.mk is not a package manager, nor is it trying to be, but it does include an index of Erlang packages to make discovering useful projects easier.</p>
+<p>This chapter will explain how to use packages, add dependencies to your project or bundle them directly in a single repository.</p>
<h2 id="_searching_packages">Searching packages</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Erlang.mk gives you access to nearly 500 packages, with more
-being added regularly.</p></div>
-<div class="paragraph"><p>To find a package, search for it:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Erlang.mk gives you access to nearly 500 packages, with more being added regularly.</p>
+<p>To find a package, search for it:</p>
+<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 search <span style="color: #009900">q</span><span style="color: #990000">=</span>pool</tt></pre></div></div>
-<div class="paragraph"><p>This will return all packages matching this word, like worker
-pool and acceptor pool projects.</p></div>
-<div class="paragraph"><p>You can also list everything and use regular command line
-tools to find what you need, for example:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>$ make search <font color="#009900">q</font><font color="#990000">=</font>pool</tt></pre>
+</div></div>
+<p>This will return all packages matching this word, like worker pool and acceptor pool projects.</p>
+<p>You can also list everything and use regular command line tools to find what you need, for example:</p>
+<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 search <span style="color: #990000">|</span> less</tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>$ make search <font color="#990000">|</font> less</tt></pre>
+</div></div>
+<!-- @todo Simplify adding packages, add a new chapter explaining-->
+<!-- everything, then link to this new chapter from here.-->
<h2 id="_adding_dependencies_to_your_project">Adding dependencies to your project</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Once you find the package you need, adding it as a dependency
-to your project is a one-liner:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Once you find the package you need, adding it as a dependency to your project is a one-liner:</p>
+<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">DEPS =</span> cowboy</tt></pre></div></div>
-<div class="paragraph"><p>And that&#8217;s it! The next time you run <code>make</code>, Erlang.mk will
-fetch and compile Cowboy. Erlang.mk will also ensure Cowboy
-is available whenever you use the shell, run tests and any
-other operations.</p></div>
-<div class="paragraph"><p>Erlang.mk will fill in the application resource file with
-all applications found in <code>DEPS</code>. But not all dependencies
-are Erlang applications, and not all dependencies need to
-be a runtime dependency. That&#8217;s where the <code>BUILD_DEPS</code>
-variable comes in: it works just like <code>DEPS</code>, except the
-dependencies listed there will not be added as runtime
-dependencies.</p></div>
-<div class="paragraph"><p>For example, you could add a parse transform project like
-this to make it available only at build time:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">DEPS =</font> cowboy</tt></pre>
+</div></div>
+<p>And that&apos;s it! The next time you run <code>make</code>, Erlang.mk will fetch and compile Cowboy. Erlang.mk will also ensure Cowboy is available whenever you use the shell, run tests and any other operations.</p>
+<p>Erlang.mk will fill in the application resource file with all applications found in <code>DEPS</code>. But not all dependencies are Erlang applications, and not all dependencies need to be a runtime dependency. That&apos;s where the <code>BUILD_DEPS</code> variable comes in: it works just like <code>DEPS</code>, except the dependencies listed there will not be added as runtime dependencies.</p>
+<p>For example, you could add a parse transform project like this to make it available only at build time:</p>
+<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">BUILD_DEPS =</span> erlando</tt></pre></div></div>
-<div class="paragraph"><p>Or you could depend on a C project directly, if you are
-building a NIF:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">BUILD_DEPS =</font> erlando</tt></pre>
+</div></div>
+<p>Or you could depend on a C project directly, if you are building a NIF:</p>
+<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">BUILD_DEPS =</span> leveldb
-<span style="color: #009900">dep_leveldb =</span> git https<span style="color: #990000">:</span>//github.com/basho/leveldb 2.1.3</tt></pre></div></div>
-<div class="paragraph"><p>This dependency will be built before your application, so
-you could easily copy the resulting shared file into your
-<em>priv/</em> directory as part of the build process. More information
-about that in the <a href="../ports">NIFs and port drivers</a>
-chapter.</p></div>
-<div class="paragraph"><p>Another variable, <code>LOCAL_DEPS</code>, allows specifying runtime
-dependencies which are part of Erlang/OTP itself, but also
-dependencies that are included in the repository. Since they
-are already on your system, there is no need to fetch them.
-Do note that there is no way to choose the version, the
-application used will be the one already on your system.</p></div>
-<div class="paragraph"><p>You could depend on the Crypto application, for example:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">BUILD_DEPS =</font> leveldb
+<font color="#009900">dep_leveldb =</font> git https<font color="#990000">:</font>//github.com/basho/leveldb 2.1.3</tt></pre>
+</div></div>
+<p>This dependency will be built before your application, so you could easily copy the resulting shared file into your <em>priv/</em> directory as part of the build process. More information about that in the <a href="../ports">NIFs and port drivers</a> chapter.</p>
+<p>Another variable, <code>LOCAL_DEPS</code>, allows specifying runtime dependencies which are part of Erlang/OTP itself, but also dependencies that are included in the repository. Since they are already on your system, there is no need to fetch them. Do note that there is no way to choose the version, the application used will be the one already on your system.</p>
+<p>You could depend on the Crypto application, for example:</p>
+<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">LOCAL_DEPS =</span> crypto</tt></pre></div></div>
-<div class="paragraph"><p>Erlang.mk comes with additional types of dependencies.
-It has <code>TEST_DEPS</code> for dependencies used only for testing:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">LOCAL_DEPS =</font> crypto</tt></pre>
+</div></div>
+<p>Erlang.mk comes with additional types of dependencies. It has <code>TEST_DEPS</code> for dependencies used only for testing:</p>
+<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">TEST_DEPS =</span> ct_helper
-<span style="color: #009900">dep_ct_helper =</span> git https<span style="color: #990000">:</span>//github.com/ninenines/ct_helper master</tt></pre></div></div>
-<div class="paragraph"><p><code>DOC_DEPS</code> for dependencies used only when building documentation:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">TEST_DEPS =</font> ct_helper
+<font color="#009900">dep_ct_helper =</font> git https<font color="#990000">:</font>//github.com/ninenines/ct_helper master</tt></pre>
+</div></div>
+<p><code>DOC_DEPS</code> for dependencies used only when building documentation:</p>
+<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">DOC_DEPS =</span> edown</tt></pre></div></div>
-<div class="paragraph"><p><code>REL_DEPS</code> for dependencies required to build the release,
-or to include extra applications in the release:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">DOC_DEPS =</font> edown</tt></pre>
+</div></div>
+<p><code>REL_DEPS</code> for dependencies required to build the release, or to include extra applications in the release:</p>
+<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">REL_DEPS =</span> recon</tt></pre></div></div>
-<div class="paragraph"><p>And <code>SHELL_DEPS</code> for dependencies to make available when running
-the <code>make shell</code> command:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">REL_DEPS =</font> recon</tt></pre>
+</div></div>
+<p>And <code>SHELL_DEPS</code> for dependencies to make available when running the <code>make shell</code> command:</p>
+<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">SHELL_DEPS =</span> tddreloader</tt></pre></div></div>
-<div class="paragraph"><p>All these will be documented in more details in their respective
-chapters.</p></div>
-<div class="sect3">
+<pre><tt><font color="#009900">SHELL_DEPS =</font> tddreloader</tt></pre>
+</div></div>
+<p>All these will be documented in more details in their respective chapters.</p>
<h4 id="_modifying_the_dependency_source_or_version">Modifying the dependency source or version</h4>
-<div class="paragraph"><p>By default, Erlang.mk will look into its package index to
-find the project you are looking for, if you only provide
-its name. This is this case:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>By default, Erlang.mk will look into its package index to find the project you are looking for, if you only provide its name. This is this case:</p>
+<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">DEPS =</span> cowboy</tt></pre></div></div>
-<div class="paragraph"><p>If you need a different version, you need to define another
-variable. There are two ways to do this, each being useful
-for different reasons.</p></div>
-<div class="paragraph"><p>If you simply want to change the commit number, all you
-need to do is to define the <code>dep_$(DEP_NAME)_commit</code>
-variable. In the case of Cowboy, this would look like this:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">DEPS =</font> cowboy</tt></pre>
+</div></div>
+<p>If you need a different version, you need to define another variable. There are two ways to do this, each being useful for different reasons.</p>
+<p>If you simply want to change the commit number, all you need to do is to define the <code>dep_$(DEP_NAME)_commit</code> variable. In the case of Cowboy, this would look like this:</p>
+<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">DEPS =</span> cowboy
-<span style="color: #009900">dep_cowboy_commit =</span> 2.0.0-pre.2</tt></pre></div></div>
-<div class="paragraph"><p>Erlang.mk will use the package index to get all information
-about Cowboy, except the commit number which will be overriden.</p></div>
-<div class="paragraph"><p>If you need to set the fetch method or repository information
-too, for example because you want to use your own fork, or
-simply because the project is missing from the index, you
-can define the <code>dep_$(DEP_NAME)</code> variable with everything:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">DEPS =</font> cowboy
+<font color="#009900">dep_cowboy_commit =</font> 2.0.0-pre.2</tt></pre>
+</div></div>
+<p>Erlang.mk will use the package index to get all information about Cowboy, except the commit number which will be overriden.</p>
+<p>If you need to set the fetch method or repository information too, for example because you want to use your own fork, or simply because the project is missing from the index, you can define the <code>dep_$(DEP_NAME)</code> variable with everything:</p>
+<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">DEPS =</span> cowboy
-<span style="color: #009900">dep_cowboy =</span> git https<span style="color: #990000">:</span>//github.com/essen/cowboy 2.0.0-pre.2</tt></pre></div></div>
-<div class="paragraph"><p>This will fetch Cowboy from your fork at the given commit.</p></div>
-</div>
-<div class="sect3">
+<pre><tt><font color="#009900">DEPS =</font> cowboy
+<font color="#009900">dep_cowboy =</font> git https<font color="#990000">:</font>//github.com/essen/cowboy 2.0.0-pre.2</tt></pre>
+</div></div>
+<p>This will fetch Cowboy from your fork at the given commit.</p>
<h4 id="_fetch_methods">Fetch methods</h4>
-<div class="paragraph"><p>Erlang.mk comes with a number of different fetch methods.
-You can fetch from Git, Mercurial, SVN, to name a few.
-There are fetch methods that will work everywhere, and
-fetch methods that will only work in a given environment.</p></div>
-<div class="paragraph"><p>The following table lists all existing methods:</p></div>
-<div class="tableblock">
-<table rules="all"
-width="100%"
-frame="border"
-cellspacing="0" cellpadding="4">
-<col width="33%" />
-<col width="33%" />
-<col width="33%" />
-<thead>
-<tr>
-<th align="left" valign="top"> Name </th>
-<th align="center" valign="top"> Format </th>
-<th align="center" valign="top"> Description</th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td align="left" valign="top"><p class="table">git</p></td>
-<td align="center" valign="top"><p class="table">git repo commit</p></td>
-<td align="center" valign="top"><p class="table">Clone the Git repository and checkout the given version</p></td>
+<p>Erlang.mk comes with a number of different fetch methods. You can fetch from Git, Mercurial, SVN, to name a few. There are fetch methods that will work everywhere, and fetch methods that will only work in a given environment.</p>
+<p>The following table lists all existing methods:</p>
+<table rules="all" width="100%" frame="border"
+ cellspacing="0" cellpadding="4">
+<thead><tr><th>Name</th>
+<th>Format</th>
+<th>Description</th>
+</tr></thead><tbody><tr><td>git</td>
+<td>git repo commit</td>
+<td>Clone the Git repository and checkout the given version</td>
</tr>
-<tr>
-<td align="left" valign="top"><p class="table">git-submodule</p></td>
-<td align="center" valign="top"><p class="table">git-submodule</p></td>
-<td align="center" valign="top"><p class="table">Initialize and update the Git submodule</p></td>
+<tr><td>git-submodule</td>
+<td>git-submodule</td>
+<td>Initialize and update the Git submodule</td>
</tr>
-<tr>
-<td align="left" valign="top"><p class="table">hg</p></td>
-<td align="center" valign="top"><p class="table">hg repo commit</p></td>
-<td align="center" valign="top"><p class="table">Clone the Mercurial repository and update to the given version</p></td>
+<tr><td>hg</td>
+<td>hg repo commit</td>
+<td>Clone the Mercurial repository and update to the given version</td>
</tr>
-<tr>
-<td align="left" valign="top"><p class="table">svn</p></td>
-<td align="center" valign="top"><p class="table">svn repo</p></td>
-<td align="center" valign="top"><p class="table">Checkout the given SVN repository</p></td>
+<tr><td>svn</td>
+<td>svn repo</td>
+<td>Checkout the given SVN repository</td>
</tr>
-<tr>
-<td align="left" valign="top"><p class="table">cp</p></td>
-<td align="center" valign="top"><p class="table">cp path/to/repo</p></td>
-<td align="center" valign="top"><p class="table">Recursively copy a local directory</p></td>
+<tr><td>cp</td>
+<td>cp path/to/repo</td>
+<td>Recursively copy a local directory</td>
</tr>
-<tr>
-<td align="left" valign="top"><p class="table">ln</p></td>
-<td align="center" valign="top"><p class="table">ln path/to/repo</p></td>
-<td align="center" valign="top"><p class="table">Symbolically link a local directory</p></td>
+<tr><td>ln</td>
+<td>ln path/to/repo</td>
+<td>Symbolically link a local directory</td>
</tr>
-<tr>
-<td align="left" valign="top"><p class="table">hex</p></td>
-<td align="center" valign="top"><p class="table">hex version</p></td>
-<td align="center" valign="top"><p class="table">Download the given project version from hex.pm</p></td>
+<tr><td>hex</td>
+<td>hex version</td>
+<td>Download the given project version from hex.pm</td>
</tr>
-<tr>
-<td align="left" valign="top"><p class="table">fail</p></td>
-<td align="center" valign="top"><p class="table">N/A</p></td>
-<td align="center" valign="top"><p class="table">Always fail, reserved for internal use</p></td>
+<tr><td>fail</td>
+<td>N/A</td>
+<td>Always fail, reserved for internal use</td>
</tr>
-<tr>
-<td align="left" valign="top"><p class="table">legacy</p></td>
-<td align="center" valign="top"><p class="table">N/A</p></td>
-<td align="center" valign="top"><p class="table">Legacy Erlang.mk fetcher, reserved for internal use</p></td>
+<tr><td>legacy</td>
+<td>N/A</td>
+<td>Legacy Erlang.mk fetcher, reserved for internal use</td>
</tr>
-</tbody>
-</table>
-</div>
-<div class="paragraph"><p>The <code>git</code> and <code>hg</code> methods both have a repository and commit.
-You can use any valid commit, tag or branch in that repository
-for the commit value.</p></div>
-<div class="paragraph"><p>For example, to fetch Cowboy with tag 2.0.0-pre.2 from Git:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+</tbody></table>
+<p>The <code>git</code> and <code>hg</code> methods both have a repository and commit. You can use any valid commit, tag or branch in that repository for the commit value.</p>
+<p>For example, to fetch Cowboy with tag 2.0.0-pre.2 from Git:</p>
+<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">dep_cowboy =</span> git https<span style="color: #990000">:</span>//github.com/ninenines/cowboy 2.0.0-pre.2</tt></pre></div></div>
-<div class="paragraph"><p>Or to fetch Ehsa tag 4.0.3 from Mercurial:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">dep_cowboy =</font> git https<font color="#990000">:</font>//github.com/ninenines/cowboy 2.0.0-pre.2</tt></pre>
+</div></div>
+<p>Or to fetch Ehsa tag 4.0.3 from Mercurial:</p>
+<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">dep_ehsa =</span> hg https<span style="color: #990000">:</span>//bitbucket.org/a12n/ehsa 4.0.3</tt></pre></div></div>
-<div class="paragraph"><p>Git also comes with a concept of submodules. Erlang.mk can
-automatically initializes and updates submodules for dependencies,
-as long as they were added beforehand using <code>git submodule add</code>:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">dep_ehsa =</font> hg https<font color="#990000">:</font>//bitbucket.org/a12n/ehsa 4.0.3</tt></pre>
+</div></div>
+<p>Git also comes with a concept of submodules. Erlang.mk can automatically initializes and updates submodules for dependencies, as long as they were added beforehand using <code>git submodule add</code>:</p>
+<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">dep_cowboy =</span> git-submodule</tt></pre></div></div>
-<div class="paragraph"><p>The <code>svn</code> method only has a repository value, but that&#8217;s
-simply because the SVN repository URL can also contain
-the path and commit.</p></div>
-<div class="paragraph"><p>This would fetch an example project from the trunk:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">dep_cowboy =</font> git-submodule</tt></pre>
+</div></div>
+<p>The <code>svn</code> method only has a repository value, but that&apos;s simply because the SVN repository URL can also contain the path and commit.</p>
+<p>This would fetch an example project from the trunk:</p>
+<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">dep_ex1 =</span> svn https<span style="color: #990000">:</span>//example.com/svn/trunk/project/ex<span style="color: #993399">1</span></tt></pre></div></div>
-<div class="paragraph"><p>And this would fetch a separate example project from a
-specific commit:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">dep_ex1 =</font> svn https<font color="#990000">:</font>//example.com/svn/trunk/project/ex<font color="#993399">1</font></tt></pre>
+</div></div>
+<p>And this would fetch a separate example project from a specific commit:</p>
+<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">dep_ex2 =</span> svn svn<span style="color: #990000">:</span>//example.com/svn/branches/erlang-proj/ex<span style="color: #993399">2</span>@<span style="color: #993399">264</span></tt></pre></div></div>
-<div class="paragraph"><p>You can copy a directory from your machine using the <code>cp</code> method.
-It only takes the path to copy from:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">dep_ex2 =</font> svn svn<font color="#990000">:</font>//example.com/svn/branches/erlang-proj/ex<font color="#993399">2</font>@<font color="#993399">264</font></tt></pre>
+</div></div>
+<p>You can copy a directory from your machine using the <code>cp</code> method. It only takes the path to copy from:</p>
+<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">dep_cowboy =</span> cp <span style="color: #009900">$(HOME)</span>/ninenines/cowboy</tt></pre></div></div>
-<div class="paragraph"><p>Finally, you can use a package from the
-<a href="https://hex.pm/">Hex repository</a>:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">dep_cowboy =</font> cp <font color="#009900">$(HOME)</font>/ninenines/cowboy</tt></pre>
+</div></div>
+<p>Finally, you can use a package from the <a href="https://hex.pm/">Hex repository</a>:</p>
+<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">dep_cowboy =</span> hex 1.0.3</tt></pre></div></div>
-</div>
-<div class="sect3">
+<pre><tt><font color="#009900">dep_cowboy =</font> hex 1.0.3</tt></pre>
+</div></div>
<h4 id="_custom_fetch_methods">Custom fetch methods</h4>
-<div class="paragraph"><p>If none of the existing methods fit your use, you can simply
-define your own. Erlang.mk will consider all variables that
-are named as <code>dep_fetch_$(METHOD)</code> to be available fetch
-methods. You can do anything inside this variable, as long
-as you create a folder named <em>$(DEPS_DIR)/$(call dep_name,$1)</em>.
-Or in layman terms, if your dependency is Cowboy, this would
-become <em>deps/cowboy</em>.</p></div>
-<div class="paragraph"><p>To give an example, this is what the Git method does:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>If none of the existing methods fit your use, you can simply define your own. Erlang.mk will consider all variables that are named as <code>dep_fetch_$(METHOD)</code> to be available fetch methods. You can do anything inside this variable, as long as you create a folder named <em>$(DEPS_DIR)/$(call dep_name,$1)</em>. Or in layman terms, if your dependency is Cowboy, this would become <em>deps/cowboy</em>.</p>
+<p>To give an example, this is what the Git method does:</p>
+<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>define dep_fetch_git
- git clone -q -n -- <span style="color: #009900">$(</span>call dep_repo<span style="color: #990000">,</span><span style="color: #009900">$1</span><span style="color: #990000">)</span> <span style="color: #009900">$(DEPS_DIR)</span><span style="color: #990000">/</span><span style="color: #009900">$(</span>call dep_name<span style="color: #990000">,</span><span style="color: #009900">$1</span><span style="color: #990000">);</span> <span style="color: #990000">\</span>
- cd <span style="color: #009900">$(DEPS_DIR)</span><span style="color: #990000">/</span><span style="color: #009900">$(</span>call dep_name<span style="color: #990000">,</span><span style="color: #009900">$1</span><span style="color: #990000">)</span> <span style="color: #990000">&amp;&amp;</span> git checkout -q <span style="color: #009900">$(</span>call dep_commit<span style="color: #990000">,</span><span style="color: #009900">$1</span><span style="color: #990000">);</span>
-endef</tt></pre></div></div>
-<div class="paragraph"><p>Note that, like dependency information, this custom fetch method
-must be written before including <em>erlang.mk</em>.</p></div>
-</div>
-</div>
-</div>
-<div class="sect1">
+ git clone -q -n -- <font color="#009900">$(</font>call dep_repo<font color="#990000">,</font><font color="#009900">$1</font><font color="#990000">)</font> <font color="#009900">$(DEPS_DIR)</font><font color="#990000">/</font><font color="#009900">$(</font>call dep_name<font color="#990000">,</font><font color="#009900">$1</font><font color="#990000">);</font> <font color="#990000">\</font>
+ cd <font color="#009900">$(DEPS_DIR)</font><font color="#990000">/</font><font color="#009900">$(</font>call dep_name<font color="#990000">,</font><font color="#009900">$1</font><font color="#990000">)</font> <font color="#990000">&amp;&amp;</font> git checkout -q <font color="#009900">$(</font>call dep_commit<font color="#990000">,</font><font color="#009900">$1</font><font color="#990000">);</font>
+endef</tt></pre>
+</div></div>
+<p>Note that, like dependency information, this custom fetch method must be written before including <em>erlang.mk</em>.</p>
<h2 id="_how_deps_are_fetched_and_built">How deps are fetched and built</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The order in which dependencies are fetched and built is well
-defined. This means that Erlang.mk will get the same applications
-regardless of the command or options being used.</p></div>
-<div class="paragraph"><p>In tree traversal terms, where the list of dependencies is a
-tree, Erlang.mk fetches everything using the pre-order traversal
-method. The steps can be summarized like this, starting from
-the root application:</p></div>
-<div class="olist arabic"><ol class="arabic">
-<li>
-<p>
-Fetch all dependencies for the application
-</p>
+<p>The order in which dependencies are fetched and built is well defined. This means that Erlang.mk will get the same applications regardless of the command or options being used.</p>
+<p>In tree traversal terms, where the list of dependencies is a tree, Erlang.mk fetches everything using the pre-order traversal method. The steps can be summarized like this, starting from the root application:</p>
+<ol><li>Fetch all dependencies for the application
</li>
-<li>
-<p>
-Build first dependency
-</p>
+<li>Build first dependency
</li>
-<li>
-<p>
-Build Nth dependency
-</p>
+<li>Build Nth dependency
</li>
-<li>
-<p>
-Build last dependency
-</p>
+<li>Build last dependency
</li>
-</ol></div>
-<div class="paragraph"><p>Every time a dependency is built, these same steps are followed,
-recursively.</p></div>
-<div class="paragraph"><p>Do note that the first step, fetching all dependencies of
-an application, is not guaranteed to be ordered. The reason
-for this is that it is not possible to have the same dependency
-listed twice in a single application, and therefore there can
-be no conflicts. Remember, this step only fetches, at no point
-are different applications built in parallel.</p></div>
-<div class="paragraph"><p>What about conflicts between the dependencies of different
-applications? Simple. Since builds are ordered, this means
-that the first version of an application that is fetched
-will be the one that wins.</p></div>
-<div class="paragraph"><p>This means that if project A depends on projects B and C,
-in this order, and that both B and C depend on a different
-version of D, it will always be B&#8217;s version of D that wins,
-because we fetch the dependencies of B before fetching
-those from C.</p></div>
-<div class="paragraph"><p>Similarly, if project A depends on projects B, C and D,
-regardless of the order, and A, B and C depend on a
-different version of D, it will always be A&#8217;s version
-that wins, because we fetch all dependencies of A before
-fetching those from B or C.</p></div>
-</div>
-</div>
-<div class="sect1">
+</ol>
+<p>Every time a dependency is built, these same steps are followed, recursively.</p>
+<p>Do note that the first step, fetching all dependencies of an application, is not guaranteed to be ordered. The reason for this is that it is not possible to have the same dependency listed twice in a single application, and therefore there can be no conflicts. Remember, this step only fetches, at no point are different applications built in parallel.</p>
+<p>What about conflicts between the dependencies of different applications? Simple. Since builds are ordered, this means that the first version of an application that is fetched will be the one that wins.</p>
+<p>This means that if project A depends on projects B and C, in this order, and that both B and C depend on a different version of D, it will always be B&apos;s version of D that wins, because we fetch the dependencies of B before fetching those from C.</p>
+<p>Similarly, if project A depends on projects B, C and D, regardless of the order, and A, B and C depend on a different version of D, it will always be A&apos;s version that wins, because we fetch all dependencies of A before fetching those from B or C.</p>
<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>
+<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>
+<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>
+<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>
+<ul><li>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.
</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>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=&apos;test doc&apos;</code>.
</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">
+</ul>
+<p>Note that only first level <code>TEST_DEPS</code>, <code>DOC_DEPS</code>, <code>REL_DEPS</code> and <code>SHELL_DEPS</code> are included, not dependencies&apos; 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>
+<p>No matter which method you use, <code>BUILD_DEPS</code> and <code>DEPS</code> are always included.</p>
+<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>
+<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>
<h2 id="_ignoring_unwanted_dependencies">Ignoring unwanted dependencies</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Sometimes, you may want to ignore dependencies entirely.
-Not even fetch them. You may want to do this because a
-project you depend on depends on an application you do
-not need (like a dependency for building documentation
-or testing). Or maybe the dependency is already installed
-on your system.</p></div>
-<div class="paragraph"><p>To ignore a dependency, simply add it to the <code>IGNORE_DEPS</code>
-variable:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Sometimes, you may want to ignore dependencies entirely. Not even fetch them. You may want to do this because a project you depend on depends on an application you do not need (like a dependency for building documentation or testing). Or maybe the dependency is already installed on your system.</p>
+<p>To ignore a dependency, simply add it to the <code>IGNORE_DEPS</code> variable:</p>
+<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>IGNORE_DEPS <span style="color: #990000">+=</span> edown proper</tt></pre></div></div>
-<div class="paragraph"><p>This will only ignore dependencies that are needed for
-building. It is therefore safe to write:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>IGNORE_DEPS <font color="#990000">+=</font> edown proper</tt></pre>
+</div></div>
+<p>This will only ignore dependencies that are needed for building. It is therefore safe to write:</p>
+<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>IGNORE_DEPS <span style="color: #990000">+=</span> edown proper
-<span style="color: #009900">TEST_DEPS =</span> proper</tt></pre></div></div>
-<div class="paragraph"><p>The PropEr application will be fetched as intended when
-running <code>make tests</code> or <code>make check</code>. It will however
-not be fetched when running <code>make</code> or <code>make deps</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>IGNORE_DEPS <font color="#990000">+=</font> edown proper
+<font color="#009900">TEST_DEPS =</font> proper</tt></pre>
+</div></div>
+<p>The PropEr application will be fetched as intended when running <code>make tests</code> or <code>make check</code>. It will however not be fetched when running <code>make</code> or <code>make deps</code>.</p>
<h2 id="_dependencies_directory">Dependencies directory</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Dependencies are fetched in <em>$(DEPS_DIR)</em>. By default this is
-the <em>deps</em> directory. You can change this default, but you
-should only do so if it was not defined previously. Erlang.mk
-uses this variable to tell dependencies where to fetch their
-own dependencies.</p></div>
-<div class="paragraph"><p>You will therefore need to use <code>?=</code> instead of <code>=</code>. Of course,
-if you know you will never use this project as a dependency,
-<code>=</code> will work. But to avoid it biting you later on, do this:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Dependencies are fetched in <em>$(DEPS_DIR)</em>. By default this is the <em>deps</em> directory. You can change this default, but you should only do so if it was not defined previously. Erlang.mk uses this variable to tell dependencies where to fetch their own dependencies.</p>
+<p>You will therefore need to use <code>?=</code> instead of <code>=</code>. Of course, if you know you will never use this project as a dependency, <code>=</code> will work. But to avoid it biting you later on, do this:</p>
+<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>DEPS_DIR <span style="color: #990000">?=</span> <span style="color: #009900">$(CURDIR)</span>/libs</tt></pre></div></div>
-<div class="paragraph"><p>The <code>$(CURDIR)</code> part is important, otherwise dependencies of
-dependencies will be fetched in the wrong directory.</p></div>
-<div class="paragraph"><p>Erlang.mk will also export the <code>REBAR_DEPS_DIR</code> variable for
-compatibility with Rebar build tools, as long as they are
-recent enough.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>DEPS_DIR <font color="#990000">?=</font> <font color="#009900">$(CURDIR)</font>/libs</tt></pre>
+</div></div>
+<p>The <code>$(CURDIR)</code> part is important, otherwise dependencies of dependencies will be fetched in the wrong directory.</p>
+<p>Erlang.mk will also export the <code>REBAR_DEPS_DIR</code> variable for compatibility with Rebar build tools, as long as they are recent enough.</p>
<h2 id="_many_applications_in_one_repository">Many applications in one repository</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>In addition to the dependencies that are fetched, Erlang.mk
-also allows you to have dependencies local to your repository.
-This kind of layout is sometimes called multi-application
-repositories, or repositories with multiple applications.</p></div>
-<div class="paragraph"><p>They work exactly the same as remote dependencies, except:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-They are not fetched
-</p>
+<p>In addition to the dependencies that are fetched, Erlang.mk also allows you to have dependencies local to your repository. This kind of layout is sometimes called multi-application repositories, or repositories with multiple applications.</p>
+<p>They work exactly the same as remote dependencies, except:</p>
+<ul><li>They are not fetched
</li>
-<li>
-<p>
-They are not autopatched
-</p>
+<li>They are not autopatched
</li>
-<li>
-<p>
-They are not deleted on <code>make distclean</code>
-</p>
+<li>They are not deleted on <code>make distclean</code>
</li>
-<li>
-<p>
-They are not automatically added to the application resource file
-</p>
+<li>They are not automatically added to the application resource file
</li>
-</ul></div>
-<div class="paragraph"><p>To properly fill the application resource file and compile apps in
-the right order, you will need to define the <code>LOCAL_DEPS</code> variable
-for each relevant application, the same as for OTP applications. Apps
-can depend on each other in this way, and their compilation order
-will follow the same rules as regular dependencies in <code>DEPS</code>.</p></div>
-<div class="paragraph"><p>The top-level <code>LOCAL_DEPS</code> variable, if defined, will determine which
-apps (along with their dependencies) to build, and also which apps
-should be added to the top-level application resource file, if there
-is one. This may be useful, for example, for specifying a different
-set of apps to build for different releases. If <code>LOCAL_DEPS</code> is not
-defined, then all apps in the <em>$(APPS_DIR)</em> will be built, but none
-will be automatically added to the top-level application resource
-file.</p></div>
-<div class="paragraph"><p>If there is a conflict between a local dependency and a
-remote dependency, then the local dependency always wins;
-an error will be triggered when trying to fetch the
-conflicting remote dependency.</p></div>
-<div class="paragraph"><p>To start using dependencies local to the repository, simply
-create a folder named <em>$(APPS_DIR)</em>. By default, this folder
-is the <em>apps/</em> directory.</p></div>
-<div class="paragraph"><p>You can use Erlang.mk to bootstrap local dependencies by
-using the command <code>make new-app</code> or <code>make new-lib</code>. This
-command will create the necessary directories and bootstrap
-the application.</p></div>
-<div class="paragraph"><p>For example, to create a full fledged OTP application as
-a local dependency:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+</ul>
+<p>To properly fill the application resource file and compile apps in the right order, you will need to define the <code>LOCAL_DEPS</code> variable for each relevant application, the same as for OTP applications. Apps can depend on each other in this way, and their compilation order will follow the same rules as regular dependencies in <code>DEPS</code>.</p>
+<p>The top-level <code>LOCAL_DEPS</code> variable, if defined, will determine which apps (along with their dependencies) to build, and also which apps should be added to the top-level application resource file, if there is one. This may be useful, for example, for specifying a different set of apps to build for different releases. If <code>LOCAL_DEPS</code> is not defined, then all apps in the <em>$(APPS_DIR)</em> will be built, but none will be automatically added to the top-level application resource file.</p>
+<p>If there is a conflict between a local dependency and a remote dependency, then the local dependency always wins; an error will be triggered when trying to fetch the conflicting remote dependency.</p>
+<p>To start using dependencies local to the repository, simply create a folder named <em>$(APPS_DIR)</em>. By default, this folder is the <em>apps/</em> directory.</p>
+<p>You can use Erlang.mk to bootstrap local dependencies by using the command <code>make new-app</code> or <code>make new-lib</code>. This command will create the necessary directories and bootstrap the application.</p>
+<p>For example, to create a full fledged OTP application as a local dependency:</p>
+<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 new-app <span style="font-weight: bold"><span style="color: #0000FF">in</span></span><span style="color: #990000">=</span>webchat</tt></pre></div></div>
-<div class="paragraph"><p>Or, the same as an OTP library:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>$ make new-app <b><font color="#0000FF">in</font></b><font color="#990000">=</font>webchat</tt></pre>
+</div></div>
+<p>Or, the same as an OTP library:</p>
+<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 new-lib <span style="font-weight: bold"><span style="color: #0000FF">in</span></span><span style="color: #990000">=</span>webchat</tt></pre></div></div>
-<div class="paragraph"><p>Templates also work with local dependencies, from the root
-directory of the project. You do need however to tell
-Erlang.mk to create the files in the correct application:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>$ make new-lib <b><font color="#0000FF">in</font></b><font color="#990000">=</font>webchat</tt></pre>
+</div></div>
+<p>Templates also work with local dependencies, from the root directory of the project. You do need however to tell Erlang.mk to create the files in the correct application:</p>
+<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 new <span style="color: #009900">t</span><span style="color: #990000">=</span>gen_server <span style="color: #009900">n</span><span style="color: #990000">=</span>my_server <span style="font-weight: bold"><span style="color: #0000FF">in</span></span><span style="color: #990000">=</span>webchat</tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>$ make new <font color="#009900">t</font><font color="#990000">=</font>gen_server <font color="#009900">n</font><font color="#990000">=</font>my_server <b><font color="#0000FF">in</font></b><font color="#990000">=</font>webchat</tt></pre>
+</div></div>
<h2 id="_repositories_with_no_application_at_the_root_level">Repositories with no application at the root level</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>It&#8217;s possible to use Erlang.mk with only applications in
-<em>$(APPS_DIR)</em>, and nothing at the root of the repository.
-Just create a folder, put the <em>erlang.mk</em> file in it,
-write a Makefile that includes it, and start creating
-your applications.</p></div>
-<div class="paragraph"><p>Similarly, it&#8217;s possible to have a repository with only
-dependencies found in <em>$(DEPS_DIR)</em>. You just need to
-create a Makefile and specify the dependencies you want.
-This allows you to create a repository for handling the
-building of releases, for example.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>It&apos;s possible to use Erlang.mk with only applications in <em>$(APPS_DIR)</em>, and nothing at the root of the repository. Just create a folder, put the <em>erlang.mk</em> file in it, write a Makefile that includes it, and start creating your applications.</p>
+<p>Similarly, it&apos;s possible to have a repository with only dependencies found in <em>$(DEPS_DIR)</em>. You just need to create a Makefile and specify the dependencies you want. This allows you to create a repository for handling the building of releases, for example.</p>
<h2 id="_autopatch">Autopatch</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Erlang.mk will automatically patch all the dependencies it
-fetches. It needs to do this to ensure that the dependencies
-become compatible with not only Erlang.mk, but also with
-the version of Erlang.mk that is currently used.</p></div>
-<div class="paragraph"><p>When fetching a dependency, the following operations are
-performed:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-Fetch the dependency using the configured fetch method
-</p>
+<p>Erlang.mk will automatically patch all the dependencies it fetches. It needs to do this to ensure that the dependencies become compatible with not only Erlang.mk, but also with the version of Erlang.mk that is currently used.</p>
+<p>When fetching a dependency, the following operations are performed:</p>
+<ul><li>Fetch the dependency using the configured fetch method
</li>
-<li>
-<p>
-If it contains a <em>configure.ac</em> or <em>configure.in</em> file, run <code>autoreconf -Wall -vif -I m4</code>
-</p>
+<li>If it contains a <em>configure.ac</em> or <em>configure.in</em> file, run <code>autoreconf -Wall -vif -I m4</code>
</li>
-<li>
-<p>
-If it contains a <em>configure</em> script, run it
-</p>
+<li>If it contains a <em>configure</em> script, run it
</li>
-<li>
-<p>
-Run autopatch on the project
-</p>
+<li>Run autopatch on the project
</li>
-</ul></div>
-<div class="paragraph"><p>Autopatch first checks if there is any project-specific patch
-enabled. There are currently two: <code>RABBITMQ_CLIENT_PATCH</code> for
-the <code>amqp_client</code> dependency, and <code>RABBITMQ_SERVER_PATCH</code> for
-the <code>rabbit</code> dependency. These are needed only for RabbitMQ
-versions before 3.6.0 (assuming you are using upstream RabbitMQ,
-and not a fork).</p></div>
-<div class="paragraph"><p>Otherwise, autopatch performs different operations depending
-on the kind of project it finds the dependency to be.</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-Rebar projects are automatically converted to use Erlang.mk
-as their build tool. This essentially patches Rebar out, and
-fixes and converts the project to be compatible with Erlang.mk.
-</p>
+</ul>
+<p>Autopatch first checks if there is any project-specific patch enabled. There are currently two: <code>RABBITMQ_CLIENT_PATCH</code> for the <code>amqp_client</code> dependency, and <code>RABBITMQ_SERVER_PATCH</code> for the <code>rabbit</code> dependency. These are needed only for RabbitMQ versions before 3.6.0 (assuming you are using upstream RabbitMQ, and not a fork).</p>
+<p>Otherwise, autopatch performs different operations depending on the kind of project it finds the dependency to be.</p>
+<ul><li>Rebar projects are automatically converted to use Erlang.mk as their build tool. This essentially patches Rebar out, and fixes and converts the project to be compatible with Erlang.mk.
</li>
-<li>
-<p>
-Erlang.mk projects have their <em>Makefile</em> patched, if necessary,
-to include the top-level project&#8217;s Erlang.mk. This is to ensure
-that functionality works across all dependencies, even if the
-dependency&#8217;s Erlang.mk is outdated. The patched Makefile
-can be safely committed if necessary.
-</p>
+<li>Erlang.mk projects have their <em>Makefile</em> patched, if necessary, to include the top-level project&apos;s Erlang.mk. This is to ensure that functionality works across all dependencies, even if the dependency&apos;s Erlang.mk is outdated. The patched Makefile can be safely committed if necessary.
</li>
-<li>
-<p>
-Other Erlang projects get a small Erlang.mk Makefile
-generated automatically.
-</p>
+<li>Other Erlang projects get a small Erlang.mk Makefile generated automatically.
</li>
-<li>
-<p>
-Projects with no source directory and no Makefile get an
-empty Makefile generated, for compatibility purposes.
-</p>
+<li>Projects with no source directory and no Makefile get an empty Makefile generated, for compatibility purposes.
</li>
-<li>
-<p>
-Other projects with no Makefile are left untouched.
-</p>
+<li>Other projects with no Makefile are left untouched.
</li>
-</ul></div>
-<div class="paragraph"><p>You can disable the replacing of the <em>erlang.mk</em> file by
-defining the <code>NO_AUTOPATCH_ERLANG_MK</code> variable:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+</ul>
+<p>You can disable the replacing of the <em>erlang.mk</em> file by defining the <code>NO_AUTOPATCH_ERLANG_MK</code> variable:</p>
+<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">NO_AUTOPATCH_ERLANG_MK =</span> <span style="color: #993399">1</span></tt></pre></div></div>
-<div class="paragraph"><p>You can also disable autopatch entirely for a few select
-projects using the <code>NO_AUTOPATCH</code> variable:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">NO_AUTOPATCH_ERLANG_MK =</font> <font color="#993399">1</font></tt></pre>
+</div></div>
+<p>You can also disable autopatch entirely for a few select projects using the <code>NO_AUTOPATCH</code> variable:</p>
+<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">NO_AUTOPATCH =</span> cowboy ranch cowlib</tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">NO_AUTOPATCH =</font> cowboy ranch cowlib</tt></pre>
+</div></div>
<h2 id="_skipping_deps">Skipping deps</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>It is possible to temporarily skip all dependency operations.
-This is done by defining the <code>SKIP_DEPS</code> variable. Use cases
-include being somewhere with no connection to download them,
-or perhaps a peculiar setup.</p></div>
-<div class="paragraph"><p>A typical usage would be:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>It is possible to temporarily skip all dependency operations. This is done by defining the <code>SKIP_DEPS</code> variable. Use cases include being somewhere with no connection to download them, or perhaps a peculiar setup.</p>
+<p>A typical usage would be:</p>
+<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">SKIP_DEPS</span><span style="color: #990000">=</span><span style="color: #993399">1</span></tt></pre></div></div>
-<div class="paragraph"><p>When the variable is defined:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-Dependencies will not be compiled or downloaded when required
-</p>
+<pre><tt>$ make <font color="#009900">SKIP_DEPS</font><font color="#990000">=</font><font color="#993399">1</font></tt></pre>
+</div></div>
+<p>When the variable is defined:</p>
+<ul><li>Dependencies will not be compiled or downloaded when required
</li>
-<li>
-<p>
-The dependency directory <em>$(DEPS_DIR)</em> will not be removed on <code>make distclean</code>
-</p>
+<li>The dependency directory <em>$(DEPS_DIR)</em> will not be removed on <code>make distclean</code>
</li>
-</ul></div>
-<div class="paragraph"><p>This variable only applies to remote dependencies.</p></div>
-</div>
-</div>
+</ul>
+<p>This variable only applies to remote dependencies.</p>
+
diff --git a/docs/en/erlang.mk/1/guide/dialyzer/index.html b/docs/en/erlang.mk/1/guide/dialyzer/index.html
index fedd4cae..e548daf4 100644
--- a/docs/en/erlang.mk/1/guide/dialyzer/index.html
+++ b/docs/en/erlang.mk/1/guide/dialyzer/index.html
@@ -62,77 +62,37 @@
<h1 class="lined-header"><span>Dialyzer</span></h1>
-<div class="paragraph"><p>Dialyzer is a tool that will detect discrepancies in your
-program. It does so using a technique known as success
-typing analysis which has the advantage of providing no
-false positives. Dialyzer is able to detect type errors,
-dead code and more.</p></div>
-<div class="paragraph"><p>Erlang.mk provides a wrapper around Dialyzer.</p></div>
-<div class="sect1">
+<p>Dialyzer is a tool that will detect discrepancies in your program. It does so using a technique known as success typing analysis which has the advantage of providing no false positives. Dialyzer is able to detect type errors, dead code and more.</p>
+<p>Erlang.mk provides a wrapper around Dialyzer.</p>
<h2 id="_how_it_works">How it works</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Dialyzer requires a PLT file to work. The PLT file contains
-the analysis information from all applications which are not
-expected to change, or rarely do. These would be all the
-dependencies of the application or applications you are
-currently working on, including standard applications in
-Erlang/OTP itself.</p></div>
-<div class="paragraph"><p>Dialyzer can generate this PLT file. Erlang.mk includes rules
-to automatically generate the PLT file when it is missing.</p></div>
-<div class="paragraph"><p>Once the PLT file is generated, Dialyzer can perform the
-analysis in record time.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Dialyzer requires a PLT file to work. The PLT file contains the analysis information from all applications which are not expected to change, or rarely do. These would be all the dependencies of the application or applications you are currently working on, including standard applications in Erlang/OTP itself.</p>
+<p>Dialyzer can generate this PLT file. Erlang.mk includes rules to automatically generate the PLT file when it is missing.</p>
+<p>Once the PLT file is generated, Dialyzer can perform the analysis in record time.</p>
<h2 id="_configuration">Configuration</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>In a typical usage scenario, no variable needs to be set.
-The defaults should be enough. Do note however that the
-dependencies need to be set properly using the <code>DEPS</code> and
-<code>LOCAL_DEPS</code> variables.</p></div>
-<div class="paragraph"><p>The <code>DIALYZER_PLT</code> file indicates where the PLT file will
-be written to (and read from). By default this is
-<em>$(PROJECT).plt</em> in the project&#8217;s directory. Note that
-the <code>DIALYZER_PLT</code> variable is exported and is understood
-by Dialyzer directly.</p></div>
-<div class="paragraph"><p>The <code>PLT_APPS</code> variable can be used to add additional
-applications to the PLT. You can either list application
-names or paths to these applications.</p></div>
-<div class="paragraph"><p>Erlang.mk defines two variables for specifying options
-for the analysis: <code>DIALYZER_DIRS</code> and <code>DIALYZER_OPTS</code>.
-The former one defines which directories should be part
-of the analysis. The latter defines what extra warnings
-Dialyzer should report.</p></div>
-<div class="paragraph"><p>Note that Erlang.mk enables the race condition warnings
-by default. As it can take considerably large resources
-to run, you may want to disable it on larger projects.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>In a typical usage scenario, no variable needs to be set. The defaults should be enough. Do note however that the dependencies need to be set properly using the <code>DEPS</code> and <code>LOCAL_DEPS</code> variables.</p>
+<p>The <code>DIALYZER_PLT</code> file indicates where the PLT file will be written to (and read from). By default this is <em>$(PROJECT).plt</em> in the project&apos;s directory. Note that the <code>DIALYZER_PLT</code> variable is exported and is understood by Dialyzer directly.</p>
+<p>The <code>PLT_APPS</code> variable can be used to add additional applications to the PLT. You can either list application names or paths to these applications.</p>
+<p>Erlang.mk defines two variables for specifying options for the analysis: <code>DIALYZER_DIRS</code> and <code>DIALYZER_OPTS</code>. The former one defines which directories should be part of the analysis. The latter defines what extra warnings Dialyzer should report.</p>
+<p>Note that Erlang.mk enables the race condition warnings by default. As it can take considerably large resources to run, you may want to disable it on larger projects.</p>
<h2 id="_usage">Usage</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>To perform an analysis, run the following command:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>To perform an analysis, run the following command:</p>
+<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 dialyze</tt></pre></div></div>
-<div class="paragraph"><p>This will create the PLT file if it doesn&#8217;t exist.</p></div>
-<div class="paragraph"><p>The analysis will also be performed when you run the
-following command, alongside tests:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>$ make dialyze</tt></pre>
+</div></div>
+<p>This will create the PLT file if it doesn&apos;t exist.</p>
+<p>The analysis will also be performed when you run the following command, alongside tests:</p>
+<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 check</tt></pre></div></div>
-<div class="paragraph"><p>You can use the <code>plt</code> target to create the PLT file if
-it doesn&#8217;t exist. This is normally not necessary as
-Dialyzer creates it automatically.</p></div>
-<div class="paragraph"><p>The PLT file will be removed when you run <code>make distclean</code>.</p></div>
-</div>
-</div>
+<pre><tt>$ make check</tt></pre>
+</div></div>
+<p>You can use the <code>plt</code> target to create the PLT file if it doesn&apos;t exist. This is normally not necessary as Dialyzer creates it automatically.</p>
+<p>The PLT file will be removed when you run <code>make distclean</code>.</p>
+
diff --git a/docs/en/erlang.mk/1/guide/edoc/index.html b/docs/en/erlang.mk/1/guide/edoc/index.html
index cb234d92..06f620ad 100644
--- a/docs/en/erlang.mk/1/guide/edoc/index.html
+++ b/docs/en/erlang.mk/1/guide/edoc/index.html
@@ -62,63 +62,43 @@
<h1 class="lined-header"><span>EDoc comments</span></h1>
-<div class="paragraph"><p>Erlang.mk provides a thin wrapper on top of EDoc, an application
-that generates documentation based on comments found in modules.</p></div>
-<div class="sect1">
+<p>Erlang.mk provides a thin wrapper on top of EDoc, an application that generates documentation based on comments found in modules.</p>
<h2 id="_writing_edoc_comments">Writing EDoc comments</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <a href="http://www.erlang.org/doc/apps/edoc/chapter.html">EDoc user guide</a>
-explains everything you need to know about EDoc comments.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The <a href="http://www.erlang.org/doc/apps/edoc/chapter.html">EDoc user guide</a> explains everything you need to know about EDoc comments.</p>
<h2 id="_configuration">Configuration</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <code>EDOC_OPTS</code> variable allows you to specify additional
-EDoc options. Options are documented in the
-<a href="http://www.erlang.org/doc/man/edoc.html#run-2">EDoc manual</a>.</p></div>
-<div class="paragraph"><p>A common use for this variable is to enable Markdown in doc
-comments, using the <code>edown</code> application:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The <code>EDOC_OPTS</code> variable allows you to specify additional EDoc options. Options are documented in the <a href="http://www.erlang.org/doc/man/edoc.html#run-2">EDoc manual</a>.</p>
+<p>A common use for this variable is to enable Markdown in doc comments, using the <code>edown</code> application:</p>
+<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">DOC_DEPS =</span> edown
-<span style="color: #009900">EDOC_OPTS =</span> {doclet<span style="color: #990000">,</span> edown_doclet}</tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">DOC_DEPS =</font> edown
+<font color="#009900">EDOC_OPTS =</font> {doclet<font color="#990000">,</font> edown_doclet}</tt></pre>
+</div></div>
<h2 id="_usage">Usage</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>To build all documentation, you would typically use:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>To build all documentation, you would typically use:</p>
+<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 docs</tt></pre></div></div>
-<div class="paragraph"><p>Do note, however, that EDoc comments will only be generated
-automatically if the <em>doc/overview.edoc</em> file exists. If you
-do not want that file and still want to generate doc comments,
-two solutions are available.</p></div>
-<div class="paragraph"><p>You can generate EDoc documentation directly:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>$ make docs</tt></pre>
+</div></div>
+<p>Do note, however, that EDoc comments will only be generated automatically if the <em>doc/overview.edoc</em> file exists. If you do not want that file and still want to generate doc comments, two solutions are available.</p>
+<p>You can generate EDoc documentation directly:</p>
+<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 edoc</tt></pre></div></div>
-<div class="paragraph"><p>You can enable automatic generation on <code>make docs</code> by adding
-the following to your Makefile:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>$ make edoc</tt></pre>
+</div></div>
+<p>You can enable automatic generation on <code>make docs</code> by adding the following to your Makefile:</p>
+<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">docs::</span> edoc</tt></pre></div></div>
-</div>
-</div>
+<pre><tt><font color="#990000">docs::</font> edoc</tt></pre>
+</div></div>
+
diff --git a/docs/en/erlang.mk/1/guide/escripts/index.html b/docs/en/erlang.mk/1/guide/escripts/index.html
index fbe0a336..b33b5841 100644
--- a/docs/en/erlang.mk/1/guide/escripts/index.html
+++ b/docs/en/erlang.mk/1/guide/escripts/index.html
@@ -62,96 +62,53 @@
<h1 class="lined-header"><span>Escripts</span></h1>
-<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">
+<p>Escripts are an alternative to release. They are meant to be used for small command line executables written in Erlang.</p>
+<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>
+<p>For self-contained executables, check <a href="../sfx">self-extracting releases</a>.</p>
<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
+<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>
+<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 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">
+<pre><tt>$ make escript <font color="#009900">ESCRIPT_ZIP</font><font color="#990000">=</font>zip</tt></pre>
+</div></div>
<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
+<p>Run the following command to generate an escript:</p>
+<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
+<pre><tt>$ make escript</tt></pre>
+</div></div>
+<p>This will by default create an escript with the same name as the project, in the project&apos;s directory. If the project is called <code>relx</code> then the escript will be in <code>./relx</code>.</p>
+<p>You can run the escript as you would any executable:</p>
+<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">
+<pre><tt>$ <font color="#990000">.</font>/relx</tt></pre>
+</div></div>
<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">
+<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>
+<p><code>ESCRIPT_FILE</code> can be set if you need a different file name or location.</p>
+<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>
+<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>
<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"><!-- Generator: GNU source-highlight
+<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>
+<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 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">escript-zip::</span>
- <span style="color: #009900">$(verbose)</span> <span style="color: #009900">$(ESCRIPT_ZIP)</span> <span style="color: #009900">$(ESCRIPT_ZIP_FILE)</span> priv/templates<span style="color: #990000">/*</span></tt></pre></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">
+<pre><tt><font color="#990000">escript-zip::</font>
+ <font color="#009900">$(verbose)</font> <font color="#009900">$(ESCRIPT_ZIP)</font> <font color="#009900">$(ESCRIPT_ZIP_FILE)</font> priv/templates<font color="#990000">/*</font></tt></pre>
+</div></div>
+<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>
<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>
+<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>
+
diff --git a/docs/en/erlang.mk/1/guide/eunit/index.html b/docs/en/erlang.mk/1/guide/eunit/index.html
index b1d257c2..6073d3f8 100644
--- a/docs/en/erlang.mk/1/guide/eunit/index.html
+++ b/docs/en/erlang.mk/1/guide/eunit/index.html
@@ -62,149 +62,110 @@
<h1 class="lined-header"><span>EUnit</span></h1>
-<div class="paragraph"><p>EUnit is the tool of choice for unit testing. Erlang.mk
-automates a few things on top of EUnit, including the
-discovery and running of unit tests.</p></div>
-<div class="sect1">
+<p>EUnit is the tool of choice for unit testing. Erlang.mk automates a few things on top of EUnit, including the discovery and running of unit tests.</p>
<h2 id="_writing_tests">Writing tests</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <a href="http://www.erlang.org/doc/apps/eunit/chapter.html">EUnit user guide</a>
-is the best place to learn how to write tests. Of note is
-that all functions ending with <code>_test</code> or <code>_test_</code> will be
-picked up as EUnit test cases.</p></div>
-<div class="paragraph"><p>Erlang.mk will automatically pick up tests found in any of
-the Erlang modules of your application. It will also pick up
-tests located in the <em>$(TEST_DIR)</em> directory, which defaults
-to <em>test/</em>.</p></div>
-<div class="paragraph"><p>It is generally a good practice to hide test code from
-the code you ship to production. With Erlang.mk, you can
-do this thanks to the <code>TEST</code> macro. It is only defined
-when running tests:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The <a href="http://www.erlang.org/doc/apps/eunit/chapter.html">EUnit user guide</a> is the best place to learn how to write tests. Of note is that all functions ending with <code>_test</code> or <code>_test_</code> will be picked up as EUnit test cases.</p>
+<p>Erlang.mk will automatically pick up tests found in any of the Erlang modules of your application. It will also pick up tests located in the <em>$(TEST_DIR)</em> directory, which defaults to <em>test/</em>.</p>
+<p>It is generally a good practice to hide test code from the code you ship to production. With Erlang.mk, you can do this thanks to the <code>TEST</code> macro. It is only defined when running tests:</p>
+<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: #000080">-ifdef</span></span>(<span style="color: #009900">TEST</span>)<span style="color: #990000">.</span>
+<pre><tt><b><font color="#000080">-ifdef</font></b>(<font color="#009900">TEST</font>)<font color="#990000">.</font>
-<span style="font-style: italic"><span style="color: #9A1900">%% Insert tests here.</span></span>
+<i><font color="#9A1900">%% Insert tests here.</font></i>
-<span style="font-weight: bold"><span style="color: #000080">-endif</span></span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Be careful, however, if you include the EUnit header file,
-as it also defines the <code>TEST</code> macro. Make sure to only include
-it inside an <code>ifdef</code> block, otherwise tests will always be
-compiled.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<b><font color="#000080">-endif</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Be careful, however, if you include the EUnit header file, as it also defines the <code>TEST</code> macro. Make sure to only include it inside an <code>ifdef</code> block, otherwise tests will always be compiled.</p>
+<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: #000080">-ifdef</span></span>(<span style="color: #009900">TEST</span>)<span style="color: #990000">.</span>
+<pre><tt><b><font color="#000080">-ifdef</font></b>(<font color="#009900">TEST</font>)<font color="#990000">.</font>
-<span style="font-weight: bold"><span style="color: #000080">-include_lib</span></span>(<span style="color: #990000">\</span><span style="color: #FF0000">"eunit/include/eunit.hrl\").</span>
+<b><font color="#000080">-include_lib</font></b>(<font color="#990000">\</font><font color="#FF0000">"eunit/include/eunit.hrl\").</font>
-<span style="color: #FF0000">%% Insert tests here.</span>
+<font color="#FF0000">%% Insert tests here.</font>
-<span style="color: #FF0000">-endif.</span></tt></pre></div></div>
-<div class="paragraph"><p>Erlang.mk will automatically recompile your code when you
-perform a normal build after running tests, and vice versa.</p></div>
-</div>
-</div>
-<div class="sect1">
+<font color="#FF0000">-endif.</font></tt></pre>
+</div></div>
+<p>Erlang.mk will automatically recompile your code when you perform a normal build after running tests, and vice versa.</p>
<h2 id="_configuration">Configuration</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <code>EUNIT_OPTS</code> variable allows you to specify additional
-EUnit options. Options are documented in the
-<a href="http://www.erlang.org/doc/man/eunit.html#test-2">EUnit manual</a>.
-At the time of writing, the only available option is <code>verbose</code>:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The <code>EUNIT_OPTS</code> variable allows you to specify additional EUnit options. Options are documented in the <a href="http://www.erlang.org/doc/man/eunit.html#test-2">EUnit manual</a>. At the time of writing, the only available option is <code>verbose</code>:</p>
+<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">EUNIT_OPTS =</span> verbose</tt></pre></div></div>
-<div class="paragraph"><p>The <code>EUNIT_ERL_OPTS</code> variable allows you to specify options
-to be passed to <code>erl</code> when running EUnit tests. For example,
-you can load the <em>vm.args</em> and <em>sys.config</em> files:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">EUNIT_OPTS =</font> verbose</tt></pre>
+</div></div>
+<p>The <code>EUNIT_ERL_OPTS</code> variable allows you to specify options to be passed to <code>erl</code> when running EUnit tests. For example, you can load the <em>vm.args</em> and <em>sys.config</em> files:</p>
+<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">EUNIT_ERL_OPTS =</span> -args_file rel/vm.args -config rel/sys.config</tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">EUNIT_ERL_OPTS =</font> -args_file rel/vm.args -config rel/sys.config</tt></pre>
+</div></div>
<h2 id="_usage">Usage</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>To run all tests (including EUnit):</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>To run all tests (including EUnit):</p>
+<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 tests</tt></pre></div></div>
-<div class="paragraph"><p>To run all tests and static checks (including EUnit):</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>$ make tests</tt></pre>
+</div></div>
+<p>To run all tests and static checks (including EUnit):</p>
+<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 check</tt></pre></div></div>
-<div class="paragraph"><p>You can also run EUnit separately:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>$ make check</tt></pre>
+</div></div>
+<p>You can also run EUnit separately:</p>
+<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 eunit</tt></pre></div></div>
-<div class="paragraph"><p>EUnit will be quiet by default, only outputting errors.
-You can easily make it verbose for a single invocation:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>$ make eunit</tt></pre>
+</div></div>
+<p>EUnit will be quiet by default, only outputting errors. You can easily make it verbose for a single invocation:</p>
+<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 eunit <span style="color: #009900">EUNIT_OPTS</span><span style="color: #990000">=</span>verbose</tt></pre></div></div>
-<div class="paragraph"><p>Erlang.mk allows you to run all tests from a specific
-module, or a specific test case from that module, using
-the variable <code>t</code>.</p></div>
-<div class="paragraph"><p>For example, to run all tests from the <code>cow_http_hd</code>
-module (instead of all tests from the entire project),
-one could write:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>$ make eunit <font color="#009900">EUNIT_OPTS</font><font color="#990000">=</font>verbose</tt></pre>
+</div></div>
+<p>Erlang.mk allows you to run all tests from a specific module, or a specific test case from that module, using the variable <code>t</code>.</p>
+<p>For example, to run all tests from the <code>cow_http_hd</code> module (instead of all tests from the entire project), one could write:</p>
+<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 eunit <span style="color: #009900">t</span><span style="color: #990000">=</span>cow_http_hd</tt></pre></div></div>
-<div class="paragraph"><p>Similarly, to run a specific test case:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>$ make eunit <font color="#009900">t</font><font color="#990000">=</font>cow_http_hd</tt></pre>
+</div></div>
+<p>Similarly, to run a specific test case:</p>
+<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 eunit <span style="color: #009900">t</span><span style="color: #990000">=</span>cow_http_hd<span style="color: #990000">:</span>parse_accept_test_</tt></pre></div></div>
-<div class="paragraph"><p>To do the same against a multi-application repository,
-you can use the <code>-C</code> option:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>$ make eunit <font color="#009900">t</font><font color="#990000">=</font>cow_http_hd<font color="#990000">:</font>parse_accept_test_</tt></pre>
+</div></div>
+<p>To do the same against a multi-application repository, you can use the <code>-C</code> option:</p>
+<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 -C apps/my_app eunit <span style="color: #009900">t</span><span style="color: #990000">=</span>my_module<span style="color: #990000">:</span>hello_test</tt></pre></div></div>
-<div class="paragraph"><p>Note that this also applies to dependencies. From Cowboy,
-you can run the following directly:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>$ make -C apps/my_app eunit <font color="#009900">t</font><font color="#990000">=</font>my_module<font color="#990000">:</font>hello_test</tt></pre>
+</div></div>
+<p>Note that this also applies to dependencies. From Cowboy, you can run the following directly:</p>
+<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 -C deps/cowlib eunit <span style="color: #009900">t</span><span style="color: #990000">=</span>cow_http_hd</tt></pre></div></div>
-<div class="paragraph"><p>Finally, <a href="../coverage">code coverage</a> is available,
-but covered in its own chapter.</p></div>
-</div>
-</div>
+<pre><tt>$ make -C deps/cowlib eunit <font color="#009900">t</font><font color="#990000">=</font>cow_http_hd</tt></pre>
+</div></div>
+<p>Finally, <a href="../coverage">code coverage</a> is available, but covered in its own chapter.</p>
+
diff --git a/docs/en/erlang.mk/1/guide/external_plugins/index.html b/docs/en/erlang.mk/1/guide/external_plugins/index.html
index da596541..3eaac0d6 100644
--- a/docs/en/erlang.mk/1/guide/external_plugins/index.html
+++ b/docs/en/erlang.mk/1/guide/external_plugins/index.html
@@ -62,154 +62,92 @@
<h1 class="lined-header"><span>External plugins</span></h1>
-<div class="paragraph"><p>It is often convenient to be able to keep the build files
-used by all your projects in one place. Those files could
-be Makefiles, configuration files, templates and more.</p></div>
-<div class="paragraph"><p>Erlang.mk allows you to automatically load plugins from
-dependencies. Plugins can do anything, including defining
-new variables, defining file templates, hooking themselves
-inside the normal Erlang.mk processing or even adding new
-rules.</p></div>
-<div class="paragraph"><p>You can load plugins using one of two methods. You can
-either load all plugins from a dependency, or just one.
-We will also cover conventions about writing external
-plugins.</p></div>
-<div class="sect1">
+<p>It is often convenient to be able to keep the build files used by all your projects in one place. Those files could be Makefiles, configuration files, templates and more.</p>
+<p>Erlang.mk allows you to automatically load plugins from dependencies. Plugins can do anything, including defining new variables, defining file templates, hooking themselves inside the normal Erlang.mk processing or even adding new rules.</p>
+<p>You can load plugins using one of two methods. You can either load all plugins from a dependency, or just one. We will also cover conventions about writing external plugins.</p>
<h2 id="_loading_all_plugins_from_a_dependency">Loading all plugins from a dependency</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>To load plugins from a dependency, all you need to do is add
-the dependency name to <code>DEP_PLUGINS</code> in addition to the list
-of dependencies.</p></div>
-<div class="paragraph"><p>For example, if you have <code>cowboy</code> in <code>DEPS</code>, add <code>cowboy</code> in
-<code>DEP_PLUGINS</code> also:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>To load plugins from a dependency, all you need to do is add the dependency name to <code>DEP_PLUGINS</code> in addition to the list of dependencies.</p>
+<p>For example, if you have <code>cowboy</code> in <code>DEPS</code>, add <code>cowboy</code> in <code>DEP_PLUGINS</code> also:</p>
+<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">DEPS =</span> cowboy
-<span style="color: #009900">DEP_PLUGINS =</span> cowboy</tt></pre></div></div>
-<div class="paragraph"><p>This will load the file <em>plugins.mk</em> in the root folder of
-the Cowboy repository.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">DEPS =</font> cowboy
+<font color="#009900">DEP_PLUGINS =</font> cowboy</tt></pre>
+</div></div>
+<p>This will load the file <em>plugins.mk</em> in the root folder of the Cowboy repository.</p>
<h2 id="_loading_one_plugin_from_a_dependency">Loading one plugin from a dependency</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Now that we know how to load all plugins, let&#8217;s take a look
-at how to load one specific plugin from a dependency.</p></div>
-<div class="paragraph"><p>To do this, instead of writing only the name of the dependency,
-we will write its name and the path to the plugin file. This
-means that writing <code>DEP_PLUGINS = cowboy</code> is equivalent to
-writing <code>DEP_PLUGINS = cowboy/plugins.mk</code>.</p></div>
-<div class="paragraph"><p>Knowing this, if we were to load the plugin <em>mk/dist.mk</em>
-from Cowboy and no other, we would write the following in
-our Makefile:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Now that we know how to load all plugins, let&apos;s take a look at how to load one specific plugin from a dependency.</p>
+<p>To do this, instead of writing only the name of the dependency, we will write its name and the path to the plugin file. This means that writing <code>DEP_PLUGINS = cowboy</code> is equivalent to writing <code>DEP_PLUGINS = cowboy/plugins.mk</code>.</p>
+<p>Knowing this, if we were to load the plugin <em>mk/dist.mk</em> from Cowboy and no other, we would write the following in our Makefile:</p>
+<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">DEPS =</span> cowboy
-<span style="color: #009900">DEP_PLUGINS =</span> cowboy/mk/dist.mk</tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">DEPS =</font> cowboy
+<font color="#009900">DEP_PLUGINS =</font> cowboy/mk/dist.mk</tt></pre>
+</div></div>
<h2 id="_writing_external_plugins">Writing external plugins</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <em>plugins.mk</em> file is a convention. It is meant to load
-all the plugins from the dependency. The code for the plugin
-can be written directly in <em>plugins.mk</em> or be separate.</p></div>
-<div class="paragraph"><p>If you are providing more than one plugin with your repository,
-the recommended way is to create one file per plugin in the
-<em>mk/</em> folder in your repository, and then include those
-individual plugins in <em>plugins.mk</em>.</p></div>
-<div class="paragraph"><p>For example, if you have two plugins <em>mk/dist.mk</em> and
-<em>mk/templates.mk</em>, you could write the following <em>plugins.mk</em>
-file:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The <em>plugins.mk</em> file is a convention. It is meant to load all the plugins from the dependency. The code for the plugin can be written directly in <em>plugins.mk</em> or be separate.</p>
+<p>If you are providing more than one plugin with your repository, the recommended way is to create one file per plugin in the <em>mk/</em> folder in your repository, and then include those individual plugins in <em>plugins.mk</em>.</p>
+<p>For example, if you have two plugins <em>mk/dist.mk</em> and <em>mk/templates.mk</em>, you could write the following <em>plugins.mk</em> file:</p>
+<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">THIS :=</span> <span style="color: #009900">$(</span>dir <span style="color: #009900">$(</span>realpath <span style="color: #009900">$(</span>lastword <span style="color: #009900">$(MAKEFILE_LIST))))</span>
-include <span style="color: #009900">$(THIS)</span>/mk/dist.mk
-include <span style="color: #009900">$(THIS)</span>/mk/templates.mk</tt></pre></div></div>
-<div class="paragraph"><p>The <code>THIS</code> variable is required to relatively include files.</p></div>
-<div class="paragraph"><p>This allows users to not only be able to select individual
-plugins, but also select all plugins from the dependency
-in one go if they wish to do so.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#990000">THIS :=</font> <font color="#009900">$(</font>dir <font color="#009900">$(</font>realpath <font color="#009900">$(</font>lastword <font color="#009900">$(MAKEFILE_LIST))))</font>
+include <font color="#009900">$(THIS)</font>/mk/dist.mk
+include <font color="#009900">$(THIS)</font>/mk/templates.mk</tt></pre>
+</div></div>
+<p>The <code>THIS</code> variable is required to relatively include files.</p>
+<p>This allows users to not only be able to select individual plugins, but also select all plugins from the dependency in one go if they wish to do so.</p>
<h2 id="_early_stage_plugins">Early-stage plugins</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Plugins declared in <code>DEP_PLUGINS</code> are loaded near the end of Erlang.mk.
-That&#8217;s why you have access to all previously initialized variables.
-However, if you want your plugin to add common dependencies to
-your applications, a regular is loaded too late in the process.
-You need to use "Early-stage plugins". They are declared using the
-<code>DEP_EARLY_PLUGINS</code> variable instead. Plugins listed in this variable
-are loaded near the beginning of Erlang.mk Otherwise, they work exactly
-the same.</p></div>
-<div class="paragraph"><p>If you only give the name of a dependency, the default file loaded is
-<em>early-plugins.mk</em>. You can specify a filename exactly like you would
-have done it with regular plugins.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Plugins declared in <code>DEP_PLUGINS</code> are loaded near the end of Erlang.mk. That&apos;s why you have access to all previously initialized variables. However, if you want your plugin to add common dependencies to your applications, a regular is loaded too late in the process. You need to use &quot;Early-stage plugins&quot;. They are declared using the <code>DEP_EARLY_PLUGINS</code> variable instead. Plugins listed in this variable are loaded near the beginning of Erlang.mk Otherwise, they work exactly the same.</p>
+<p>If you only give the name of a dependency, the default file loaded is <em>early-plugins.mk</em>. You can specify a filename exactly like you would have done it with regular plugins.</p>
+<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-style: italic"><span style="color: #9A1900"># In your application's Makefile</span></span>
-<span style="color: #009900">BUILD_DEPS =</span> common_deps
-<span style="color: #009900">DEP_EARLY_PLUGINS =</span> common_deps</tt></pre></div></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><i><font color="#9A1900"># In your application's Makefile</font></i>
+<font color="#009900">BUILD_DEPS =</font> common_deps
+<font color="#009900">DEP_EARLY_PLUGINS =</font> common_deps</tt></pre>
+</div></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="font-style: italic"><span style="color: #9A1900"># In the plugin's early-plugins.mk</span></span>
-DEPS <span style="color: #990000">+=</span> cowboy
-<span style="color: #009900">TEST_DEPS =</span> ct_helper
-<span style="color: #009900">dep_ct_helper =</span> git https<span style="color: #990000">:</span>//github.com/ninenines/ct_helper master</tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
-<h2 id="_loading_plugins_local_to_the_application">Loading plugins local to the application</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>If the Erlang.mk plugin lives in the same directory or repository as your
-application or library, then you can load it exactly like an external
-plugin: the dependency name is simply the name of your application or
-library.</p></div>
-<div class="paragraph"><p>For example, the following Makefile loads a plugin in the <em>mk</em>
-subdirectory:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><i><font color="#9A1900"># In the plugin's early-plugins.mk</font></i>
+DEPS <font color="#990000">+=</font> cowboy
+<font color="#009900">TEST_DEPS =</font> ct_helper
+<font color="#009900">dep_ct_helper =</font> git https<font color="#990000">:</font>//github.com/ninenines/ct_helper master</tt></pre>
+</div></div>
+<h2 id="_loading__plugins_local_to_the_application">Loading plugins local to the application</h2>
+<p>If the Erlang.mk plugin lives in the same directory or repository as your application or library, then you can load it exactly like an external plugin: the dependency name is simply the name of your application or library.</p>
+<p>For example, the following Makefile loads a plugin in the <em>mk</em> subdirectory:</p>
+<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">DEP_PLUGINS =</span> <span style="color: #009900">$(PROJECT)</span>/mk/dist.mk</tt></pre></div></div>
-<div class="paragraph"><p>This also works with early-stage plugins:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">DEP_PLUGINS =</font> <font color="#009900">$(PROJECT)</font>/mk/dist.mk</tt></pre>
+</div></div>
+<p>This also works with early-stage plugins:</p>
+<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">DEP_EARLY_PLUGINS =</span> <span style="color: #009900">$(PROJECT)</span>/mk/variables.mk</tt></pre></div></div>
-<div class="paragraph"><p>Like external plugins, if you do not specify the path to the plugin, it
-defaults to <em>plugins.mk</em> or <em>early-plugins.mk</em>, located at the root of
-your application:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">DEP_EARLY_PLUGINS =</font> <font color="#009900">$(PROJECT)</font>/mk/variables.mk</tt></pre>
+</div></div>
+<p>Like external plugins, if you do not specify the path to the plugin, it defaults to <em>plugins.mk</em> or <em>early-plugins.mk</em>, located at the root of your application:</p>
+<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-style: italic"><span style="color: #9A1900"># Loads ./early-plugins.mk</span></span>
-<span style="color: #009900">DEP_EARLY_PLUGINS =</span> <span style="color: #009900">$(PROJECT)</span>
-<span style="font-style: italic"><span style="color: #9A1900"># Loads ./plugins.mk</span></span>
-<span style="color: #009900">DEP_PLUGINS =</span> <span style="color: #009900">$(PROJECT)</span></tt></pre></div></div>
-</div>
-</div>
+<pre><tt><i><font color="#9A1900"># Loads ./early-plugins.mk</font></i>
+<font color="#009900">DEP_EARLY_PLUGINS =</font> <font color="#009900">$(PROJECT)</font>
+<i><font color="#9A1900"># Loads ./plugins.mk</font></i>
+<font color="#009900">DEP_PLUGINS =</font> <font color="#009900">$(PROJECT)</font></tt></pre>
+</div></div>
+
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 37c88134..ddcd559d 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
@@ -62,87 +62,30 @@
<h1 class="lined-header"><span>List of plugins</span></h1>
-<div class="paragraph"><p>This is a non-exhaustive list of Erlang.mk plugins, sorted
-alphabetically.</p></div>
-<div class="sect1">
+<p>This is a non-exhaustive list of Erlang.mk plugins, sorted alphabetically.</p>
<h2 id="_efene_mk">efene.mk</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>An <a href="https://github.com/ninenines/efene.mk">Efene plugin</a> for Erlang.mk.
-<a href="http://efene.org/">Efene</a> is an alternative language for the BEAM.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>An <a href="https://github.com/ninenines/efene.mk">Efene plugin</a> for Erlang.mk. <a href="http://efene.org/">Efene</a> is an alternative language for the BEAM.</p>
<h2 id="_elixir_mk">elixir.mk</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>An <a href="https://github.com/botsunit/elixir.mk">Elixir plugin</a> for
-Erlang.mk. <a href="http://elixir-lang.org/">Elixir</a> is an alternative
-language for the BEAM.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>An <a href="https://github.com/botsunit/elixir.mk">Elixir plugin</a> for Erlang.mk. <a href="http://elixir-lang.org/">Elixir</a> is an alternative language for the BEAM.</p>
<h2 id="_elvis_mk">elvis.mk</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>An <a href="https://github.com/inaka/elvis.mk">Elvis plugin</a> for Erlang.mk.
-Elvis is an <a href="https://github.com/inaka/elvis">Erlang style reviewer</a>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>An <a href="https://github.com/inaka/elvis.mk">Elvis plugin</a> for Erlang.mk. Elvis is an <a href="https://github.com/inaka/elvis">Erlang style reviewer</a>.</p>
<h2 id="_geas">geas</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="https://github.com/crownedgrouse/geas">Geas</a> gives aggregated
-information on a project and its dependencies, and is available
-as an Erlang.mk plugin.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p><a href="https://github.com/crownedgrouse/geas">Geas</a> gives aggregated information on a project and its dependencies, and is available as an Erlang.mk plugin.</p>
<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
-using the <code>hexer</code> tool.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>An <a href="https://github.com/inaka/hexer.mk">Hex plugin</a> for Erlang.mk using the <code>hexer</code> tool.</p>
<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">
+<p>Another <a href="https://github.com/botsunit/hexpm.mk">Hex plugin</a> for Erlang.mk, with support for Hex dependency operators.</p>
<h2 id="_jorel">jorel</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="https://github.com/emedia-project/jorel">Jorel</a> is Just anOther RELease
-assembler for Erlang/OTP, and is available as an Erlang.mk plugin.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p><a href="https://github.com/emedia-project/jorel">Jorel</a> is Just anOther RELease assembler for Erlang/OTP, and is available as an Erlang.mk plugin.</p>
<h2 id="_lfe_mk">lfe.mk</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>An <a href="https://github.com/ninenines/lfe.mk">LFE plugin</a> for Erlang.mk.
-LFE, or <a href="http://lfe.io/">Lisp Flavoured Erlang</a>, is an alternative
-language for the BEAM.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>An <a href="https://github.com/ninenines/lfe.mk">LFE plugin</a> for Erlang.mk. LFE, or <a href="http://lfe.io/">Lisp Flavoured Erlang</a>, is an alternative language for the BEAM.</p>
<h2 id="_mix_mk">mix.mk</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A <a href="https://github.com/botsunit/mix.mk">Mix plugin</a> for Erlang.mk,
-to generate a compatible configuration file for
-<a href="http://elixir-lang.org/getting-started/mix-otp/introduction-to-mix.html">Mix</a>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>A <a href="https://github.com/botsunit/mix.mk">Mix plugin</a> for Erlang.mk, to generate a compatible configuration file for <a href="http://elixir-lang.org/getting-started/mix-otp/introduction-to-mix.html">Mix</a>.</p>
<h2 id="_reload_mk">reload.mk</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A <a href="https://github.com/bullno1/reload.mk">live reload plugin</a> for Erlang.mk.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>A <a href="https://github.com/bullno1/reload.mk">live reload plugin</a> for Erlang.mk.</p>
<h2 id="_rust_mk">rust.mk</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A <a href="https://github.com/goertzenator/rust.mk">plugin</a> to build <a href="https://www.rust-lang.org/">Rust</a> crates and install binaries into <code>priv/</code>.</p></div>
-</div>
-</div>
+<p>A <a href="https://github.com/goertzenator/rust.mk">plugin</a> to build <a href="https://www.rust-lang.org/">Rust</a> crates and install binaries into <code>priv/</code>.</p>
+
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 70ea7527..e6f3b05f 100644
--- a/docs/en/erlang.mk/1/guide/getting_started/index.html
+++ b/docs/en/erlang.mk/1/guide/getting_started/index.html
@@ -62,362 +62,258 @@
<h1 class="lined-header"><span>Getting started</span></h1>
-<div class="paragraph"><p>This chapter explains how to get started using Erlang.mk.</p></div>
-<div class="sect1">
+<p>This chapter explains how to get started using Erlang.mk.</p>
<h2 id="_creating_a_folder_for_your_project">Creating a folder for your project</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The first step is always to create a new folder that will
-contain your project.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The first step is always to create a new folder that will contain your project.</p>
+<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 hello_joe
-$ cd hello_joe</tt></pre></div></div>
-<div class="paragraph"><p>Most people tend to put all their projects side by side in
-a common folder. We recommend keeping an organization similar
-to your remote repositories. For example, for GitHub users,
-put all your projects in a common folder with the same name
-as your username. For example <em>$HOME/ninenines/cowboy</em> for
-the Cowboy project.</p></div>
-</div>
-</div>
-<div class="sect1">
+$ cd hello_joe</tt></pre>
+</div></div>
+<p>Most people tend to put all their projects side by side in a common folder. We recommend keeping an organization similar to your remote repositories. For example, for GitHub users, put all your projects in a common folder with the same name as your username. For example <em>$HOME/ninenines/cowboy</em> for the Cowboy project.</p>
<h2 id="_downloading_erlang_mk">Downloading Erlang.mk</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>At the time of writing, Erlang.mk is unlikely to be present
-in your Erlang distribution, or even in your OS packages.</p></div>
-<div class="paragraph"><p>The next step is therefore to download it:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>At the time of writing, Erlang.mk is unlikely to be present in your Erlang distribution, or even in your OS packages.</p>
+<p>The next step is therefore to download it:</p>
+<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>$ wget 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>Or:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>$ wget https<font color="#990000">:</font>//erlang<font color="#990000">.</font>mk/erlang<font color="#990000">.</font>mk</tt></pre>
+</div></div>
+<p>Or:</p>
+<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>$ 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>
-</div>
-<div class="sect1">
+<pre><tt>$ curl -O https<font color="#990000">:</font>//erlang<font color="#990000">.</font>mk/erlang<font color="#990000">.</font>mk</tt></pre>
+</div></div>
+<p>Alternatively, just <a href="https://erlang.mk/erlang.mk">click on this link</a>.</p>
+<p>Make sure you put the file inside the folder we created previously.</p>
<h2 id="_getting_started_with_otp_applications">Getting started with OTP applications</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>An OTP application is an Erlang application that has a supervision
-tree. In other words, it will always have processes running.</p></div>
-<div class="paragraph"><p>This kind of project can be automatically generated by Erlang.mk.
-All you need to do is use the <code>bootstrap</code> target:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>An OTP application is an Erlang application that has a supervision tree. In other words, it will always have processes running.</p>
+<p>This kind of project can be automatically generated by Erlang.mk. All you need to do is use the <code>bootstrap</code> target:</p>
+<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 -f erlang<span style="color: #990000">.</span>mk bootstrap</tt></pre></div></div>
-<div class="paragraph"><p>Something similar to the following snippet will then appear
-on your screen:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>$ make -f erlang<font color="#990000">.</font>mk bootstrap</tt></pre>
+</div></div>
+<p>Something similar to the following snippet will then appear on your screen:</p>
+<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>git clone https<span style="color: #990000">:</span>//github<span style="color: #990000">.</span>com/ninenines/erlang<span style="color: #990000">.</span>mk <span style="color: #990000">.</span>erlang<span style="color: #990000">.</span>mk<span style="color: #990000">.</span>build
-Cloning into <span style="color: #FF0000">'.erlang.mk.build'</span><span style="color: #990000">...</span>
-remote<span style="color: #990000">:</span> Counting objects<span style="color: #990000">:</span> <span style="color: #993399">4035</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">done</span></span><span style="color: #990000">.</span>
-remote<span style="color: #990000">:</span> Compressing objects<span style="color: #990000">:</span> <span style="color: #993399">100</span><span style="color: #990000">%</span> <span style="color: #990000">(</span><span style="color: #993399">12</span><span style="color: #990000">/</span><span style="color: #993399">12</span><span style="color: #990000">),</span> <span style="font-weight: bold"><span style="color: #0000FF">done</span></span><span style="color: #990000">.</span>
-remote<span style="color: #990000">:</span> Total <span style="color: #993399">4035</span> <span style="color: #990000">(</span>delta <span style="color: #993399">8</span><span style="color: #990000">),</span> reused <span style="color: #993399">4</span> <span style="color: #990000">(</span>delta <span style="color: #993399">4</span><span style="color: #990000">),</span> pack-reused <span style="color: #993399">4019</span>
-Receiving objects<span style="color: #990000">:</span> <span style="color: #993399">100</span><span style="color: #990000">%</span> <span style="color: #990000">(</span><span style="color: #993399">4035</span><span style="color: #990000">/</span><span style="color: #993399">4035</span><span style="color: #990000">),</span> <span style="color: #993399">1.10</span> MiB <span style="color: #990000">|</span> <span style="color: #993399">784.00</span> KiB/s<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">done</span></span><span style="color: #990000">.</span>
-Resolving deltas<span style="color: #990000">:</span> <span style="color: #993399">100</span><span style="color: #990000">%</span> <span style="color: #990000">(</span><span style="color: #993399">2442</span><span style="color: #990000">/</span><span style="color: #993399">2442</span><span style="color: #990000">),</span> <span style="font-weight: bold"><span style="color: #0000FF">done</span></span><span style="color: #990000">.</span>
-Checking connectivity<span style="color: #990000">...</span> <span style="font-weight: bold"><span style="color: #0000FF">done</span></span><span style="color: #990000">.</span>
-<span style="font-weight: bold"><span style="color: #0000FF">if</span></span> <span style="color: #990000">[</span> -f build<span style="color: #990000">.</span>config <span style="color: #990000">];</span> <span style="font-weight: bold"><span style="color: #0000FF">then</span></span> cp build<span style="color: #990000">.</span>config <span style="color: #990000">.</span>erlang<span style="color: #990000">.</span>mk<span style="color: #990000">.</span>build<span style="color: #990000">;</span> <span style="font-weight: bold"><span style="color: #0000FF">fi</span></span>
-cd <span style="color: #990000">.</span>erlang<span style="color: #990000">.</span>mk<span style="color: #990000">.</span>build <span style="color: #990000">&amp;&amp;</span> make
-make<span style="color: #990000">[</span><span style="color: #993399">1</span><span style="color: #990000">]:</span> Entering directory <span style="color: #FF0000">'/home/essen/tmp/hello_joe/.erlang.mk.build'</span>
-awk <span style="color: #FF0000">'FNR==1 &amp;&amp; NR!=1{print ""}1'</span> core/core<span style="color: #990000">.</span>mk index<span style="color: #990000">/*.</span>mk core/index<span style="color: #990000">.</span>mk core/deps<span style="color: #990000">.</span>mk plugins/protobuffs<span style="color: #990000">.</span>mk core/erlc<span style="color: #990000">.</span>mk core/docs<span style="color: #990000">.</span>mk core/test<span style="color: #990000">.</span>mk plugins/asciidoc<span style="color: #990000">.</span>mk plugins/bootstrap<span style="color: #990000">.</span>mk plugins/c_src<span style="color: #990000">.</span>mk plugins/ci<span style="color: #990000">.</span>mk plugins/ct<span style="color: #990000">.</span>mk plugins/dialyzer<span style="color: #990000">.</span>mk plugins/edoc<span style="color: #990000">.</span>mk plugins/elvis<span style="color: #990000">.</span>mk plugins/erlydtl<span style="color: #990000">.</span>mk plugins/escript<span style="color: #990000">.</span>mk plugins/eunit<span style="color: #990000">.</span>mk plugins/relx<span style="color: #990000">.</span>mk plugins/shell<span style="color: #990000">.</span>mk plugins/triq<span style="color: #990000">.</span>mk plugins/xref<span style="color: #990000">.</span>mk plugins/cover<span style="color: #990000">.</span>mk <span style="color: #990000">\</span>
- <span style="color: #990000">|</span> sed <span style="color: #FF0000">'s/^ERLANG_MK_VERSION = .*/ERLANG_MK_VERSION = 1.2.0-642-gccd2b9f/'</span> <span style="color: #990000">&gt;</span> erlang<span style="color: #990000">.</span>mk
-make<span style="color: #990000">[</span><span style="color: #993399">1</span><span style="color: #990000">]:</span> Leaving directory <span style="color: #FF0000">'/home/essen/tmp/hello_joe/.erlang.mk.build'</span>
-cp <span style="color: #990000">.</span>erlang<span style="color: #990000">.</span>mk<span style="color: #990000">.</span>build/erlang<span style="color: #990000">.</span>mk <span style="color: #990000">.</span>/erlang<span style="color: #990000">.</span>mk
-rm -rf <span style="color: #990000">.</span>erlang<span style="color: #990000">.</span>mk<span style="color: #990000">.</span>build</tt></pre></div></div>
-<div class="paragraph"><p>This is Erlang.mk bootstrapping itself. Indeed, the file you
-initially downloaded contains nothing more than the code needed
-to bootstrap. This operation is done only once. Consult the
-<a href="../updating">Updating Erlang.mk</a> chapter for more
-information.</p></div>
-<div class="paragraph"><p>Of course, the generated project can now be compiled:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>git clone https<font color="#990000">:</font>//github<font color="#990000">.</font>com/ninenines/erlang<font color="#990000">.</font>mk <font color="#990000">.</font>erlang<font color="#990000">.</font>mk<font color="#990000">.</font>build
+Cloning into <font color="#FF0000">'.erlang.mk.build'</font><font color="#990000">...</font>
+remote<font color="#990000">:</font> Counting objects<font color="#990000">:</font> <font color="#993399">4035</font><font color="#990000">,</font> <b><font color="#0000FF">done</font></b><font color="#990000">.</font>
+remote<font color="#990000">:</font> Compressing objects<font color="#990000">:</font> <font color="#993399">100</font><font color="#990000">%</font> <font color="#990000">(</font><font color="#993399">12</font><font color="#990000">/</font><font color="#993399">12</font><font color="#990000">),</font> <b><font color="#0000FF">done</font></b><font color="#990000">.</font>
+remote<font color="#990000">:</font> Total <font color="#993399">4035</font> <font color="#990000">(</font>delta <font color="#993399">8</font><font color="#990000">),</font> reused <font color="#993399">4</font> <font color="#990000">(</font>delta <font color="#993399">4</font><font color="#990000">),</font> pack-reused <font color="#993399">4019</font>
+Receiving objects<font color="#990000">:</font> <font color="#993399">100</font><font color="#990000">%</font> <font color="#990000">(</font><font color="#993399">4035</font><font color="#990000">/</font><font color="#993399">4035</font><font color="#990000">),</font> <font color="#993399">1.10</font> MiB <font color="#990000">|</font> <font color="#993399">784.00</font> KiB/s<font color="#990000">,</font> <b><font color="#0000FF">done</font></b><font color="#990000">.</font>
+Resolving deltas<font color="#990000">:</font> <font color="#993399">100</font><font color="#990000">%</font> <font color="#990000">(</font><font color="#993399">2442</font><font color="#990000">/</font><font color="#993399">2442</font><font color="#990000">),</font> <b><font color="#0000FF">done</font></b><font color="#990000">.</font>
+Checking connectivity<font color="#990000">...</font> <b><font color="#0000FF">done</font></b><font color="#990000">.</font>
+<b><font color="#0000FF">if</font></b> <font color="#990000">[</font> -f build<font color="#990000">.</font>config <font color="#990000">];</font> <b><font color="#0000FF">then</font></b> cp build<font color="#990000">.</font>config <font color="#990000">.</font>erlang<font color="#990000">.</font>mk<font color="#990000">.</font>build<font color="#990000">;</font> <b><font color="#0000FF">fi</font></b>
+cd <font color="#990000">.</font>erlang<font color="#990000">.</font>mk<font color="#990000">.</font>build <font color="#990000">&amp;&amp;</font> make
+make<font color="#990000">[</font><font color="#993399">1</font><font color="#990000">]:</font> Entering directory <font color="#FF0000">'/home/essen/tmp/hello_joe/.erlang.mk.build'</font>
+awk <font color="#FF0000">'FNR==1 &amp;&amp; NR!=1{print ""}1'</font> core/core<font color="#990000">.</font>mk index<font color="#990000">/*.</font>mk core/index<font color="#990000">.</font>mk core/deps<font color="#990000">.</font>mk plugins/protobuffs<font color="#990000">.</font>mk core/erlc<font color="#990000">.</font>mk core/docs<font color="#990000">.</font>mk core/test<font color="#990000">.</font>mk plugins/asciidoc<font color="#990000">.</font>mk plugins/bootstrap<font color="#990000">.</font>mk plugins/c_src<font color="#990000">.</font>mk plugins/ci<font color="#990000">.</font>mk plugins/ct<font color="#990000">.</font>mk plugins/dialyzer<font color="#990000">.</font>mk plugins/edoc<font color="#990000">.</font>mk plugins/elvis<font color="#990000">.</font>mk plugins/erlydtl<font color="#990000">.</font>mk plugins/escript<font color="#990000">.</font>mk plugins/eunit<font color="#990000">.</font>mk plugins/relx<font color="#990000">.</font>mk plugins/shell<font color="#990000">.</font>mk plugins/triq<font color="#990000">.</font>mk plugins/xref<font color="#990000">.</font>mk plugins/cover<font color="#990000">.</font>mk <font color="#990000">\</font>
+ <font color="#990000">|</font> sed <font color="#FF0000">'s/^ERLANG_MK_VERSION = .*/ERLANG_MK_VERSION = 1.2.0-642-gccd2b9f/'</font> <font color="#990000">&gt;</font> erlang<font color="#990000">.</font>mk
+make<font color="#990000">[</font><font color="#993399">1</font><font color="#990000">]:</font> Leaving directory <font color="#FF0000">'/home/essen/tmp/hello_joe/.erlang.mk.build'</font>
+cp <font color="#990000">.</font>erlang<font color="#990000">.</font>mk<font color="#990000">.</font>build/erlang<font color="#990000">.</font>mk <font color="#990000">.</font>/erlang<font color="#990000">.</font>mk
+rm -rf <font color="#990000">.</font>erlang<font color="#990000">.</font>mk<font color="#990000">.</font>build</tt></pre>
+</div></div>
+<p>This is Erlang.mk bootstrapping itself. Indeed, the file you initially downloaded contains nothing more than the code needed to bootstrap. This operation is done only once. Consult the <a href="../updating">Updating Erlang.mk</a> chapter for more information.</p>
+<p>Of course, the generated project can now be compiled:</p>
+<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</tt></pre></div></div>
-<div class="paragraph"><p>Cheers!</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>$ make</tt></pre>
+</div></div>
+<p>Cheers!</p>
<h2 id="_getting_started_with_otp_libraries">Getting started with OTP libraries</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>An OTP library is an Erlang application that has no supervision
-tree. In other words, it is nothing but modules.</p></div>
-<div class="paragraph"><p>This kind of project can also be generated by Erlang.mk, using
-the <code>bootstrap-lib</code> target:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>An OTP library is an Erlang application that has no supervision tree. In other words, it is nothing but modules.</p>
+<p>This kind of project can also be generated by Erlang.mk, using the <code>bootstrap-lib</code> target:</p>
+<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 -f erlang<span style="color: #990000">.</span>mk bootstrap-lib</tt></pre></div></div>
-<div class="paragraph"><p>Erlang.mk will once again bootstrap itself and generate all
-the files for your project. You can now compile it:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>$ make -f erlang<font color="#990000">.</font>mk bootstrap-lib</tt></pre>
+</div></div>
+<p>Erlang.mk will once again bootstrap itself and generate all the files for your project. You can now compile it:</p>
+<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</tt></pre></div></div>
-<div class="paragraph"><p>Enjoy!</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>$ make</tt></pre>
+</div></div>
+<p>Enjoy!</p>
<h2 id="_getting_started_with_otp_releases">Getting started with OTP releases</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>An OTP release is the combination of the Erlang RunTime System (ERTS)
-along with all the libraries and files that your node will need
-to run. It is entirely self contained, and can often be sent as-is
-to your production system and run without any extra setup.</p></div>
-<div class="paragraph"><p>Erlang.mk can of course bootstrap your project to generate releases.
-You can use the <code>bootstrap-rel</code> target for this purpose:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>An OTP release is the combination of the Erlang RunTime System (ERTS) along with all the libraries and files that your node will need to run. It is entirely self contained, and can often be sent as-is to your production system and run without any extra setup.</p>
+<p>Erlang.mk can of course bootstrap your project to generate releases. You can use the <code>bootstrap-rel</code> target for this purpose:</p>
+<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 bootstrap-rel</tt></pre></div></div>
-<div class="paragraph"><p>This target can be combined with <code>bootstrap</code> or <code>bootstrap-lib</code> to
-create a project that will build a release:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>$ make bootstrap-rel</tt></pre>
+</div></div>
+<p>This target can be combined with <code>bootstrap</code> or <code>bootstrap-lib</code> to create a project that will build a release:</p>
+<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 -f erlang<span style="color: #990000">.</span>mk bootstrap-lib bootstrap-rel</tt></pre></div></div>
-<div class="paragraph"><p>It is often very useful to keep the top-level project for
-commands useful during operations, and put the components
-of the system in separate applications that you will then
-depend on. Consult the <a href="../deps">Packages and dependencies</a>
-chapter for more information.</p></div>
-<div class="paragraph"><p>When you run <code>make</code> from now on, Erlang.mk will compile your
-project and build the release:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>$ make -f erlang<font color="#990000">.</font>mk bootstrap-lib bootstrap-rel</tt></pre>
+</div></div>
+<p>It is often very useful to keep the top-level project for commands useful during operations, and put the components of the system in separate applications that you will then depend on. Consult the <a href="../deps">Packages and dependencies</a> chapter for more information.</p>
+<p>When you run <code>make</code> from now on, Erlang.mk will compile your project and build the release:</p>
+<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
- APP hello_joe<span style="color: #990000">.</span>app<span style="color: #990000">.</span>src
+ APP hello_joe<font color="#990000">.</font>app<font color="#990000">.</font>src
GEN distclean-relx-rel
GEN /home/essen/tmp/hello_joe/relx
-<span style="color: #990000">===&gt;</span> Starting relx build process <span style="color: #990000">...</span>
-<span style="color: #990000">===&gt;</span> Resolving OTP Applications from directories<span style="color: #990000">:</span>
+<font color="#990000">===&gt;</font> Starting relx build process <font color="#990000">...</font>
+<font color="#990000">===&gt;</font> Resolving OTP Applications from directories<font color="#990000">:</font>
/home/essen/tmp/hello_joe/ebin
/usr/lib/erlang/lib
/home/essen/tmp/hello_joe/deps
-<span style="color: #990000">===&gt;</span> Resolved hello_joe_release-<span style="color: #993399">1</span>
-<span style="color: #990000">===&gt;</span> Including Erts from /usr/lib/erlang
-<span style="color: #990000">===&gt;</span> release successfully created<span style="color: #990000">!</span></tt></pre></div></div>
-<div class="paragraph"><p>The first time you run this command, Erlang.mk will download
-<em>relx</em>, the release building tool. So don&#8217;t worry if you see
-more output than above.</p></div>
-<div class="paragraph"><p>If building the release is slow, no need to upgrade your
-hardware just yet. Just consult the <a href="../relx">Releases</a>
-chapter for various tips to speed up build time during
-development.</p></div>
-<div class="paragraph"><p>You can start the release using the <em>./_rel/hello_joe_release/bin/hello_joe_release</em>
-script, or simply run <code>make run</code>. The latter will also compile
-your project and build the release if it wasn&#8217;t already:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<font color="#990000">===&gt;</font> Resolved hello_joe_release-<font color="#993399">1</font>
+<font color="#990000">===&gt;</font> Including Erts from /usr/lib/erlang
+<font color="#990000">===&gt;</font> release successfully created<font color="#990000">!</font></tt></pre>
+</div></div>
+<p>The first time you run this command, Erlang.mk will download <em>relx</em>, the release building tool. So don&apos;t worry if you see more output than above.</p>
+<p>If building the release is slow, no need to upgrade your hardware just yet. Just consult the <a href="../relx">Releases</a> chapter for various tips to speed up build time during development.</p>
+<p>You can start the release using the <em>./_rel/hello_joe_release/bin/hello_joe_release</em> script, or simply run <code>make run</code>. The latter will also compile your project and build the release if it wasn&apos;t already:</p>
+<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 run
- APP hello_joe<span style="color: #990000">.</span>app<span style="color: #990000">.</span>src
+ APP hello_joe<font color="#990000">.</font>app<font color="#990000">.</font>src
GEN distclean-relx-rel
-<span style="color: #990000">===&gt;</span> Starting relx build process <span style="color: #990000">...</span>
-<span style="color: #990000">===&gt;</span> Resolving OTP Applications from directories<span style="color: #990000">:</span>
+<font color="#990000">===&gt;</font> Starting relx build process <font color="#990000">...</font>
+<font color="#990000">===&gt;</font> Resolving OTP Applications from directories<font color="#990000">:</font>
/home/essen/tmp/hello_joe/ebin
/usr/lib/erlang/lib
/home/essen/tmp/hello_joe/deps
-<span style="color: #990000">===&gt;</span> Resolved hello_joe_release-<span style="color: #993399">1</span>
-<span style="color: #990000">===&gt;</span> Including Erts from /usr/lib/erlang
-<span style="color: #990000">===&gt;</span> release successfully created<span style="color: #990000">!</span>
-Exec<span style="color: #990000">:</span> /home/essen/tmp/hello_joe<span style="color: #990000">/</span>_rel/hello_joe_release/erts-<span style="color: #993399">7.0</span>/bin/erlexec -boot /home/essen/tmp/hello_joe<span style="color: #990000">/</span>_rel/hello_joe_release/releases<span style="color: #990000">/</span><span style="color: #993399">1</span>/hello_joe_release -boot_var ERTS_LIB_DIR /home/essen/tmp/hello_joe<span style="color: #990000">/</span>_rel/hello_joe_release/erts-<span style="color: #993399">7.0</span><span style="color: #990000">/..</span>/lib -env ERL_LIBS /home/essen/tmp/hello_joe<span style="color: #990000">/</span>_rel/hello_joe_release/releases<span style="color: #990000">/</span><span style="color: #993399">1</span>/lib -config /home/essen/tmp/hello_joe<span style="color: #990000">/</span>_rel/hello_joe_release/releases<span style="color: #990000">/</span><span style="color: #993399">1</span>/sys<span style="color: #990000">.</span>config -args_file /home/essen/tmp/hello_joe<span style="color: #990000">/</span>_rel/hello_joe_release/releases<span style="color: #990000">/</span><span style="color: #993399">1</span>/vm<span style="color: #990000">.</span>args -- console
-Root<span style="color: #990000">:</span> /home/essen/tmp/hello_joe<span style="color: #990000">/</span>_rel/hello_joe_release
-/home/essen/tmp/hello_joe<span style="color: #990000">/</span>_rel/hello_joe_release
-heart_beat_kill_pid <span style="color: #990000">=</span> <span style="color: #993399">16389</span>
-Erlang/OTP <span style="color: #993399">18</span> <span style="color: #990000">[</span>erts-<span style="color: #993399">7.0</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>async-threads<span style="color: #990000">:</span><span style="color: #993399">10</span><span style="color: #990000">]</span> <span style="color: #990000">[</span>hipe<span style="color: #990000">]</span> <span style="color: #990000">[</span>kernel-poll<span style="color: #990000">:</span><span style="font-weight: bold"><span style="color: #0000FF">false</span></span><span style="color: #990000">]</span>
-
-Eshell V7<span style="color: #990000">.</span><span style="color: #993399">0</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_joe@<span style="color: #993399">127.0</span><span style="color: #990000">.</span><span style="color: #993399">0.1</span><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>Simple as that!</p></div>
-</div>
-</div>
-<div class="sect1">
+<font color="#990000">===&gt;</font> Resolved hello_joe_release-<font color="#993399">1</font>
+<font color="#990000">===&gt;</font> Including Erts from /usr/lib/erlang
+<font color="#990000">===&gt;</font> release successfully created<font color="#990000">!</font>
+Exec<font color="#990000">:</font> /home/essen/tmp/hello_joe<font color="#990000">/</font>_rel/hello_joe_release/erts-<font color="#993399">7.0</font>/bin/erlexec -boot /home/essen/tmp/hello_joe<font color="#990000">/</font>_rel/hello_joe_release/releases<font color="#990000">/</font><font color="#993399">1</font>/hello_joe_release -boot_var ERTS_LIB_DIR /home/essen/tmp/hello_joe<font color="#990000">/</font>_rel/hello_joe_release/erts-<font color="#993399">7.0</font><font color="#990000">/..</font>/lib -env ERL_LIBS /home/essen/tmp/hello_joe<font color="#990000">/</font>_rel/hello_joe_release/releases<font color="#990000">/</font><font color="#993399">1</font>/lib -config /home/essen/tmp/hello_joe<font color="#990000">/</font>_rel/hello_joe_release/releases<font color="#990000">/</font><font color="#993399">1</font>/sys<font color="#990000">.</font>config -args_file /home/essen/tmp/hello_joe<font color="#990000">/</font>_rel/hello_joe_release/releases<font color="#990000">/</font><font color="#993399">1</font>/vm<font color="#990000">.</font>args -- console
+Root<font color="#990000">:</font> /home/essen/tmp/hello_joe<font color="#990000">/</font>_rel/hello_joe_release
+/home/essen/tmp/hello_joe<font color="#990000">/</font>_rel/hello_joe_release
+heart_beat_kill_pid <font color="#990000">=</font> <font color="#993399">16389</font>
+Erlang/OTP <font color="#993399">18</font> <font color="#990000">[</font>erts-<font color="#993399">7.0</font><font color="#990000">]</font> <font color="#990000">[</font><b><font color="#0000FF">source</font></b><font color="#990000">]</font> <font color="#990000">[</font><font color="#993399">64</font>-bit<font color="#990000">]</font> <font color="#990000">[</font>smp<font color="#990000">:</font><font color="#993399">4</font><font color="#990000">:</font><font color="#993399">4</font><font color="#990000">]</font> <font color="#990000">[</font>async-threads<font color="#990000">:</font><font color="#993399">10</font><font color="#990000">]</font> <font color="#990000">[</font>hipe<font color="#990000">]</font> <font color="#990000">[</font>kernel-poll<font color="#990000">:</font><b><font color="#0000FF">false</font></b><font color="#990000">]</font>
+
+Eshell V7<font color="#990000">.</font><font color="#993399">0</font> <font color="#990000">(</font>abort with <font color="#990000">^</font>G<font color="#990000">)</font>
+<font color="#990000">(</font>hello_joe@<font color="#993399">127.0</font><font color="#990000">.</font><font color="#993399">0.1</font><font color="#990000">)</font><font color="#993399">1</font><font color="#990000">&gt;</font> </tt></pre>
+</div></div>
+<p>Simple as that!</p>
<h2 id="_getting_started_from_scratch">Getting started from scratch</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>If you already have an application, or you want to have full
-control over what files will be created, you can setup Erlang.mk
-manually.</p></div>
-<div class="paragraph"><p>Erlang.mk is very easy to setup: all that you need to do is to
-create a folder, put Erlang.mk in it, and write a one line
-Makefile containing:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>If you already have an application, or you want to have full control over what files will be created, you can setup Erlang.mk manually.</p>
+<p>Erlang.mk is very easy to setup: all that you need to do is to create a folder, put Erlang.mk in it, and write a one line Makefile containing:</p>
+<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>include erlang.mk</tt></pre></div></div>
-<div class="paragraph"><p>For a step by step:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>include erlang.mk</tt></pre>
+</div></div>
+<p>For a step by step:</p>
+<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 hello_joe
$ cd hello_joe
-$ 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
-$ echo <span style="color: #FF0000">"include erlang.mk"</span> <span style="color: #990000">&gt;</span> Makefile
-$ make</tt></pre></div></div>
-<div class="paragraph"><p>From that point onward you can create an <code>src/</code> folder or start
-using templates.</p></div>
-</div>
-</div>
-<div class="sect1">
+$ curl https<font color="#990000">:</font>//erlang<font color="#990000">.</font>mk/erlang<font color="#990000">.</font>mk -o erlang<font color="#990000">.</font>mk
+$ echo <font color="#FF0000">"include erlang.mk"</font> <font color="#990000">&gt;</font> Makefile
+$ make</tt></pre>
+</div></div>
+<p>From that point onward you can create an <code>src/</code> folder or start using templates.</p>
<h2 id="_using_spaces_instead_of_tabs">Using spaces instead of tabs</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Erlang.mk defaults to tabs when creating files from templates.
-This is in part because of a personal preference, and in part
-because it is much easier to convert tabs to spaces than the
-opposite.</p></div>
-<div class="paragraph"><p>Use the <code>SP</code> variable if you prefer spaces. Set it to the number
-of spaces per indentation level you want.</p></div>
-<div class="paragraph"><p>For example, if you prefer two spaces per indentation level:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Erlang.mk defaults to tabs when creating files from templates. This is in part because of a personal preference, and in part because it is much easier to convert tabs to spaces than the opposite.</p>
+<p>Use the <code>SP</code> variable if you prefer spaces. Set it to the number of spaces per indentation level you want.</p>
+<p>For example, if you prefer two spaces per indentation level:</p>
+<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 -f erlang<span style="color: #990000">.</span>mk bootstrap <span style="color: #009900">SP</span><span style="color: #990000">=</span><span style="color: #993399">2</span></tt></pre></div></div>
-<div class="paragraph"><p>When you bootstrap the project initially, the variable automatically
-gets added to the Makefile, so you only need to provide it when
-you get started.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>$ make -f erlang<font color="#990000">.</font>mk bootstrap <font color="#009900">SP</font><font color="#990000">=</font><font color="#993399">2</font></tt></pre>
+</div></div>
+<p>When you bootstrap the project initially, the variable automatically gets added to the Makefile, so you only need to provide it when you get started.</p>
<h2 id="_using_templates">Using templates</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>It is no secret that Erlang&#8217;s OTP behaviors tend to have some
-boilerplate. It is rarely an issue of course, except when
-creating new modules. That&#8217;s why Erlang.mk not only comes with
-templates for generating projects, but also individual modules!</p></div>
-<div class="paragraph"><p>You can list all available templates with the <code>list-templates</code>
-target:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>It is no secret that Erlang&apos;s OTP behaviors tend to have some boilerplate. It is rarely an issue of course, except when creating new modules. That&apos;s why Erlang.mk not only comes with templates for generating projects, but also individual modules!</p>
+<p>You can list all available templates with the <code>list-templates</code> target:</p>
+<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 list-templates
-Available templates<span style="color: #990000">:</span> cowboy_http cowboy_loop cowboy_rest cowboy_ws gen_fsm gen_server gen_statem ranch_protocol supervisor</tt></pre></div></div>
-<div class="paragraph"><p>To generate a module, let&#8217;s say a <code>gen_server</code>, all you need to
-do is to call <code>make new</code> with the appropriate arguments:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+Available templates<font color="#990000">:</font> cowboy_http cowboy_loop cowboy_rest cowboy_ws gen_fsm gen_server gen_statem ranch_protocol supervisor</tt></pre>
+</div></div>
+<p>To generate a module, let&apos;s say a <code>gen_server</code>, all you need to do is to call <code>make new</code> with the appropriate arguments:</p>
+<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 new <span style="color: #009900">t</span><span style="color: #990000">=</span>gen_server <span style="color: #009900">n</span><span style="color: #990000">=</span>my_server</tt></pre></div></div>
-<div class="paragraph"><p>This will create a module located in <em>src/my_server.erl</em>
-using the <code>gen_server</code> template.</p></div>
-<div class="paragraph"><p>This module is automatically compiled the next time you run
-<code>make</code>:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>$ make new <font color="#009900">t</font><font color="#990000">=</font>gen_server <font color="#009900">n</font><font color="#990000">=</font>my_server</tt></pre>
+</div></div>
+<p>This will create a module located in <em>src/my_server.erl</em> using the <code>gen_server</code> template.</p>
+<p>This module is automatically compiled the next time you run <code>make</code>:</p>
+<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
- ERLC my_server<span style="color: #990000">.</span>erl
- APP hello_joe<span style="color: #990000">.</span>app<span style="color: #990000">.</span>src</tt></pre></div></div>
-<div class="paragraph"><p>All that&#8217;s left to do is to open it in your favorite editor
-and make it do something!</p></div>
-</div>
-</div>
-<div class="sect1">
-<h2 id="_hiding_erlang_mk_from_git">Hiding Erlang.mk from git</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Erlang.mk is a large text file. It can easily take a large part of
-a <code>git diff</code> or a <code>git grep</code> command. You can avoid this by telling
-Git that <em>erlang.mk</em> is a binary file.</p></div>
-<div class="paragraph"><p>Add this to your <em>.gitattributes</em> file. This is a file that you
-can create at the root of your repository:</p></div>
-<div class="listingblock">
-<div class="content">
-<pre><code>erlang.mk -diff</code></pre>
+ ERLC my_server<font color="#990000">.</font>erl
+ APP hello_joe<font color="#990000">.</font>app<font color="#990000">.</font>src</tt></pre>
</div></div>
-<div class="paragraph"><p>The <em>erlang.mk</em> file will still appear in diffs and greps, but
-as a binary file, meaning its contents won&#8217;t be shown by default
-anymore.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>All that&apos;s left to do is to open it in your favorite editor and make it do something!</p>
+<h2 id="_hiding_erlang_mk_from_git">Hiding Erlang.mk from git</h2>
+<p>Erlang.mk is a large text file. It can easily take a large part of a <code>git diff</code> or a <code>git grep</code> command. You can avoid this by telling Git that <em>erlang.mk</em> is a binary file.</p>
+<p>Add this to your <em>.gitattributes</em> file. This is a file that you can create at the root of your repository:</p>
+<div class="listingblock"><div class="content"><pre>erlang.mk -diff</pre></div></div>
+<p>The <em>erlang.mk</em> file will still appear in diffs and greps, but as a binary file, meaning its contents won&apos;t be shown by default anymore.</p>
<h2 id="_getting_help">Getting help</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>During development, if you don&#8217;t remember the name of a target,
-you can always run <code>make help</code>:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>During development, if you don&apos;t remember the name of a target, you can always run <code>make help</code>:</p>
+<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="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">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>
+<pre><tt>$ make <b><font color="#0000FF">help</font></b>
+erlang<font color="#990000">.</font>mk <font color="#990000">(</font>version <font color="#993399">1.2</font><font color="#990000">.</font><font color="#993399">0</font>-<font color="#993399">642</font>-gccd2b9f<font color="#990000">)</font> is distributed under the terms of the ISC License<font color="#990000">.</font>
+Copyright <font color="#990000">(</font>c<font color="#990000">)</font> <font color="#993399">2013</font>-<font color="#993399">2016</font> Loïc Hoguin <font color="#990000">&lt;</font>essen@ninenines<font color="#990000">.</font>eu<font color="#990000">&gt;</font>
-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>
+Usage<font color="#990000">:</font> <font color="#990000">[</font><font color="#009900">V</font><font color="#990000">=</font><font color="#993399">1</font><font color="#990000">]</font> make <font color="#990000">[</font>target<font color="#990000">]...</font>
-Core targets<span style="color: #990000">:</span>
- all Run deps<span style="color: #990000">,</span> app and rel targets <span style="font-weight: bold"><span style="color: #0000FF">in</span></span> that order
+Core targets<font color="#990000">:</font>
+ all Run deps<font color="#990000">,</font> app and rel targets <b><font color="#0000FF">in</font></b> that order
app Compile the project
- deps Fetch dependencies <span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">if</span></span> needed<span style="color: #990000">)</span> and compile them
- search <span style="color: #009900">q</span><span style="color: #990000">=...</span> Search <span style="font-weight: bold"><span style="color: #0000FF">for</span></span> a package <span style="font-weight: bold"><span style="color: #0000FF">in</span></span> the built-in index
- rel Build a release <span style="font-weight: bold"><span style="color: #0000FF">for</span></span> this project<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">if</span></span> applicable
- docs Build the documentation <span style="font-weight: bold"><span style="color: #0000FF">for</span></span> this project
- install-docs Install the man pages <span style="font-weight: bold"><span style="color: #0000FF">for</span></span> this project
- check Compile and run all tests and analysis <span style="font-weight: bold"><span style="color: #0000FF">for</span></span> this project
- tests Run the tests <span style="font-weight: bold"><span style="color: #0000FF">for</span></span> this project
+ deps Fetch dependencies <font color="#990000">(</font><b><font color="#0000FF">if</font></b> needed<font color="#990000">)</font> and compile them
+ search <font color="#009900">q</font><font color="#990000">=...</font> Search <b><font color="#0000FF">for</font></b> a package <b><font color="#0000FF">in</font></b> the built-in index
+ rel Build a release <b><font color="#0000FF">for</font></b> this project<font color="#990000">,</font> <b><font color="#0000FF">if</font></b> applicable
+ docs Build the documentation <b><font color="#0000FF">for</font></b> this project
+ install-docs Install the man pages <b><font color="#0000FF">for</font></b> this project
+ check Compile and run all tests and analysis <b><font color="#0000FF">for</font></b> this project
+ tests Run the tests <b><font color="#0000FF">for</font></b> this project
clean Delete temporary and output files from most targets
distclean Delete all temporary and output files
- <span style="font-weight: bold"><span style="color: #0000FF">help</span></span> Display this <span style="font-weight: bold"><span style="color: #0000FF">help</span></span> and <span style="font-weight: bold"><span style="color: #0000FF">exit</span></span>
- erlang-mk Update erlang<span style="color: #990000">.</span>mk to the latest version
+ <b><font color="#0000FF">help</font></b> Display this <b><font color="#0000FF">help</font></b> and <b><font color="#0000FF">exit</font></b>
+ erlang-mk Update erlang<font color="#990000">.</font>mk to the latest version
-Bootstrap targets<span style="color: #990000">:</span>
+Bootstrap targets<font color="#990000">:</font>
bootstrap Generate a skeleton of an OTP application
bootstrap-lib Generate a skeleton of an OTP library
bootstrap-rel Generate the files needed to build a release
- new <span style="color: #009900">t</span><span style="color: #990000">=</span>TPL <span style="color: #009900">n</span><span style="color: #990000">=</span>NAME Generate a module NAME based on the template TPL
+ new <font color="#009900">t</font><font color="#990000">=</font>TPL <font color="#009900">n</font><font color="#990000">=</font>NAME Generate a module NAME based on the template TPL
list-templates List available templates
-<span style="color: #990000">...</span></tt></pre></div></div>
-<div class="paragraph"><p>This guide should provide any other answer. If not, please
-open a ticket on <a href="https://github.com/ninenines/erlang.mk/issues">the official repository</a>
-and we will work on improving the guide.</p></div>
-<div class="paragraph"><p>Commercial support is available through Nine Nines. Please contact
-Loïc Hoguin by sending an email to <a href="mailto:[email protected]">[email protected]</a>.</p></div>
-</div>
-</div>
+<font color="#990000">...</font></tt></pre>
+</div></div>
+<p>This guide should provide any other answer. If not, please open a ticket on <a href="https://github.com/ninenines/erlang.mk/issues">the official repository</a> and we will work on improving the guide.</p>
+<p>Commercial support is available through Nine Nines. Please contact Loïc Hoguin by sending an email to <a href="mailto:[email protected]">[email protected]</a>.</p>
+
diff --git a/docs/en/erlang.mk/1/guide/history/index.html b/docs/en/erlang.mk/1/guide/history/index.html
index 8ca7ac35..9f4af14a 100644
--- a/docs/en/erlang.mk/1/guide/history/index.html
+++ b/docs/en/erlang.mk/1/guide/history/index.html
@@ -62,61 +62,24 @@
<h1 class="lined-header"><span>Short history</span></h1>
-<div class="paragraph"><p>This chapter aims to be a brief record of the life of the
-Erlang.mk project.</p></div>
-<div class="sect1">
+<p>This chapter aims to be a brief record of the life of the Erlang.mk project.</p>
<h2 id="_before_erlang_mk">Before Erlang.mk</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Erlang.mk originates from the Cowboy project. Cowboy started
-as a Rebar project and I, Loïc Hoguin, was very happy with it
-for a couple years. Over time however I started getting annoyed
-and frustrated by a number of things, including bad defaults,
-changing defaults and overall slowness.</p></div>
-<div class="paragraph"><p>In particular, at the time I gave up on Rebar, the Cowboy
-test suite was taking about five minutes to run. A quick experiment
-showed I could get much lower times by simply invoking <code>ct_run</code>
-directly. On January 4th, 2013, the Cowboy test suite took less
-than a minute to complete.</p></div>
-<div class="paragraph"><p>Following this success I started removing a little more and,
-on the fateful day of January 5th, 2013, removed the dependency
-on Rebar entirely. Rebar, and in particular the concept of
-dependencies, was, and still is, a pretty strong influence.</p></div>
-<div class="paragraph"><p>Erlang.mk was conceived.</p></div>
-<div class="paragraph"><p>A few months passed and, on May 1st, 2013, the Erlang.mk
-repository was created. Erlang.mk was born.</p></div>
-<div class="paragraph"><p>Little did I know how much it would grow.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Erlang.mk originates from the Cowboy project. Cowboy started as a Rebar project and I, Loïc Hoguin, was very happy with it for a couple years. Over time however I started getting annoyed and frustrated by a number of things, including bad defaults, changing defaults and overall slowness.</p>
+<p>In particular, at the time I gave up on Rebar, the Cowboy test suite was taking about five minutes to run. A quick experiment showed I could get much lower times by simply invoking <code>ct_run</code> directly. On January 4th, 2013, the Cowboy test suite took less than a minute to complete.</p>
+<p>Following this success I started removing a little more and, on the fateful day of January 5th, 2013, removed the dependency on Rebar entirely. Rebar, and in particular the concept of dependencies, was, and still is, a pretty strong influence.</p>
+<p>Erlang.mk was conceived.</p>
+<p>A few months passed and, on May 1st, 2013, the Erlang.mk repository was created. Erlang.mk was born.</p>
+<p>Little did I know how much it would grow.</p>
<h2 id="_lifetime_of_the_project">Lifetime of the project</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Erlang.mk would eventually become a much larger file able to
-deal with many more projects than just Cowboy. From the birth
-of the project, the biggest force for growth was user contributions,
-because Erlang.mk appealed to a variety of people with different
-needs, needs that Erlang.mk was not fulfilling yet.</p></div>
-<div class="paragraph"><p>The project was split into smaller files focused on a different
-feature each, and a build script was written to build the single
-Erlang.mk file.</p></div>
-<div class="paragraph"><p>A test suite was contributed by a user, and later taken as a basis
-for the current, much more complete test suite. Turns out testing
-a Makefile is pretty straightforward.</p></div>
-<div class="paragraph"><p>A package index was added to solve the problem of discovering
-Erlang projects.</p></div>
-<div class="paragraph"><p>After trying to see if Erlang build tools could cooperate, the
-decision was made to improve compatibility with existing Rebar
-projects by patching Rebar out, using Rebar. This feature, called
-autopatch, proved very successful and made Erlang.mk compatible
-with more than 90% of all Erlang projects.</p></div>
-<div class="paragraph"><p>Erlang.mk documentation was much improved and the Erlang.mk website
-was created in the summer of 2015.</p></div>
-<div class="paragraph"><p>Over the year of 2015, Erlang.mk went from curiosity to a serious
-alternative to other Erlang build tools. The user base increased
-immensely and large projects started using it, including RabbitMQ
-from the 3.6.0 release onward.</p></div>
-<div class="paragraph"><p>A bright future lies ahead.</p></div>
-</div>
-</div>
+<p>Erlang.mk would eventually become a much larger file able to deal with many more projects than just Cowboy. From the birth of the project, the biggest force for growth was user contributions, because Erlang.mk appealed to a variety of people with different needs, needs that Erlang.mk was not fulfilling yet.</p>
+<p>The project was split into smaller files focused on a different feature each, and a build script was written to build the single Erlang.mk file.</p>
+<p>A test suite was contributed by a user, and later taken as a basis for the current, much more complete test suite. Turns out testing a Makefile is pretty straightforward.</p>
+<p>A package index was added to solve the problem of discovering Erlang projects.</p>
+<p>After trying to see if Erlang build tools could cooperate, the decision was made to improve compatibility with existing Rebar projects by patching Rebar out, using Rebar. This feature, called autopatch, proved very successful and made Erlang.mk compatible with more than 90% of all Erlang projects.</p>
+<p>Erlang.mk documentation was much improved and the Erlang.mk website was created in the summer of 2015.</p>
+<p>Over the year of 2015, Erlang.mk went from curiosity to a serious alternative to other Erlang build tools. The user base increased immensely and large projects started using it, including RabbitMQ from the 3.6.0 release onward.</p>
+<p>A bright future lies ahead.</p>
+
diff --git a/docs/en/erlang.mk/1/guide/index.html b/docs/en/erlang.mk/1/guide/index.html
index 3c66d012..79f94c2f 100644
--- a/docs/en/erlang.mk/1/guide/index.html
+++ b/docs/en/erlang.mk/1/guide/index.html
@@ -62,188 +62,76 @@
<h1 class="lined-header"><span>Erlang.mk User Guide</span></h1>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="installation/">Installation</a>
-</p>
+<ul><li><a href="installation/">Installation</a>
</li>
-<li>
-<p>
-<a href="getting_started/">Getting started</a>
-</p>
+<li><a href="getting_started/">Getting started</a>
</li>
-<li>
-<p>
-<a href="overview/">Overview</a>
-</p>
+<li><a href="overview/">Overview</a>
</li>
-<li>
-<p>
-<a href="updating/">Updating Erlang.mk</a>
-</p>
+<li><a href="updating/">Updating Erlang.mk</a>
</li>
-<li>
-<p>
-<a href="limitations/">Limitations</a>
-</p>
+<li><a href="limitations/">Limitations</a>
</li>
-</ul></div>
-<div class="sect1">
+</ul>
<h2 id="code">Code</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="app/">Building</a>
-</p>
+<ul><li><a href="app/">Building</a>
</li>
-<li>
-<p>
-<a href="deps/">Packages and dependencies</a>
-</p>
+<li><a href="deps/">Packages and dependencies</a>
</li>
-<li>
-<p>
-<a href="ports/">NIFs and port drivers</a>
-</p>
+<li><a href="ports/">NIFs and port drivers</a>
</li>
-<li>
-<p>
-<a href="releases/">Releases</a>
-</p>
+<li><a href="releases/">Releases</a>
</li>
-<li>
-<p>
-<a href="sfx/">Self-extracting releases</a>
-</p>
+<li><a href="sfx/">Self-extracting releases</a>
</li>
-<li>
-<p>
-<a href="escripts/">Escripts</a>
-</p>
+<li><a href="escripts/">Escripts</a>
</li>
-<li>
-<p>
-<a href="kerl/">OTP version management</a>
-</p>
+<li><a href="kerl/">OTP version management</a>
</li>
-<li>
-<p>
-<a href="compat/">Compatibility with other build tools</a>
-</p>
+<li><a href="compat/">Compatibility with other build tools</a>
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="docs">Documentation</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="asciidoc/">Asciidoc documentation</a>
-</p>
+<ul><li><a href="asciidoc/">Asciidoc documentation</a>
</li>
-<li>
-<p>
-<a href="edoc/">EDoc comments</a>
-</p>
+<li><a href="edoc/">EDoc comments</a>
</li>
-<li>
-<p>
-<a href="sphinx/">Sphinx documentation</a>
-</p>
+<li><a href="sphinx/">Sphinx documentation</a>
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="tests">Tests</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="shell/">Erlang shell</a>
-</p>
+<ul><li><a href="shell/">Erlang shell</a>
</li>
-<li>
-<p>
-<a href="eunit/">EUnit</a>
-</p>
+<li><a href="eunit/">EUnit</a>
</li>
-<li>
-<p>
-<a href="common_test/">Common Test</a>
-</p>
+<li><a href="common_test/">Common Test</a>
</li>
-<li>
-<p>
-<a href="triq/">Triq</a>
-</p>
+<li><a href="triq/">Triq</a>
</li>
-<li>
-<p>
-<a href="coverage/">Code coverage</a>
-</p>
+<li><a href="coverage/">Code coverage</a>
</li>
-<li>
-<p>
-<a href="ci/">Continuous integration</a>
-</p>
+<li><a href="ci/">Continuous integration</a>
</li>
-<li>
-<p>
-<a href="dialyzer/">Dialyzer</a>
-</p>
+<li><a href="dialyzer/">Dialyzer</a>
</li>
-<li>
-<p>
-<a href="xref/">Xref</a>
-</p>
+<li><a href="xref/">Xref</a>
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="plugins">Third-party plugins</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="external_plugins/">External plugins</a>
-</p>
+<ul><li><a href="external_plugins/">External plugins</a>
</li>
-<li>
-<p>
-<a href="external_plugins_list/">List of plugins</a>
-</p>
+<li><a href="external_plugins_list/">List of plugins</a>
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="about">About Erlang.mk</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="why/">Why erlang.mk?</a>
-</p>
+<ul><li><a href="why/">Why erlang.mk?</a>
</li>
-<li>
-<p>
-<a href="history/">Short history</a>
-</p>
+<li><a href="history/">Short history</a>
</li>
-<li>
-<p>
-<a href="contributing/">Contributing</a>
-</p>
+<li><a href="contributing/">Contributing</a>
</li>
-</ul></div>
-</div>
-</div>
+</ul>
+
diff --git a/docs/en/erlang.mk/1/guide/installation/index.html b/docs/en/erlang.mk/1/guide/installation/index.html
index 867fb9ed..e1d4284e 100644
--- a/docs/en/erlang.mk/1/guide/installation/index.html
+++ b/docs/en/erlang.mk/1/guide/installation/index.html
@@ -62,183 +62,95 @@
<h1 class="lined-header"><span>Installation</span></h1>
-<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. 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>Some packages may require additional libraries.</p></div>
-<div class="sect3">
+<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>
+<p>Git and Erlang/OTP must also be installed.</p>
+<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>
+<p>Some packages may require additional libraries.</p>
<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
+<p>The commands to install packages vary between distributions:</p>
+<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 -S erlang git make</tt></pre></div></div>
-<div class="paragraph"><p>Alpine Linux and other distributions based on BusyBox come
-with an incompatible <code>awk</code> program. Installing the GNU Awk
-(<code>gawk</code> on Alpine) solves this issue.</p></div>
-</div>
-<div class="sect3">
+<pre><tt>$ pacman -S erlang git make</tt></pre>
+</div></div>
+<p>Alpine Linux and other distributions based on BusyBox come with an incompatible <code>awk</code> program. Installing the GNU Awk (<code>gawk</code> on Alpine) solves this issue.</p>
<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
+<p>FreeBSD comes with binary and source packages:</p>
+<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">
+<pre><tt>$ pkg install erlang git gmake</tt></pre>
+</div></div>
+<p>On FreeBSD the <code>make</code> command is BSD Make. Use <code>gmake</code> instead.</p>
<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
+<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 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 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
+<pre><tt>$ brew install erlang git make</tt></pre>
+</div></div>
+<p>Homebrew installs GNU Make as <code>gmake</code>. The <code>make</code> command is the one provided by Apple.</p>
+<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">
+<pre><tt>$ sudo port install erlang git gmake</tt></pre>
+</div></div>
<h2 id="_on_windows">On Windows</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Erlang.mk can be used on Windows inside an MSYS2 environment.
-Cygwin, MSYS (the original) and native Windows (both Batch
-and PowerShell) are currently not supported.</p></div>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<div class="title">Note</div>
-</td>
-<td class="content">Erlang.mk expects Unix line breaks in most of the files
-(LF instead of CRLF). Make sure to configure your text editor
-adequately.</td>
-</tr></table>
-</div>
-<div class="paragraph"><p>The rest of this section details how to setup Erlang/OTP and
-MSYS2 in order to use Erlang.mk.</p></div>
-<div class="sect3">
+<p>Erlang.mk can be used on Windows inside an MSYS2 environment. Cygwin, MSYS (the original) and native Windows (both Batch and PowerShell) are currently not supported.</p>
+<p>NOTE: Erlang.mk expects Unix line breaks in most of the files (LF instead of CRLF). Make sure to configure your text editor adequately.</p>
+<p>The rest of this section details how to setup Erlang/OTP and MSYS2 in order to use Erlang.mk.</p>
<h4 id="_installing_erlang_otp">Installing Erlang/OTP</h4>
-<div class="paragraph"><p>Erlang.mk requires Erlang/OTP to be installed. The OTP team
-provides binaries of Erlang/OTP for all major and minor releases,
-available from the <a href="http://www.erlang.org/download.html">official download page</a>.
-It is recommended that you use the 64-bit installer unless
-technically impossible. Please follow the instructions from
-the installer to complete the installation.</p></div>
-<div class="paragraph"><p>The OTP team also provides a short guide to
-<a href="http://www.erlang.org/download.html">installing Erlang/OTP on Windows</a>
-if you need additional references.</p></div>
-<div class="paragraph"><p>You can install Erlang/OTP silently using the <code>/S</code> switch
-on the command line:</p></div>
-<div class="listingblock">
-<div class="content">
-<pre><code>C:\Users\essen\Downloads&gt; otp_win64_18.0.exe /S</code></pre>
-</div></div>
-</div>
-<div class="sect3">
+<p>Erlang.mk requires Erlang/OTP to be installed. The OTP team provides binaries of Erlang/OTP for all major and minor releases, available from the <a href="http://www.erlang.org/download.html">official download page</a>. It is recommended that you use the 64-bit installer unless technically impossible. Please follow the instructions from the installer to complete the installation.</p>
+<p>The OTP team also provides a short guide to <a href="http://www.erlang.org/download.html">installing Erlang/OTP on Windows</a> if you need additional references.</p>
+<p>You can install Erlang/OTP silently using the <code>/S</code> switch on the command line:</p>
+<div class="listingblock"><div class="content"><pre>C:\Users\essen\Downloads&gt; otp_win64_18.0.exe /S</pre></div></div>
<h4 id="_installing_msys2">Installing MSYS2</h4>
-<div class="paragraph"><p>The only supported environment on Windows is MSYS2. MSYS2 is
-a lightweight Unix-like environment for Windows that comes
-with the Arch Linux package manager, <code>pacman</code>.</p></div>
-<div class="paragraph"><p>The MSYS2 project provides a <a href="http://msys2.github.io">one click installer</a>
-and instructions to set things up post-installation.</p></div>
-<div class="paragraph"><p>It is currently not possible to use the installer silently.
-Thankfully, the MSYS2 project provides an archive that can
-be used in lieu of the installer. The archive however requires
-<em>7zip</em> to decompress it.</p></div>
-<div class="paragraph"><p>First, download the
-<a href="http://sourceforge.net/projects/msys2/files/Base/x86_64/msys2-base-x86_64-20150512.tar.xz/download">MSYS2 base archive</a>
-and extract it under <em>C:\</em>. Assuming you downloaded the
-archive as <em>msys2.tar.xz</em> and put it in <em>C:\</em>, you can
-use the following commands to extract it:</p></div>
-<div class="listingblock">
-<div class="content">
-<pre><code>C:\&gt; 7z x msys2.tar.xz
-C:\&gt; 7z x msys2.tar &gt; NUL</code></pre>
-</div></div>
-<div class="paragraph"><p>Then you can run the two commands needed to perform the
-post-installation setup:</p></div>
-<div class="listingblock">
-<div class="content">
-<pre><code>C:\&gt; C:\msys64\usr\bin\bash -lc "pacman --needed --noconfirm -Sy bash pacman pacman-mirrors msys2-runtime"
-C:\&gt; C:\msys64\usr\bin\bash -lc "pacman --noconfirm -Syu"</code></pre>
-</div></div>
-</div>
-<div class="sect3">
+<p>The only supported environment on Windows is MSYS2. MSYS2 is a lightweight Unix-like environment for Windows that comes with the Arch Linux package manager, <code>pacman</code>.</p>
+<p>The MSYS2 project provides a <a href="http://msys2.github.io">one click installer</a> and instructions to set things up post-installation.</p>
+<p>It is currently not possible to use the installer silently. Thankfully, the MSYS2 project provides an archive that can be used in lieu of the installer. The archive however requires <em>7zip</em> to decompress it.</p>
+<p>First, download the <a href="http://sourceforge.net/projects/msys2/files/Base/x86_64/msys2-base-x86_64-20150512.tar.xz/download">MSYS2 base archive</a> and extract it under <em>C:\</em>. Assuming you downloaded the archive as <em>msys2.tar.xz</em> and put it in <em>C:\</em>, you can use the following commands to extract it:</p>
+<div class="listingblock"><div class="content"><pre>C:\&gt; 7z x msys2.tar.xz
+C:\&gt; 7z x msys2.tar &gt; NUL</pre></div></div>
+<p>Then you can run the two commands needed to perform the post-installation setup:</p>
+<div class="listingblock"><div class="content"><pre>C:\&gt; C:\msys64\usr\bin\bash -lc &quot;pacman --needed --noconfirm -Sy bash pacman pacman-mirrors msys2-runtime&quot;
+C:\&gt; C:\msys64\usr\bin\bash -lc &quot;pacman --noconfirm -Syu&quot;</pre></div></div>
<h4 id="_installing_the_required_msys2_packages">Installing the required MSYS2 packages</h4>
-<div class="paragraph"><p>After following these instructions, you can install GNU Make,
-Git and any other required softwares. From an MSYS2 shell,
-you can call <code>pacman</code> directly:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>After following these instructions, you can install GNU Make, Git and any other required softwares. From an MSYS2 shell, you can call <code>pacman</code> directly:</p>
+<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>$ pacman -S git make</tt></pre></div></div>
-<div class="paragraph"><p>You can use <code>pacman -Ss</code> to search packages. For example,
-to find all packages related to GCC:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>$ pacman -S git make</tt></pre>
+</div></div>
+<p>You can use <code>pacman -Ss</code> to search packages. For example, to find all packages related to GCC:</p>
+<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>$ pacman -Ss gcc</tt></pre></div></div>
-<div class="paragraph"><p>If you are going to compile C/C++ code, you will need to
-install this package, as Erlang.mk cannot use the normal
-"gcc" package:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>$ pacman -Ss gcc</tt></pre>
+</div></div>
+<p>If you are going to compile C/C++ code, you will need to install this package, as Erlang.mk cannot use the normal &quot;gcc&quot; package:</p>
+<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>$ pacman -S mingw-w<span style="color: #993399">64</span>-x86_64-gcc</tt></pre></div></div>
-<div class="paragraph"><p>You can also run commands under the MSYS2 environment from
-the Windows command line or batch files. This command will
-install GNU Make and Git:</p></div>
-<div class="listingblock">
-<div class="content">
-<pre><code>C:\&gt; C:\msys64\usr\bin\bash -lc "pacman --noconfirm -S git make"</code></pre>
+<pre><tt>$ pacman -S mingw-w<font color="#993399">64</font>-x86_64-gcc</tt></pre>
</div></div>
-<div class="paragraph"><p>You can use similar <code>bash</code> commands if you need to run programs
-inside the MSYS2 environment from a batch file.</p></div>
-</div>
-<div class="sect3">
+<p>You can also run commands under the MSYS2 environment from the Windows command line or batch files. This command will install GNU Make and Git:</p>
+<div class="listingblock"><div class="content"><pre>C:\&gt; C:\msys64\usr\bin\bash -lc &quot;pacman --noconfirm -S git make&quot;</pre></div></div>
+<p>You can use similar <code>bash</code> commands if you need to run programs inside the MSYS2 environment from a batch file.</p>
<h4 id="_gotchas">Gotchas</h4>
-<div class="paragraph"><p>While most of the basic functionality will just work, there are
-still some issues. Erlang.mk needs to be fixed to pass the
-right paths when running Erlang scripts. We are working on it.
-Erlang.mk is fully tested on both Linux and Windows, but is
-lacking tests in the areas not yet covered by this guide,
-so expect bugs to be fixed as more tests are added.</p></div>
-</div>
-</div>
-</div>
+<p>While most of the basic functionality will just work, there are still some issues. Erlang.mk needs to be fixed to pass the right paths when running Erlang scripts. We are working on it. Erlang.mk is fully tested on both Linux and Windows, but is lacking tests in the areas not yet covered by this guide, so expect bugs to be fixed as more tests are added.</p>
+
diff --git a/docs/en/erlang.mk/1/guide/kerl/index.html b/docs/en/erlang.mk/1/guide/kerl/index.html
index 4fc8f102..eb9fe097 100644
--- a/docs/en/erlang.mk/1/guide/kerl/index.html
+++ b/docs/en/erlang.mk/1/guide/kerl/index.html
@@ -62,84 +62,36 @@
<h1 class="lined-header"><span>OTP version management</span></h1>
-<div class="paragraph"><p>Erlang.mk comes with integrated support for
-<a href="https://github.com/kerl/kerl">Kerl</a>, a shell script that
-automates the downloading, building and installing of
-Erlang/OTP. It can be used to easily build a specific
-Erlang/OTP version (with or without custom build options)
-or maintain different versions side by side.</p></div>
-<div class="sect1">
+<p>Erlang.mk comes with integrated support for <a href="https://github.com/kerl/kerl">Kerl</a>, a shell script that automates the downloading, building and installing of Erlang/OTP. It can be used to easily build a specific Erlang/OTP version (with or without custom build options) or maintain different versions side by side.</p>
<h2 id="_erlang_versions">Erlang versions</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Erlang.mk uses the Git tags from Erlang/OTP to identify
-OTP versions. The most recent tag at the time of writing
-is <code>OTP-20.0.4</code>, which is a patch release of <code>OTP-20.0</code>.
-A patch release is a non-official release containing a
-few fixes on top of the official release.</p></div>
-<div class="paragraph"><p>Older versions used a slightly different versioning scheme
-and tag format, for example: <code>OTP_R16B03</code>. Beware though,
-there also was an <code>OTP_R16B03-1</code> release that fixed a
-critical issue in the initial release.</p></div>
-<div class="paragraph"><p>The README file for all official Erlang/OTP releases can
-be found on <a href="http://www.erlang.org/downloads">erlang.org</a>.
-To obtain information about patch releases when they are
-released you need to be subscribed to the
-<a href="http://erlang.org/mailman/listinfo/erlang-questions">erlang-questions mailing list</a>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Erlang.mk uses the Git tags from Erlang/OTP to identify OTP versions. The most recent tag at the time of writing is <code>OTP-20.0.4</code>, which is a patch release of <code>OTP-20.0</code>. A patch release is a non-official release containing a few fixes on top of the official release.</p>
+<p>Older versions used a slightly different versioning scheme and tag format, for example: <code>OTP_R16B03</code>. Beware though, there also was an <code>OTP_R16B03-1</code> release that fixed a critical issue in the initial release.</p>
+<p>The README file for all official Erlang/OTP releases can be found on <a href="http://www.erlang.org/downloads">erlang.org</a>. To obtain information about patch releases when they are released you need to be subscribed to the <a href="http://erlang.org/mailman/listinfo/erlang-questions">erlang-questions mailing list</a>.</p>
<h2 id="otp_version_pinning">OTP version pinning</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Erlang.mk can use a specific version of Erlang/OTP when
-interacting with your project. This can be very useful
-when you are working with a team because you can define
-the version you need in the Makefile and Erlang.mk will
-ensure this version is used by everyone in your team.</p></div>
-<div class="paragraph"><p>To pin the version all you need to do is to set the
-<code>ERLANG_OTP</code> variable in your Makefile before including
-Erlang.mk. For example, to use <code>OTP-20.0.4</code>:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Erlang.mk can use a specific version of Erlang/OTP when interacting with your project. This can be very useful when you are working with a team because you can define the version you need in the Makefile and Erlang.mk will ensure this version is used by everyone in your team.</p>
+<p>To pin the version all you need to do is to set the <code>ERLANG_OTP</code> variable in your Makefile before including Erlang.mk. For example, to use <code>OTP-20.0.4</code>:</p>
+<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">ERLANG_OTP =</span> OTP-20.0.4
-
-include erlang.mk</tt></pre></div></div>
-<div class="paragraph"><p>The next time you run <code>make</code> Erlang.mk will build and
-use the version you configured.</p></div>
-<div class="paragraph"><p>Note that there has been reports that this functionality
-is not compatible with the <code>.ONESHELL</code> feature from
-GNU Make.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">ERLANG_OTP =</font> OTP-20.0.4
+
+include erlang.mk</tt></pre>
+</div></div>
+<p>The next time you run <code>make</code> Erlang.mk will build and use the version you configured.</p>
+<p>Note that there has been reports that this functionality is not compatible with the <code>.ONESHELL</code> feature from GNU Make.</p>
<h2 id="_continuous_integration">Continuous integration</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Erlang.mk can automatically test your project against
-many different Erlang/OTP versions. This functionality
-is documented in the <a href="../ci">Continuous integration</a> chapter.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Erlang.mk can automatically test your project against many different Erlang/OTP versions. This functionality is documented in the <a href="../ci">Continuous integration</a> chapter.</p>
<h2 id="_configuring_kerl">Configuring Kerl</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>All of the Kerl variables can be configured directly in the
-Makefile. All you need to do is to export them. For example,
-to change the installation directory for the Erlang/OTP
-versions managed by Kerl, you could add the following to
-your Makefile:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>All of the Kerl variables can be configured directly in the Makefile. All you need to do is to export them. For example, to change the installation directory for the Erlang/OTP versions managed by Kerl, you could add the following to your Makefile:</p>
+<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: #0000FF">export</span></span> KERL_INSTALL_DIR <span style="color: #990000">=</span> <span style="color: #009900">$(CURDIR)</span>/erlang</tt></pre></div></div>
-<div class="paragraph"><p>When configuring paths like this, always make sure to provide
-an absolute path in the value. Erlang.mk will NOT expand them
-automatically for you.</p></div>
-</div>
-</div>
+<pre><tt><b><font color="#0000FF">export</font></b> KERL_INSTALL_DIR <font color="#990000">=</font> <font color="#009900">$(CURDIR)</font>/erlang</tt></pre>
+</div></div>
+<p>When configuring paths like this, always make sure to provide an absolute path in the value. Erlang.mk will NOT expand them automatically for you.</p>
+
diff --git a/docs/en/erlang.mk/1/guide/limitations/index.html b/docs/en/erlang.mk/1/guide/limitations/index.html
index 431a3ab8..659fb209 100644
--- a/docs/en/erlang.mk/1/guide/limitations/index.html
+++ b/docs/en/erlang.mk/1/guide/limitations/index.html
@@ -62,49 +62,20 @@
<h1 class="lined-header"><span>Limitations</span></h1>
-<div class="paragraph"><p>No software is perfect.</p></div>
-<div class="paragraph"><p>It&#8217;s very important, when evaluating and when using a tool,
-to understand its limitations, so as to avoid making mistakes
-and wasting valuable time.</p></div>
-<div class="paragraph"><p>This chapter lists all known limitations of Erlang.mk.</p></div>
-<div class="sect1">
+<p>No software is perfect.</p>
+<p>It&apos;s very important, when evaluating and when using a tool, to understand its limitations, so as to avoid making mistakes and wasting valuable time.</p>
+<p>This chapter lists all known limitations of Erlang.mk.</p>
<h2 id="_erlang_must_be_available">Erlang must be available</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Currently Erlang.mk requires you to install Erlang beforehand.
-Installing Erlang is not always easy, particularly if you need
-a specific version of Erlang for a specific project.</p></div>
-<div class="paragraph"><p>In addition, the Erlang being used must be in your <code>$PATH</code>
-before you use Erlang.mk.</p></div>
-<div class="paragraph"><p>In the future we envision, Erlang.mk could manage the Erlang
-version you need to use a project. Erlang.mk already does this
-for running tests when using <code>make ci</code>, so doing this during
-development is just a step away.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Currently Erlang.mk requires you to install Erlang beforehand. Installing Erlang is not always easy, particularly if you need a specific version of Erlang for a specific project.</p>
+<p>In addition, the Erlang being used must be in your <code>$PATH</code> before you use Erlang.mk.</p>
+<p>In the future we envision, Erlang.mk could manage the Erlang version you need to use a project. Erlang.mk already does this for running tests when using <code>make ci</code>, so doing this during development is just a step away.</p>
<h2 id="_spaces_in_path">Spaces in path</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Erlang.mk will currently not work properly if the path to the
-project contains spaces. To check if that is the case, use the
-command <code>pwd</code>.</p></div>
-<div class="paragraph"><p>This issue is due to how Makefiles work. There might be ways
-to solve it, we have not given up on it, but it&#8217;s very low
-priority considering how simple the workaround is.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Erlang.mk will currently not work properly if the path to the project contains spaces. To check if that is the case, use the command <code>pwd</code>.</p>
+<p>This issue is due to how Makefiles work. There might be ways to solve it, we have not given up on it, but it&apos;s very low priority considering how simple the workaround is.</p>
<h2 id="_dependency_tracking_and_modification_times">Dependency tracking and modification times</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Erlang source files that depend on other files will have their
-modification time updated when they need to be recompiled due
-to a dependency having changed. This could cause some editors to
-think the file changed when it didn&#8217;t.</p></div>
-<div class="paragraph"><p>Erlang.mk must use this method in order to be able to compile
-files in one <code>erlc</code> invocation. The benefits greatly outweigh
-the issue in this case and so there are currently no plans to
-fix this behavior.</p></div>
-</div>
-</div>
+<p>Erlang source files that depend on other files will have their modification time updated when they need to be recompiled due to a dependency having changed. This could cause some editors to think the file changed when it didn&apos;t.</p>
+<p>Erlang.mk must use this method in order to be able to compile files in one <code>erlc</code> invocation. The benefits greatly outweigh the issue in this case and so there are currently no plans to fix this behavior.</p>
+
diff --git a/docs/en/erlang.mk/1/guide/overview/index.html b/docs/en/erlang.mk/1/guide/overview/index.html
index 1a4b2b9d..9fa002de 100644
--- a/docs/en/erlang.mk/1/guide/overview/index.html
+++ b/docs/en/erlang.mk/1/guide/overview/index.html
@@ -62,94 +62,42 @@
<h1 class="lined-header"><span>Overview</span></h1>
-<div class="paragraph"><p>Now that you know how to get started, let&#8217;s take a look at
-what Erlang.mk can do for you.</p></div>
-<div class="sect1">
+<p>Now that you know how to get started, let&apos;s take a look at what Erlang.mk can do for you.</p>
<h2 id="_building_your_project">Building your project</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Erlang.mk is first and foremost a build tool. It is especially
-tailored for Erlang developers and follows widely accepted
-practices in the Erlang community.</p></div>
-<div class="paragraph"><p>Erlang.mk will happily build all <a href="../building">Erlang-specific files</a>
-you throw at it. Other kinds of files too, like C or C++ code
-when you are working on <a href="../ports">a NIF or a port driver</a>.</p></div>
-<div class="paragraph"><p>Erlang.mk embraces the concept of <a href="../deps">source dependencies</a>.
-It can fetch dependency source code using a variety of mechanisms,
-including fetching from Git, Mercurial or SVN.</p></div>
-<div class="paragraph"><p>Erlang.mk will automatically <a href="../relx">generate releases</a>
-when applicable. It can also <a href="../escript">generate escripts</a>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Erlang.mk is first and foremost a build tool. It is especially tailored for Erlang developers and follows widely accepted practices in the Erlang community.</p>
+<p>Erlang.mk will happily build all <a href="../building">Erlang-specific files</a> you throw at it. Other kinds of files too, like C or C++ code when you are working on <a href="../ports">a NIF or a port driver</a>.</p>
+<p>Erlang.mk embraces the concept of <a href="../deps">source dependencies</a>. It can fetch dependency source code using a variety of mechanisms, including fetching from Git, Mercurial or SVN.</p>
+<p>Erlang.mk will automatically <a href="../relx">generate releases</a> when applicable. It can also <a href="../escript">generate escripts</a>.</p>
<h2 id="_exploring_the_package_index">Exploring the package index</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Erlang.mk comes with a <a href="../deps">built-in package index</a>.
-It is built as an extension of the dependency system and is
-meant to be used for discovery purposes.</p></div>
-<div class="paragraph"><p>No package is ever installed, they are only used as dependencies
-and are always project-specific. They can be thought of as a
-shortcut over plain dependencies.</p></div>
-<div class="paragraph"><p>You can get a list of all packages known to Erlang.mk by using
-the <code>search</code> target:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Erlang.mk comes with a <a href="../deps">built-in package index</a>. It is built as an extension of the dependency system and is meant to be used for discovery purposes.</p>
+<p>No package is ever installed, they are only used as dependencies and are always project-specific. They can be thought of as a shortcut over plain dependencies.</p>
+<p>You can get a list of all packages known to Erlang.mk by using the <code>search</code> target:</p>
+<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 search</tt></pre></div></div>
-<div class="paragraph"><p>You can also use this target to search across all packages, for
-example to find all packages related to Cowboy:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>$ make search</tt></pre>
+</div></div>
+<p>You can also use this target to search across all packages, for example to find all packages related to Cowboy:</p>
+<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 search <span style="color: #009900">q</span><span style="color: #990000">=</span>cowboy</tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>$ make search <font color="#009900">q</font><font color="#990000">=</font>cowboy</tt></pre>
+</div></div>
<h2 id="_generating_documentation">Generating documentation</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Erlang.mk supports <em>EDoc</em> and <em>Asciidoc</em>.</p></div>
-<div class="paragraph"><p><a href="../edoc">EDoc</a> generates HTML documentation directly from
-your source code.</p></div>
-<div class="paragraph"><p>While it is convenient, ask yourself: if all the documentation is
-inside the source code, why not just open the source code directly?
-That&#8217;s where <em>Asciidoc</em> comes in.</p></div>
-<div class="paragraph"><p>The <a href="../asciidoc">Asciidoc</a> plugin expects all documentation
-to be separate from source. It will generate HTML, PDF, man pages and
-more from the documentation you write in the <em>doc/src/</em> folder in
-your repository.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Erlang.mk supports <em>EDoc</em> and <em>Asciidoc</em>.</p>
+<p><a href="../edoc">EDoc</a> generates HTML documentation directly from your source code.</p>
+<p>While it is convenient, ask yourself: if all the documentation is inside the source code, why not just open the source code directly? That&apos;s where <em>Asciidoc</em> comes in.</p>
+<p>The <a href="../asciidoc">Asciidoc</a> plugin expects all documentation to be separate from source. It will generate HTML, PDF, man pages and more from the documentation you write in the <em>doc/src/</em> folder in your repository.</p>
<h2 id="_running_tests">Running tests</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Erlang.mk supports a lot of different testing and static
-analysis tools.</p></div>
-<div class="paragraph"><p>The <a href="../shell">make shell</a> command allows you
-to test your project manually. You can automate these
-unit tests with <a href="../eunit">EUnit</a> and test
-your entire system with <a href="../ct">Common Test</a>.
-<a href="../coverage">Code coverage</a> can of course
-be enabled during tests.</p></div>
-<div class="paragraph"><p>Erlang.mk comes with features to make your life easier when
-setting up and using <a href="../ci">Continuous integration</a>.</p></div>
-<div class="paragraph"><p>On the static analysis side of things, Erlang.mk comes with
-support for <a href="../dialyzer">Dialyzer</a> and <a href="#xref">Xref</a>,
-to perform success typing analysis and cross referencing
-of the code.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Erlang.mk supports a lot of different testing and static analysis tools.</p>
+<p>The <a href="../shell">make shell</a> command allows you to test your project manually. You can automate these unit tests with <a href="../eunit">EUnit</a> and test your entire system with <a href="../ct">Common Test</a>. <a href="../coverage">Code coverage</a> can of course be enabled during tests.</p>
+<p>Erlang.mk comes with features to make your life easier when setting up and using <a href="../ci">Continuous integration</a>.</p>
+<p>On the static analysis side of things, Erlang.mk comes with support for <a href="../dialyzer">Dialyzer</a> and <a href="../xref">Xref</a>, to perform success typing analysis and cross referencing of the code.</p>
<h2 id="_need_more">Need more?</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Not convinced yet? You can read about <a href="../why">why you should use Erlang.mk</a>
-and its <a href="../history">history</a>. And if you&#8217;re still not
-convinced after that, it&#8217;s OK! The world would be boring if
-everyone agreed on everything all the time.</p></div>
-</div>
-</div>
+<p>Not convinced yet? You can read about <a href="../why">why you should use Erlang.mk</a> and its <a href="../history">history</a>. And if you&apos;re still not convinced after that, it&apos;s OK! The world would be boring if everyone agreed on everything all the time.</p>
+
diff --git a/docs/en/erlang.mk/1/guide/ports/index.html b/docs/en/erlang.mk/1/guide/ports/index.html
index 39744520..99478311 100644
--- a/docs/en/erlang.mk/1/guide/ports/index.html
+++ b/docs/en/erlang.mk/1/guide/ports/index.html
@@ -62,193 +62,97 @@
<h1 class="lined-header"><span>NIFs and port drivers</span></h1>
-<div class="paragraph"><p>Erlang.mk can not only build Erlang projects, but also the C code
-that some projects come with, like NIFs and port drivers.</p></div>
-<div class="paragraph"><p>There are two ways to build the C code: using a custom Makefile,
-or making Erlang.mk do it directly. The C code will be built
-as needed when you run <code>make</code>.</p></div>
-<div class="sect1">
+<p>Erlang.mk can not only build Erlang projects, but also the C code that some projects come with, like NIFs and port drivers.</p>
+<p>There are two ways to build the C code: using a custom Makefile, or making Erlang.mk do it directly. The C code will be built as needed when you run <code>make</code>.</p>
+<!-- @todo something for easier bootstrapping-->
<h2 id="_c_source_code_location_and_erlang_environment">C source code location and Erlang environment</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The C source code should be located in the <em>$(C_SRC_DIR)</em> directory.
-It defaults to <em>c_src/</em>. Should you need to modify it, all you
-need to do is to set the variable in your Makefile before including
-Erlang.mk:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The C source code should be located in the <em>$(C_SRC_DIR)</em> directory. It defaults to <em>c_src/</em>. Should you need to modify it, all you need to do is to set the variable in your Makefile before including Erlang.mk:</p>
+<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">C_SRC_DIR =</span> <span style="color: #009900">$(CURDIR)</span>/my_nif_source</tt></pre></div></div>
-<div class="paragraph"><p>When this directory exists, Erlang.mk will automatically create a
-file named <em>$(C_SRC_ENV)</em>. This file defaults to <em>$(C_SRC_DIR)/env.mk</em>.
-This can also be changed:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">C_SRC_DIR =</font> <font color="#009900">$(CURDIR)</font>/my_nif_source</tt></pre>
+</div></div>
+<p>When this directory exists, Erlang.mk will automatically create a file named <em>$(C_SRC_ENV)</em>. This file defaults to <em>$(C_SRC_DIR)/env.mk</em>. This can also be changed:</p>
+<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">C_SRC_ENV =</span> <span style="color: #009900">$(C_SRC_DIR)</span>/erlang_env.mk</tt></pre></div></div>
-<div class="paragraph"><p>It contains a few variable definitions for the environment used for the build:</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-<code>ERTS_INCLUDE_DIR</code>
-</dt>
-<dd>
-<p>
- Path to the ERTS include files (<em>erl_driver.h</em>, <em>erl_nif.h</em> and more).
-</p>
+<pre><tt><font color="#009900">C_SRC_ENV =</font> <font color="#009900">$(C_SRC_DIR)</font>/erlang_env.mk</tt></pre>
+</div></div>
+<p>It contains a few variable definitions for the environment used for the build:</p>
+<dl><dt><code>ERTS_INCLUDE_DIR</code></dt>
+<dd><p>Path to the ERTS include files (<em>erl_driver.h</em>, <em>erl_nif.h</em> and more).</p>
</dd>
-<dt class="hdlist1">
-<code>ERL_INTERFACE_INCLUDE_DIR</code>
-</dt>
-<dd>
-<p>
- Path to the Erl_Interface include files (<em>ei.h</em> and related).
-</p>
+<dt><code>ERL_INTERFACE_INCLUDE_DIR</code></dt>
+<dd><p>Path to the Erl_Interface include files (<em>ei.h</em> and related).</p>
</dd>
-<dt class="hdlist1">
-<code>ERL_INTERFACE_LIB_DIR</code>
-</dt>
-<dd>
-<p>
- Path to the Erl_Interface static libraries.
-</p>
+<dt><code>ERL_INTERFACE_LIB_DIR</code></dt>
+<dd><p>Path to the Erl_Interface static libraries.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_using_a_custom_makefile">Using a custom Makefile</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Erlang.mk will automatically run <code>make</code> if it detects a Makefile
-in <em>$(C_SRC_DIR)/Makefile</em>.</p></div>
-<div class="paragraph"><p>The Makefile should have at least two targets: a default target
-(which can be anything, for example <code>all</code>) which is invoked when
-building the C code, and a <code>clean</code> target invoked when cleaning
-it.</p></div>
-<div class="paragraph"><p>You can include the <em>env.mk</em> file to benefit from the Erlang
-environment detection:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Erlang.mk will automatically run <code>make</code> if it detects a Makefile in <em>$(C_SRC_DIR)/Makefile</em>.</p>
+<p>The Makefile should have at least two targets: a default target (which can be anything, for example <code>all</code>) which is invoked when building the C code, and a <code>clean</code> target invoked when cleaning it.</p>
+<p>You can include the <em>env.mk</em> file to benefit from the Erlang environment detection:</p>
+<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>include env.mk</tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>include env.mk</tt></pre>
+</div></div>
<h2 id="_using_erlang_mk_directly">Using Erlang.mk directly</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>You don&#8217;t need to write a Makefile to build C source code, however.
-Erlang.mk comes with rules to build both shared libraries and
-executables, using the source files it finds in <em>$(C_SRC_DIR)</em>.</p></div>
-<div class="paragraph"><p>By default, Erlang.mk will create a shared library. To change
-this and create an executable instead, put this in your Makefile
-before including Erlang.mk:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>You don&apos;t need to write a Makefile to build C source code, however. Erlang.mk comes with rules to build both shared libraries and executables, using the source files it finds in <em>$(C_SRC_DIR)</em>.</p>
+<p>By default, Erlang.mk will create a shared library. To change this and create an executable instead, put this in your Makefile before including Erlang.mk:</p>
+<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">C_SRC_TYPE =</span> executable</tt></pre></div></div>
-<div class="paragraph"><p>The generated file name varies depending on the type of project
-you have (shared library or executable) and on the platform you
-build the project on.</p></div>
-<div class="paragraph"><p>For shared libraries, the generated file name will be
-<em>$(C_SRC_OUTPUT)$(C_SRC_SHARED_EXTENSION)</em>, with the default
-being <em>$(CURDIR)/priv/$(PROJECT)</em> followed by the extension:
-<code>.dll</code> on Windows, <code>.so</code> everywhere else.</p></div>
-<div class="paragraph"><p>For executables, the generated file name is
-<em>$(C_SRC_OUTPUT)$(C_SRC_EXECUTABLE_EXTENSION)</em>, with the same
-default except for the extension: <code>.exe</code> on Windows, and otherwise
-nothing.</p></div>
-<div class="paragraph"><p>Erlang.mk sets appropriate compile and linker flags by default.
-These flags vary depending on the platform, and can of course
-be overriden.</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-<code>CC</code>
-</dt>
-<dd>
-<p>
- The compiler to be used.
-</p>
+<pre><tt><font color="#009900">C_SRC_TYPE =</font> executable</tt></pre>
+</div></div>
+<p>The generated file name varies depending on the type of project you have (shared library or executable) and on the platform you build the project on.</p>
+<p>For shared libraries, the generated file name will be <em>$(C_SRC_OUTPUT)$(C_SRC_SHARED_EXTENSION)</em>, with the default being <em>$(CURDIR)/priv/$(PROJECT)</em> followed by the extension: <code>.dll</code> on Windows, <code>.so</code> everywhere else.</p>
+<p>For executables, the generated file name is <em>$(C_SRC_OUTPUT)$(C_SRC_EXECUTABLE_EXTENSION)</em>, with the same default except for the extension: <code>.exe</code> on Windows, and otherwise nothing.</p>
+<p>Erlang.mk sets appropriate compile and linker flags by default. These flags vary depending on the platform, and can of course be overriden.</p>
+<dl><dt><code>CC</code></dt>
+<dd><p>The compiler to be used.</p>
</dd>
-<dt class="hdlist1">
-<code>CFLAGS</code>
-</dt>
-<dd>
-<p>
- C compiler flags.
-</p>
+<dt><code>CFLAGS</code></dt>
+<dd><p>C compiler flags.</p>
</dd>
-<dt class="hdlist1">
-<code>CXXFLAGS</code>
-</dt>
-<dd>
-<p>
- C++ compiler flags.
-</p>
+<dt><code>CXXFLAGS</code></dt>
+<dd><p>C++ compiler flags.</p>
</dd>
-<dt class="hdlist1">
-<code>LDFLAGS</code>
-</dt>
-<dd>
-<p>
- Linker flags.
-</p>
+<dt><code>LDFLAGS</code></dt>
+<dd><p>Linker flags.</p>
</dd>
-<dt class="hdlist1">
-<code>LDLIBS</code>
-</dt>
-<dd>
-<p>
- Libraries to link against.
-</p>
+<dt><code>LDLIBS</code></dt>
+<dd><p>Libraries to link against.</p>
</dd>
-</dl></div>
-<div class="paragraph"><p>The source files are automatically gathered from the contents
-of <em>$(C_SRC_DIR)</em>. Erlang.mk looks for <em>.c</em>, <em>.C</em>, <em>.cc</em> and <em>.cpp</em>
-source files. You can define the variable <code>SOURCES</code> to manually
-list the files to compile.</p></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
+<p>The source files are automatically gathered from the contents of <em>$(C_SRC_DIR)</em>. Erlang.mk looks for <em>.c</em>, <em>.C</em>, <em>.cc</em> and <em>.cpp</em> source files. You can define the variable <code>SOURCES</code> to manually list the files to compile.</p>
<h2 id="_propagating_compile_and_linker_flags_to_sub_makefiles">Propagating compile and linker flags to sub-Makefiles</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>In some cases it might be necessary to propagate the flags
-you just defined to the sub-Makefiles of your local project.
-You generally can&#8217;t just export those as this could impact
-the building of dependencies.</p></div>
-<div class="paragraph"><p>Makefiles allow you to export variables for specific targets.
-When doing this, the variables will be exported only when
-this target runs, and not for other targets. It is therefore
-possible to export them when building the C code without
-impacting other build steps.</p></div>
-<div class="paragraph"><p>By adding this to your Makefile all five variables will be
-made available to sub-Makefiles when building C code:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>In some cases it might be necessary to propagate the flags you just defined to the sub-Makefiles of your local project. You generally can&apos;t just export those as this could impact the building of dependencies.</p>
+<p>Makefiles allow you to export variables for specific targets. When doing this, the variables will be exported only when this target runs, and not for other targets. It is therefore possible to export them when building the C code without impacting other build steps.</p>
+<p>By adding this to your Makefile all five variables will be made available to sub-Makefiles when building C code:</p>
+<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">app-c_src:</span> <span style="font-weight: bold"><span style="color: #0000FF">export</span></span> CC <span style="color: #990000">+=</span>
-<span style="color: #990000">app-c_src:</span> <span style="font-weight: bold"><span style="color: #0000FF">export</span></span> CFLAGS <span style="color: #990000">+=</span>
-<span style="color: #990000">app-c_src:</span> <span style="font-weight: bold"><span style="color: #0000FF">export</span></span> CPPFLAGS <span style="color: #990000">+=</span>
-<span style="color: #990000">app-c_src:</span> <span style="font-weight: bold"><span style="color: #0000FF">export</span></span> LDFLAGS <span style="color: #990000">+=</span>
-<span style="color: #990000">app-c_src:</span> <span style="font-weight: bold"><span style="color: #0000FF">export</span></span> LDLIBS <span style="color: #990000">+=</span></tt></pre></div></div>
-<div class="paragraph"><p>Appending an empty string to the existing value is necessary
-because Makefiles expect an assignment for target-specific
-exports. Alternatively you can set a new value:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#990000">app-c_src:</font> <b><font color="#0000FF">export</font></b> CC <font color="#990000">+=</font>
+<font color="#990000">app-c_src:</font> <b><font color="#0000FF">export</font></b> CFLAGS <font color="#990000">+=</font>
+<font color="#990000">app-c_src:</font> <b><font color="#0000FF">export</font></b> CPPFLAGS <font color="#990000">+=</font>
+<font color="#990000">app-c_src:</font> <b><font color="#0000FF">export</font></b> LDFLAGS <font color="#990000">+=</font>
+<font color="#990000">app-c_src:</font> <b><font color="#0000FF">export</font></b> LDLIBS <font color="#990000">+=</font></tt></pre>
+</div></div>
+<p>Appending an empty string to the existing value is necessary because Makefiles expect an assignment for target-specific exports. Alternatively you can set a new value:</p>
+<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">app-c_src:</span> <span style="font-weight: bold"><span style="color: #0000FF">export</span></span> CFLAGS <span style="color: #990000">=</span> -O<span style="color: #993399">3</span></tt></pre></div></div>
-</div>
-</div>
+<pre><tt><font color="#990000">app-c_src:</font> <b><font color="#0000FF">export</font></b> CFLAGS <font color="#990000">=</font> -O<font color="#993399">3</font></tt></pre>
+</div></div>
+
diff --git a/docs/en/erlang.mk/1/guide/releases/index.html b/docs/en/erlang.mk/1/guide/releases/index.html
index f731a3d9..09b27b21 100644
--- a/docs/en/erlang.mk/1/guide/releases/index.html
+++ b/docs/en/erlang.mk/1/guide/releases/index.html
@@ -62,217 +62,159 @@
<h1 class="lined-header"><span>Releases</span></h1>
-<div class="paragraph"><p>Erlang.mk relies on <em>Relx</em> for generating releases. This
-chapter covers the Erlang.mk-specific bits. Consult the
-<a href="https://erlware.github.io/relx/">Relx website</a> for more information.</p></div>
-<div class="sect1">
+<p>Erlang.mk relies on <em>Relx</em> for generating releases. This chapter covers the Erlang.mk-specific bits. Consult the <a href="https://erlware.github.io/relx/">Relx website</a> for more information.</p>
<h2 id="_setup">Setup</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Erlang.mk will create a release if it detects a Relx configuration
-file in the <em>$(RELX_CONFIG)</em> location. This defaults to
-<em>$(CURDIR)/relx.config</em>. You can override it by defining
-the variable before including Erlang.mk:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Erlang.mk will create a release if it detects a Relx configuration file in the <em>$(RELX_CONFIG)</em> location. This defaults to <em>$(CURDIR)/relx.config</em>. You can override it by defining the variable before including Erlang.mk:</p>
+<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">RELX_CONFIG =</span> <span style="color: #009900">$(CURDIR)</span>/webchat.config</tt></pre></div></div>
-<div class="paragraph"><p>Relx does not need to be installed. Erlang.mk will download
-and build it automatically.</p></div>
-<div class="paragraph"><p>The Relx executable will be saved in the <em>$(RELX)</em> file. This
-location defaults to <em>$(CURDIR)/relx</em> and can be overriden.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">RELX_CONFIG =</font> <font color="#009900">$(CURDIR)</font>/webchat.config</tt></pre>
+</div></div>
+<p>Relx does not need to be installed. Erlang.mk will download and build it automatically.</p>
+<p>The Relx executable will be saved in the <em>$(RELX)</em> file. This location defaults to <em>$(CURDIR)/relx</em> and can be overriden.</p>
+<!-- @todo You can use a custom location by ???-->
<h2 id="_configuration">Configuration</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>You can specify additional Relx options using the <code>RELX_OPTS</code>
-variable. For example, to enable <code>dev_mode</code>:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>You can specify additional Relx options using the <code>RELX_OPTS</code> variable. For example, to enable <code>dev_mode</code>:</p>
+<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">RELX_OPTS =</span> -d <span style="font-weight: bold"><span style="color: #0000FF">true</span></span></tt></pre></div></div>
-<div class="paragraph"><p>While you can specify the output directory for the release
-in the Relx options directly, Erlang.mk provides a specific
-variable for it: <code>RELX_OUTPUT_DIR</code>. It defaults to the <em>_rel</em>
-directory. You can also override it:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">RELX_OPTS =</font> -d <b><font color="#0000FF">true</font></b></tt></pre>
+</div></div>
+<p>While you can specify the output directory for the release in the Relx options directly, Erlang.mk provides a specific variable for it: <code>RELX_OUTPUT_DIR</code>. It defaults to the <em>_rel</em> directory. You can also override it:</p>
+<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">RELX_OUTPUT_DIR =</span> /path/to/staging/directory</tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">RELX_OUTPUT_DIR =</font> /path/to/staging/directory</tt></pre>
+</div></div>
<h2 id="_generating_the_release">Generating the release</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Now that you&#8217;re all set, all you need to do is generate the
-release. As mentioned before, Erlang.mk will automatically
-generate it when it detects the <em>$(RELX_CONFIG)</em> file. This
-means the following command will also build the release:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Now that you&apos;re all set, all you need to do is generate the release. As mentioned before, Erlang.mk will automatically generate it when it detects the <em>$(RELX_CONFIG)</em> file. This means the following command will also build the release:</p>
+<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</tt></pre></div></div>
-<div class="paragraph"><p>If you need to generate the release, and only the release,
-the <code>rel</code> target can be used:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>$ make</tt></pre>
+</div></div>
+<p>If you need to generate the release, and only the release, the <code>rel</code> target can be used:</p>
+<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 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">
+<pre><tt>$ make rel</tt></pre>
+</div></div>
+<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>
<h2 id="_running_the_release">Running the release</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Erlang.mk provides a convenience function for running the
-release with one simple command:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Erlang.mk provides a convenience function for running the release with one simple command:</p>
+<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 run</tt></pre></div></div>
-<div class="paragraph"><p>This command will also build the project and generate the
-release if they weren&#8217;t already. It starts the release in
-<em>console mode</em>, meaning you will also have a shell ready to
-use to check things as needed.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>$ make run</tt></pre>
+</div></div>
+<p>This command will also build the project and generate the release if they weren&apos;t already. It starts the release in <em>console mode</em>, meaning you will also have a shell ready to use to check things as needed.</p>
<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
+<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>
+<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>
+<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>
+<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>
+<p>Once all this is done, you can build the tarball for the release upgrade:</p>
+<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
+<pre><tt>$ make relup</tt></pre>
+</div></div>
+<p>This will create an archive at the root directory of the release, <code>$RELX_OUTPUT_DIR/example/example-2.tar.gz</code>.</p>
+<p>Move the archive to the correct location on the running node. From the release&apos;s root directory:</p>
+<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
+<pre><tt>$ mkdir releases<font color="#990000">/</font><font color="#993399">2</font><font color="#990000">/</font>
+$ mv path/to/example-<font color="#993399">2</font><font color="#990000">.</font>tar<font color="#990000">.</font>gz releases<font color="#990000">/</font><font color="#993399">2</font><font color="#990000">/</font></tt></pre>
+</div></div>
+<p>Finally, upgrade the release:</p>
+<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
+<pre><tt>$ bin/example_release upgrade <font color="#FF0000">"2/example_release"</font></tt></pre>
+</div></div>
+<p>Or on Windows:</p>
+<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>
-<div class="sect1">
+<pre><tt>$ bin/example_release<font color="#990000">.</font>cmd upgrade <font color="#FF0000">"2/example_release"</font></tt></pre>
+</div></div>
+<p>Your release was upgraded!</p>
<h2 id="_getting_relx_semver_value">Getting Relx semver value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>There is a <strong>workaround</strong> to get the semver value which is
-generated by Relx based on VCS history.</p></div>
-<div class="paragraph"><p>Create a file <em>rel/version</em> with only one line inside:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>There is a <strong>workaround</strong> to get the semver value which is generated by Relx based on VCS history.</p>
+<p>Create a file <em>rel/version</em> with only one line inside:</p>
+<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">release_version</span> }}</tt></pre></div></div>
-<div class="paragraph"><p>Add/Update the <code>overlay</code> section of your <code>relx.config</code>:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>{{ <font color="#FF6600">release_version</font> }}</tt></pre>
+</div></div>
+<p>Add/Update the <code>overlay</code> section of your <code>relx.config</code>:</p>
+<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">overlay</span>, [
- {<span style="color: #FF6600">template</span>, <span style="color: #FF0000">"rel/version"</span>, <span style="color: #FF0000">"version"</span>}
-]}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>When you run <code>make rel</code> it creates the file <em>$(RELX_OUTPUT_DIR)/example/version</em>
-which contains the version value generated by Relx.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>{<font color="#FF6600">overlay</font>, [
+ {<font color="#FF6600">template</font>, <font color="#FF0000">"rel/version"</font>, <font color="#FF0000">"version"</font>}
+]}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>When you run <code>make rel</code> it creates the file <em>$(RELX_OUTPUT_DIR)/example/version</em> which contains the version value generated by Relx.</p>
+<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>$ cat _rel/app/release
-<span style="color: #993399">1.0</span><span style="color: #990000">.</span><span style="color: #993399">0</span><span style="color: #990000">+</span>build<span style="color: #990000">.</span><span style="color: #993399">11</span><span style="color: #990000">.</span>ref5612aa0</tt></pre></div></div>
-<div class="paragraph"><p>In your <code>Makefile</code> you can use this simple snippet to get the version,
-but please keep in mind that this should depend on the <code>rel</code> target:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<font color="#993399">1.0</font><font color="#990000">.</font><font color="#993399">0</font><font color="#990000">+</font>build<font color="#990000">.</font><font color="#993399">11</font><font color="#990000">.</font>ref5612aa0</tt></pre>
+</div></div>
+<p>In your <code>Makefile</code> you can use this simple snippet to get the version, but please keep in mind that this should depend on the <code>rel</code> target:</p>
+<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">$(</span>shell cat <span style="color: #009900">$(RELX_OUTPUT_DIR)/$(RELX_REL_NAME)/version)</span></tt></pre></div></div>
-<div class="paragraph"><p>For example:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">$(</font>shell cat <font color="#009900">$(RELX_OUTPUT_DIR)/$(RELX_REL_NAME)/version)</font></tt></pre>
+</div></div>
+<p>For example:</p>
+<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>include erlang.mk
-<span style="color: #009900">APP_VERSION =</span> <span style="color: #009900">$(</span>shell cat <span style="color: #009900">$(RELX_OUTPUT_DIR)/$(RELX_REL_NAME)/version)</span>
-<span style="color: #990000">myrecipe:</span> all
- echo APP_VERSION <span style="color: #990000">=</span> <span style="color: #009900">$(APP_VERSION)</span></tt></pre></div></div>
-<div class="paragraph"><p>Would output:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<font color="#009900">APP_VERSION =</font> <font color="#009900">$(</font>shell cat <font color="#009900">$(RELX_OUTPUT_DIR)/$(RELX_REL_NAME)/version)</font>
+<font color="#990000">myrecipe:</font> all
+ echo APP_VERSION <font color="#990000">=</font> <font color="#009900">$(APP_VERSION)</font></tt></pre>
+</div></div>
+<p>Would output:</p>
+<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 myrecipe
-<span style="color: #990000">...</span>
-<span style="color: #990000">===&gt;</span> Starting relx build process <span style="color: #990000">...</span>
-<span style="color: #990000">===&gt;</span> Resolving OTP Applications from directories<span style="color: #990000">:</span>
+<font color="#990000">...</font>
+<font color="#990000">===&gt;</font> Starting relx build process <font color="#990000">...</font>
+<font color="#990000">===&gt;</font> Resolving OTP Applications from directories<font color="#990000">:</font>
/home/username/example/apps
/home/username/example/deps
/usr/lib/erlang/lib
- /home/username/example<span style="color: #990000">/</span>_rel
-<span style="color: #990000">===&gt;</span> Resolved example-<span style="color: #993399">0.3</span><span style="color: #990000">.</span><span style="color: #993399">10</span><span style="color: #990000">+</span>build<span style="color: #990000">.</span><span style="color: #993399">11</span><span style="color: #990000">.</span>ref5612aa0
-<span style="color: #990000">===&gt;</span> Including Erts from /usr/lib/erlang
-<span style="color: #990000">===&gt;</span> release successfully created<span style="color: #990000">!</span>
-<span style="color: #990000">===&gt;</span> tarball /home/username/example<span style="color: #990000">/</span>_rel/example/example-<span style="color: #993399">0.3</span><span style="color: #990000">.</span><span style="color: #993399">10</span><span style="color: #990000">+</span>build<span style="color: #990000">.</span><span style="color: #993399">11</span><span style="color: #990000">.</span>ref5612aa0<span style="color: #990000">.</span>tar<span style="color: #990000">.</span>gz successfully created<span style="color: #990000">!</span>
-echo APP_VERSION <span style="color: #990000">=</span> <span style="color: #993399">0.3</span><span style="color: #990000">.</span><span style="color: #993399">10</span><span style="color: #990000">+</span>build<span style="color: #990000">.</span><span style="color: #993399">11</span><span style="color: #990000">.</span>ref5612aa0
-APP_VERSION <span style="color: #990000">=</span> <span style="color: #993399">0.3</span><span style="color: #990000">.</span><span style="color: #993399">10</span><span style="color: #990000">+</span>build<span style="color: #990000">.</span><span style="color: #993399">11</span><span style="color: #990000">.</span>ref5612aa0</tt></pre></div></div>
-</div>
-</div>
+ /home/username/example<font color="#990000">/</font>_rel
+<font color="#990000">===&gt;</font> Resolved example-<font color="#993399">0.3</font><font color="#990000">.</font><font color="#993399">10</font><font color="#990000">+</font>build<font color="#990000">.</font><font color="#993399">11</font><font color="#990000">.</font>ref5612aa0
+<font color="#990000">===&gt;</font> Including Erts from /usr/lib/erlang
+<font color="#990000">===&gt;</font> release successfully created<font color="#990000">!</font>
+<font color="#990000">===&gt;</font> tarball /home/username/example<font color="#990000">/</font>_rel/example/example-<font color="#993399">0.3</font><font color="#990000">.</font><font color="#993399">10</font><font color="#990000">+</font>build<font color="#990000">.</font><font color="#993399">11</font><font color="#990000">.</font>ref5612aa0<font color="#990000">.</font>tar<font color="#990000">.</font>gz successfully created<font color="#990000">!</font>
+echo APP_VERSION <font color="#990000">=</font> <font color="#993399">0.3</font><font color="#990000">.</font><font color="#993399">10</font><font color="#990000">+</font>build<font color="#990000">.</font><font color="#993399">11</font><font color="#990000">.</font>ref5612aa0
+APP_VERSION <font color="#990000">=</font> <font color="#993399">0.3</font><font color="#990000">.</font><font color="#993399">10</font><font color="#990000">+</font>build<font color="#990000">.</font><font color="#993399">11</font><font color="#990000">.</font>ref5612aa0</tt></pre>
+</div></div>
+
diff --git a/docs/en/erlang.mk/1/guide/sfx/index.html b/docs/en/erlang.mk/1/guide/sfx/index.html
index b9942e94..10b337f4 100644
--- a/docs/en/erlang.mk/1/guide/sfx/index.html
+++ b/docs/en/erlang.mk/1/guide/sfx/index.html
@@ -62,55 +62,36 @@
<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">
+<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>
+<p>This allows you to package the release as a single file that can then be executed.</p>
+<p>This feature is currently experimental. Feedback is much appreciated.</p>
<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
+<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 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">
+<pre><tt>$ make <font color="#009900">SFX</font><font color="#990000">=</font><font color="#993399">1</font></tt></pre>
+</div></div>
+<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>
<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
+<p>Simply execute the script to get started:</p>
+<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>
+<pre><tt>$ <font color="#990000">./</font>_rel/hello_world<font color="#990000">.</font>run
+Exec<font color="#990000">:</font> /tmp/tmp<font color="#990000">.</font>3eeEq7E1ta/erts-<font color="#993399">8.1</font>/bin/erlexec <font color="#990000">...</font>
+Root<font color="#990000">:</font> /tmp/tmp<font color="#990000">.</font>3eeEq7E1ta
+/tmp/tmp<font color="#990000">.</font>3eeEq7E1ta
+Erlang/OTP <font color="#993399">19</font> <font color="#990000">[</font>erts-<font color="#993399">8.1</font><font color="#990000">]</font> <font color="#990000">[</font><b><font color="#0000FF">source</font></b><font color="#990000">]</font> <font color="#990000">[</font><font color="#993399">64</font>-bit<font color="#990000">]</font> <font color="#990000">[</font>smp<font color="#990000">:</font><font color="#993399">4</font><font color="#990000">:</font><font color="#993399">4</font><font color="#990000">]</font> <font color="#990000">...</font>
+
+Eshell V8<font color="#990000">.</font><font color="#993399">1</font> <font color="#990000">(</font>abort with <font color="#990000">^</font>G<font color="#990000">)</font>
+<font color="#990000">(</font>hello_world@localhost<font color="#990000">)</font><font color="#993399">1</font><font color="#990000">&gt;</font></tt></pre>
+</div></div>
+<p>As you can see the archive is extracted to a temporary directory before the release can be started.</p>
+<p>The self-extracting script currently only supports starting the release in <code>console</code> mode.</p>
+
diff --git a/docs/en/erlang.mk/1/guide/shell/index.html b/docs/en/erlang.mk/1/guide/shell/index.html
index ff3f3524..c287d6b1 100644
--- a/docs/en/erlang.mk/1/guide/shell/index.html
+++ b/docs/en/erlang.mk/1/guide/shell/index.html
@@ -62,66 +62,48 @@
<h1 class="lined-header"><span>Erlang shell</span></h1>
-<div class="paragraph"><p>Erlang.mk provides a convenient target for starting a shell
-with all the paths set properly to experiment with your code.</p></div>
-<div class="sect1">
+<p>Erlang.mk provides a convenient target for starting a shell with all the paths set properly to experiment with your code.</p>
<h2 id="_configuration">Configuration</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <code>SHELL_DEPS</code> variable can be used to define dependencies
-that are only to be used when the <code>make shell</code> command is called.
-For example, if you want to use <em>kjell</em> as your shell:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The <code>SHELL_DEPS</code> variable can be used to define dependencies that are only to be used when the <code>make shell</code> command is called. For example, if you want to use <em>kjell</em> as your shell:</p>
+<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">SHELL_DEPS =</span> kjell</tt></pre></div></div>
-<div class="paragraph"><p>Dependencies are downloaded and compiled the first time you
-run the <code>make shell</code> command.</p></div>
-<div class="paragraph"><p>You can customize the executable used to start the Erlang shell.
-To continue with our example, if you want to use <em>kjell</em> as your
-shell, you also need to change <code>SHELL_ERL</code> and point it to the
-<code>kjell</code> executable:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">SHELL_DEPS =</font> kjell</tt></pre>
+</div></div>
+<p>Dependencies are downloaded and compiled the first time you run the <code>make shell</code> command.</p>
+<p>You can customize the executable used to start the Erlang shell. To continue with our example, if you want to use <em>kjell</em> as your shell, you also need to change <code>SHELL_ERL</code> and point it to the <code>kjell</code> executable:</p>
+<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">SHELL_ERL =</span> <span style="color: #009900">$(DEPS_DIR)</span>/kjell/bin/kjell</tt></pre></div></div>
-<div class="paragraph"><p>You can specify additional options to be used when starting the
-shell using the <code>SHELL_OPTS</code> variable:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">SHELL_ERL =</font> <font color="#009900">$(DEPS_DIR)</font>/kjell/bin/kjell</tt></pre>
+</div></div>
+<p>You can specify additional options to be used when starting the shell using the <code>SHELL_OPTS</code> variable:</p>
+<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">SHELL_OPTS =</span> -setcookie chocolate</tt></pre></div></div>
-<div class="paragraph"><p>Any of the usual <code>erl</code> options can be used, including <code>-eval</code>:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">SHELL_OPTS =</font> -setcookie chocolate</tt></pre>
+</div></div>
+<p>Any of the usual <code>erl</code> options can be used, including <code>-eval</code>:</p>
+<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">SHELL_OPTS =</span> -eval <span style="color: #FF0000">'my_app:run()'</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">SHELL_OPTS =</font> -eval <font color="#FF0000">'my_app:run()'</font></tt></pre>
+</div></div>
<h2 id="_usage">Usage</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>To start the shell, all you need is the following command:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>To start the shell, all you need is the following command:</p>
+<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 shell</tt></pre></div></div>
-<div class="paragraph"><p>The shell can be stopped as usual with a double Ctrl+C or the
-command <code>q().</code>.</p></div>
-<div class="paragraph"><p>Note that the <code>shell</code> target does not build the application. To do it,
-use either the <code>app</code> target or, if you want to include also test
-modules, the <code>test-build</code> target.</p></div>
-</div>
-</div>
+<pre><tt>$ make shell</tt></pre>
+</div></div>
+<p>The shell can be stopped as usual with a double Ctrl+C or the command <code>q().</code>.</p>
+<p>Note that the <code>shell</code> target does not build the application. To do it, use either the <code>app</code> target or, if you want to include also test modules, the <code>test-build</code> target.</p>
+
diff --git a/docs/en/erlang.mk/1/guide/sphinx/index.html b/docs/en/erlang.mk/1/guide/sphinx/index.html
index 379dc8a6..c6956ea4 100644
--- a/docs/en/erlang.mk/1/guide/sphinx/index.html
+++ b/docs/en/erlang.mk/1/guide/sphinx/index.html
@@ -62,34 +62,16 @@
<h1 class="lined-header"><span>Sphinx documentation</span></h1>
-<div class="paragraph"><p>Erlang.mk includes targets for running the
-<a href="http://www.sphinx-doc.org/">Sphinx documentation generator</a>, which can produce
-documentation in various formats, like HTML, man pages, Texinfo, LaTeX, and
-others.</p></div>
-<div class="sect1">
+<p>Erlang.mk includes targets for running the <a href="http://www.sphinx-doc.org/">Sphinx documentation generator</a>, which can produce documentation in various formats, like HTML, man pages, Texinfo, LaTeX, and others.</p>
<h2 id="_writing_sphinx_documentation">Writing Sphinx documentation</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Sphinx generates documentation from a set of
-<a href="http://www.sphinx-doc.org/en/stable/rest.html">reST</a> documents. There is
-a <a href="http://www.sphinx-doc.org/en/stable/tutorial.html">quick start guide</a> on
-Sphinx' website. For Erlang.mk, we&#8217;ll set up a minimal environment instead.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Sphinx generates documentation from a set of <a href="http://www.sphinx-doc.org/en/stable/rest.html">reST</a> documents. There is a <a href="http://www.sphinx-doc.org/en/stable/tutorial.html">quick start guide</a> on Sphinx&apos; website. For Erlang.mk, we&apos;ll set up a minimal environment instead.</p>
<h2 id="_basic_setup">Basic setup</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>By default, Erlang.mk expects Sphinx documentation to be placed in the <em>doc</em>
-directory, with <em>doc/conf.py</em> config file in particular. The file contains
-information about the project, among the other things.</p></div>
-<div class="paragraph"><p>A minimal <em>doc/conf.py</em> will look similar to this:</p></div>
-<div class="listingblock">
-<div class="content"></div></div>
-<div class="paragraph"><p>It points to a <em>doc/index.rst</em> document. A simple skeleton includes a table of
-contents for all documentation, and links to generated index of terms and
-a search page:</p></div>
-<div class="listingblock">
-<div class="content">
-<pre><code>My Project
+<p>By default, Erlang.mk expects Sphinx documentation to be placed in the <em>doc</em> directory, with <em>doc/conf.py</em> config file in particular. The file contains information about the project, among the other things.</p>
+<p>A minimal <em>doc/conf.py</em> will look similar to this:</p>
+<div class="listingblock"><div class="content">source-highlight: could not find a language definition for python
+</div></div>
+<p>It points to a <em>doc/index.rst</em> document. A simple skeleton includes a table of contents for all documentation, and links to generated index of terms and a search page:</p>
+<div class="listingblock"><div class="content"><pre>My Project
==========
Contents:
@@ -103,104 +85,51 @@ Indices and tables
==================
* :ref:`genindex`
-* :ref:`search`</code></pre>
-</div></div>
-<div class="paragraph"><p>The skeleton above has a link to one other page, <em>doc/other_page.rst</em>. Simple
-header with some text will do for now:</p></div>
-<div class="listingblock">
-<div class="content">
-<pre><code>Other Page
+* :ref:`search`</pre></div></div>
+<p>The skeleton above has a link to one other page, <em>doc/other_page.rst</em>. Simple header with some text will do for now:</p>
+<div class="listingblock"><div class="content"><pre>Other Page
==========
-Lorem ipsum dolor sit amet...</code></pre>
-</div></div>
-<div class="paragraph"><p>The files above are enough to build HTML documentation to the <em>html</em> directory.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+Lorem ipsum dolor sit amet...</pre></div></div>
+<p>The files above are enough to build HTML documentation to the <em>html</em> directory.</p>
+<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 docs <span style="font-style: italic"><span style="color: #9A1900"># all the docs, including EDoc and AsciiDoc if applicable</span></span>
-$ make sphinx <span style="font-style: italic"><span style="color: #9A1900"># Sphinx docs specifically</span></span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>$ make docs <i><font color="#9A1900"># all the docs, including EDoc and AsciiDoc if applicable</font></i>
+$ make sphinx <i><font color="#9A1900"># Sphinx docs specifically</font></i></tt></pre>
+</div></div>
<h2 id="_erlang_mk_configuration">Erlang.mk configuration</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Erlang.mk defaults to the following configuration:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Erlang.mk defaults to the following configuration:</p>
+<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">SPHINX_FORMATS =</span> html
-<span style="color: #009900">SPHINX_SOURCE =</span> doc</tt></pre></div></div>
-<div class="paragraph"><p>To change the location of Sphinx sources, you need to set the <code>$(SPHINX_SOURCE)</code>
-variable. The <em>conf.py</em> file should also be placed in that directory, unless you
-specify <code>$(SPHINX_CONFDIR)</code>.</p></div>
-<div class="paragraph"><p>The variable <code>$(SPHINX_OPTS)</code> allows to provide options to <code>sphinx-build</code>, which
-is particularly useful for <code>-D name=value</code> options. You can even forego
-<em>doc/conf.py</em> file, using <code>-D name=value</code> in combination with the <code>-C</code> option,
-though in this case you will need to manually call <code>make sphinx</code> or add the
-<code>sphinx</code> target to dependencies of <code>docs</code>.</p></div>
-<div class="paragraph"><p>The <code>$(SPHINX_FORMATS)</code> variable lists formats to generate. By default only HTML
-is generated, but it can also build man pages or LaTeX documents which can later
-be converted to PDF. See the
-<a href="http://www.sphinx-doc.org/en/stable/invocation.html#cmdoption-sphinx-build-b">description of the <code>-b</code> option</a>
-for <code>sphinx-build</code> for a list of known formats.</p></div>
-<div class="paragraph"><p>Formats are by default generated to a directory called after the format
-(<em>html</em> for HTML, <em>man</em> for man pages, and so on). To change this behaviour
-for a specific format, you can set the <code>$(sphinx_$(format)_output)</code> variable, e.g.
-<code>$(sphinx_html_output)</code> for <em>html</em> or <code>$(sphinx_man_output)</code> for <em>man</em>.
-There are also <code>$(sphinx_$(format)_opts)</code> variables for setting <code>sphinx-build</code>
-options for a single format only.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">SPHINX_FORMATS =</font> html
+<font color="#009900">SPHINX_SOURCE =</font> doc</tt></pre>
+</div></div>
+<p>To change the location of Sphinx sources, you need to set the <code>$(SPHINX_SOURCE)</code> variable. The <em>conf.py</em> file should also be placed in that directory, unless you specify <code>$(SPHINX_CONFDIR)</code>.</p>
+<p>The variable <code>$(SPHINX_OPTS)</code> allows to provide options to <code>sphinx-build</code>, which is particularly useful for <code>-D name=value</code> options. You can even forego <em>doc/conf.py</em> file, using <code>-D name=value</code> in combination with the <code>-C</code> option, though in this case you will need to manually call <code>make sphinx</code> or add the <code>sphinx</code> target to dependencies of <code>docs</code>.</p>
+<p>The <code>$(SPHINX_FORMATS)</code> variable lists formats to generate. By default only HTML is generated, but it can also build man pages or LaTeX documents which can later be converted to PDF. See the <a href="http://www.sphinx-doc.org/en/stable/invocation.html#cmdoption-sphinx-build-b">description of the `-b` option</a> for <code>sphinx-build</code> for a list of known formats.</p>
+<p>Formats are by default generated to a directory called after the format (<em>html</em> for HTML, <em>man</em> for man pages, and so on). To change this behaviour for a specific format, you can set the <code>$(sphinx_$(format)_output)</code> variable, e.g. <code>$(sphinx_html_output)</code> for <em>html</em> or <code>$(sphinx_man_output)</code> for <em>man</em>. There are also <code>$(sphinx_$(format)_opts)</code> variables for setting <code>sphinx-build</code> options for a single format only.</p>
<h2 id="_generating_man_pages">Generating man pages</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>To generate man pages, you need to include <code>man</code> in <code>$(SPHINX_FORMATS)</code> in
-your Makefile and define the <code>man_pages</code> option in <em>doc/conf.py</em>:</p></div>
-<div class="listingblock">
-<div class="content"></div></div>
-<div class="paragraph"><p>As the
-<a href="http://www.sphinx-doc.org/en/stable/config.html#options-for-manual-page-output">Sphinx documentation</a>
-indicates, the structure is:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<code>doc_name</code> is the path to the man page&#8217;s source (relative <code>$(SPHINX_SOURCE)</code>),
- without the <em>.rst</em> suffix
-</p>
+<p>To generate man pages, you need to include <code>man</code> in <code>$(SPHINX_FORMATS)</code> in your Makefile and define the <code>man_pages</code> option in <em>doc/conf.py</em>:</p>
+<div class="listingblock"><div class="content">source-highlight: could not find a language definition for python
+</div></div>
+<p>As the <a href="http://www.sphinx-doc.org/en/stable/config.html#options-for-manual-page-output">Sphinx documentation</a> indicates, the structure is:</p>
+<ul><li><code>doc_name</code> is the path to the man page&apos;s source (relative <code>$(SPHINX_SOURCE)</code>), without the <em>.rst</em> suffix
</li>
-<li>
-<p>
-<code>page_name</code> is the name of the resulting man page, which will be used as a base
- for the output file name and will be included in the generated man page
-</p>
+<li><code>page_name</code> is the name of the resulting man page, which will be used as a base for the output file name and will be included in the generated man page
</li>
-<li>
-<p>
-<code>Manpage Title</code> is a short, one-line description, which will be included in
- the generated man page on a position that&#8217;s used by the <code>apropos</code> command
-</p>
+<li><code>Manpage Title</code> is a short, one-line description, which will be included in the generated man page on a position that&apos;s used by the <code>apropos</code> command
</li>
-<li>
-<p>
-<code>Page Author</code> (or more of them) will be included in the autogenerated <code>AUTHOR</code>
- section. Leaving this field empty disables generating the <code>AUTHOR</code> section
-</p>
+<li><code>Page Author</code> (or more of them) will be included in the autogenerated <code>AUTHOR</code> section. Leaving this field empty disables generating the <code>AUTHOR</code> section
</li>
-<li>
-<p>
-<code>1</code> is the man page section number
-</p>
+<li><code>1</code> is the man page section number
</li>
-</ul></div>
-<div class="paragraph"><p>With the above configuration (and Erlang.mk&#8217;s defaults), <em>doc/doc_name.rst</em> will
-be used to generate <em>man/page_name.1</em>.</p></div>
-</div>
-</div>
+</ul>
+<p>With the above configuration (and Erlang.mk&apos;s defaults), <em>doc/doc_name.rst</em> will be used to generate <em>man/page_name.1</em>.</p>
+
diff --git a/docs/en/erlang.mk/1/guide/triq/index.html b/docs/en/erlang.mk/1/guide/triq/index.html
index 5b478a0b..5f1f5608 100644
--- a/docs/en/erlang.mk/1/guide/triq/index.html
+++ b/docs/en/erlang.mk/1/guide/triq/index.html
@@ -62,44 +62,43 @@
<h1 class="lined-header"><span>Triq</span></h1>
-<div class="paragraph"><p><a href="https://triq.gitlab.io/">Triq</a> is a QuickCheck-like library for
-property-based testing. Erlang.mk automates discovery and checking of
-Triq properties.</p></div>
-<div class="paragraph"><p>To run all tests (including Triq):</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p><a href="https://triq.gitlab.io/">Triq</a> is a QuickCheck-like library for property-based testing. Erlang.mk automates discovery and checking of Triq properties.</p>
+<p>To run all tests (including Triq):</p>
+<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 tests</tt></pre></div></div>
-<div class="paragraph"><p>To run all tests and static checks (including Triq):</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>$ make tests</tt></pre>
+</div></div>
+<p>To run all tests and static checks (including Triq):</p>
+<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 check</tt></pre></div></div>
-<div class="paragraph"><p>You can also run Triq separately:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>$ make check</tt></pre>
+</div></div>
+<p>You can also run Triq separately:</p>
+<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 triq</tt></pre></div></div>
-<div class="paragraph"><p>To check properties from a single module:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>$ make triq</tt></pre>
+</div></div>
+<p>To check properties from a single module:</p>
+<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 triq <span style="color: #009900">t</span><span style="color: #990000">=</span>foo_tests</tt></pre></div></div>
-<div class="paragraph"><p>To check a single property:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>$ make triq <font color="#009900">t</font><font color="#990000">=</font>foo_tests</tt></pre>
+</div></div>
+<p>To check a single property:</p>
+<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 triq <span style="color: #009900">t</span><span style="color: #990000">=</span>foo_tests<span style="color: #990000">:</span>bar</tt></pre></div></div>
+<pre><tt>$ make triq <font color="#009900">t</font><font color="#990000">=</font>foo_tests<font color="#990000">:</font>bar</tt></pre>
+</div></div>
+
diff --git a/docs/en/erlang.mk/1/guide/updating/index.html b/docs/en/erlang.mk/1/guide/updating/index.html
index 44f5adb4..86e18069 100644
--- a/docs/en/erlang.mk/1/guide/updating/index.html
+++ b/docs/en/erlang.mk/1/guide/updating/index.html
@@ -62,89 +62,56 @@
<h1 class="lined-header"><span>Updating Erlang.mk</span></h1>
-<div class="paragraph"><p>This chapter describes how to update the <em>erlang.mk</em> file
-in your repository.</p></div>
-<div class="sect1">
+<p>This chapter describes how to update the <em>erlang.mk</em> file in your repository.</p>
<h2 id="_initial_bootstrap">Initial bootstrap</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The first time you use Erlang.mk, it will bootstrap itself.
-It always uses the most recent version for this, so you don&#8217;t
-have to update after creating your project.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The first time you use Erlang.mk, it will bootstrap itself. It always uses the most recent version for this, so you don&apos;t have to update after creating your project.</p>
<h2 id="_updating">Updating</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Later on though, updating becomes a necessity. Erlang.mk
-developers and contributors relentlessly improve the project
-and add new features; it would be a waste not to benefit
-from this.</p></div>
-<div class="paragraph"><p>That&#8217;s why updating Erlang.mk is so simple. All you need
-to do is to call <code>make erlang-mk</code>:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Later on though, updating becomes a necessity. Erlang.mk developers and contributors relentlessly improve the project and add new features; it would be a waste not to benefit from this.</p>
+<p>That&apos;s why updating Erlang.mk is so simple. All you need to do is to call <code>make erlang-mk</code>:</p>
+<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 erlang-mk
-git clone https<span style="color: #990000">:</span>//github<span style="color: #990000">.</span>com/ninenines/erlang<span style="color: #990000">.</span>mk <span style="color: #990000">.</span>erlang<span style="color: #990000">.</span>mk<span style="color: #990000">.</span>build
-Cloning into <span style="color: #FF0000">'.erlang.mk.build'</span><span style="color: #990000">...</span>
-remote<span style="color: #990000">:</span> Counting objects<span style="color: #990000">:</span> <span style="color: #993399">4035</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">done</span></span><span style="color: #990000">.</span>
-remote<span style="color: #990000">:</span> Compressing objects<span style="color: #990000">:</span> <span style="color: #993399">100</span><span style="color: #990000">%</span> <span style="color: #990000">(</span><span style="color: #993399">12</span><span style="color: #990000">/</span><span style="color: #993399">12</span><span style="color: #990000">),</span> <span style="font-weight: bold"><span style="color: #0000FF">done</span></span><span style="color: #990000">.</span>
-remote<span style="color: #990000">:</span> Total <span style="color: #993399">4035</span> <span style="color: #990000">(</span>delta <span style="color: #993399">8</span><span style="color: #990000">),</span> reused <span style="color: #993399">4</span> <span style="color: #990000">(</span>delta <span style="color: #993399">4</span><span style="color: #990000">),</span> pack-reused <span style="color: #993399">4019</span>
-Receiving objects<span style="color: #990000">:</span> <span style="color: #993399">100</span><span style="color: #990000">%</span> <span style="color: #990000">(</span><span style="color: #993399">4035</span><span style="color: #990000">/</span><span style="color: #993399">4035</span><span style="color: #990000">),</span> <span style="color: #993399">1.10</span> MiB <span style="color: #990000">|</span> <span style="color: #993399">1000.00</span> KiB/s<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">done</span></span><span style="color: #990000">.</span>
-Resolving deltas<span style="color: #990000">:</span> <span style="color: #993399">100</span><span style="color: #990000">%</span> <span style="color: #990000">(</span><span style="color: #993399">2442</span><span style="color: #990000">/</span><span style="color: #993399">2442</span><span style="color: #990000">),</span> <span style="font-weight: bold"><span style="color: #0000FF">done</span></span><span style="color: #990000">.</span>
-Checking connectivity<span style="color: #990000">...</span> <span style="font-weight: bold"><span style="color: #0000FF">done</span></span><span style="color: #990000">.</span>
-<span style="font-weight: bold"><span style="color: #0000FF">if</span></span> <span style="color: #990000">[</span> -f build<span style="color: #990000">.</span>config <span style="color: #990000">];</span> <span style="font-weight: bold"><span style="color: #0000FF">then</span></span> cp build<span style="color: #990000">.</span>config <span style="color: #990000">.</span>erlang<span style="color: #990000">.</span>mk<span style="color: #990000">.</span>build<span style="color: #990000">;</span> <span style="font-weight: bold"><span style="color: #0000FF">fi</span></span>
-cd <span style="color: #990000">.</span>erlang<span style="color: #990000">.</span>mk<span style="color: #990000">.</span>build <span style="color: #990000">&amp;&amp;</span> make
-make<span style="color: #990000">[</span><span style="color: #993399">1</span><span style="color: #990000">]:</span> Entering directory <span style="color: #FF0000">'/home/essen/tmp/emkg/hello_joe/.erlang.mk.build'</span>
-awk <span style="color: #FF0000">'FNR==1 &amp;&amp; NR!=1{print ""}1'</span> core/core<span style="color: #990000">.</span>mk index<span style="color: #990000">/*.</span>mk core/index<span style="color: #990000">.</span>mk core/deps<span style="color: #990000">.</span>mk plugins/protobuffs<span style="color: #990000">.</span>mk core/erlc<span style="color: #990000">.</span>mk core/docs<span style="color: #990000">.</span>mk core/test<span style="color: #990000">.</span>mk plugins/asciidoc<span style="color: #990000">.</span>mk plugins/bootstrap<span style="color: #990000">.</span>mk plugins/c_src<span style="color: #990000">.</span>mk plugins/ci<span style="color: #990000">.</span>mk plugins/ct<span style="color: #990000">.</span>mk plugins/dialyzer<span style="color: #990000">.</span>mk plugins/edoc<span style="color: #990000">.</span>mk plugins/elvis<span style="color: #990000">.</span>mk plugins/erlydtl<span style="color: #990000">.</span>mk plugins/escript<span style="color: #990000">.</span>mk plugins/eunit<span style="color: #990000">.</span>mk plugins/relx<span style="color: #990000">.</span>mk plugins/shell<span style="color: #990000">.</span>mk plugins/triq<span style="color: #990000">.</span>mk plugins/xref<span style="color: #990000">.</span>mk plugins/cover<span style="color: #990000">.</span>mk <span style="color: #990000">\</span>
- <span style="color: #990000">|</span> sed <span style="color: #FF0000">'s/^ERLANG_MK_VERSION = .*/ERLANG_MK_VERSION = 1.2.0-642-gccd2b9f/'</span> <span style="color: #990000">&gt;</span> erlang<span style="color: #990000">.</span>mk
-make<span style="color: #990000">[</span><span style="color: #993399">1</span><span style="color: #990000">]:</span> Leaving directory <span style="color: #FF0000">'/home/essen/tmp/emkg/hello_joe/.erlang.mk.build'</span>
-cp <span style="color: #990000">.</span>erlang<span style="color: #990000">.</span>mk<span style="color: #990000">.</span>build/erlang<span style="color: #990000">.</span>mk <span style="color: #990000">.</span>/erlang<span style="color: #990000">.</span>mk
-rm -rf <span style="color: #990000">.</span>erlang<span style="color: #990000">.</span>mk<span style="color: #990000">.</span>build</tt></pre></div></div>
-<div class="paragraph"><p>All that&#8217;s left to do is to commit the file!</p></div>
-<div class="paragraph"><p>Yep, it&#8217;s that easy.</p></div>
-</div>
-</div>
-<div class="sect1">
+git clone https<font color="#990000">:</font>//github<font color="#990000">.</font>com/ninenines/erlang<font color="#990000">.</font>mk <font color="#990000">.</font>erlang<font color="#990000">.</font>mk<font color="#990000">.</font>build
+Cloning into <font color="#FF0000">'.erlang.mk.build'</font><font color="#990000">...</font>
+remote<font color="#990000">:</font> Counting objects<font color="#990000">:</font> <font color="#993399">4035</font><font color="#990000">,</font> <b><font color="#0000FF">done</font></b><font color="#990000">.</font>
+remote<font color="#990000">:</font> Compressing objects<font color="#990000">:</font> <font color="#993399">100</font><font color="#990000">%</font> <font color="#990000">(</font><font color="#993399">12</font><font color="#990000">/</font><font color="#993399">12</font><font color="#990000">),</font> <b><font color="#0000FF">done</font></b><font color="#990000">.</font>
+remote<font color="#990000">:</font> Total <font color="#993399">4035</font> <font color="#990000">(</font>delta <font color="#993399">8</font><font color="#990000">),</font> reused <font color="#993399">4</font> <font color="#990000">(</font>delta <font color="#993399">4</font><font color="#990000">),</font> pack-reused <font color="#993399">4019</font>
+Receiving objects<font color="#990000">:</font> <font color="#993399">100</font><font color="#990000">%</font> <font color="#990000">(</font><font color="#993399">4035</font><font color="#990000">/</font><font color="#993399">4035</font><font color="#990000">),</font> <font color="#993399">1.10</font> MiB <font color="#990000">|</font> <font color="#993399">1000.00</font> KiB/s<font color="#990000">,</font> <b><font color="#0000FF">done</font></b><font color="#990000">.</font>
+Resolving deltas<font color="#990000">:</font> <font color="#993399">100</font><font color="#990000">%</font> <font color="#990000">(</font><font color="#993399">2442</font><font color="#990000">/</font><font color="#993399">2442</font><font color="#990000">),</font> <b><font color="#0000FF">done</font></b><font color="#990000">.</font>
+Checking connectivity<font color="#990000">...</font> <b><font color="#0000FF">done</font></b><font color="#990000">.</font>
+<b><font color="#0000FF">if</font></b> <font color="#990000">[</font> -f build<font color="#990000">.</font>config <font color="#990000">];</font> <b><font color="#0000FF">then</font></b> cp build<font color="#990000">.</font>config <font color="#990000">.</font>erlang<font color="#990000">.</font>mk<font color="#990000">.</font>build<font color="#990000">;</font> <b><font color="#0000FF">fi</font></b>
+cd <font color="#990000">.</font>erlang<font color="#990000">.</font>mk<font color="#990000">.</font>build <font color="#990000">&amp;&amp;</font> make
+make<font color="#990000">[</font><font color="#993399">1</font><font color="#990000">]:</font> Entering directory <font color="#FF0000">'/home/essen/tmp/emkg/hello_joe/.erlang.mk.build'</font>
+awk <font color="#FF0000">'FNR==1 &amp;&amp; NR!=1{print ""}1'</font> core/core<font color="#990000">.</font>mk index<font color="#990000">/*.</font>mk core/index<font color="#990000">.</font>mk core/deps<font color="#990000">.</font>mk plugins/protobuffs<font color="#990000">.</font>mk core/erlc<font color="#990000">.</font>mk core/docs<font color="#990000">.</font>mk core/test<font color="#990000">.</font>mk plugins/asciidoc<font color="#990000">.</font>mk plugins/bootstrap<font color="#990000">.</font>mk plugins/c_src<font color="#990000">.</font>mk plugins/ci<font color="#990000">.</font>mk plugins/ct<font color="#990000">.</font>mk plugins/dialyzer<font color="#990000">.</font>mk plugins/edoc<font color="#990000">.</font>mk plugins/elvis<font color="#990000">.</font>mk plugins/erlydtl<font color="#990000">.</font>mk plugins/escript<font color="#990000">.</font>mk plugins/eunit<font color="#990000">.</font>mk plugins/relx<font color="#990000">.</font>mk plugins/shell<font color="#990000">.</font>mk plugins/triq<font color="#990000">.</font>mk plugins/xref<font color="#990000">.</font>mk plugins/cover<font color="#990000">.</font>mk <font color="#990000">\</font>
+ <font color="#990000">|</font> sed <font color="#FF0000">'s/^ERLANG_MK_VERSION = .*/ERLANG_MK_VERSION = 1.2.0-642-gccd2b9f/'</font> <font color="#990000">&gt;</font> erlang<font color="#990000">.</font>mk
+make<font color="#990000">[</font><font color="#993399">1</font><font color="#990000">]:</font> Leaving directory <font color="#FF0000">'/home/essen/tmp/emkg/hello_joe/.erlang.mk.build'</font>
+cp <font color="#990000">.</font>erlang<font color="#990000">.</font>mk<font color="#990000">.</font>build/erlang<font color="#990000">.</font>mk <font color="#990000">.</font>/erlang<font color="#990000">.</font>mk
+rm -rf <font color="#990000">.</font>erlang<font color="#990000">.</font>mk<font color="#990000">.</font>build</tt></pre>
+</div></div>
+<p>All that&apos;s left to do is to commit the file!</p>
+<p>Yep, it&apos;s that easy.</p>
<h2 id="_customizing_the_build">Customizing the build</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Erlang.mk allows you to customize which components are to be included
-in the <em>erlang.mk</em> file. The <code>WITHOUT</code> variable allows you to
-remove components from the default Erlang.mk build. The <em>build.config</em>
-file lets you define exactly what goes in (including your own code!),
-and in what order.</p></div>
-<div class="paragraph"><p>The <code>WITHOUT</code> file contains the list of components to exclude from
-the build. For example, to exclude the package index and the EDoc
-plugin when bootstrapping your application:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Erlang.mk allows you to customize which components are to be included in the <em>erlang.mk</em> file. The <code>WITHOUT</code> variable allows you to remove components from the default Erlang.mk build. The <em>build.config</em> file lets you define exactly what goes in (including your own code!), and in what order.</p>
+<p>The <code>WITHOUT</code> file contains the list of components to exclude from the build. For example, to exclude the package index and the EDoc plugin when bootstrapping your application:</p>
+<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 -f erlang<span style="color: #990000">.</span>mk bootstrap <span style="color: #009900">WITHOUT</span><span style="color: #990000">=</span><span style="color: #FF0000">"index plugins/edoc"</span></tt></pre></div></div>
-<div class="paragraph"><p>The generated Erlang.mk will never include those components when
-you update it, until you change your mind and use the <code>WITHOUT</code>
-variable again when you upgrade:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>$ make -f erlang<font color="#990000">.</font>mk bootstrap <font color="#009900">WITHOUT</font><font color="#990000">=</font><font color="#FF0000">"index plugins/edoc"</font></tt></pre>
+</div></div>
+<p>The generated Erlang.mk will never include those components when you update it, until you change your mind and use the <code>WITHOUT</code> variable again when you upgrade:</p>
+<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 erlang-mk <span style="color: #009900">WITHOUT</span><span style="color: #990000">=</span>index</tt></pre></div></div>
-<div class="paragraph"><p>The <em>build.config</em> file is automatically used when you bootstrap
-Erlang.mk or when you update it with <code>make erlang-mk</code>.</p></div>
-<div class="paragraph"><p>The <em>build.config</em> file contains the list of all files that will
-be built into the resulting <em>erlang.mk</em> file. You can start from
-the <a href="https://github.com/ninenines/erlang.mk/blob/master/build.config">most recent version</a>
-and customize to your needs.</p></div>
-<div class="paragraph"><p>You can also name the file differently or put it in a separate folder
-by modifying the value for <code>ERLANG_MK_BUILD_CONFIG</code>. You can also
-tell Erlang.mk to use a different temporary directory by changing
-the <code>ERLANG_MK_BUILD_DIR</code> variable.</p></div>
-</div>
-</div>
+<pre><tt>$ make erlang-mk <font color="#009900">WITHOUT</font><font color="#990000">=</font>index</tt></pre>
+</div></div>
+<p>The <em>build.config</em> file is automatically used when you bootstrap Erlang.mk or when you update it with <code>make erlang-mk</code>.</p>
+<p>The <em>build.config</em> file contains the list of all files that will be built into the resulting <em>erlang.mk</em> file. You can start from the <a href="https://github.com/ninenines/erlang.mk/blob/master/build.config">most recent version</a> and customize to your needs.</p>
+<p>You can also name the file differently or put it in a separate folder by modifying the value for <code>ERLANG_MK_BUILD_CONFIG</code>. You can also tell Erlang.mk to use a different temporary directory by changing the <code>ERLANG_MK_BUILD_DIR</code> variable.</p>
+
diff --git a/docs/en/erlang.mk/1/guide/why/index.html b/docs/en/erlang.mk/1/guide/why/index.html
index a18ba0d2..659a4a99 100644
--- a/docs/en/erlang.mk/1/guide/why/index.html
+++ b/docs/en/erlang.mk/1/guide/why/index.html
@@ -62,86 +62,30 @@
<h1 class="lined-header"><span>Why Erlang.mk</span></h1>
-<div class="paragraph"><p>Why would you choose Erlang.mk, if not for its
-<a href="../overview">many features</a>? This chapter will
-attempt to answer that.</p></div>
-<div class="sect1">
+<p>Why would you choose Erlang.mk, if not for its <a href="../overview">many features</a>? This chapter will attempt to answer that.</p>
<h2 id="_erlang_mk_is_fast">Erlang.mk is fast</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Erlang.mk is as fast as it gets.</p></div>
-<div class="paragraph"><p>Erlang.mk will group the compilation of files so as to avoid
-running the BEAM more than necessary. This saves many seconds
-compared to traditional Makefiles, even on small projects.</p></div>
-<div class="paragraph"><p>Erlang.mk will not try to be too smart. It provides a simple
-solution that works for most people, and gives additional
-options for projects that run into edge cases, often in the
-form of extra variables or rules to be defined.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Erlang.mk is as fast as it gets.</p>
+<p>Erlang.mk will group the compilation of files so as to avoid running the BEAM more than necessary. This saves many seconds compared to traditional Makefiles, even on small projects.</p>
+<p>Erlang.mk will not try to be too smart. It provides a simple solution that works for most people, and gives additional options for projects that run into edge cases, often in the form of extra variables or rules to be defined.</p>
<h2 id="_erlang_mk_gives_you_the_full_power_of_unix">Erlang.mk gives you the full power of Unix</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Erlang.mk is a Makefile.</p></div>
-<div class="paragraph"><p>You could use Erlang.mk directly without configuring anything
-and it would just work. But you can also extend it greatly
-either through configuration or hooks, and you can of course
-add your own rules to the Makefile.</p></div>
-<div class="paragraph"><p>In all cases: for configuration, hooks or custom rules, you
-have all the power of Unix at your disposal, and can call
-any utility <em>or even any language interpreter</em> you want,
-every time you need to. Erlang.mk also allows you to write
-scripts in this small language called Erlang directly inside
-your Makefile if you ever need to&#8230;</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Erlang.mk is a Makefile.</p>
+<p>You could use Erlang.mk directly without configuring anything and it would just work. But you can also extend it greatly either through configuration or hooks, and you can of course add your own rules to the Makefile.</p>
+<p>In all cases: for configuration, hooks or custom rules, you have all the power of Unix at your disposal, and can call any utility <em>or even any language interpreter</em> you want, every time you need to. Erlang.mk also allows you to write scripts in this small language called Erlang directly inside your Makefile if you ever need to...</p>
<h2 id="_erlang_mk_is_a_text_file">Erlang.mk is a text file</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Erlang.mk is a Makefile.</p></div>
-<div class="paragraph"><p>Which means Erlang.mk is a simple text file. You can edit a
-text file. Nothing stops you. If you run into any bug, or
-behavior that does not suit you, you can just open the
-<em>erlang.mk</em> file in your favorite editor, fix and/or comment
-a few lines, save, and try again. It&#8217;s as simple as it gets.</p></div>
-<div class="paragraph"><p>Currently using a binary build tool? Good luck with that.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Erlang.mk is a Makefile.</p>
+<p>Which means Erlang.mk is a simple text file. You can edit a text file. Nothing stops you. If you run into any bug, or behavior that does not suit you, you can just open the <em>erlang.mk</em> file in your favorite editor, fix and/or comment a few lines, save, and try again. It&apos;s as simple as it gets.</p>
+<p>Currently using a binary build tool? Good luck with that.</p>
<h2 id="_erlang_mk_can_manage_erlang_itself">Erlang.mk can manage Erlang itself</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Erlang.mk isn&#8217;t written in Erlang.</p></div>
-<div class="paragraph"><p>That&#8217;s not a good thing, you say? Well, here&#8217;s one thing
-that Erlang.mk and Makefiles can do for you that Erlang
-build tool can&#8217;t easily: choose what version of Erlang is
-to be used for compiling the project.</p></div>
-<div class="paragraph"><p>This really is a one-liner in Erlang.mk (a few more lines
-if you also let it download and build Erlang directly)
-and allows for even greater things, like testing your
-project across all supported Erlang versions in one small
-command: <code>make -k ci</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Erlang.mk isn&apos;t written in Erlang.</p>
+<p>That&apos;s not a good thing, you say? Well, here&apos;s one thing that Erlang.mk and Makefiles can do for you that Erlang build tool can&apos;t easily: choose what version of Erlang is to be used for compiling the project.</p>
+<p>This really is a one-liner in Erlang.mk (a few more lines if you also let it download and build Erlang directly) and allows for even greater things, like testing your project across all supported Erlang versions in one small command: <code>make -k ci</code>.</p>
<h2 id="_erlang_mk_can_do_more_than_erlang">Erlang.mk can do more than Erlang</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Erlang.mk doesn&#8217;t care what your dependencies are written in.</p></div>
-<div class="paragraph"><p>Erlang.mk will happily compile any dependency, as long as
-they come with a Makefile. The dependency can be written
-in C, C++ or even Javascript&#8230; Who cares, really? If you
-need Erlang.mk to fetch it, then Erlang.mk will fetch it
-and compile it as needed.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Erlang.mk doesn&apos;t care what your dependencies are written in.</p>
+<p>Erlang.mk will happily compile any dependency, as long as they come with a Makefile. The dependency can be written in C, C++ or even Javascript... Who cares, really? If you need Erlang.mk to fetch it, then Erlang.mk will fetch it and compile it as needed.</p>
<h2 id="_erlang_mk_integrates_nicely_in_make_and_automake_projects">Erlang.mk integrates nicely in Make and Automake projects</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>If you are planning to put your project in the middle of
-a Make or Automake-based build environment, then the most
-logical thing to do is to use a Makefile.</p></div>
-<div class="paragraph"><p>Erlang.mk will happily sit in such an environment and behave
-as you expect it to.</p></div>
-</div>
-</div>
+<p>If you are planning to put your project in the middle of a Make or Automake-based build environment, then the most logical thing to do is to use a Makefile.</p>
+<p>Erlang.mk will happily sit in such an environment and behave as you expect it to.</p>
+
diff --git a/docs/en/erlang.mk/1/guide/xref/index.html b/docs/en/erlang.mk/1/guide/xref/index.html
index 6de10fea..8459f374 100644
--- a/docs/en/erlang.mk/1/guide/xref/index.html
+++ b/docs/en/erlang.mk/1/guide/xref/index.html
@@ -62,7 +62,9 @@
<h1 class="lined-header"><span>Xref</span></h1>
-<div class="paragraph"><p>Placeholder chapter.</p></div>
+<!-- @todo Write it.-->
+<p>Placeholder chapter.</p>
+
diff --git a/docs/en/gun/1.0/guide/connect/index.html b/docs/en/gun/1.0/guide/connect/index.html
index ac1e6eb3..427b7450 100644
--- a/docs/en/gun/1.0/guide/connect/index.html
+++ b/docs/en/gun/1.0/guide/connect/index.html
@@ -62,145 +62,104 @@
<h1 class="lined-header"><span>Connection</span></h1>
-<div class="paragraph"><p>This chapter describes how to open, monitor and close
-a connection using the Gun client.</p></div>
-<div class="sect1">
+<p>This chapter describes how to open, monitor and close a connection using the Gun client.</p>
<h2 id="_gun_connections">Gun connections</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Gun is designed with the HTTP/2 and Websocket protocols in mind.
-They are built for long-running connections that allow concurrent
-exchange of data, either in the form of request/responses for
-HTTP/2 or in the form of messages for Websocket.</p></div>
-<div class="paragraph"><p>A Gun connection is an Erlang process that manages a socket to
-a remote endpoint. This Gun connection is owned by a user
-process that is called the <em>owner</em> of the connection, and is
-managed by the supervision tree of the <code>gun</code> application.</p></div>
-<div class="paragraph"><p>The owner process communicates with the Gun connection
-by calling functions from the module <code>gun</code>. All functions
-perform their respective operations asynchronously. The Gun
-connection will send Erlang messages to the owner process
-whenever needed.</p></div>
-<div class="paragraph"><p>When the remote endpoint closes the connection, Gun attempts
-to reconnect automatically.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Gun is designed with the HTTP/2 and Websocket protocols in mind. They are built for long-running connections that allow concurrent exchange of data, either in the form of request/responses for HTTP/2 or in the form of messages for Websocket.</p>
+<p>A Gun connection is an Erlang process that manages a socket to a remote endpoint. This Gun connection is owned by a user process that is called the <em>owner</em> of the connection, and is managed by the supervision tree of the <code>gun</code> application.</p>
+<p>The owner process communicates with the Gun connection by calling functions from the module <code>gun</code>. All functions perform their respective operations asynchronously. The Gun connection will send Erlang messages to the owner process whenever needed.</p>
+<p>When the remote endpoint closes the connection, Gun attempts to reconnect automatically.</p>
<h2 id="_opening_a_new_connection">Opening a new connection</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <code>gun:open/2,3</code> function must be used to open a connection.</p></div>
-<div class="listingblock">
-<div class="title">Opening a connection to example.org on port 443</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The <code>gun:open/2,3</code> function must be used to open a connection.</p>
+<div class="listingblock"><div class="title">Opening a connection to example.org on port 443</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: #FF6600">ok</span>, <span style="color: #009900">ConnPid</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">gun:open</span></span>(<span style="color: #FF0000">"example.org"</span>, <span style="color: #993399">443</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>If the port given is 443, Gun will attempt to connect using
-TLS. The protocol will be selected automatically using the
-ALPN extension for TLS. By default Gun supports HTTP/2
-and HTTP/1.1 when connecting using TLS.</p></div>
-<div class="paragraph"><p>For any other port, Gun will attempt to connect using
-plain TCP and will use the HTTP/1.1 protocol.</p></div>
-<div class="paragraph"><p>The transport and protocol used can be overriden via
-options. The manual documents all available options.</p></div>
-<div class="paragraph"><p>Options can be provided as a third argument, and take the
-form of a map.</p></div>
-<div class="listingblock">
-<div class="title">Opening a TLS connection to example.org on port 8443</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#009900">ConnPid</font>} <font color="#990000">=</font> <b><font color="#000000">gun:open</font></b>(<font color="#FF0000">"example.org"</font>, <font color="#993399">443</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>If the port given is 443, Gun will attempt to connect using TLS. The protocol will be selected automatically using the ALPN extension for TLS. By default Gun supports HTTP/2 and HTTP/1.1 when connecting using TLS.</p>
+<p>For any other port, Gun will attempt to connect using plain TCP and will use the HTTP/1.1 protocol.</p>
+<p>The transport and protocol used can be overriden via options. The manual documents all available options.</p>
+<p>Options can be provided as a third argument, and take the form of a map.</p>
+<div class="listingblock"><div class="title">Opening a TLS connection to example.org on port 8443</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: #FF6600">ok</span>, <span style="color: #009900">ConnPid</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">gun:open</span></span>(<span style="color: #FF0000">"example.org"</span>, <span style="color: #993399">8443</span>, #{<span style="color: #0000FF">transport</span> <span style="color: #990000">=&gt;</span> <span style="color: #FF6600">tls</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#009900">ConnPid</font>} <font color="#990000">=</font> <b><font color="#000000">gun:open</font></b>(<font color="#FF0000">"example.org"</font>, <font color="#993399">8443</font>, #{<font color="#0000FF">transport</font> <font color="#990000">=&gt;</font> <font color="#FF6600">tls</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_waiting_for_the_connection_to_be_established">Waiting for the connection to be established</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>When Gun successfully connects to the server, it sends a
-<code>gun_up</code> message with the protocol that has been selected
-for the connection.</p></div>
-<div class="paragraph"><p>Gun provides the functions <code>gun:await_up/1,2,3</code> that wait
-for the <code>gun_up</code> message. They can optionally take a monitor
-reference and/or timeout value. If no monitor is provided,
-one will be created for the duration of the function call.</p></div>
-<div class="listingblock">
-<div class="title">Synchronous opening of a connection</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<p>When Gun successfully connects to the server, it sends a <code>gun_up</code> message with the protocol that has been selected for the connection.</p>
+<p>Gun provides the functions <code>gun:await_up/1,2,3</code> that wait for the <code>gun_up</code> message. They can optionally take a monitor reference and/or timeout value. If no monitor is provided, one will be created for the duration of the function call.</p>
+<div class="listingblock"><div class="title">Synchronous opening of a connection</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: #FF6600">ok</span>, <span style="color: #009900">ConnPid</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">gun:open</span></span>(<span style="color: #FF0000">"example.org"</span>, <span style="color: #993399">443</span>),
-{<span style="color: #FF6600">ok</span>, <span style="color: #009900">Protocol</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">gun:await_up</span></span>(<span style="color: #009900">ConnPid</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#009900">ConnPid</font>} <font color="#990000">=</font> <b><font color="#000000">gun:open</font></b>(<font color="#FF0000">"example.org"</font>, <font color="#993399">443</font>),
+{<font color="#FF6600">ok</font>, <font color="#009900">Protocol</font>} <font color="#990000">=</font> <b><font color="#000000">gun:await_up</font></b>(<font color="#009900">ConnPid</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_handling_connection_loss">Handling connection loss</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>When the connection is lost, Gun will send a <code>gun_down</code>
-message indicating the current protocol, the reason the
-connection was lost and two lists of stream references.</p></div>
-<div class="paragraph"><p>The first list indicates open streams that <em>may</em> have been
-processed by the server. The second list indicates open
-streams that the server did not process.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>When the connection is lost, Gun will send a <code>gun_down</code> message indicating the current protocol, the reason the connection was lost and two lists of stream references.</p>
+<p>The first list indicates open streams that <em>may</em> have been processed by the server. The second list indicates open streams that the server did not process.</p>
<h2 id="_monitoring_the_connection_process">Monitoring the connection process</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Because software errors are unavoidable, it is important to
-detect when the Gun process crashes. It is also important
-to detect when it exits normally. Erlang provides two ways
-to do that: links and monitors.</p></div>
-<div class="paragraph"><p>Gun leaves you the choice as to which one will be used.
-However, if you use the <code>gun:await/2,3</code> or <code>gun:await_body/2,3</code>
-functions, a monitor may be used for you to avoid getting
-stuck waiting for a message that will never come.</p></div>
-<div class="paragraph"><p>If you choose to monitor yourself you can do it on a permanent
-basis rather than on every message you will receive, saving
-resources. Indeed, the <code>gun:await/3,4</code> and <code>gun:await_body/3,4</code>
-functions both accept a monitor argument if you have one already.</p></div>
-<div class="listingblock">
-<div class="title">Monitoring the connection process</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Because software errors are unavoidable, it is important to detect when the Gun process crashes. It is also important to detect when it exits normally. Erlang provides two ways to do that: links and monitors.</p>
+<p>Gun leaves you the choice as to which one will be used. However, if you use the <code>gun:await/2,3</code> or <code>gun:await_body/2,3</code> functions, a monitor may be used for you to avoid getting stuck waiting for a message that will never come.</p>
+<p>If you choose to monitor yourself you can do it on a permanent basis rather than on every message you will receive, saving resources. Indeed, the <code>gun:await/3,4</code> and <code>gun:await_body/3,4</code> functions both accept a monitor argument if you have one already.</p>
+<div class="listingblock"><div class="title">Monitoring the connection process</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: #FF6600">ok</span>, <span style="color: #009900">ConnPid</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">gun:open</span></span>(<span style="color: #FF0000">"example.org"</span>, <span style="color: #993399">443</span>)<span style="color: #990000">.</span>
-<span style="color: #009900">MRef</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">monitor</span></span>(<span style="font-weight: bold"><span style="color: #000080">process</span></span>, <span style="color: #009900">ConnPid</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>This monitor reference can be kept and used until the connection
-process exits.</p></div>
-<div class="listingblock">
-<div class="title">Handling <code>DOWN</code> messages</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#009900">ConnPid</font>} <font color="#990000">=</font> <b><font color="#000000">gun:open</font></b>(<font color="#FF0000">"example.org"</font>, <font color="#993399">443</font>)<font color="#990000">.</font>
+<font color="#009900">MRef</font> <font color="#990000">=</font> <b><font color="#000000">monitor</font></b>(<b><font color="#000080">process</font></b>, <font color="#009900">ConnPid</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>This monitor reference can be kept and used until the connection process exits.</p>
+<div class="listingblock"><div class="title">Handling `DOWN` messages</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: #0000FF">receive</span></span>
- <span style="font-style: italic"><span style="color: #9A1900">%% Receive Gun messages here...</span></span>
- {<span style="color: #FF6600">'DOWN'</span>, <span style="color: #009900">Mref</span>, <span style="font-weight: bold"><span style="color: #000080">process</span></span>, <span style="color: #009900">ConnPid</span>, <span style="color: #009900">Reason</span>} <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #000000">error_logger:error_msg</span></span>(<span style="color: #FF0000">"Oops!"</span>),
- <span style="font-weight: bold"><span style="color: #000080">exit</span></span>(<span style="color: #009900">Reason</span>)
-<span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>What to do when you receive a <code>DOWN</code> message is entirely up to you.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#0000FF">receive</font></b>
+ <i><font color="#9A1900">%% Receive Gun messages here...</font></i>
+ {<font color="#FF6600">'DOWN'</font>, <font color="#009900">Mref</font>, <b><font color="#000080">process</font></b>, <font color="#009900">ConnPid</font>, <font color="#009900">Reason</font>} <font color="#990000">-&gt;</font>
+ <b><font color="#000000">error_logger:error_msg</font></b>(<font color="#FF0000">"Oops!"</font>),
+ <b><font color="#000080">exit</font></b>(<font color="#009900">Reason</font>)
+<b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>What to do when you receive a <code>DOWN</code> message is entirely up to you.</p>
<h2 id="_closing_the_connection_abruptly">Closing the connection abruptly</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The connection can be stopped abruptly at any time by calling
-the <code>gun:close/1</code> function.</p></div>
-<div class="listingblock">
-<div class="title">Immediate closing of the connection</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The connection can be stopped abruptly at any time by calling the <code>gun:close/1</code> function.</p>
+<div class="listingblock"><div class="title">Immediate closing of the connection</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">gun:close</span></span>(<span style="color: #009900">ConnPid</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>The process is stopped immediately without having a chance to
-perform the protocol&#8217;s closing handshake, if any.</p></div>
-</div>
-</div>
+<pre><tt><b><font color="#000000">gun:close</font></b>(<font color="#009900">ConnPid</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>The process is stopped immediately without having a chance to perform the protocol&apos;s closing handshake, if any.</p>
+<!-- === Closing the connection gracefully-->
+<!-- -->
+<!-- The connection can also be stopped gracefully by calling the-->
+<!-- `gun:shutdown/1` function.-->
+<!-- -->
+<!-- .Graceful shutdown of the connection-->
+<!-- [source,erlang]-->
+<!-- ------>
+<!-- gun:shutdown(ConnPid).-->
+<!-- ------>
+<!-- -->
+<!-- Gun will refuse any new requests or messages after you call-->
+<!-- this function. It will however continue to send you messages-->
+<!-- for existing streams until they are all completed.-->
+<!-- -->
+<!-- For example if you performed a GET request just before calling-->
+<!-- `gun:shutdown/1`, you will still receive the response before-->
+<!-- Gun closes the connection.-->
+<!-- -->
+<!-- If you set a monitor beforehand, you will receive a message-->
+<!-- when the connection has been closed.-->
+
diff --git a/docs/en/gun/1.0/guide/http/index.html b/docs/en/gun/1.0/guide/http/index.html
index 6c32ab5d..0d132edc 100644
--- a/docs/en/gun/1.0/guide/http/index.html
+++ b/docs/en/gun/1.0/guide/http/index.html
@@ -62,395 +62,279 @@
<h1 class="lined-header"><span>HTTP</span></h1>
-<div class="paragraph"><p>This chapter describes how to use the Gun client for
-communicating with an HTTP/1.1 or HTTP/2 server.</p></div>
-<div class="sect1">
+<p>This chapter describes how to use the Gun client for communicating with an HTTP/1.1 or HTTP/2 server.</p>
<h2 id="_streams">Streams</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Every time a request is initiated, Gun creates a <em>stream</em>.
-A <em>stream reference</em> uniquely identifies a set of request and
-response and must be used to perform additional operations
-with a stream or to identify its messages.</p></div>
-<div class="paragraph"><p>Stream references use the Erlang <em>reference</em> data type and
-are therefore unique.</p></div>
-<div class="paragraph"><p>Streams can be canceled at any time. This will stop any further
-messages from being sent to the owner process. Depending on
-its capabilities, the server will also be instructed to cancel
-the request.</p></div>
-<div class="paragraph"><p>Canceling a stream may result in Gun dropping the connection
-temporarily, to avoid uploading or downloading data that will
-not be used.</p></div>
-<div class="listingblock">
-<div class="title">Cancelling a stream</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Every time a request is initiated, Gun creates a <em>stream</em>. A <em>stream reference</em> uniquely identifies a set of request and response and must be used to perform additional operations with a stream or to identify its messages.</p>
+<p>Stream references use the Erlang <em>reference</em> data type and are therefore unique.</p>
+<p>Streams can be canceled at any time. This will stop any further messages from being sent to the owner process. Depending on its capabilities, the server will also be instructed to cancel the request.</p>
+<p>Canceling a stream may result in Gun dropping the connection temporarily, to avoid uploading or downloading data that will not be used.</p>
+<div class="listingblock"><div class="title">Cancelling a stream</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">gun:cancel</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">StreamRef</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">gun:cancel</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">StreamRef</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_sending_requests">Sending requests</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Gun provides many convenient functions for performing common
-operations, like GET, POST or DELETE. It also provides a
-general purpose function in case you need other methods.</p></div>
-<div class="paragraph"><p>The availability of these methods on the server can vary
-depending on the software used but also on a per-resource
-basis.</p></div>
-<div class="paragraph"><p>Gun will automatically set a few headers depending on the
-method used. For all methods however it will set the host
-header if it has not been provided in the request arguments.</p></div>
-<div class="paragraph"><p>This section focuses on the act of sending a request. The
-handling of responses will be explained further on.</p></div>
-<div class="sect3">
+<p>Gun provides many convenient functions for performing common operations, like GET, POST or DELETE. It also provides a general purpose function in case you need other methods.</p>
+<p>The availability of these methods on the server can vary depending on the software used but also on a per-resource basis.</p>
+<p>Gun will automatically set a few headers depending on the method used. For all methods however it will set the host header if it has not been provided in the request arguments.</p>
+<p>This section focuses on the act of sending a request. The handling of responses will be explained further on.</p>
<h4 id="_get_and_head">GET and HEAD</h4>
-<div class="paragraph"><p>Use <code>gun:get/2,3,4</code> to request a resource.</p></div>
-<div class="listingblock">
-<div class="title">GET "/organizations/ninenines"</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Use <code>gun:get/2,3,4</code> to request a resource.</p>
+<div class="listingblock"><div class="title">GET &quot;/organizations/ninenines&quot;</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">StreamRef</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">gun:get</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #FF0000">"/organizations/ninenines"</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">GET "/organizations/ninenines" with custom headers</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">StreamRef</font> <font color="#990000">=</font> <b><font color="#000000">gun:get</font></b>(<font color="#009900">ConnPid</font>, <font color="#FF0000">"/organizations/ninenines"</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">GET &quot;/organizations/ninenines&quot; with custom 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">StreamRef</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">gun:get</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #FF0000">"/organizations/ninenines"</span>, [
- {<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"accept"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #FF0000">"application/json"</span>},
- {<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"user-agent"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #FF0000">"revolver/1.0"</span>}
-])<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Note that the list of headers has the field name as a binary.
-The field value is iodata, which is either a binary or an
-iolist.</p></div>
-<div class="paragraph"><p>Use <code>gun:head/2,3,4</code> if you don&#8217;t need the response body.</p></div>
-<div class="listingblock">
-<div class="title">HEAD "/organizations/ninenines"</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">StreamRef</font> <font color="#990000">=</font> <b><font color="#000000">gun:get</font></b>(<font color="#009900">ConnPid</font>, <font color="#FF0000">"/organizations/ninenines"</font>, [
+ {<font color="#990000">&lt;&lt;</font><font color="#FF0000">"accept"</font><font color="#990000">&gt;&gt;</font>, <font color="#FF0000">"application/json"</font>},
+ {<font color="#990000">&lt;&lt;</font><font color="#FF0000">"user-agent"</font><font color="#990000">&gt;&gt;</font>, <font color="#FF0000">"revolver/1.0"</font>}
+])<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Note that the list of headers has the field name as a binary. The field value is iodata, which is either a binary or an iolist.</p>
+<p>Use <code>gun:head/2,3,4</code> if you don&apos;t need the response body.</p>
+<div class="listingblock"><div class="title">HEAD &quot;/organizations/ninenines&quot;</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">StreamRef</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">gun:head</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #FF0000">"/organizations/ninenines"</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">HEAD "/organizations/ninenines" with custom headers</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">StreamRef</font> <font color="#990000">=</font> <b><font color="#000000">gun:head</font></b>(<font color="#009900">ConnPid</font>, <font color="#FF0000">"/organizations/ninenines"</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">HEAD &quot;/organizations/ninenines&quot; with custom 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">StreamRef</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">gun:head</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #FF0000">"/organizations/ninenines"</span>, [
- {<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"accept"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #FF0000">"application/json"</span>},
- {<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"user-agent"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #FF0000">"revolver/1.0"</span>}
-])<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>It is not possible to send a request body with a GET or HEAD
-request.</p></div>
-</div>
-<div class="sect3">
-<h4 id="_post_put_and_patch">POST, PUT and PATCH</h4>
-<div class="paragraph"><p>HTTP defines three methods to create or update a resource.</p></div>
-<div class="paragraph"><p>POST is generally used when the resource identifier (URI) isn&#8217;t known
-in advance when creating a resource. POST can also be used to
-replace an existing resource, although PUT is more appropriate
-in that situation.</p></div>
-<div class="paragraph"><p>PUT creates or replaces a resource identified by the URI.</p></div>
-<div class="paragraph"><p>PATCH provides instructions on how to modify the resource.</p></div>
-<div class="paragraph"><p>Both POST and PUT send the entire resource representation in their
-request body. The PATCH method can be used when this is not
-desirable. The request body of a PATCH method may be a partial
-representation or a list of instructions on how to update the
-resource.</p></div>
-<div class="paragraph"><p>The <code>gun:post/4,5</code>, <code>gun:put/4,5</code> and <code>gun:patch/4,5</code> functions
-take a body as their fourth argument. These functions do
-not require any body-specific header to be set, although
-it is always recommended to set the content-type header.
-Gun will set the other headers automatically.</p></div>
-<div class="paragraph"><p>In this and the following examples in this section, <code>gun:post</code>
-can be replaced by <code>gun:put</code> or <code>gun:patch</code> for performing
-a PUT or PATCH request, respectively.</p></div>
-<div class="listingblock">
-<div class="title">POST "/organizations/ninenines"</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">StreamRef</font> <font color="#990000">=</font> <b><font color="#000000">gun:head</font></b>(<font color="#009900">ConnPid</font>, <font color="#FF0000">"/organizations/ninenines"</font>, [
+ {<font color="#990000">&lt;&lt;</font><font color="#FF0000">"accept"</font><font color="#990000">&gt;&gt;</font>, <font color="#FF0000">"application/json"</font>},
+ {<font color="#990000">&lt;&lt;</font><font color="#FF0000">"user-agent"</font><font color="#990000">&gt;&gt;</font>, <font color="#FF0000">"revolver/1.0"</font>}
+])<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>It is not possible to send a request body with a GET or HEAD request.</p>
+<h4 id="_post__put_and_patch">POST, PUT and PATCH</h4>
+<p>HTTP defines three methods to create or update a resource.</p>
+<p>POST is generally used when the resource identifier (URI) isn&apos;t known in advance when creating a resource. POST can also be used to replace an existing resource, although PUT is more appropriate in that situation.</p>
+<p>PUT creates or replaces a resource identified by the URI.</p>
+<p>PATCH provides instructions on how to modify the resource.</p>
+<p>Both POST and PUT send the entire resource representation in their request body. The PATCH method can be used when this is not desirable. The request body of a PATCH method may be a partial representation or a list of instructions on how to update the resource.</p>
+<p>The <code>gun:post/4,5</code>, <code>gun:put/4,5</code> and <code>gun:patch/4,5</code> functions take a body as their fourth argument. These functions do not require any body-specific header to be set, although it is always recommended to set the content-type header. Gun will set the other headers automatically.</p>
+<p>In this and the following examples in this section, <code>gun:post</code> can be replaced by <code>gun:put</code> or <code>gun:patch</code> for performing a PUT or PATCH request, respectively.</p>
+<div class="listingblock"><div class="title">POST &quot;/organizations/ninenines&quot;</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">Body</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"{\"msg\": \"Hello world!\"}"</span>,
-<span style="color: #009900">StreamRef</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">gun:post</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #FF0000">"/organizations/ninenines"</span>, [
- {<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #FF0000">"application/json"</span>}
-], <span style="color: #009900">Body</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>The <code>gun:post/3</code>, <code>gun:put/3</code> and <code>gun:patch/3</code> functions
-do not take a body in their arguments. If a body is to be
-provided later on, using the <code>gun:data/4</code> function, then
-the request headers must indicate this. This can be done
-by setting the content-length or content-type request
-headers. If these headers are not set then Gun will assume
-the request has no body.</p></div>
-<div class="paragraph"><p>It is recommended to send the content-length header if you
-know it in advance, although this is not required. If it
-is not set, HTTP/1.1 will use the chunked transfer-encoding,
-and HTTP/2 will continue normally as it is chunked by design.</p></div>
-<div class="listingblock">
-<div class="title">POST "/organizations/ninenines" with delayed body</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Body</font> <font color="#990000">=</font> <font color="#FF0000">"{\"msg\": \"Hello world!\"}"</font>,
+<font color="#009900">StreamRef</font> <font color="#990000">=</font> <b><font color="#000000">gun:post</font></b>(<font color="#009900">ConnPid</font>, <font color="#FF0000">"/organizations/ninenines"</font>, [
+ {<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font>, <font color="#FF0000">"application/json"</font>}
+], <font color="#009900">Body</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>The <code>gun:post/3</code>, <code>gun:put/3</code> and <code>gun:patch/3</code> functions do not take a body in their arguments. If a body is to be provided later on, using the <code>gun:data/4</code> function, then the request headers must indicate this. This can be done by setting the content-length or content-type request headers. If these headers are not set then Gun will assume the request has no body.</p>
+<p>It is recommended to send the content-length header if you know it in advance, although this is not required. If it is not set, HTTP/1.1 will use the chunked transfer-encoding, and HTTP/2 will continue normally as it is chunked by design.</p>
+<div class="listingblock"><div class="title">POST &quot;/organizations/ninenines&quot; with delayed body</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">Body</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"{\"msg\": \"Hello world!\"}"</span>,
-<span style="color: #009900">StreamRef</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">gun:post</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #FF0000">"/organizations/ninenines"</span>, [
- {<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-length"</span><span style="color: #990000">&gt;&gt;</span>, <span style="font-weight: bold"><span style="color: #000000">integer_to_binary</span></span>(<span style="font-weight: bold"><span style="color: #000080">length</span></span>(<span style="color: #009900">Body</span>))},
- {<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #FF0000">"application/json"</span>}
+<pre><tt><font color="#009900">Body</font> <font color="#990000">=</font> <font color="#FF0000">"{\"msg\": \"Hello world!\"}"</font>,
+<font color="#009900">StreamRef</font> <font color="#990000">=</font> <b><font color="#000000">gun:post</font></b>(<font color="#009900">ConnPid</font>, <font color="#FF0000">"/organizations/ninenines"</font>, [
+ {<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-length"</font><font color="#990000">&gt;&gt;</font>, <b><font color="#000000">integer_to_binary</font></b>(<b><font color="#000080">length</font></b>(<font color="#009900">Body</font>))},
+ {<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font>, <font color="#FF0000">"application/json"</font>}
]),
-<span style="font-weight: bold"><span style="color: #000000">gun:data</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">StreamRef</span>, <span style="color: #FF6600">fin</span>, <span style="color: #009900">Body</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>The atom <code>fin</code> indicates this is the last chunk of data to
-be sent. You can call the <code>gun:data/4</code> function as many
-times as needed until you have sent the entire body. The
-last call must use <code>fin</code> and all the previous calls must
-use <code>nofin</code>. The last chunk may be empty.</p></div>
-<div class="listingblock">
-<div class="title">Streaming the request body</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<b><font color="#000000">gun:data</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">StreamRef</font>, <font color="#FF6600">fin</font>, <font color="#009900">Body</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>The atom <code>fin</code> indicates this is the last chunk of data to be sent. You can call the <code>gun:data/4</code> function as many times as needed until you have sent the entire body. The last call must use <code>fin</code> and all the previous calls must use <code>nofin</code>. The last chunk may be empty.</p>
+<div class="listingblock"><div class="title">Streaming the request body</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">sendfile</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">StreamRef</span>, <span style="color: #009900">Filepath</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">IoDevice</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">file:open</span></span>(<span style="color: #009900">Filepath</span>, [<span style="color: #FF6600">read</span>, <span style="font-weight: bold"><span style="color: #000080">binary</span></span>, <span style="color: #FF6600">raw</span>]),
- <span style="font-weight: bold"><span style="color: #000000">do_sendfile</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">StreamRef</span>, <span style="color: #009900">IoDevice</span>)<span style="color: #990000">.</span>
-
-<span style="font-weight: bold"><span style="color: #000000">do_sendfile</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">StreamRef</span>, <span style="color: #009900">IoDevice</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">file:read</span></span>(<span style="color: #009900">IoDevice</span>, <span style="color: #993399">8000</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
- <span style="color: #FF6600">eof</span> <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #000000">gun:data</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">StreamRef</span>, <span style="color: #FF6600">fin</span>, <span style="color: #990000">&lt;&lt;&gt;&gt;</span>),
- <span style="font-weight: bold"><span style="color: #000000">file:close</span></span>(<span style="color: #009900">IoDevice</span>);
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Bin</span>} <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #000000">gun:data</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">StreamRef</span>, <span style="color: #FF6600">nofin</span>, <span style="color: #009900">Bin</span>),
- <span style="font-weight: bold"><span style="color: #000000">do_sendfile</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">StreamRef</span>, <span style="color: #009900">IoDevice</span>)
- <span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-<div class="sect3">
+<pre><tt><b><font color="#000000">sendfile</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">StreamRef</font>, <font color="#009900">Filepath</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <font color="#009900">IoDevice</font>} <font color="#990000">=</font> <b><font color="#000000">file:open</font></b>(<font color="#009900">Filepath</font>, [<font color="#FF6600">read</font>, <b><font color="#000080">binary</font></b>, <font color="#FF6600">raw</font>]),
+ <b><font color="#000000">do_sendfile</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">StreamRef</font>, <font color="#009900">IoDevice</font>)<font color="#990000">.</font>
+
+<b><font color="#000000">do_sendfile</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">StreamRef</font>, <font color="#009900">IoDevice</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">case</font></b> <b><font color="#000000">file:read</font></b>(<font color="#009900">IoDevice</font>, <font color="#993399">8000</font>) <b><font color="#0000FF">of</font></b>
+ <font color="#FF6600">eof</font> <font color="#990000">-&gt;</font>
+ <b><font color="#000000">gun:data</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">StreamRef</font>, <font color="#FF6600">fin</font>, <font color="#990000">&lt;&lt;&gt;&gt;</font>),
+ <b><font color="#000000">file:close</font></b>(<font color="#009900">IoDevice</font>);
+ {<font color="#FF6600">ok</font>, <font color="#009900">Bin</font>} <font color="#990000">-&gt;</font>
+ <b><font color="#000000">gun:data</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">StreamRef</font>, <font color="#FF6600">nofin</font>, <font color="#009900">Bin</font>),
+ <b><font color="#000000">do_sendfile</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">StreamRef</font>, <font color="#009900">IoDevice</font>)
+ <b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
<h4 id="_delete">DELETE</h4>
-<div class="paragraph"><p>Use <code>gun:delete/2,3,4</code> to delete a resource.</p></div>
-<div class="listingblock">
-<div class="title">DELETE "/organizations/ninenines"</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Use <code>gun:delete/2,3,4</code> to delete a resource.</p>
+<div class="listingblock"><div class="title">DELETE &quot;/organizations/ninenines&quot;</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">StreamRef</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">gun:delete</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #FF0000">"/organizations/ninenines"</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">DELETE "/organizations/ninenines" with custom headers</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">StreamRef</font> <font color="#990000">=</font> <b><font color="#000000">gun:delete</font></b>(<font color="#009900">ConnPid</font>, <font color="#FF0000">"/organizations/ninenines"</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">DELETE &quot;/organizations/ninenines&quot; with custom 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">StreamRef</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">gun:delete</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #FF0000">"/organizations/ninenines"</span>, [
- {<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"user-agent"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #FF0000">"revolver/1.0"</span>}
-])<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-<div class="sect3">
+<pre><tt><font color="#009900">StreamRef</font> <font color="#990000">=</font> <b><font color="#000000">gun:delete</font></b>(<font color="#009900">ConnPid</font>, <font color="#FF0000">"/organizations/ninenines"</font>, [
+ {<font color="#990000">&lt;&lt;</font><font color="#FF0000">"user-agent"</font><font color="#990000">&gt;&gt;</font>, <font color="#FF0000">"revolver/1.0"</font>}
+])<font color="#990000">.</font></tt></pre>
+</div></div>
<h4 id="_options">OPTIONS</h4>
-<div class="paragraph"><p>Use <code>gun:options/2,3</code> to request information about a resource.</p></div>
-<div class="listingblock">
-<div class="title">OPTIONS "/organizations/ninenines"</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Use <code>gun:options/2,3</code> to request information about a resource.</p>
+<div class="listingblock"><div class="title">OPTIONS &quot;/organizations/ninenines&quot;</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">StreamRef</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">gun:options</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #FF0000">"/organizations/ninenines"</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">OPTIONS "/organizations/ninenines" with custom headers</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">StreamRef</font> <font color="#990000">=</font> <b><font color="#000000">gun:options</font></b>(<font color="#009900">ConnPid</font>, <font color="#FF0000">"/organizations/ninenines"</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">OPTIONS &quot;/organizations/ninenines&quot; with custom 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">StreamRef</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">gun:options</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #FF0000">"/organizations/ninenines"</span>, [
- {<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"user-agent"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #FF0000">"revolver/1.0"</span>}
-])<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>You can also use this function to request information about
-the server itself.</p></div>
-<div class="listingblock">
-<div class="title">OPTIONS "*"</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">StreamRef</font> <font color="#990000">=</font> <b><font color="#000000">gun:options</font></b>(<font color="#009900">ConnPid</font>, <font color="#FF0000">"/organizations/ninenines"</font>, [
+ {<font color="#990000">&lt;&lt;</font><font color="#FF0000">"user-agent"</font><font color="#990000">&gt;&gt;</font>, <font color="#FF0000">"revolver/1.0"</font>}
+])<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>You can also use this function to request information about the server itself.</p>
+<div class="listingblock"><div class="title">OPTIONS &quot;*&quot;</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">StreamRef</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">gun:options</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #FF0000">"*"</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-<div class="sect3">
+<pre><tt><font color="#009900">StreamRef</font> <font color="#990000">=</font> <b><font color="#000000">gun:options</font></b>(<font color="#009900">ConnPid</font>, <font color="#FF0000">"*"</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<h4 id="_requests_with_an_arbitrary_method">Requests with an arbitrary method</h4>
-<div class="paragraph"><p>The <code>gun:request/4,5,6</code> function can be used to send requests
-with a configurable method name. It is mostly useful when you
-need a method that Gun does not understand natively.</p></div>
-<div class="listingblock">
-<div class="title">Example of a TRACE request</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The <code>gun:request/4,5,6</code> function can be used to send requests with a configurable method name. It is mostly useful when you need a method that Gun does not understand natively.</p>
+<div class="listingblock"><div class="title">Example of a TRACE request</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">gun:request</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #FF0000">"TRACE"</span>, <span style="color: #FF0000">"/"</span>, [
- {<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"max-forwards"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #FF0000">"30"</span>}
-])<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">gun:request</font></b>(<font color="#009900">ConnPid</font>, <font color="#FF0000">"TRACE"</font>, <font color="#FF0000">"/"</font>, [
+ {<font color="#990000">&lt;&lt;</font><font color="#FF0000">"max-forwards"</font><font color="#990000">&gt;&gt;</font>, <font color="#FF0000">"30"</font>}
+])<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_processing_responses">Processing responses</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>All data received from the server is sent to the owner
-process as a message. First a <code>gun_response</code> message is sent,
-followed by zero or more <code>gun_data</code> messages. If something goes wrong,
-a <code>gun_error</code> message is sent instead.</p></div>
-<div class="paragraph"><p>The response message will inform you whether there will be
-data messages following. If it contains <code>fin</code> there will be
-no data messages. If it contains <code>nofin</code> then one or more data
-messages will follow.</p></div>
-<div class="paragraph"><p>When using HTTP/2 this value is sent with the frame and simply
-passed on in the message. When using HTTP/1.1 however Gun must
-guess whether data will follow by looking at the response headers.</p></div>
-<div class="paragraph"><p>You can receive messages directly, or you can use the <em>await</em>
-functions to let Gun receive them for you.</p></div>
-<div class="listingblock">
-<div class="title">Receiving a response using receive</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<p>All data received from the server is sent to the owner process as a message. First a <code>gun_response</code> message is sent, followed by zero or more <code>gun_data</code> messages. If something goes wrong, a <code>gun_error</code> message is sent instead.</p>
+<p>The response message will inform you whether there will be data messages following. If it contains <code>fin</code> there will be no data messages. If it contains <code>nofin</code> then one or more data messages will follow.</p>
+<p>When using HTTP/2 this value is sent with the frame and simply passed on in the message. When using HTTP/1.1 however Gun must guess whether data will follow by looking at the response headers.</p>
+<p>You can receive messages directly, or you can use the <em>await</em> functions to let Gun receive them for you.</p>
+<div class="listingblock"><div class="title">Receiving a response using receive</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">print_body</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">MRef</span>) <span style="color: #990000">-&gt;</span>
- <span style="color: #009900">StreamRef</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">gun:get</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #FF0000">"/"</span>),
- <span style="font-weight: bold"><span style="color: #0000FF">receive</span></span>
- {<span style="color: #FF6600">gun_response</span>, <span style="color: #009900">ConnPid</span>, <span style="color: #009900">StreamRef</span>, <span style="color: #FF6600">fin</span>, <span style="color: #009900">Status</span>, <span style="color: #009900">Headers</span>} <span style="color: #990000">-&gt;</span>
- <span style="color: #FF6600">no_data</span>;
- {<span style="color: #FF6600">gun_response</span>, <span style="color: #009900">ConnPid</span>, <span style="color: #009900">StreamRef</span>, <span style="color: #FF6600">nofin</span>, <span style="color: #009900">Status</span>, <span style="color: #009900">Headers</span>} <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #000000">receive_data</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">MRef</span>, <span style="color: #009900">StreamRef</span>);
- {<span style="color: #FF6600">'DOWN'</span>, <span style="color: #009900">MRef</span>, <span style="font-weight: bold"><span style="color: #000080">process</span></span>, <span style="color: #009900">ConnPid</span>, <span style="color: #009900">Reason</span>} <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #000000">error_logger:error_msg</span></span>(<span style="color: #FF0000">"Oops!"</span>),
- <span style="font-weight: bold"><span style="color: #000080">exit</span></span>(<span style="color: #009900">Reason</span>)
- <span style="font-weight: bold"><span style="color: #0000FF">after</span></span> <span style="color: #993399">1000</span> <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #000080">exit</span></span>(<span style="color: #FF6600">timeout</span>)
- <span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span>
-
-<span style="font-weight: bold"><span style="color: #000000">receive_data</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">MRef</span>, <span style="color: #009900">StreamRef</span>) <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #0000FF">receive</span></span>
- {<span style="color: #FF6600">gun_data</span>, <span style="color: #009900">ConnPid</span>, <span style="color: #009900">StreamRef</span>, <span style="color: #FF6600">nofin</span>, <span style="color: #009900">Data</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">Data</span>]),
- <span style="font-weight: bold"><span style="color: #000000">receive_data</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">MRef</span>, <span style="color: #009900">StreamRef</span>);
- {<span style="color: #FF6600">gun_data</span>, <span style="color: #009900">ConnPid</span>, <span style="color: #009900">StreamRef</span>, <span style="color: #FF6600">fin</span>, <span style="color: #009900">Data</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">Data</span>]);
- {<span style="color: #FF6600">'DOWN'</span>, <span style="color: #009900">MRef</span>, <span style="font-weight: bold"><span style="color: #000080">process</span></span>, <span style="color: #009900">ConnPid</span>, <span style="color: #009900">Reason</span>} <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #000000">error_logger:error_msg</span></span>(<span style="color: #FF0000">"Oops!"</span>),
- <span style="font-weight: bold"><span style="color: #000080">exit</span></span>(<span style="color: #009900">Reason</span>)
- <span style="font-weight: bold"><span style="color: #0000FF">after</span></span> <span style="color: #993399">1000</span> <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #000080">exit</span></span>(<span style="color: #FF6600">timeout</span>)
- <span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>While it may seem verbose, using messages like this has the
-advantage of never locking your process, allowing you to
-easily debug your code. It also allows you to start more than
-one connection and concurrently perform queries on all of them
-at the same time.</p></div>
-<div class="paragraph"><p>You can also use Gun in a synchronous manner by using the <em>await</em>
-functions.</p></div>
-<div class="paragraph"><p>The <code>gun:await/2,3,4</code> function will wait until it receives
-a response to, a pushed resource related to, or data from
-the given stream.</p></div>
-<div class="paragraph"><p>When calling <code>gun:await/2,3</code> and not passing a monitor
-reference, one is automatically created for you for the
-duration of the call.</p></div>
-<div class="paragraph"><p>The <code>gun:await_body/2,3,4</code> works similarly, but returns the
-body received. Both functions can be combined to receive the
-response and its body sequentially.</p></div>
-<div class="listingblock">
-<div class="title">Receiving a response using await</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">print_body</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">MRef</font>) <font color="#990000">-&gt;</font>
+ <font color="#009900">StreamRef</font> <font color="#990000">=</font> <b><font color="#000000">gun:get</font></b>(<font color="#009900">ConnPid</font>, <font color="#FF0000">"/"</font>),
+ <b><font color="#0000FF">receive</font></b>
+ {<font color="#FF6600">gun_response</font>, <font color="#009900">ConnPid</font>, <font color="#009900">StreamRef</font>, <font color="#FF6600">fin</font>, <font color="#009900">Status</font>, <font color="#009900">Headers</font>} <font color="#990000">-&gt;</font>
+ <font color="#FF6600">no_data</font>;
+ {<font color="#FF6600">gun_response</font>, <font color="#009900">ConnPid</font>, <font color="#009900">StreamRef</font>, <font color="#FF6600">nofin</font>, <font color="#009900">Status</font>, <font color="#009900">Headers</font>} <font color="#990000">-&gt;</font>
+ <b><font color="#000000">receive_data</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">MRef</font>, <font color="#009900">StreamRef</font>);
+ {<font color="#FF6600">'DOWN'</font>, <font color="#009900">MRef</font>, <b><font color="#000080">process</font></b>, <font color="#009900">ConnPid</font>, <font color="#009900">Reason</font>} <font color="#990000">-&gt;</font>
+ <b><font color="#000000">error_logger:error_msg</font></b>(<font color="#FF0000">"Oops!"</font>),
+ <b><font color="#000080">exit</font></b>(<font color="#009900">Reason</font>)
+ <b><font color="#0000FF">after</font></b> <font color="#993399">1000</font> <font color="#990000">-&gt;</font>
+ <b><font color="#000080">exit</font></b>(<font color="#FF6600">timeout</font>)
+ <b><font color="#0000FF">end</font></b><font color="#990000">.</font>
+
+<b><font color="#000000">receive_data</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">MRef</font>, <font color="#009900">StreamRef</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">receive</font></b>
+ {<font color="#FF6600">gun_data</font>, <font color="#009900">ConnPid</font>, <font color="#009900">StreamRef</font>, <font color="#FF6600">nofin</font>, <font color="#009900">Data</font>} <font color="#990000">-&gt;</font>
+ <b><font color="#000000">io:format</font></b>(<font color="#FF0000">"~s~n"</font>, [<font color="#009900">Data</font>]),
+ <b><font color="#000000">receive_data</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">MRef</font>, <font color="#009900">StreamRef</font>);
+ {<font color="#FF6600">gun_data</font>, <font color="#009900">ConnPid</font>, <font color="#009900">StreamRef</font>, <font color="#FF6600">fin</font>, <font color="#009900">Data</font>} <font color="#990000">-&gt;</font>
+ <b><font color="#000000">io:format</font></b>(<font color="#FF0000">"~s~n"</font>, [<font color="#009900">Data</font>]);
+ {<font color="#FF6600">'DOWN'</font>, <font color="#009900">MRef</font>, <b><font color="#000080">process</font></b>, <font color="#009900">ConnPid</font>, <font color="#009900">Reason</font>} <font color="#990000">-&gt;</font>
+ <b><font color="#000000">error_logger:error_msg</font></b>(<font color="#FF0000">"Oops!"</font>),
+ <b><font color="#000080">exit</font></b>(<font color="#009900">Reason</font>)
+ <b><font color="#0000FF">after</font></b> <font color="#993399">1000</font> <font color="#990000">-&gt;</font>
+ <b><font color="#000080">exit</font></b>(<font color="#FF6600">timeout</font>)
+ <b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>While it may seem verbose, using messages like this has the advantage of never locking your process, allowing you to easily debug your code. It also allows you to start more than one connection and concurrently perform queries on all of them at the same time.</p>
+<p>You can also use Gun in a synchronous manner by using the <em>await</em> functions.</p>
+<p>The <code>gun:await/2,3,4</code> function will wait until it receives a response to, a pushed resource related to, or data from the given stream.</p>
+<p>When calling <code>gun:await/2,3</code> and not passing a monitor reference, one is automatically created for you for the duration of the call.</p>
+<p>The <code>gun:await_body/2,3,4</code> works similarly, but returns the body received. Both functions can be combined to receive the response and its body sequentially.</p>
+<div class="listingblock"><div class="title">Receiving a response using await</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">StreamRef</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">gun:get</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #FF0000">"/"</span>),
-<span style="font-weight: bold"><span style="color: #0000FF">case</span></span> <span style="font-weight: bold"><span style="color: #000000">gun:await</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">StreamRef</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
- {<span style="color: #FF6600">response</span>, <span style="color: #FF6600">fin</span>, <span style="color: #009900">Status</span>, <span style="color: #009900">Headers</span>} <span style="color: #990000">-&gt;</span>
- <span style="color: #FF6600">no_data</span>;
- {<span style="color: #FF6600">response</span>, <span style="color: #FF6600">nofin</span>, <span style="color: #009900">Status</span>, <span style="color: #009900">Headers</span>} <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Body</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">gun:await_body</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">StreamRef</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">Body</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">
+<pre><tt><font color="#009900">StreamRef</font> <font color="#990000">=</font> <b><font color="#000000">gun:get</font></b>(<font color="#009900">ConnPid</font>, <font color="#FF0000">"/"</font>),
+<b><font color="#0000FF">case</font></b> <b><font color="#000000">gun:await</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">StreamRef</font>) <b><font color="#0000FF">of</font></b>
+ {<font color="#FF6600">response</font>, <font color="#FF6600">fin</font>, <font color="#009900">Status</font>, <font color="#009900">Headers</font>} <font color="#990000">-&gt;</font>
+ <font color="#FF6600">no_data</font>;
+ {<font color="#FF6600">response</font>, <font color="#FF6600">nofin</font>, <font color="#009900">Status</font>, <font color="#009900">Headers</font>} <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <font color="#009900">Body</font>} <font color="#990000">=</font> <b><font color="#000000">gun:await_body</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">StreamRef</font>),
+ <b><font color="#000000">io:format</font></b>(<font color="#FF0000">"~s~n"</font>, [<font color="#009900">Body</font>])
+<b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_handling_streams_pushed_by_the_server">Handling streams pushed by the server</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The HTTP/2 protocol allows the server to push more than one
-resource for every request. It will start sending those
-extra resources before it starts sending the response itself,
-so Gun will send you <code>gun_push</code> messages before <code>gun_response</code>
-when that happens.</p></div>
-<div class="paragraph"><p>You can safely choose to ignore <code>gun_push</code> messages, or
-you can handle them. If you do, you can either receive the
-messages directly or use <em>await</em> functions.</p></div>
-<div class="paragraph"><p>The <code>gun_push</code> message contains both the new stream reference
-and the stream reference of the original request.</p></div>
-<div class="listingblock">
-<div class="title">Receiving a pushed response using receive</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The HTTP/2 protocol allows the server to push more than one resource for every request. It will start sending those extra resources before it starts sending the response itself, so Gun will send you <code>gun_push</code> messages before <code>gun_response</code> when that happens.</p>
+<p>You can safely choose to ignore <code>gun_push</code> messages, or you can handle them. If you do, you can either receive the messages directly or use <em>await</em> functions.</p>
+<p>The <code>gun_push</code> message contains both the new stream reference and the stream reference of the original request.</p>
+<div class="listingblock"><div class="title">Receiving a pushed response using receive</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: #0000FF">receive</span></span>
- {<span style="color: #FF6600">gun_push</span>, <span style="color: #009900">ConnPid</span>, <span style="color: #009900">OriginalStreamRef</span>, <span style="color: #009900">PushedStreamRef</span>,
- <span style="color: #009900">Method</span>, <span style="color: #009900">Host</span>, <span style="color: #009900">Path</span>, <span style="color: #009900">Headers</span>} <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #000000">enjoy</span></span>()
-<span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>If you use the <code>gun:await/2,3,4</code> function, however, Gun
-will use the original reference to identify the message but
-will return a tuple that doesn&#8217;t contain it.</p></div>
-<div class="listingblock">
-<div class="title">Receiving a pushed response using await</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#0000FF">receive</font></b>
+ {<font color="#FF6600">gun_push</font>, <font color="#009900">ConnPid</font>, <font color="#009900">OriginalStreamRef</font>, <font color="#009900">PushedStreamRef</font>,
+ <font color="#009900">Method</font>, <font color="#009900">Host</font>, <font color="#009900">Path</font>, <font color="#009900">Headers</font>} <font color="#990000">-&gt;</font>
+ <b><font color="#000000">enjoy</font></b>()
+<b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>If you use the <code>gun:await/2,3,4</code> function, however, Gun will use the original reference to identify the message but will return a tuple that doesn&apos;t contain it.</p>
+<div class="listingblock"><div class="title">Receiving a pushed response using await</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: #FF6600">push</span>, <span style="color: #009900">PushedStreamRef</span>, <span style="color: #009900">Method</span>, <span style="color: #009900">URI</span>, <span style="color: #009900">Headers</span>}
- <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">gun:await</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">OriginalStreamRef</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>The <code>PushedStreamRef</code> variable can then be used with <code>gun:await/2,3,4</code>
-and <code>gun:await_body/2,3,4</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#FF6600">push</font>, <font color="#009900">PushedStreamRef</font>, <font color="#009900">Method</font>, <font color="#009900">URI</font>, <font color="#009900">Headers</font>}
+ <font color="#990000">=</font> <b><font color="#000000">gun:await</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">OriginalStreamRef</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>The <code>PushedStreamRef</code> variable can then be used with <code>gun:await/2,3,4</code> and <code>gun:await_body/2,3,4</code>.</p>
<h2 id="_flushing_unwanted_messages">Flushing unwanted messages</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Gun provides the function <code>gun:flush/1</code> to quickly get rid
-of unwanted messages sitting in the process mailbox. You
-can use it to get rid of all messages related to a connection,
-or just the messages related to a stream.</p></div>
-<div class="listingblock">
-<div class="title">Flush all messages from a Gun connection</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Gun provides the function <code>gun:flush/1</code> to quickly get rid of unwanted messages sitting in the process mailbox. You can use it to get rid of all messages related to a connection, or just the messages related to a stream.</p>
+<div class="listingblock"><div class="title">Flush all messages from a Gun connection</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">gun:flush</span></span>(<span style="color: #009900">ConnPid</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Flush all messages from a specific stream</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">gun:flush</font></b>(<font color="#009900">ConnPid</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Flush all messages from a specific stream</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">gun:flush</span></span>(<span style="color: #009900">StreamRef</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">gun:flush</font></b>(<font color="#009900">StreamRef</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_redirecting_responses_to_a_different_process">Redirecting responses to a different process</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Gun allows you to specify which process will handle responses
-to a request via the <code>reply_to</code> request option.</p></div>
-<div class="listingblock">
-<div class="title">GET "/organizations/ninenines" to a different process</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Gun allows you to specify which process will handle responses to a request via the <code>reply_to</code> request option.</p>
+<div class="listingblock"><div class="title">GET &quot;/organizations/ninenines&quot; to a different process</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">StreamRef</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">gun:get</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #FF0000">"/organizations/ninenines"</span>, [],
- #{<span style="color: #0000FF">reply_to</span> <span style="color: #990000">=&gt;</span> <span style="color: #009900">Pid</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
+<pre><tt><font color="#009900">StreamRef</font> <font color="#990000">=</font> <b><font color="#000000">gun:get</font></b>(<font color="#009900">ConnPid</font>, <font color="#FF0000">"/organizations/ninenines"</font>, [],
+ #{<font color="#0000FF">reply_to</font> <font color="#990000">=&gt;</font> <font color="#009900">Pid</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+
diff --git a/docs/en/gun/1.0/guide/index.html b/docs/en/gun/1.0/guide/index.html
index cb30dd5b..78eff528 100644
--- a/docs/en/gun/1.0/guide/index.html
+++ b/docs/en/gun/1.0/guide/index.html
@@ -62,38 +62,20 @@
<h1 class="lined-header"><span>Gun User Guide</span></h1>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="introduction/">Introduction</a>
-</p>
+<ul><li><a href="introduction/">Introduction</a>
</li>
-<li>
-<p>
-<a href="start/">Starting and stopping</a>
-</p>
+<li><a href="start/">Starting and stopping</a>
</li>
-<li>
-<p>
-<a href="protocols/">Supported protocols</a>
-</p>
+<li><a href="protocols/">Supported protocols</a>
</li>
-<li>
-<p>
-<a href="connect/">Connection</a>
-</p>
+<li><a href="connect/">Connection</a>
</li>
-<li>
-<p>
-<a href="http/">Using HTTP</a>
-</p>
+<li><a href="http/">Using HTTP</a>
</li>
-<li>
-<p>
-<a href="websocket/">Using Websocket</a>
-</p>
+<li><a href="websocket/">Using Websocket</a>
</li>
-</ul></div>
+</ul>
+
diff --git a/docs/en/gun/1.0/guide/introduction/index.html b/docs/en/gun/1.0/guide/introduction/index.html
index 6a3ed2e7..c2f99ea1 100644
--- a/docs/en/gun/1.0/guide/introduction/index.html
+++ b/docs/en/gun/1.0/guide/introduction/index.html
@@ -62,61 +62,35 @@
<h1 class="lined-header"><span>Introduction</span></h1>
-<div class="paragraph"><p>Gun is an HTTP client for Erlang/OTP.</p></div>
-<div class="paragraph"><p>Gun supports the HTTP/2, HTTP/1.1 and Websocket protocols.</p></div>
-<div class="sect1">
+<p>Gun is an HTTP client for Erlang/OTP.</p>
+<p>Gun supports the HTTP/2, HTTP/1.1 and Websocket protocols.</p>
<h2 id="_prerequisites">Prerequisites</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Knowledge of Erlang, but also of the HTTP/1.1, HTTP/2 and Websocket
-protocols is required in order to read this guide.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Knowledge of Erlang, but also of the HTTP/1.1, HTTP/2 and Websocket protocols is required in order to read this guide.</p>
<h2 id="_supported_platforms">Supported platforms</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Gun is tested and supported on Linux, FreeBSD, Windows and OSX.</p></div>
-<div class="paragraph"><p>Gun is developed for Erlang/OTP 19.0 and newer.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Gun is tested and supported on Linux, FreeBSD, Windows and OSX.</p>
+<p>Gun is developed for Erlang/OTP 19.0 and newer.</p>
<h2 id="_license">License</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Gun uses the ISC License.</p></div>
-<div class="listingblock">
-<div class="content">
-<pre><code>Copyright (c) 2013-2018, Loïc Hoguin &lt;[email protected]&gt;
+<p>Gun uses the ISC License.</p>
+<div class="listingblock"><div class="content"><pre>Copyright (c) 2013-2018, Loïc Hoguin &lt;[email protected]&gt;
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+THE SOFTWARE IS PROVIDED &quot;AS IS&quot; AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.</code></pre>
-</div></div>
-</div>
-</div>
-<div class="sect1">
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.</pre></div></div>
<h2 id="_versioning">Versioning</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Gun uses <a href="http://semver.org/">Semantic Versioning 2.0.0</a>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Gun uses <a href="http://semver.org/">Semantic Versioning 2.0.0</a>.</p>
<h2 id="_conventions">Conventions</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>In the HTTP protocol, the method name is case sensitive. All standard
-method names are uppercase.</p></div>
-<div class="paragraph"><p>Header names are case insensitive. Gun converts all the header names
-to lowercase, and expects your application to provide lowercase header
-names.</p></div>
-<div class="paragraph"><p>The same applies to any other case insensitive value.</p></div>
-</div>
-</div>
+<p>In the HTTP protocol, the method name is case sensitive. All standard method names are uppercase.</p>
+<p>Header names are case insensitive. Gun converts all the header names to lowercase, and expects your application to provide lowercase header names.</p>
+<p>The same applies to any other case insensitive value.</p>
+
diff --git a/docs/en/gun/1.0/guide/protocols/index.html b/docs/en/gun/1.0/guide/protocols/index.html
index 00d70ad6..586ce865 100644
--- a/docs/en/gun/1.0/guide/protocols/index.html
+++ b/docs/en/gun/1.0/guide/protocols/index.html
@@ -62,270 +62,158 @@
<h1 class="lined-header"><span>Supported protocols</span></h1>
-<div class="paragraph"><p>This chapter describes the protocols supported and the
-operations available to them.</p></div>
-<div class="sect1">
+<p>This chapter describes the protocols supported and the operations available to them.</p>
<h2 id="_http_1_1">HTTP/1.1</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>HTTP/1.1 is a text request-response protocol. The client
-sends a request, the server sends back a response.</p></div>
-<div class="paragraph"><p>Gun provides convenience functions for performing GET, HEAD,
-OPTIONS, POST, PATCH, PUT, and DELETE requests. All these
-functions are aliases of <code>gun:request/4,5,6</code> for the respective
-methods. Gun also provides a <code>gun:data/4</code> function for streaming
-the request body.</p></div>
-<div class="paragraph"><p>Gun will send a <code>gun_inform</code> message for every intermediate
-informational responses received. They will always be sent
-before the <code>gun_response</code> message.</p></div>
-<div class="paragraph"><p>Gun will send a <code>gun_response</code> message for every response
-received, followed by zero or more <code>gun_data</code> messages for
-the response body, which is optionally terminated by a
-<code>gun_trailers</code> message. If something goes wrong, a <code>gun_error</code>
-will be sent instead.</p></div>
-<div class="paragraph"><p>Gun provides convenience functions for dealing with messages.
-The <code>gun:await/2,3,4</code> function waits for a response to the given
-request, and the <code>gun:await_body/2,3,4</code> function for the
-response body. The <code>gun:flush/1</code> function can be used to clear all
-messages related to a request or a connection from the mailbox
-of the calling process.</p></div>
-<div class="paragraph"><p>The function <code>gun:cancel/2</code> can be used to silence the
-response to a request previously sent if it is no longer
-needed. When using HTTP/1.1 there is no multiplexing so
-Gun will have to receive the response fully before any
-other responses can be received.</p></div>
-<div class="paragraph"><p>Finally, Gun can upgrade an HTTP/1.1 connection to Websocket.
-It provides the <code>gun:ws_upgrade/2,3,4</code> function for that
-purpose. A <code>gun_upgrade</code> message will be sent on success;
-a <code>gun_response</code> message otherwise.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>HTTP/1.1 is a text request-response protocol. The client sends a request, the server sends back a response.</p>
+<p>Gun provides convenience functions for performing GET, HEAD, OPTIONS, POST, PATCH, PUT, and DELETE requests. All these functions are aliases of <code>gun:request/4,5,6</code> for the respective methods. Gun also provides a <code>gun:data/4</code> function for streaming the request body.</p>
+<p>Gun will send a <code>gun_inform</code> message for every intermediate informational responses received. They will always be sent before the <code>gun_response</code> message.</p>
+<p>Gun will send a <code>gun_response</code> message for every response received, followed by zero or more <code>gun_data</code> messages for the response body, which is optionally terminated by a <code>gun_trailers</code> message. If something goes wrong, a <code>gun_error</code> will be sent instead.</p>
+<p>Gun provides convenience functions for dealing with messages. The <code>gun:await/2,3,4</code> function waits for a response to the given request, and the <code>gun:await_body/2,3,4</code> function for the response body. The <code>gun:flush/1</code> function can be used to clear all messages related to a request or a connection from the mailbox of the calling process.</p>
+<p>The function <code>gun:cancel/2</code> can be used to silence the response to a request previously sent if it is no longer needed. When using HTTP/1.1 there is no multiplexing so Gun will have to receive the response fully before any other responses can be received.</p>
+<p>Finally, Gun can upgrade an HTTP/1.1 connection to Websocket. It provides the <code>gun:ws_upgrade/2,3,4</code> function for that purpose. A <code>gun_upgrade</code> message will be sent on success; a <code>gun_response</code> message otherwise.</p>
<h2 id="_http_2">HTTP/2</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>HTTP/2 is a binary protocol based on HTTP, compatible with
-the HTTP semantics, that reduces the complexity of parsing
-requests and responses, compresses the HTTP headers and
-allows the server to push additional resources along with
-the normal response to the original request.</p></div>
-<div class="paragraph"><p>The HTTP/2 interface is very similar to HTTP/1.1, so this
-section instead focuses on the differences in the interface
-for the two protocols.</p></div>
-<div class="paragraph"><p>Gun will send <code>gun_push</code> messages for every push received.
-They will always be sent before the <code>gun_response</code> message.
-They can be ignored safely if they are not needed, or they
-can be canceled.</p></div>
-<div class="paragraph"><p>The <code>gun:cancel/2</code> function will use the HTTP/2 stream
-cancellation mechanism which allows Gun to inform the
-server to stop sending a response for this particular
-request, saving resources.</p></div>
-<div class="paragraph"><p>It is not currently possible to upgrade an HTTP/2 connection
-to Websocket. Support for this will be added in a future
-release.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>HTTP/2 is a binary protocol based on HTTP, compatible with the HTTP semantics, that reduces the complexity of parsing requests and responses, compresses the HTTP headers and allows the server to push additional resources along with the normal response to the original request.</p>
+<p>The HTTP/2 interface is very similar to HTTP/1.1, so this section instead focuses on the differences in the interface for the two protocols.</p>
+<p>Gun will send <code>gun_push</code> messages for every push received. They will always be sent before the <code>gun_response</code> message. They can be ignored safely if they are not needed, or they can be canceled.</p>
+<p>The <code>gun:cancel/2</code> function will use the HTTP/2 stream cancellation mechanism which allows Gun to inform the server to stop sending a response for this particular request, saving resources.</p>
+<p>It is not currently possible to upgrade an HTTP/2 connection to Websocket. Support for this will be added in a future release.</p>
<h2 id="_websocket">Websocket</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Websocket is a binary protocol built on top of HTTP that
-allows asynchronous concurrent communication between the
-client and the server. A Websocket server can push data to
-the client at any time.</p></div>
-<div class="paragraph"><p>Websocket is only available as a connection upgrade over
-an HTTP/1.1 connection.</p></div>
-<div class="paragraph"><p>Once the Websocket connection is established, the only
-operation available on this connection is sending Websocket
-frames using <code>gun:ws_send/2</code>.</p></div>
-<div class="paragraph"><p>Gun will send a <code>gun_ws</code> message for every frame received.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Websocket is a binary protocol built on top of HTTP that allows asynchronous concurrent communication between the client and the server. A Websocket server can push data to the client at any time.</p>
+<p>Websocket is only available as a connection upgrade over an HTTP/1.1 connection.</p>
+<p>Once the Websocket connection is established, the only operation available on this connection is sending Websocket frames using <code>gun:ws_send/2</code>.</p>
+<p>Gun will send a <code>gun_ws</code> message for every frame received.</p>
<h2 id="_summary">Summary</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The two following tables summarize the supported operations
-and the messages Gun sends depending on the connection&#8217;s
-current protocol.</p></div>
-<div class="tableblock">
-<table rules="all"
-width="100%"
-frame="border"
-cellspacing="0" cellpadding="4">
-<col width="25%" />
-<col width="25%" />
-<col width="25%" />
-<col width="25%" />
-<thead>
-<tr>
-<th align="left" valign="top"> Operation </th>
-<th align="center" valign="top"> HTTP/1.1 </th>
-<th align="center" valign="top"> HTTP/2 </th>
-<th align="center" valign="top"> Websocket</th>
+<p>The two following tables summarize the supported operations and the messages Gun sends depending on the connection&apos;s current protocol.</p>
+<table rules="all" width="100%" frame="border"
+ cellspacing="0" cellpadding="4">
+<caption>Supported operations per protocol</caption><thead><tr><th>Operation</th>
+<th>HTTP/1.1</th>
+<th>HTTP/2</th>
+<th>Websocket</th>
+</tr></thead><tbody><tr><td>delete</td>
+<td>yes</td>
+<td>yes</td>
+<td>no</td>
</tr>
-</thead>
-<tbody>
-<tr>
-<td align="left" valign="top"><p class="table">delete</p></td>
-<td align="center" valign="top"><p class="table">yes</p></td>
-<td align="center" valign="top"><p class="table">yes</p></td>
-<td align="center" valign="top"><p class="table">no</p></td>
+<tr><td>get</td>
+<td>yes</td>
+<td>yes</td>
+<td>no</td>
</tr>
-<tr>
-<td align="left" valign="top"><p class="table">get</p></td>
-<td align="center" valign="top"><p class="table">yes</p></td>
-<td align="center" valign="top"><p class="table">yes</p></td>
-<td align="center" valign="top"><p class="table">no</p></td>
+<tr><td>head</td>
+<td>yes</td>
+<td>yes</td>
+<td>no</td>
</tr>
-<tr>
-<td align="left" valign="top"><p class="table">head</p></td>
-<td align="center" valign="top"><p class="table">yes</p></td>
-<td align="center" valign="top"><p class="table">yes</p></td>
-<td align="center" valign="top"><p class="table">no</p></td>
+<tr><td>options</td>
+<td>yes</td>
+<td>yes</td>
+<td>no</td>
</tr>
-<tr>
-<td align="left" valign="top"><p class="table">options</p></td>
-<td align="center" valign="top"><p class="table">yes</p></td>
-<td align="center" valign="top"><p class="table">yes</p></td>
-<td align="center" valign="top"><p class="table">no</p></td>
+<tr><td>patch</td>
+<td>yes</td>
+<td>yes</td>
+<td>no</td>
</tr>
-<tr>
-<td align="left" valign="top"><p class="table">patch</p></td>
-<td align="center" valign="top"><p class="table">yes</p></td>
-<td align="center" valign="top"><p class="table">yes</p></td>
-<td align="center" valign="top"><p class="table">no</p></td>
+<tr><td>post</td>
+<td>yes</td>
+<td>yes</td>
+<td>no</td>
</tr>
-<tr>
-<td align="left" valign="top"><p class="table">post</p></td>
-<td align="center" valign="top"><p class="table">yes</p></td>
-<td align="center" valign="top"><p class="table">yes</p></td>
-<td align="center" valign="top"><p class="table">no</p></td>
+<tr><td>put</td>
+<td>yes</td>
+<td>yes</td>
+<td>no</td>
</tr>
-<tr>
-<td align="left" valign="top"><p class="table">put</p></td>
-<td align="center" valign="top"><p class="table">yes</p></td>
-<td align="center" valign="top"><p class="table">yes</p></td>
-<td align="center" valign="top"><p class="table">no</p></td>
+<tr><td>request</td>
+<td>yes</td>
+<td>yes</td>
+<td>no</td>
</tr>
-<tr>
-<td align="left" valign="top"><p class="table">request</p></td>
-<td align="center" valign="top"><p class="table">yes</p></td>
-<td align="center" valign="top"><p class="table">yes</p></td>
-<td align="center" valign="top"><p class="table">no</p></td>
+<tr><td>data</td>
+<td>yes</td>
+<td>yes</td>
+<td>no</td>
</tr>
-<tr>
-<td align="left" valign="top"><p class="table">data</p></td>
-<td align="center" valign="top"><p class="table">yes</p></td>
-<td align="center" valign="top"><p class="table">yes</p></td>
-<td align="center" valign="top"><p class="table">no</p></td>
+<tr><td>await</td>
+<td>yes</td>
+<td>yes</td>
+<td>no</td>
</tr>
-<tr>
-<td align="left" valign="top"><p class="table">await</p></td>
-<td align="center" valign="top"><p class="table">yes</p></td>
-<td align="center" valign="top"><p class="table">yes</p></td>
-<td align="center" valign="top"><p class="table">no</p></td>
+<tr><td>await_body</td>
+<td>yes</td>
+<td>yes</td>
+<td>no</td>
</tr>
-<tr>
-<td align="left" valign="top"><p class="table">await_body</p></td>
-<td align="center" valign="top"><p class="table">yes</p></td>
-<td align="center" valign="top"><p class="table">yes</p></td>
-<td align="center" valign="top"><p class="table">no</p></td>
+<tr><td>flush</td>
+<td>yes</td>
+<td>yes</td>
+<td>no</td>
</tr>
-<tr>
-<td align="left" valign="top"><p class="table">flush</p></td>
-<td align="center" valign="top"><p class="table">yes</p></td>
-<td align="center" valign="top"><p class="table">yes</p></td>
-<td align="center" valign="top"><p class="table">no</p></td>
+<tr><td>cancel</td>
+<td>yes</td>
+<td>yes</td>
+<td>no</td>
</tr>
-<tr>
-<td align="left" valign="top"><p class="table">cancel</p></td>
-<td align="center" valign="top"><p class="table">yes</p></td>
-<td align="center" valign="top"><p class="table">yes</p></td>
-<td align="center" valign="top"><p class="table">no</p></td>
+<tr><td>ws_upgrade</td>
+<td>yes</td>
+<td>no</td>
+<td>no</td>
</tr>
-<tr>
-<td align="left" valign="top"><p class="table">ws_upgrade</p></td>
-<td align="center" valign="top"><p class="table">yes</p></td>
-<td align="center" valign="top"><p class="table">no</p></td>
-<td align="center" valign="top"><p class="table">no</p></td>
+<tr><td>ws_send</td>
+<td>no</td>
+<td>no</td>
+<td>yes</td>
</tr>
-<tr>
-<td align="left" valign="top"><p class="table">ws_send</p></td>
-<td align="center" valign="top"><p class="table">no</p></td>
-<td align="center" valign="top"><p class="table">no</p></td>
-<td align="center" valign="top"><p class="table">yes</p></td>
+</tbody></table>
+<table rules="all" width="100%" frame="border"
+ cellspacing="0" cellpadding="4">
+<caption>Messages sent per protocol</caption><thead><tr><th>Message</th>
+<th>HTTP/1.1</th>
+<th>HTTP/2</th>
+<th>Websocket</th>
+</tr></thead><tbody><tr><td>gun_push</td>
+<td>no</td>
+<td>yes</td>
+<td>no</td>
</tr>
-</tbody>
-</table>
-</div>
-<div class="tableblock">
-<table rules="all"
-width="100%"
-frame="border"
-cellspacing="0" cellpadding="4">
-<col width="25%" />
-<col width="25%" />
-<col width="25%" />
-<col width="25%" />
-<thead>
-<tr>
-<th align="left" valign="top"> Message </th>
-<th align="center" valign="top"> HTTP/1.1 </th>
-<th align="center" valign="top"> HTTP/2 </th>
-<th align="center" valign="top"> Websocket</th>
+<tr><td>gun_inform</td>
+<td>yes</td>
+<td>yes</td>
+<td>no</td>
</tr>
-</thead>
-<tbody>
-<tr>
-<td align="left" valign="top"><p class="table">gun_push</p></td>
-<td align="center" valign="top"><p class="table">no</p></td>
-<td align="center" valign="top"><p class="table">yes</p></td>
-<td align="center" valign="top"><p class="table">no</p></td>
+<tr><td>gun_response</td>
+<td>yes</td>
+<td>yes</td>
+<td>no</td>
</tr>
-<tr>
-<td align="left" valign="top"><p class="table">gun_inform</p></td>
-<td align="center" valign="top"><p class="table">yes</p></td>
-<td align="center" valign="top"><p class="table">yes</p></td>
-<td align="center" valign="top"><p class="table">no</p></td>
+<tr><td>gun_data</td>
+<td>yes</td>
+<td>yes</td>
+<td>no</td>
</tr>
-<tr>
-<td align="left" valign="top"><p class="table">gun_response</p></td>
-<td align="center" valign="top"><p class="table">yes</p></td>
-<td align="center" valign="top"><p class="table">yes</p></td>
-<td align="center" valign="top"><p class="table">no</p></td>
+<tr><td>gun_trailers</td>
+<td>yes</td>
+<td>yes</td>
+<td>no</td>
</tr>
-<tr>
-<td align="left" valign="top"><p class="table">gun_data</p></td>
-<td align="center" valign="top"><p class="table">yes</p></td>
-<td align="center" valign="top"><p class="table">yes</p></td>
-<td align="center" valign="top"><p class="table">no</p></td>
+<tr><td>gun_error</td>
+<td>yes</td>
+<td>yes</td>
+<td>yes</td>
</tr>
-<tr>
-<td align="left" valign="top"><p class="table">gun_trailers</p></td>
-<td align="center" valign="top"><p class="table">yes</p></td>
-<td align="center" valign="top"><p class="table">yes</p></td>
-<td align="center" valign="top"><p class="table">no</p></td>
+<tr><td>gun_upgrade</td>
+<td>yes</td>
+<td>no</td>
+<td>no</td>
</tr>
-<tr>
-<td align="left" valign="top"><p class="table">gun_error</p></td>
-<td align="center" valign="top"><p class="table">yes</p></td>
-<td align="center" valign="top"><p class="table">yes</p></td>
-<td align="center" valign="top"><p class="table">yes</p></td>
+<tr><td>gun_ws</td>
+<td>no</td>
+<td>no</td>
+<td>yes</td>
</tr>
-<tr>
-<td align="left" valign="top"><p class="table">gun_upgrade</p></td>
-<td align="center" valign="top"><p class="table">yes</p></td>
-<td align="center" valign="top"><p class="table">no</p></td>
-<td align="center" valign="top"><p class="table">no</p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">gun_ws</p></td>
-<td align="center" valign="top"><p class="table">no</p></td>
-<td align="center" valign="top"><p class="table">no</p></td>
-<td align="center" valign="top"><p class="table">yes</p></td>
-</tr>
-</tbody>
-</table>
-</div>
-</div>
-</div>
+</tbody></table>
+
diff --git a/docs/en/gun/1.0/guide/start/index.html b/docs/en/gun/1.0/guide/start/index.html
index 6611c3ea..8eda77a7 100644
--- a/docs/en/gun/1.0/guide/start/index.html
+++ b/docs/en/gun/1.0/guide/start/index.html
@@ -62,54 +62,37 @@
<h1 class="lined-header"><span>Starting and stopping</span></h1>
-<div class="paragraph"><p>This chapter describes how to start and stop the Gun application.</p></div>
-<div class="sect1">
+<p>This chapter describes how to start and stop the Gun application.</p>
<h2 id="_setting_up">Setting up</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Specify Gun as a dependency to your application in your favorite
-build tool.</p></div>
-<div class="paragraph"><p>With Erlang.mk this is done by adding <code>gun</code> to the <code>DEPS</code> variable
-in your Makefile.</p></div>
-<div class="listingblock">
-<div class="title">Adding Gun as an Erlang.mk dependency</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Specify Gun as a dependency to your application in your favorite build tool.</p>
+<p>With Erlang.mk this is done by adding <code>gun</code> to the <code>DEPS</code> variable in your Makefile.</p>
+<div class="listingblock"><div class="title">Adding Gun as an Erlang.mk dependency</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">DEPS =</span> gun</tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">DEPS =</font> gun</tt></pre>
+</div></div>
<h2 id="_starting">Starting</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Gun is an <em>OTP application</em>. It needs to be started before you can
-use it.</p></div>
-<div class="listingblock">
-<div class="title">Starting Gun in an Erlang shell</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Gun is an <em>OTP application</em>. It needs to be started before you can use it.</p>
+<div class="listingblock"><div class="title">Starting Gun in an Erlang shell</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="font-weight: bold"><span style="color: #000000">application:ensure_all_started</span></span>(<span style="color: #FF6600">gun</span>)<span style="color: #990000">.</span>
-{<span style="color: #FF6600">ok</span>,[<span style="color: #FF6600">crypto</span>,<span style="color: #FF6600">cowlib</span>,<span style="color: #FF6600">asn1</span>,<span style="color: #FF6600">public_key</span>,<span style="color: #FF6600">ssl</span>,<span style="color: #FF6600">gun</span>]}</tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#993399">1</font><font color="#990000">&gt;</font> <b><font color="#000000">application:ensure_all_started</font></b>(<font color="#FF6600">gun</font>)<font color="#990000">.</font>
+{<font color="#FF6600">ok</font>,[<font color="#FF6600">crypto</font>,<font color="#FF6600">cowlib</font>,<font color="#FF6600">asn1</font>,<font color="#FF6600">public_key</font>,<font color="#FF6600">ssl</font>,<font color="#FF6600">gun</font>]}</tt></pre>
+</div></div>
<h2 id="_stopping">Stopping</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>You can stop Gun using the <code>application:stop/1</code> function, however
-only Gun will be stopped. This is the reverse of <code>application:start/1</code>.
-The <code>application_ensure_all_started/1</code> function has no equivalent for
-stopping all applications.</p></div>
-<div class="listingblock">
-<div class="title">Stopping Gun</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<p>You can stop Gun using the <code>application:stop/1</code> function, however only Gun will be stopped. This is the reverse of <code>application:start/1</code>. The <code>application_ensure_all_started/1</code> function has no equivalent for stopping all applications.</p>
+<div class="listingblock"><div class="title">Stopping Gun</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">application:stop</span></span>(<span style="color: #FF6600">gun</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
+<pre><tt><b><font color="#000000">application:stop</font></b>(<font color="#FF6600">gun</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+
diff --git a/docs/en/gun/1.0/guide/websocket/index.html b/docs/en/gun/1.0/guide/websocket/index.html
index a77f1319..67becc45 100644
--- a/docs/en/gun/1.0/guide/websocket/index.html
+++ b/docs/en/gun/1.0/guide/websocket/index.html
@@ -62,102 +62,88 @@
<h1 class="lined-header"><span>Websocket</span></h1>
-<div class="paragraph"><p>This chapter describes how to use the Gun client for
-communicating with a Websocket server.</p></div>
-<div class="sect1">
+<p>This chapter describes how to use the Gun client for communicating with a Websocket server.</p>
+<!-- @todo recovering from connection failure, reconnecting to Websocket etc.-->
<h2 id="_http_upgrade">HTTP upgrade</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Websocket is a protocol built on top of HTTP. To use Websocket,
-you must first request for the connection to be upgraded. Only
-HTTP/1.1 connections can be upgraded to Websocket, so you might
-need to restrict the protocol to HTTP/1.1 if you are planning
-to use Websocket over TLS.</p></div>
-<div class="paragraph"><p>You must use the <code>gun:ws_upgrade/2,3,4</code> function to upgrade
-to Websocket. This function can be called anytime after connection,
-so you can send HTTP requests before upgrading to Websocket.</p></div>
-<div class="listingblock">
-<div class="title">Upgrade to Websocket</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Websocket is a protocol built on top of HTTP. To use Websocket, you must first request for the connection to be upgraded. Only HTTP/1.1 connections can be upgraded to Websocket, so you might need to restrict the protocol to HTTP/1.1 if you are planning to use Websocket over TLS.</p>
+<p>You must use the <code>gun:ws_upgrade/2,3,4</code> function to upgrade to Websocket. This function can be called anytime after connection, so you can send HTTP requests before upgrading to Websocket.</p>
+<div class="listingblock"><div class="title">Upgrade to Websocket</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">gun:ws_upgrade</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #FF0000">"/websocket"</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Gun will set all the necessary headers for performing the
-Websocket upgrade, but you can specify additional headers
-if needed. For example you can request a custom sub-protocol.</p></div>
-<div class="listingblock">
-<div class="title">Upgrade to Websocket and request a protocol</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">gun:ws_upgrade</font></b>(<font color="#009900">ConnPid</font>, <font color="#FF0000">"/websocket"</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Gun will set all the necessary headers for performing the Websocket upgrade, but you can specify additional headers if needed. For example you can request a custom sub-protocol.</p>
+<div class="listingblock"><div class="title">Upgrade to Websocket and request a protocol</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">gun:ws_upgrade</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #FF0000">"/websocket"</span>, [
- {<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"sec-websocket-protocol"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #FF0000">"mychat"</span>}
-])<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>You can pass the Websocket options as part of the <code>gun:open/2,3</code>
-call when opening the connection, or using the <code>gun:ws_upgrade/4</code>.
-The fourth argument is those same options.</p></div>
-<div class="paragraph"><p>When the upgrade succeeds, a <code>gun_upgrade</code> message is sent.
-If the server does not understand Websocket or refused the
-upgrade, a <code>gun_response</code> message is sent. If Gun couldn&#8217;t
-perform the upgrade due to an error (for example attempting
-to upgrade to Websocket on an HTTP/1.0 connection) then a
-<code>gun_error</code> message is sent.</p></div>
-<div class="paragraph"><p>When the server does not understand Websocket, it may send
-a meaningful response which should be processed. In the
-following example we however ignore it:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">gun:ws_upgrade</font></b>(<font color="#009900">ConnPid</font>, <font color="#FF0000">"/websocket"</font>, [
+ {<font color="#990000">&lt;&lt;</font><font color="#FF0000">"sec-websocket-protocol"</font><font color="#990000">&gt;&gt;</font>, <font color="#FF0000">"mychat"</font>}
+])<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>You can pass the Websocket options as part of the <code>gun:open/2,3</code> call when opening the connection, or using the <code>gun:ws_upgrade/4</code>. The fourth argument is those same options.</p>
+<p>When the upgrade succeeds, a <code>gun_upgrade</code> message is sent. If the server does not understand Websocket or refused the upgrade, a <code>gun_response</code> message is sent. If Gun couldn&apos;t perform the upgrade due to an error (for example attempting to upgrade to Websocket on an HTTP/1.0 connection) then a <code>gun_error</code> message is sent.</p>
+<p>When the server does not understand Websocket, it may send a meaningful response which should be processed. In the following example we however ignore it:</p>
+<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: #0000FF">receive</span></span>
- {<span style="color: #FF6600">gun_upgrade</span>, <span style="color: #009900">ConnPid</span>, <span style="color: #009900">StreamRef</span>, [<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"websocket"</span><span style="color: #990000">&gt;&gt;</span>], <span style="color: #009900">Headers</span>} <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #000000">upgrade_success</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">StreamRef</span>);
- {<span style="color: #FF6600">gun_response</span>, <span style="color: #009900">ConnPid</span>, <span style="color: #990000">_</span>, <span style="color: #990000">_</span>, <span style="color: #009900">Status</span>, <span style="color: #009900">Headers</span>} <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #000080">exit</span></span>({<span style="color: #FF6600">ws_upgrade_failed</span>, <span style="color: #009900">Status</span>, <span style="color: #009900">Headers</span>});
- {<span style="color: #FF6600">gun_error</span>, <span style="color: #009900">ConnPid</span>, <span style="color: #009900">StreamRef</span>, <span style="color: #009900">Reason</span>} <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #000080">exit</span></span>({<span style="color: #FF6600">ws_upgrade_failed</span>, <span style="color: #009900">Reason</span>})
- <span style="font-style: italic"><span style="color: #9A1900">%% More clauses here as needed.</span></span>
-<span style="font-weight: bold"><span style="color: #0000FF">after</span></span> <span style="color: #993399">1000</span> <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #000080">exit</span></span>(<span style="color: #FF6600">timeout</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">
+<pre><tt><b><font color="#0000FF">receive</font></b>
+ {<font color="#FF6600">gun_upgrade</font>, <font color="#009900">ConnPid</font>, <font color="#009900">StreamRef</font>, [<font color="#990000">&lt;&lt;</font><font color="#FF0000">"websocket"</font><font color="#990000">&gt;&gt;</font>], <font color="#009900">Headers</font>} <font color="#990000">-&gt;</font>
+ <b><font color="#000000">upgrade_success</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">StreamRef</font>);
+ {<font color="#FF6600">gun_response</font>, <font color="#009900">ConnPid</font>, <font color="#990000">_</font>, <font color="#990000">_</font>, <font color="#009900">Status</font>, <font color="#009900">Headers</font>} <font color="#990000">-&gt;</font>
+ <b><font color="#000080">exit</font></b>({<font color="#FF6600">ws_upgrade_failed</font>, <font color="#009900">Status</font>, <font color="#009900">Headers</font>});
+ {<font color="#FF6600">gun_error</font>, <font color="#009900">ConnPid</font>, <font color="#009900">StreamRef</font>, <font color="#009900">Reason</font>} <font color="#990000">-&gt;</font>
+ <b><font color="#000080">exit</font></b>({<font color="#FF6600">ws_upgrade_failed</font>, <font color="#009900">Reason</font>})
+ <i><font color="#9A1900">%% More clauses here as needed.</font></i>
+<b><font color="#0000FF">after</font></b> <font color="#993399">1000</font> <font color="#990000">-&gt;</font>
+ <b><font color="#000080">exit</font></b>(<font color="#FF6600">timeout</font>)
+<b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_sending_data">Sending data</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Once the Websocket upgrade has completed successfully, you no
-longer have access to functions for performing requests. You
-can only send and receive Websocket messages.</p></div>
-<div class="paragraph"><p>Use <code>gun:ws_send/2</code> to send messages to the server.</p></div>
-<div class="listingblock">
-<div class="title">Send a text frame</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Once the Websocket upgrade has completed successfully, you no longer have access to functions for performing requests. You can only send and receive Websocket messages.</p>
+<p>Use <code>gun:ws_send/2</code> to send messages to the server.</p>
+<div class="listingblock"><div class="title">Send a text frame</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">gun:ws_send</span></span>(<span style="color: #009900">ConnPid</span>, {<span style="color: #FF6600">text</span>, <span style="color: #FF0000">"Hello!"</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Note that if you send a close frame, Gun will close the connection
-cleanly and will not attempt to reconnect afterwards.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">gun:ws_send</font></b>(<font color="#009900">ConnPid</font>, {<font color="#FF6600">text</font>, <font color="#FF0000">"Hello!"</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+<!-- @todo Implement sending of N frames-->
+<!-- -->
+<!-- .Send a text frame, a binary frame and then close the connection-->
+<!-- [source,erlang]-->
+<!-- ------>
+<!-- gun:ws_send(ConnPid, [-->
+<!-- {text, &quot;Hello!&quot;},-->
+<!-- {binary, BinaryValue},-->
+<!-- close-->
+<!-- ]).-->
+<!-- ------>
+<p>Note that if you send a close frame, Gun will close the connection cleanly and will not attempt to reconnect afterwards.</p>
<h2 id="_receiving_data">Receiving data</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Gun sends an Erlang message to the owner process for every
-Websocket message it receives.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Gun sends an Erlang message to the owner process for every Websocket message it receives.</p>
+<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: #0000FF">receive</span></span>
- {<span style="color: #FF6600">gun_ws</span>, <span style="color: #009900">ConnPid</span>, <span style="color: #009900">StreamRef</span>, <span style="color: #009900">Frame</span>} <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #000000">handle_frame</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">StreamRef</span>, <span style="color: #009900">Frame</span>)
-<span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
+<pre><tt><b><font color="#0000FF">receive</font></b>
+ {<font color="#FF6600">gun_ws</font>, <font color="#009900">ConnPid</font>, <font color="#009900">StreamRef</font>, <font color="#009900">Frame</font>} <font color="#990000">-&gt;</font>
+ <b><font color="#000000">handle_frame</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">StreamRef</font>, <font color="#009900">Frame</font>)
+<b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
+<!-- @todo auto ping has not been implemented yet-->
+<!-- -->
+<!-- Gun will automatically send ping messages to the server to keep-->
+<!-- the connection alive, however if the connection dies and Gun has-->
+<!-- to reconnect it will not upgrade to Websocket automatically, you-->
+<!-- need to perform the operation when you receive the `gun_error`-->
+<!-- message.-->
+
diff --git a/docs/en/gun/1.0/manual/gun.await/index.html b/docs/en/gun/1.0/manual/gun.await/index.html
index a0a9d77b..dd857dad 100644
--- a/docs/en/gun/1.0/manual/gun.await/index.html
+++ b/docs/en/gun/1.0/manual/gun.await/index.html
@@ -62,180 +62,94 @@
<h1 class="lined-header"><span>gun:await(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>gun:await - Wait for a response</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>gun:await - Wait for a response</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">await</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">StreamRef</span>)
- <span style="color: #990000">-&gt;</span> <span style="font-weight: bold"><span style="color: #000000">await</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">StreamRef</span>, <span style="color: #993399">5000</span>, <span style="color: #009900">MonitorRef</span>)
-
-<span style="font-weight: bold"><span style="color: #000000">await</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">StreamRef</span>, <span style="color: #009900">MonitorRef</span>)
- <span style="color: #990000">-&gt;</span> <span style="font-weight: bold"><span style="color: #000000">await</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">StreamRef</span>, <span style="color: #993399">5000</span>, <span style="color: #009900">MonitorRef</span>)
-
-<span style="font-weight: bold"><span style="color: #000000">await</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">StreamRef</span>, <span style="color: #009900">Timeout</span>)
- <span style="color: #990000">-&gt;</span> <span style="font-weight: bold"><span style="color: #000000">await</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">StreamRef</span>, <span style="color: #009900">Timeout</span>, <span style="color: #009900">MonitorRef</span>)
-
-<span style="font-weight: bold"><span style="color: #000000">await</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">StreamRef</span>, <span style="color: #009900">Timeout</span>, <span style="color: #009900">MonitorRef</span>)
- <span style="color: #990000">-&gt;</span> <span style="color: #009900">Result</span>
-
-<span style="color: #009900">ConnPid</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">pid</span></span>()
-<span style="color: #009900">StreamRef</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">reference</span></span>()
-<span style="color: #009900">MonitorRef</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">reference</span></span>()
-<span style="color: #009900">Timeout</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">timeout</span></span>()
-<span style="color: #009900">Result</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">tuple</span></span>() <span style="color: #990000">-</span> <span style="color: #FF6600">see</span> <span style="color: #FF6600">below</span></tt></pre></div></div>
-<div class="paragraph"><p>Wait for a response.</p></div>
-<div class="paragraph"><p>This function waits for a message from the given stream and
-returns it as a tuple. An error will be returned should the
-process fail or a relevant message is not received within
-the specified duration.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">await</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">StreamRef</font>)
+ <font color="#990000">-&gt;</font> <b><font color="#000000">await</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">StreamRef</font>, <font color="#993399">5000</font>, <font color="#009900">MonitorRef</font>)
+
+<b><font color="#000000">await</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">StreamRef</font>, <font color="#009900">MonitorRef</font>)
+ <font color="#990000">-&gt;</font> <b><font color="#000000">await</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">StreamRef</font>, <font color="#993399">5000</font>, <font color="#009900">MonitorRef</font>)
+
+<b><font color="#000000">await</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">StreamRef</font>, <font color="#009900">Timeout</font>)
+ <font color="#990000">-&gt;</font> <b><font color="#000000">await</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">StreamRef</font>, <font color="#009900">Timeout</font>, <font color="#009900">MonitorRef</font>)
+
+<b><font color="#000000">await</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">StreamRef</font>, <font color="#009900">Timeout</font>, <font color="#009900">MonitorRef</font>)
+ <font color="#990000">-&gt;</font> <font color="#009900">Result</font>
+
+<font color="#009900">ConnPid</font> <font color="#990000">::</font> <b><font color="#000080">pid</font></b>()
+<font color="#009900">StreamRef</font> <font color="#990000">::</font> <b><font color="#000080">reference</font></b>()
+<font color="#009900">MonitorRef</font> <font color="#990000">::</font> <b><font color="#000080">reference</font></b>()
+<font color="#009900">Timeout</font> <font color="#990000">::</font> <b><font color="#000000">timeout</font></b>()
+<font color="#009900">Result</font> <font color="#990000">::</font> <b><font color="#000000">tuple</font></b>() <font color="#990000">-</font> <font color="#FF6600">see</font> <font color="#FF6600">below</font></tt></pre>
+</div></div>
+<p>Wait for a response.</p>
+<p>This function waits for a message from the given stream and returns it as a tuple. An error will be returned should the process fail or a relevant message is not received within the specified duration.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-ConnPid
-</dt>
-<dd>
-<p>
-The pid of the Gun connection process.
-</p>
+<dl><dt>ConnPid</dt>
+<dd><p>The pid of the Gun connection process.</p>
</dd>
-<dt class="hdlist1">
-StreamRef
-</dt>
-<dd>
-<p>
-Identifier of the stream for the original request.
-</p>
+<dt>StreamRef</dt>
+<dd><p>Identifier of the stream for the original request.</p>
</dd>
-<dt class="hdlist1">
-Timeout
-</dt>
-<dd>
-<p>
-How long to wait for a message, in milliseconds.
-</p>
+<dt>Timeout</dt>
+<dd><p>How long to wait for a message, in milliseconds.</p>
</dd>
-<dt class="hdlist1">
-MonitorRef
-</dt>
-<dd>
-<p>
-Monitor for the Gun connection process.
-</p>
-<div class="paragraph"><p>A monitor is automatically created for the duration of this
-call when one is not provided.</p></div>
+<dt>MonitorRef</dt>
+<dd><p>Monitor for the Gun connection process.</p>
+<p>A monitor is automatically created for the duration of this call when one is not provided.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A number of different tuples can be returned. They correspond
-to the message of the same name and they contain the same
-elements minus the pid and stream reference. Error tuples
-may also be returned when a timeout or an error occur.</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<p>A number of different tuples can be returned. They correspond to the message of the same name and they contain the same elements minus the pid and stream reference. Error tuples may also be returned when a timeout or an error occur.</p>
+<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">Result</span> <span style="color: #990000">::</span> {<span style="color: #FF6600">inform</span>, <span style="color: #009900">Status</span>, <span style="color: #009900">Headers</span>}
- {<span style="color: #FF6600">response</span>, <span style="color: #009900">IsFin</span>, <span style="color: #009900">Status</span>, <span style="color: #009900">Headers</span>}
- {<span style="color: #FF6600">data</span>, <span style="color: #009900">IsFin</span>, <span style="color: #009900">Data</span>}
- {<span style="color: #FF6600">trailers</span>, <span style="color: #009900">Trailers</span>}
- {<span style="color: #FF6600">push</span>, <span style="color: #009900">NewStreamRef</span>, <span style="color: #009900">Method</span>, <span style="color: #009900">URI</span>, <span style="color: #009900">Headers</span>}
- {<span style="color: #FF6600">error</span>, <span style="color: #009900">Reason</span>}
-
-<span style="color: #009900">Reason</span> <span style="color: #990000">::</span> <span style="color: #FF6600">timeout</span> | <span style="font-weight: bold"><span style="color: #000000">any</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Because the messages and returned tuples are equivalent,
-please refer to the manual pages for each message for
-further information:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../gun_push">gun_push(3)</a> - Server-initiated push
-</p>
+<pre><tt><font color="#009900">Result</font> <font color="#990000">::</font> {<font color="#FF6600">inform</font>, <font color="#009900">Status</font>, <font color="#009900">Headers</font>}
+ {<font color="#FF6600">response</font>, <font color="#009900">IsFin</font>, <font color="#009900">Status</font>, <font color="#009900">Headers</font>}
+ {<font color="#FF6600">data</font>, <font color="#009900">IsFin</font>, <font color="#009900">Data</font>}
+ {<font color="#FF6600">trailers</font>, <font color="#009900">Trailers</font>}
+ {<font color="#FF6600">push</font>, <font color="#009900">NewStreamRef</font>, <font color="#009900">Method</font>, <font color="#009900">URI</font>, <font color="#009900">Headers</font>}
+ {<font color="#FF6600">error</font>, <font color="#009900">Reason</font>}
+
+<font color="#009900">Reason</font> <font color="#990000">::</font> <font color="#FF6600">timeout</font> | <b><font color="#000000">any</font></b>()</tt></pre>
+</div></div>
+<p>Because the messages and returned tuples are equivalent, please refer to the manual pages for each message for further information:</p>
+<ul><li><a href="../gun_push">gun_push(3)</a> - Server-initiated push
</li>
-<li>
-<p>
-<a href="../gun_inform">gun_inform(3)</a> - Informational response
-</p>
+<li><a href="../gun_inform">gun_inform(3)</a> - Informational response
</li>
-<li>
-<p>
-<a href="../gun_response">gun_response(3)</a> - Response
-</p>
+<li><a href="../gun_response">gun_response(3)</a> - Response
</li>
-<li>
-<p>
-<a href="../gun_data">gun_data(3)</a> - Response body
-</p>
+<li><a href="../gun_data">gun_data(3)</a> - Response body
</li>
-<li>
-<p>
-<a href="../gun_trailers">gun_trailers(3)</a> - Response trailers
-</p>
+<li><a href="../gun_trailers">gun_trailers(3)</a> - Response trailers
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<ul><li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Wait for a response</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Wait for a response</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">StreamRef</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">gun:get</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #FF0000">"/articles"</span>, [
- {<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"accept"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/html;q=1.0, application/xml;q=0.1"</span><span style="color: #990000">&gt;&gt;</span>}
-])<span style="color: #990000">.</span>
-{<span style="color: #FF6600">response</span>, <span style="color: #FF6600">nofin</span>, <span style="color: #993399">200</span>, <span style="color: #009900">_Headers</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">gun:await</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">StreamRef</span>)<span style="color: #990000">.</span>
-{<span style="color: #FF6600">data</span>, <span style="color: #FF6600">fin</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Hello world!"</span><span style="color: #990000">&gt;&gt;</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">gun:await</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">StreamRef</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">StreamRef</font> <font color="#990000">=</font> <b><font color="#000000">gun:get</font></b>(<font color="#009900">ConnPid</font>, <font color="#FF0000">"/articles"</font>, [
+ {<font color="#990000">&lt;&lt;</font><font color="#FF0000">"accept"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/html;q=1.0, application/xml;q=0.1"</font><font color="#990000">&gt;&gt;</font>}
+])<font color="#990000">.</font>
+{<font color="#FF6600">response</font>, <font color="#FF6600">nofin</font>, <font color="#993399">200</font>, <font color="#009900">_Headers</font>} <font color="#990000">=</font> <b><font color="#000000">gun:await</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">StreamRef</font>)<font color="#990000">.</font>
+{<font color="#FF6600">data</font>, <font color="#FF6600">fin</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"Hello world!"</font><font color="#990000">&gt;&gt;</font>} <font color="#990000">=</font> <b><font color="#000000">gun:await</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">StreamRef</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../gun">gun(3)</a>,
-<a href="../gun.get">gun:get(3)</a>,
-<a href="../gun.head">gun:head(3)</a>,
-<a href="../gun.options">gun:options(3)</a>,
-<a href="../gun.patch">gun:patch(3)</a>,
-<a href="../gun.post">gun:post(3)</a>,
-<a href="../gun.put">gun:put(3)</a>,
-<a href="../gun.delete">gun:delete(3)</a>,
-<a href="../gun.request">gun:request(3)</a>,
-<a href="../gun.await_body">gun:await_body(3)</a></p></div>
-</div>
-</div>
+<p><a href="../gun">gun(3)</a>, <a href="../gun.get">gun:get(3)</a>, <a href="../gun.head">gun:head(3)</a>, <a href="../gun.options">gun:options(3)</a>, <a href="../gun.patch">gun:patch(3)</a>, <a href="../gun.post">gun:post(3)</a>, <a href="../gun.put">gun:put(3)</a>, <a href="../gun.delete">gun:delete(3)</a>, <a href="../gun.request">gun:request(3)</a>, <a href="../gun.await_body">gun:await_body(3)</a></p>
+
diff --git a/docs/en/gun/1.0/manual/gun.await_body/index.html b/docs/en/gun/1.0/manual/gun.await_body/index.html
index 56a94dbc..a3759bed 100644
--- a/docs/en/gun/1.0/manual/gun.await_body/index.html
+++ b/docs/en/gun/1.0/manual/gun.await_body/index.html
@@ -62,134 +62,70 @@
<h1 class="lined-header"><span>gun:await_body(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>gun:await_body - Wait for the complete response body</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>gun:await_body - Wait for the complete response body</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">await_body</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">StreamRef</span>)
- <span style="color: #990000">-&gt;</span> <span style="font-weight: bold"><span style="color: #000000">await_body</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">StreamRef</span>, <span style="color: #993399">5000</span>, <span style="color: #009900">MonitorRef</span>)
-
-<span style="font-weight: bold"><span style="color: #000000">await_body</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">StreamRef</span>, <span style="color: #009900">MonitorRef</span>)
- <span style="color: #990000">-&gt;</span> <span style="font-weight: bold"><span style="color: #000000">await_body</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">StreamRef</span>, <span style="color: #993399">5000</span>, <span style="color: #009900">MonitorRef</span>)
-
-<span style="font-weight: bold"><span style="color: #000000">await_body</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">StreamRef</span>, <span style="color: #009900">Timeout</span>)
- <span style="color: #990000">-&gt;</span> <span style="font-weight: bold"><span style="color: #000000">await_body</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">StreamRef</span>, <span style="color: #009900">Timeout</span>, <span style="color: #009900">MonitorRef</span>)
-
-<span style="font-weight: bold"><span style="color: #000000">await_body</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">StreamRef</span>, <span style="color: #009900">Timeout</span>, <span style="color: #009900">MonitorRef</span>)
- <span style="color: #990000">-&gt;</span> {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Body</span>} | {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Body</span>, <span style="color: #009900">Trailers</span>} | {<span style="color: #FF6600">error</span>, <span style="color: #009900">Reason</span>}
-
-<span style="color: #009900">ConnPid</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">pid</span></span>()
-<span style="color: #009900">StreamRef</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">reference</span></span>()
-<span style="color: #009900">MonitorRef</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">reference</span></span>()
-<span style="color: #009900">Timeout</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">timeout</span></span>()
-<span style="color: #009900">Body</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()
-<span style="color: #009900">Trailers</span> <span style="color: #990000">::</span> [{<span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()}]
-<span style="color: #009900">Reason</span> <span style="color: #990000">::</span> <span style="color: #FF6600">timeout</span> | <span style="font-weight: bold"><span style="color: #000000">any</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Wait for the complete response body.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">await_body</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">StreamRef</font>)
+ <font color="#990000">-&gt;</font> <b><font color="#000000">await_body</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">StreamRef</font>, <font color="#993399">5000</font>, <font color="#009900">MonitorRef</font>)
+
+<b><font color="#000000">await_body</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">StreamRef</font>, <font color="#009900">MonitorRef</font>)
+ <font color="#990000">-&gt;</font> <b><font color="#000000">await_body</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">StreamRef</font>, <font color="#993399">5000</font>, <font color="#009900">MonitorRef</font>)
+
+<b><font color="#000000">await_body</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">StreamRef</font>, <font color="#009900">Timeout</font>)
+ <font color="#990000">-&gt;</font> <b><font color="#000000">await_body</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">StreamRef</font>, <font color="#009900">Timeout</font>, <font color="#009900">MonitorRef</font>)
+
+<b><font color="#000000">await_body</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">StreamRef</font>, <font color="#009900">Timeout</font>, <font color="#009900">MonitorRef</font>)
+ <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <font color="#009900">Body</font>} | {<font color="#FF6600">ok</font>, <font color="#009900">Body</font>, <font color="#009900">Trailers</font>} | {<font color="#FF6600">error</font>, <font color="#009900">Reason</font>}
+
+<font color="#009900">ConnPid</font> <font color="#990000">::</font> <b><font color="#000080">pid</font></b>()
+<font color="#009900">StreamRef</font> <font color="#990000">::</font> <b><font color="#000080">reference</font></b>()
+<font color="#009900">MonitorRef</font> <font color="#990000">::</font> <b><font color="#000080">reference</font></b>()
+<font color="#009900">Timeout</font> <font color="#990000">::</font> <b><font color="#000000">timeout</font></b>()
+<font color="#009900">Body</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()
+<font color="#009900">Trailers</font> <font color="#990000">::</font> [{<b><font color="#000080">binary</font></b>(), <b><font color="#000080">binary</font></b>()}]
+<font color="#009900">Reason</font> <font color="#990000">::</font> <font color="#FF6600">timeout</font> | <b><font color="#000000">any</font></b>()</tt></pre>
+</div></div>
+<p>Wait for the complete response body.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-ConnPid
-</dt>
-<dd>
-<p>
-The pid of the Gun connection process.
-</p>
+<dl><dt>ConnPid</dt>
+<dd><p>The pid of the Gun connection process.</p>
</dd>
-<dt class="hdlist1">
-StreamRef
-</dt>
-<dd>
-<p>
-Identifier of the stream for the original request.
-</p>
+<dt>StreamRef</dt>
+<dd><p>Identifier of the stream for the original request.</p>
</dd>
-<dt class="hdlist1">
-Timeout
-</dt>
-<dd>
-<p>
-How long to wait for each message, in milliseconds.
-</p>
+<dt>Timeout</dt>
+<dd><p>How long to wait for each message, in milliseconds.</p>
</dd>
-<dt class="hdlist1">
-MonitorRef
-</dt>
-<dd>
-<p>
-Monitor for the Gun connection process.
-</p>
-<div class="paragraph"><p>A monitor is automatically created for the duration of this
-call when one is not provided.</p></div>
+<dt>MonitorRef</dt>
+<dd><p>Monitor for the Gun connection process.</p>
+<p>A monitor is automatically created for the duration of this call when one is not provided.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The body is returned, possibly with trailers if the
-request contained a <code>te: trailers</code> header. Error tuples
-may also be returned when a timeout or an error occur.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The body is returned, possibly with trailers if the request contained a <code>te: trailers</code> header. Error tuples may also be returned when a timeout or an error occur.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<ul><li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Wait for the complete response body</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Wait for the complete response body</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">StreamRef</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">gun:get</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #FF0000">"/articles"</span>, [
- {<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"accept"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/html;q=1.0, application/xml;q=0.1"</span><span style="color: #990000">&gt;&gt;</span>}
-])<span style="color: #990000">.</span>
-{<span style="color: #FF6600">response</span>, <span style="color: #FF6600">nofin</span>, <span style="color: #993399">200</span>, <span style="color: #009900">_Headers</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">gun:await</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">StreamRef</span>)<span style="color: #990000">.</span>
-{<span style="color: #FF6600">ok</span>, <span style="color: #009900">_Body</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">gun:await_body</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">StreamRef</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">StreamRef</font> <font color="#990000">=</font> <b><font color="#000000">gun:get</font></b>(<font color="#009900">ConnPid</font>, <font color="#FF0000">"/articles"</font>, [
+ {<font color="#990000">&lt;&lt;</font><font color="#FF0000">"accept"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/html;q=1.0, application/xml;q=0.1"</font><font color="#990000">&gt;&gt;</font>}
+])<font color="#990000">.</font>
+{<font color="#FF6600">response</font>, <font color="#FF6600">nofin</font>, <font color="#993399">200</font>, <font color="#009900">_Headers</font>} <font color="#990000">=</font> <b><font color="#000000">gun:await</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">StreamRef</font>)<font color="#990000">.</font>
+{<font color="#FF6600">ok</font>, <font color="#009900">_Body</font>} <font color="#990000">=</font> <b><font color="#000000">gun:await_body</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">StreamRef</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../gun">gun(3)</a>,
-<a href="../gun.get">gun:get(3)</a>,
-<a href="../gun.head">gun:head(3)</a>,
-<a href="../gun.options">gun:options(3)</a>,
-<a href="../gun.patch">gun:patch(3)</a>,
-<a href="../gun.post">gun:post(3)</a>,
-<a href="../gun.put">gun:put(3)</a>,
-<a href="../gun.delete">gun:delete(3)</a>,
-<a href="../gun.request">gun:request(3)</a>,
-<a href="../gun.await">gun:await(3)</a></p></div>
-</div>
-</div>
+<p><a href="../gun">gun(3)</a>, <a href="../gun.get">gun:get(3)</a>, <a href="../gun.head">gun:head(3)</a>, <a href="../gun.options">gun:options(3)</a>, <a href="../gun.patch">gun:patch(3)</a>, <a href="../gun.post">gun:post(3)</a>, <a href="../gun.put">gun:put(3)</a>, <a href="../gun.delete">gun:delete(3)</a>, <a href="../gun.request">gun:request(3)</a>, <a href="../gun.await">gun:await(3)</a></p>
+
diff --git a/docs/en/gun/1.0/manual/gun.await_up/index.html b/docs/en/gun/1.0/manual/gun.await_up/index.html
index dc3eea5c..b437925e 100644
--- a/docs/en/gun/1.0/manual/gun.await_up/index.html
+++ b/docs/en/gun/1.0/manual/gun.await_up/index.html
@@ -62,115 +62,62 @@
<h1 class="lined-header"><span>gun:await_up(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>gun:await_up - Wait for the connection to be up</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>gun:await_up - Wait for the connection to be up</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">await_up</span></span>(<span style="color: #009900">ConnPid</span>)
- <span style="color: #990000">-&gt;</span> <span style="font-weight: bold"><span style="color: #000000">await_up</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #993399">5000</span>, <span style="color: #009900">MonitorRef</span>)
+<pre><tt><b><font color="#000000">await_up</font></b>(<font color="#009900">ConnPid</font>)
+ <font color="#990000">-&gt;</font> <b><font color="#000000">await_up</font></b>(<font color="#009900">ConnPid</font>, <font color="#993399">5000</font>, <font color="#009900">MonitorRef</font>)
-<span style="font-weight: bold"><span style="color: #000000">await_up</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">MonitorRef</span>)
- <span style="color: #990000">-&gt;</span> <span style="font-weight: bold"><span style="color: #000000">await_up</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #993399">5000</span>, <span style="color: #009900">MonitorRef</span>)
+<b><font color="#000000">await_up</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">MonitorRef</font>)
+ <font color="#990000">-&gt;</font> <b><font color="#000000">await_up</font></b>(<font color="#009900">ConnPid</font>, <font color="#993399">5000</font>, <font color="#009900">MonitorRef</font>)
-<span style="font-weight: bold"><span style="color: #000000">await_up</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">Timeout</span>)
- <span style="color: #990000">-&gt;</span> <span style="font-weight: bold"><span style="color: #000000">await_up</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">Timeout</span>, <span style="color: #009900">MonitorRef</span>)
+<b><font color="#000000">await_up</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">Timeout</font>)
+ <font color="#990000">-&gt;</font> <b><font color="#000000">await_up</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">Timeout</font>, <font color="#009900">MonitorRef</font>)
-<span style="font-weight: bold"><span style="color: #000000">await_up</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">Timeout</span>, <span style="color: #009900">MonitorRef</span>)
- <span style="color: #990000">-&gt;</span> {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Protocol</span>} | {<span style="color: #FF6600">error</span>, <span style="color: #009900">Reason</span>}
+<b><font color="#000000">await_up</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">Timeout</font>, <font color="#009900">MonitorRef</font>)
+ <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <font color="#009900">Protocol</font>} | {<font color="#FF6600">error</font>, <font color="#009900">Reason</font>}
-<span style="color: #009900">ConnPid</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">pid</span></span>()
-<span style="color: #009900">MonitorRef</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">reference</span></span>()
-<span style="color: #009900">Timeout</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">timeout</span></span>()
-<span style="color: #009900">Protocol</span> <span style="color: #990000">::</span> <span style="color: #FF6600">http</span> | <span style="color: #FF6600">http2</span>
-<span style="color: #009900">Reason</span> <span style="color: #990000">::</span> <span style="color: #FF6600">timeout</span> | <span style="font-weight: bold"><span style="color: #000000">any</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Wait for the connection to be up.</p></div>
-</div>
-</div>
-<div class="sect1">
+<font color="#009900">ConnPid</font> <font color="#990000">::</font> <b><font color="#000080">pid</font></b>()
+<font color="#009900">MonitorRef</font> <font color="#990000">::</font> <b><font color="#000080">reference</font></b>()
+<font color="#009900">Timeout</font> <font color="#990000">::</font> <b><font color="#000000">timeout</font></b>()
+<font color="#009900">Protocol</font> <font color="#990000">::</font> <font color="#FF6600">http</font> | <font color="#FF6600">http2</font>
+<font color="#009900">Reason</font> <font color="#990000">::</font> <font color="#FF6600">timeout</font> | <b><font color="#000000">any</font></b>()</tt></pre>
+</div></div>
+<p>Wait for the connection to be up.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-ConnPid
-</dt>
-<dd>
-<p>
-The pid of the Gun connection process.
-</p>
+<dl><dt>ConnPid</dt>
+<dd><p>The pid of the Gun connection process.</p>
</dd>
-<dt class="hdlist1">
-Timeout
-</dt>
-<dd>
-<p>
-How long to wait for, in milliseconds.
-</p>
+<dt>Timeout</dt>
+<dd><p>How long to wait for, in milliseconds.</p>
</dd>
-<dt class="hdlist1">
-MonitorRef
-</dt>
-<dd>
-<p>
-Monitor for the Gun connection process.
-</p>
-<div class="paragraph"><p>A monitor is automatically created for the duration of this
-call when one is not provided.</p></div>
+<dt>MonitorRef</dt>
+<dd><p>Monitor for the Gun connection process.</p>
+<p>A monitor is automatically created for the duration of this call when one is not provided.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The protocol selected for this connection. It can be used
-to determine the capabilities of the server. Error tuples
-may also be returned when a timeout or an error occur.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The protocol selected for this connection. It can be used to determine the capabilities of the server. Error tuples may also be returned when a timeout or an error occur.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<ul><li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Wait for the connection to be up</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Wait for the connection to be up</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: #FF6600">ok</span>, <span style="color: #009900">ConnPid</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">gun:open</span></span>(<span style="color: #FF0000">"example.org"</span>, <span style="color: #993399">443</span>)<span style="color: #990000">.</span>
-{<span style="color: #FF6600">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">gun:await_up</span></span>(<span style="color: #009900">ConnPid</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#009900">ConnPid</font>} <font color="#990000">=</font> <b><font color="#000000">gun:open</font></b>(<font color="#FF0000">"example.org"</font>, <font color="#993399">443</font>)<font color="#990000">.</font>
+{<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">gun:await_up</font></b>(<font color="#009900">ConnPid</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../gun">gun(3)</a>,
-<a href="../gun.open">gun:open(3)</a>,
-<a href="../gun.open_unix">gun:open_unix(3)</a>,
-<a href="../gun_up">gun_up(3)</a></p></div>
-</div>
-</div>
+<p><a href="../gun">gun(3)</a>, <a href="../gun.open">gun:open(3)</a>, <a href="../gun.open_unix">gun:open_unix(3)</a>, <a href="../gun_up">gun_up(3)</a></p>
+
diff --git a/docs/en/gun/1.0/manual/gun.cancel/index.html b/docs/en/gun/1.0/manual/gun.cancel/index.html
index ea356f54..76e8d19b 100644
--- a/docs/en/gun/1.0/manual/gun.cancel/index.html
+++ b/docs/en/gun/1.0/manual/gun.cancel/index.html
@@ -62,103 +62,48 @@
<h1 class="lined-header"><span>gun:cancel(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>gun:cancel - Cancel the given stream</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>gun:cancel - Cancel the given stream</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">cancel</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">StreamRef</span>) <span style="color: #990000">-&gt;</span> <span style="color: #FF6600">ok</span>
-
-<span style="color: #009900">ConnPid</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">pid</span></span>()
-<span style="color: #009900">StreamRef</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">reference</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Cancel the given stream.</p></div>
-<div class="paragraph"><p>The behavior of this function depends on the protocol
-selected.</p></div>
-<div class="paragraph"><p>HTTP/1.1 does not support this feature. Gun will simply
-silence the stream and stop relaying messages. Gun may
-also decide to close the connection if the response body
-is too large, to avoid wasting time and bandwidth.</p></div>
-<div class="paragraph"><p>HTTP/2 allows cancelling streams at any time.</p></div>
-<div class="paragraph"><p>This function is asynchronous. Messages related to this
-stream may still be sent after the function returns.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">cancel</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">StreamRef</font>) <font color="#990000">-&gt;</font> <font color="#FF6600">ok</font>
+
+<font color="#009900">ConnPid</font> <font color="#990000">::</font> <b><font color="#000080">pid</font></b>()
+<font color="#009900">StreamRef</font> <font color="#990000">::</font> <b><font color="#000080">reference</font></b>()</tt></pre>
+</div></div>
+<p>Cancel the given stream.</p>
+<p>The behavior of this function depends on the protocol selected.</p>
+<p>HTTP/1.1 does not support this feature. Gun will simply silence the stream and stop relaying messages. Gun may also decide to close the connection if the response body is too large, to avoid wasting time and bandwidth.</p>
+<p>HTTP/2 allows cancelling streams at any time.</p>
+<p>This function is asynchronous. Messages related to this stream may still be sent after the function returns.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-ConnPid
-</dt>
-<dd>
-<p>
-The pid of the Gun connection process.
-</p>
+<dl><dt>ConnPid</dt>
+<dd><p>The pid of the Gun connection process.</p>
</dd>
-<dt class="hdlist1">
-StreamRef
-</dt>
-<dd>
-<p>
-Identifier of the stream for the original request.
-</p>
+<dt>StreamRef</dt>
+<dd><p>Identifier of the stream for the original request.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The atom <code>ok</code> is returned.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The atom <code>ok</code> is returned.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<ul><li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Cancel a stream</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Cancel a stream</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">gun:cancel</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">StreamRef</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">gun:cancel</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">StreamRef</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../gun">gun(3)</a>,
-<a href="../gun.get">gun:get(3)</a>,
-<a href="../gun.head">gun:head(3)</a>,
-<a href="../gun.options">gun:options(3)</a>,
-<a href="../gun.patch">gun:patch(3)</a>,
-<a href="../gun.post">gun:post(3)</a>,
-<a href="../gun.put">gun:put(3)</a>,
-<a href="../gun.delete">gun:delete(3)</a>,
-<a href="../gun.request">gun:request(3)</a></p></div>
-</div>
-</div>
+<p><a href="../gun">gun(3)</a>, <a href="../gun.get">gun:get(3)</a>, <a href="../gun.head">gun:head(3)</a>, <a href="../gun.options">gun:options(3)</a>, <a href="../gun.patch">gun:patch(3)</a>, <a href="../gun.post">gun:post(3)</a>, <a href="../gun.put">gun:put(3)</a>, <a href="../gun.delete">gun:delete(3)</a>, <a href="../gun.request">gun:request(3)</a></p>
+
diff --git a/docs/en/gun/1.0/manual/gun.close/index.html b/docs/en/gun/1.0/manual/gun.close/index.html
index ab536f8d..6c0b82e1 100644
--- a/docs/en/gun/1.0/manual/gun.close/index.html
+++ b/docs/en/gun/1.0/manual/gun.close/index.html
@@ -62,79 +62,40 @@
<h1 class="lined-header"><span>gun:close(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>gun:close - Brutally close the connection</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>gun:close - Brutally close the connection</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">close</span></span>(<span style="color: #009900">ConnPid</span>) <span style="color: #990000">-&gt;</span> <span style="color: #FF6600">ok</span>
+<pre><tt><b><font color="#000000">close</font></b>(<font color="#009900">ConnPid</font>) <font color="#990000">-&gt;</font> <font color="#FF6600">ok</font>
-<span style="color: #009900">ConnPid</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">pid</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Brutally close the connection.</p></div>
-</div>
-</div>
-<div class="sect1">
+<font color="#009900">ConnPid</font> <font color="#990000">::</font> <b><font color="#000080">pid</font></b>()</tt></pre>
+</div></div>
+<p>Brutally close the connection.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-ConnPid
-</dt>
-<dd>
-<p>
-The pid of the Gun connection process.
-</p>
+<dl><dt>ConnPid</dt>
+<dd><p>The pid of the Gun connection process.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The atom <code>ok</code> is returned.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The atom <code>ok</code> is returned.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<ul><li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Close the connection</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Close the connection</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: #0000FF">ok</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">gun:close</span></span>(<span style="color: #009900">ConnPid</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#0000FF">ok</font> <font color="#990000">=</font> <b><font color="#000000">gun:close</font></b>(<font color="#009900">ConnPid</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../gun">gun(3)</a>,
-<a href="../gun.open">gun:open(3)</a>,
-<a href="../gun.open_unix">gun:open_unix(3)</a></p></div>
-</div>
-</div>
+<p><a href="../gun">gun(3)</a>, <a href="../gun.open">gun:open(3)</a>, <a href="../gun.open_unix">gun:open_unix(3)</a></p>
+
diff --git a/docs/en/gun/1.0/manual/gun.data/index.html b/docs/en/gun/1.0/manual/gun.data/index.html
index 8382616e..97b689bd 100644
--- a/docs/en/gun/1.0/manual/gun.data/index.html
+++ b/docs/en/gun/1.0/manual/gun.data/index.html
@@ -62,119 +62,59 @@
<h1 class="lined-header"><span>gun:data(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>gun:data - Stream the body of a request</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>gun:data - Stream the body of a request</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">data</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">StreamRef</span>, <span style="color: #009900">IsFin</span>, <span style="color: #009900">Data</span>) <span style="color: #990000">-&gt;</span> <span style="color: #FF6600">ok</span>
-
-<span style="color: #009900">ConnPid</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">pid</span></span>()
-<span style="color: #009900">StreamRef</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">reference</span></span>()
-<span style="color: #009900">IsFin</span> <span style="color: #990000">::</span> <span style="color: #FF6600">fin</span> | <span style="color: #FF6600">nofin</span>
-<span style="color: #009900">Data</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Stream the body of a request.</p></div>
-<div class="paragraph"><p>This function can only be used if the original request
-had headers indicating that a body would be streamed.</p></div>
-<div class="paragraph"><p>All calls to this function must use the <code>nofin</code> flag
-except for the last which must use <code>fin</code> to indicate
-the end of the request body.</p></div>
-<div class="paragraph"><p>Empty data is allowed regardless of the value of <code>IsFin</code>.
-Gun may or may not send empty data chunks, however.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">data</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">StreamRef</font>, <font color="#009900">IsFin</font>, <font color="#009900">Data</font>) <font color="#990000">-&gt;</font> <font color="#FF6600">ok</font>
+
+<font color="#009900">ConnPid</font> <font color="#990000">::</font> <b><font color="#000080">pid</font></b>()
+<font color="#009900">StreamRef</font> <font color="#990000">::</font> <b><font color="#000080">reference</font></b>()
+<font color="#009900">IsFin</font> <font color="#990000">::</font> <font color="#FF6600">fin</font> | <font color="#FF6600">nofin</font>
+<font color="#009900">Data</font> <font color="#990000">::</font> <b><font color="#000000">iodata</font></b>()</tt></pre>
+</div></div>
+<p>Stream the body of a request.</p>
+<p>This function can only be used if the original request had headers indicating that a body would be streamed.</p>
+<p>All calls to this function must use the <code>nofin</code> flag except for the last which must use <code>fin</code> to indicate the end of the request body.</p>
+<p>Empty data is allowed regardless of the value of <code>IsFin</code>. Gun may or may not send empty data chunks, however.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-ConnPid
-</dt>
-<dd>
-<p>
-The pid of the Gun connection process.
-</p>
+<dl><dt>ConnPid</dt>
+<dd><p>The pid of the Gun connection process.</p>
</dd>
-<dt class="hdlist1">
-StreamRef
-</dt>
-<dd>
-<p>
-Identifier of the stream for the original request.
-</p>
+<dt>StreamRef</dt>
+<dd><p>Identifier of the stream for the original request.</p>
</dd>
-<dt class="hdlist1">
-IsFin
-</dt>
-<dd>
-<p>
-Whether this message terminates the request.
-</p>
+<dt>IsFin</dt>
+<dd><p>Whether this message terminates the request.</p>
</dd>
-<dt class="hdlist1">
-Data
-</dt>
-<dd>
-<p>
-All or part of the response body.
-</p>
+<dt>Data</dt>
+<dd><p>All or part of the response body.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The atom <code>ok</code> is returned.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The atom <code>ok</code> is returned.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<ul><li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Stream the body of a request</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Stream the body of a request</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">StreamRef</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">gun:put</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #FF0000">"/lang/fr_FR/hello"</span>, [
- {<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/plain"</span><span style="color: #990000">&gt;&gt;</span>}
-])<span style="color: #990000">.</span>
-<span style="font-weight: bold"><span style="color: #000000">gun:data</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">StreamRef</span>, <span style="color: #FF6600">nofin</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Bonjour !\n"</span><span style="color: #990000">&gt;&gt;</span>)<span style="color: #990000">.</span>
-<span style="font-weight: bold"><span style="color: #000000">gun:data</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">StreamRef</span>, <span style="color: #FF6600">fin</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Bonsoir !\n"</span><span style="color: #990000">&gt;&gt;</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">StreamRef</font> <font color="#990000">=</font> <b><font color="#000000">gun:put</font></b>(<font color="#009900">ConnPid</font>, <font color="#FF0000">"/lang/fr_FR/hello"</font>, [
+ {<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/plain"</font><font color="#990000">&gt;&gt;</font>}
+])<font color="#990000">.</font>
+<b><font color="#000000">gun:data</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">StreamRef</font>, <font color="#FF6600">nofin</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"Bonjour !\n"</font><font color="#990000">&gt;&gt;</font>)<font color="#990000">.</font>
+<b><font color="#000000">gun:data</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">StreamRef</font>, <font color="#FF6600">fin</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"Bonsoir !\n"</font><font color="#990000">&gt;&gt;</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../gun">gun(3)</a>,
-<a href="../gun.patch">gun:patch(3)</a>,
-<a href="../gun.post">gun:post(3)</a>,
-<a href="../gun.put">gun:put(3)</a>,
-<a href="../gun.request">gun:request(3)</a></p></div>
-</div>
-</div>
+<p><a href="../gun">gun(3)</a>, <a href="../gun.patch">gun:patch(3)</a>, <a href="../gun.post">gun:post(3)</a>, <a href="../gun.put">gun:put(3)</a>, <a href="../gun.request">gun:request(3)</a></p>
+
diff --git a/docs/en/gun/1.0/manual/gun.delete/index.html b/docs/en/gun/1.0/manual/gun.delete/index.html
index 62c25d81..d13544b4 100644
--- a/docs/en/gun/1.0/manual/gun.delete/index.html
+++ b/docs/en/gun/1.0/manual/gun.delete/index.html
@@ -62,130 +62,68 @@
<h1 class="lined-header"><span>gun:delete(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>gun:delete - Delete a resource</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>gun:delete - Delete a resource</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">delete</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">Path</span>)
- <span style="color: #990000">-&gt;</span> <span style="font-weight: bold"><span style="color: #000000">delete</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">Path</span>, [], #{})<span style="color: #990000">.</span>
-
-<span style="font-weight: bold"><span style="color: #000000">delete</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">Path</span>, <span style="color: #009900">Headers</span>)
- <span style="color: #990000">-&gt;</span> <span style="font-weight: bold"><span style="color: #000000">delete</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">Path</span>, <span style="color: #009900">Headers</span>, #{})
-
-<span style="font-weight: bold"><span style="color: #000000">delete</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">Path</span>, <span style="color: #009900">Headers</span>, <span style="color: #009900">ReqOpts</span>)
- <span style="color: #990000">-&gt;</span> <span style="color: #009900">StreamRef</span>
-
-<span style="color: #009900">ConnPid</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">pid</span></span>()
-<span style="color: #009900">Path</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>()
-<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="font-weight: bold"><span style="color: #000000">iodata</span></span>()}]
-<span style="color: #009900">ReqOpts</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">gun:req_opts</span></span>()
-<span style="color: #009900">StreamRef</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">reference</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Delete a resource.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">delete</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">Path</font>)
+ <font color="#990000">-&gt;</font> <b><font color="#000000">delete</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">Path</font>, [], #{})<font color="#990000">.</font>
+
+<b><font color="#000000">delete</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">Path</font>, <font color="#009900">Headers</font>)
+ <font color="#990000">-&gt;</font> <b><font color="#000000">delete</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">Path</font>, <font color="#009900">Headers</font>, #{})
+
+<b><font color="#000000">delete</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">Path</font>, <font color="#009900">Headers</font>, <font color="#009900">ReqOpts</font>)
+ <font color="#990000">-&gt;</font> <font color="#009900">StreamRef</font>
+
+<font color="#009900">ConnPid</font> <font color="#990000">::</font> <b><font color="#000080">pid</font></b>()
+<font color="#009900">Path</font> <font color="#990000">::</font> <b><font color="#000000">iodata</font></b>()
+<font color="#009900">Headers</font> <font color="#990000">::</font> [{<b><font color="#000080">binary</font></b>(), <b><font color="#000000">iodata</font></b>()}]
+<font color="#009900">ReqOpts</font> <font color="#990000">::</font> <b><font color="#000000">gun:req_opts</font></b>()
+<font color="#009900">StreamRef</font> <font color="#990000">::</font> <b><font color="#000080">reference</font></b>()</tt></pre>
+</div></div>
+<p>Delete a resource.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-ConnPid
-</dt>
-<dd>
-<p>
-The pid of the Gun connection process.
-</p>
+<dl><dt>ConnPid</dt>
+<dd><p>The pid of the Gun connection process.</p>
</dd>
-<dt class="hdlist1">
-Path
-</dt>
-<dd>
-<p>
-Path to the resource.
-</p>
+<dt>Path</dt>
+<dd><p>Path to the resource.</p>
</dd>
-<dt class="hdlist1">
-Headers
-</dt>
-<dd>
-<p>
-Additional request headers.
-</p>
+<dt>Headers</dt>
+<dd><p>Additional request headers.</p>
</dd>
-<dt class="hdlist1">
-ReqOpts
-</dt>
-<dd>
-<p>
-Request options.
-</p>
+<dt>ReqOpts</dt>
+<dd><p>Request options.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A reference that identifies the newly created stream is
-returned. It is this reference that must be passed in
-subsequent calls and will be received in messages related
-to this new stream.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>A reference that identifies the newly created stream is returned. It is this reference that must be passed in subsequent calls and will be received in messages related to this new stream.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<ul><li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Delete a resource</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Delete a resource</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">StreamRef</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">gun:delete</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #FF0000">"/drafts/123"</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Delete a resource with request options</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">StreamRef</font> <font color="#990000">=</font> <b><font color="#000000">gun:delete</font></b>(<font color="#009900">ConnPid</font>, <font color="#FF0000">"/drafts/123"</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Delete a resource with request options</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">StreamRef</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">gun:delete</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #FF0000">"/drafts/123"</span>, [],
- #{<span style="color: #0000FF">reply_to</span> <span style="color: #990000">=&gt;</span> <span style="color: #009900">ReplyToPid</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">StreamRef</font> <font color="#990000">=</font> <b><font color="#000000">gun:delete</font></b>(<font color="#009900">ConnPid</font>, <font color="#FF0000">"/drafts/123"</font>, [],
+ #{<font color="#0000FF">reply_to</font> <font color="#990000">=&gt;</font> <font color="#009900">ReplyToPid</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../gun">gun(3)</a>,
-<a href="../gun.put">gun:put(3)</a>,
-<a href="../gun.await">gun:await(3)</a>,
-<a href="../gun.await_body">gun:await_body(3)</a>,
-<a href="../gun_push">gun_push(3)</a>,
-<a href="../gun_inform">gun_inform(3)</a>,
-<a href="../gun_response">gun_response(3)</a>,
-<a href="../gun_data">gun_data(3)</a></p></div>
-</div>
-</div>
+<p><a href="../gun">gun(3)</a>, <a href="../gun.put">gun:put(3)</a>, <a href="../gun.await">gun:await(3)</a>, <a href="../gun.await_body">gun:await_body(3)</a>, <a href="../gun_push">gun_push(3)</a>, <a href="../gun_inform">gun_inform(3)</a>, <a href="../gun_response">gun_response(3)</a>, <a href="../gun_data">gun_data(3)</a></p>
+
diff --git a/docs/en/gun/1.0/manual/gun.flush/index.html b/docs/en/gun/1.0/manual/gun.flush/index.html
index 13263727..43420e8d 100644
--- a/docs/en/gun/1.0/manual/gun.flush/index.html
+++ b/docs/en/gun/1.0/manual/gun.flush/index.html
@@ -62,98 +62,53 @@
<h1 class="lined-header"><span>gun:flush(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>gun:flush - Flush all messages related to a connection or a stream</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>gun:flush - Flush all messages related to a connection or a stream</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">flush</span></span>(<span style="color: #009900">ConnPid</span>) <span style="color: #990000">-&gt;</span> <span style="color: #FF6600">ok</span>
-<span style="font-weight: bold"><span style="color: #000000">flush</span></span>(<span style="color: #009900">StreamRef</span>) <span style="color: #990000">-&gt;</span> <span style="color: #FF6600">ok</span>
+<pre><tt><b><font color="#000000">flush</font></b>(<font color="#009900">ConnPid</font>) <font color="#990000">-&gt;</font> <font color="#FF6600">ok</font>
+<b><font color="#000000">flush</font></b>(<font color="#009900">StreamRef</font>) <font color="#990000">-&gt;</font> <font color="#FF6600">ok</font>
-<span style="color: #009900">ConnPid</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">pid</span></span>()
-<span style="color: #009900">StreamRef</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">reference</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Flush all messages related to a connection or a stream.</p></div>
-</div>
-</div>
-<div class="sect1">
+<font color="#009900">ConnPid</font> <font color="#990000">::</font> <b><font color="#000080">pid</font></b>()
+<font color="#009900">StreamRef</font> <font color="#990000">::</font> <b><font color="#000080">reference</font></b>()</tt></pre>
+</div></div>
+<p>Flush all messages related to a connection or a stream.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Either of these arguments may be provided:</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-ConnPid
-</dt>
-<dd>
-<p>
-The pid of the Gun connection process.
-</p>
+<p>Either of these arguments may be provided:</p>
+<dl><dt>ConnPid</dt>
+<dd><p>The pid of the Gun connection process.</p>
</dd>
-<dt class="hdlist1">
-StreamRef
-</dt>
-<dd>
-<p>
-Identifier of the stream for the original request.
-</p>
+<dt>StreamRef</dt>
+<dd><p>Identifier of the stream for the original request.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The atom <code>ok</code> is returned.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The atom <code>ok</code> is returned.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<ul><li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Flush all messages from a connection</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Flush all messages from a connection</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">gun:flush</span></span>(<span style="color: #009900">ConnPid</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Flush messages from a single stream</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">gun:flush</font></b>(<font color="#009900">ConnPid</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Flush messages from a single stream</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">gun:flush</span></span>(<span style="color: #009900">StreamRef</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">gun:flush</font></b>(<font color="#009900">StreamRef</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../gun">gun(3)</a>,
-<a href="../gun.await">gun:await(3)</a>,
-<a href="../gun.await_body">gun:await_body(3)</a>,
-<a href="../gun.await_up">gun:await_up(3)</a></p></div>
-</div>
-</div>
+<p><a href="../gun">gun(3)</a>, <a href="../gun.await">gun:await(3)</a>, <a href="../gun.await_body">gun:await_body(3)</a>, <a href="../gun.await_up">gun:await_up(3)</a></p>
+
diff --git a/docs/en/gun/1.0/manual/gun.get/index.html b/docs/en/gun/1.0/manual/gun.get/index.html
index a1864b6c..5945cfc9 100644
--- a/docs/en/gun/1.0/manual/gun.get/index.html
+++ b/docs/en/gun/1.0/manual/gun.get/index.html
@@ -62,133 +62,71 @@
<h1 class="lined-header"><span>gun:get(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>gun:get - Get a resource representation</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>gun:get - Get a resource representation</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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: #000080">get</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">Path</span>)
- <span style="color: #990000">-&gt;</span> <span style="font-weight: bold"><span style="color: #000080">get</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">Path</span>, [], #{})<span style="color: #990000">.</span>
-
-<span style="font-weight: bold"><span style="color: #000080">get</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">Path</span>, <span style="color: #009900">Headers</span>)
- <span style="color: #990000">-&gt;</span> <span style="font-weight: bold"><span style="color: #000080">get</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">Path</span>, <span style="color: #009900">Headers</span>, #{})
-
-<span style="font-weight: bold"><span style="color: #000080">get</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">Path</span>, <span style="color: #009900">Headers</span>, <span style="color: #009900">ReqOpts</span>)
- <span style="color: #990000">-&gt;</span> <span style="color: #009900">StreamRef</span>
-
-<span style="color: #009900">ConnPid</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">pid</span></span>()
-<span style="color: #009900">Path</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>()
-<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="font-weight: bold"><span style="color: #000000">iodata</span></span>()}]
-<span style="color: #009900">ReqOpts</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">gun:req_opts</span></span>()
-<span style="color: #009900">StreamRef</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">reference</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Get a resource representation.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000080">get</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">Path</font>)
+ <font color="#990000">-&gt;</font> <b><font color="#000080">get</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">Path</font>, [], #{})<font color="#990000">.</font>
+
+<b><font color="#000080">get</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">Path</font>, <font color="#009900">Headers</font>)
+ <font color="#990000">-&gt;</font> <b><font color="#000080">get</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">Path</font>, <font color="#009900">Headers</font>, #{})
+
+<b><font color="#000080">get</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">Path</font>, <font color="#009900">Headers</font>, <font color="#009900">ReqOpts</font>)
+ <font color="#990000">-&gt;</font> <font color="#009900">StreamRef</font>
+
+<font color="#009900">ConnPid</font> <font color="#990000">::</font> <b><font color="#000080">pid</font></b>()
+<font color="#009900">Path</font> <font color="#990000">::</font> <b><font color="#000000">iodata</font></b>()
+<font color="#009900">Headers</font> <font color="#990000">::</font> [{<b><font color="#000080">binary</font></b>(), <b><font color="#000000">iodata</font></b>()}]
+<font color="#009900">ReqOpts</font> <font color="#990000">::</font> <b><font color="#000000">gun:req_opts</font></b>()
+<font color="#009900">StreamRef</font> <font color="#990000">::</font> <b><font color="#000080">reference</font></b>()</tt></pre>
+</div></div>
+<p>Get a resource representation.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-ConnPid
-</dt>
-<dd>
-<p>
-The pid of the Gun connection process.
-</p>
+<dl><dt>ConnPid</dt>
+<dd><p>The pid of the Gun connection process.</p>
</dd>
-<dt class="hdlist1">
-Path
-</dt>
-<dd>
-<p>
-Path to the resource.
-</p>
+<dt>Path</dt>
+<dd><p>Path to the resource.</p>
</dd>
-<dt class="hdlist1">
-Headers
-</dt>
-<dd>
-<p>
-Additional request headers.
-</p>
+<dt>Headers</dt>
+<dd><p>Additional request headers.</p>
</dd>
-<dt class="hdlist1">
-ReqOpts
-</dt>
-<dd>
-<p>
-Request options.
-</p>
+<dt>ReqOpts</dt>
+<dd><p>Request options.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A reference that identifies the newly created stream is
-returned. It is this reference that must be passed in
-subsequent calls and will be received in messages related
-to this new stream.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>A reference that identifies the newly created stream is returned. It is this reference that must be passed in subsequent calls and will be received in messages related to this new stream.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<ul><li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Get a resource representation</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Get a resource representation</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">StreamRef</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">gun:get</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #FF0000">"/articles"</span>, [
- {<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"accept"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/html;q=1.0, application/xml;q=0.1"</span><span style="color: #990000">&gt;&gt;</span>}
-])<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Get a resource representation with request options</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">StreamRef</font> <font color="#990000">=</font> <b><font color="#000000">gun:get</font></b>(<font color="#009900">ConnPid</font>, <font color="#FF0000">"/articles"</font>, [
+ {<font color="#990000">&lt;&lt;</font><font color="#FF0000">"accept"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/html;q=1.0, application/xml;q=0.1"</font><font color="#990000">&gt;&gt;</font>}
+])<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Get a resource representation with request options</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">StreamRef</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">gun:get</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #FF0000">"/articles"</span>, [], #{
- <span style="color: #0000FF">reply_to</span> <span style="color: #990000">=&gt;</span> <span style="color: #009900">ReplyToPid</span>
-})<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">StreamRef</font> <font color="#990000">=</font> <b><font color="#000000">gun:get</font></b>(<font color="#009900">ConnPid</font>, <font color="#FF0000">"/articles"</font>, [], #{
+ <font color="#0000FF">reply_to</font> <font color="#990000">=&gt;</font> <font color="#009900">ReplyToPid</font>
+})<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../gun">gun(3)</a>,
-<a href="../gun.head">gun:head(3)</a>,
-<a href="../gun.await">gun:await(3)</a>,
-<a href="../gun.await_body">gun:await_body(3)</a>,
-<a href="../gun_push">gun_push(3)</a>,
-<a href="../gun_inform">gun_inform(3)</a>,
-<a href="../gun_response">gun_response(3)</a>,
-<a href="../gun_data">gun_data(3)</a></p></div>
-</div>
-</div>
+<p><a href="../gun">gun(3)</a>, <a href="../gun.head">gun:head(3)</a>, <a href="../gun.await">gun:await(3)</a>, <a href="../gun.await_body">gun:await_body(3)</a>, <a href="../gun_push">gun_push(3)</a>, <a href="../gun_inform">gun_inform(3)</a>, <a href="../gun_response">gun_response(3)</a>, <a href="../gun_data">gun_data(3)</a></p>
+
diff --git a/docs/en/gun/1.0/manual/gun.head/index.html b/docs/en/gun/1.0/manual/gun.head/index.html
index 8afd0163..1341d833 100644
--- a/docs/en/gun/1.0/manual/gun.head/index.html
+++ b/docs/en/gun/1.0/manual/gun.head/index.html
@@ -62,138 +62,73 @@
<h1 class="lined-header"><span>gun:head(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>gun:head - Get headers of a resource representation</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>gun:head - Get headers of a resource representation</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">head</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">Path</span>)
- <span style="color: #990000">-&gt;</span> <span style="font-weight: bold"><span style="color: #000000">head</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">Path</span>, [], #{})<span style="color: #990000">.</span>
-
-<span style="font-weight: bold"><span style="color: #000000">head</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">Path</span>, <span style="color: #009900">Headers</span>)
- <span style="color: #990000">-&gt;</span> <span style="font-weight: bold"><span style="color: #000000">head</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">Path</span>, <span style="color: #009900">Headers</span>, #{})
-
-<span style="font-weight: bold"><span style="color: #000000">head</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">Path</span>, <span style="color: #009900">Headers</span>, <span style="color: #009900">ReqOpts</span>)
- <span style="color: #990000">-&gt;</span> <span style="color: #009900">StreamRef</span>
-
-<span style="color: #009900">ConnPid</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">pid</span></span>()
-<span style="color: #009900">Path</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>()
-<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="font-weight: bold"><span style="color: #000000">iodata</span></span>()}]
-<span style="color: #009900">ReqOpts</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">gun:req_opts</span></span>()
-<span style="color: #009900">StreamRef</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">reference</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Get headers of a resource representation.</p></div>
-<div class="paragraph"><p>This function performs the same operation as
-<a href="../gun.get">gun:get(3)</a>, except the server will not
-send the resource representation, only the response&#8217;s status
-code and headers.</p></div>
-<div class="paragraph"><p>While servers are supposed to send the same headers as for
-a GET request, they sometimes will not. For example the
-<code>content-length</code> header may be dropped from the response.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">head</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">Path</font>)
+ <font color="#990000">-&gt;</font> <b><font color="#000000">head</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">Path</font>, [], #{})<font color="#990000">.</font>
+
+<b><font color="#000000">head</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">Path</font>, <font color="#009900">Headers</font>)
+ <font color="#990000">-&gt;</font> <b><font color="#000000">head</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">Path</font>, <font color="#009900">Headers</font>, #{})
+
+<b><font color="#000000">head</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">Path</font>, <font color="#009900">Headers</font>, <font color="#009900">ReqOpts</font>)
+ <font color="#990000">-&gt;</font> <font color="#009900">StreamRef</font>
+
+<font color="#009900">ConnPid</font> <font color="#990000">::</font> <b><font color="#000080">pid</font></b>()
+<font color="#009900">Path</font> <font color="#990000">::</font> <b><font color="#000000">iodata</font></b>()
+<font color="#009900">Headers</font> <font color="#990000">::</font> [{<b><font color="#000080">binary</font></b>(), <b><font color="#000000">iodata</font></b>()}]
+<font color="#009900">ReqOpts</font> <font color="#990000">::</font> <b><font color="#000000">gun:req_opts</font></b>()
+<font color="#009900">StreamRef</font> <font color="#990000">::</font> <b><font color="#000080">reference</font></b>()</tt></pre>
+</div></div>
+<p>Get headers of a resource representation.</p>
+<p>This function performs the same operation as <a href="../gun.get">gun:get(3)</a>, except the server will not send the resource representation, only the response&apos;s status code and headers.</p>
+<p>While servers are supposed to send the same headers as for a GET request, they sometimes will not. For example the <code>content-length</code> header may be dropped from the response.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-ConnPid
-</dt>
-<dd>
-<p>
-The pid of the Gun connection process.
-</p>
+<dl><dt>ConnPid</dt>
+<dd><p>The pid of the Gun connection process.</p>
</dd>
-<dt class="hdlist1">
-Path
-</dt>
-<dd>
-<p>
-Path to the resource.
-</p>
+<dt>Path</dt>
+<dd><p>Path to the resource.</p>
</dd>
-<dt class="hdlist1">
-Headers
-</dt>
-<dd>
-<p>
-Additional request headers.
-</p>
+<dt>Headers</dt>
+<dd><p>Additional request headers.</p>
</dd>
-<dt class="hdlist1">
-ReqOpts
-</dt>
-<dd>
-<p>
-Request options.
-</p>
+<dt>ReqOpts</dt>
+<dd><p>Request options.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A reference that identifies the newly created stream is
-returned. It is this reference that must be passed in
-subsequent calls and will be received in messages related
-to this new stream.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>A reference that identifies the newly created stream is returned. It is this reference that must be passed in subsequent calls and will be received in messages related to this new stream.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<ul><li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Get headers of a resource representation</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Get headers of a resource representation</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">StreamRef</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">gun:head</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #FF0000">"/articles"</span>, [
- {<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"accept"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/html;q=1.0, application/xml;q=0.1"</span><span style="color: #990000">&gt;&gt;</span>}
-])<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Get headers of a resource representation with request options</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">StreamRef</font> <font color="#990000">=</font> <b><font color="#000000">gun:head</font></b>(<font color="#009900">ConnPid</font>, <font color="#FF0000">"/articles"</font>, [
+ {<font color="#990000">&lt;&lt;</font><font color="#FF0000">"accept"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/html;q=1.0, application/xml;q=0.1"</font><font color="#990000">&gt;&gt;</font>}
+])<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Get headers of a resource representation with request options</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">StreamRef</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">gun:head</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #FF0000">"/articles"</span>, [], #{
- <span style="color: #0000FF">reply_to</span> <span style="color: #990000">=&gt;</span> <span style="color: #009900">ReplyToPid</span>
-})<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">StreamRef</font> <font color="#990000">=</font> <b><font color="#000000">gun:head</font></b>(<font color="#009900">ConnPid</font>, <font color="#FF0000">"/articles"</font>, [], #{
+ <font color="#0000FF">reply_to</font> <font color="#990000">=&gt;</font> <font color="#009900">ReplyToPid</font>
+})<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../gun">gun(3)</a>,
-<a href="../gun.get">gun:head(3)</a>,
-<a href="../gun.await">gun:await(3)</a>,
-<a href="../gun_push">gun_push(3)</a>,
-<a href="../gun_inform">gun_inform(3)</a>,
-<a href="../gun_response">gun_response(3)</a></p></div>
-</div>
-</div>
+<p><a href="../gun">gun(3)</a>, <a href="../gun.get">gun:head(3)</a>, <a href="../gun.await">gun:await(3)</a>, <a href="../gun_push">gun_push(3)</a>, <a href="../gun_inform">gun_inform(3)</a>, <a href="../gun_response">gun_response(3)</a></p>
+
diff --git a/docs/en/gun/1.0/manual/gun.info/index.html b/docs/en/gun/1.0/manual/gun.info/index.html
index 7b94f600..2206a94e 100644
--- a/docs/en/gun/1.0/manual/gun.info/index.html
+++ b/docs/en/gun/1.0/manual/gun.info/index.html
@@ -62,84 +62,44 @@
<h1 class="lined-header"><span>gun:info(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>gun:info - Obtain information about the connection</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>gun:info - Obtain information about the connection</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">info</span></span>(<span style="color: #009900">ConnPid</span>) <span style="color: #990000">-&gt;</span> <span style="color: #009900">Info</span>
-
-<span style="color: #009900">ConnPid</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">pid</span></span>()
-<span style="color: #009900">Info</span> <span style="color: #990000">::</span> #{
- <span style="color: #0000FF">sock_ip</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">inet:ip_address</span></span>(),
- <span style="color: #0000FF">sock_port</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">inet:port_number</span></span>()
-}</tt></pre></div></div>
-<div class="paragraph"><p>Obtain information about the connection.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">info</font></b>(<font color="#009900">ConnPid</font>) <font color="#990000">-&gt;</font> <font color="#009900">Info</font>
+
+<font color="#009900">ConnPid</font> <font color="#990000">::</font> <b><font color="#000080">pid</font></b>()
+<font color="#009900">Info</font> <font color="#990000">::</font> #{
+ <font color="#0000FF">sock_ip</font> <font color="#990000">=&gt;</font> <b><font color="#000000">inet:ip_address</font></b>(),
+ <font color="#0000FF">sock_port</font> <font color="#990000">=&gt;</font> <b><font color="#000000">inet:port_number</font></b>()
+}</tt></pre>
+</div></div>
+<p>Obtain information about the connection.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-ConnPid
-</dt>
-<dd>
-<p>
-The pid of the Gun connection process.
-</p>
+<dl><dt>ConnPid</dt>
+<dd><p>The pid of the Gun connection process.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A map is returned containing various informations about
-the connection.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>A map is returned containing various informations about the connection.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<ul><li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Obtain information about the connection</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Obtain information about the connection</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">Info</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">gun:info</span></span>(<span style="color: #009900">ConnPid</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Info</font> <font color="#990000">=</font> <b><font color="#000000">gun:info</font></b>(<font color="#009900">ConnPid</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../gun">gun(3)</a>,
-<a href="../gun.open">gun:open(3)</a>,
-<a href="../gun.open_unix">gun:open_unix(3)</a></p></div>
-</div>
-</div>
+<p><a href="../gun">gun(3)</a>, <a href="../gun.open">gun:open(3)</a>, <a href="../gun.open_unix">gun:open_unix(3)</a></p>
+
diff --git a/docs/en/gun/1.0/manual/gun.open/index.html b/docs/en/gun/1.0/manual/gun.open/index.html
index 2f1548fe..86cb145b 100644
--- a/docs/en/gun/1.0/manual/gun.open/index.html
+++ b/docs/en/gun/1.0/manual/gun.open/index.html
@@ -62,117 +62,64 @@
<h1 class="lined-header"><span>gun:open(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>gun:open - Open a connection to the given host and port</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>gun:open - Open a connection to the given host and port</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">open</span></span>(<span style="color: #009900">Host</span>, <span style="color: #009900">Port</span>) <span style="color: #990000">-&gt;</span> <span style="font-weight: bold"><span style="color: #000000">open</span></span>(<span style="color: #009900">Host</span>, <span style="color: #009900">Port</span>, #{})
-<span style="font-weight: bold"><span style="color: #000000">open</span></span>(<span style="color: #009900">Host</span>, <span style="color: #009900">Port</span>, <span style="color: #009900">Opts</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #FF6600">ok</span>, <span style="font-weight: bold"><span style="color: #000080">pid</span></span>()} | {<span style="color: #FF6600">error</span>, <span style="font-weight: bold"><span style="color: #000000">any</span></span>()}
-
-<span style="color: #009900">Host</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">inet:hostname</span></span>() | <span style="font-weight: bold"><span style="color: #000000">inet:ip_address</span></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>()
-<span style="color: #009900">Opts</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">gun:opts</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Open a connection to the given host and port.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">open</font></b>(<font color="#009900">Host</font>, <font color="#009900">Port</font>) <font color="#990000">-&gt;</font> <b><font color="#000000">open</font></b>(<font color="#009900">Host</font>, <font color="#009900">Port</font>, #{})
+<b><font color="#000000">open</font></b>(<font color="#009900">Host</font>, <font color="#009900">Port</font>, <font color="#009900">Opts</font>) <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <b><font color="#000080">pid</font></b>()} | {<font color="#FF6600">error</font>, <b><font color="#000000">any</font></b>()}
+
+<font color="#009900">Host</font> <font color="#990000">::</font> <b><font color="#000000">inet:hostname</font></b>() | <b><font color="#000000">inet:ip_address</font></b>()
+<font color="#009900">Port</font> <font color="#990000">::</font> <b><font color="#000000">inet:port_number</font></b>()
+<font color="#009900">Opts</font> <font color="#990000">::</font> <b><font color="#000000">gun:opts</font></b>()</tt></pre>
+</div></div>
+<p>Open a connection to the given host and port.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Host
-</dt>
-<dd>
-<p>
-Host or IP address to connect to.
-</p>
+<dl><dt>Host</dt>
+<dd><p>Host or IP address to connect to.</p>
</dd>
-<dt class="hdlist1">
-Port
-</dt>
-<dd>
-<p>
-Port to connect to.
-</p>
+<dt>Port</dt>
+<dd><p>Port to connect to.</p>
</dd>
-<dt class="hdlist1">
-Opts
-</dt>
-<dd>
-<p>
-Options for this connection.
-</p>
+<dt>Opts</dt>
+<dd><p>Options for this connection.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The pid of the newly created Gun process is returned.
-Note that this does not indicate that the connection
-has been successfully opened; the <a href="../gun_up">gun_up(3)</a>
-message will be sent for that.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The pid of the newly created Gun process is returned. Note that this does not indicate that the connection has been successfully opened; the <a href="../gun_up">gun_up(3)</a> message will be sent for that.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<ul><li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Connect to a server</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Connect to a server</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: #FF6600">ok</span>, <span style="color: #009900">ConnPid</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">gun:open</span></span>(<span style="color: #FF0000">"example.org"</span>, <span style="color: #993399">443</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Connect to a server with custom options</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#009900">ConnPid</font>} <font color="#990000">=</font> <b><font color="#000000">gun:open</font></b>(<font color="#FF0000">"example.org"</font>, <font color="#993399">443</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Connect to a server with custom options</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: #FF6600">ok</span>, <span style="color: #009900">ConnPid</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">gun:open</span></span>(<span style="color: #FF0000">"example.org"</span>, <span style="color: #993399">443</span>,
- #{<span style="color: #0000FF">protocols</span> <span style="color: #990000">=&gt;</span> [<span style="color: #FF6600">http2</span>]})<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Connect to a server using its IP address</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#009900">ConnPid</font>} <font color="#990000">=</font> <b><font color="#000000">gun:open</font></b>(<font color="#FF0000">"example.org"</font>, <font color="#993399">443</font>,
+ #{<font color="#0000FF">protocols</font> <font color="#990000">=&gt;</font> [<font color="#FF6600">http2</font>]})<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Connect to a server using its IP address</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: #FF6600">ok</span>, <span style="color: #009900">ConnPid</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">gun:open</span></span>({<span style="color: #993399">127</span>,<span style="color: #993399">0</span>,<span style="color: #993399">0</span>,<span style="color: #993399">1</span>}, <span style="color: #993399">443</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#009900">ConnPid</font>} <font color="#990000">=</font> <b><font color="#000000">gun:open</font></b>({<font color="#993399">127</font>,<font color="#993399">0</font>,<font color="#993399">0</font>,<font color="#993399">1</font>}, <font color="#993399">443</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../gun">gun(3)</a>,
-<a href="../gun.open_unix">gun:open_unix(3)</a>,
-<a href="../gun.await_up">gun:await_up(3)</a>,
-<a href="../gun_up">gun_up(3)</a></p></div>
-</div>
-</div>
+<p><a href="../gun">gun(3)</a>, <a href="../gun.open_unix">gun:open_unix(3)</a>, <a href="../gun.await_up">gun:await_up(3)</a>, <a href="../gun_up">gun_up(3)</a></p>
+
diff --git a/docs/en/gun/1.0/manual/gun.open_unix/index.html b/docs/en/gun/1.0/manual/gun.open_unix/index.html
index 96253f64..60b9c630 100644
--- a/docs/en/gun/1.0/manual/gun.open_unix/index.html
+++ b/docs/en/gun/1.0/manual/gun.open_unix/index.html
@@ -62,100 +62,52 @@
<h1 class="lined-header"><span>gun:open_unix(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>gun:open_unix - Open a connection to the given Unix domain socket</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>gun:open_unix - Open a connection to the given Unix domain socket</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">open_unix</span></span>(<span style="color: #009900">SocketPath</span>, <span style="color: #009900">Opts</span>) <span style="color: #990000">-&gt;</span> {<span style="color: #FF6600">ok</span>, <span style="font-weight: bold"><span style="color: #000080">pid</span></span>()} | {<span style="color: #FF6600">error</span>, <span style="font-weight: bold"><span style="color: #000000">any</span></span>()}
+<pre><tt><b><font color="#000000">open_unix</font></b>(<font color="#009900">SocketPath</font>, <font color="#009900">Opts</font>) <font color="#990000">-&gt;</font> {<font color="#FF6600">ok</font>, <b><font color="#000080">pid</font></b>()} | {<font color="#FF6600">error</font>, <b><font color="#000000">any</font></b>()}
-<span style="color: #009900">SocketPath</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">string</span></span>()
-<span style="color: #009900">Opts</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">gun:opts</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Open a connection to the given Unix domain socket.</p></div>
-</div>
-</div>
-<div class="sect1">
+<font color="#009900">SocketPath</font> <font color="#990000">::</font> <b><font color="#000000">string</font></b>()
+<font color="#009900">Opts</font> <font color="#990000">::</font> <b><font color="#000000">gun:opts</font></b>()</tt></pre>
+</div></div>
+<p>Open a connection to the given Unix domain socket.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-SocketPath
-</dt>
-<dd>
-<p>
-Path to the Unix domain socket to connect to.
-</p>
+<dl><dt>SocketPath</dt>
+<dd><p>Path to the Unix domain socket to connect to.</p>
</dd>
-<dt class="hdlist1">
-Opts
-</dt>
-<dd>
-<p>
-Options for this connection.
-</p>
+<dt>Opts</dt>
+<dd><p>Options for this connection.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The pid of the newly created Gun process is returned.
-Note that this does not indicate that the connection
-has been successfully opened; the <a href="../gun_up">gun_up(3)</a>
-message will be sent for that.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The pid of the newly created Gun process is returned. Note that this does not indicate that the connection has been successfully opened; the <a href="../gun_up">gun_up(3)</a> message will be sent for that.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<ul><li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Connect to a server via a Unix domain socket</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Connect to a server via a Unix domain socket</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: #FF6600">ok</span>, <span style="color: #009900">ConnPid</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">gun:open_unix</span></span>(<span style="color: #FF0000">"/var/run/dbus/system_bus_socket"</span>, #{})<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Connect to a server via a Unix domain socket with custom options</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#009900">ConnPid</font>} <font color="#990000">=</font> <b><font color="#000000">gun:open_unix</font></b>(<font color="#FF0000">"/var/run/dbus/system_bus_socket"</font>, #{})<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Connect to a server via a Unix domain socket with custom options</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: #FF6600">ok</span>, <span style="color: #009900">ConnPid</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">gun:open_unix</span></span>(<span style="color: #FF0000">"/var/run/dbus/system_bus_socket"</span>,
- #{<span style="color: #0000FF">protocols</span> <span style="color: #990000">=&gt;</span> [<span style="color: #FF6600">http2</span>]})<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#009900">ConnPid</font>} <font color="#990000">=</font> <b><font color="#000000">gun:open_unix</font></b>(<font color="#FF0000">"/var/run/dbus/system_bus_socket"</font>,
+ #{<font color="#0000FF">protocols</font> <font color="#990000">=&gt;</font> [<font color="#FF6600">http2</font>]})<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../gun">gun(3)</a>,
-<a href="../gun.open">gun:open(3)</a>,
-<a href="../gun.await_up">gun:await_up(3)</a>,
-<a href="../gun_up">gun_up(3)</a></p></div>
-</div>
-</div>
+<p><a href="../gun">gun(3)</a>, <a href="../gun.open">gun:open(3)</a>, <a href="../gun.await_up">gun:await_up(3)</a>, <a href="../gun_up">gun_up(3)</a></p>
+
diff --git a/docs/en/gun/1.0/manual/gun.options/index.html b/docs/en/gun/1.0/manual/gun.options/index.html
index 4a3c50aa..e2bcb8be 100644
--- a/docs/en/gun/1.0/manual/gun.options/index.html
+++ b/docs/en/gun/1.0/manual/gun.options/index.html
@@ -62,130 +62,68 @@
<h1 class="lined-header"><span>gun:options(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>gun:options - Query the capabilities of the server or a resource</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>gun:options - Query the capabilities of the server or a resource</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">options</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">Path</span>)
- <span style="color: #990000">-&gt;</span> <span style="font-weight: bold"><span style="color: #000000">options</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">Path</span>, [], #{})<span style="color: #990000">.</span>
-
-<span style="font-weight: bold"><span style="color: #000000">options</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">Path</span>, <span style="color: #009900">Headers</span>)
- <span style="color: #990000">-&gt;</span> <span style="font-weight: bold"><span style="color: #000000">options</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">Path</span>, <span style="color: #009900">Headers</span>, #{})
-
-<span style="font-weight: bold"><span style="color: #000000">options</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">Path</span>, <span style="color: #009900">Headers</span>, <span style="color: #009900">ReqOpts</span>)
- <span style="color: #990000">-&gt;</span> <span style="color: #009900">StreamRef</span>
-
-<span style="color: #009900">ConnPid</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">pid</span></span>()
-<span style="color: #009900">Path</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>()
-<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="font-weight: bold"><span style="color: #000000">iodata</span></span>()}]
-<span style="color: #009900">ReqOpts</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">gun:req_opts</span></span>()
-<span style="color: #009900">StreamRef</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">reference</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Query the capabilities of the server or a resource.</p></div>
-<div class="paragraph"><p>The special path <code>"*"</code> can be used to obtain information about
-the server as a whole. Any other path will return information
-about that resource specifically.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">options</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">Path</font>)
+ <font color="#990000">-&gt;</font> <b><font color="#000000">options</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">Path</font>, [], #{})<font color="#990000">.</font>
+
+<b><font color="#000000">options</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">Path</font>, <font color="#009900">Headers</font>)
+ <font color="#990000">-&gt;</font> <b><font color="#000000">options</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">Path</font>, <font color="#009900">Headers</font>, #{})
+
+<b><font color="#000000">options</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">Path</font>, <font color="#009900">Headers</font>, <font color="#009900">ReqOpts</font>)
+ <font color="#990000">-&gt;</font> <font color="#009900">StreamRef</font>
+
+<font color="#009900">ConnPid</font> <font color="#990000">::</font> <b><font color="#000080">pid</font></b>()
+<font color="#009900">Path</font> <font color="#990000">::</font> <b><font color="#000000">iodata</font></b>()
+<font color="#009900">Headers</font> <font color="#990000">::</font> [{<b><font color="#000080">binary</font></b>(), <b><font color="#000000">iodata</font></b>()}]
+<font color="#009900">ReqOpts</font> <font color="#990000">::</font> <b><font color="#000000">gun:req_opts</font></b>()
+<font color="#009900">StreamRef</font> <font color="#990000">::</font> <b><font color="#000080">reference</font></b>()</tt></pre>
+</div></div>
+<p>Query the capabilities of the server or a resource.</p>
+<p>The special path <code>&quot;*&quot;</code> can be used to obtain information about the server as a whole. Any other path will return information about that resource specifically.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-ConnPid
-</dt>
-<dd>
-<p>
-The pid of the Gun connection process.
-</p>
+<dl><dt>ConnPid</dt>
+<dd><p>The pid of the Gun connection process.</p>
</dd>
-<dt class="hdlist1">
-Path
-</dt>
-<dd>
-<p>
-Path to the resource.
-</p>
+<dt>Path</dt>
+<dd><p>Path to the resource.</p>
</dd>
-<dt class="hdlist1">
-Headers
-</dt>
-<dd>
-<p>
-Additional request headers.
-</p>
+<dt>Headers</dt>
+<dd><p>Additional request headers.</p>
</dd>
-<dt class="hdlist1">
-ReqOpts
-</dt>
-<dd>
-<p>
-Request options.
-</p>
+<dt>ReqOpts</dt>
+<dd><p>Request options.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A reference that identifies the newly created stream is
-returned. It is this reference that must be passed in
-subsequent calls and will be received in messages related
-to this new stream.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>A reference that identifies the newly created stream is returned. It is this reference that must be passed in subsequent calls and will be received in messages related to this new stream.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<ul><li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Query the capabilities of the server</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Query the capabilities of the server</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">StreamRef</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">gun:options</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #FF0000">"*"</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Query the capabilities of a resource</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">StreamRef</font> <font color="#990000">=</font> <b><font color="#000000">gun:options</font></b>(<font color="#009900">ConnPid</font>, <font color="#FF0000">"*"</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Query the capabilities of a resource</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">StreamRef</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">gun:options</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #FF0000">"/articles"</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">StreamRef</font> <font color="#990000">=</font> <b><font color="#000000">gun:options</font></b>(<font color="#009900">ConnPid</font>, <font color="#FF0000">"/articles"</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../gun">gun(3)</a>,
-<a href="../gun.await">gun:await(3)</a>,
-<a href="../gun.await_body">gun:await_body(3)</a>,
-<a href="../gun_inform">gun_inform(3)</a>,
-<a href="../gun_response">gun_response(3)</a>,
-<a href="../gun_data">gun_data(3)</a></p></div>
-</div>
-</div>
+<p><a href="../gun">gun(3)</a>, <a href="../gun.await">gun:await(3)</a>, <a href="../gun.await_body">gun:await_body(3)</a>, <a href="../gun_inform">gun_inform(3)</a>, <a href="../gun_response">gun_response(3)</a>, <a href="../gun_data">gun_data(3)</a></p>
+
diff --git a/docs/en/gun/1.0/manual/gun.patch/index.html b/docs/en/gun/1.0/manual/gun.patch/index.html
index 54ab78b4..00befe21 100644
--- a/docs/en/gun/1.0/manual/gun.patch/index.html
+++ b/docs/en/gun/1.0/manual/gun.patch/index.html
@@ -62,168 +62,91 @@
<h1 class="lined-header"><span>gun:patch(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>gun:patch - Apply a set of changes to a resource</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>gun:patch - Apply a set of changes to a resource</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">patch</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">Path</span>, <span style="color: #009900">Headers</span>)
- <span style="color: #990000">-&gt;</span> <span style="color: #009900">StreamRef</span>
-
-<span style="font-weight: bold"><span style="color: #000000">patch</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">Path</span>, <span style="color: #009900">Headers</span>, <span style="color: #009900">Body</span>)
- <span style="color: #990000">-&gt;</span> <span style="font-weight: bold"><span style="color: #000000">patch</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">Path</span>, <span style="color: #009900">Headers</span>, <span style="color: #009900">Body</span>, #{})
-
-<span style="font-weight: bold"><span style="color: #000000">patch</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">Path</span>, <span style="color: #009900">Headers</span>, <span style="color: #009900">Body</span>, <span style="color: #009900">ReqOpts</span>)
- <span style="color: #990000">-&gt;</span> <span style="color: #009900">StreamRef</span>
-
-<span style="color: #009900">ConnPid</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">pid</span></span>()
-<span style="color: #009900">Path</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>()
-<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="font-weight: bold"><span style="color: #000000">iodata</span></span>()}]
-<span style="color: #009900">Body</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>()
-<span style="color: #009900">ReqOpts</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">gun:req_opts</span></span>()
-<span style="color: #009900">StreamRef</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">reference</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Apply a set of changes to a resource.</p></div>
-<div class="paragraph"><p>The behavior of this function varies depending on whether
-a body is provided.</p></div>
-<div class="paragraph"><p>The function <code>patch/3</code> expects either a content-length
-or content-type header to indicate that a body will be
-sent afterwards. The body can then be sent using
-<a href="../gun.data">gun:data(3)</a>.</p></div>
-<div class="paragraph"><p>The function <code>patch/4,5</code> sends the entire request, including
-the request body, immediately. It is therefore not possible
-to use <a href="../gun.data">gun:data(3)</a> after that. You
-should provide a content-type header. Gun will set the
-content-length header automatically.</p></div>
-<div class="paragraph"><p>The body sent in this request should be a patch document
-with instructions on how to update the resource.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">patch</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">Path</font>, <font color="#009900">Headers</font>)
+ <font color="#990000">-&gt;</font> <font color="#009900">StreamRef</font>
+
+<b><font color="#000000">patch</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">Path</font>, <font color="#009900">Headers</font>, <font color="#009900">Body</font>)
+ <font color="#990000">-&gt;</font> <b><font color="#000000">patch</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">Path</font>, <font color="#009900">Headers</font>, <font color="#009900">Body</font>, #{})
+
+<b><font color="#000000">patch</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">Path</font>, <font color="#009900">Headers</font>, <font color="#009900">Body</font>, <font color="#009900">ReqOpts</font>)
+ <font color="#990000">-&gt;</font> <font color="#009900">StreamRef</font>
+
+<font color="#009900">ConnPid</font> <font color="#990000">::</font> <b><font color="#000080">pid</font></b>()
+<font color="#009900">Path</font> <font color="#990000">::</font> <b><font color="#000000">iodata</font></b>()
+<font color="#009900">Headers</font> <font color="#990000">::</font> [{<b><font color="#000080">binary</font></b>(), <b><font color="#000000">iodata</font></b>()}]
+<font color="#009900">Body</font> <font color="#990000">::</font> <b><font color="#000000">iodata</font></b>()
+<font color="#009900">ReqOpts</font> <font color="#990000">::</font> <b><font color="#000000">gun:req_opts</font></b>()
+<font color="#009900">StreamRef</font> <font color="#990000">::</font> <b><font color="#000080">reference</font></b>()</tt></pre>
+</div></div>
+<p>Apply a set of changes to a resource.</p>
+<p>The behavior of this function varies depending on whether a body is provided.</p>
+<p>The function <code>patch/3</code> expects either a content-length or content-type header to indicate that a body will be sent afterwards. The body can then be sent using <a href="../gun.data">gun:data(3)</a>.</p>
+<p>The function <code>patch/4,5</code> sends the entire request, including the request body, immediately. It is therefore not possible to use <a href="../gun.data">gun:data(3)</a> after that. You should provide a content-type header. Gun will set the content-length header automatically.</p>
+<p>The body sent in this request should be a patch document with instructions on how to update the resource.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-ConnPid
-</dt>
-<dd>
-<p>
-The pid of the Gun connection process.
-</p>
+<dl><dt>ConnPid</dt>
+<dd><p>The pid of the Gun connection process.</p>
</dd>
-<dt class="hdlist1">
-Path
-</dt>
-<dd>
-<p>
-Path to the resource.
-</p>
+<dt>Path</dt>
+<dd><p>Path to the resource.</p>
</dd>
-<dt class="hdlist1">
-Headers
-</dt>
-<dd>
-<p>
-Additional request headers.
-</p>
+<dt>Headers</dt>
+<dd><p>Additional request headers.</p>
</dd>
-<dt class="hdlist1">
-Body
-</dt>
-<dd>
-<p>
-Request body.
-</p>
+<dt>Body</dt>
+<dd><p>Request body.</p>
</dd>
-<dt class="hdlist1">
-ReqOpts
-</dt>
-<dd>
-<p>
-Request options.
-</p>
+<dt>ReqOpts</dt>
+<dd><p>Request options.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A reference that identifies the newly created stream is
-returned. It is this reference that must be passed in
-subsequent calls and will be received in messages related
-to this new stream.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>A reference that identifies the newly created stream is returned. It is this reference that must be passed in subsequent calls and will be received in messages related to this new stream.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<ul><li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Patch a resource</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Patch a resource</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">StreamRef</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">gun:patch</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #FF0000">"/users/1"</span>,
- [{<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"application/json-patch+json"</span><span style="color: #990000">&gt;&gt;</span>}],
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"[{\"op\":\"add\",\"path\":\"/baz\",\"value\":\"qux\"}]"</span><span style="color: #990000">&gt;&gt;</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Patch a resource in multiple calls</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">StreamRef</font> <font color="#990000">=</font> <b><font color="#000000">gun:patch</font></b>(<font color="#009900">ConnPid</font>, <font color="#FF0000">"/users/1"</font>,
+ [{<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"application/json-patch+json"</font><font color="#990000">&gt;&gt;</font>}],
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"[{\"op\":\"add\",\"path\":\"/baz\",\"value\":\"qux\"}]"</font><font color="#990000">&gt;&gt;</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Patch a resource in multiple calls</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">StreamRef</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">gun:patch</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #FF0000">"/users/1"</span>, [
- {<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"application/json-patch+json"</span><span style="color: #990000">&gt;&gt;</span>}
-])<span style="color: #990000">.</span>
-<span style="font-weight: bold"><span style="color: #000000">gun:data</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">StreamRef</span>, <span style="color: #FF6600">fin</span>,
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"[{\"op\":\"add\",\"path\":\"/baz\",\"value\":\"qux\"}]"</span><span style="color: #990000">&gt;&gt;</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Patch a resource with request options</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">StreamRef</font> <font color="#990000">=</font> <b><font color="#000000">gun:patch</font></b>(<font color="#009900">ConnPid</font>, <font color="#FF0000">"/users/1"</font>, [
+ {<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"application/json-patch+json"</font><font color="#990000">&gt;&gt;</font>}
+])<font color="#990000">.</font>
+<b><font color="#000000">gun:data</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">StreamRef</font>, <font color="#FF6600">fin</font>,
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"[{\"op\":\"add\",\"path\":\"/baz\",\"value\":\"qux\"}]"</font><font color="#990000">&gt;&gt;</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Patch a resource with request options</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">StreamRef</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">gun:patch</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #FF0000">"/users/1"</span>,
- [{<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"application/json-patch+json"</span><span style="color: #990000">&gt;&gt;</span>}],
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"[{\"op\":\"add\",\"path\":\"/baz\",\"value\":\"qux\"}]"</span><span style="color: #990000">&gt;&gt;</span>,
- #{<span style="color: #0000FF">reply_to</span> <span style="color: #990000">=&gt;</span> <span style="color: #009900">ReplyToPid</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">StreamRef</font> <font color="#990000">=</font> <b><font color="#000000">gun:patch</font></b>(<font color="#009900">ConnPid</font>, <font color="#FF0000">"/users/1"</font>,
+ [{<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"application/json-patch+json"</font><font color="#990000">&gt;&gt;</font>}],
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"[{\"op\":\"add\",\"path\":\"/baz\",\"value\":\"qux\"}]"</font><font color="#990000">&gt;&gt;</font>,
+ #{<font color="#0000FF">reply_to</font> <font color="#990000">=&gt;</font> <font color="#009900">ReplyToPid</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../gun">gun(3)</a>,
-<a href="../gun.post">gun:post(3)</a>,
-<a href="../gun.put">gun:put(3)</a>,
-<a href="../gun.await">gun:await(3)</a>,
-<a href="../gun.await_body">gun:await_body(3)</a>,
-<a href="../gun_push">gun_push(3)</a>,
-<a href="../gun_inform">gun_inform(3)</a>,
-<a href="../gun_response">gun_response(3)</a>,
-<a href="../gun_data">gun_data(3)</a></p></div>
-</div>
-</div>
+<p><a href="../gun">gun(3)</a>, <a href="../gun.post">gun:post(3)</a>, <a href="../gun.put">gun:put(3)</a>, <a href="../gun.await">gun:await(3)</a>, <a href="../gun.await_body">gun:await_body(3)</a>, <a href="../gun_push">gun_push(3)</a>, <a href="../gun_inform">gun_inform(3)</a>, <a href="../gun_response">gun_response(3)</a>, <a href="../gun_data">gun_data(3)</a></p>
+
diff --git a/docs/en/gun/1.0/manual/gun.post/index.html b/docs/en/gun/1.0/manual/gun.post/index.html
index 9f6ee6e2..782e8346 100644
--- a/docs/en/gun/1.0/manual/gun.post/index.html
+++ b/docs/en/gun/1.0/manual/gun.post/index.html
@@ -62,166 +62,89 @@
<h1 class="lined-header"><span>gun:post(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>gun:post - Process the enclosed representation according to a resource&#8217;s own semantics</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>gun:post - Process the enclosed representation according to a resource&apos;s own semantics</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">post</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">Path</span>, <span style="color: #009900">Headers</span>)
- <span style="color: #990000">-&gt;</span> <span style="color: #009900">StreamRef</span>
-
-<span style="font-weight: bold"><span style="color: #000000">post</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">Path</span>, <span style="color: #009900">Headers</span>, <span style="color: #009900">Body</span>)
- <span style="color: #990000">-&gt;</span> <span style="font-weight: bold"><span style="color: #000000">post</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">Path</span>, <span style="color: #009900">Headers</span>, <span style="color: #009900">Body</span>, #{})
-
-<span style="font-weight: bold"><span style="color: #000000">post</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">Path</span>, <span style="color: #009900">Headers</span>, <span style="color: #009900">Body</span>, <span style="color: #009900">ReqOpts</span>)
- <span style="color: #990000">-&gt;</span> <span style="color: #009900">StreamRef</span>
-
-<span style="color: #009900">ConnPid</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">pid</span></span>()
-<span style="color: #009900">Path</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>()
-<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="font-weight: bold"><span style="color: #000000">iodata</span></span>()}]
-<span style="color: #009900">Body</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>()
-<span style="color: #009900">ReqOpts</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">gun:req_opts</span></span>()
-<span style="color: #009900">StreamRef</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">reference</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Process the enclosed representation according to a resource&#8217;s
-own semantics.</p></div>
-<div class="paragraph"><p>The behavior of this function varies depending on whether
-a body is provided.</p></div>
-<div class="paragraph"><p>The function <code>post/3</code> expects either a content-length
-or content-type header to indicate that a body will be
-sent afterwards. The body can then be sent using
-<a href="../gun.data">gun:data(3)</a>.</p></div>
-<div class="paragraph"><p>The function <code>post/4,5</code> sends the entire request, including
-the request body, immediately. It is therefore not possible
-to use <a href="../gun.data">gun:data(3)</a> after that. You
-should provide a content-type header. Gun will set the
-content-length header automatically.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">post</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">Path</font>, <font color="#009900">Headers</font>)
+ <font color="#990000">-&gt;</font> <font color="#009900">StreamRef</font>
+
+<b><font color="#000000">post</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">Path</font>, <font color="#009900">Headers</font>, <font color="#009900">Body</font>)
+ <font color="#990000">-&gt;</font> <b><font color="#000000">post</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">Path</font>, <font color="#009900">Headers</font>, <font color="#009900">Body</font>, #{})
+
+<b><font color="#000000">post</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">Path</font>, <font color="#009900">Headers</font>, <font color="#009900">Body</font>, <font color="#009900">ReqOpts</font>)
+ <font color="#990000">-&gt;</font> <font color="#009900">StreamRef</font>
+
+<font color="#009900">ConnPid</font> <font color="#990000">::</font> <b><font color="#000080">pid</font></b>()
+<font color="#009900">Path</font> <font color="#990000">::</font> <b><font color="#000000">iodata</font></b>()
+<font color="#009900">Headers</font> <font color="#990000">::</font> [{<b><font color="#000080">binary</font></b>(), <b><font color="#000000">iodata</font></b>()}]
+<font color="#009900">Body</font> <font color="#990000">::</font> <b><font color="#000000">iodata</font></b>()
+<font color="#009900">ReqOpts</font> <font color="#990000">::</font> <b><font color="#000000">gun:req_opts</font></b>()
+<font color="#009900">StreamRef</font> <font color="#990000">::</font> <b><font color="#000080">reference</font></b>()</tt></pre>
+</div></div>
+<p>Process the enclosed representation according to a resource&apos;s own semantics.</p>
+<p>The behavior of this function varies depending on whether a body is provided.</p>
+<p>The function <code>post/3</code> expects either a content-length or content-type header to indicate that a body will be sent afterwards. The body can then be sent using <a href="../gun.data">gun:data(3)</a>.</p>
+<p>The function <code>post/4,5</code> sends the entire request, including the request body, immediately. It is therefore not possible to use <a href="../gun.data">gun:data(3)</a> after that. You should provide a content-type header. Gun will set the content-length header automatically.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-ConnPid
-</dt>
-<dd>
-<p>
-The pid of the Gun connection process.
-</p>
+<dl><dt>ConnPid</dt>
+<dd><p>The pid of the Gun connection process.</p>
</dd>
-<dt class="hdlist1">
-Path
-</dt>
-<dd>
-<p>
-Path to the resource.
-</p>
+<dt>Path</dt>
+<dd><p>Path to the resource.</p>
</dd>
-<dt class="hdlist1">
-Headers
-</dt>
-<dd>
-<p>
-Additional request headers.
-</p>
+<dt>Headers</dt>
+<dd><p>Additional request headers.</p>
</dd>
-<dt class="hdlist1">
-Body
-</dt>
-<dd>
-<p>
-Request body.
-</p>
+<dt>Body</dt>
+<dd><p>Request body.</p>
</dd>
-<dt class="hdlist1">
-ReqOpts
-</dt>
-<dd>
-<p>
-Request options.
-</p>
+<dt>ReqOpts</dt>
+<dd><p>Request options.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A reference that identifies the newly created stream is
-returned. It is this reference that must be passed in
-subsequent calls and will be received in messages related
-to this new stream.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>A reference that identifies the newly created stream is returned. It is this reference that must be passed in subsequent calls and will be received in messages related to this new stream.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<ul><li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Post to a resource</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Post to a resource</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">StreamRef</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">gun:post</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #FF0000">"/search"</span>,
- [{<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"application/x-www-form-urlencoded"</span><span style="color: #990000">&gt;&gt;</span>}],
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"q=nine%20nines"</span><span style="color: #990000">&gt;&gt;</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Post to a resource in multiple calls</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">StreamRef</font> <font color="#990000">=</font> <b><font color="#000000">gun:post</font></b>(<font color="#009900">ConnPid</font>, <font color="#FF0000">"/search"</font>,
+ [{<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"application/x-www-form-urlencoded"</font><font color="#990000">&gt;&gt;</font>}],
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"q=nine%20nines"</font><font color="#990000">&gt;&gt;</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Post to a resource in multiple calls</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">StreamRef</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">gun:post</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #FF0000">"/search"</span>, [
- {<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"application/x-www-form-urlencoded"</span><span style="color: #990000">&gt;&gt;</span>}
-])<span style="color: #990000">.</span>
-<span style="font-weight: bold"><span style="color: #000000">gun:data</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">StreamRef</span>, <span style="color: #FF6600">fin</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"q=nine%20nines"</span><span style="color: #990000">&gt;&gt;</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Post to a resource with request options</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">StreamRef</font> <font color="#990000">=</font> <b><font color="#000000">gun:post</font></b>(<font color="#009900">ConnPid</font>, <font color="#FF0000">"/search"</font>, [
+ {<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"application/x-www-form-urlencoded"</font><font color="#990000">&gt;&gt;</font>}
+])<font color="#990000">.</font>
+<b><font color="#000000">gun:data</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">StreamRef</font>, <font color="#FF6600">fin</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"q=nine%20nines"</font><font color="#990000">&gt;&gt;</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Post to a resource with request options</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">StreamRef</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">gun:post</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #FF0000">"/search"</span>,
- [{<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"application/x-www-form-urlencoded"</span><span style="color: #990000">&gt;&gt;</span>}],
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"q=nine%20nines"</span><span style="color: #990000">&gt;&gt;</span>,
- #{<span style="color: #0000FF">reply_to</span> <span style="color: #990000">=&gt;</span> <span style="color: #009900">ReplyToPid</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">StreamRef</font> <font color="#990000">=</font> <b><font color="#000000">gun:post</font></b>(<font color="#009900">ConnPid</font>, <font color="#FF0000">"/search"</font>,
+ [{<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"application/x-www-form-urlencoded"</font><font color="#990000">&gt;&gt;</font>}],
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"q=nine%20nines"</font><font color="#990000">&gt;&gt;</font>,
+ #{<font color="#0000FF">reply_to</font> <font color="#990000">=&gt;</font> <font color="#009900">ReplyToPid</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../gun">gun(3)</a>,
-<a href="../gun.patch">gun:patch(3)</a>,
-<a href="../gun.put">gun:put(3)</a>,
-<a href="../gun.await">gun:await(3)</a>,
-<a href="../gun.await_body">gun:await_body(3)</a>,
-<a href="../gun_push">gun_push(3)</a>,
-<a href="../gun_inform">gun_inform(3)</a>,
-<a href="../gun_response">gun_response(3)</a>,
-<a href="../gun_data">gun_data(3)</a></p></div>
-</div>
-</div>
+<p><a href="../gun">gun(3)</a>, <a href="../gun.patch">gun:patch(3)</a>, <a href="../gun.put">gun:put(3)</a>, <a href="../gun.await">gun:await(3)</a>, <a href="../gun.await_body">gun:await_body(3)</a>, <a href="../gun_push">gun_push(3)</a>, <a href="../gun_inform">gun_inform(3)</a>, <a href="../gun_response">gun_response(3)</a>, <a href="../gun_data">gun_data(3)</a></p>
+
diff --git a/docs/en/gun/1.0/manual/gun.put/index.html b/docs/en/gun/1.0/manual/gun.put/index.html
index ae72aded..71f3f345 100644
--- a/docs/en/gun/1.0/manual/gun.put/index.html
+++ b/docs/en/gun/1.0/manual/gun.put/index.html
@@ -62,165 +62,89 @@
<h1 class="lined-header"><span>gun:put(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>gun:put - Create or replace a resource</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>gun:put - Create or replace a resource</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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: #000080">put</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">Path</span>, <span style="color: #009900">Headers</span>)
- <span style="color: #990000">-&gt;</span> <span style="color: #009900">StreamRef</span>
-
-<span style="font-weight: bold"><span style="color: #000080">put</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">Path</span>, <span style="color: #009900">Headers</span>, <span style="color: #009900">Body</span>)
- <span style="color: #990000">-&gt;</span> <span style="font-weight: bold"><span style="color: #000080">put</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">Path</span>, <span style="color: #009900">Headers</span>, <span style="color: #009900">Body</span>, #{})
-
-<span style="font-weight: bold"><span style="color: #000080">put</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">Path</span>, <span style="color: #009900">Headers</span>, <span style="color: #009900">Body</span>, <span style="color: #009900">ReqOpts</span>)
- <span style="color: #990000">-&gt;</span> <span style="color: #009900">StreamRef</span>
-
-<span style="color: #009900">ConnPid</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">pid</span></span>()
-<span style="color: #009900">Path</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>()
-<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="font-weight: bold"><span style="color: #000000">iodata</span></span>()}]
-<span style="color: #009900">Body</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>()
-<span style="color: #009900">ReqOpts</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">gun:req_opts</span></span>()
-<span style="color: #009900">StreamRef</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">reference</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Create or replace a resource.</p></div>
-<div class="paragraph"><p>The behavior of this function varies depending on whether
-a body is provided.</p></div>
-<div class="paragraph"><p>The function <code>put/3</code> expects either a content-length
-or content-type header to indicate that a body will be
-sent afterwards. The body can then be sent using
-<a href="../gun.data">gun:data(3)</a>.</p></div>
-<div class="paragraph"><p>The function <code>put/4,5</code> sends the entire request, including
-the request body, immediately. It is therefore not possible
-to use <a href="../gun.data">gun:data(3)</a> after that. You
-should provide a content-type header. Gun will set the
-content-length header automatically.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000080">put</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">Path</font>, <font color="#009900">Headers</font>)
+ <font color="#990000">-&gt;</font> <font color="#009900">StreamRef</font>
+
+<b><font color="#000080">put</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">Path</font>, <font color="#009900">Headers</font>, <font color="#009900">Body</font>)
+ <font color="#990000">-&gt;</font> <b><font color="#000080">put</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">Path</font>, <font color="#009900">Headers</font>, <font color="#009900">Body</font>, #{})
+
+<b><font color="#000080">put</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">Path</font>, <font color="#009900">Headers</font>, <font color="#009900">Body</font>, <font color="#009900">ReqOpts</font>)
+ <font color="#990000">-&gt;</font> <font color="#009900">StreamRef</font>
+
+<font color="#009900">ConnPid</font> <font color="#990000">::</font> <b><font color="#000080">pid</font></b>()
+<font color="#009900">Path</font> <font color="#990000">::</font> <b><font color="#000000">iodata</font></b>()
+<font color="#009900">Headers</font> <font color="#990000">::</font> [{<b><font color="#000080">binary</font></b>(), <b><font color="#000000">iodata</font></b>()}]
+<font color="#009900">Body</font> <font color="#990000">::</font> <b><font color="#000000">iodata</font></b>()
+<font color="#009900">ReqOpts</font> <font color="#990000">::</font> <b><font color="#000000">gun:req_opts</font></b>()
+<font color="#009900">StreamRef</font> <font color="#990000">::</font> <b><font color="#000080">reference</font></b>()</tt></pre>
+</div></div>
+<p>Create or replace a resource.</p>
+<p>The behavior of this function varies depending on whether a body is provided.</p>
+<p>The function <code>put/3</code> expects either a content-length or content-type header to indicate that a body will be sent afterwards. The body can then be sent using <a href="../gun.data">gun:data(3)</a>.</p>
+<p>The function <code>put/4,5</code> sends the entire request, including the request body, immediately. It is therefore not possible to use <a href="../gun.data">gun:data(3)</a> after that. You should provide a content-type header. Gun will set the content-length header automatically.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-ConnPid
-</dt>
-<dd>
-<p>
-The pid of the Gun connection process.
-</p>
+<dl><dt>ConnPid</dt>
+<dd><p>The pid of the Gun connection process.</p>
</dd>
-<dt class="hdlist1">
-Path
-</dt>
-<dd>
-<p>
-Path to the resource.
-</p>
+<dt>Path</dt>
+<dd><p>Path to the resource.</p>
</dd>
-<dt class="hdlist1">
-Headers
-</dt>
-<dd>
-<p>
-Additional request headers.
-</p>
+<dt>Headers</dt>
+<dd><p>Additional request headers.</p>
</dd>
-<dt class="hdlist1">
-Body
-</dt>
-<dd>
-<p>
-Request body.
-</p>
+<dt>Body</dt>
+<dd><p>Request body.</p>
</dd>
-<dt class="hdlist1">
-ReqOpts
-</dt>
-<dd>
-<p>
-Request options.
-</p>
+<dt>ReqOpts</dt>
+<dd><p>Request options.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A reference that identifies the newly created stream is
-returned. It is this reference that must be passed in
-subsequent calls and will be received in messages related
-to this new stream.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>A reference that identifies the newly created stream is returned. It is this reference that must be passed in subsequent calls and will be received in messages related to this new stream.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<ul><li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Put a resource</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Put a resource</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">StreamRef</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">gun:put</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #FF0000">"/lang/fr_FR/hello"</span>,
- [{<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/plain"</span><span style="color: #990000">&gt;&gt;</span>}],
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Bonjour !"</span><span style="color: #990000">&gt;&gt;</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Put a resource in multiple calls</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">StreamRef</font> <font color="#990000">=</font> <b><font color="#000000">gun:put</font></b>(<font color="#009900">ConnPid</font>, <font color="#FF0000">"/lang/fr_FR/hello"</font>,
+ [{<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/plain"</font><font color="#990000">&gt;&gt;</font>}],
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"Bonjour !"</font><font color="#990000">&gt;&gt;</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Put a resource in multiple calls</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">StreamRef</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">gun:put</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #FF0000">"/lang/fr_FR/hello"</span>, [
- {<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/plain"</span><span style="color: #990000">&gt;&gt;</span>}
-])<span style="color: #990000">.</span>
-<span style="font-weight: bold"><span style="color: #000000">gun:data</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">StreamRef</span>, <span style="color: #FF6600">fin</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Bonjour !"</span><span style="color: #990000">&gt;&gt;</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Put a resource with request options</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">StreamRef</font> <font color="#990000">=</font> <b><font color="#000000">gun:put</font></b>(<font color="#009900">ConnPid</font>, <font color="#FF0000">"/lang/fr_FR/hello"</font>, [
+ {<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/plain"</font><font color="#990000">&gt;&gt;</font>}
+])<font color="#990000">.</font>
+<b><font color="#000000">gun:data</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">StreamRef</font>, <font color="#FF6600">fin</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"Bonjour !"</font><font color="#990000">&gt;&gt;</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Put a resource with request options</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">StreamRef</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">gun:put</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #FF0000">"/lang/fr_FR/hello"</span>,
- [{<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/plain"</span><span style="color: #990000">&gt;&gt;</span>}],
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Bonjour !"</span><span style="color: #990000">&gt;&gt;</span>,
- #{<span style="color: #0000FF">reply_to</span> <span style="color: #990000">=&gt;</span> <span style="color: #009900">ReplyToPid</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">StreamRef</font> <font color="#990000">=</font> <b><font color="#000000">gun:put</font></b>(<font color="#009900">ConnPid</font>, <font color="#FF0000">"/lang/fr_FR/hello"</font>,
+ [{<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/plain"</font><font color="#990000">&gt;&gt;</font>}],
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"Bonjour !"</font><font color="#990000">&gt;&gt;</font>,
+ #{<font color="#0000FF">reply_to</font> <font color="#990000">=&gt;</font> <font color="#009900">ReplyToPid</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../gun">gun(3)</a>,
-<a href="../gun.patch">gun:patch(3)</a>,
-<a href="../gun.post">gun:post(3)</a>,
-<a href="../gun.await">gun:await(3)</a>,
-<a href="../gun.await_body">gun:await_body(3)</a>,
-<a href="../gun_push">gun_push(3)</a>,
-<a href="../gun_inform">gun_inform(3)</a>,
-<a href="../gun_response">gun_response(3)</a>,
-<a href="../gun_data">gun_data(3)</a></p></div>
-</div>
-</div>
+<p><a href="../gun">gun(3)</a>, <a href="../gun.patch">gun:patch(3)</a>, <a href="../gun.post">gun:post(3)</a>, <a href="../gun.await">gun:await(3)</a>, <a href="../gun.await_body">gun:await_body(3)</a>, <a href="../gun_push">gun_push(3)</a>, <a href="../gun_inform">gun_inform(3)</a>, <a href="../gun_response">gun_response(3)</a>, <a href="../gun_data">gun_data(3)</a></p>
+
diff --git a/docs/en/gun/1.0/manual/gun.request/index.html b/docs/en/gun/1.0/manual/gun.request/index.html
index e5dad30d..6567c699 100644
--- a/docs/en/gun/1.0/manual/gun.request/index.html
+++ b/docs/en/gun/1.0/manual/gun.request/index.html
@@ -62,156 +62,75 @@
<h1 class="lined-header"><span>gun:request(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>gun:request - Perform the given request</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>gun:request - Perform the given request</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">request</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">Method</span>, <span style="color: #009900">Path</span>, <span style="color: #009900">Headers</span>)
- <span style="color: #990000">-&gt;</span> <span style="color: #009900">StreamRef</span>
-
-<span style="font-weight: bold"><span style="color: #000000">request</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">Method</span>, <span style="color: #009900">Path</span>, <span style="color: #009900">Headers</span>, <span style="color: #009900">Body</span>)
- <span style="color: #990000">-&gt;</span> <span style="font-weight: bold"><span style="color: #000000">request</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">Method</span>, <span style="color: #009900">Path</span>, <span style="color: #009900">Headers</span>, <span style="color: #009900">Body</span>, #{})
-
-<span style="font-weight: bold"><span style="color: #000000">request</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">Method</span>, <span style="color: #009900">Path</span>, <span style="color: #009900">Headers</span>, <span style="color: #009900">Body</span>, <span style="color: #009900">ReqOpts</span>)
- <span style="color: #990000">-&gt;</span> <span style="color: #009900">StreamRef</span>
-
-<span style="color: #009900">ConnPid</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">pid</span></span>()
-<span style="color: #009900">Method</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()
-<span style="color: #009900">Path</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>()
-<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="font-weight: bold"><span style="color: #000000">iodata</span></span>()}]
-<span style="color: #009900">Body</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>()
-<span style="color: #009900">ReqOpts</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">gun:req_opts</span></span>()
-<span style="color: #009900">StreamRef</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">reference</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Perform the given request.</p></div>
-<div class="paragraph"><p>This is a general purpose function that should only be
-used when other method-specific functions do not apply.</p></div>
-<div class="paragraph"><p>The behavior of this function varies depending on whether
-a body is provided.</p></div>
-<div class="paragraph"><p>The function <code>request/4</code> expects either a content-length
-or content-type header to indicate that a body will be
-sent afterwards. Gun will assume the request has no body
-otherwise. The body can then be sent using
-<a href="../gun.data">gun:data(3)</a>.</p></div>
-<div class="paragraph"><p>The function <code>request/5,6</code> sends the entire request, including
-the request body, immediately. It is therefore not possible
-to use <a href="../gun.data">gun:data(3)</a> after that. You
-should provide a content-type header. Gun will set the
-content-length header automatically.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">request</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">Method</font>, <font color="#009900">Path</font>, <font color="#009900">Headers</font>)
+ <font color="#990000">-&gt;</font> <font color="#009900">StreamRef</font>
+
+<b><font color="#000000">request</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">Method</font>, <font color="#009900">Path</font>, <font color="#009900">Headers</font>, <font color="#009900">Body</font>)
+ <font color="#990000">-&gt;</font> <b><font color="#000000">request</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">Method</font>, <font color="#009900">Path</font>, <font color="#009900">Headers</font>, <font color="#009900">Body</font>, #{})
+
+<b><font color="#000000">request</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">Method</font>, <font color="#009900">Path</font>, <font color="#009900">Headers</font>, <font color="#009900">Body</font>, <font color="#009900">ReqOpts</font>)
+ <font color="#990000">-&gt;</font> <font color="#009900">StreamRef</font>
+
+<font color="#009900">ConnPid</font> <font color="#990000">::</font> <b><font color="#000080">pid</font></b>()
+<font color="#009900">Method</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()
+<font color="#009900">Path</font> <font color="#990000">::</font> <b><font color="#000000">iodata</font></b>()
+<font color="#009900">Headers</font> <font color="#990000">::</font> [{<b><font color="#000080">binary</font></b>(), <b><font color="#000000">iodata</font></b>()}]
+<font color="#009900">Body</font> <font color="#990000">::</font> <b><font color="#000000">iodata</font></b>()
+<font color="#009900">ReqOpts</font> <font color="#990000">::</font> <b><font color="#000000">gun:req_opts</font></b>()
+<font color="#009900">StreamRef</font> <font color="#990000">::</font> <b><font color="#000080">reference</font></b>()</tt></pre>
+</div></div>
+<p>Perform the given request.</p>
+<p>This is a general purpose function that should only be used when other method-specific functions do not apply.</p>
+<p>The behavior of this function varies depending on whether a body is provided.</p>
+<p>The function <code>request/4</code> expects either a content-length or content-type header to indicate that a body will be sent afterwards. Gun will assume the request has no body otherwise. The body can then be sent using <a href="../gun.data">gun:data(3)</a>.</p>
+<p>The function <code>request/5,6</code> sends the entire request, including the request body, immediately. It is therefore not possible to use <a href="../gun.data">gun:data(3)</a> after that. You should provide a content-type header. Gun will set the content-length header automatically.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-ConnPid
-</dt>
-<dd>
-<p>
-The pid of the Gun connection process.
-</p>
+<dl><dt>ConnPid</dt>
+<dd><p>The pid of the Gun connection process.</p>
</dd>
-<dt class="hdlist1">
-Method
-</dt>
-<dd>
-<p>
-Method to be used for the request.
-</p>
+<dt>Method</dt>
+<dd><p>Method to be used for the request.</p>
</dd>
-<dt class="hdlist1">
-Path
-</dt>
-<dd>
-<p>
-Path to the resource.
-</p>
+<dt>Path</dt>
+<dd><p>Path to the resource.</p>
</dd>
-<dt class="hdlist1">
-Headers
-</dt>
-<dd>
-<p>
-Additional request headers.
-</p>
+<dt>Headers</dt>
+<dd><p>Additional request headers.</p>
</dd>
-<dt class="hdlist1">
-Body
-</dt>
-<dd>
-<p>
-Request body.
-</p>
+<dt>Body</dt>
+<dd><p>Request body.</p>
</dd>
-<dt class="hdlist1">
-ReqOpts
-</dt>
-<dd>
-<p>
-Request options.
-</p>
+<dt>ReqOpts</dt>
+<dd><p>Request options.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A reference that identifies the newly created stream is
-returned. It is this reference that must be passed in
-subsequent calls and will be received in messages related
-to this new stream.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>A reference that identifies the newly created stream is returned. It is this reference that must be passed in subsequent calls and will be received in messages related to this new stream.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<ul><li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Perform a request</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Perform a request</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">StreamRef</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">gun:request</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"PUT"</span><span style="color: #990000">&gt;&gt;</span>,
- <span style="color: #FF0000">"/lang/fr_FR/hello"</span>,
- [{<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/plain"</span><span style="color: #990000">&gt;&gt;</span>}],
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Bonjour !"</span><span style="color: #990000">&gt;&gt;</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">StreamRef</font> <font color="#990000">=</font> <b><font color="#000000">gun:request</font></b>(<font color="#009900">ConnPid</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"PUT"</font><font color="#990000">&gt;&gt;</font>,
+ <font color="#FF0000">"/lang/fr_FR/hello"</font>,
+ [{<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/plain"</font><font color="#990000">&gt;&gt;</font>}],
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"Bonjour !"</font><font color="#990000">&gt;&gt;</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../gun">gun(3)</a>,
-<a href="../gun.await">gun:await(3)</a>,
-<a href="../gun.await_body">gun:await_body(3)</a>,
-<a href="../gun_push">gun_push(3)</a>,
-<a href="../gun_inform">gun_inform(3)</a>,
-<a href="../gun_response">gun_response(3)</a>,
-<a href="../gun_data">gun_data(3)</a></p></div>
-</div>
-</div>
+<p><a href="../gun">gun(3)</a>, <a href="../gun.await">gun:await(3)</a>, <a href="../gun.await_body">gun:await_body(3)</a>, <a href="../gun_push">gun_push(3)</a>, <a href="../gun_inform">gun_inform(3)</a>, <a href="../gun_response">gun_response(3)</a>, <a href="../gun_data">gun_data(3)</a></p>
+
diff --git a/docs/en/gun/1.0/manual/gun.ws_send/index.html b/docs/en/gun/1.0/manual/gun.ws_send/index.html
index 8892da18..a0b34903 100644
--- a/docs/en/gun/1.0/manual/gun.ws_send/index.html
+++ b/docs/en/gun/1.0/manual/gun.ws_send/index.html
@@ -62,94 +62,57 @@
<h1 class="lined-header"><span>gun:ws_send(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>gun:ws_send - Send Websocket frames</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>gun:ws_send - Send Websocket frames</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">ws_send</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">Frames</span>) <span style="color: #990000">-&gt;</span> <span style="color: #FF6600">ok</span>
-
-<span style="color: #009900">ConnPid</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">pid</span></span>()
-<span style="color: #009900">Frames</span> <span style="color: #990000">::</span> <span style="color: #009900">Frame</span> | [<span style="color: #009900">Frame</span>]
-<span style="color: #009900">Frame</span> <span style="color: #990000">::</span> <span style="color: #FF6600">close</span> | <span style="color: #FF6600">ping</span> | <span style="color: #FF6600">pong</span>
- | {<span style="color: #FF6600">text</span> | <span style="font-weight: bold"><span style="color: #000080">binary</span></span> | <span style="color: #FF6600">close</span> | <span style="color: #FF6600">ping</span> | <span style="color: #FF6600">pong</span>, <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>()}
- | {<span style="color: #FF6600">close</span>, <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>(), <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>Send Websocket frames.</p></div>
-<div class="paragraph"><p>The connection must first be upgraded to Websocket using
-the function <a href="../gun.ws_upgrade">gun:ws_upgrade(3)</a>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">ws_send</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">Frames</font>) <font color="#990000">-&gt;</font> <font color="#FF6600">ok</font>
+
+<font color="#009900">ConnPid</font> <font color="#990000">::</font> <b><font color="#000080">pid</font></b>()
+<font color="#009900">Frames</font> <font color="#990000">::</font> <font color="#009900">Frame</font> | [<font color="#009900">Frame</font>]
+<font color="#009900">Frame</font> <font color="#990000">::</font> <font color="#FF6600">close</font> | <font color="#FF6600">ping</font> | <font color="#FF6600">pong</font>
+ | {<font color="#FF6600">text</font> | <b><font color="#000080">binary</font></b> | <font color="#FF6600">close</font> | <font color="#FF6600">ping</font> | <font color="#FF6600">pong</font>, <b><font color="#000000">iodata</font></b>()}
+ | {<font color="#FF6600">close</font>, <b><font color="#000000">non_neg_integer</font></b>(), <b><font color="#000000">iodata</font></b>()}</tt></pre>
+</div></div>
+<p>Send Websocket frames.</p>
+<p>The connection must first be upgraded to Websocket using the function <a href="../gun.ws_upgrade">gun:ws_upgrade(3)</a>.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-ConnPid
-</dt>
-<dd>
-<p>
-The pid of the Gun connection process.
-</p>
+<dl><dt>ConnPid</dt>
+<dd><p>The pid of the Gun connection process.</p>
</dd>
-<dt class="hdlist1">
-Frames
-</dt>
-<dd>
-<p>
-A Websocket frame.
-</p>
+<dt>Frames</dt>
+<dd><p>A Websocket frame.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
+<!-- @todo One or more Websocket frame(s).-->
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The atom <code>ok</code> is returned.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The atom <code>ok</code> is returned.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<ul><li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Send a single frame</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Send a single frame</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">gun:ws_send</span></span>(<span style="color: #009900">ConnPid</span>, {<span style="color: #FF6600">text</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Hello world!"</span><span style="color: #990000">&gt;&gt;</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">gun:ws_send</font></b>(<font color="#009900">ConnPid</font>, {<font color="#FF6600">text</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"Hello world!"</font><font color="#990000">&gt;&gt;</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
+<!-- .Send many frames including a close frame-->
+<!-- [source,erlang]-->
+<!-- ------>
+<!-- gun:ws_send(ConnPid, [-->
+<!-- {text, &lt;&lt;&quot;See you later, world!&quot;&gt;&gt;},-->
+<!-- close-->
+<!-- ]).-->
+<!-- ------>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../gun">gun(3)</a>,
-<a href="../gun.ws_upgrade">gun:ws_upgrade(3)</a>,
-<a href="../gun_upgrade">gun_upgrade(3)</a>,
-<a href="../gun_ws">gun_ws(3)</a></p></div>
-</div>
-</div>
+<p><a href="../gun">gun(3)</a>, <a href="../gun.ws_upgrade">gun:ws_upgrade(3)</a>, <a href="../gun_upgrade">gun_upgrade(3)</a>, <a href="../gun_ws">gun_ws(3)</a></p>
+
diff --git a/docs/en/gun/1.0/manual/gun.ws_upgrade/index.html b/docs/en/gun/1.0/manual/gun.ws_upgrade/index.html
index d74702db..998ffe89 100644
--- a/docs/en/gun/1.0/manual/gun.ws_upgrade/index.html
+++ b/docs/en/gun/1.0/manual/gun.ws_upgrade/index.html
@@ -62,144 +62,81 @@
<h1 class="lined-header"><span>gun:ws_upgrade(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>gun:ws_upgrade - Upgrade to Websocket</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>gun:ws_upgrade - Upgrade to Websocket</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">ws_upgrade</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">Path</span>)
- <span style="color: #990000">-&gt;</span> <span style="font-weight: bold"><span style="color: #000000">ws_upgrade</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">Path</span>, [])
-
-<span style="font-weight: bold"><span style="color: #000000">ws_upgrade</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">Path</span>, <span style="color: #009900">Headers</span>)
- <span style="color: #990000">-&gt;</span> <span style="color: #009900">StreamRef</span>
-
-<span style="font-weight: bold"><span style="color: #000000">ws_upgrade</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">Path</span>, <span style="color: #009900">Headers</span>, <span style="color: #009900">WsOpts</span>)
- <span style="color: #990000">-&gt;</span> <span style="color: #009900">StreamRef</span>
-
-<span style="color: #009900">ConnPid</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">pid</span></span>()
-<span style="color: #009900">Path</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>()
-<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="font-weight: bold"><span style="color: #000000">iodata</span></span>()}]
-<span style="color: #009900">WsOpts</span> <span style="color: #990000">::</span> <span style="color: #FF6600">gun</span><span style="color: #990000">:</span><span style="color: #FF6600">ws_opts</span>
-<span style="color: #009900">StreamRef</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">reference</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Upgrade to Websocket.</p></div>
-<div class="paragraph"><p>The behavior of this function depends on the protocol
-selected.</p></div>
-<div class="paragraph"><p>HTTP/1.1 cannot handle Websocket and HTTP requests
-concurrently. The upgrade, if successful, will result
-in the complete takeover of the connection. Any
-subsequent HTTP requests will be rejected.</p></div>
-<div class="paragraph"><p>Gun does not currently support Websocket over HTTP/2.</p></div>
-<div class="paragraph"><p>By default Gun will take the Websocket options from
-the connection&#8217;s <code>ws_opts</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">ws_upgrade</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">Path</font>)
+ <font color="#990000">-&gt;</font> <b><font color="#000000">ws_upgrade</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">Path</font>, [])
+
+<b><font color="#000000">ws_upgrade</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">Path</font>, <font color="#009900">Headers</font>)
+ <font color="#990000">-&gt;</font> <font color="#009900">StreamRef</font>
+
+<b><font color="#000000">ws_upgrade</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">Path</font>, <font color="#009900">Headers</font>, <font color="#009900">WsOpts</font>)
+ <font color="#990000">-&gt;</font> <font color="#009900">StreamRef</font>
+
+<font color="#009900">ConnPid</font> <font color="#990000">::</font> <b><font color="#000080">pid</font></b>()
+<font color="#009900">Path</font> <font color="#990000">::</font> <b><font color="#000000">iodata</font></b>()
+<font color="#009900">Headers</font> <font color="#990000">::</font> [{<b><font color="#000080">binary</font></b>(), <b><font color="#000000">iodata</font></b>()}]
+<font color="#009900">WsOpts</font> <font color="#990000">::</font> <font color="#FF6600">gun</font><font color="#990000">:</font><font color="#FF6600">ws_opts</font>
+<font color="#009900">StreamRef</font> <font color="#990000">::</font> <b><font color="#000080">reference</font></b>()</tt></pre>
+</div></div>
+<p>Upgrade to Websocket.</p>
+<p>The behavior of this function depends on the protocol selected.</p>
+<p>HTTP/1.1 cannot handle Websocket and HTTP requests concurrently. The upgrade, if successful, will result in the complete takeover of the connection. Any subsequent HTTP requests will be rejected.</p>
+<p>Gun does not currently support Websocket over HTTP/2.</p>
+<p>By default Gun will take the Websocket options from the connection&apos;s <code>ws_opts</code>.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-ConnPid
-</dt>
-<dd>
-<p>
-The pid of the Gun connection process.
-</p>
+<dl><dt>ConnPid</dt>
+<dd><p>The pid of the Gun connection process.</p>
</dd>
-<dt class="hdlist1">
-Path
-</dt>
-<dd>
-<p>
-Path to the resource.
-</p>
+<dt>Path</dt>
+<dd><p>Path to the resource.</p>
</dd>
-<dt class="hdlist1">
-Headers
-</dt>
-<dd>
-<p>
-Additional request headers.
-</p>
+<dt>Headers</dt>
+<dd><p>Additional request headers.</p>
</dd>
-<dt class="hdlist1">
-WsOpts
-</dt>
-<dd>
-<p>
-Configuration for the Websocket protocol.
-</p>
+<dt>WsOpts</dt>
+<dd><p>Configuration for the Websocket protocol.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A reference that identifies the newly created stream is
-returned. It is this reference that must be passed in
-subsequent calls and will be received in messages related
-to this new stream.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>A reference that identifies the newly created stream is returned. It is this reference that must be passed in subsequent calls and will be received in messages related to this new stream.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<ul><li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Upgrade to Websocket</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Upgrade to Websocket</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">StreamRef</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">gun:ws_upgrade</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #FF0000">"/ws"</span>, [
- {<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"sec-websocket-protocol"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"chat"</span><span style="color: #990000">&gt;&gt;</span>}
-])<span style="color: #990000">.</span>
-<span style="font-weight: bold"><span style="color: #0000FF">receive</span></span>
- {<span style="color: #FF6600">gun_upgrade</span>, <span style="color: #009900">ConnPid</span>, <span style="color: #009900">StreamRef</span>, [<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"websocket"</span><span style="color: #990000">&gt;&gt;</span>], <span style="color: #990000">_</span>} <span style="color: #990000">-&gt;</span>
- <span style="color: #FF6600">ok</span>
-<span style="font-weight: bold"><span style="color: #0000FF">after</span></span> <span style="color: #993399">5000</span> <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #000000">error</span></span>(<span style="color: #FF6600">timeout</span>)
-<span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Upgrade to Websocket with different options</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">StreamRef</font> <font color="#990000">=</font> <b><font color="#000000">gun:ws_upgrade</font></b>(<font color="#009900">ConnPid</font>, <font color="#FF0000">"/ws"</font>, [
+ {<font color="#990000">&lt;&lt;</font><font color="#FF0000">"sec-websocket-protocol"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"chat"</font><font color="#990000">&gt;&gt;</font>}
+])<font color="#990000">.</font>
+<b><font color="#0000FF">receive</font></b>
+ {<font color="#FF6600">gun_upgrade</font>, <font color="#009900">ConnPid</font>, <font color="#009900">StreamRef</font>, [<font color="#990000">&lt;&lt;</font><font color="#FF0000">"websocket"</font><font color="#990000">&gt;&gt;</font>], <font color="#990000">_</font>} <font color="#990000">-&gt;</font>
+ <font color="#FF6600">ok</font>
+<b><font color="#0000FF">after</font></b> <font color="#993399">5000</font> <font color="#990000">-&gt;</font>
+ <b><font color="#000000">error</font></b>(<font color="#FF6600">timeout</font>)
+<b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Upgrade to Websocket with different options</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">StreamRef</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">gun:ws_upgrade</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #FF0000">"/ws"</span>, [], #{
- <span style="color: #0000FF">compress</span> <span style="color: #990000">=&gt;</span> <span style="color: #000080">false</span>
-})<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">StreamRef</font> <font color="#990000">=</font> <b><font color="#000000">gun:ws_upgrade</font></b>(<font color="#009900">ConnPid</font>, <font color="#FF0000">"/ws"</font>, [], #{
+ <font color="#0000FF">compress</font> <font color="#990000">=&gt;</font> <font color="#000080">false</font>
+})<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../gun">gun(3)</a>,
-<a href="../gun.ws_send">gun:ws_send(3)</a>,
-<a href="../gun_upgrade">gun_upgrade(3)</a>,
-<a href="../gun_ws">gun_ws(3)</a></p></div>
-</div>
-</div>
+<p><a href="../gun">gun(3)</a>, <a href="../gun.ws_send">gun:ws_send(3)</a>, <a href="../gun_upgrade">gun_upgrade(3)</a>, <a href="../gun_ws">gun_ws(3)</a></p>
+
diff --git a/docs/en/gun/1.0/manual/gun/index.html b/docs/en/gun/1.0/manual/gun/index.html
index e08aca7f..a9d5905e 100644
--- a/docs/en/gun/1.0/manual/gun/index.html
+++ b/docs/en/gun/1.0/manual/gun/index.html
@@ -62,454 +62,219 @@
<h1 class="lined-header"><span>gun(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>gun - Asynchronous HTTP client</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>gun - Asynchronous HTTP client</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <code>gun</code> module provides an asynchronous interface for
-connecting and communicating with Web servers over HTTP,
-HTTP/2 or Websocket.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The <code>gun</code> module provides an asynchronous interface for connecting and communicating with Web servers over HTTP, HTTP/2 or Websocket.</p>
<h2 id="_exports">Exports</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Connection:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../gun.open">gun:open(3)</a> - Open a connection to the given host and port
-</p>
+<p>Connection:</p>
+<ul><li><a href="../gun.open">gun:open(3)</a> - Open a connection to the given host and port
</li>
-<li>
-<p>
-<a href="../gun.open_unix">gun:open_unix(3)</a> - Open a connection to the given Unix domain socket
-</p>
+<li><a href="../gun.open_unix">gun:open_unix(3)</a> - Open a connection to the given Unix domain socket
</li>
-<li>
-<p>
-<a href="../gun.close">gun:close(3)</a> - Brutally close the connection
-</p>
+</ul>
+<!-- @todo * link:../gun.shutdown[gun:shutdown(3)] - Gracefully close the connection-->
+<ul><li><a href="../gun.close">gun:close(3)</a> - Brutally close the connection
</li>
-<li>
-<p>
-<a href="../gun.info">gun:info(3)</a> - Obtain information about the connection
-</p>
+<li><a href="../gun.info">gun:info(3)</a> - Obtain information about the connection
</li>
-</ul></div>
-<div class="paragraph"><p>Requests:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../gun.get">gun:get(3)</a> - Get a resource representation
-</p>
+</ul>
+<p>Requests:</p>
+<ul><li><a href="../gun.get">gun:get(3)</a> - Get a resource representation
</li>
-<li>
-<p>
-<a href="../gun.head">gun:head(3)</a> - Get headers of a resource representation
-</p>
+<li><a href="../gun.head">gun:head(3)</a> - Get headers of a resource representation
</li>
-<li>
-<p>
-<a href="../gun.options">gun:options(3)</a> - Query the capabilities of the server or a resource
-</p>
+<li><a href="../gun.options">gun:options(3)</a> - Query the capabilities of the server or a resource
</li>
-<li>
-<p>
-<a href="../gun.patch">gun:patch(3)</a> - Apply a set of changes to a resource
-</p>
+<li><a href="../gun.patch">gun:patch(3)</a> - Apply a set of changes to a resource
</li>
-<li>
-<p>
-<a href="../gun.post">gun:post(3)</a> - Process the enclosed representation according to a resource&#8217;s own semantics
-</p>
+<li><a href="../gun.post">gun:post(3)</a> - Process the enclosed representation according to a resource&apos;s own semantics
</li>
-<li>
-<p>
-<a href="../gun.put">gun:put(3)</a> - Create or replace a resource
-</p>
+<li><a href="../gun.put">gun:put(3)</a> - Create or replace a resource
</li>
-<li>
-<p>
-<a href="../gun.delete">gun:delete(3)</a> - Delete a resource
-</p>
+<li><a href="../gun.delete">gun:delete(3)</a> - Delete a resource
</li>
-<li>
-<p>
-<a href="../gun.request">gun:request(3)</a> - Perform the given request
-</p>
+<li><a href="../gun.request">gun:request(3)</a> - Perform the given request
</li>
-<li>
-<p>
-<a href="../gun.data">gun:data(3)</a> - Stream the body of a request
-</p>
+<li><a href="../gun.data">gun:data(3)</a> - Stream the body of a request
</li>
-</ul></div>
-<div class="paragraph"><p>Messages:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../gun.await">gun:await(3)</a> - Wait for a response
-</p>
+</ul>
+<p>Messages:</p>
+<ul><li><a href="../gun.await">gun:await(3)</a> - Wait for a response
</li>
-<li>
-<p>
-<a href="../gun.await_body">gun:await_body(3)</a> - Wait for the complete response body
-</p>
+<li><a href="../gun.await_body">gun:await_body(3)</a> - Wait for the complete response body
</li>
-<li>
-<p>
-<a href="../gun.await_up">gun:await(3)</a> - Wait for the connection to be up
-</p>
+<li><a href="../gun.await_up">gun:await_up(3)</a> - Wait for the connection to be up
</li>
-<li>
-<p>
-<a href="../gun.flush">gun:flush(3)</a> - Flush all messages related to a connection or a stream
-</p>
+<li><a href="../gun.flush">gun:flush(3)</a> - Flush all messages related to a connection or a stream
</li>
-</ul></div>
-<div class="paragraph"><p>Streams:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../gun.cancel">gun:cancel(3)</a> - Cancel the given stream
-</p>
+</ul>
+<p>Streams:</p>
+<ul><li><a href="../gun.cancel">gun:cancel(3)</a> - Cancel the given stream
</li>
-</ul></div>
-<div class="paragraph"><p>Websocket:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../gun.ws_upgrade">gun:ws_upgrade(3)</a> - Upgrade to Websocket
-</p>
+</ul>
+<p>Websocket:</p>
+<ul><li><a href="../gun.ws_upgrade">gun:ws_upgrade(3)</a> - Upgrade to Websocket
</li>
-<li>
-<p>
-<a href="../gun.ws_send">gun:ws_send(3)</a> - Send Websocket frames
-</p>
+<li><a href="../gun.ws_send">gun:ws_send(3)</a> - Send Websocket frames
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_messages">Messages</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Gun will inform the calling process of events asynchronously
-by sending any of the following messages:</p></div>
-<div class="paragraph"><p>Connection:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../gun_up">gun_up(3)</a> - The connection is up
-</p>
+<p>Gun will inform the calling process of events asynchronously by sending any of the following messages:</p>
+<p>Connection:</p>
+<ul><li><a href="../gun_up">gun_up(3)</a> - The connection is up
</li>
-<li>
-<p>
-<a href="../gun_down">gun_down(3)</a> - The connection is down
-</p>
+<li><a href="../gun_down">gun_down(3)</a> - The connection is down
</li>
-<li>
-<p>
-<a href="../gun_upgrade">gun_upgrade(3)</a> - Successful protocol upgrade
-</p>
+<li><a href="../gun_upgrade">gun_upgrade(3)</a> - Successful protocol upgrade
</li>
-<li>
-<p>
-<a href="../gun_error">gun_error(3)</a> - Stream or connection-wide error
-</p>
+<li><a href="../gun_error">gun_error(3)</a> - Stream or connection-wide error
</li>
-</ul></div>
-<div class="paragraph"><p>Responses:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../gun_push">gun_push(3)</a> - Server-initiated push
-</p>
+</ul>
+<p>Responses:</p>
+<ul><li><a href="../gun_push">gun_push(3)</a> - Server-initiated push
</li>
-<li>
-<p>
-<a href="../gun_inform">gun_inform(3)</a> - Informational response
-</p>
+<li><a href="../gun_inform">gun_inform(3)</a> - Informational response
</li>
-<li>
-<p>
-<a href="../gun_response">gun_response(3)</a> - Response
-</p>
+<li><a href="../gun_response">gun_response(3)</a> - Response
</li>
-<li>
-<p>
-<a href="../gun_data">gun_data(3)</a> - Response body
-</p>
+<li><a href="../gun_data">gun_data(3)</a> - Response body
</li>
-<li>
-<p>
-<a href="../gun_trailers">gun_trailers(3)</a> - Response trailers
-</p>
+<li><a href="../gun_trailers">gun_trailers(3)</a> - Response trailers
</li>
-</ul></div>
-<div class="paragraph"><p>Websocket:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../gun_ws">gun_ws(3)</a> - Websocket frame
-</p>
+</ul>
+<p>Websocket:</p>
+<ul><li><a href="../gun_ws">gun_ws(3)</a> - Websocket frame
</li>
-</ul></div>
-<div class="paragraph"><p>The response messages will be sent to the process that opened
-the connection by default. The <code>reply_to</code> request option can
-be used to redirect request-specific messages to a different
-process.</p></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
+<p>The response messages will be sent to the process that opened the connection by default. The <code>reply_to</code> request option can be used to redirect request-specific messages to a different process.</p>
<h2 id="_types">Types</h2>
-<div class="sectionbody">
-<div class="sect2">
<h3 id="_http_opts">http_opts()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">http_opts</span></span>() <span style="color: #990000">::</span> #{
- <span style="color: #0000FF">keepalive</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">timeout</span></span>(),
- <span style="color: #0000FF">transform_header_name</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">fun</span></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>()),
- <span style="color: #0000FF">version</span> <span style="color: #990000">=&gt;</span> <span style="color: #FF6600">'HTTP/1.1'</span> | <span style="color: #FF6600">'HTTP/1.0'</span>
-}</tt></pre></div></div>
-<div class="paragraph"><p>Configuration for the HTTP protocol.</p></div>
-<div class="paragraph"><p>The default value is given next to the option name:</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-keepalive (5000)
-</dt>
-<dd>
-<p>
-Time between pings in milliseconds. Since the HTTP protocol has
-no standardized way to ping the server, Gun will simply send an
-empty line when the connection is idle. Gun only makes a best
-effort here as servers usually have configurable limits to drop
-idle connections. Use <code>infinity</code> to disable.
-</p>
+<pre><tt><b><font color="#000000">http_opts</font></b>() <font color="#990000">::</font> #{
+ <font color="#0000FF">keepalive</font> <font color="#990000">=&gt;</font> <b><font color="#000000">timeout</font></b>(),
+ <font color="#0000FF">transform_header_name</font> <font color="#990000">=&gt;</font> <b><font color="#0000FF">fun</font></b>((<b><font color="#000080">binary</font></b>()) <font color="#990000">-&gt;</font> <b><font color="#000080">binary</font></b>()),
+ <font color="#0000FF">version</font> <font color="#990000">=&gt;</font> <font color="#FF6600">'HTTP/1.1'</font> | <font color="#FF6600">'HTTP/1.0'</font>
+}</tt></pre>
+</div></div>
+<p>Configuration for the HTTP protocol.</p>
+<p>The default value is given next to the option name:</p>
+<!-- @todo Document content_handlers and gun_sse_h.-->
+<dl><dt>keepalive (5000)</dt>
+<dd><p>Time between pings in milliseconds. Since the HTTP protocol has no standardized way to ping the server, Gun will simply send an empty line when the connection is idle. Gun only makes a best effort here as servers usually have configurable limits to drop idle connections. Use <code>infinity</code> to disable.</p>
</dd>
-<dt class="hdlist1">
-transform_header_name - see below
-</dt>
-<dd>
-<p>
-A function that will be applied to all header names before they
-are sent to the server. Gun assumes that all header names are in
-lower case. This function is useful if you, for example, need to
-re-case header names in the event that the server incorrectly
-considers the case of header names to be significant.
-</p>
+<dt>transform_header_name - see below</dt>
+<dd><p>A function that will be applied to all header names before they are sent to the server. Gun assumes that all header names are in lower case. This function is useful if you, for example, need to re-case header names in the event that the server incorrectly considers the case of header names to be significant.</p>
</dd>
-<dt class="hdlist1">
-version (<code>'HTTP/1.1'</code>)
-</dt>
-<dd>
-<p>
-HTTP version to use.
-</p>
+<dt>version (<code>&apos;HTTP/1.1&apos;</code>)</dt>
+<dd><p>HTTP version to use.</p>
</dd>
-</dl></div>
-</div>
-<div class="sect2">
+</dl>
<h3 id="_http2_opts">http2_opts()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">http2_opts</span></span>() <span style="color: #990000">::</span> #{
- <span style="color: #0000FF">keepalive</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>Configuration for the HTTP/2 protocol.</p></div>
-<div class="paragraph"><p>The default value is given next to the option name:</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-keepalive (5000)
-</dt>
-<dd>
-<p>
-Time between pings in milliseconds.
-</p>
+<pre><tt><b><font color="#000000">http2_opts</font></b>() <font color="#990000">::</font> #{
+ <font color="#0000FF">keepalive</font> <font color="#990000">=&gt;</font> <b><font color="#000000">timeout</font></b>()
+}</tt></pre>
+</div></div>
+<p>Configuration for the HTTP/2 protocol.</p>
+<p>The default value is given next to the option name:</p>
+<!-- @todo Document content_handlers and gun_sse_h.-->
+<dl><dt>keepalive (5000)</dt>
+<dd><p>Time between pings in milliseconds.</p>
</dd>
-</dl></div>
-</div>
-<div class="sect2">
+</dl>
+<!-- @todo Allow and document max_frame_size_sent.-->
<h3 id="_opts">opts()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">opts</span></span>() <span style="color: #990000">::</span> #{
- <span style="color: #0000FF">connect_timeout</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">timeout</span></span>(),
- <span style="color: #0000FF">http_opts</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">http_opts</span></span>(),
- <span style="color: #0000FF">http2_opts</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">http2_opts</span></span>(),
- <span style="color: #0000FF">protocols</span> <span style="color: #990000">=&gt;</span> [<span style="color: #FF6600">http</span> | <span style="color: #FF6600">http2</span>],
- <span style="color: #0000FF">retry</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">retry_timeout</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">pos_integer</span></span>(),
- <span style="color: #0000FF">trace</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>(),
- <span style="color: #0000FF">transport</span> <span style="color: #990000">=&gt;</span> <span style="color: #FF6600">tcp</span> | <span style="color: #FF6600">tls</span>,
- <span style="color: #0000FF">transport_opts</span> <span style="color: #990000">=&gt;</span> [<span style="font-weight: bold"><span style="color: #000000">gen_tcp:connect_option</span></span>()] | [<span style="font-weight: bold"><span style="color: #000000">ssl:connect_option</span></span>()],
- <span style="color: #0000FF">ws_opts</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">ws_opts</span></span>()
-}</tt></pre></div></div>
-<div class="paragraph"><p>Configuration for the connection.</p></div>
-<div class="paragraph"><p>The default value is given next to the option name:</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-connect_timeout (infinity)
-</dt>
-<dd>
-<p>
-Connection timeout.
-</p>
+<pre><tt><b><font color="#000000">opts</font></b>() <font color="#990000">::</font> #{
+ <font color="#0000FF">connect_timeout</font> <font color="#990000">=&gt;</font> <b><font color="#000000">timeout</font></b>(),
+ <font color="#0000FF">http_opts</font> <font color="#990000">=&gt;</font> <b><font color="#000000">http_opts</font></b>(),
+ <font color="#0000FF">http2_opts</font> <font color="#990000">=&gt;</font> <b><font color="#000000">http2_opts</font></b>(),
+ <font color="#0000FF">protocols</font> <font color="#990000">=&gt;</font> [<font color="#FF6600">http</font> | <font color="#FF6600">http2</font>],
+ <font color="#0000FF">retry</font> <font color="#990000">=&gt;</font> <b><font color="#000000">non_neg_integer</font></b>(),
+ <font color="#0000FF">retry_timeout</font> <font color="#990000">=&gt;</font> <b><font color="#000000">pos_integer</font></b>(),
+ <font color="#0000FF">trace</font> <font color="#990000">=&gt;</font> <b><font color="#000000">boolean</font></b>(),
+ <font color="#0000FF">transport</font> <font color="#990000">=&gt;</font> <font color="#FF6600">tcp</font> | <font color="#FF6600">tls</font>,
+ <font color="#0000FF">transport_opts</font> <font color="#990000">=&gt;</font> [<b><font color="#000000">gen_tcp:connect_option</font></b>()] | [<b><font color="#000000">ssl:connect_option</font></b>()],
+ <font color="#0000FF">ws_opts</font> <font color="#990000">=&gt;</font> <b><font color="#000000">ws_opts</font></b>()
+}</tt></pre>
+</div></div>
+<p>Configuration for the connection.</p>
+<p>The default value is given next to the option name:</p>
+<dl><dt>connect_timeout (infinity)</dt>
+<dd><p>Connection timeout.</p>
</dd>
-<dt class="hdlist1">
-http_opts (#{})
-</dt>
-<dd>
-<p>
-Options specific to the HTTP protocol.
-</p>
+<dt>http_opts (#{})</dt>
+<dd><p>Options specific to the HTTP protocol.</p>
</dd>
-<dt class="hdlist1">
-http2_opts (#{})
-</dt>
-<dd>
-<p>
-Options specific to the HTTP/2 protocol.
-</p>
+<dt>http2_opts (#{})</dt>
+<dd><p>Options specific to the HTTP/2 protocol.</p>
</dd>
-<dt class="hdlist1">
-protocols - see below
-</dt>
-<dd>
-<p>
-Ordered list of preferred protocols. When the transport is <code>tcp</code>,
-this list must contain exactly one protocol. When the transport
-is <code>tls</code>, this list must contain at least one protocol and will be
-used to negotiate a protocol via ALPN. When the server does not
-support ALPN then <code>http</code> will always be used. Defaults to
-<code>[http]</code> when the transport is <code>tcp</code>, and <code>[http2, http]</code> when the
-transport is <code>tls</code>.
-</p>
+<dt>protocols - see below</dt>
+<dd><p>Ordered list of preferred protocols. When the transport is <code>tcp</code>, this list must contain exactly one protocol. When the transport is <code>tls</code>, this list must contain at least one protocol and will be used to negotiate a protocol via ALPN. When the server does not support ALPN then <code>http</code> will always be used. Defaults to <code>[http]</code> when the transport is <code>tcp</code>, and <code>[http2, http]</code> when the transport is <code>tls</code>.</p>
</dd>
-<dt class="hdlist1">
-retry (5)
-</dt>
-<dd>
-<p>
-Number of times Gun will try to reconnect on failure before giving up.
-</p>
+<dt>retry (5)</dt>
+<dd><p>Number of times Gun will try to reconnect on failure before giving up.</p>
</dd>
-<dt class="hdlist1">
-retry_timeout (5000)
-</dt>
-<dd>
-<p>
-Time between retries in milliseconds.
-</p>
+<dt>retry_timeout (5000)</dt>
+<dd><p>Time between retries in milliseconds.</p>
</dd>
-<dt class="hdlist1">
-trace (false)
-</dt>
-<dd>
-<p>
-Whether to enable <code>dbg</code> tracing of the connection process. Should
-only be used during debugging.
-</p>
+<dt>trace (false)</dt>
+<dd><p>Whether to enable <code>dbg</code> tracing of the connection process. Should only be used during debugging.</p>
</dd>
-<dt class="hdlist1">
-transport - see below
-</dt>
-<dd>
-<p>
-Whether to use TLS or plain TCP. The default varies depending on the
-port used. Port 443 defaults to <code>tls</code>. All other ports default to <code>tcp</code>.
-</p>
+<dt>transport - see below</dt>
+<dd><p>Whether to use TLS or plain TCP. The default varies depending on the port used. Port 443 defaults to <code>tls</code>. All other ports default to <code>tcp</code>.</p>
</dd>
-<dt class="hdlist1">
-transport_opts ([])
-</dt>
-<dd>
-<p>
-Transport options. They are TCP options or TLS options depending on
-the selected transport.
-</p>
+<dt>transport_opts ([])</dt>
+<dd><p>Transport options. They are TCP options or TLS options depending on the selected transport.</p>
</dd>
-<dt class="hdlist1">
-ws_opts (#{})
-</dt>
-<dd>
-<p>
-Options specific to the Websocket protocol.
-</p>
+<dt>ws_opts (#{})</dt>
+<dd><p>Options specific to the Websocket protocol.</p>
</dd>
-</dl></div>
-</div>
-<div class="sect2">
+</dl>
<h3 id="_req_opts">req_opts()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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_opts</span></span>() <span style="color: #990000">::</span> #{
- <span style="color: #0000FF">reply_to</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000080">pid</span></span>()
-}</tt></pre></div></div>
-<div class="paragraph"><p>Configuration for a particular request.</p></div>
-<div class="paragraph"><p>The default value is given next to the option name:</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-reply_to (<code>self()</code>)
-</dt>
-<dd>
-<p>
-The pid of the process that will receive the response messages.
-</p>
+<pre><tt><b><font color="#000000">req_opts</font></b>() <font color="#990000">::</font> #{
+ <font color="#0000FF">reply_to</font> <font color="#990000">=&gt;</font> <b><font color="#000080">pid</font></b>()
+}</tt></pre>
+</div></div>
+<p>Configuration for a particular request.</p>
+<p>The default value is given next to the option name:</p>
+<dl><dt>reply_to (<code>self()</code>)</dt>
+<dd><p>The pid of the process that will receive the response messages.</p>
</dd>
-</dl></div>
-</div>
-<div class="sect2">
+</dl>
<h3 id="_ws_opts">ws_opts()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">ws_opts</span></span>() <span style="color: #990000">::</span> #{
- <span style="color: #0000FF">compress</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()
-}</tt></pre></div></div>
-<div class="paragraph"><p>Configuration for the Websocket protocol.</p></div>
-<div class="paragraph"><p>The default value is given next to the option name:</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-compress &#8658; boolean()
-</dt>
-<dd>
-<p>
-Whether to enable permessage-deflate compression. This does
-not guarantee that compression will be used as it is the
-server that ultimately decides. Defaults to false.
-</p>
+<pre><tt><b><font color="#000000">ws_opts</font></b>() <font color="#990000">::</font> #{
+ <font color="#0000FF">compress</font> <font color="#990000">=&gt;</font> <b><font color="#000000">boolean</font></b>()
+}</tt></pre>
+</div></div>
+<p>Configuration for the Websocket protocol.</p>
+<p>The default value is given next to the option name:</p>
+<dl><dt>compress =&gt; boolean()</dt>
+<dd><p>Whether to enable permessage-deflate compression. This does not guarantee that compression will be used as it is the server that ultimately decides. Defaults to false.</p>
</dd>
-</dl></div>
-</div>
-</div>
-</div>
-<div class="sect1">
+</dl>
+<!-- @todo Document default_protocol, protocols and user_opts.-->
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="..">gun(7)</a></p></div>
-</div>
-</div>
+<p><a href="..">gun(7)</a></p>
+
diff --git a/docs/en/gun/1.0/manual/gun_app/index.html b/docs/en/gun/1.0/manual/gun_app/index.html
index de6942c4..d1706ea0 100644
--- a/docs/en/gun/1.0/manual/gun_app/index.html
+++ b/docs/en/gun/1.0/manual/gun_app/index.html
@@ -62,72 +62,33 @@
<h1 class="lined-header"><span>gun(7)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>gun - HTTP/1.1, HTTP/2 and Websocket client for Erlang/OTP</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>gun - HTTP/1.1, HTTP/2 and Websocket client for Erlang/OTP</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Gun is an HTTP client for Erlang/OTP with support for the
-HTTP/1.1, HTTP/2 and Websocket protocols.</p></div>
-<div class="paragraph"><p>Gun aims to provide an easy to use, asynchronous and
-always-connected client. It maintains a permanent connection
-to the server and reconnects automatically when necessary.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Gun is an HTTP client for Erlang/OTP with support for the HTTP/1.1, HTTP/2 and Websocket protocols.</p>
+<p>Gun aims to provide an easy to use, asynchronous and always-connected client. It maintains a permanent connection to the server and reconnects automatically when necessary.</p>
<h2 id="_modules">Modules</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../gun">gun(3)</a> - Asynchronous HTTP client
-</p>
+<ul><li><a href="../gun">gun(3)</a> - Asynchronous HTTP client
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_dependencies">Dependencies</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="../cowlib">cowlib(7)</a> - Support library for manipulating Web protocols
-</p>
+<ul><li><a href="../cowlib">cowlib(7)</a> - Support library for manipulating Web protocols
</li>
-<li>
-<p>
-ssl - Secure communication over sockets
-</p>
+<li>ssl - Secure communication over sockets
</li>
-</ul></div>
-<div class="paragraph"><p>All these applications must be started before the <code>gun</code>
-application. To start Gun and all dependencies at once:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+</ul>
+<p>All these applications must be started before the <code>gun</code> application. To start Gun and all dependencies at once:</p>
+<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">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">application:ensure_all_started</span></span>(<span style="color: #FF6600">gun</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">application:ensure_all_started</font></b>(<font color="#FF6600">gun</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_environment">Environment</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <code>gun</code> application does not define any application
-environment configuration parameters.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The <code>gun</code> application does not define any application environment configuration parameters.</p>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../cowlib">cowlib(7)</a></p></div>
-</div>
-</div>
+<p><a href="../cowlib">cowlib(7)</a></p>
+
diff --git a/docs/en/gun/1.0/manual/gun_data/index.html b/docs/en/gun/1.0/manual/gun_data/index.html
index 31da2d23..bc3a5dc4 100644
--- a/docs/en/gun/1.0/manual/gun_data/index.html
+++ b/docs/en/gun/1.0/manual/gun_data/index.html
@@ -62,119 +62,57 @@
<h1 class="lined-header"><span>gun_data(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>gun_data - Response body</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>gun_data - Response body</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">gun_data</span>, <span style="color: #009900">ConnPid</span>, <span style="color: #009900">StreamRef</span>, <span style="color: #009900">IsFin</span>, <span style="color: #009900">Data</span>}
-
-<span style="color: #009900">ConnPid</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">pid</span></span>()
-<span style="color: #009900">StreamRef</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">reference</span></span>()
-<span style="color: #009900">IsFin</span> <span style="color: #990000">::</span> <span style="color: #FF6600">fin</span> | <span style="color: #FF6600">nofin</span>
-<span style="color: #009900">Data</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>Response body.</p></div>
-<div class="paragraph"><p>This message informs the relevant process that the server
-sent a all or part of the body for the response to the
-original request.</p></div>
-<div class="paragraph"><p>A data message is always preceded by a response message.</p></div>
-<div class="paragraph"><p>The response body may be terminated either by a data
-message with the flag <code>fin</code> set or by a
-<a href="../gun_trailers">gun_trailers(3)</a> message.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#FF6600">gun_data</font>, <font color="#009900">ConnPid</font>, <font color="#009900">StreamRef</font>, <font color="#009900">IsFin</font>, <font color="#009900">Data</font>}
+
+<font color="#009900">ConnPid</font> <font color="#990000">::</font> <b><font color="#000080">pid</font></b>()
+<font color="#009900">StreamRef</font> <font color="#990000">::</font> <b><font color="#000080">reference</font></b>()
+<font color="#009900">IsFin</font> <font color="#990000">::</font> <font color="#FF6600">fin</font> | <font color="#FF6600">nofin</font>
+<font color="#009900">Data</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()</tt></pre>
+</div></div>
+<p>Response body.</p>
+<p>This message informs the relevant process that the server sent a all or part of the body for the response to the original request.</p>
+<p>A data message is always preceded by a response message.</p>
+<p>The response body may be terminated either by a data message with the flag <code>fin</code> set or by a <a href="../gun_trailers">gun_trailers(3)</a> message.</p>
<h2 id="_elements">Elements</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-ConnPid
-</dt>
-<dd>
-<p>
-The pid of the Gun connection process.
-</p>
+<dl><dt>ConnPid</dt>
+<dd><p>The pid of the Gun connection process.</p>
</dd>
-<dt class="hdlist1">
-StreamRef
-</dt>
-<dd>
-<p>
-Identifier of the stream for the original request.
-</p>
+<dt>StreamRef</dt>
+<dd><p>Identifier of the stream for the original request.</p>
</dd>
-<dt class="hdlist1">
-IsFin
-</dt>
-<dd>
-<p>
-Whether this message terminates the response.
-</p>
+<dt>IsFin</dt>
+<dd><p>Whether this message terminates the response.</p>
</dd>
-<dt class="hdlist1">
-Data
-</dt>
-<dd>
-<p>
-All or part of the response body.
-</p>
+<dt>Data</dt>
+<dd><p>All or part of the response body.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>1.0</strong>: Message introduced.
-</p>
+<ul><li><strong>1.0</strong>: Message introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Receive a gun_data message in a gen_server</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Receive a gun_data message in a gen_server</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">handle_info</span></span>({<span style="color: #FF6600">gun_data</span>, <span style="color: #009900">ConnPid</span>, <span style="color: #009900">_StreamRef</span>,
- <span style="color: #009900">_IsFin</span>, <span style="color: #009900">_Data</span>},
- <span style="color: #009900">State</span><span style="color: #990000">=</span><span style="color: #008080">#state</span>{<span style="color: #0000FF">conn_pid</span><span style="color: #990000">=</span><span style="color: #009900">ConnPid</span>}) <span style="color: #990000">-&gt;</span>
- <span style="font-style: italic"><span style="color: #9A1900">%% Do something.</span></span>
- {<span style="color: #FF6600">noreply</span>, <span style="color: #009900">State</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">handle_info</font></b>({<font color="#FF6600">gun_data</font>, <font color="#009900">ConnPid</font>, <font color="#009900">_StreamRef</font>,
+ <font color="#009900">_IsFin</font>, <font color="#009900">_Data</font>},
+ <font color="#009900">State</font><font color="#990000">=</font><font color="#008080">#state</font>{<font color="#0000FF">conn_pid</font><font color="#990000">=</font><font color="#009900">ConnPid</font>}) <font color="#990000">-&gt;</font>
+ <i><font color="#9A1900">%% Do something.</font></i>
+ {<font color="#FF6600">noreply</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../gun">gun(3)</a>,
-<a href="../gun.get">gun:get(3)</a>,
-<a href="../gun.head">gun:head(3)</a>,
-<a href="../gun.patch">gun:patch(3)</a>,
-<a href="../gun.post">gun:post(3)</a>,
-<a href="../gun.put">gun:put(3)</a>,
-<a href="../gun.delete">gun:delete(3)</a>,
-<a href="../gun.options">gun:options(3)</a>,
-<a href="../gun.request">gun:request(3)</a>,
-<a href="../gun_response">gun_response(3)</a>,
-<a href="../gun_trailers">gun_trailers(3)</a></p></div>
-</div>
-</div>
+<p><a href="../gun">gun(3)</a>, <a href="../gun.get">gun:get(3)</a>, <a href="../gun.head">gun:head(3)</a>, <a href="../gun.patch">gun:patch(3)</a>, <a href="../gun.post">gun:post(3)</a>, <a href="../gun.put">gun:put(3)</a>, <a href="../gun.delete">gun:delete(3)</a>, <a href="../gun.options">gun:options(3)</a>, <a href="../gun.request">gun:request(3)</a>, <a href="../gun_response">gun_response(3)</a>, <a href="../gun_trailers">gun_trailers(3)</a></p>
+
diff --git a/docs/en/gun/1.0/manual/gun_down/index.html b/docs/en/gun/1.0/manual/gun_down/index.html
index ddc7c7e1..40698e50 100644
--- a/docs/en/gun/1.0/manual/gun_down/index.html
+++ b/docs/en/gun/1.0/manual/gun_down/index.html
@@ -62,130 +62,63 @@
<h1 class="lined-header"><span>gun_down(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>gun_down - The connection is down</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>gun_down - The connection is down</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">gun_down</span>, <span style="color: #009900">ConnPid</span>, <span style="color: #009900">Protocol</span>, <span style="color: #009900">Reason</span>, <span style="color: #009900">KilledStreams</span>, <span style="color: #009900">UnprocessedStreams</span>}
-
-<span style="color: #009900">ConnPid</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">pid</span></span>()
-<span style="color: #009900">Protocol</span> <span style="color: #990000">::</span> <span style="color: #FF6600">http</span> | <span style="color: #FF6600">http2</span> | <span style="color: #FF6600">ws</span>
-<span style="color: #009900">Reason</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()
-<span style="color: #009900">KilledStreams</span> <span style="color: #990000">::</span> [<span style="font-weight: bold"><span style="color: #000080">reference</span></span>()]
-<span style="color: #009900">UnprocessedStreams</span> <span style="color: #990000">::</span> [<span style="font-weight: bold"><span style="color: #000080">reference</span></span>()]</tt></pre></div></div>
-<div class="paragraph"><p>The connection is down.</p></div>
-<div class="paragraph"><p>This message informs the owner process that the connection
-was lost. Depending on the <code>retry</code> and <code>retry_timeout</code>
-options Gun may automatically attempt to reconnect.</p></div>
-<div class="paragraph"><p>When the connection goes back up, Gun will not attempt to retry
-requests. It will also not upgrade to Websocket automatically
-if that was the protocol in use when the connection was lost.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#FF6600">gun_down</font>, <font color="#009900">ConnPid</font>, <font color="#009900">Protocol</font>, <font color="#009900">Reason</font>, <font color="#009900">KilledStreams</font>, <font color="#009900">UnprocessedStreams</font>}
+
+<font color="#009900">ConnPid</font> <font color="#990000">::</font> <b><font color="#000080">pid</font></b>()
+<font color="#009900">Protocol</font> <font color="#990000">::</font> <font color="#FF6600">http</font> | <font color="#FF6600">http2</font> | <font color="#FF6600">ws</font>
+<font color="#009900">Reason</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()
+<font color="#009900">KilledStreams</font> <font color="#990000">::</font> [<b><font color="#000080">reference</font></b>()]
+<font color="#009900">UnprocessedStreams</font> <font color="#990000">::</font> [<b><font color="#000080">reference</font></b>()]</tt></pre>
+</div></div>
+<p>The connection is down.</p>
+<p>This message informs the owner process that the connection was lost. Depending on the <code>retry</code> and <code>retry_timeout</code> options Gun may automatically attempt to reconnect.</p>
+<p>When the connection goes back up, Gun will not attempt to retry requests. It will also not upgrade to Websocket automatically if that was the protocol in use when the connection was lost.</p>
<h2 id="_elements">Elements</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-ConnPid
-</dt>
-<dd>
-<p>
-The pid of the Gun connection process.
-</p>
+<dl><dt>ConnPid</dt>
+<dd><p>The pid of the Gun connection process.</p>
</dd>
-<dt class="hdlist1">
-Protocol
-</dt>
-<dd>
-<p>
-The protocol that was selected for this connection
-or upgraded to during the course of the connection.
-</p>
+<dt>Protocol</dt>
+<dd><p>The protocol that was selected for this connection or upgraded to during the course of the connection.</p>
</dd>
-<dt class="hdlist1">
-Reason
-</dt>
-<dd>
-<p>
-The reason for the loss of the connection.
-</p>
-<div class="paragraph"><p>It is present for debugging purposes only. You should not
-rely on this value to perform operations programmatically.</p></div>
+<dt>Reason</dt>
+<dd><p>The reason for the loss of the connection.</p>
+<p>It is present for debugging purposes only. You should not rely on this value to perform operations programmatically.</p>
</dd>
-<dt class="hdlist1">
-KilledStreams
-</dt>
-<dd>
-<p>
-List of streams that have been brutally terminated.
-</p>
-<div class="paragraph"><p>They are active streams that did not complete before the closing
-of the connection. Whether they can be retried safely depends
-on the protocol used and the idempotence property of the requests.</p></div>
+<dt>KilledStreams</dt>
+<dd><p>List of streams that have been brutally terminated.</p>
+<p>They are active streams that did not complete before the closing of the connection. Whether they can be retried safely depends on the protocol used and the idempotence property of the requests.</p>
</dd>
-<dt class="hdlist1">
-UnprocessedStreams
-</dt>
-<dd>
-<p>
-List of streams that have not been processed by the server.
-</p>
-<div class="paragraph"><p>They are streams that the server did not start processing yet.
-They may be retried safely depending on whether related streams
-were killed.</p></div>
+<dt>UnprocessedStreams</dt>
+<dd><p>List of streams that have not been processed by the server.</p>
+<p>They are streams that the server did not start processing yet. They may be retried safely depending on whether related streams were killed.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>1.0</strong>: Message introduced.
-</p>
+<ul><li><strong>1.0</strong>: Message introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Receive a gun_down message in a gen_server</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Receive a gun_down message in a gen_server</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">handle_info</span></span>({<span style="color: #FF6600">gun_down</span>, <span style="color: #009900">ConnPid</span>, <span style="color: #009900">_Protocol</span>,
- <span style="color: #009900">_Reason</span>, <span style="color: #009900">_Killed</span>, <span style="color: #009900">_Unprocessed</span>},
- <span style="color: #009900">State</span><span style="color: #990000">=</span><span style="color: #008080">#state</span>{<span style="color: #0000FF">conn_pid</span><span style="color: #990000">=</span><span style="color: #009900">ConnPid</span>}) <span style="color: #990000">-&gt;</span>
- <span style="font-style: italic"><span style="color: #9A1900">%% Do something.</span></span>
- {<span style="color: #FF6600">noreply</span>, <span style="color: #009900">State</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">handle_info</font></b>({<font color="#FF6600">gun_down</font>, <font color="#009900">ConnPid</font>, <font color="#009900">_Protocol</font>,
+ <font color="#009900">_Reason</font>, <font color="#009900">_Killed</font>, <font color="#009900">_Unprocessed</font>},
+ <font color="#009900">State</font><font color="#990000">=</font><font color="#008080">#state</font>{<font color="#0000FF">conn_pid</font><font color="#990000">=</font><font color="#009900">ConnPid</font>}) <font color="#990000">-&gt;</font>
+ <i><font color="#9A1900">%% Do something.</font></i>
+ {<font color="#FF6600">noreply</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../gun">gun(3)</a>,
-<a href="../gun.open">gun:open(3)</a>,
-<a href="../gun.open_unix">gun:open_unix(3)</a>,
-<a href="../gun_up">gun_up(3)</a>,
-<a href="../gun_error">gun_error(3)</a></p></div>
-</div>
-</div>
+<p><a href="../gun">gun(3)</a>, <a href="../gun.open">gun:open(3)</a>, <a href="../gun.open_unix">gun:open_unix(3)</a>, <a href="../gun_up">gun_up(3)</a>, <a href="../gun_error">gun_error(3)</a></p>
+
diff --git a/docs/en/gun/1.0/manual/gun_error/index.html b/docs/en/gun/1.0/manual/gun_error/index.html
index 1d8499d3..10e9462c 100644
--- a/docs/en/gun/1.0/manual/gun_error/index.html
+++ b/docs/en/gun/1.0/manual/gun_error/index.html
@@ -62,106 +62,56 @@
<h1 class="lined-header"><span>gun_error(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>gun_error - Stream or connection-wide error</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>gun_error - Stream or connection-wide error</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">gun_error</span>, <span style="color: #009900">ConnPid</span>, <span style="color: #009900">StreamRef</span>, <span style="color: #009900">Reason</span>}
-{<span style="color: #FF6600">gun_error</span>, <span style="color: #009900">ConnPid</span>, <span style="color: #009900">Reason</span>}
-
-<span style="color: #009900">ConnPid</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">pid</span></span>()
-<span style="color: #009900">StreamRef</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">reference</span></span>()
-<span style="color: #009900">Reason</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>Stream or connection-wide error.</p></div>
-<div class="paragraph"><p>These messages inform the relevant process that an error
-occurred. A reference is given when the error pertains
-to a specific stream. Connection-wide errors do not
-imply that the connection is no longer usable, they are
-used for all errors that are not specific to a stream.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#FF6600">gun_error</font>, <font color="#009900">ConnPid</font>, <font color="#009900">StreamRef</font>, <font color="#009900">Reason</font>}
+{<font color="#FF6600">gun_error</font>, <font color="#009900">ConnPid</font>, <font color="#009900">Reason</font>}
+
+<font color="#009900">ConnPid</font> <font color="#990000">::</font> <b><font color="#000080">pid</font></b>()
+<font color="#009900">StreamRef</font> <font color="#990000">::</font> <b><font color="#000080">reference</font></b>()
+<font color="#009900">Reason</font> <font color="#990000">::</font> <b><font color="#000000">any</font></b>()</tt></pre>
+</div></div>
+<p>Stream or connection-wide error.</p>
+<p>These messages inform the relevant process that an error occurred. A reference is given when the error pertains to a specific stream. Connection-wide errors do not imply that the connection is no longer usable, they are used for all errors that are not specific to a stream.</p>
<h2 id="_elements">Elements</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-ConnPid
-</dt>
-<dd>
-<p>
-The pid of the Gun connection process.
-</p>
+<dl><dt>ConnPid</dt>
+<dd><p>The pid of the Gun connection process.</p>
</dd>
-<dt class="hdlist1">
-StreamRef
-</dt>
-<dd>
-<p>
-Identifier of the stream that resulted in an error.
-</p>
+<dt>StreamRef</dt>
+<dd><p>Identifier of the stream that resulted in an error.</p>
</dd>
-<dt class="hdlist1">
-Reason
-</dt>
-<dd>
-<p>
-The reason for the error.
-</p>
-<div class="paragraph"><p>It is present for debugging purposes only. You should not
-rely on this value to perform operations programmatically.</p></div>
+<dt>Reason</dt>
+<dd><p>The reason for the error.</p>
+<p>It is present for debugging purposes only. You should not rely on this value to perform operations programmatically.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>1.0</strong>: Message introduced.
-</p>
+<ul><li><strong>1.0</strong>: Message introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Receive a gun_error message in a gen_server</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Receive a gun_error message in a gen_server</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">handle_info</span></span>({<span style="color: #FF6600">gun_error</span>, <span style="color: #009900">ConnPid</span>, <span style="color: #009900">_Reason</span>},
- <span style="color: #009900">State</span><span style="color: #990000">=</span><span style="color: #008080">#state</span>{<span style="color: #0000FF">conn_pid</span><span style="color: #990000">=</span><span style="color: #009900">ConnPid</span>}) <span style="color: #990000">-&gt;</span>
- <span style="font-style: italic"><span style="color: #9A1900">%% Do something.</span></span>
- {<span style="color: #FF6600">noreply</span>, <span style="color: #009900">State</span>};
-<span style="font-weight: bold"><span style="color: #000000">handle_info</span></span>({<span style="color: #FF6600">gun_error</span>, <span style="color: #009900">ConnPid</span>, <span style="color: #009900">_StreamRef</span>, <span style="color: #009900">_Reason</span>},
- <span style="color: #009900">State</span><span style="color: #990000">=</span><span style="color: #008080">#state</span>{<span style="color: #0000FF">conn_pid</span><span style="color: #990000">=</span><span style="color: #009900">ConnPid</span>}) <span style="color: #990000">-&gt;</span>
- <span style="font-style: italic"><span style="color: #9A1900">%% Do something.</span></span>
- {<span style="color: #FF6600">noreply</span>, <span style="color: #009900">State</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">handle_info</font></b>({<font color="#FF6600">gun_error</font>, <font color="#009900">ConnPid</font>, <font color="#009900">_Reason</font>},
+ <font color="#009900">State</font><font color="#990000">=</font><font color="#008080">#state</font>{<font color="#0000FF">conn_pid</font><font color="#990000">=</font><font color="#009900">ConnPid</font>}) <font color="#990000">-&gt;</font>
+ <i><font color="#9A1900">%% Do something.</font></i>
+ {<font color="#FF6600">noreply</font>, <font color="#009900">State</font>};
+<b><font color="#000000">handle_info</font></b>({<font color="#FF6600">gun_error</font>, <font color="#009900">ConnPid</font>, <font color="#009900">_StreamRef</font>, <font color="#009900">_Reason</font>},
+ <font color="#009900">State</font><font color="#990000">=</font><font color="#008080">#state</font>{<font color="#0000FF">conn_pid</font><font color="#990000">=</font><font color="#009900">ConnPid</font>}) <font color="#990000">-&gt;</font>
+ <i><font color="#9A1900">%% Do something.</font></i>
+ {<font color="#FF6600">noreply</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../gun">gun(3)</a>,
-<a href="../gun_up">gun_up(3)</a>,
-<a href="../gun_down">gun_down(3)</a></p></div>
-</div>
-</div>
+<p><a href="../gun">gun(3)</a>, <a href="../gun_up">gun_up(3)</a>, <a href="../gun_down">gun_down(3)</a></p>
+
diff --git a/docs/en/gun/1.0/manual/gun_inform/index.html b/docs/en/gun/1.0/manual/gun_inform/index.html
index 7f04b59b..b2970f53 100644
--- a/docs/en/gun/1.0/manual/gun_inform/index.html
+++ b/docs/en/gun/1.0/manual/gun_inform/index.html
@@ -62,113 +62,56 @@
<h1 class="lined-header"><span>gun_inform(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>gun_inform - Informational response</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>gun_inform - Informational response</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">gun_inform</span>, <span style="color: #009900">ConnPid</span>, <span style="color: #009900">StreamRef</span>, <span style="color: #009900">Status</span>, <span style="color: #009900">Headers</span>}
-
-<span style="color: #009900">ConnPid</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">pid</span></span>()
-<span style="color: #009900">StreamRef</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">reference</span></span>()
-<span style="color: #009900">Status</span> <span style="color: #990000">::</span> <span style="color: #993399">100</span><span style="color: #990000">..</span><span style="color: #993399">199</span>
-<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="font-weight: bold"><span style="color: #000080">binary</span></span>()}]</tt></pre></div></div>
-<div class="paragraph"><p>Informational response.</p></div>
-<div class="paragraph"><p>This message informs the relevant process that the server
-sent an informational response to the original request.</p></div>
-<div class="paragraph"><p>Informational responses are only intermediate responses
-and provide no guarantees as to what the final response
-will be. An informational response always precedes the
-response to the original request.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#FF6600">gun_inform</font>, <font color="#009900">ConnPid</font>, <font color="#009900">StreamRef</font>, <font color="#009900">Status</font>, <font color="#009900">Headers</font>}
+
+<font color="#009900">ConnPid</font> <font color="#990000">::</font> <b><font color="#000080">pid</font></b>()
+<font color="#009900">StreamRef</font> <font color="#990000">::</font> <b><font color="#000080">reference</font></b>()
+<font color="#009900">Status</font> <font color="#990000">::</font> <font color="#993399">100</font><font color="#990000">..</font><font color="#993399">199</font>
+<font color="#009900">Headers</font> <font color="#990000">::</font> [{<b><font color="#000080">binary</font></b>(), <b><font color="#000080">binary</font></b>()}]</tt></pre>
+</div></div>
+<p>Informational response.</p>
+<p>This message informs the relevant process that the server sent an informational response to the original request.</p>
+<p>Informational responses are only intermediate responses and provide no guarantees as to what the final response will be. An informational response always precedes the response to the original request.</p>
<h2 id="_elements">Elements</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-ConnPid
-</dt>
-<dd>
-<p>
-The pid of the Gun connection process.
-</p>
+<dl><dt>ConnPid</dt>
+<dd><p>The pid of the Gun connection process.</p>
</dd>
-<dt class="hdlist1">
-StreamRef
-</dt>
-<dd>
-<p>
-Identifier of the stream for the original request.
-</p>
+<dt>StreamRef</dt>
+<dd><p>Identifier of the stream for the original request.</p>
</dd>
-<dt class="hdlist1">
-Status
-</dt>
-<dd>
-<p>
-Status code for the informational response.
-</p>
+<dt>Status</dt>
+<dd><p>Status code for the informational response.</p>
</dd>
-<dt class="hdlist1">
-Headers
-</dt>
-<dd>
-<p>
-Headers sent with the informational response.
-</p>
+<dt>Headers</dt>
+<dd><p>Headers sent with the informational response.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>1.0</strong>: Message introduced.
-</p>
+<ul><li><strong>1.0</strong>: Message introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Receive a gun_inform message in a gen_server</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Receive a gun_inform message in a gen_server</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">handle_info</span></span>({<span style="color: #FF6600">gun_inform</span>, <span style="color: #009900">ConnPid</span>, <span style="color: #009900">_StreamRef</span>,
- <span style="color: #009900">_Status</span>, <span style="color: #009900">_Headers</span>},
- <span style="color: #009900">State</span><span style="color: #990000">=</span><span style="color: #008080">#state</span>{<span style="color: #0000FF">conn_pid</span><span style="color: #990000">=</span><span style="color: #009900">ConnPid</span>}) <span style="color: #990000">-&gt;</span>
- <span style="font-style: italic"><span style="color: #9A1900">%% Do something.</span></span>
- {<span style="color: #FF6600">noreply</span>, <span style="color: #009900">State</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">handle_info</font></b>({<font color="#FF6600">gun_inform</font>, <font color="#009900">ConnPid</font>, <font color="#009900">_StreamRef</font>,
+ <font color="#009900">_Status</font>, <font color="#009900">_Headers</font>},
+ <font color="#009900">State</font><font color="#990000">=</font><font color="#008080">#state</font>{<font color="#0000FF">conn_pid</font><font color="#990000">=</font><font color="#009900">ConnPid</font>}) <font color="#990000">-&gt;</font>
+ <i><font color="#9A1900">%% Do something.</font></i>
+ {<font color="#FF6600">noreply</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../gun">gun(3)</a>,
-<a href="../gun.get">gun:get(3)</a>,
-<a href="../gun.patch">gun:patch(3)</a>,
-<a href="../gun.post">gun:post(3)</a>,
-<a href="../gun.put">gun:put(3)</a>,
-<a href="../gun_response">gun_response(3)</a></p></div>
-</div>
-</div>
+<p><a href="../gun">gun(3)</a>, <a href="../gun.get">gun:get(3)</a>, <a href="../gun.patch">gun:patch(3)</a>, <a href="../gun.post">gun:post(3)</a>, <a href="../gun.put">gun:put(3)</a>, <a href="../gun_response">gun_response(3)</a></p>
+
diff --git a/docs/en/gun/1.0/manual/gun_push/index.html b/docs/en/gun/1.0/manual/gun_push/index.html
index 86229224..15075e15 100644
--- a/docs/en/gun/1.0/manual/gun_push/index.html
+++ b/docs/en/gun/1.0/manual/gun_push/index.html
@@ -62,141 +62,76 @@
<h1 class="lined-header"><span>gun_push(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>gun_push - Server-initiated push</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>gun_push - Server-initiated push</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">gun_push</span>, <span style="color: #009900">ConnPid</span>, <span style="color: #009900">StreamRef</span>, <span style="color: #009900">NewStreamRef</span>, <span style="color: #009900">Method</span>, <span style="color: #009900">URI</span>, <span style="color: #009900">Headers</span>}
-
-<span style="color: #009900">ConnPid</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">pid</span></span>()
-<span style="color: #009900">StreamRef</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">reference</span></span>()
-<span style="color: #009900">NewStreamRef</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">reference</span></span>()
-<span style="color: #009900">Method</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()
-<span style="color: #009900">URI</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()
-<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="font-weight: bold"><span style="color: #000080">binary</span></span>()}]</tt></pre></div></div>
-<div class="paragraph"><p>Server-initiated push.</p></div>
-<div class="paragraph"><p>This message informs the relevant process that the server
-is pushing a resource related to the effective target URI
-of the original request.</p></div>
-<div class="paragraph"><p>A server-initiated push message always precedes the response
-to the original request.</p></div>
-<div class="paragraph"><p>This message will not be sent when using the HTTP/1.1 protocol
-because it lacks the concept of server-initiated push.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#FF6600">gun_push</font>, <font color="#009900">ConnPid</font>, <font color="#009900">StreamRef</font>, <font color="#009900">NewStreamRef</font>, <font color="#009900">Method</font>, <font color="#009900">URI</font>, <font color="#009900">Headers</font>}
+
+<font color="#009900">ConnPid</font> <font color="#990000">::</font> <b><font color="#000080">pid</font></b>()
+<font color="#009900">StreamRef</font> <font color="#990000">::</font> <b><font color="#000080">reference</font></b>()
+<font color="#009900">NewStreamRef</font> <font color="#990000">::</font> <b><font color="#000080">reference</font></b>()
+<font color="#009900">Method</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()
+<font color="#009900">URI</font> <font color="#990000">::</font> <b><font color="#000080">binary</font></b>()
+<font color="#009900">Headers</font> <font color="#990000">::</font> [{<b><font color="#000080">binary</font></b>(), <b><font color="#000080">binary</font></b>()}]</tt></pre>
+</div></div>
+<p>Server-initiated push.</p>
+<p>This message informs the relevant process that the server is pushing a resource related to the effective target URI of the original request.</p>
+<p>A server-initiated push message always precedes the response to the original request.</p>
+<p>This message will not be sent when using the HTTP/1.1 protocol because it lacks the concept of server-initiated push.</p>
<h2 id="_elements">Elements</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-ConnPid
-</dt>
-<dd>
-<p>
-The pid of the Gun connection process.
-</p>
+<dl><dt>ConnPid</dt>
+<dd><p>The pid of the Gun connection process.</p>
</dd>
-<dt class="hdlist1">
-StreamRef
-</dt>
-<dd>
-<p>
-Identifier of the stream for the original request.
-</p>
+<dt>StreamRef</dt>
+<dd><p>Identifier of the stream for the original request.</p>
</dd>
-<dt class="hdlist1">
-NewStreamRef
-</dt>
-<dd>
-<p>
-Identifier of the stream being pushed.
-</p>
+<dt>NewStreamRef</dt>
+<dd><p>Identifier of the stream being pushed.</p>
</dd>
-<dt class="hdlist1">
-Method
-</dt>
-<dd>
-<p>
-Method of the equivalent HTTP request.
-</p>
+<dt>Method</dt>
+<dd><p>Method of the equivalent HTTP request.</p>
</dd>
-<dt class="hdlist1">
-URI
-</dt>
-<dd>
-<p>
-URI of the resource being pushed.
-</p>
+<dt>URI</dt>
+<dd><p>URI of the resource being pushed.</p>
</dd>
-<dt class="hdlist1">
-Headers
-</dt>
-<dd>
-<p>
-Headers of the equivalent HTTP request.
-</p>
+<dt>Headers</dt>
+<dd><p>Headers of the equivalent HTTP request.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>1.0</strong>: Message introduced.
-</p>
+<ul><li><strong>1.0</strong>: Message introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Receive a gun_push message in a gen_server</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Receive a gun_push message in a gen_server</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">handle_info</span></span>({<span style="color: #FF6600">gun_push</span>, <span style="color: #009900">ConnPid</span>, <span style="color: #009900">_StreamRef</span>,
- <span style="color: #009900">_NewStreamRef</span>, <span style="color: #009900">_Method</span>, <span style="color: #009900">_URI</span>, <span style="color: #009900">_Headers</span>},
- <span style="color: #009900">State</span><span style="color: #990000">=</span><span style="color: #008080">#state</span>{<span style="color: #0000FF">conn_pid</span><span style="color: #990000">=</span><span style="color: #009900">ConnPid</span>}) <span style="color: #990000">-&gt;</span>
- <span style="font-style: italic"><span style="color: #9A1900">%% Do something.</span></span>
- {<span style="color: #FF6600">noreply</span>, <span style="color: #009900">State</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Cancel an unwanted push</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">handle_info</font></b>({<font color="#FF6600">gun_push</font>, <font color="#009900">ConnPid</font>, <font color="#009900">_StreamRef</font>,
+ <font color="#009900">_NewStreamRef</font>, <font color="#009900">_Method</font>, <font color="#009900">_URI</font>, <font color="#009900">_Headers</font>},
+ <font color="#009900">State</font><font color="#990000">=</font><font color="#008080">#state</font>{<font color="#0000FF">conn_pid</font><font color="#990000">=</font><font color="#009900">ConnPid</font>}) <font color="#990000">-&gt;</font>
+ <i><font color="#9A1900">%% Do something.</font></i>
+ {<font color="#FF6600">noreply</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Cancel an unwanted push</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">handle_info</span></span>({<span style="color: #FF6600">gun_push</span>, <span style="color: #009900">ConnPid</span>, <span style="color: #009900">_StreamRef</span>,
- <span style="color: #009900">NewStreamRef</span>, <span style="color: #009900">_Method</span>, <span style="color: #009900">_URI</span>, <span style="color: #009900">_Headers</span>},
- <span style="color: #009900">State</span><span style="color: #990000">=</span><span style="color: #008080">#state</span>{<span style="color: #0000FF">conn_pid</span><span style="color: #990000">=</span><span style="color: #009900">ConnPid</span>}) <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #000000">gun:cancel</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">NewStreamRef</span>),
- {<span style="color: #FF6600">noreply</span>, <span style="color: #009900">State</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">handle_info</font></b>({<font color="#FF6600">gun_push</font>, <font color="#009900">ConnPid</font>, <font color="#009900">_StreamRef</font>,
+ <font color="#009900">NewStreamRef</font>, <font color="#009900">_Method</font>, <font color="#009900">_URI</font>, <font color="#009900">_Headers</font>},
+ <font color="#009900">State</font><font color="#990000">=</font><font color="#008080">#state</font>{<font color="#0000FF">conn_pid</font><font color="#990000">=</font><font color="#009900">ConnPid</font>}) <font color="#990000">-&gt;</font>
+ <b><font color="#000000">gun:cancel</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">NewStreamRef</font>),
+ {<font color="#FF6600">noreply</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../gun">gun(3)</a>,
-<a href="../gun.get">gun:get(3)</a>,
-<a href="../gun.cancel">gun:cancel(3)</a>,
-<a href="../gun_response">gun_response(3)</a></p></div>
-</div>
-</div>
+<p><a href="../gun">gun(3)</a>, <a href="../gun.get">gun:get(3)</a>, <a href="../gun.cancel">gun:cancel(3)</a>, <a href="../gun_response">gun_response(3)</a></p>
+
diff --git a/docs/en/gun/1.0/manual/gun_response/index.html b/docs/en/gun/1.0/manual/gun_response/index.html
index 379142ba..52a9e5d3 100644
--- a/docs/en/gun/1.0/manual/gun_response/index.html
+++ b/docs/en/gun/1.0/manual/gun_response/index.html
@@ -62,123 +62,59 @@
<h1 class="lined-header"><span>gun_response(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>gun_response - Response</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>gun_response - Response</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">gun_response</span>, <span style="color: #009900">ConnPid</span>, <span style="color: #009900">StreamRef</span>, <span style="color: #009900">IsFin</span>, <span style="color: #009900">Status</span>, <span style="color: #009900">Headers</span>}
-
-<span style="color: #009900">ConnPid</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">pid</span></span>()
-<span style="color: #009900">StreamRef</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">reference</span></span>()
-<span style="color: #009900">IsFin</span> <span style="color: #990000">::</span> <span style="color: #FF6600">fin</span> | <span style="color: #FF6600">nofin</span>
-<span style="color: #009900">Status</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>()
-<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="font-weight: bold"><span style="color: #000080">binary</span></span>()}]</tt></pre></div></div>
-<div class="paragraph"><p>Response.</p></div>
-<div class="paragraph"><p>This message informs the relevant process that the server
-sent a response to the original request.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#FF6600">gun_response</font>, <font color="#009900">ConnPid</font>, <font color="#009900">StreamRef</font>, <font color="#009900">IsFin</font>, <font color="#009900">Status</font>, <font color="#009900">Headers</font>}
+
+<font color="#009900">ConnPid</font> <font color="#990000">::</font> <b><font color="#000080">pid</font></b>()
+<font color="#009900">StreamRef</font> <font color="#990000">::</font> <b><font color="#000080">reference</font></b>()
+<font color="#009900">IsFin</font> <font color="#990000">::</font> <font color="#FF6600">fin</font> | <font color="#FF6600">nofin</font>
+<font color="#009900">Status</font> <font color="#990000">::</font> <b><font color="#000000">non_neg_integer</font></b>()
+<font color="#009900">Headers</font> <font color="#990000">::</font> [{<b><font color="#000080">binary</font></b>(), <b><font color="#000080">binary</font></b>()}]</tt></pre>
+</div></div>
+<p>Response.</p>
+<p>This message informs the relevant process that the server sent a response to the original request.</p>
<h2 id="_elements">Elements</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-ConnPid
-</dt>
-<dd>
-<p>
-The pid of the Gun connection process.
-</p>
+<dl><dt>ConnPid</dt>
+<dd><p>The pid of the Gun connection process.</p>
</dd>
-<dt class="hdlist1">
-StreamRef
-</dt>
-<dd>
-<p>
-Identifier of the stream for the original request.
-</p>
+<dt>StreamRef</dt>
+<dd><p>Identifier of the stream for the original request.</p>
</dd>
-<dt class="hdlist1">
-IsFin
-</dt>
-<dd>
-<p>
-Whether this message terminates the response.
-</p>
+<dt>IsFin</dt>
+<dd><p>Whether this message terminates the response.</p>
</dd>
-<dt class="hdlist1">
-Status
-</dt>
-<dd>
-<p>
-Status code for the response.
-</p>
+<dt>Status</dt>
+<dd><p>Status code for the response.</p>
</dd>
-<dt class="hdlist1">
-Headers
-</dt>
-<dd>
-<p>
-Headers sent with the response.
-</p>
+<dt>Headers</dt>
+<dd><p>Headers sent with the response.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>1.0</strong>: Message introduced.
-</p>
+<ul><li><strong>1.0</strong>: Message introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Receive a gun_response message in a gen_server</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Receive a gun_response message in a gen_server</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">handle_info</span></span>({<span style="color: #FF6600">gun_response</span>, <span style="color: #009900">ConnPid</span>, <span style="color: #009900">_StreamRef</span>,
- <span style="color: #009900">_IsFin</span>, <span style="color: #009900">_Status</span>, <span style="color: #009900">_Headers</span>},
- <span style="color: #009900">State</span><span style="color: #990000">=</span><span style="color: #008080">#state</span>{<span style="color: #0000FF">conn_pid</span><span style="color: #990000">=</span><span style="color: #009900">ConnPid</span>}) <span style="color: #990000">-&gt;</span>
- <span style="font-style: italic"><span style="color: #9A1900">%% Do something.</span></span>
- {<span style="color: #FF6600">noreply</span>, <span style="color: #009900">State</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">handle_info</font></b>({<font color="#FF6600">gun_response</font>, <font color="#009900">ConnPid</font>, <font color="#009900">_StreamRef</font>,
+ <font color="#009900">_IsFin</font>, <font color="#009900">_Status</font>, <font color="#009900">_Headers</font>},
+ <font color="#009900">State</font><font color="#990000">=</font><font color="#008080">#state</font>{<font color="#0000FF">conn_pid</font><font color="#990000">=</font><font color="#009900">ConnPid</font>}) <font color="#990000">-&gt;</font>
+ <i><font color="#9A1900">%% Do something.</font></i>
+ {<font color="#FF6600">noreply</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../gun">gun(3)</a>,
-<a href="../gun.get">gun:get(3)</a>,
-<a href="../gun.head">gun:head(3)</a>,
-<a href="../gun.patch">gun:patch(3)</a>,
-<a href="../gun.post">gun:post(3)</a>,
-<a href="../gun.put">gun:put(3)</a>,
-<a href="../gun.delete">gun:delete(3)</a>,
-<a href="../gun.options">gun:options(3)</a>,
-<a href="../gun.request">gun:request(3)</a>,
-<a href="../gun_inform">gun_inform(3)</a>,
-<a href="../gun_push">gun_push(3)</a></p></div>
-</div>
-</div>
+<p><a href="../gun">gun(3)</a>, <a href="../gun.get">gun:get(3)</a>, <a href="../gun.head">gun:head(3)</a>, <a href="../gun.patch">gun:patch(3)</a>, <a href="../gun.post">gun:post(3)</a>, <a href="../gun.put">gun:put(3)</a>, <a href="../gun.delete">gun:delete(3)</a>, <a href="../gun.options">gun:options(3)</a>, <a href="../gun.request">gun:request(3)</a>, <a href="../gun_inform">gun_inform(3)</a>, <a href="../gun_push">gun_push(3)</a></p>
+
diff --git a/docs/en/gun/1.0/manual/gun_trailers/index.html b/docs/en/gun/1.0/manual/gun_trailers/index.html
index e67b0afb..d78678c4 100644
--- a/docs/en/gun/1.0/manual/gun_trailers/index.html
+++ b/docs/en/gun/1.0/manual/gun_trailers/index.html
@@ -62,106 +62,51 @@
<h1 class="lined-header"><span>gun_trailers(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>gun_trailers - Response trailers</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>gun_trailers - Response trailers</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">gun_trailers</span>, <span style="color: #009900">ConnPid</span>, <span style="color: #009900">StreamRef</span>, <span style="color: #009900">Headers</span>}
-
-<span style="color: #009900">ConnPid</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">pid</span></span>()
-<span style="color: #009900">StreamRef</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">reference</span></span>()
-<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="font-weight: bold"><span style="color: #000080">binary</span></span>()}]</tt></pre></div></div>
-<div class="paragraph"><p>Response trailers.</p></div>
-<div class="paragraph"><p>This message informs the relevant process that the server
-sent response trailers for the response to the original
-request.</p></div>
-<div class="paragraph"><p>A trailers message terminates the response.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#FF6600">gun_trailers</font>, <font color="#009900">ConnPid</font>, <font color="#009900">StreamRef</font>, <font color="#009900">Headers</font>}
+
+<font color="#009900">ConnPid</font> <font color="#990000">::</font> <b><font color="#000080">pid</font></b>()
+<font color="#009900">StreamRef</font> <font color="#990000">::</font> <b><font color="#000080">reference</font></b>()
+<font color="#009900">Headers</font> <font color="#990000">::</font> [{<b><font color="#000080">binary</font></b>(), <b><font color="#000080">binary</font></b>()}]</tt></pre>
+</div></div>
+<p>Response trailers.</p>
+<p>This message informs the relevant process that the server sent response trailers for the response to the original request.</p>
+<p>A trailers message terminates the response.</p>
<h2 id="_elements">Elements</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-ConnPid
-</dt>
-<dd>
-<p>
-The pid of the Gun connection process.
-</p>
+<dl><dt>ConnPid</dt>
+<dd><p>The pid of the Gun connection process.</p>
</dd>
-<dt class="hdlist1">
-StreamRef
-</dt>
-<dd>
-<p>
-Identifier of the stream for the original request.
-</p>
+<dt>StreamRef</dt>
+<dd><p>Identifier of the stream for the original request.</p>
</dd>
-<dt class="hdlist1">
-Headers
-</dt>
-<dd>
-<p>
-Trailing headers sent after the response body.
-</p>
+<dt>Headers</dt>
+<dd><p>Trailing headers sent after the response body.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>1.0</strong>: Message introduced.
-</p>
+<ul><li><strong>1.0</strong>: Message introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Receive a gun_trailers message in a gen_server</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Receive a gun_trailers message in a gen_server</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">handle_info</span></span>({<span style="color: #FF6600">gun_trailers</span>, <span style="color: #009900">ConnPid</span>, <span style="color: #009900">_StreamRef</span>, <span style="color: #009900">_Headers</span>},
- <span style="color: #009900">State</span><span style="color: #990000">=</span><span style="color: #008080">#state</span>{<span style="color: #0000FF">conn_pid</span><span style="color: #990000">=</span><span style="color: #009900">ConnPid</span>}) <span style="color: #990000">-&gt;</span>
- <span style="font-style: italic"><span style="color: #9A1900">%% Do something.</span></span>
- {<span style="color: #FF6600">noreply</span>, <span style="color: #009900">State</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">handle_info</font></b>({<font color="#FF6600">gun_trailers</font>, <font color="#009900">ConnPid</font>, <font color="#009900">_StreamRef</font>, <font color="#009900">_Headers</font>},
+ <font color="#009900">State</font><font color="#990000">=</font><font color="#008080">#state</font>{<font color="#0000FF">conn_pid</font><font color="#990000">=</font><font color="#009900">ConnPid</font>}) <font color="#990000">-&gt;</font>
+ <i><font color="#9A1900">%% Do something.</font></i>
+ {<font color="#FF6600">noreply</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../gun">gun(3)</a>,
-<a href="../gun.get">gun:get(3)</a>,
-<a href="../gun.head">gun:head(3)</a>,
-<a href="../gun.patch">gun:patch(3)</a>,
-<a href="../gun.post">gun:post(3)</a>,
-<a href="../gun.put">gun:put(3)</a>,
-<a href="../gun.delete">gun:delete(3)</a>,
-<a href="../gun.options">gun:options(3)</a>,
-<a href="../gun.request">gun:request(3)</a>,
-<a href="../gun_response">gun_response(3)</a>,
-<a href="../gun_data">gun_data(3)</a></p></div>
-</div>
-</div>
+<p><a href="../gun">gun(3)</a>, <a href="../gun.get">gun:get(3)</a>, <a href="../gun.head">gun:head(3)</a>, <a href="../gun.patch">gun:patch(3)</a>, <a href="../gun.post">gun:post(3)</a>, <a href="../gun.put">gun:put(3)</a>, <a href="../gun.delete">gun:delete(3)</a>, <a href="../gun.options">gun:options(3)</a>, <a href="../gun.request">gun:request(3)</a>, <a href="../gun_response">gun_response(3)</a>, <a href="../gun_data">gun_data(3)</a></p>
+
diff --git a/docs/en/gun/1.0/manual/gun_up/index.html b/docs/en/gun/1.0/manual/gun_up/index.html
index ea61a339..0d0257ba 100644
--- a/docs/en/gun/1.0/manual/gun_up/index.html
+++ b/docs/en/gun/1.0/manual/gun_up/index.html
@@ -62,96 +62,47 @@
<h1 class="lined-header"><span>gun_up(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>gun_up - The connection is up</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>gun_up - The connection is up</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">gun_up</span>, <span style="color: #009900">ConnPid</span>, <span style="color: #009900">Protocol</span>}
-
-<span style="color: #009900">ConnPid</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">pid</span></span>()
-<span style="color: #009900">Protocol</span> <span style="color: #990000">::</span> <span style="color: #FF6600">http</span> | <span style="color: #FF6600">http2</span></tt></pre></div></div>
-<div class="paragraph"><p>The connection is up.</p></div>
-<div class="paragraph"><p>This message informs the owner process that the connection or
-reconnection completed.</p></div>
-<div class="paragraph"><p>Gun will now start processing the messages it received while
-waiting for the connection to be up. If this is a reconnection,
-then this may not be desirable for all requests. Those requests
-should be cancelled when the connection goes down, and any
-subsequent messages ignored.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#FF6600">gun_up</font>, <font color="#009900">ConnPid</font>, <font color="#009900">Protocol</font>}
+
+<font color="#009900">ConnPid</font> <font color="#990000">::</font> <b><font color="#000080">pid</font></b>()
+<font color="#009900">Protocol</font> <font color="#990000">::</font> <font color="#FF6600">http</font> | <font color="#FF6600">http2</font></tt></pre>
+</div></div>
+<p>The connection is up.</p>
+<p>This message informs the owner process that the connection or reconnection completed.</p>
+<p>Gun will now start processing the messages it received while waiting for the connection to be up. If this is a reconnection, then this may not be desirable for all requests. Those requests should be cancelled when the connection goes down, and any subsequent messages ignored.</p>
<h2 id="_elements">Elements</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-ConnPid
-</dt>
-<dd>
-<p>
-The pid of the Gun connection process.
-</p>
+<dl><dt>ConnPid</dt>
+<dd><p>The pid of the Gun connection process.</p>
</dd>
-<dt class="hdlist1">
-Protocol
-</dt>
-<dd>
-<p>
-The protocol selected for this connection. It can be used
-to determine the capabilities of the server.
-</p>
+<dt>Protocol</dt>
+<dd><p>The protocol selected for this connection. It can be used to determine the capabilities of the server.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>1.0</strong>: Message introduced.
-</p>
+<ul><li><strong>1.0</strong>: Message introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Receive a gun_up message in a gen_server</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Receive a gun_up message in a gen_server</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">handle_info</span></span>({<span style="color: #FF6600">gun_up</span>, <span style="color: #009900">ConnPid</span>, <span style="color: #009900">_Protocol</span>},
- <span style="color: #009900">State</span><span style="color: #990000">=</span><span style="color: #008080">#state</span>{<span style="color: #0000FF">conn_pid</span><span style="color: #990000">=</span><span style="color: #009900">ConnPid</span>}) <span style="color: #990000">-&gt;</span>
- <span style="font-style: italic"><span style="color: #9A1900">%% Do something.</span></span>
- {<span style="color: #FF6600">noreply</span>, <span style="color: #009900">State</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">handle_info</font></b>({<font color="#FF6600">gun_up</font>, <font color="#009900">ConnPid</font>, <font color="#009900">_Protocol</font>},
+ <font color="#009900">State</font><font color="#990000">=</font><font color="#008080">#state</font>{<font color="#0000FF">conn_pid</font><font color="#990000">=</font><font color="#009900">ConnPid</font>}) <font color="#990000">-&gt;</font>
+ <i><font color="#9A1900">%% Do something.</font></i>
+ {<font color="#FF6600">noreply</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../gun">gun(3)</a>,
-<a href="../gun.open">gun:open(3)</a>,
-<a href="../gun.open_unix">gun:open_unix(3)</a>,
-<a href="../gun.await_up">gun:await_up(3)</a>,
-<a href="../gun_down">gun_down(3)</a>,
-<a href="../gun_error">gun_error(3)</a></p></div>
-</div>
-</div>
+<p><a href="../gun">gun(3)</a>, <a href="../gun.open">gun:open(3)</a>, <a href="../gun.open_unix">gun:open_unix(3)</a>, <a href="../gun.await_up">gun:await_up(3)</a>, <a href="../gun_down">gun_down(3)</a>, <a href="../gun_error">gun_error(3)</a></p>
+
diff --git a/docs/en/gun/1.0/manual/gun_upgrade/index.html b/docs/en/gun/1.0/manual/gun_upgrade/index.html
index 56e8e569..ec4fdff2 100644
--- a/docs/en/gun/1.0/manual/gun_upgrade/index.html
+++ b/docs/en/gun/1.0/manual/gun_upgrade/index.html
@@ -62,114 +62,57 @@
<h1 class="lined-header"><span>gun_upgrade(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>gun_upgrade - Successful protocol upgrade</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>gun_upgrade - Successful protocol upgrade</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">gun_upgrade</span>, <span style="color: #009900">ConnPid</span>, <span style="color: #009900">StreamRef</span>, <span style="color: #009900">Protocols</span>, <span style="color: #009900">Headers</span>}
-
-<span style="color: #009900">ConnPid</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">pid</span></span>()
-<span style="color: #009900">StreamRef</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">reference</span></span>()
-<span style="color: #009900">Protocols</span> <span style="color: #990000">::</span> [<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"websocket"</span><span style="color: #990000">&gt;&gt;</span>]
-<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="font-weight: bold"><span style="color: #000080">binary</span></span>()}]</tt></pre></div></div>
-<div class="paragraph"><p>Successful protocol upgrade.</p></div>
-<div class="paragraph"><p>This message informs the relevant process that the server
-accepted to upgrade to one or more protocols given in the
-original request.</p></div>
-<div class="paragraph"><p>The exact semantics of this message depend on the original
-protocol. HTTP/1.1 upgrades apply to the entire connection.
-HTTP/2 uses a different mechanism which allows switching
-specific streams to a different protocol.</p></div>
-<div class="paragraph"><p>Gun currently only supports upgrading HTTP/1.1 connections
-to the Websocket protocol.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#FF6600">gun_upgrade</font>, <font color="#009900">ConnPid</font>, <font color="#009900">StreamRef</font>, <font color="#009900">Protocols</font>, <font color="#009900">Headers</font>}
+
+<font color="#009900">ConnPid</font> <font color="#990000">::</font> <b><font color="#000080">pid</font></b>()
+<font color="#009900">StreamRef</font> <font color="#990000">::</font> <b><font color="#000080">reference</font></b>()
+<font color="#009900">Protocols</font> <font color="#990000">::</font> [<font color="#990000">&lt;&lt;</font><font color="#FF0000">"websocket"</font><font color="#990000">&gt;&gt;</font>]
+<font color="#009900">Headers</font> <font color="#990000">::</font> [{<b><font color="#000080">binary</font></b>(), <b><font color="#000080">binary</font></b>()}]</tt></pre>
+</div></div>
+<p>Successful protocol upgrade.</p>
+<p>This message informs the relevant process that the server accepted to upgrade to one or more protocols given in the original request.</p>
+<p>The exact semantics of this message depend on the original protocol. HTTP/1.1 upgrades apply to the entire connection. HTTP/2 uses a different mechanism which allows switching specific streams to a different protocol.</p>
+<p>Gun currently only supports upgrading HTTP/1.1 connections to the Websocket protocol.</p>
<h2 id="_elements">Elements</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-ConnPid
-</dt>
-<dd>
-<p>
-The pid of the Gun connection process.
-</p>
+<dl><dt>ConnPid</dt>
+<dd><p>The pid of the Gun connection process.</p>
</dd>
-<dt class="hdlist1">
-StreamRef
-</dt>
-<dd>
-<p>
-Identifier of the stream that resulted in an upgrade.
-</p>
+<dt>StreamRef</dt>
+<dd><p>Identifier of the stream that resulted in an upgrade.</p>
</dd>
-<dt class="hdlist1">
-Protocols
-</dt>
-<dd>
-<p>
-List of protocols this stream was upgraded to.
-</p>
+<dt>Protocols</dt>
+<dd><p>List of protocols this stream was upgraded to.</p>
</dd>
-<dt class="hdlist1">
-Headers
-</dt>
-<dd>
-<p>
-Headers sent with the upgrade response.
-</p>
+<dt>Headers</dt>
+<dd><p>Headers sent with the upgrade response.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>1.0</strong>: Message introduced.
-</p>
+<ul><li><strong>1.0</strong>: Message introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Receive a gun_upgrade message in a gen_server</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Receive a gun_upgrade message in a gen_server</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">handle_info</span></span>({<span style="color: #FF6600">gun_upgrade</span>, <span style="color: #009900">ConnPid</span>, <span style="color: #009900">_StreamRef</span>,
- <span style="color: #009900">_Protocols</span>, <span style="color: #009900">_Headers</span>},
- <span style="color: #009900">State</span><span style="color: #990000">=</span><span style="color: #008080">#state</span>{<span style="color: #0000FF">conn_pid</span><span style="color: #990000">=</span><span style="color: #009900">ConnPid</span>}) <span style="color: #990000">-&gt;</span>
- <span style="font-style: italic"><span style="color: #9A1900">%% Do something.</span></span>
- {<span style="color: #FF6600">noreply</span>, <span style="color: #009900">State</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">handle_info</font></b>({<font color="#FF6600">gun_upgrade</font>, <font color="#009900">ConnPid</font>, <font color="#009900">_StreamRef</font>,
+ <font color="#009900">_Protocols</font>, <font color="#009900">_Headers</font>},
+ <font color="#009900">State</font><font color="#990000">=</font><font color="#008080">#state</font>{<font color="#0000FF">conn_pid</font><font color="#990000">=</font><font color="#009900">ConnPid</font>}) <font color="#990000">-&gt;</font>
+ <i><font color="#9A1900">%% Do something.</font></i>
+ {<font color="#FF6600">noreply</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../gun">gun(3)</a>,
-<a href="../gun.ws_upgrade">gun:ws_upgrade(3)</a>,
-<a href="../gun.ws_send">gun:ws_send(3)</a>,
-<a href="../gun_ws">gun_ws(3)</a></p></div>
-</div>
-</div>
+<p><a href="../gun">gun(3)</a>, <a href="../gun.ws_upgrade">gun:ws_upgrade(3)</a>, <a href="../gun.ws_send">gun:ws_send(3)</a>, <a href="../gun_ws">gun_ws(3)</a></p>
+
diff --git a/docs/en/gun/1.0/manual/gun_ws/index.html b/docs/en/gun/1.0/manual/gun_ws/index.html
index e7eb4125..447fdc63 100644
--- a/docs/en/gun/1.0/manual/gun_ws/index.html
+++ b/docs/en/gun/1.0/manual/gun_ws/index.html
@@ -62,101 +62,53 @@
<h1 class="lined-header"><span>gun_ws(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>gun_ws - Websocket frame</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>gun_ws - Websocket frame</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">gun_ws</span>, <span style="color: #009900">ConnPid</span>, <span style="color: #009900">StreamRef</span>, <span style="color: #009900">Frame</span>}
-
-<span style="color: #009900">ConnPid</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">pid</span></span>()
-<span style="color: #009900">StreamRef</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">reference</span></span>()
-<span style="color: #009900">Frame</span> <span style="color: #990000">::</span> <span style="color: #FF6600">close</span>
- | {<span style="color: #FF6600">text</span> | <span style="font-weight: bold"><span style="color: #000080">binary</span></span> | <span style="color: #FF6600">close</span>, <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()}
- | {<span style="color: #FF6600">close</span>, <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>(), <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>Websocket frame.</p></div>
-<div class="paragraph"><p>This message informs the relevant process that the server
-sent the enclosed frame.</p></div>
-<div class="paragraph"><p>This message can only be sent on streams that were upgraded
-to the Websocket protocol.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#FF6600">gun_ws</font>, <font color="#009900">ConnPid</font>, <font color="#009900">StreamRef</font>, <font color="#009900">Frame</font>}
+
+<font color="#009900">ConnPid</font> <font color="#990000">::</font> <b><font color="#000080">pid</font></b>()
+<font color="#009900">StreamRef</font> <font color="#990000">::</font> <b><font color="#000080">reference</font></b>()
+<font color="#009900">Frame</font> <font color="#990000">::</font> <font color="#FF6600">close</font>
+ | {<font color="#FF6600">text</font> | <b><font color="#000080">binary</font></b> | <font color="#FF6600">close</font>, <b><font color="#000080">binary</font></b>()}
+ | {<font color="#FF6600">close</font>, <b><font color="#000000">non_neg_integer</font></b>(), <b><font color="#000080">binary</font></b>()}</tt></pre>
+</div></div>
+<p>Websocket frame.</p>
+<p>This message informs the relevant process that the server sent the enclosed frame.</p>
+<p>This message can only be sent on streams that were upgraded to the Websocket protocol.</p>
<h2 id="_elements">Elements</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-ConnPid
-</dt>
-<dd>
-<p>
-The pid of the Gun connection process.
-</p>
+<dl><dt>ConnPid</dt>
+<dd><p>The pid of the Gun connection process.</p>
</dd>
-<dt class="hdlist1">
-StreamRef
-</dt>
-<dd>
-<p>
-Identifier of the stream that was upgraded to Websocket.
-</p>
+<dt>StreamRef</dt>
+<dd><p>Identifier of the stream that was upgraded to Websocket.</p>
</dd>
-<dt class="hdlist1">
-Frame
-</dt>
-<dd>
-<p>
-The Websocket frame in question.
-</p>
+<dt>Frame</dt>
+<dd><p>The Websocket frame in question.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>1.0</strong>: Message introduced.
-</p>
+<ul><li><strong>1.0</strong>: Message introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Receive a gun_ws message in a gen_server</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Receive a gun_ws message in a gen_server</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">handle_info</span></span>({<span style="color: #FF6600">gun_ws</span>, <span style="color: #009900">ConnPid</span>, <span style="color: #009900">_StreamRef</span>, <span style="color: #009900">_Frame</span>},
- <span style="color: #009900">State</span><span style="color: #990000">=</span><span style="color: #008080">#state</span>{<span style="color: #0000FF">conn_pid</span><span style="color: #990000">=</span><span style="color: #009900">ConnPid</span>}) <span style="color: #990000">-&gt;</span>
- <span style="font-style: italic"><span style="color: #9A1900">%% Do something.</span></span>
- {<span style="color: #FF6600">noreply</span>, <span style="color: #009900">State</span>}<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">handle_info</font></b>({<font color="#FF6600">gun_ws</font>, <font color="#009900">ConnPid</font>, <font color="#009900">_StreamRef</font>, <font color="#009900">_Frame</font>},
+ <font color="#009900">State</font><font color="#990000">=</font><font color="#008080">#state</font>{<font color="#0000FF">conn_pid</font><font color="#990000">=</font><font color="#009900">ConnPid</font>}) <font color="#990000">-&gt;</font>
+ <i><font color="#9A1900">%% Do something.</font></i>
+ {<font color="#FF6600">noreply</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../gun">gun(3)</a>,
-<a href="../gun.ws_upgrade">gun:ws_upgrade(3)</a>,
-<a href="../gun.ws_send">gun:ws_send(3)</a>,
-<a href="../gun_upgrade">gun_upgrade(3)</a></p></div>
-</div>
-</div>
+<p><a href="../gun">gun(3)</a>, <a href="../gun.ws_upgrade">gun:ws_upgrade(3)</a>, <a href="../gun.ws_send">gun:ws_send(3)</a>, <a href="../gun_upgrade">gun_upgrade(3)</a></p>
+
diff --git a/docs/en/gun/1.0/manual/index.html b/docs/en/gun/1.0/manual/index.html
index 241ed25e..96bf8528 100644
--- a/docs/en/gun/1.0/manual/index.html
+++ b/docs/en/gun/1.0/manual/index.html
@@ -62,72 +62,33 @@
<h1 class="lined-header"><span>Gun Function Reference</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>gun - HTTP/1.1, HTTP/2 and Websocket client for Erlang/OTP</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>gun - HTTP/1.1, HTTP/2 and Websocket client for Erlang/OTP</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Gun is an HTTP client for Erlang/OTP with support for the
-HTTP/1.1, HTTP/2 and Websocket protocols.</p></div>
-<div class="paragraph"><p>Gun aims to provide an easy to use, asynchronous and
-always-connected client. It maintains a permanent connection
-to the server and reconnects automatically when necessary.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Gun is an HTTP client for Erlang/OTP with support for the HTTP/1.1, HTTP/2 and Websocket protocols.</p>
+<p>Gun aims to provide an easy to use, asynchronous and always-connected client. It maintains a permanent connection to the server and reconnects automatically when necessary.</p>
<h2 id="_modules">Modules</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="gun">gun(3)</a> - Asynchronous HTTP client
-</p>
+<ul><li><a href="gun">gun(3)</a> - Asynchronous HTTP client
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_dependencies">Dependencies</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="cowlib_app">cowlib(7)</a> - Support library for manipulating Web protocols
-</p>
+<ul><li><a href="cowlib_app">cowlib(7)</a> - Support library for manipulating Web protocols
</li>
-<li>
-<p>
-ssl - Secure communication over sockets
-</p>
+<li>ssl - Secure communication over sockets
</li>
-</ul></div>
-<div class="paragraph"><p>All these applications must be started before the <code>gun</code>
-application. To start Gun and all dependencies at once:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+</ul>
+<p>All these applications must be started before the <code>gun</code> application. To start Gun and all dependencies at once:</p>
+<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">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">application:ensure_all_started</span></span>(<span style="color: #FF6600">gun</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">application:ensure_all_started</font></b>(<font color="#FF6600">gun</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_environment">Environment</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <code>gun</code> application does not define any application
-environment configuration parameters.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The <code>gun</code> application does not define any application environment configuration parameters.</p>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="cowlib_app">cowlib(7)</a></p></div>
-</div>
-</div>
+<p><a href="cowlib_app">cowlib(7)</a></p>
+
diff --git a/docs/en/ranch/1.2/guide/embedded/index.html b/docs/en/ranch/1.2/guide/embedded/index.html
index 39350a45..141bad1e 100644
--- a/docs/en/ranch/1.2/guide/embedded/index.html
+++ b/docs/en/ranch/1.2/guide/embedded/index.html
@@ -62,48 +62,30 @@
<h1 class="lined-header"><span>Embedded mode</span></h1>
-<div class="paragraph"><p>Embedded mode allows you to insert Ranch listeners directly
-in your supervision tree. This allows for greater fault tolerance
-control by permitting the shutdown of a listener due to the
-failure of another part of the application and vice versa.</p></div>
-<div class="sect1">
+<p>Embedded mode allows you to insert Ranch listeners directly in your supervision tree. This allows for greater fault tolerance control by permitting the shutdown of a listener due to the failure of another part of the application and vice versa.</p>
<h2 id="_embedding">Embedding</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>To embed Ranch in your application you can simply add the child specs
-to your supervision tree. This can all be done in the <code>init/1</code> function
-of one of your application supervisors.</p></div>
-<div class="paragraph"><p>Ranch requires at the minimum two kinds of child specs for embedding.
-First, you need to add <code>ranch_sup</code> to your supervision tree, only once,
-regardless of the number of listeners you will use. Then you need to
-add the child specs for each listener.</p></div>
-<div class="paragraph"><p>Ranch has a convenience function for getting the listeners child specs
-called <code>ranch:child_spec/6</code>, that works like <code>ranch:start_listener/6</code>,
-except that it doesn&#8217;t start anything, it only returns child specs.</p></div>
-<div class="paragraph"><p>As for <code>ranch_sup</code>, the child spec is simple enough to not require a
-convenience function.</p></div>
-<div class="paragraph"><p>The following example adds both <code>ranch_sup</code> and one listener to another
-application&#8217;s supervision tree.</p></div>
-<div class="listingblock">
-<div class="title">Embed Ranch directly in your supervision tree</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<p>To embed Ranch in your application you can simply add the child specs to your supervision tree. This can all be done in the <code>init/1</code> function of one of your application supervisors.</p>
+<p>Ranch requires at the minimum two kinds of child specs for embedding. First, you need to add <code>ranch_sup</code> to your supervision tree, only once, regardless of the number of listeners you will use. Then you need to add the child specs for each listener.</p>
+<p>Ranch has a convenience function for getting the listeners child specs called <code>ranch:child_spec/6</code>, that works like <code>ranch:start_listener/6</code>, except that it doesn&apos;t start anything, it only returns child specs.</p>
+<p>As for <code>ranch_sup</code>, the child spec is simple enough to not require a convenience function.</p>
+<p>The following example adds both <code>ranch_sup</code> and one listener to another application&apos;s supervision tree.</p>
+<div class="listingblock"><div class="title">Embed Ranch directly in your supervision tree</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: #990000">-&gt;</span>
- <span style="color: #009900">RanchSupSpec</span> <span style="color: #990000">=</span> {<span style="color: #FF6600">ranch_sup</span>, {<span style="color: #FF6600">ranch_sup</span>, <span style="color: #FF6600">start_link</span>, []},
- <span style="color: #FF6600">permanent</span>, <span style="color: #993399">5000</span>, <span style="color: #FF6600">supervisor</span>, [<span style="color: #FF6600">ranch_sup</span>]},
- <span style="color: #009900">ListenerSpec</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">ranch:child_spec</span></span>(<span style="color: #FF6600">echo</span>, <span style="color: #993399">100</span>,
- <span style="color: #FF6600">ranch_tcp</span>, [{<span style="color: #FF6600">port</span>, <span style="color: #993399">5555</span>}],
- <span style="color: #FF6600">echo_protocol</span>, []
- ),
- {<span style="color: #FF6600">ok</span>, {{<span style="color: #FF6600">one_for_one</span>, <span style="color: #993399">10</span>, <span style="color: #993399">10</span>}, [<span style="color: #009900">RanchSupSpec</span>, <span style="color: #009900">ListenerSpec</span>]}}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Remember, you can add as many listener child specs as needed, but only
-one <code>ranch_sup</code> spec!</p></div>
-<div class="paragraph"><p>It is recommended that your architecture makes sure that all listeners
-are restarted if <code>ranch_sup</code> fails. See the Ranch internals chapter for
-more details on how Ranch does it.</p></div>
-</div>
-</div>
+<pre><tt><b><font color="#000000">init</font></b>([]) <font color="#990000">-&gt;</font>
+ <font color="#009900">RanchSupSpec</font> <font color="#990000">=</font> {<font color="#FF6600">ranch_sup</font>, {<font color="#FF6600">ranch_sup</font>, <font color="#FF6600">start_link</font>, []},
+ <font color="#FF6600">permanent</font>, <font color="#993399">5000</font>, <font color="#FF6600">supervisor</font>, [<font color="#FF6600">ranch_sup</font>]},
+ <font color="#009900">ListenerSpec</font> <font color="#990000">=</font> <b><font color="#000000">ranch:child_spec</font></b>(<font color="#FF6600">echo</font>, <font color="#993399">100</font>,
+ <font color="#FF6600">ranch_tcp</font>, [{<font color="#FF6600">port</font>, <font color="#993399">5555</font>}],
+ <font color="#FF6600">echo_protocol</font>, []
+ ),
+ {<font color="#FF6600">ok</font>, {{<font color="#FF6600">one_for_one</font>, <font color="#993399">10</font>, <font color="#993399">10</font>}, [<font color="#009900">RanchSupSpec</font>, <font color="#009900">ListenerSpec</font>]}}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Remember, you can add as many listener child specs as needed, but only one <code>ranch_sup</code> spec!</p>
+<p>It is recommended that your architecture makes sure that all listeners are restarted if <code>ranch_sup</code> fails. See the Ranch internals chapter for more details on how Ranch does it.</p>
+
@@ -160,6 +142,8 @@ more details on how Ranch does it.</p></div>
+ <li><a href="/docs/en/ranch/1.5/guide">1.5</a></li>
+
<li><a href="/docs/en/ranch/1.4/guide">1.4</a></li>
<li><a href="/docs/en/ranch/1.3/guide">1.3</a></li>
diff --git a/docs/en/ranch/1.2/guide/index.html b/docs/en/ranch/1.2/guide/index.html
index 7c1cf9ed..8c91582e 100644
--- a/docs/en/ranch/1.2/guide/index.html
+++ b/docs/en/ranch/1.2/guide/index.html
@@ -62,48 +62,24 @@
<h1 class="lined-header"><span>Ranch User Guide</span></h1>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="introduction/">Introduction</a>
-</p>
+<ul><li><a href="introduction/">Introduction</a>
</li>
-<li>
-<p>
-<a href="listeners/">Listeners</a>
-</p>
+<li><a href="listeners/">Listeners</a>
</li>
-<li>
-<p>
-<a href="transports/">Transports</a>
-</p>
+<li><a href="transports/">Transports</a>
</li>
-<li>
-<p>
-<a href="protocols/">Protocols</a>
-</p>
+<li><a href="protocols/">Protocols</a>
</li>
-<li>
-<p>
-<a href="embedded/">Embedded mode</a>
-</p>
+<li><a href="embedded/">Embedded mode</a>
</li>
-<li>
-<p>
-<a href="parsers/">Writing parsers</a>
-</p>
+<li><a href="parsers/">Writing parsers</a>
</li>
-<li>
-<p>
-<a href="ssl_auth/">SSL client authentication</a>
-</p>
+<li><a href="ssl_auth/">SSL client authentication</a>
</li>
-<li>
-<p>
-<a href="internals/">Internals</a>
-</p>
+<li><a href="internals/">Internals</a>
</li>
-</ul></div>
+</ul>
+
@@ -138,6 +114,8 @@
+ <li><a href="/docs/en/ranch/1.5/guide">1.5</a></li>
+
<li><a href="/docs/en/ranch/1.4/guide">1.4</a></li>
<li><a href="/docs/en/ranch/1.3/guide">1.3</a></li>
diff --git a/docs/en/ranch/1.2/guide/internals/index.html b/docs/en/ranch/1.2/guide/internals/index.html
index 5794c4bc..c5926f1e 100644
--- a/docs/en/ranch/1.2/guide/internals/index.html
+++ b/docs/en/ranch/1.2/guide/internals/index.html
@@ -62,93 +62,34 @@
<h1 class="lined-header"><span>Internals</span></h1>
-<div class="paragraph"><p>This chapter may not apply to embedded Ranch as embedding allows you
-to use an architecture specific to your application, which may or may
-not be compatible with the description of the Ranch application.</p></div>
-<div class="paragraph"><p>Note that for everything related to efficiency and performance,
-you should perform the benchmarks yourself to get the numbers that
-matter to you. Generic benchmarks found on the web may or may not
-be of use to you, you can never know until you benchmark your own
-system.</p></div>
-<div class="sect1">
+<p>This chapter may not apply to embedded Ranch as embedding allows you to use an architecture specific to your application, which may or may not be compatible with the description of the Ranch application.</p>
+<p>Note that for everything related to efficiency and performance, you should perform the benchmarks yourself to get the numbers that matter to you. Generic benchmarks found on the web may or may not be of use to you, you can never know until you benchmark your own system.</p>
<h2 id="_architecture">Architecture</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Ranch is an OTP application.</p></div>
-<div class="paragraph"><p>Like all OTP applications, Ranch has a top supervisor. It is responsible
-for supervising the <code>ranch_server</code> process and all the listeners that
-will be started.</p></div>
-<div class="paragraph"><p>The <code>ranch_server</code> gen_server is a central process keeping track of the
-listeners and their acceptors. It does so through the use of a public ets
-table called <code>ranch_server</code>. The table is owned by the top supervisor
-to improve fault tolerance. This way if the <code>ranch_server</code> gen_server
-fails, it doesn&#8217;t lose any information and the restarted process can
-continue as if nothing happened.</p></div>
-<div class="paragraph"><p>Ranch uses a custom supervisor for managing connections. This supervisor
-keeps track of the number of connections and handles connection limits
-directly. While it is heavily optimized to perform the task of creating
-connection processes for accepted connections, it is still following the
-OTP principles and the usual <code>sys</code> and <code>supervisor</code> calls will work on
-it as expected.</p></div>
-<div class="paragraph"><p>Listeners are grouped into the <code>ranch_listener_sup</code> supervisor and
-consist of three kinds of processes: the listener gen_server, the
-acceptor processes and the connection processes, both grouped under
-their own supervisor. All of these processes are registered to the
-<code>ranch_server</code> gen_server with varying amount of information.</p></div>
-<div class="paragraph"><p>All socket operations, including listening for connections, go through
-transport handlers. Accepted connections are given to the protocol handler.
-Transport handlers are simple callback modules for performing operations on
-sockets. Protocol handlers start a new process, which receives socket
-ownership, with no requirements on how the code should be written inside
-that new process.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Ranch is an OTP application.</p>
+<p>Like all OTP applications, Ranch has a top supervisor. It is responsible for supervising the <code>ranch_server</code> process and all the listeners that will be started.</p>
+<p>The <code>ranch_server</code> gen_server is a central process keeping track of the listeners and their acceptors. It does so through the use of a public ets table called <code>ranch_server</code>. The table is owned by the top supervisor to improve fault tolerance. This way if the <code>ranch_server</code> gen_server fails, it doesn&apos;t lose any information and the restarted process can continue as if nothing happened.</p>
+<p>Ranch uses a custom supervisor for managing connections. This supervisor keeps track of the number of connections and handles connection limits directly. While it is heavily optimized to perform the task of creating connection processes for accepted connections, it is still following the OTP principles and the usual <code>sys</code> and <code>supervisor</code> calls will work on it as expected.</p>
+<p>Listeners are grouped into the <code>ranch_listener_sup</code> supervisor and consist of three kinds of processes: the listener gen_server, the acceptor processes and the connection processes, both grouped under their own supervisor. All of these processes are registered to the <code>ranch_server</code> gen_server with varying amount of information.</p>
+<p>All socket operations, including listening for connections, go through transport handlers. Accepted connections are given to the protocol handler. Transport handlers are simple callback modules for performing operations on sockets. Protocol handlers start a new process, which receives socket ownership, with no requirements on how the code should be written inside that new process.</p>
<h2 id="_number_of_acceptors">Number of acceptors</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The second argument to <code>ranch:start_listener/6</code> is the number of
-processes that will be accepting connections. Care should be taken
-when choosing this number.</p></div>
-<div class="paragraph"><p>First of all, it should not be confused with the maximum number
-of connections. Acceptor processes are only used for accepting and
-have nothing else in common with connection processes. Therefore
-there is nothing to be gained from setting this number too high,
-in fact it can slow everything else down.</p></div>
-<div class="paragraph"><p>Second, this number should be high enough to allow Ranch to accept
-connections concurrently. But the number of cores available doesn&#8217;t
-seem to be the only factor for choosing this number, as we can
-observe faster accepts if we have more acceptors than cores. It
-might be entirely dependent on the protocol, however.</p></div>
-<div class="paragraph"><p>Our observations suggest that using 100 acceptors on modern hardware
-is a good solution, as it&#8217;s big enough to always have acceptors ready
-and it&#8217;s low enough that it doesn&#8217;t have a negative impact on the
-system&#8217;s performances.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The second argument to <code>ranch:start_listener/6</code> is the number of processes that will be accepting connections. Care should be taken when choosing this number.</p>
+<p>First of all, it should not be confused with the maximum number of connections. Acceptor processes are only used for accepting and have nothing else in common with connection processes. Therefore there is nothing to be gained from setting this number too high, in fact it can slow everything else down.</p>
+<p>Second, this number should be high enough to allow Ranch to accept connections concurrently. But the number of cores available doesn&apos;t seem to be the only factor for choosing this number, as we can observe faster accepts if we have more acceptors than cores. It might be entirely dependent on the protocol, however.</p>
+<p>Our observations suggest that using 100 acceptors on modern hardware is a good solution, as it&apos;s big enough to always have acceptors ready and it&apos;s low enough that it doesn&apos;t have a negative impact on the system&apos;s performances.</p>
<h2 id="_platform_specific_tcp_features">Platform-specific TCP features</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Some socket options are platform-specific and not supported by <code>inet</code>.
-They can be of interest because they generally are related to
-optimizations provided by the underlying OS. They can still be enabled
-thanks to the <code>raw</code> option, for which we will see an example.</p></div>
-<div class="paragraph"><p>One of these features is <code>TCP_DEFER_ACCEPT</code> on Linux. It is a simplified
-accept mechanism which will wait for application data to come in before
-handing out the connection to the Erlang process.</p></div>
-<div class="paragraph"><p>This is especially useful if you expect many connections to be mostly
-idle, perhaps part of a connection pool. They can be handled by the
-kernel directly until they send any real data, instead of allocating
-resources to idle connections.</p></div>
-<div class="paragraph"><p>To enable this mechanism, the following option can be used.</p></div>
-<div class="listingblock">
-<div class="title">Using raw transport options</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Some socket options are platform-specific and not supported by <code>inet</code>. They can be of interest because they generally are related to optimizations provided by the underlying OS. They can still be enabled thanks to the <code>raw</code> option, for which we will see an example.</p>
+<p>One of these features is <code>TCP_DEFER_ACCEPT</code> on Linux. It is a simplified accept mechanism which will wait for application data to come in before handing out the connection to the Erlang process.</p>
+<p>This is especially useful if you expect many connections to be mostly idle, perhaps part of a connection pool. They can be handled by the kernel directly until they send any real data, instead of allocating resources to idle connections.</p>
+<p>To enable this mechanism, the following option can be used.</p>
+<div class="listingblock"><div class="title">Using raw transport options</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: #FF6600">raw</span>, <span style="color: #993399">6</span>, <span style="color: #993399">9</span>, <span style="color: #990000">&lt;&lt;</span> <span style="font-weight: bold"><span style="color: #000000">30:32</span></span><span style="color: #990000">/</span><span style="color: #FF6600">native</span> <span style="color: #990000">&gt;&gt;</span>}</tt></pre></div></div>
-<div class="paragraph"><p>It means go on layer 6, turn on option 9 with the given integer parameter.</p></div>
-</div>
-</div>
+<pre><tt>{<font color="#FF6600">raw</font>, <font color="#993399">6</font>, <font color="#993399">9</font>, <font color="#990000">&lt;&lt;</font> <b><font color="#000000">30:32</font></b><font color="#990000">/</font><font color="#FF6600">native</font> <font color="#990000">&gt;&gt;</font>}</tt></pre>
+</div></div>
+<p>It means go on layer 6, turn on option 9 with the given integer parameter.</p>
+
@@ -201,6 +142,8 @@ http://www.gnu.org/software/src-highlite -->
+ <li><a href="/docs/en/ranch/1.5/guide">1.5</a></li>
+
<li><a href="/docs/en/ranch/1.4/guide">1.4</a></li>
<li><a href="/docs/en/ranch/1.3/guide">1.3</a></li>
diff --git a/docs/en/ranch/1.2/guide/introduction/index.html b/docs/en/ranch/1.2/guide/introduction/index.html
index e2e8b3b6..64859ee0 100644
--- a/docs/en/ranch/1.2/guide/introduction/index.html
+++ b/docs/en/ranch/1.2/guide/introduction/index.html
@@ -62,32 +62,17 @@
<h1 class="lined-header"><span>Introduction</span></h1>
-<div class="paragraph"><p>Ranch is a socket acceptor pool for TCP protocols.</p></div>
-<div class="paragraph"><p>Ranch aims to provide everything you need to accept TCP connections
-with a small code base and low latency while being easy to use directly
-as an application or to embed into your own.</p></div>
-<div class="sect1">
+<p>Ranch is a socket acceptor pool for TCP protocols.</p>
+<p>Ranch aims to provide everything you need to accept TCP connections with a small code base and low latency while being easy to use directly as an application or to embed into your own.</p>
<h2 id="_prerequisites">Prerequisites</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>It is assumed the developer already knows Erlang and has some experience
-with socket programming and TCP protocols.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>It is assumed the developer already knows Erlang and has some experience with socket programming and TCP protocols.</p>
<h2 id="_supported_platforms">Supported platforms</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Ranch is tested and supported on Linux.</p></div>
-<div class="paragraph"><p>Ranch is developed for Erlang R15B01+.</p></div>
-<div class="paragraph"><p>Ranch may be compiled on earlier Erlang versions with small source code
-modifications but there is no guarantee that it will work as expected.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Ranch is tested and supported on Linux.</p>
+<p>Ranch is developed for Erlang R15B01+.</p>
+<p>Ranch may be compiled on earlier Erlang versions with small source code modifications but there is no guarantee that it will work as expected.</p>
<h2 id="_versioning">Versioning</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Ranch uses <a href="http://semver.org/">Semantic Versioning 2.0.0</a></p></div>
-</div>
-</div>
+<p>Ranch uses <a href="http://semver.org/">Semantic Versioning 2.0.0</a></p>
+
@@ -140,6 +125,8 @@ modifications but there is no guarantee that it will work as expected.</p></div>
+ <li><a href="/docs/en/ranch/1.5/guide">1.5</a></li>
+
<li><a href="/docs/en/ranch/1.4/guide">1.4</a></li>
<li><a href="/docs/en/ranch/1.3/guide">1.3</a></li>
diff --git a/docs/en/ranch/1.2/guide/listeners/index.html b/docs/en/ranch/1.2/guide/listeners/index.html
index f8c24289..5d7bb697 100644
--- a/docs/en/ranch/1.2/guide/listeners/index.html
+++ b/docs/en/ranch/1.2/guide/listeners/index.html
@@ -62,287 +62,168 @@
<h1 class="lined-header"><span>Listeners</span></h1>
-<div class="paragraph"><p>A listener is a set of processes whose role is to listen on a port
-for new connections. It manages a pool of acceptor processes, each
-of them indefinitely accepting connections. When it does, it starts
-a new process executing the protocol handler code. All the socket
-programming is abstracted through the user of transport handlers.</p></div>
-<div class="paragraph"><p>The listener takes care of supervising all the acceptor and connection
-processes, allowing developers to focus on building their application.</p></div>
-<div class="sect1">
+<p>A listener is a set of processes whose role is to listen on a port for new connections. It manages a pool of acceptor processes, each of them indefinitely accepting connections. When it does, it starts a new process executing the protocol handler code. All the socket programming is abstracted through the user of transport handlers.</p>
+<p>The listener takes care of supervising all the acceptor and connection processes, allowing developers to focus on building their application.</p>
<h2 id="_starting_a_listener">Starting a listener</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Ranch does nothing by default. It is up to the application developer
-to request that Ranch listens for connections.</p></div>
-<div class="paragraph"><p>A listener can be started and stopped at will.</p></div>
-<div class="paragraph"><p>When starting a listener, a number of different settings are required:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-A name to identify it locally and be able to interact with it.
-</p>
+<p>Ranch does nothing by default. It is up to the application developer to request that Ranch listens for connections.</p>
+<p>A listener can be started and stopped at will.</p>
+<p>When starting a listener, a number of different settings are required:</p>
+<ul><li>A name to identify it locally and be able to interact with it.
</li>
-<li>
-<p>
-The number of acceptors in the pool.
-</p>
+<li>The number of acceptors in the pool.
</li>
-<li>
-<p>
-A transport handler and its associated options.
-</p>
+<li>A transport handler and its associated options.
</li>
-<li>
-<p>
-A protocol handler and its associated options.
-</p>
+<li>A protocol handler and its associated options.
</li>
-</ul></div>
-<div class="paragraph"><p>Ranch includes both TCP and SSL transport handlers, respectively
-<code>ranch_tcp</code> and <code>ranch_ssl</code>.</p></div>
-<div class="paragraph"><p>A listener can be started by calling the <code>ranch:start_listener/6</code>
-function. Before doing so however, you must ensure that the <code>ranch</code>
-application is started.</p></div>
-<div class="listingblock">
-<div class="title">Starting the Ranch application</div>
-<div class="content"><!-- Generator: GNU source-highlight
+</ul>
+<p>Ranch includes both TCP and SSL transport handlers, respectively <code>ranch_tcp</code> and <code>ranch_ssl</code>.</p>
+<p>A listener can be started by calling the <code>ranch:start_listener/6</code> function. Before doing so however, you must ensure that the <code>ranch</code> application is started.</p>
+<div class="listingblock"><div class="title">Starting the Ranch application</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: #0000FF">ok</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">application:start</span></span>(<span style="color: #FF6600">ranch</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>You are then ready to start a listener. Let&#8217;s call it <code>tcp_echo</code>. It will
-have a pool of 100 acceptors, use a TCP transport and forward connections
-to the <code>echo_protocol</code> handler.</p></div>
-<div class="listingblock">
-<div class="title">Starting a listener for TCP connections on port 5555</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#0000FF">ok</font> <font color="#990000">=</font> <b><font color="#000000">application:start</font></b>(<font color="#FF6600">ranch</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>You are then ready to start a listener. Let&apos;s call it <code>tcp_echo</code>. It will have a pool of 100 acceptors, use a TCP transport and forward connections to the <code>echo_protocol</code> handler.</p>
+<div class="listingblock"><div class="title">Starting a listener for TCP connections on port 5555</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: #FF6600">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">ranch:start_listener</span></span>(<span style="color: #FF6600">tcp_echo</span>, <span style="color: #993399">100</span>,
- <span style="color: #FF6600">ranch_tcp</span>, [{<span style="color: #FF6600">port</span>, <span style="color: #993399">5555</span>}],
- <span style="color: #FF6600">echo_protocol</span>, []
-)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>You can try this out by compiling and running the <code>tcp_echo</code> example in the
-examples directory. To do so, open a shell in the <em>examples/tcp_echo/</em>
-directory and run the following command:</p></div>
-<div class="listingblock">
-<div class="title">Building and starting a Ranch example</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">ranch:start_listener</font></b>(<font color="#FF6600">tcp_echo</font>, <font color="#993399">100</font>,
+ <font color="#FF6600">ranch_tcp</font>, [{<font color="#FF6600">port</font>, <font color="#993399">5555</font>}],
+ <font color="#FF6600">echo_protocol</font>, []
+)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>You can try this out by compiling and running the <code>tcp_echo</code> example in the examples directory. To do so, open a shell in the <em>examples/tcp_echo/</em> directory and run the following command:</p>
+<div class="listingblock"><div class="title">Building and starting a Ranch example</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>$ make run</tt></pre></div></div>
-<div class="paragraph"><p>You can then connect to it using telnet and see the echo server reply
-everything you send to it. Then when you&#8217;re done testing, you can use
-the <code>Ctrl+]</code> key to escape to the telnet command line and type
-<code>quit</code> to exit.</p></div>
-<div class="listingblock">
-<div class="title">Connecting to the example listener with telnet</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>$ make run</tt></pre>
+</div></div>
+<p>You can then connect to it using telnet and see the echo server reply everything you send to it. Then when you&apos;re done testing, you can use the <code>Ctrl+]</code> key to escape to the telnet command line and type <code>quit</code> to exit.</p>
+<div class="listingblock"><div class="title">Connecting to the example listener with telnet</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>$ telnet localhost <span style="color: #993399">5555</span>
-Trying <span style="color: #993399">127.0</span><span style="color: #990000">.</span><span style="color: #993399">0.1</span><span style="color: #990000">...</span>
-Connected to localhost<span style="color: #990000">.</span>
-Escape character is <span style="color: #FF0000">'^]'</span><span style="color: #990000">.</span>
-Hello<span style="color: #990000">!</span>
-Hello<span style="color: #990000">!</span>
-It works<span style="color: #990000">!</span>
-It works<span style="color: #990000">!</span>
-<span style="color: #990000">^]</span>
-
-telnet<span style="color: #990000">&gt;</span> quit
-Connection closed<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>$ telnet localhost <font color="#993399">5555</font>
+Trying <font color="#993399">127.0</font><font color="#990000">.</font><font color="#993399">0.1</font><font color="#990000">...</font>
+Connected to localhost<font color="#990000">.</font>
+Escape character is <font color="#FF0000">'^]'</font><font color="#990000">.</font>
+Hello<font color="#990000">!</font>
+Hello<font color="#990000">!</font>
+It works<font color="#990000">!</font>
+It works<font color="#990000">!</font>
+<font color="#990000">^]</font>
+
+telnet<font color="#990000">&gt;</font> quit
+Connection closed<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_stopping_a_listener">Stopping a listener</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>All you need to stop a Ranch listener is to call the
-<code>ranch:stop_listener/1</code> function with the listener&#8217;s name
-as argument. In the previous section we started the listener
-named <code>tcp_echo</code>. We can now stop it.</p></div>
-<div class="listingblock">
-<div class="title">Stopping a listener</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<p>All you need to stop a Ranch listener is to call the <code>ranch:stop_listener/1</code> function with the listener&apos;s name as argument. In the previous section we started the listener named <code>tcp_echo</code>. We can now stop it.</p>
+<div class="listingblock"><div class="title">Stopping a listener</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">ranch:stop_listener</span></span>(<span style="color: #FF6600">tcp_echo</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">ranch:stop_listener</font></b>(<font color="#FF6600">tcp_echo</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_default_transport_options">Default transport options</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>By default the socket will be set to return <code>binary</code> data, with the
-options <code>{active, false}</code>, <code>{packet, raw}</code>, <code>{reuseaddr, true}</code> set.
-These values can&#8217;t be overriden when starting the listener, but
-they can be overriden using <code>Transport:setopts/2</code> in the protocol.</p></div>
-<div class="paragraph"><p>It will also set <code>{backlog, 1024}</code> and <code>{nodelay, true}</code>, which
-can be overriden at listener startup.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>By default the socket will be set to return <code>binary</code> data, with the options <code>{active, false}</code>, <code>{packet, raw}</code>, <code>{reuseaddr, true}</code> set. These values can&apos;t be overriden when starting the listener, but they can be overriden using <code>Transport:setopts/2</code> in the protocol.</p>
+<p>It will also set <code>{backlog, 1024}</code> and <code>{nodelay, true}</code>, which can be overriden at listener startup.</p>
<h2 id="_listening_on_a_random_port">Listening on a random port</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>You do not have to specify a specific port to listen on. If you give
-the port number 0, or if you omit the port number entirely, Ranch will
-start listening on a random port.</p></div>
-<div class="paragraph"><p>You can retrieve this port number by calling <code>ranch:get_port/1</code>. The
-argument is the name of the listener you gave in <code>ranch:start_listener/6</code>.</p></div>
-<div class="listingblock">
-<div class="title">Starting a listener for TCP connections on a random port</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<p>You do not have to specify a specific port to listen on. If you give the port number 0, or if you omit the port number entirely, Ranch will start listening on a random port.</p>
+<p>You can retrieve this port number by calling <code>ranch:get_port/1</code>. The argument is the name of the listener you gave in <code>ranch:start_listener/6</code>.</p>
+<div class="listingblock"><div class="title">Starting a listener for TCP connections on a random port</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: #FF6600">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">ranch:start_listener</span></span>(<span style="color: #FF6600">tcp_echo</span>, <span style="color: #993399">100</span>,
- <span style="color: #FF6600">ranch_tcp</span>, [{<span style="color: #FF6600">port</span>, <span style="color: #993399">0</span>}],
- <span style="color: #FF6600">echo_protocol</span>, []
-)<span style="color: #990000">.</span>
-<span style="color: #009900">Port</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">ranch:get_port</span></span>(<span style="color: #FF6600">tcp_echo</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">ranch:start_listener</font></b>(<font color="#FF6600">tcp_echo</font>, <font color="#993399">100</font>,
+ <font color="#FF6600">ranch_tcp</font>, [{<font color="#FF6600">port</font>, <font color="#993399">0</font>}],
+ <font color="#FF6600">echo_protocol</font>, []
+)<font color="#990000">.</font>
+<font color="#009900">Port</font> <font color="#990000">=</font> <b><font color="#000000">ranch:get_port</font></b>(<font color="#FF6600">tcp_echo</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_listening_on_privileged_ports">Listening on privileged ports</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Some systems limit access to ports below 1024 for security reasons.
-This can easily be identified by an <code>{error, eacces}</code> error when trying
-to open a listening socket on such a port.</p></div>
-<div class="paragraph"><p>The methods for listening on privileged ports vary between systems,
-please refer to your system&#8217;s documentation for more information.</p></div>
-<div class="paragraph"><p>We recommend the use of port rewriting for systems with a single server,
-and load balancing for systems with multiple servers. Documenting these
-solutions is however out of the scope of this guide.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Some systems limit access to ports below 1024 for security reasons. This can easily be identified by an <code>{error, eacces}</code> error when trying to open a listening socket on such a port.</p>
+<p>The methods for listening on privileged ports vary between systems, please refer to your system&apos;s documentation for more information.</p>
+<p>We recommend the use of port rewriting for systems with a single server, and load balancing for systems with multiple servers. Documenting these solutions is however out of the scope of this guide.</p>
<h2 id="_accepting_connections_on_an_existing_socket">Accepting connections on an existing socket</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>If you want to accept connections on an existing socket, you can use the
-<code>socket</code> transport option, which should just be the relevant data returned
-from the connect function for the transport or the underlying socket library
-(<code>gen_tcp:connect</code>, <code>ssl:connect</code>). The accept function will then be
-called on the passed in socket. You should connect the socket in
-<code>{active, false}</code> mode, as well.</p></div>
-<div class="paragraph"><p>Note, however, that because of a bug in SSL, you cannot change ownership of an
-SSL listen socket prior to R16. Ranch will catch the error thrown, but the
-owner of the SSL socket will remain as whatever process created the socket.
-However, this will not affect accept behaviour unless the owner process dies,
-in which case the socket is closed. Therefore, to use this feature with SSL
-with an erlang release prior to R16, ensure that the SSL socket is opened in a
-persistant process.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>If you want to accept connections on an existing socket, you can use the <code>socket</code> transport option, which should just be the relevant data returned from the connect function for the transport or the underlying socket library (<code>gen_tcp:connect</code>, <code>ssl:connect</code>). The accept function will then be called on the passed in socket. You should connect the socket in <code>{active, false}</code> mode, as well.</p>
+<p>Note, however, that because of a bug in SSL, you cannot change ownership of an SSL listen socket prior to R16. Ranch will catch the error thrown, but the owner of the SSL socket will remain as whatever process created the socket. However, this will not affect accept behaviour unless the owner process dies, in which case the socket is closed. Therefore, to use this feature with SSL with an erlang release prior to R16, ensure that the SSL socket is opened in a persistant process.</p>
<h2 id="_limiting_the_number_of_concurrent_connections">Limiting the number of concurrent connections</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <code>max_connections</code> transport option allows you to limit the number
-of concurrent connections. It defaults to 1024. Its purpose is to
-prevent your system from being overloaded and ensuring all the
-connections are handled optimally.</p></div>
-<div class="listingblock">
-<div class="title">Customizing the maximum number of concurrent connections</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The <code>max_connections</code> transport option allows you to limit the number of concurrent connections. It defaults to 1024. Its purpose is to prevent your system from being overloaded and ensuring all the connections are handled optimally.</p>
+<div class="listingblock"><div class="title">Customizing the maximum number of concurrent connections</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: #FF6600">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">ranch:start_listener</span></span>(<span style="color: #FF6600">tcp_echo</span>, <span style="color: #993399">100</span>,
- <span style="color: #FF6600">ranch_tcp</span>, [{<span style="color: #FF6600">port</span>, <span style="color: #993399">5555</span>}, {<span style="color: #FF6600">max_connections</span>, <span style="color: #993399">100</span>}],
- <span style="color: #FF6600">echo_protocol</span>, []
-)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>You can disable this limit by setting its value to the atom <code>infinity</code>.</p></div>
-<div class="listingblock">
-<div class="title">Disabling the limit for the number of connections</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">ranch:start_listener</font></b>(<font color="#FF6600">tcp_echo</font>, <font color="#993399">100</font>,
+ <font color="#FF6600">ranch_tcp</font>, [{<font color="#FF6600">port</font>, <font color="#993399">5555</font>}, {<font color="#FF6600">max_connections</font>, <font color="#993399">100</font>}],
+ <font color="#FF6600">echo_protocol</font>, []
+)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>You can disable this limit by setting its value to the atom <code>infinity</code>.</p>
+<div class="listingblock"><div class="title">Disabling the limit for the number of connections</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: #FF6600">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">ranch:start_listener</span></span>(<span style="color: #FF6600">tcp_echo</span>, <span style="color: #993399">100</span>,
- <span style="color: #FF6600">ranch_tcp</span>, [{<span style="color: #FF6600">port</span>, <span style="color: #993399">5555</span>}, {<span style="color: #FF6600">max_connections</span>, <span style="color: #FF6600">infinity</span>}],
- <span style="color: #FF6600">echo_protocol</span>, []
-)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>You may not always want connections to be counted when checking for
-<code>max_connections</code>. For example you might have a protocol where both
-short-lived and long-lived connections are possible. If the long-lived
-connections are mostly waiting for messages, then they don&#8217;t consume
-much resources and can safely be removed from the count.</p></div>
-<div class="paragraph"><p>To remove the connection from the count, you must call the
-<code>ranch:remove_connection/1</code> from within the connection process,
-with the name of the listener as the only argument.</p></div>
-<div class="listingblock">
-<div class="title">Removing a connection from the count of connections</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">ranch:start_listener</font></b>(<font color="#FF6600">tcp_echo</font>, <font color="#993399">100</font>,
+ <font color="#FF6600">ranch_tcp</font>, [{<font color="#FF6600">port</font>, <font color="#993399">5555</font>}, {<font color="#FF6600">max_connections</font>, <font color="#FF6600">infinity</font>}],
+ <font color="#FF6600">echo_protocol</font>, []
+)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>You may not always want connections to be counted when checking for <code>max_connections</code>. For example you might have a protocol where both short-lived and long-lived connections are possible. If the long-lived connections are mostly waiting for messages, then they don&apos;t consume much resources and can safely be removed from the count.</p>
+<p>To remove the connection from the count, you must call the <code>ranch:remove_connection/1</code> from within the connection process, with the name of the listener as the only argument.</p>
+<div class="listingblock"><div class="title">Removing a connection from the count of connections</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">ranch:remove_connection</span></span>(<span style="color: #009900">Ref</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>As seen in the chapter covering protocols, this pid is received as the
-first argument of the protocol&#8217;s <code>start_link/4</code> callback.</p></div>
-<div class="paragraph"><p>You can modify the <code>max_connections</code> value on a running listener by
-using the <code>ranch:set_max_connections/2</code> function, with the name of the
-listener as first argument and the new value as the second.</p></div>
-<div class="listingblock">
-<div class="title">Upgrading the maximum number of connections</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">ranch:remove_connection</font></b>(<font color="#009900">Ref</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>As seen in the chapter covering protocols, this pid is received as the first argument of the protocol&apos;s <code>start_link/4</code> callback.</p>
+<p>You can modify the <code>max_connections</code> value on a running listener by using the <code>ranch:set_max_connections/2</code> function, with the name of the listener as first argument and the new value as the second.</p>
+<div class="listingblock"><div class="title">Upgrading the maximum number of connections</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">ranch:set_max_connections</span></span>(<span style="color: #FF6600">tcp_echo</span>, <span style="color: #009900">MaxConns</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>The change will occur immediately.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">ranch:set_max_connections</font></b>(<font color="#FF6600">tcp_echo</font>, <font color="#009900">MaxConns</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>The change will occur immediately.</p>
<h2 id="_using_a_supervisor_for_connection_processes">Using a supervisor for connection processes</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Ranch allows you to define the type of process that will be used
-for the connection processes. By default it expects a <code>worker</code>.
-When the <code>connection_type</code> configuration value is set to <code>supervisor</code>,
-Ranch will consider that the connection process it manages is a
-supervisor and will reflect that in its supervision tree.</p></div>
-<div class="paragraph"><p>Connection processes of type <code>supervisor</code> can either handle the
-socket directly or through one of their children. In the latter
-case the start function for the connection process must return
-two pids: the pid of the supervisor you created (that will be
-supervised) and the pid of the protocol handling process (that
-will receive the socket).</p></div>
-<div class="paragraph"><p>Instead of returning <code>{ok, ConnPid}</code>, simply return
-<code>{ok, SupPid, ConnPid}</code>.</p></div>
-<div class="paragraph"><p>It is very important that the connection process be created
-under the supervisor process so that everything works as intended.
-If not, you will most likely experience issues when the supervised
-process is stopped.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Ranch allows you to define the type of process that will be used for the connection processes. By default it expects a <code>worker</code>. When the <code>connection_type</code> configuration value is set to <code>supervisor</code>, Ranch will consider that the connection process it manages is a supervisor and will reflect that in its supervision tree.</p>
+<p>Connection processes of type <code>supervisor</code> can either handle the socket directly or through one of their children. In the latter case the start function for the connection process must return two pids: the pid of the supervisor you created (that will be supervised) and the pid of the protocol handling process (that will receive the socket).</p>
+<p>Instead of returning <code>{ok, ConnPid}</code>, simply return <code>{ok, SupPid, ConnPid}</code>.</p>
+<p>It is very important that the connection process be created under the supervisor process so that everything works as intended. If not, you will most likely experience issues when the supervised process is stopped.</p>
<h2 id="_upgrading">Upgrading</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Ranch allows you to upgrade the protocol options. This takes effect
-immediately and for all subsequent connections.</p></div>
-<div class="paragraph"><p>To upgrade the protocol options, call <code>ranch:set_protocol_options/2</code>
-with the name of the listener as first argument and the new options
-as the second.</p></div>
-<div class="listingblock">
-<div class="title">Upgrading the protocol options</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Ranch allows you to upgrade the protocol options. This takes effect immediately and for all subsequent connections.</p>
+<p>To upgrade the protocol options, call <code>ranch:set_protocol_options/2</code> with the name of the listener as first argument and the new options as the second.</p>
+<div class="listingblock"><div class="title">Upgrading the protocol options</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">ranch:set_protocol_options</span></span>(<span style="color: #FF6600">tcp_echo</span>, <span style="color: #009900">NewOpts</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>All future connections will use the new options.</p></div>
-<div class="paragraph"><p>You can also retrieve the current options similarly by
-calling <code>ranch:get_protocol_options/1</code>.</p></div>
-<div class="listingblock">
-<div class="title">Retrieving the current protocol options</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">ranch:set_protocol_options</font></b>(<font color="#FF6600">tcp_echo</font>, <font color="#009900">NewOpts</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>All future connections will use the new options.</p>
+<p>You can also retrieve the current options similarly by calling <code>ranch:get_protocol_options/1</code>.</p>
+<div class="listingblock"><div class="title">Retrieving the current protocol options</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">Opts</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">ranch:get_protocol_options</span></span>(<span style="color: #FF6600">tcp_echo</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
+<pre><tt><font color="#009900">Opts</font> <font color="#990000">=</font> <b><font color="#000000">ranch:get_protocol_options</font></b>(<font color="#FF6600">tcp_echo</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+
@@ -399,6 +280,8 @@ http://www.gnu.org/software/src-highlite -->
+ <li><a href="/docs/en/ranch/1.5/guide">1.5</a></li>
+
<li><a href="/docs/en/ranch/1.4/guide">1.4</a></li>
<li><a href="/docs/en/ranch/1.3/guide">1.3</a></li>
diff --git a/docs/en/ranch/1.2/guide/parsers/index.html b/docs/en/ranch/1.2/guide/parsers/index.html
index f9f1ac5e..9891fde2 100644
--- a/docs/en/ranch/1.2/guide/parsers/index.html
+++ b/docs/en/ranch/1.2/guide/parsers/index.html
@@ -62,109 +62,69 @@
<h1 class="lined-header"><span>Writing parsers</span></h1>
-<div class="paragraph"><p>There are three kinds of protocols:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-Text protocols
-</p>
+<p>There are three kinds of protocols:</p>
+<ul><li>Text protocols
</li>
-<li>
-<p>
-Schema-less binary protocols
-</p>
+<li>Schema-less binary protocols
</li>
-<li>
-<p>
-Schema-based binary protocols
-</p>
+<li>Schema-based binary protocols
</li>
-</ul></div>
-<div class="paragraph"><p>This chapter introduces the first two kinds. It will not cover
-more advanced topics such as continuations or parser generators.</p></div>
-<div class="paragraph"><p>This chapter isn&#8217;t specifically about Ranch, we assume here that
-you know how to read data from the socket. The data you read and
-the data that hasn&#8217;t been parsed is saved in a buffer. Every
-time you read from the socket, the data read is appended to the
-buffer. What happens next depends on the kind of protocol. We
-will only cover the first two.</p></div>
-<div class="sect1">
+</ul>
+<p>This chapter introduces the first two kinds. It will not cover more advanced topics such as continuations or parser generators.</p>
+<p>This chapter isn&apos;t specifically about Ranch, we assume here that you know how to read data from the socket. The data you read and the data that hasn&apos;t been parsed is saved in a buffer. Every time you read from the socket, the data read is appended to the buffer. What happens next depends on the kind of protocol. We will only cover the first two.</p>
<h2 id="_parsing_text">Parsing text</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Text protocols are generally line based. This means that we can&#8217;t
-do anything with them until we receive the full line.</p></div>
-<div class="paragraph"><p>A simple way to get a full line is to use <code>binary:split/{2,3}</code>.</p></div>
-<div class="listingblock">
-<div class="title">Using binary:split/2 to get a line of input</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Text protocols are generally line based. This means that we can&apos;t do anything with them until we receive the full line.</p>
+<p>A simple way to get a full line is to use <code>binary:split/{2,3}</code>.</p>
+<div class="listingblock"><div class="title">Using binary:split/2 to get a line of input</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: #0000FF">case</span></span> <span style="font-weight: bold"><span style="color: #000000">binary:split</span></span>(<span style="color: #009900">Buffer</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"\n"</span><span style="color: #990000">&gt;&gt;</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
- [<span style="color: #990000">_</span>] <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #000000">get_more_data</span></span>(<span style="color: #009900">Buffer</span>);
- [<span style="color: #009900">Line</span>, <span style="color: #009900">Rest</span>] <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #000000">handle_line</span></span>(<span style="color: #009900">Line</span>, <span style="color: #009900">Rest</span>)
-<span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>In the above example, we can have two results. Either there was
-a line break in the buffer and we get it split into two parts,
-the line and the rest of the buffer; or there was no line break
-in the buffer and we need to get more data from the socket.</p></div>
-<div class="paragraph"><p>Next, we need to parse the line. The simplest way is to again
-split, here on space. The difference is that we want to split
-on all spaces character, as we want to tokenize the whole string.</p></div>
-<div class="listingblock">
-<div class="title">Using binary:split/3 to split text</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#0000FF">case</font></b> <b><font color="#000000">binary:split</font></b>(<font color="#009900">Buffer</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"\n"</font><font color="#990000">&gt;&gt;</font>) <b><font color="#0000FF">of</font></b>
+ [<font color="#990000">_</font>] <font color="#990000">-&gt;</font>
+ <b><font color="#000000">get_more_data</font></b>(<font color="#009900">Buffer</font>);
+ [<font color="#009900">Line</font>, <font color="#009900">Rest</font>] <font color="#990000">-&gt;</font>
+ <b><font color="#000000">handle_line</font></b>(<font color="#009900">Line</font>, <font color="#009900">Rest</font>)
+<b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>In the above example, we can have two results. Either there was a line break in the buffer and we get it split into two parts, the line and the rest of the buffer; or there was no line break in the buffer and we need to get more data from the socket.</p>
+<p>Next, we need to parse the line. The simplest way is to again split, here on space. The difference is that we want to split on all spaces character, as we want to tokenize the whole string.</p>
+<div class="listingblock"><div class="title">Using binary:split/3 to split text</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: #0000FF">case</span></span> <span style="font-weight: bold"><span style="color: #000000">binary:split</span></span>(<span style="color: #009900">Line</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">" "</span><span style="color: #990000">&gt;&gt;</span>, [<span style="color: #FF6600">global</span>]) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
- [<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"HELLO"</span><span style="color: #990000">&gt;&gt;</span>] <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #000000">be_polite</span></span>();
- [<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"AUTH"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">User</span>, <span style="color: #009900">Password</span>] <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #000000">authenticate_user</span></span>(<span style="color: #009900">User</span>, <span style="color: #009900">Password</span>);
- [<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"QUIT"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Reason</span>] <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #000000">quit</span></span>(<span style="color: #009900">Reason</span>)
- <span style="font-style: italic"><span style="color: #9A1900">%% ...</span></span>
-<span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Pretty simple, right? Match on the command name, get the rest
-of the tokens in variables and call the respective functions.</p></div>
-<div class="paragraph"><p>After doing this, you will want to check if there is another
-line in the buffer, and handle it immediately if any.
-Otherwise wait for more data.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#0000FF">case</font></b> <b><font color="#000000">binary:split</font></b>(<font color="#009900">Line</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">" "</font><font color="#990000">&gt;&gt;</font>, [<font color="#FF6600">global</font>]) <b><font color="#0000FF">of</font></b>
+ [<font color="#990000">&lt;&lt;</font><font color="#FF0000">"HELLO"</font><font color="#990000">&gt;&gt;</font>] <font color="#990000">-&gt;</font>
+ <b><font color="#000000">be_polite</font></b>();
+ [<font color="#990000">&lt;&lt;</font><font color="#FF0000">"AUTH"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">User</font>, <font color="#009900">Password</font>] <font color="#990000">-&gt;</font>
+ <b><font color="#000000">authenticate_user</font></b>(<font color="#009900">User</font>, <font color="#009900">Password</font>);
+ [<font color="#990000">&lt;&lt;</font><font color="#FF0000">"QUIT"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Reason</font>] <font color="#990000">-&gt;</font>
+ <b><font color="#000000">quit</font></b>(<font color="#009900">Reason</font>)
+ <i><font color="#9A1900">%% ...</font></i>
+<b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Pretty simple, right? Match on the command name, get the rest of the tokens in variables and call the respective functions.</p>
+<p>After doing this, you will want to check if there is another line in the buffer, and handle it immediately if any. Otherwise wait for more data.</p>
<h2 id="_parsing_binary">Parsing binary</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Binary protocols can be more varied, although most of them are
-pretty similar. The first four bytes of a frame tend to be
-the size of the frame, which is followed by a certain number
-of bytes for the type of frame and then various parameters.</p></div>
-<div class="paragraph"><p>Sometimes the size of the frame includes the first four bytes,
-sometimes not. Other times this size is encoded over two bytes.
-And even other times little-endian is used instead of big-endian.</p></div>
-<div class="paragraph"><p>The general idea stays the same though.</p></div>
-<div class="listingblock">
-<div class="title">Using binary pattern matching to split frames</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Binary protocols can be more varied, although most of them are pretty similar. The first four bytes of a frame tend to be the size of the frame, which is followed by a certain number of bytes for the type of frame and then various parameters.</p>
+<p>Sometimes the size of the frame includes the first four bytes, sometimes not. Other times this size is encoded over two bytes. And even other times little-endian is used instead of big-endian.</p>
+<p>The general idea stays the same though.</p>
+<div class="listingblock"><div class="title">Using binary pattern matching to split frames</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: #009900">Size</span><span style="color: #990000">:</span><span style="color: #993399">32</span>, <span style="color: #990000">_/</span><span style="color: #FF6600">bits</span> <span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=</span> <span style="color: #009900">Buffer</span>,
-<span style="font-weight: bold"><span style="color: #0000FF">case</span></span> <span style="color: #009900">Buffer</span> <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
- <span style="color: #990000">&lt;&lt;</span> <span style="color: #009900">Frame</span><span style="color: #990000">:</span><span style="color: #009900">Size</span><span style="color: #990000">/</span><span style="font-weight: bold"><span style="color: #000080">binary</span></span>, <span style="color: #009900">Rest</span><span style="color: #990000">/</span><span style="color: #FF6600">bits</span> <span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #000000">handle_frame</span></span>(<span style="color: #009900">Frame</span>, <span style="color: #009900">Rest</span>);
- <span style="color: #990000">_</span> <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #000000">get_more_data</span></span>(<span style="color: #009900">Buffer</span>)
-<span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>You will then need to parse this frame using binary pattern
-matching, and handle it. Then you will want to check if there
-is another frame fully received in the buffer, and handle it
-immediately if any. Otherwise wait for more data.</p></div>
-</div>
-</div>
+<pre><tt><font color="#990000">&lt;&lt;</font> <font color="#009900">Size</font><font color="#990000">:</font><font color="#993399">32</font>, <font color="#990000">_/</font><font color="#FF6600">bits</font> <font color="#990000">&gt;&gt;</font> <font color="#990000">=</font> <font color="#009900">Buffer</font>,
+<b><font color="#0000FF">case</font></b> <font color="#009900">Buffer</font> <b><font color="#0000FF">of</font></b>
+ <font color="#990000">&lt;&lt;</font> <font color="#009900">Frame</font><font color="#990000">:</font><font color="#009900">Size</font><font color="#990000">/</font><b><font color="#000080">binary</font></b>, <font color="#009900">Rest</font><font color="#990000">/</font><font color="#FF6600">bits</font> <font color="#990000">&gt;&gt;</font> <font color="#990000">-&gt;</font>
+ <b><font color="#000000">handle_frame</font></b>(<font color="#009900">Frame</font>, <font color="#009900">Rest</font>);
+ <font color="#990000">_</font> <font color="#990000">-&gt;</font>
+ <b><font color="#000000">get_more_data</font></b>(<font color="#009900">Buffer</font>)
+<b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>You will then need to parse this frame using binary pattern matching, and handle it. Then you will want to check if there is another frame fully received in the buffer, and handle it immediately if any. Otherwise wait for more data.</p>
+
@@ -221,6 +181,8 @@ immediately if any. Otherwise wait for more data.</p></div>
+ <li><a href="/docs/en/ranch/1.5/guide">1.5</a></li>
+
<li><a href="/docs/en/ranch/1.4/guide">1.4</a></li>
<li><a href="/docs/en/ranch/1.3/guide">1.3</a></li>
diff --git a/docs/en/ranch/1.2/guide/protocols/index.html b/docs/en/ranch/1.2/guide/protocols/index.html
index 950615b5..901a0770 100644
--- a/docs/en/ranch/1.2/guide/protocols/index.html
+++ b/docs/en/ranch/1.2/guide/protocols/index.html
@@ -62,129 +62,98 @@
<h1 class="lined-header"><span>Protocols</span></h1>
-<div class="paragraph"><p>A protocol handler starts a connection process and defines the
-protocol logic executed in this process.</p></div>
-<div class="sect1">
+<p>A protocol handler starts a connection process and defines the protocol logic executed in this process.</p>
<h2 id="_writing_a_protocol_handler">Writing a protocol handler</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>All protocol handlers must implement the <code>ranch_protocol</code> behavior
-which defines a single callback, <code>start_link/4</code>. This callback is
-responsible for spawning a new process for handling the connection.
-It receives four arguments: the name of the listener, the socket, the
-transport handler being used and the protocol options defined in
-the call to <code>ranch:start_listener/6</code>. This callback must
-return <code>{ok, Pid}</code>, with <code>Pid</code> the pid of the new process.</p></div>
-<div class="paragraph"><p>The newly started process can then freely initialize itself. However,
-it must call <code>ranch:accept_ack/1</code> before doing any socket operation.
-This will ensure the connection process is the owner of the socket.
-It expects the listener&#8217;s name as argument.</p></div>
-<div class="listingblock">
-<div class="title">Acknowledge accepting the socket</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<p>All protocol handlers must implement the <code>ranch_protocol</code> behavior which defines a single callback, <code>start_link/4</code>. This callback is responsible for spawning a new process for handling the connection. It receives four arguments: the name of the listener, the socket, the transport handler being used and the protocol options defined in the call to <code>ranch:start_listener/6</code>. This callback must return <code>{ok, Pid}</code>, with <code>Pid</code> the pid of the new process.</p>
+<p>The newly started process can then freely initialize itself. However, it must call <code>ranch:accept_ack/1</code> before doing any socket operation. This will ensure the connection process is the owner of the socket. It expects the listener&apos;s name as argument.</p>
+<div class="listingblock"><div class="title">Acknowledge accepting the socket</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: #0000FF">ok</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">ranch:accept_ack</span></span>(<span style="color: #009900">Ref</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>If your protocol code requires specific socket options, you should
-set them while initializing your connection process, after
-calling <code>ranch:accept_ack/1</code>. You can use <code>Transport:setopts/2</code>
-for that purpose.</p></div>
-<div class="paragraph"><p>Following is the complete protocol code for the example found
-in <code>examples/tcp_echo/</code>.</p></div>
-<div class="listingblock">
-<div class="title">Protocol module that echoes everything it receives</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#0000FF">ok</font> <font color="#990000">=</font> <b><font color="#000000">ranch:accept_ack</font></b>(<font color="#009900">Ref</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>If your protocol code requires specific socket options, you should set them while initializing your connection process, after calling <code>ranch:accept_ack/1</code>. You can use <code>Transport:setopts/2</code> for that purpose.</p>
+<p>Following is the complete protocol code for the example found in <code>examples/tcp_echo/</code>.</p>
+<div class="listingblock"><div class="title">Protocol module that echoes everything it receives</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: #000080">-module</span></span>(<span style="color: #FF6600">echo_protocol</span>)<span style="color: #990000">.</span>
-<span style="font-weight: bold"><span style="color: #000080">-behaviour</span></span>(<span style="color: #FF6600">ranch_protocol</span>)<span style="color: #990000">.</span>
-
-<span style="font-weight: bold"><span style="color: #000080">-export</span></span>([<span style="font-weight: bold"><span style="color: #000000">start_link</span></span><span style="color: #990000">/</span><span style="color: #993399">4</span>])<span style="color: #990000">.</span>
-<span style="font-weight: bold"><span style="color: #000080">-export</span></span>([<span style="font-weight: bold"><span style="color: #000000">init</span></span><span style="color: #990000">/</span><span style="color: #993399">4</span>])<span style="color: #990000">.</span>
-
-<span style="font-weight: bold"><span style="color: #000000">start_link</span></span>(<span style="color: #009900">Ref</span>, <span style="color: #009900">Socket</span>, <span style="color: #009900">Transport</span>, <span style="color: #009900">Opts</span>) <span style="color: #990000">-&gt;</span>
- <span style="color: #009900">Pid</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000080">spawn_link</span></span>(<span style="font-weight: bold"><span style="color: #000080">?MODULE</span></span>, <span style="color: #FF6600">init</span>, [<span style="color: #009900">Ref</span>, <span style="color: #009900">Socket</span>, <span style="color: #009900">Transport</span>, <span style="color: #009900">Opts</span>]),
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Pid</span>}<span style="color: #990000">.</span>
-
-<span style="font-weight: bold"><span style="color: #000000">init</span></span>(<span style="color: #009900">Ref</span>, <span style="color: #009900">Socket</span>, <span style="color: #009900">Transport</span>, <span style="color: #009900">_Opts</span> <span style="color: #990000">=</span> []) <span style="color: #990000">-&gt;</span>
- <span style="color: #0000FF">ok</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">ranch:accept_ack</span></span>(<span style="color: #009900">Ref</span>),
- <span style="font-weight: bold"><span style="color: #000000">loop</span></span>(<span style="color: #009900">Socket</span>, <span style="color: #009900">Transport</span>)<span style="color: #990000">.</span>
-
-<span style="font-weight: bold"><span style="color: #000000">loop</span></span>(<span style="color: #009900">Socket</span>, <span style="color: #009900">Transport</span>) <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #0000FF">case</span></span> <span style="color: #009900">Transport</span><span style="color: #990000">:</span><span style="font-weight: bold"><span style="color: #000000">recv</span></span>(<span style="color: #009900">Socket</span>, <span style="color: #993399">0</span>, <span style="color: #993399">5000</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Data</span>} <span style="color: #990000">-&gt;</span>
- <span style="color: #009900">Transport</span><span style="color: #990000">:</span><span style="font-weight: bold"><span style="color: #000000">send</span></span>(<span style="color: #009900">Socket</span>, <span style="color: #009900">Data</span>),
- <span style="font-weight: bold"><span style="color: #000000">loop</span></span>(<span style="color: #009900">Socket</span>, <span style="color: #009900">Transport</span>);
- <span style="color: #990000">_</span> <span style="color: #990000">-&gt;</span>
- <span style="color: #0000FF">ok</span> <span style="color: #990000">=</span> <span style="color: #009900">Transport</span><span style="color: #990000">:</span><span style="font-weight: bold"><span style="color: #000000">close</span></span>(<span style="color: #009900">Socket</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">
+<pre><tt><b><font color="#000080">-module</font></b>(<font color="#FF6600">echo_protocol</font>)<font color="#990000">.</font>
+<b><font color="#000080">-behaviour</font></b>(<font color="#FF6600">ranch_protocol</font>)<font color="#990000">.</font>
+
+<b><font color="#000080">-export</font></b>([<b><font color="#000000">start_link</font></b><font color="#990000">/</font><font color="#993399">4</font>])<font color="#990000">.</font>
+<b><font color="#000080">-export</font></b>([<b><font color="#000000">init</font></b><font color="#990000">/</font><font color="#993399">4</font>])<font color="#990000">.</font>
+
+<b><font color="#000000">start_link</font></b>(<font color="#009900">Ref</font>, <font color="#009900">Socket</font>, <font color="#009900">Transport</font>, <font color="#009900">Opts</font>) <font color="#990000">-&gt;</font>
+ <font color="#009900">Pid</font> <font color="#990000">=</font> <b><font color="#000080">spawn_link</font></b>(<b><font color="#000080">?MODULE</font></b>, <font color="#FF6600">init</font>, [<font color="#009900">Ref</font>, <font color="#009900">Socket</font>, <font color="#009900">Transport</font>, <font color="#009900">Opts</font>]),
+ {<font color="#FF6600">ok</font>, <font color="#009900">Pid</font>}<font color="#990000">.</font>
+
+<b><font color="#000000">init</font></b>(<font color="#009900">Ref</font>, <font color="#009900">Socket</font>, <font color="#009900">Transport</font>, <font color="#009900">_Opts</font> <font color="#990000">=</font> []) <font color="#990000">-&gt;</font>
+ <font color="#0000FF">ok</font> <font color="#990000">=</font> <b><font color="#000000">ranch:accept_ack</font></b>(<font color="#009900">Ref</font>),
+ <b><font color="#000000">loop</font></b>(<font color="#009900">Socket</font>, <font color="#009900">Transport</font>)<font color="#990000">.</font>
+
+<b><font color="#000000">loop</font></b>(<font color="#009900">Socket</font>, <font color="#009900">Transport</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">case</font></b> <font color="#009900">Transport</font><font color="#990000">:</font><b><font color="#000000">recv</font></b>(<font color="#009900">Socket</font>, <font color="#993399">0</font>, <font color="#993399">5000</font>) <b><font color="#0000FF">of</font></b>
+ {<font color="#FF6600">ok</font>, <font color="#009900">Data</font>} <font color="#990000">-&gt;</font>
+ <font color="#009900">Transport</font><font color="#990000">:</font><b><font color="#000000">send</font></b>(<font color="#009900">Socket</font>, <font color="#009900">Data</font>),
+ <b><font color="#000000">loop</font></b>(<font color="#009900">Socket</font>, <font color="#009900">Transport</font>);
+ <font color="#990000">_</font> <font color="#990000">-&gt;</font>
+ <font color="#0000FF">ok</font> <font color="#990000">=</font> <font color="#009900">Transport</font><font color="#990000">:</font><b><font color="#000000">close</font></b>(<font color="#009900">Socket</font>)
+ <b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_using_gen_server">Using gen_server</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Special processes like the ones that use the <code>gen_server</code> or <code>gen_fsm</code>
-behaviours have the particularity of having their <code>start_link</code> call not
-return until the <code>init</code> function returns. This is problematic, because
-you won&#8217;t be able to call <code>ranch:accept_ack/1</code> from the <code>init</code> callback
-as this would cause a deadlock to happen.</p></div>
-<div class="paragraph"><p>There are two ways of solving this problem.</p></div>
-<div class="paragraph"><p>The first, and probably the most elegant one, is to make use of the
-<code>gen_server:enter_loop/3</code> function. It allows you to start your process
-normally (although it must be started with <code>proc_lib</code> like all special
-processes), then perform any needed operations before falling back into
-the normal <code>gen_server</code> execution loop.</p></div>
-<div class="listingblock">
-<div class="title">Use a gen_server for protocol handling</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Special processes like the ones that use the <code>gen_server</code> or <code>gen_fsm</code> behaviours have the particularity of having their <code>start_link</code> call not return until the <code>init</code> function returns. This is problematic, because you won&apos;t be able to call <code>ranch:accept_ack/1</code> from the <code>init</code> callback as this would cause a deadlock to happen.</p>
+<p>There are two ways of solving this problem.</p>
+<p>The first, and probably the most elegant one, is to make use of the <code>gen_server:enter_loop/3</code> function. It allows you to start your process normally (although it must be started with <code>proc_lib</code> like all special processes), then perform any needed operations before falling back into the normal <code>gen_server</code> execution loop.</p>
+<div class="listingblock"><div class="title">Use a gen_server for protocol handling</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: #000080">-module</span></span>(<span style="color: #FF6600">my_protocol</span>)<span style="color: #990000">.</span>
-<span style="font-weight: bold"><span style="color: #000080">-behaviour</span></span>(<span style="color: #FF6600">gen_server</span>)<span style="color: #990000">.</span>
-<span style="font-weight: bold"><span style="color: #000080">-behaviour</span></span>(<span style="color: #FF6600">ranch_protocol</span>)<span style="color: #990000">.</span>
-
-<span style="font-weight: bold"><span style="color: #000080">-export</span></span>([<span style="font-weight: bold"><span style="color: #000000">start_link</span></span><span style="color: #990000">/</span><span style="color: #993399">4</span>])<span style="color: #990000">.</span>
-<span style="font-weight: bold"><span style="color: #000080">-export</span></span>([<span style="font-weight: bold"><span style="color: #000000">init</span></span><span style="color: #990000">/</span><span style="color: #993399">4</span>])<span style="color: #990000">.</span>
-<span style="font-style: italic"><span style="color: #9A1900">%% Exports of other gen_server callbacks here.</span></span>
-
-<span style="font-weight: bold"><span style="color: #000000">start_link</span></span>(<span style="color: #009900">Ref</span>, <span style="color: #009900">Socket</span>, <span style="color: #009900">Transport</span>, <span style="color: #009900">Opts</span>) <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #000000">proc_lib:start_link</span></span>(<span style="font-weight: bold"><span style="color: #000080">?MODULE</span></span>, <span style="color: #FF6600">init</span>, [<span style="color: #009900">Ref</span>, <span style="color: #009900">Socket</span>, <span style="color: #009900">Transport</span>, <span style="color: #009900">Opts</span>])<span style="color: #990000">.</span>
-
-<span style="font-weight: bold"><span style="color: #000000">init</span></span>(<span style="color: #009900">Ref</span>, <span style="color: #009900">Socket</span>, <span style="color: #009900">Transport</span>, <span style="color: #009900">_Opts</span> <span style="color: #990000">=</span> []) <span style="color: #990000">-&gt;</span>
- <span style="color: #0000FF">ok</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">proc_lib:init_ack</span></span>({<span style="color: #FF6600">ok</span>, <span style="font-weight: bold"><span style="color: #000080">self</span></span>()}),
- <span style="font-style: italic"><span style="color: #9A1900">%% Perform any required state initialization here.</span></span>
- <span style="color: #0000FF">ok</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">ranch:accept_ack</span></span>(<span style="color: #009900">Ref</span>),
- <span style="color: #0000FF">ok</span> <span style="color: #990000">=</span> <span style="color: #009900">Transport</span><span style="color: #990000">:</span><span style="font-weight: bold"><span style="color: #000000">setopts</span></span>(<span style="color: #009900">Socket</span>, [{<span style="color: #FF6600">active</span>, <span style="color: #FF6600">once</span>}]),
- <span style="font-weight: bold"><span style="color: #000000">gen_server:enter_loop</span></span>(<span style="font-weight: bold"><span style="color: #000080">?MODULE</span></span>, [], {<span style="color: #FF6600">state</span>, <span style="color: #009900">Socket</span>, <span style="color: #009900">Transport</span>})<span style="color: #990000">.</span>
-
-<span style="font-style: italic"><span style="color: #9A1900">%% Other gen_server callbacks here.</span></span></tt></pre></div></div>
-<div class="paragraph"><p>The second method involves triggering a timeout just after <code>gen_server:init</code>
-ends. If you return a timeout value of <code>0</code> then the <code>gen_server</code> will call
-<code>handle_info(timeout, _, _)</code> right away.</p></div>
-<div class="listingblock">
-<div class="title">Use a gen_server for protocol handling, method 2</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000080">-module</font></b>(<font color="#FF6600">my_protocol</font>)<font color="#990000">.</font>
+<b><font color="#000080">-behaviour</font></b>(<font color="#FF6600">gen_server</font>)<font color="#990000">.</font>
+<b><font color="#000080">-behaviour</font></b>(<font color="#FF6600">ranch_protocol</font>)<font color="#990000">.</font>
+
+<b><font color="#000080">-export</font></b>([<b><font color="#000000">start_link</font></b><font color="#990000">/</font><font color="#993399">4</font>])<font color="#990000">.</font>
+<b><font color="#000080">-export</font></b>([<b><font color="#000000">init</font></b><font color="#990000">/</font><font color="#993399">4</font>])<font color="#990000">.</font>
+<i><font color="#9A1900">%% Exports of other gen_server callbacks here.</font></i>
+
+<b><font color="#000000">start_link</font></b>(<font color="#009900">Ref</font>, <font color="#009900">Socket</font>, <font color="#009900">Transport</font>, <font color="#009900">Opts</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#000000">proc_lib:start_link</font></b>(<b><font color="#000080">?MODULE</font></b>, <font color="#FF6600">init</font>, [<font color="#009900">Ref</font>, <font color="#009900">Socket</font>, <font color="#009900">Transport</font>, <font color="#009900">Opts</font>])<font color="#990000">.</font>
+
+<b><font color="#000000">init</font></b>(<font color="#009900">Ref</font>, <font color="#009900">Socket</font>, <font color="#009900">Transport</font>, <font color="#009900">_Opts</font> <font color="#990000">=</font> []) <font color="#990000">-&gt;</font>
+ <font color="#0000FF">ok</font> <font color="#990000">=</font> <b><font color="#000000">proc_lib:init_ack</font></b>({<font color="#FF6600">ok</font>, <b><font color="#000080">self</font></b>()}),
+ <i><font color="#9A1900">%% Perform any required state initialization here.</font></i>
+ <font color="#0000FF">ok</font> <font color="#990000">=</font> <b><font color="#000000">ranch:accept_ack</font></b>(<font color="#009900">Ref</font>),
+ <font color="#0000FF">ok</font> <font color="#990000">=</font> <font color="#009900">Transport</font><font color="#990000">:</font><b><font color="#000000">setopts</font></b>(<font color="#009900">Socket</font>, [{<font color="#FF6600">active</font>, <font color="#FF6600">once</font>}]),
+ <b><font color="#000000">gen_server:enter_loop</font></b>(<b><font color="#000080">?MODULE</font></b>, [], {<font color="#FF6600">state</font>, <font color="#009900">Socket</font>, <font color="#009900">Transport</font>})<font color="#990000">.</font>
+
+<i><font color="#9A1900">%% Other gen_server callbacks here.</font></i></tt></pre>
+</div></div>
+<p>The second method involves triggering a timeout just after <code>gen_server:init</code> ends. If you return a timeout value of <code>0</code> then the <code>gen_server</code> will call <code>handle_info(timeout, _, _)</code> right away.</p>
+<div class="listingblock"><div class="title">Use a gen_server for protocol handling, method 2</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: #000080">-module</span></span>(<span style="color: #FF6600">my_protocol</span>)<span style="color: #990000">.</span>
-<span style="font-weight: bold"><span style="color: #000080">-behaviour</span></span>(<span style="color: #FF6600">gen_server</span>)<span style="color: #990000">.</span>
-<span style="font-weight: bold"><span style="color: #000080">-behaviour</span></span>(<span style="color: #FF6600">ranch_protocol</span>)<span style="color: #990000">.</span>
+<pre><tt><b><font color="#000080">-module</font></b>(<font color="#FF6600">my_protocol</font>)<font color="#990000">.</font>
+<b><font color="#000080">-behaviour</font></b>(<font color="#FF6600">gen_server</font>)<font color="#990000">.</font>
+<b><font color="#000080">-behaviour</font></b>(<font color="#FF6600">ranch_protocol</font>)<font color="#990000">.</font>
-<span style="font-style: italic"><span style="color: #9A1900">%% Exports go here.</span></span>
+<i><font color="#9A1900">%% Exports go here.</font></i>
-<span style="font-weight: bold"><span style="color: #000000">init</span></span>([<span style="color: #009900">Ref</span>, <span style="color: #009900">Socket</span>, <span style="color: #009900">Transport</span>]) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">ok</span>, {<span style="color: #FF6600">state</span>, <span style="color: #009900">Ref</span>, <span style="color: #009900">Socket</span>, <span style="color: #009900">Transport</span>}, <span style="color: #993399">0</span>}<span style="color: #990000">.</span>
+<b><font color="#000000">init</font></b>([<font color="#009900">Ref</font>, <font color="#009900">Socket</font>, <font color="#009900">Transport</font>]) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, {<font color="#FF6600">state</font>, <font color="#009900">Ref</font>, <font color="#009900">Socket</font>, <font color="#009900">Transport</font>}, <font color="#993399">0</font>}<font color="#990000">.</font>
+
+<b><font color="#000000">handle_info</font></b>(<font color="#FF6600">timeout</font>, <font color="#009900">State</font><font color="#990000">=</font>{<font color="#FF6600">state</font>, <font color="#009900">Ref</font>, <font color="#009900">Socket</font>, <font color="#009900">Transport</font>}) <font color="#990000">-&gt;</font>
+ <font color="#0000FF">ok</font> <font color="#990000">=</font> <b><font color="#000000">ranch:accept_ack</font></b>(<font color="#009900">Ref</font>),
+ <font color="#0000FF">ok</font> <font color="#990000">=</font> <font color="#009900">Transport</font><font color="#990000">:</font><b><font color="#000000">setopts</font></b>(<font color="#009900">Socket</font>, [{<font color="#FF6600">active</font>, <font color="#FF6600">once</font>}]),
+ {<font color="#FF6600">noreply</font>, <font color="#009900">State</font>};
+<i><font color="#9A1900">%% ...</font></i></tt></pre>
+</div></div>
-<span style="font-weight: bold"><span style="color: #000000">handle_info</span></span>(<span style="color: #FF6600">timeout</span>, <span style="color: #009900">State</span><span style="color: #990000">=</span>{<span style="color: #FF6600">state</span>, <span style="color: #009900">Ref</span>, <span style="color: #009900">Socket</span>, <span style="color: #009900">Transport</span>}) <span style="color: #990000">-&gt;</span>
- <span style="color: #0000FF">ok</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">ranch:accept_ack</span></span>(<span style="color: #009900">Ref</span>),
- <span style="color: #0000FF">ok</span> <span style="color: #990000">=</span> <span style="color: #009900">Transport</span><span style="color: #990000">:</span><span style="font-weight: bold"><span style="color: #000000">setopts</span></span>(<span style="color: #009900">Socket</span>, [{<span style="color: #FF6600">active</span>, <span style="color: #FF6600">once</span>}]),
- {<span style="color: #FF6600">noreply</span>, <span style="color: #009900">State</span>};
-<span style="font-style: italic"><span style="color: #9A1900">%% ...</span></span></tt></pre></div></div>
-</div>
-</div>
@@ -241,6 +210,8 @@ http://www.gnu.org/software/src-highlite -->
+ <li><a href="/docs/en/ranch/1.5/guide">1.5</a></li>
+
<li><a href="/docs/en/ranch/1.4/guide">1.4</a></li>
<li><a href="/docs/en/ranch/1.3/guide">1.3</a></li>
diff --git a/docs/en/ranch/1.2/guide/ssl_auth/index.html b/docs/en/ranch/1.2/guide/ssl_auth/index.html
index 498c719a..2a0d3b35 100644
--- a/docs/en/ranch/1.2/guide/ssl_auth/index.html
+++ b/docs/en/ranch/1.2/guide/ssl_auth/index.html
@@ -62,158 +62,82 @@
<h1 class="lined-header"><span>SSL client authentication</span></h1>
-<div class="sect1">
<h2 id="_purpose">Purpose</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>SSL client authentication is a mechanism allowing applications to
-identify certificates. This allows your application to make sure that
-the client is an authorized certificate, but makes no claim about
-whether the user can be trusted. This can be combined with a password
-based authentication to attain greater security.</p></div>
-<div class="paragraph"><p>The server only needs to retain the certificate serial number and
-the certificate issuer to authenticate the certificate. Together,
-they can be used to uniquely identify a certicate.</p></div>
-<div class="paragraph"><p>As Ranch allows the same protocol code to be used for both SSL and
-non-SSL transports, you need to make sure you are in an SSL context
-before attempting to perform an SSL client authentication. This
-can be done by checking the return value of <code>Transport:name/0</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>SSL client authentication is a mechanism allowing applications to identify certificates. This allows your application to make sure that the client is an authorized certificate, but makes no claim about whether the user can be trusted. This can be combined with a password based authentication to attain greater security.</p>
+<p>The server only needs to retain the certificate serial number and the certificate issuer to authenticate the certificate. Together, they can be used to uniquely identify a certicate.</p>
+<p>As Ranch allows the same protocol code to be used for both SSL and non-SSL transports, you need to make sure you are in an SSL context before attempting to perform an SSL client authentication. This can be done by checking the return value of <code>Transport:name/0</code>.</p>
<h2 id="_obtaining_client_certificates">Obtaining client certificates</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>You can obtain client certificates from various sources. You can
-generate them yourself, or you can use a service like CAcert.org
-which allows you to generate client and server certificates for
-free.</p></div>
-<div class="paragraph"><p>Following are the steps you need to take to create a CAcert.org
-account, generate a certificate and install it in your favorite
-browser.</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-Open [CAcert.org](<a href="http://cacert.org">http://cacert.org</a>) in your favorite browser
-</p>
+<p>You can obtain client certificates from various sources. You can generate them yourself, or you can use a service like CAcert.org which allows you to generate client and server certificates for free.</p>
+<p>Following are the steps you need to take to create a CAcert.org account, generate a certificate and install it in your favorite browser.</p>
+<ul><li>Open [CAcert.org](<a href="http://cacert.org)">http://cacert.org)</a> in your favorite browser
</li>
-<li>
-<p>
-Root Certificate link: install both certificates
-</p>
+<li>Root Certificate link: install both certificates
</li>
-<li>
-<p>
-Join (Register an account)
-</p>
+<li>Join (Register an account)
</li>
-<li>
-<p>
-Verify your account (check your email inbox!)
-</p>
+<li>Verify your account (check your email inbox!)
</li>
-<li>
-<p>
-Log in
-</p>
+<li>Log in
</li>
-<li>
-<p>
-Client Certificates: New
-</p>
+<li>Client Certificates: New
</li>
-<li>
-<p>
-Follow instructions to create the certificate
-</p>
+<li>Follow instructions to create the certificate
</li>
-<li>
-<p>
-Install the certificate in your browser
-</p>
+<li>Install the certificate in your browser
</li>
-</ul></div>
-<div class="paragraph"><p>You can optionally save the certificate for later use, for example
-to extract the <code>IssuerID</code> information as will be detailed later on.</p></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
+<p>You can optionally save the certificate for later use, for example to extract the <code>IssuerID</code> information as will be detailed later on.</p>
<h2 id="_transport_configuration">Transport configuration</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The SSL transport does not request a client certificate by default.
-You need to specify the <code>{verify, verify_peer}</code> option when starting
-the listener to enable this behavior.</p></div>
-<div class="listingblock">
-<div class="title">Configure a listener for SSL authentication</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The SSL transport does not request a client certificate by default. You need to specify the <code>{verify, verify_peer}</code> option when starting the listener to enable this behavior.</p>
+<div class="listingblock"><div class="title">Configure a listener for SSL authentication</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: #FF6600">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">ranch:start_listener</span></span>(<span style="color: #FF6600">my_ssl</span>, <span style="color: #993399">100</span>,
- <span style="color: #FF6600">ranch_ssl</span>, [
- {<span style="color: #FF6600">port</span>, <span style="color: #009900">SSLPort</span>},
- {<span style="color: #FF6600">certfile</span>, <span style="color: #009900">PathToCertfile</span>},
- {<span style="color: #FF6600">cacertfile</span>, <span style="color: #009900">PathToCACertfile</span>},
- {<span style="color: #FF6600">verify</span>, <span style="color: #FF6600">verify_peer</span>}
- ],
- <span style="color: #FF6600">my_protocol</span>, []
-)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>In this example we set the required <code>port</code> and <code>certfile</code>, but also
-the <code>cacertfile</code> containing the CACert.org root certificate, and
-the option to request the client certificate.</p></div>
-<div class="paragraph"><p>If you enable the <code>{verify, verify_peer}</code> option and the client does
-not have a client certificate configured for your domain, then no
-certificate will be sent. This allows you to use SSL for more than
-just authenticated clients.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">ranch:start_listener</font></b>(<font color="#FF6600">my_ssl</font>, <font color="#993399">100</font>,
+ <font color="#FF6600">ranch_ssl</font>, [
+ {<font color="#FF6600">port</font>, <font color="#009900">SSLPort</font>},
+ {<font color="#FF6600">certfile</font>, <font color="#009900">PathToCertfile</font>},
+ {<font color="#FF6600">cacertfile</font>, <font color="#009900">PathToCACertfile</font>},
+ {<font color="#FF6600">verify</font>, <font color="#FF6600">verify_peer</font>}
+ ],
+ <font color="#FF6600">my_protocol</font>, []
+)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>In this example we set the required <code>port</code> and <code>certfile</code>, but also the <code>cacertfile</code> containing the CACert.org root certificate, and the option to request the client certificate.</p>
+<p>If you enable the <code>{verify, verify_peer}</code> option and the client does not have a client certificate configured for your domain, then no certificate will be sent. This allows you to use SSL for more than just authenticated clients.</p>
<h2 id="_authentication">Authentication</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>To authenticate users, you must first save the certificate information
-required. If you have your users' certificate files, you can simply
-load the certificate and retrieve the information directly.</p></div>
-<div class="listingblock">
-<div class="title">Retrieve the issuer ID from a certificate</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<p>To authenticate users, you must first save the certificate information required. If you have your users&apos; certificate files, you can simply load the certificate and retrieve the information directly.</p>
+<div class="listingblock"><div class="title">Retrieve the issuer ID from a certificate</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">certfile_to_issuer_id</span></span>(<span style="color: #009900">Filename</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Data</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">file:read_file</span></span>(<span style="color: #009900">Filename</span>),
- [{<span style="color: #FF6600">'Certificate'</span>, <span style="color: #009900">Cert</span>, <span style="color: #FF6600">not_encrypted</span>}] <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">public_key:pem_decode</span></span>(<span style="color: #009900">Data</span>),
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">IssuerID</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">public_key:pkix_issuer_id</span></span>(<span style="color: #009900">Cert</span>, <span style="font-weight: bold"><span style="color: #000080">self</span></span>),
- <span style="color: #009900">IssuerID</span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>The <code>IssuerID</code> variable contains both the certificate serial number
-and the certificate issuer stored in a tuple, so this value alone can
-be used to uniquely identify the user certificate. You can save this
-value in a database, a configuration file or any other place where an
-Erlang term can be stored and retrieved.</p></div>
-<div class="paragraph"><p>To retrieve the <code>IssuerID</code> from a running connection, you need to first
-retrieve the client certificate and then extract this information from
-it. Ranch does not provide a function to retrieve the client certificate.
-Instead you can use the <code>ssl:peercert/1</code> function. Once you have the
-certificate, you can again use the <code>public_key:pkix_issuer_id/2</code> to
-extract the <code>IssuerID</code> value.</p></div>
-<div class="paragraph"><p>The following function returns the <code>IssuerID</code> or <code>false</code> if no client
-certificate was found. This snippet is intended to be used from your
-protocol code.</p></div>
-<div class="listingblock">
-<div class="title">Retrieve the issuer ID from the certificate for the current connection</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">certfile_to_issuer_id</font></b>(<font color="#009900">Filename</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <font color="#009900">Data</font>} <font color="#990000">=</font> <b><font color="#000000">file:read_file</font></b>(<font color="#009900">Filename</font>),
+ [{<font color="#FF6600">'Certificate'</font>, <font color="#009900">Cert</font>, <font color="#FF6600">not_encrypted</font>}] <font color="#990000">=</font> <b><font color="#000000">public_key:pem_decode</font></b>(<font color="#009900">Data</font>),
+ {<font color="#FF6600">ok</font>, <font color="#009900">IssuerID</font>} <font color="#990000">=</font> <b><font color="#000000">public_key:pkix_issuer_id</font></b>(<font color="#009900">Cert</font>, <b><font color="#000080">self</font></b>),
+ <font color="#009900">IssuerID</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>The <code>IssuerID</code> variable contains both the certificate serial number and the certificate issuer stored in a tuple, so this value alone can be used to uniquely identify the user certificate. You can save this value in a database, a configuration file or any other place where an Erlang term can be stored and retrieved.</p>
+<p>To retrieve the <code>IssuerID</code> from a running connection, you need to first retrieve the client certificate and then extract this information from it. Ranch does not provide a function to retrieve the client certificate. Instead you can use the <code>ssl:peercert/1</code> function. Once you have the certificate, you can again use the <code>public_key:pkix_issuer_id/2</code> to extract the <code>IssuerID</code> value.</p>
+<p>The following function returns the <code>IssuerID</code> or <code>false</code> if no client certificate was found. This snippet is intended to be used from your protocol code.</p>
+<div class="listingblock"><div class="title">Retrieve the issuer ID from the certificate for the current connection</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">socket_to_issuer_id</span></span>(<span style="color: #009900">Socket</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">ssl:peercert</span></span>(<span style="color: #009900">Socket</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
- {<span style="color: #FF6600">error</span>, <span style="color: #FF6600">no_peercert</span>} <span style="color: #990000">-&gt;</span>
- <span style="color: #000080">false</span>;
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Cert</span>} <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">IssuerID</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">public_key:pkix_issuer_id</span></span>(<span style="color: #009900">Cert</span>, <span style="font-weight: bold"><span style="color: #000080">self</span></span>),
- <span style="color: #009900">IssuerID</span>
- <span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>You then only need to match the <code>IssuerID</code> value to authenticate the
-user.</p></div>
-</div>
-</div>
+<pre><tt><b><font color="#000000">socket_to_issuer_id</font></b>(<font color="#009900">Socket</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">case</font></b> <b><font color="#000000">ssl:peercert</font></b>(<font color="#009900">Socket</font>) <b><font color="#0000FF">of</font></b>
+ {<font color="#FF6600">error</font>, <font color="#FF6600">no_peercert</font>} <font color="#990000">-&gt;</font>
+ <font color="#000080">false</font>;
+ {<font color="#FF6600">ok</font>, <font color="#009900">Cert</font>} <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <font color="#009900">IssuerID</font>} <font color="#990000">=</font> <b><font color="#000000">public_key:pkix_issuer_id</font></b>(<font color="#009900">Cert</font>, <b><font color="#000080">self</font></b>),
+ <font color="#009900">IssuerID</font>
+ <b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>You then only need to match the <code>IssuerID</code> value to authenticate the user.</p>
+
@@ -270,6 +194,8 @@ user.</p></div>
+ <li><a href="/docs/en/ranch/1.5/guide">1.5</a></li>
+
<li><a href="/docs/en/ranch/1.4/guide">1.4</a></li>
<li><a href="/docs/en/ranch/1.3/guide">1.3</a></li>
diff --git a/docs/en/ranch/1.2/guide/transports/index.html b/docs/en/ranch/1.2/guide/transports/index.html
index 91e2d4d6..3ced83c7 100644
--- a/docs/en/ranch/1.2/guide/transports/index.html
+++ b/docs/en/ranch/1.2/guide/transports/index.html
@@ -62,189 +62,114 @@
<h1 class="lined-header"><span>Transports</span></h1>
-<div class="paragraph"><p>A transport defines the interface to interact with a socket.</p></div>
-<div class="paragraph"><p>Transports can be used for connecting, listening and accepting
-connections, but also for receiving and sending data. Both
-passive and active mode are supported, although all sockets
-are initialized as passive.</p></div>
-<div class="sect1">
+<p>A transport defines the interface to interact with a socket.</p>
+<p>Transports can be used for connecting, listening and accepting connections, but also for receiving and sending data. Both passive and active mode are supported, although all sockets are initialized as passive.</p>
<h2 id="_tcp_transport">TCP transport</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The TCP transport is a thin wrapper around <code>gen_tcp</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The TCP transport is a thin wrapper around <code>gen_tcp</code>.</p>
<h2 id="_ssl_transport">SSL transport</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The SSL transport is a thin wrapper around <code>ssl</code>. It requires
-the <code>crypto</code>, <code>asn1</code>, <code>public_key</code> and <code>ssl</code> applications
-to be started. When starting an SSL listener, Ranch will attempt
-to automatically start them. It will not try to stop them when
-the listener is removed, however.</p></div>
-<div class="listingblock">
-<div class="title">Starting the SSL application</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The SSL transport is a thin wrapper around <code>ssl</code>. It requires the <code>crypto</code>, <code>asn1</code>, <code>public_key</code> and <code>ssl</code> applications to be started. When starting an SSL listener, Ranch will attempt to automatically start them. It will not try to stop them when the listener is removed, however.</p>
+<div class="listingblock"><div class="title">Starting the SSL application</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">ssl:start</span></span>()<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>In a proper OTP setting, you will need to make your application
-depend on the <code>crypto</code>, <code>public_key</code> and <code>ssl</code> applications.
-They will be started automatically when starting your release.</p></div>
-<div class="paragraph"><p>The SSL transport <code>accept/2</code> function performs both transport
-and SSL accepts. Errors occurring during the SSL accept phase
-are returned as <code>{error, {ssl_accept, atom()}}</code> to differentiate
-on which socket the problem occurred.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">ssl:start</font></b>()<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>In a proper OTP setting, you will need to make your application depend on the <code>crypto</code>, <code>public_key</code> and <code>ssl</code> applications. They will be started automatically when starting your release.</p>
+<p>The SSL transport <code>accept/2</code> function performs both transport and SSL accepts. Errors occurring during the SSL accept phase are returned as <code>{error, {ssl_accept, atom()}}</code> to differentiate on which socket the problem occurred.</p>
<h2 id="_sending_and_receiving_data">Sending and receiving data</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This section assumes that <code>Transport</code> is a valid transport handler
-(like <code>ranch_tcp</code> or <code>ranch_ssl</code>) and <code>Socket</code> is a connected
-socket obtained through the listener.</p></div>
-<div class="paragraph"><p>You can send data to a socket by calling the <code>Transport:send/2</code>
-function. The data can be given as <code>iodata()</code>, which is defined as
-<code>binary() | iolist()</code>. All the following calls will work:</p></div>
-<div class="listingblock">
-<div class="title">Sending data to the socket</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<p>This section assumes that <code>Transport</code> is a valid transport handler (like <code>ranch_tcp</code> or <code>ranch_ssl</code>) and <code>Socket</code> is a connected socket obtained through the listener.</p>
+<p>You can send data to a socket by calling the <code>Transport:send/2</code> function. The data can be given as <code>iodata()</code>, which is defined as <code>binary() | iolist()</code>. All the following calls will work:</p>
+<div class="listingblock"><div class="title">Sending data to the socket</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">Transport</span><span style="color: #990000">:</span><span style="font-weight: bold"><span style="color: #000000">send</span></span>(<span style="color: #009900">Socket</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Ranch is cool!"</span><span style="color: #990000">&gt;&gt;</span>)<span style="color: #990000">.</span>
-<span style="color: #009900">Transport</span><span style="color: #990000">:</span><span style="font-weight: bold"><span style="color: #000000">send</span></span>(<span style="color: #009900">Socket</span>, <span style="color: #FF0000">"Ranch is cool!"</span>)<span style="color: #990000">.</span>
-<span style="color: #009900">Transport</span><span style="color: #990000">:</span><span style="font-weight: bold"><span style="color: #000000">send</span></span>(<span style="color: #009900">Socket</span>, [<span style="color: #FF0000">"Ranch"</span>, [<span style="color: #FF0000">"is"</span>, <span style="color: #FF0000">"cool!"</span>]])<span style="color: #990000">.</span>
-<span style="color: #009900">Transport</span><span style="color: #990000">:</span><span style="font-weight: bold"><span style="color: #000000">send</span></span>(<span style="color: #009900">Socket</span>, [<span style="color: #FF0000">"Ranch"</span>, [<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"is"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #FF0000">"cool!"</span>]])<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>You can receive data either in passive or in active mode. Passive mode
-means that you will perform a blocking <code>Transport:recv/3</code> call, while
-active mode means that you will receive the data as a message.</p></div>
-<div class="paragraph"><p>By default, all data will be received as binary. It is possible to
-receive data as strings, although this is not recommended as binaries
-are a more efficient construct, especially for binary protocols.</p></div>
-<div class="paragraph"><p>Receiving data using passive mode requires a single function call. The
-first argument is the socket, and the third argument is a timeout duration
-before the call returns with <code>{error, timeout}</code>.</p></div>
-<div class="paragraph"><p>The second argument is the amount of data in bytes that we want to receive.
-The function will wait for data until it has received exactly this amount.
-If you are not expecting a precise size, you can specify 0 which will make
-this call return as soon as data was read, regardless of its size.</p></div>
-<div class="listingblock">
-<div class="title">Receiving data from the socket in passive mode</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Transport</font><font color="#990000">:</font><b><font color="#000000">send</font></b>(<font color="#009900">Socket</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"Ranch is cool!"</font><font color="#990000">&gt;&gt;</font>)<font color="#990000">.</font>
+<font color="#009900">Transport</font><font color="#990000">:</font><b><font color="#000000">send</font></b>(<font color="#009900">Socket</font>, <font color="#FF0000">"Ranch is cool!"</font>)<font color="#990000">.</font>
+<font color="#009900">Transport</font><font color="#990000">:</font><b><font color="#000000">send</font></b>(<font color="#009900">Socket</font>, [<font color="#FF0000">"Ranch"</font>, [<font color="#FF0000">"is"</font>, <font color="#FF0000">"cool!"</font>]])<font color="#990000">.</font>
+<font color="#009900">Transport</font><font color="#990000">:</font><b><font color="#000000">send</font></b>(<font color="#009900">Socket</font>, [<font color="#FF0000">"Ranch"</font>, [<font color="#990000">&lt;&lt;</font><font color="#FF0000">"is"</font><font color="#990000">&gt;&gt;</font>, <font color="#FF0000">"cool!"</font>]])<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>You can receive data either in passive or in active mode. Passive mode means that you will perform a blocking <code>Transport:recv/3</code> call, while active mode means that you will receive the data as a message.</p>
+<p>By default, all data will be received as binary. It is possible to receive data as strings, although this is not recommended as binaries are a more efficient construct, especially for binary protocols.</p>
+<p>Receiving data using passive mode requires a single function call. The first argument is the socket, and the third argument is a timeout duration before the call returns with <code>{error, timeout}</code>.</p>
+<p>The second argument is the amount of data in bytes that we want to receive. The function will wait for data until it has received exactly this amount. If you are not expecting a precise size, you can specify 0 which will make this call return as soon as data was read, regardless of its size.</p>
+<div class="listingblock"><div class="title">Receiving data from the socket in passive mode</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: #FF6600">ok</span>, <span style="color: #009900">Data</span>} <span style="color: #990000">=</span> <span style="color: #009900">Transport</span><span style="color: #990000">:</span><span style="font-weight: bold"><span style="color: #000000">recv</span></span>(<span style="color: #009900">Socket</span>, <span style="color: #993399">0</span>, <span style="color: #993399">5000</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Active mode requires you to inform the socket that you want to receive
-data as a message and to write the code to actually receive it.</p></div>
-<div class="paragraph"><p>There are two kinds of active modes: <code>{active, once}</code> and
-<code>{active, true}</code>. The first will send a single message before going
-back to passive mode; the second will send messages indefinitely.
-We recommend not using the <code>{active, true}</code> mode as it could quickly
-flood your process mailbox. It&#8217;s better to keep the data in the socket
-and read it only when required.</p></div>
-<div class="paragraph"><p>Three different messages can be received:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<code>{OK, Socket, Data}</code>
-</p>
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#009900">Data</font>} <font color="#990000">=</font> <font color="#009900">Transport</font><font color="#990000">:</font><b><font color="#000000">recv</font></b>(<font color="#009900">Socket</font>, <font color="#993399">0</font>, <font color="#993399">5000</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Active mode requires you to inform the socket that you want to receive data as a message and to write the code to actually receive it.</p>
+<p>There are two kinds of active modes: <code>{active, once}</code> and <code>{active, true}</code>. The first will send a single message before going back to passive mode; the second will send messages indefinitely. We recommend not using the <code>{active, true}</code> mode as it could quickly flood your process mailbox. It&apos;s better to keep the data in the socket and read it only when required.</p>
+<p>Three different messages can be received:</p>
+<ul><li><code>{OK, Socket, Data}</code>
</li>
-<li>
-<p>
-<code>{Closed, Socket}</code>
-</p>
+<li><code>{Closed, Socket}</code>
</li>
-<li>
-<p>
-<code>{Error, Socket, Reason}</code>
-</p>
+<li><code>{Error, Socket, Reason}</code>
</li>
-</ul></div>
-<div class="paragraph"><p>The value of <code>OK</code>, <code>Closed</code> and <code>Error</code> can be different
-depending on the transport being used. To be able to properly match
-on them you must first call the <code>Transport:messages/0</code> function.</p></div>
-<div class="listingblock">
-<div class="title">Retrieving the transport&#8217;s active message identifiers</div>
-<div class="content"><!-- Generator: GNU source-highlight
+</ul>
+<p>The value of <code>OK</code>, <code>Closed</code> and <code>Error</code> can be different depending on the transport being used. To be able to properly match on them you must first call the <code>Transport:messages/0</code> function.</p>
+<div class="listingblock"><div class="title">Retrieving the transport&apos;s active message identifiers</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">OK</span>, <span style="color: #009900">Closed</span>, <span style="color: #009900">Error</span>} <span style="color: #990000">=</span> <span style="color: #009900">Transport</span><span style="color: #990000">:</span><span style="font-weight: bold"><span style="color: #000000">messages</span></span>()<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>To start receiving messages you will need to call the <code>Transport:setopts/2</code>
-function, and do so every time you want to receive data.</p></div>
-<div class="listingblock">
-<div class="title">Receiving messages from the socket in active mode</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>{<font color="#009900">OK</font>, <font color="#009900">Closed</font>, <font color="#009900">Error</font>} <font color="#990000">=</font> <font color="#009900">Transport</font><font color="#990000">:</font><b><font color="#000000">messages</font></b>()<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>To start receiving messages you will need to call the <code>Transport:setopts/2</code> function, and do so every time you want to receive data.</p>
+<div class="listingblock"><div class="title">Receiving messages from the socket in active mode</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">OK</span>, <span style="color: #009900">Closed</span>, <span style="color: #009900">Error</span>} <span style="color: #990000">=</span> <span style="color: #009900">Transport</span><span style="color: #990000">:</span><span style="font-weight: bold"><span style="color: #000000">messages</span></span>(),
-<span style="color: #009900">Transport</span><span style="color: #990000">:</span><span style="font-weight: bold"><span style="color: #000000">setopts</span></span>(<span style="color: #009900">Socket</span>, [{<span style="color: #FF6600">active</span>, <span style="color: #FF6600">once</span>}]),
-<span style="font-weight: bold"><span style="color: #0000FF">receive</span></span>
- {<span style="color: #009900">OK</span>, <span style="color: #009900">Socket</span>, <span style="color: #009900">Data</span>} <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #000000">io:format</span></span>(<span style="color: #FF0000">"data received: ~p~n"</span>, [<span style="color: #009900">Data</span>]);
- {<span style="color: #009900">Closed</span>, <span style="color: #009900">Socket</span>} <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #000000">io:format</span></span>(<span style="color: #FF0000">"socket got closed!~n"</span>);
- {<span style="color: #009900">Error</span>, <span style="color: #009900">Socket</span>, <span style="color: #009900">Reason</span>} <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #000000">io:format</span></span>(<span style="color: #FF0000">"error happened: ~p~n"</span>, [<span style="color: #009900">Reason</span>])
-<span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>You can easily integrate active sockets with existing Erlang code as all
-you really need is just a few more clauses when receiving messages.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#009900">OK</font>, <font color="#009900">Closed</font>, <font color="#009900">Error</font>} <font color="#990000">=</font> <font color="#009900">Transport</font><font color="#990000">:</font><b><font color="#000000">messages</font></b>(),
+<font color="#009900">Transport</font><font color="#990000">:</font><b><font color="#000000">setopts</font></b>(<font color="#009900">Socket</font>, [{<font color="#FF6600">active</font>, <font color="#FF6600">once</font>}]),
+<b><font color="#0000FF">receive</font></b>
+ {<font color="#009900">OK</font>, <font color="#009900">Socket</font>, <font color="#009900">Data</font>} <font color="#990000">-&gt;</font>
+ <b><font color="#000000">io:format</font></b>(<font color="#FF0000">"data received: ~p~n"</font>, [<font color="#009900">Data</font>]);
+ {<font color="#009900">Closed</font>, <font color="#009900">Socket</font>} <font color="#990000">-&gt;</font>
+ <b><font color="#000000">io:format</font></b>(<font color="#FF0000">"socket got closed!~n"</font>);
+ {<font color="#009900">Error</font>, <font color="#009900">Socket</font>, <font color="#009900">Reason</font>} <font color="#990000">-&gt;</font>
+ <b><font color="#000000">io:format</font></b>(<font color="#FF0000">"error happened: ~p~n"</font>, [<font color="#009900">Reason</font>])
+<b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>You can easily integrate active sockets with existing Erlang code as all you really need is just a few more clauses when receiving messages.</p>
<h2 id="_sending_files">Sending files</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>As in the previous section it is assumed <code>Transport</code> is a valid transport
-handler and <code>Socket</code> is a connected socket obtained through the listener.</p></div>
-<div class="paragraph"><p>To send a whole file, with name <code>Filename</code>, over a socket:</p></div>
-<div class="listingblock">
-<div class="title">Sending a file by filename</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<p>As in the previous section it is assumed <code>Transport</code> is a valid transport handler and <code>Socket</code> is a connected socket obtained through the listener.</p>
+<p>To send a whole file, with name <code>Filename</code>, over a socket:</p>
+<div class="listingblock"><div class="title">Sending a file by filename</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: #FF6600">ok</span>, <span style="color: #009900">SentBytes</span>} <span style="color: #990000">=</span> <span style="color: #009900">Transport</span><span style="color: #990000">:</span><span style="font-weight: bold"><span style="color: #000000">sendfile</span></span>(<span style="color: #009900">Socket</span>, <span style="color: #009900">Filename</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Or part of a file, with <code>Offset</code> greater than or equal to 0, <code>Bytes</code> number of
-bytes and chunks of size <code>ChunkSize</code>:</p></div>
-<div class="listingblock">
-<div class="title">Sending part of a file by filename in chunks</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#009900">SentBytes</font>} <font color="#990000">=</font> <font color="#009900">Transport</font><font color="#990000">:</font><b><font color="#000000">sendfile</font></b>(<font color="#009900">Socket</font>, <font color="#009900">Filename</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Or part of a file, with <code>Offset</code> greater than or equal to 0, <code>Bytes</code> number of bytes and chunks of size <code>ChunkSize</code>:</p>
+<div class="listingblock"><div class="title">Sending part of a file by filename in chunks</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">Opts</span> <span style="color: #990000">=</span> [{<span style="color: #FF6600">chunk_size</span>, <span style="color: #009900">ChunkSize</span>}],
-{<span style="color: #FF6600">ok</span>, <span style="color: #009900">SentBytes</span>} <span style="color: #990000">=</span> <span style="color: #009900">Transport</span><span style="color: #990000">:</span><span style="font-weight: bold"><span style="color: #000000">sendfile</span></span>(<span style="color: #009900">Socket</span>, <span style="color: #009900">Filename</span>, <span style="color: #009900">Offset</span>, <span style="color: #009900">Bytes</span>, <span style="color: #009900">Opts</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>To improve efficiency when sending multiple parts of the same file it is also
-possible to use a file descriptor opened in raw mode:</p></div>
-<div class="listingblock">
-<div class="title">Sending a file opened in raw mode</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Opts</font> <font color="#990000">=</font> [{<font color="#FF6600">chunk_size</font>, <font color="#009900">ChunkSize</font>}],
+{<font color="#FF6600">ok</font>, <font color="#009900">SentBytes</font>} <font color="#990000">=</font> <font color="#009900">Transport</font><font color="#990000">:</font><b><font color="#000000">sendfile</font></b>(<font color="#009900">Socket</font>, <font color="#009900">Filename</font>, <font color="#009900">Offset</font>, <font color="#009900">Bytes</font>, <font color="#009900">Opts</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>To improve efficiency when sending multiple parts of the same file it is also possible to use a file descriptor opened in raw mode:</p>
+<div class="listingblock"><div class="title">Sending a file opened in raw mode</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: #FF6600">ok</span>, <span style="color: #009900">RawFile</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">file:open</span></span>(<span style="color: #009900">Filename</span>, [<span style="color: #FF6600">raw</span>, <span style="color: #FF6600">read</span>, <span style="font-weight: bold"><span style="color: #000080">binary</span></span>]),
-{<span style="color: #FF6600">ok</span>, <span style="color: #009900">SentBytes</span>} <span style="color: #990000">=</span> <span style="color: #009900">Transport</span><span style="color: #990000">:</span><span style="font-weight: bold"><span style="color: #000000">sendfile</span></span>(<span style="color: #009900">Socket</span>, <span style="color: #009900">RawFile</span>, <span style="color: #009900">Offset</span>, <span style="color: #009900">Bytes</span>, <span style="color: #009900">Opts</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#009900">RawFile</font>} <font color="#990000">=</font> <b><font color="#000000">file:open</font></b>(<font color="#009900">Filename</font>, [<font color="#FF6600">raw</font>, <font color="#FF6600">read</font>, <b><font color="#000080">binary</font></b>]),
+{<font color="#FF6600">ok</font>, <font color="#009900">SentBytes</font>} <font color="#990000">=</font> <font color="#009900">Transport</font><font color="#990000">:</font><b><font color="#000000">sendfile</font></b>(<font color="#009900">Socket</font>, <font color="#009900">RawFile</font>, <font color="#009900">Offset</font>, <font color="#009900">Bytes</font>, <font color="#009900">Opts</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_writing_a_transport_handler">Writing a transport handler</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A transport handler is a module implementing the <code>ranch_transport</code> behavior.
-It defines a certain number of callbacks that must be written in order to
-allow transparent usage of the transport handler.</p></div>
-<div class="paragraph"><p>The behavior doesn&#8217;t define the socket options available when opening a
-socket. These do not need to be common to all transports as it&#8217;s easy enough
-to write different initialization functions for the different transports that
-will be used. With one exception though. The <code>setopts/2</code> function <strong>must</strong>
-implement the <code>{active, once}</code> and the <code>{active, true}</code> options.</p></div>
-<div class="paragraph"><p>If the transport handler doesn&#8217;t have a native implementation of <code>sendfile/5</code> a
-fallback is available, <code>ranch_transport:sendfile/6</code>. The extra first argument
-is the transport&#8217;s module. See <code>ranch_ssl</code> for an example.</p></div>
-</div>
-</div>
+<p>A transport handler is a module implementing the <code>ranch_transport</code> behavior. It defines a certain number of callbacks that must be written in order to allow transparent usage of the transport handler.</p>
+<p>The behavior doesn&apos;t define the socket options available when opening a socket. These do not need to be common to all transports as it&apos;s easy enough to write different initialization functions for the different transports that will be used. With one exception though. The <code>setopts/2</code> function <strong>must</strong> implement the <code>{active, once}</code> and the <code>{active, true}</code> options.</p>
+<p>If the transport handler doesn&apos;t have a native implementation of <code>sendfile/5</code> a fallback is available, <code>ranch_transport:sendfile/6</code>. The extra first argument is the transport&apos;s module. See <code>ranch_ssl</code> for an example.</p>
+
@@ -301,6 +226,8 @@ is the transport&#8217;s module. See <code>ranch_ssl</code> for an example.</p><
+ <li><a href="/docs/en/ranch/1.5/guide">1.5</a></li>
+
<li><a href="/docs/en/ranch/1.4/guide">1.4</a></li>
<li><a href="/docs/en/ranch/1.3/guide">1.3</a></li>
diff --git a/docs/en/ranch/1.2/manual/index.html b/docs/en/ranch/1.2/manual/index.html
index 4d379ce7..91c0a3c5 100644
--- a/docs/en/ranch/1.2/manual/index.html
+++ b/docs/en/ranch/1.2/manual/index.html
@@ -62,38 +62,20 @@
<h1 class="lined-header"><span>Ranch Function Reference</span></h1>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="ranch_app">ranch(7)</a>
-</p>
+<ul><li><a href="ranch_app">ranch(7)</a>
</li>
-<li>
-<p>
-<a href="ranch">ranch(3)</a>
-</p>
+<li><a href="ranch">ranch(3)</a>
</li>
-<li>
-<p>
-<a href="ranch_protocol">ranch_protocol(3)</a>
-</p>
+<li><a href="ranch_protocol">ranch_protocol(3)</a>
</li>
-<li>
-<p>
-<a href="ranch_ssl">ranch_ssl(3)</a>
-</p>
+<li><a href="ranch_ssl">ranch_ssl(3)</a>
</li>
-<li>
-<p>
-<a href="ranch_tcp">ranch_tcp(3)</a>
-</p>
+<li><a href="ranch_tcp">ranch_tcp(3)</a>
</li>
-<li>
-<p>
-<a href="ranch_transport">ranch_transport(3)</a>
-</p>
+<li><a href="ranch_transport">ranch_transport(3)</a>
</li>
-</ul></div>
+</ul>
+
@@ -128,6 +110,8 @@
+ <li><a href="/docs/en/ranch/1.5/manual">1.5</a></li>
+
<li><a href="/docs/en/ranch/1.4/manual">1.4</a></li>
<li><a href="/docs/en/ranch/1.3/manual">1.3</a></li>
diff --git a/docs/en/ranch/1.2/manual/ranch/index.html b/docs/en/ranch/1.2/manual/ranch/index.html
index 3c45e2f2..edbdb353 100644
--- a/docs/en/ranch/1.2/manual/ranch/index.html
+++ b/docs/en/ranch/1.2/manual/ranch/index.html
@@ -62,423 +62,175 @@
<h1 class="lined-header"><span>ranch(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>ranch - socket acceptor pool</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>ranch - socket acceptor pool</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <code>ranch</code> module provides functions for starting and
-manipulating Ranch listeners.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The <code>ranch</code> module provides functions for starting and manipulating Ranch listeners.</p>
<h2 id="_types">Types</h2>
-<div class="sectionbody">
-<div class="sect2">
-<h3 id="_max_conns_non_neg_integer_infinity">max_conns() = non_neg_integer() | infinity</h3>
-<div class="paragraph"><p>Maximum number of connections allowed on this listener.</p></div>
-<div class="paragraph"><p>This is a soft limit. The actual number of connections
-might be slightly above the limit due to concurrency
-when accepting new connections. Some connections may
-also be removed from this count explicitly by the user
-code.</p></div>
-</div>
-<div class="sect2">
+<h3 id="_max_conns_____non_neg_integer_____infinity">max_conns() = non_neg_integer() | infinity</h3>
+<p>Maximum number of connections allowed on this listener.</p>
+<p>This is a soft limit. The actual number of connections might be slightly above the limit due to concurrency when accepting new connections. Some connections may also be removed from this count explicitly by the user code.</p>
<h3 id="_opt">opt()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">opt</span></span>() <span style="color: #990000">=</span> {<span style="color: #FF6600">ack_timeout</span>, <span style="font-weight: bold"><span style="color: #000000">timeout</span></span>()}
- | {<span style="color: #FF6600">connection_type</span>, <span style="color: #FF6600">worker</span> | <span style="color: #FF6600">supervisor</span>}
- | {<span style="color: #FF6600">max_connections</span>, <span style="font-weight: bold"><span style="color: #000000">max_conns</span></span>()}
- | {<span style="color: #000080">shutdown</span>, <span style="font-weight: bold"><span style="color: #000000">timeout</span></span>() | <span style="color: #FF6600">brutal_kill</span>}
- | {<span style="color: #FF6600">socket</span>, <span style="font-weight: bold"><span style="color: #000000">any</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>Ranch-specific transport options.</p></div>
-<div class="paragraph"><p>These options are not passed on to the transports.
-They are used by Ranch while setting up the listeners.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_ref_any">ref() = any()</h3>
-<div class="paragraph"><p>Unique name used to refer to a listener.</p></div>
-</div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">opt</font></b>() <font color="#990000">=</font> {<font color="#FF6600">ack_timeout</font>, <b><font color="#000000">timeout</font></b>()}
+ | {<font color="#FF6600">connection_type</font>, <font color="#FF6600">worker</font> | <font color="#FF6600">supervisor</font>}
+ | {<font color="#FF6600">max_connections</font>, <b><font color="#000000">max_conns</font></b>()}
+ | {<font color="#000080">shutdown</font>, <b><font color="#000000">timeout</font></b>() | <font color="#FF6600">brutal_kill</font>}
+ | {<font color="#FF6600">socket</font>, <b><font color="#000000">any</font></b>()}</tt></pre>
+</div></div>
+<p>Ranch-specific transport options.</p>
+<p>These options are not passed on to the transports. They are used by Ranch while setting up the listeners.</p>
+<h3 id="_ref_____any">ref() = any()</h3>
+<p>Unique name used to refer to a listener.</p>
<h2 id="_option_descriptions">Option descriptions</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>None of the options are required.</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-ack_timeout (5000)
-</dt>
-<dd>
-<p>
- Maximum allowed time for the <code>ranch:accept_ack/1</code> call to finish.
-</p>
-</dd>
-<dt class="hdlist1">
-connection_type (worker)
-</dt>
-<dd>
-<p>
- Type of process that will handle the connection.
-</p>
-</dd>
-<dt class="hdlist1">
-max_connections (1024)
-</dt>
-<dd>
-<p>
- Maximum number of active connections. Soft limit. Using <code>infinity</code> will disable the limit entirely.
-</p>
-</dd>
-<dt class="hdlist1">
-shutdown (5000)
-</dt>
-<dd>
-<p>
- Maximum allowed time for children to stop on listener shutdown.
-</p>
-</dd>
-<dt class="hdlist1">
-socket
-</dt>
-<dd>
-<p>
- Listening socket opened externally to be used instead of calling <code>Transport:listen/1</code>.
-</p>
-</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+<p>None of the options are required.</p>
+<dl><dt>ack_timeout (5000)</dt>
+<dd><p>Maximum allowed time for the <code>ranch:accept_ack/1</code> call to finish.</p>
+</dd>
+<dt>connection_type (worker)</dt>
+<dd><p>Type of process that will handle the connection.</p>
+</dd>
+<dt>max_connections (1024)</dt>
+<dd><p>Maximum number of active connections. Soft limit. Using <code>infinity</code> will disable the limit entirely.</p>
+</dd>
+<dt>shutdown (5000)</dt>
+<dd><p>Maximum allowed time for children to stop on listener shutdown.</p>
+</dd>
+<dt>socket</dt>
+<dd><p>Listening socket opened externally to be used instead of calling <code>Transport:listen/1</code>.</p>
+</dd>
+</dl>
<h2 id="_exports">Exports</h2>
-<div class="sectionbody">
-<div class="sect2">
-<h3 id="_accept_ack_ref_8594_ok">accept_ack(Ref) &#8594; ok</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Ref = ref()
-</dt>
-<dd>
-<p>
-Listener name.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Acknowledge that the connection is accepted.</p></div>
-<div class="paragraph"><p>This function MUST be used by a connection process to inform
-Ranch that it initialized properly and let it perform any
-additional operations before the socket can be safely used.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_child_spec_ref_nbacceptors_transport_transopts_protocol_protoopts_8594_supervisor_child_spec">child_spec(Ref, NbAcceptors, Transport, TransOpts, Protocol, ProtoOpts) &#8594; supervisor:child_spec()</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Ref = ref()
-</dt>
-<dd>
-<p>
-Listener name.
-</p>
-</dd>
-<dt class="hdlist1">
-NbAcceptors = non_neg_integer()
-</dt>
-<dd>
-<p>
-Number of acceptor processes.
-</p>
-</dd>
-<dt class="hdlist1">
-Transport = module()
-</dt>
-<dd>
-<p>
-Transport module.
-</p>
-</dd>
-<dt class="hdlist1">
-TransOpts = any()
-</dt>
-<dd>
-<p>
-Transport options.
-</p>
-</dd>
-<dt class="hdlist1">
-Protocol = module()
-</dt>
-<dd>
-<p>
-Protocol module.
-</p>
-</dd>
-<dt class="hdlist1">
-ProtoOpts = any()
-</dt>
-<dd>
-<p>
-Protocol options.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Return child specifications for a new listener.</p></div>
-<div class="paragraph"><p>This function can be used to embed a listener directly
-in an application instead of letting Ranch handle it.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_get_addr_ref_8594_ip_port">get_addr(Ref) &#8594; {IP, Port}</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Ref = ref()
-</dt>
-<dd>
-<p>
-Listener name.
-</p>
-</dd>
-<dt class="hdlist1">
-IP = inet:ip_address()
-</dt>
-<dd>
-<p>
-IP of the interface used by this listener.
-</p>
-</dd>
-<dt class="hdlist1">
-Port = inet:port_number()
-</dt>
-<dd>
-<p>
-Port number used by this listener.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Return the IP address and port for the given listener.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_get_max_connections_ref_8594_maxconns">get_max_connections(Ref) &#8594; MaxConns</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Ref = ref()
-</dt>
-<dd>
-<p>
-Listener name.
-</p>
-</dd>
-<dt class="hdlist1">
-MaxConns = max_conns()
-</dt>
-<dd>
-<p>
-Current maximum number of connections.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Return the max number of connections allowed for the given listener.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_get_port_ref_8594_port">get_port(Ref) &#8594; Port</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Ref = ref()
-</dt>
-<dd>
-<p>
-Listener name.
-</p>
-</dd>
-<dt class="hdlist1">
-Port = inet:port_number()
-</dt>
-<dd>
-<p>
-Port number used by this listener.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Return the port for the given listener.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_get_protocol_options_ref_8594_protoopts">get_protocol_options(Ref) &#8594; ProtoOpts</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Ref = ref()
-</dt>
-<dd>
-<p>
-Listener name.
-</p>
-</dd>
-<dt class="hdlist1">
-ProtoOpts = any()
-</dt>
-<dd>
-<p>
-Current protocol options.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Return the protocol options set for the given listener.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_remove_connection_ref_8594_ok">remove_connection(Ref) &#8594; ok</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Ref = ref()
-</dt>
-<dd>
-<p>
-Listener name.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Do not count this connection when limiting the number of connections.</p></div>
-<div class="paragraph"><p>You can use this function for long-running connection processes
-which spend most of their time idling rather than consuming
-resources. This allows Ranch to accept a lot more connections
-without sacrificing the latency of the system.</p></div>
-<div class="paragraph"><p>This function may only be called from a connection process.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_set_max_connections_ref_maxconns_8594_ok">set_max_connections(Ref, MaxConns) &#8594; ok</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Ref = ref()
-</dt>
-<dd>
-<p>
-Listener name.
-</p>
-</dd>
-<dt class="hdlist1">
-MaxConns = max_conns()
-</dt>
-<dd>
-<p>
-New maximum number of connections.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Set the max number of connections for the given listener.</p></div>
-<div class="paragraph"><p>The change will be applied immediately. If the new value is
-smaller than the previous one, Ranch will not kill the extra
-connections, but will wait for them to terminate properly.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_set_protocol_options_ref_protoopts_8594_ok">set_protocol_options(Ref, ProtoOpts) &#8594; ok</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Ref = ref()
-</dt>
-<dd>
-<p>
-Listener name.
-</p>
-</dd>
-<dt class="hdlist1">
-ProtoOpts = any()
-</dt>
-<dd>
-<p>
-New protocol options.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Set the protocol options for the given listener.</p></div>
-<div class="paragraph"><p>The change will be applied immediately for all new connections.
-Old connections will not receive the new options.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_start_listener_ref_nbacceptors_transport_transopts_protocol_protoopts_8594_ok_pid_error_badarg">start_listener(Ref, NbAcceptors, Transport, TransOpts, Protocol, ProtoOpts) &#8594; {ok, pid()} | {error, badarg}</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Ref = ref()
-</dt>
-<dd>
-<p>
-Listener name.
-</p>
-</dd>
-<dt class="hdlist1">
-NbAcceptors = non_neg_integer()
-</dt>
-<dd>
-<p>
-Number of acceptor processes.
-</p>
-</dd>
-<dt class="hdlist1">
-Transport = module()
-</dt>
-<dd>
-<p>
-Transport module.
-</p>
-</dd>
-<dt class="hdlist1">
-TransOpts = any()
-</dt>
-<dd>
-<p>
-Transport options.
-</p>
-</dd>
-<dt class="hdlist1">
-Protocol = module()
-</dt>
-<dd>
-<p>
-Protocol module.
-</p>
-</dd>
-<dt class="hdlist1">
-ProtoOpts = any()
-</dt>
-<dd>
-<p>
-Protocol options.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Start listening for connections using the given transport
-and protocol. Returns the pid for this listener&#8217;s supervisor.</p></div>
-<div class="paragraph"><p>There are additional transport options that apply
-regardless of transport. They allow configuring how the
-connections are supervised, rate limited and more. Please
-consult the previous section for more details.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_stop_listener_ref_8594_ok_error_not_found">stop_listener(Ref) &#8594; ok | {error, not_found}</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Ref = ref()
-</dt>
-<dd>
-<p>
-Listener name.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Stop the given listener.</p></div>
-<div class="paragraph"><p>The listener is stopped gracefully, first by closing the
-listening port, then by stopping the connection processes.
-These processes are stopped according to the <code>shutdown</code>
-transport option, which may be set to brutally kill all
-connection processes or give them some time to stop properly.</p></div>
-<div class="paragraph"><p>This function does not return until the listener is
-completely stopped.</p></div>
-</div>
-</div>
-</div>
+<h3 id="_accept_ack_ref_____ok">accept_ack(Ref) -&gt; ok</h3>
+<dl><dt>Ref = ref()</dt>
+<dd><p>Listener name.</p>
+</dd>
+</dl>
+<p>Acknowledge that the connection is accepted.</p>
+<p>This function MUST be used by a connection process to inform Ranch that it initialized properly and let it perform any additional operations before the socket can be safely used.</p>
+<h3 id="_child_spec_ref__nbacceptors__transport__transopts__protocol__protoopts_____supervisor_child_spec">child_spec(Ref, NbAcceptors, Transport, TransOpts, Protocol, ProtoOpts) -&gt; supervisor:child_spec()</h3>
+<dl><dt>Ref = ref()</dt>
+<dd><p>Listener name.</p>
+</dd>
+<dt>NbAcceptors = non_neg_integer()</dt>
+<dd><p>Number of acceptor processes.</p>
+</dd>
+<dt>Transport = module()</dt>
+<dd><p>Transport module.</p>
+</dd>
+<dt>TransOpts = any()</dt>
+<dd><p>Transport options.</p>
+</dd>
+<dt>Protocol = module()</dt>
+<dd><p>Protocol module.</p>
+</dd>
+<dt>ProtoOpts = any()</dt>
+<dd><p>Protocol options.</p>
+</dd>
+</dl>
+<p>Return child specifications for a new listener.</p>
+<p>This function can be used to embed a listener directly in an application instead of letting Ranch handle it.</p>
+<h3 id="_get_addr_ref______ip__port">get_addr(Ref) -&gt; {IP, Port}</h3>
+<dl><dt>Ref = ref()</dt>
+<dd><p>Listener name.</p>
+</dd>
+<dt>IP = inet:ip_address()</dt>
+<dd><p>IP of the interface used by this listener.</p>
+</dd>
+<dt>Port = inet:port_number()</dt>
+<dd><p>Port number used by this listener.</p>
+</dd>
+</dl>
+<p>Return the IP address and port for the given listener.</p>
+<h3 id="_get_max_connections_ref_____maxconns">get_max_connections(Ref) -&gt; MaxConns</h3>
+<dl><dt>Ref = ref()</dt>
+<dd><p>Listener name.</p>
+</dd>
+<dt>MaxConns = max_conns()</dt>
+<dd><p>Current maximum number of connections.</p>
+</dd>
+</dl>
+<p>Return the max number of connections allowed for the given listener.</p>
+<h3 id="_get_port_ref_____port">get_port(Ref) -&gt; Port</h3>
+<dl><dt>Ref = ref()</dt>
+<dd><p>Listener name.</p>
+</dd>
+<dt>Port = inet:port_number()</dt>
+<dd><p>Port number used by this listener.</p>
+</dd>
+</dl>
+<p>Return the port for the given listener.</p>
+<h3 id="_get_protocol_options_ref_____protoopts">get_protocol_options(Ref) -&gt; ProtoOpts</h3>
+<dl><dt>Ref = ref()</dt>
+<dd><p>Listener name.</p>
+</dd>
+<dt>ProtoOpts = any()</dt>
+<dd><p>Current protocol options.</p>
+</dd>
+</dl>
+<p>Return the protocol options set for the given listener.</p>
+<h3 id="_remove_connection_ref_____ok">remove_connection(Ref) -&gt; ok</h3>
+<dl><dt>Ref = ref()</dt>
+<dd><p>Listener name.</p>
+</dd>
+</dl>
+<p>Do not count this connection when limiting the number of connections.</p>
+<p>You can use this function for long-running connection processes which spend most of their time idling rather than consuming resources. This allows Ranch to accept a lot more connections without sacrificing the latency of the system.</p>
+<p>This function may only be called from a connection process.</p>
+<h3 id="_set_max_connections_ref__maxconns_____ok">set_max_connections(Ref, MaxConns) -&gt; ok</h3>
+<dl><dt>Ref = ref()</dt>
+<dd><p>Listener name.</p>
+</dd>
+<dt>MaxConns = max_conns()</dt>
+<dd><p>New maximum number of connections.</p>
+</dd>
+</dl>
+<p>Set the max number of connections for the given listener.</p>
+<p>The change will be applied immediately. If the new value is smaller than the previous one, Ranch will not kill the extra connections, but will wait for them to terminate properly.</p>
+<h3 id="_set_protocol_options_ref__protoopts_____ok">set_protocol_options(Ref, ProtoOpts) -&gt; ok</h3>
+<dl><dt>Ref = ref()</dt>
+<dd><p>Listener name.</p>
+</dd>
+<dt>ProtoOpts = any()</dt>
+<dd><p>New protocol options.</p>
+</dd>
+</dl>
+<p>Set the protocol options for the given listener.</p>
+<p>The change will be applied immediately for all new connections. Old connections will not receive the new options.</p>
+<h3 id="_start_listener_ref__nbacceptors__transport__transopts__protocol__protoopts______ok__pid_______error__badarg">start_listener(Ref, NbAcceptors, Transport, TransOpts, Protocol, ProtoOpts) -&gt; {ok, pid()} | {error, badarg}</h3>
+<dl><dt>Ref = ref()</dt>
+<dd><p>Listener name.</p>
+</dd>
+<dt>NbAcceptors = non_neg_integer()</dt>
+<dd><p>Number of acceptor processes.</p>
+</dd>
+<dt>Transport = module()</dt>
+<dd><p>Transport module.</p>
+</dd>
+<dt>TransOpts = any()</dt>
+<dd><p>Transport options.</p>
+</dd>
+<dt>Protocol = module()</dt>
+<dd><p>Protocol module.</p>
+</dd>
+<dt>ProtoOpts = any()</dt>
+<dd><p>Protocol options.</p>
+</dd>
+</dl>
+<p>Start listening for connections using the given transport and protocol. Returns the pid for this listener&apos;s supervisor.</p>
+<p>There are additional transport options that apply regardless of transport. They allow configuring how the connections are supervised, rate limited and more. Please consult the previous section for more details.</p>
+<h3 id="_stop_listener_ref_____ok____error__not_found">stop_listener(Ref) -&gt; ok | {error, not_found}</h3>
+<dl><dt>Ref = ref()</dt>
+<dd><p>Listener name.</p>
+</dd>
+</dl>
+<p>Stop the given listener.</p>
+<p>The listener is stopped gracefully, first by closing the listening port, then by stopping the connection processes. These processes are stopped according to the <code>shutdown</code> transport option, which may be set to brutally kill all connection processes or give them some time to stop properly.</p>
+<p>This function does not return until the listener is completely stopped.</p>
+
@@ -513,6 +265,8 @@ completely stopped.</p></div>
+ <li><a href="/docs/en/ranch/1.5/manual">1.5</a></li>
+
<li><a href="/docs/en/ranch/1.4/manual">1.4</a></li>
<li><a href="/docs/en/ranch/1.3/manual">1.3</a></li>
diff --git a/docs/en/ranch/1.2/manual/ranch_app/index.html b/docs/en/ranch/1.2/manual/ranch_app/index.html
index 4e5e609c..fc27d096 100644
--- a/docs/en/ranch/1.2/manual/ranch_app/index.html
+++ b/docs/en/ranch/1.2/manual/ranch_app/index.html
@@ -62,43 +62,19 @@
<h1 class="lined-header"><span>ranch(7)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>ranch - Socket acceptor pool for TCP protocols.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>ranch - Socket acceptor pool for TCP protocols.</p>
<h2 id="_dependencies">Dependencies</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <code>ranch</code> application has no particular dependency required
-to start.</p></div>
-<div class="paragraph"><p>It has optional dependencies that are only required when
-listening for SSL connections. The dependencies are <code>crypto</code>,
-<code>asn1</code>, <code>public_key</code> and <code>ssl</code>. They are started automatically
-if they weren&#8217;t before.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The <code>ranch</code> application has no particular dependency required to start.</p>
+<p>It has optional dependencies that are only required when listening for SSL connections. The dependencies are <code>crypto</code>, <code>asn1</code>, <code>public_key</code> and <code>ssl</code>. They are started automatically if they weren&apos;t before.</p>
<h2 id="_environment">Environment</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <code>ranch</code> application defines one application environment
-configuration parameter.</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-profile (false)
-</dt>
-<dd>
-<p>
- When enabled, Ranch will start <code>eprof</code> profiling automatically.
-</p>
+<p>The <code>ranch</code> application defines one application environment configuration parameter.</p>
+<dl><dt>profile (false)</dt>
+<dd><p>When enabled, Ranch will start <code>eprof</code> profiling automatically.</p>
</dd>
-</dl></div>
-<div class="paragraph"><p>You can use the <code>ranch_app:profile_output/0</code> function to stop
-profiling and output the results to the files <em>procs.profile</em>
-and <em>total.profile</em>. Do not use in production.</p></div>
-</div>
-</div>
+</dl>
+<p>You can use the <code>ranch_app:profile_output/0</code> function to stop profiling and output the results to the files <em>procs.profile</em> and <em>total.profile</em>. Do not use in production.</p>
+
@@ -133,6 +109,8 @@ and <em>total.profile</em>. Do not use in production.</p></div>
+ <li><a href="/docs/en/ranch/1.5/manual">1.5</a></li>
+
<li><a href="/docs/en/ranch/1.4/manual">1.4</a></li>
<li><a href="/docs/en/ranch/1.3/manual">1.3</a></li>
diff --git a/docs/en/ranch/1.2/manual/ranch_protocol/index.html b/docs/en/ranch/1.2/manual/ranch_protocol/index.html
index 1b145f30..d548e5ca 100644
--- a/docs/en/ranch/1.2/manual/ranch_protocol/index.html
+++ b/docs/en/ranch/1.2/manual/ranch_protocol/index.html
@@ -62,83 +62,33 @@
<h1 class="lined-header"><span>ranch_protocol(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>ranch_protocol - behaviour for protocol modules</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>ranch_protocol - behaviour for protocol modules</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <code>ranch_protocol</code> behaviour defines the interface used
-by Ranch protocols.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The <code>ranch_protocol</code> behaviour defines the interface used by Ranch protocols.</p>
<h2 id="_types">Types</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>None.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>None.</p>
<h2 id="_callbacks">Callbacks</h2>
-<div class="sectionbody">
-<div class="sect2">
-<h3 id="_start_link_ref_socket_transport_protoopts_8594_ok_pid_ok_pid_pid">start_link(Ref, Socket, Transport, ProtoOpts) &#8594; {ok, pid()} | {ok, pid(), pid()}</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Ref = ranch:ref()
-</dt>
-<dd>
-<p>
-Listener name.
-</p>
+<h3 id="_start_link_ref__socket__transport__protoopts______ok__pid_______ok__pid____pid">start_link(Ref, Socket, Transport, ProtoOpts) -&gt; {ok, pid()} | {ok, pid(), pid()}</h3>
+<dl><dt>Ref = ranch:ref()</dt>
+<dd><p>Listener name.</p>
</dd>
-<dt class="hdlist1">
-Socket = any()
-</dt>
-<dd>
-<p>
-Socket for this connection.
-</p>
+<dt>Socket = any()</dt>
+<dd><p>Socket for this connection.</p>
</dd>
-<dt class="hdlist1">
-Transport = module()
-</dt>
-<dd>
-<p>
-Transport module for this socket.
-</p>
+<dt>Transport = module()</dt>
+<dd><p>Transport module for this socket.</p>
</dd>
-<dt class="hdlist1">
-ProtoOpts = any()
-</dt>
-<dd>
-<p>
-Protocol options.
-</p>
+<dt>ProtoOpts = any()</dt>
+<dd><p>Protocol options.</p>
</dd>
-</dl></div>
-<div class="paragraph"><p>Start a new connection process for the given socket.</p></div>
-<div class="paragraph"><p>The only purpose of this callback is to start a process that
-will handle the socket. It must spawn the process, link and
-then return the new pid. This function will always be called
-from inside a supervisor.</p></div>
-<div class="paragraph"><p>This callback can also return two pids. The first pid is the
-pid of the process that will be supervised. The second pid is
-the pid of the process that will receive ownership of the
-socket. This second process must be a child of the first. This
-form is only available when <code>connection_type</code> is set to
-<code>supervisor</code>.</p></div>
-<div class="paragraph"><p>If any other value is returned, the supervisor will close the
-socket and assume no process has been started.</p></div>
-<div class="paragraph"><p>Do not perform any operations in this callback, as this would
-block the supervisor responsible for starting connection
-processes and degrade performance severely.</p></div>
-</div>
-</div>
-</div>
+</dl>
+<p>Start a new connection process for the given socket.</p>
+<p>The only purpose of this callback is to start a process that will handle the socket. It must spawn the process, link and then return the new pid. This function will always be called from inside a supervisor.</p>
+<p>This callback can also return two pids. The first pid is the pid of the process that will be supervised. The second pid is the pid of the process that will receive ownership of the socket. This second process must be a child of the first. This form is only available when <code>connection_type</code> is set to <code>supervisor</code>.</p>
+<p>If any other value is returned, the supervisor will close the socket and assume no process has been started.</p>
+<p>Do not perform any operations in this callback, as this would block the supervisor responsible for starting connection processes and degrade performance severely.</p>
+
@@ -173,6 +123,8 @@ processes and degrade performance severely.</p></div>
+ <li><a href="/docs/en/ranch/1.5/manual">1.5</a></li>
+
<li><a href="/docs/en/ranch/1.4/manual">1.4</a></li>
<li><a href="/docs/en/ranch/1.3/manual">1.3</a></li>
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 f310db81..7ea56fa3 100644
--- a/docs/en/ranch/1.2/manual/ranch_ssl/index.html
+++ b/docs/en/ranch/1.2/manual/ranch_ssl/index.html
@@ -62,349 +62,158 @@
<h1 class="lined-header"><span>ranch_ssl(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>ranch_ssl - SSL transport module</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>ranch_ssl - SSL transport module</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <code>ranch_ssl</code> module implements an SSL Ranch transport.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The <code>ranch_ssl</code> module implements an SSL Ranch transport.</p>
<h2 id="_types">Types</h2>
-<div class="sectionbody">
-<div class="sect2">
<h3 id="_ssl_opt">ssl_opt()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">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">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>()}
- | {<span style="color: #FF6600">certfile</span>, <span style="font-weight: bold"><span style="color: #000000">string</span></span>()}
- | {<span style="color: #FF6600">ciphers</span>, [<span style="font-weight: bold"><span style="color: #000000">ssl:erl_cipher_suite</span></span>()] | <span style="font-weight: bold"><span style="color: #000000">string</span></span>()}
- | {<span style="color: #FF6600">client_renegotiation</span>, <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()}
- | {<span style="color: #FF6600">crl_cache</span>, {<span style="font-weight: bold"><span style="color: #000000">module</span></span>(), {<span style="color: #FF6600">internal</span> | <span style="font-weight: bold"><span style="color: #000000">any</span></span>(), <span style="font-weight: bold"><span style="color: #000080">list</span></span>()}}}
- | {<span style="color: #FF6600">crl_check</span>, <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>() | <span style="color: #FF6600">peer</span> | <span style="color: #FF6600">best_effort</span>}
- | {<span style="color: #FF6600">depth</span>, <span style="color: #993399">0</span><span style="color: #990000">..</span><span style="color: #993399">255</span>}
- | {<span style="color: #FF6600">dh</span>, <span style="font-weight: bold"><span style="color: #000000">public_key:der_encoded</span></span>()}
- | {<span style="color: #FF6600">dhfile</span>, <span style="font-weight: bold"><span style="color: #000000">string</span></span>()}
- | {<span style="color: #FF6600">fail_if_no_peer_cert</span>, <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()}
- | {<span style="color: #FF6600">hibernate_after</span>, <span style="font-weight: bold"><span style="color: #000080">integer</span></span>() | <span style="color: #000080">undefined</span>}
- | {<span style="color: #FF6600">honor_cipher_order</span>, <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()}
- | {<span style="color: #FF6600">key</span>, {<span style="color: #FF6600">'RSAPrivateKey'</span> | <span style="color: #FF6600">'DSAPrivateKey'</span> | <span style="color: #FF6600">'PrivateKeyInfo'</span>, <span style="font-weight: bold"><span style="color: #000000">public_key:der_encoded</span></span>()}}
- | {<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">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>()}
- | {<span style="color: #FF6600">reuse_session</span>, <span style="font-weight: bold"><span style="color: #0000FF">fun</span></span>()}
- | {<span style="color: #FF6600">reuse_sessions</span>, <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()}
- | {<span style="color: #FF6600">secure_renegotiate</span>, <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()}
- | {<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">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>
-<div class="paragraph"><p>SSL-specific listen options.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_opt_ranch_tcp_opt_ssl_opt">opt() = ranch_tcp:opt() | ssl_opt()</h3>
-<div class="paragraph"><p>Listen options.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_opts_opt">opts() = [opt()]</h3>
-<div class="paragraph"><p>List of listen options.</p></div>
-</div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">ssl_opt</font></b>() <font color="#990000">=</font> {<font color="#FF6600">alpn_preferred_protocols</font>, [<b><font color="#000080">binary</font></b>()]}
+ | {<font color="#FF6600">cacertfile</font>, <b><font color="#000000">string</font></b>()}
+ | {<font color="#FF6600">cacerts</font>, [<b><font color="#000000">public_key:der_encoded</font></b>()]}
+ | {<font color="#FF6600">cert</font>, <b><font color="#000000">public_key:der_encoded</font></b>()}
+ | {<font color="#FF6600">certfile</font>, <b><font color="#000000">string</font></b>()}
+ | {<font color="#FF6600">ciphers</font>, [<b><font color="#000000">ssl:erl_cipher_suite</font></b>()] | <b><font color="#000000">string</font></b>()}
+ | {<font color="#FF6600">client_renegotiation</font>, <b><font color="#000000">boolean</font></b>()}
+ | {<font color="#FF6600">crl_cache</font>, {<b><font color="#000000">module</font></b>(), {<font color="#FF6600">internal</font> | <b><font color="#000000">any</font></b>(), <b><font color="#000080">list</font></b>()}}}
+ | {<font color="#FF6600">crl_check</font>, <b><font color="#000000">boolean</font></b>() | <font color="#FF6600">peer</font> | <font color="#FF6600">best_effort</font>}
+ | {<font color="#FF6600">depth</font>, <font color="#993399">0</font><font color="#990000">..</font><font color="#993399">255</font>}
+ | {<font color="#FF6600">dh</font>, <b><font color="#000000">public_key:der_encoded</font></b>()}
+ | {<font color="#FF6600">dhfile</font>, <b><font color="#000000">string</font></b>()}
+ | {<font color="#FF6600">fail_if_no_peer_cert</font>, <b><font color="#000000">boolean</font></b>()}
+ | {<font color="#FF6600">hibernate_after</font>, <b><font color="#000080">integer</font></b>() | <font color="#000080">undefined</font>}
+ | {<font color="#FF6600">honor_cipher_order</font>, <b><font color="#000000">boolean</font></b>()}
+ | {<font color="#FF6600">key</font>, {<font color="#FF6600">'RSAPrivateKey'</font> | <font color="#FF6600">'DSAPrivateKey'</font> | <font color="#FF6600">'PrivateKeyInfo'</font>, <b><font color="#000000">public_key:der_encoded</font></b>()}}
+ | {<font color="#FF6600">keyfile</font>, <b><font color="#000000">string</font></b>()}
+ | {<font color="#FF6600">log_alert</font>, <b><font color="#000000">boolean</font></b>()}
+ | {<font color="#FF6600">next_protocols_advertised</font>, [<b><font color="#000080">binary</font></b>()]}
+ | {<font color="#FF6600">partial_chain</font>, <b><font color="#0000FF">fun</font></b>(([<b><font color="#000000">public_key:der_encoded</font></b>()]) <font color="#990000">-&gt;</font> {<font color="#FF6600">trusted_ca</font>, <b><font color="#000000">public_key:der_encoded</font></b>()} | <font color="#FF6600">unknown_ca</font>)}
+ | {<font color="#FF6600">password</font>, <b><font color="#000000">string</font></b>()}
+ | {<font color="#FF6600">psk_identity</font>, <b><font color="#000000">string</font></b>()}
+ | {<font color="#FF6600">reuse_session</font>, <b><font color="#0000FF">fun</font></b>()}
+ | {<font color="#FF6600">reuse_sessions</font>, <b><font color="#000000">boolean</font></b>()}
+ | {<font color="#FF6600">secure_renegotiate</font>, <b><font color="#000000">boolean</font></b>()}
+ | {<font color="#FF6600">sni_fun</font>, <b><font color="#0000FF">fun</font></b>()}
+ | {<font color="#FF6600">sni_hosts</font>, [{<b><font color="#000000">string</font></b>(), <b><font color="#000000">ssl_opt</font></b>()}]}
+ | {<font color="#FF6600">user_lookup_fun</font>, {<b><font color="#0000FF">fun</font></b>(), <b><font color="#000000">any</font></b>()}}
+ | {<font color="#FF6600">verify</font>, <b><font color="#000000">ssl:verify_type</font></b>()}
+ | {<font color="#FF6600">verify_fun</font>, {<b><font color="#0000FF">fun</font></b>(), <b><font color="#000000">any</font></b>()}}
+ | {<font color="#FF6600">versions</font>, [<b><font color="#000080">atom</font></b>()]}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>SSL-specific listen options.</p>
+<h3 id="_opt_____ranch_tcp_opt_____ssl_opt">opt() = ranch_tcp:opt() | ssl_opt()</h3>
+<p>Listen options.</p>
+<h3 id="_opts______opt">opts() = [opt()]</h3>
+<p>List of listen options.</p>
<h2 id="_option_descriptions">Option descriptions</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Specifying a certificate is mandatory, either through the <code>cert</code>
-or the <code>certfile</code> option. None of the other options are required.</p></div>
-<div class="paragraph"><p>The default value is given next to the option name.</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-alpn_preferred_protocols
-</dt>
-<dd>
-<p>
- Perform Application-Layer Protocol Negotiation with the given list of preferred protocols.
-</p>
-</dd>
-<dt class="hdlist1">
-cacertfile
-</dt>
-<dd>
-<p>
- Path to PEM encoded trusted certificates file used to verify peer certificates.
-</p>
-</dd>
-<dt class="hdlist1">
-cacerts
-</dt>
-<dd>
-<p>
- List of DER encoded trusted certificates.
-</p>
-</dd>
-<dt class="hdlist1">
-cert
-</dt>
-<dd>
-<p>
- DER encoded user certificate.
-</p>
-</dd>
-<dt class="hdlist1">
-certfile
-</dt>
-<dd>
-<p>
- Path to the PEM encoded user certificate file. May also contain the private key.
-</p>
-</dd>
-<dt class="hdlist1">
-ciphers
-</dt>
-<dd>
-<p>
- List of ciphers that clients are allowed to use.
-</p>
-</dd>
-<dt class="hdlist1">
-client_renegotiation (true)
-</dt>
-<dd>
-<p>
- Whether to allow client-initiated renegotiation.
-</p>
-</dd>
-<dt class="hdlist1">
-crl_cache ({ssl_crl_cache, {internal, []}})
-</dt>
-<dd>
-<p>
- Customize the module used to cache Certificate Revocation Lists.
-</p>
-</dd>
-<dt class="hdlist1">
-crl_check (false)
-</dt>
-<dd>
-<p>
- Whether to perform CRL check on all certificates in the chain during validation.
-</p>
-</dd>
-<dt class="hdlist1">
-depth (1)
-</dt>
-<dd>
-<p>
- Maximum of intermediate certificates allowed in the certification path.
-</p>
-</dd>
-<dt class="hdlist1">
-dh
-</dt>
-<dd>
-<p>
- DER encoded Diffie-Hellman parameters.
-</p>
-</dd>
-<dt class="hdlist1">
-dhfile
-</dt>
-<dd>
-<p>
- Path to the PEM encoded Diffie-Hellman parameters file.
-</p>
-</dd>
-<dt class="hdlist1">
-fail_if_no_peer_cert (false)
-</dt>
-<dd>
-<p>
- Whether to refuse the connection if the client sends an empty certificate.
-</p>
-</dd>
-<dt class="hdlist1">
-hibernate_after (undefined)
-</dt>
-<dd>
-<p>
- Time in ms after which SSL socket processes go into hibernation to reduce memory usage.
-</p>
-</dd>
-<dt class="hdlist1">
-honor_cipher_order (false)
-</dt>
-<dd>
-<p>
- If true, use the server&#8217;s preference for cipher selection. If false, use the client&#8217;s preference.
-</p>
-</dd>
-<dt class="hdlist1">
-key
-</dt>
-<dd>
-<p>
- DER encoded user private key.
-</p>
-</dd>
-<dt class="hdlist1">
-keyfile
-</dt>
-<dd>
-<p>
- Path to the PEM encoded private key file, if different than the certfile.
-</p>
-</dd>
-<dt class="hdlist1">
-log_alert (true)
-</dt>
-<dd>
-<p>
- If false, error reports will not be displayed.
-</p>
-</dd>
-<dt class="hdlist1">
-next_protocols_advertised
-</dt>
-<dd>
-<p>
- List of protocols to send to the client if it supports the Next Protocol extension.
-</p>
-</dd>
-<dt class="hdlist1">
-nodelay (true)
-</dt>
-<dd>
-<p>
- Whether to enable TCP_NODELAY.
-</p>
-</dd>
-<dt class="hdlist1">
-partial_chain
-</dt>
-<dd>
-<p>
- Claim an intermediate CA in the chain as trusted.
-</p>
-</dd>
-<dt class="hdlist1">
-password
-</dt>
-<dd>
-<p>
- Password to the private key file, if password protected.
-</p>
-</dd>
-<dt class="hdlist1">
-psk_identity
-</dt>
-<dd>
-<p>
- Provide the given PSK identity hint to the client during the handshake.
-</p>
-</dd>
-<dt class="hdlist1">
-reuse_session
-</dt>
-<dd>
-<p>
- Custom policy to decide whether a session should be reused.
-</p>
-</dd>
-<dt class="hdlist1">
-reuse_sessions (false)
-</dt>
-<dd>
-<p>
- Whether to allow session reuse.
-</p>
-</dd>
-<dt class="hdlist1">
-secure_renegotiate (false)
-</dt>
-<dd>
-<p>
- Whether to reject renegotiation attempts that do not conform to RFC5746.
-</p>
-</dd>
-<dt class="hdlist1">
-sni_fun
-</dt>
-<dd>
-<p>
- Function called when the client requests a host using Server Name Indication. Returns options to apply.
-</p>
-</dd>
-<dt class="hdlist1">
-sni_hosts
-</dt>
-<dd>
-<p>
- Options to apply for the host that matches what the client requested with Server Name Indication.
-</p>
-</dd>
-<dt class="hdlist1">
-user_lookup_fun
-</dt>
-<dd>
-<p>
- Function called to determine the shared secret when using PSK, or provide parameters when using SRP.
-</p>
-</dd>
-<dt class="hdlist1">
-verify (verify_none)
-</dt>
-<dd>
-<p>
- Use <code>verify_peer</code> to request a certificate from the client.
-</p>
-</dd>
-<dt class="hdlist1">
-verify_fun
-</dt>
-<dd>
-<p>
- Custom policy to decide whether a client certificate is valid.
-</p>
-</dd>
-<dt class="hdlist1">
-versions
-</dt>
-<dd>
-<p>
- TLS protocol versions that will be supported.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Note that the client will not send a certificate unless the
-value for the <code>verify</code> option is set to <code>verify_peer</code>. This
-means that the <code>fail_if_no_peer_cert</code> only apply when combined
-with the <code>verify</code> option. The <code>verify_fun</code> option allows
-greater control over the client certificate validation.</p></div>
-<div class="paragraph"><p>The options <code>sni_fun</code> and <code>sni_hosts</code> are mutually exclusive.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Specifying a certificate is mandatory, either through the <code>cert</code> or the <code>certfile</code> option. None of the other options are required.</p>
+<p>The default value is given next to the option name.</p>
+<dl><dt>alpn_preferred_protocols</dt>
+<dd><p>Perform Application-Layer Protocol Negotiation with the given list of preferred protocols.</p>
+</dd>
+<dt>cacertfile</dt>
+<dd><p>Path to PEM encoded trusted certificates file used to verify peer certificates.</p>
+</dd>
+<dt>cacerts</dt>
+<dd><p>List of DER encoded trusted certificates.</p>
+</dd>
+<dt>cert</dt>
+<dd><p>DER encoded user certificate.</p>
+</dd>
+<dt>certfile</dt>
+<dd><p>Path to the PEM encoded user certificate file. May also contain the private key.</p>
+</dd>
+<dt>ciphers</dt>
+<dd><p>List of ciphers that clients are allowed to use.</p>
+</dd>
+<dt>client_renegotiation (true)</dt>
+<dd><p>Whether to allow client-initiated renegotiation.</p>
+</dd>
+<dt>crl_cache ({ssl_crl_cache, {internal, []}})</dt>
+<dd><p>Customize the module used to cache Certificate Revocation Lists.</p>
+</dd>
+<dt>crl_check (false)</dt>
+<dd><p>Whether to perform CRL check on all certificates in the chain during validation.</p>
+</dd>
+<dt>depth (1)</dt>
+<dd><p>Maximum of intermediate certificates allowed in the certification path.</p>
+</dd>
+<dt>dh</dt>
+<dd><p>DER encoded Diffie-Hellman parameters.</p>
+</dd>
+<dt>dhfile</dt>
+<dd><p>Path to the PEM encoded Diffie-Hellman parameters file.</p>
+</dd>
+<dt>fail_if_no_peer_cert (false)</dt>
+<dd><p>Whether to refuse the connection if the client sends an empty certificate.</p>
+</dd>
+<dt>hibernate_after (undefined)</dt>
+<dd><p>Time in ms after which SSL socket processes go into hibernation to reduce memory usage.</p>
+</dd>
+<dt>honor_cipher_order (false)</dt>
+<dd><p>If true, use the server&apos;s preference for cipher selection. If false, use the client&apos;s preference.</p>
+</dd>
+<dt>key</dt>
+<dd><p>DER encoded user private key.</p>
+</dd>
+<dt>keyfile</dt>
+<dd><p>Path to the PEM encoded private key file, if different than the certfile.</p>
+</dd>
+<dt>log_alert (true)</dt>
+<dd><p>If false, error reports will not be displayed.</p>
+</dd>
+<dt>next_protocols_advertised</dt>
+<dd><p>List of protocols to send to the client if it supports the Next Protocol extension.</p>
+</dd>
+<dt>nodelay (true)</dt>
+<dd><p>Whether to enable TCP_NODELAY.</p>
+</dd>
+<dt>partial_chain</dt>
+<dd><p>Claim an intermediate CA in the chain as trusted.</p>
+</dd>
+<dt>password</dt>
+<dd><p>Password to the private key file, if password protected.</p>
+</dd>
+<dt>psk_identity</dt>
+<dd><p>Provide the given PSK identity hint to the client during the handshake.</p>
+</dd>
+<dt>reuse_session</dt>
+<dd><p>Custom policy to decide whether a session should be reused.</p>
+</dd>
+<dt>reuse_sessions (false)</dt>
+<dd><p>Whether to allow session reuse.</p>
+</dd>
+<dt>secure_renegotiate (false)</dt>
+<dd><p>Whether to reject renegotiation attempts that do not conform to RFC5746.</p>
+</dd>
+<dt>sni_fun</dt>
+<dd><p>Function called when the client requests a host using Server Name Indication. Returns options to apply.</p>
+</dd>
+<dt>sni_hosts</dt>
+<dd><p>Options to apply for the host that matches what the client requested with Server Name Indication.</p>
+</dd>
+<dt>user_lookup_fun</dt>
+<dd><p>Function called to determine the shared secret when using PSK, or provide parameters when using SRP.</p>
+</dd>
+<dt>verify (verify_none)</dt>
+<dd><p>Use <code>verify_peer</code> to request a certificate from the client.</p>
+</dd>
+<dt>verify_fun</dt>
+<dd><p>Custom policy to decide whether a client certificate is valid.</p>
+</dd>
+<dt>versions</dt>
+<dd><p>TLS protocol versions that will be supported.</p>
+</dd>
+</dl>
+<p>Note that the client will not send a certificate unless the value for the <code>verify</code> option is set to <code>verify_peer</code>. This means that the <code>fail_if_no_peer_cert</code> only apply when combined with the <code>verify</code> option. The <code>verify_fun</code> option allows greater control over the client certificate validation.</p>
+<p>The options <code>sni_fun</code> and <code>sni_hosts</code> are mutually exclusive.</p>
<h2 id="_exports">Exports</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>None.</p></div>
-</div>
-</div>
+<p>None.</p>
+
@@ -439,6 +248,8 @@ greater control over the client certificate validation.</p></div>
+ <li><a href="/docs/en/ranch/1.5/manual">1.5</a></li>
+
<li><a href="/docs/en/ranch/1.4/manual">1.4</a></li>
<li><a href="/docs/en/ranch/1.3/manual">1.3</a></li>
diff --git a/docs/en/ranch/1.2/manual/ranch_tcp/index.html b/docs/en/ranch/1.2/manual/ranch_tcp/index.html
index 6e3f7c64..2218c203 100644
--- a/docs/en/ranch/1.2/manual/ranch_tcp/index.html
+++ b/docs/en/ranch/1.2/manual/ranch_tcp/index.html
@@ -62,274 +62,123 @@
<h1 class="lined-header"><span>ranch_tcp(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>ranch_tcp - TCP transport module</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>ranch_tcp - TCP transport module</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <code>ranch_tcp</code> module implements a TCP Ranch transport.</p></div>
-<div class="paragraph"><p>Note that due to bugs in OTP up to at least R16B02, it is
-recommended to disable async threads when using the
-<code>sendfile</code> function of this transport, as it can make
-the threads stuck indefinitely.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The <code>ranch_tcp</code> module implements a TCP Ranch transport.</p>
+<p>Note that due to bugs in OTP up to at least R16B02, it is recommended to disable async threads when using the <code>sendfile</code> function of this transport, as it can make the threads stuck indefinitely.</p>
<h2 id="_types">Types</h2>
-<div class="sectionbody">
-<div class="sect2">
<h3 id="_opt">opt()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">opt</span></span>() <span style="color: #990000">=</span> {<span style="color: #FF6600">backlog</span>, <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>()}
- | {<span style="color: #FF6600">buffer</span>, <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>()}
- | {<span style="color: #FF6600">delay_send</span>, <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()}
- | {<span style="color: #FF6600">dontroute</span>, <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()}
- | {<span style="color: #FF6600">exit_on_close</span>, <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()}
- | {<span style="color: #FF6600">fd</span>, <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>()}
- | {<span style="color: #FF6600">high_msgq_watermark</span>, <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>()}
- | {<span style="color: #FF6600">high_watermark</span>, <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>()}
- | <span style="color: #FF6600">inet</span>
- | <span style="color: #FF6600">inet6</span>
- | {<span style="color: #FF6600">ip</span>, <span style="font-weight: bold"><span style="color: #000000">inet:ip_address</span></span>()}
- | {<span style="color: #FF6600">keepalive</span>, <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()}
- | {<span style="color: #FF6600">linger</span>, {<span style="font-weight: bold"><span style="color: #000000">boolean</span></span>(), <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>()}}
- | {<span style="color: #FF6600">low_msgq_watermark</span>, <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>()}
- | {<span style="color: #FF6600">low_watermark</span>, <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>()}
- | {<span style="color: #FF6600">nodelay</span>, <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()}
- | {<span style="color: #FF6600">port</span>, <span style="font-weight: bold"><span style="color: #000000">inet:port_number</span></span>()}
- | {<span style="font-weight: bold"><span style="color: #000080">priority</span></span>, <span style="font-weight: bold"><span style="color: #000080">integer</span></span>()}
- | {<span style="color: #FF6600">raw</span>, <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>(), <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>(), <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()}
- | {<span style="color: #FF6600">recbuf</span>, <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>()}
- | {<span style="color: #FF6600">send_timeout</span>, <span style="font-weight: bold"><span style="color: #000000">timeout</span></span>()}
- | {<span style="color: #FF6600">send_timeout_close</span>, <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()}
- | {<span style="color: #FF6600">sndbuf</span>, <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>()}
- | {<span style="color: #FF6600">tos</span>, <span style="font-weight: bold"><span style="color: #000080">integer</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>Listen options.</p></div>
-<div class="paragraph"><p>This does not represent the entirety of the options that can
-be set on the socket, but only the options that may be
-set independently of protocol implementation.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_opts_opt">opts() = [opt()]</h3>
-<div class="paragraph"><p>List of listen options.</p></div>
-</div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">opt</font></b>() <font color="#990000">=</font> {<font color="#FF6600">backlog</font>, <b><font color="#000000">non_neg_integer</font></b>()}
+ | {<font color="#FF6600">buffer</font>, <b><font color="#000000">non_neg_integer</font></b>()}
+ | {<font color="#FF6600">delay_send</font>, <b><font color="#000000">boolean</font></b>()}
+ | {<font color="#FF6600">dontroute</font>, <b><font color="#000000">boolean</font></b>()}
+ | {<font color="#FF6600">exit_on_close</font>, <b><font color="#000000">boolean</font></b>()}
+ | {<font color="#FF6600">fd</font>, <b><font color="#000000">non_neg_integer</font></b>()}
+ | {<font color="#FF6600">high_msgq_watermark</font>, <b><font color="#000000">non_neg_integer</font></b>()}
+ | {<font color="#FF6600">high_watermark</font>, <b><font color="#000000">non_neg_integer</font></b>()}
+ | <font color="#FF6600">inet</font>
+ | <font color="#FF6600">inet6</font>
+ | {<font color="#FF6600">ip</font>, <b><font color="#000000">inet:ip_address</font></b>()}
+ | {<font color="#FF6600">keepalive</font>, <b><font color="#000000">boolean</font></b>()}
+ | {<font color="#FF6600">linger</font>, {<b><font color="#000000">boolean</font></b>(), <b><font color="#000000">non_neg_integer</font></b>()}}
+ | {<font color="#FF6600">low_msgq_watermark</font>, <b><font color="#000000">non_neg_integer</font></b>()}
+ | {<font color="#FF6600">low_watermark</font>, <b><font color="#000000">non_neg_integer</font></b>()}
+ | {<font color="#FF6600">nodelay</font>, <b><font color="#000000">boolean</font></b>()}
+ | {<font color="#FF6600">port</font>, <b><font color="#000000">inet:port_number</font></b>()}
+ | {<b><font color="#000080">priority</font></b>, <b><font color="#000080">integer</font></b>()}
+ | {<font color="#FF6600">raw</font>, <b><font color="#000000">non_neg_integer</font></b>(), <b><font color="#000000">non_neg_integer</font></b>(), <b><font color="#000080">binary</font></b>()}
+ | {<font color="#FF6600">recbuf</font>, <b><font color="#000000">non_neg_integer</font></b>()}
+ | {<font color="#FF6600">send_timeout</font>, <b><font color="#000000">timeout</font></b>()}
+ | {<font color="#FF6600">send_timeout_close</font>, <b><font color="#000000">boolean</font></b>()}
+ | {<font color="#FF6600">sndbuf</font>, <b><font color="#000000">non_neg_integer</font></b>()}
+ | {<font color="#FF6600">tos</font>, <b><font color="#000080">integer</font></b>()}</tt></pre>
+</div></div>
+<p>Listen options.</p>
+<p>This does not represent the entirety of the options that can be set on the socket, but only the options that may be set independently of protocol implementation.</p>
+<h3 id="_opts______opt">opts() = [opt()]</h3>
+<p>List of listen options.</p>
<h2 id="_option_descriptions">Option descriptions</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>None of the options are required.</p></div>
-<div class="paragraph"><p>Please consult the <code>gen_tcp</code> and <code>inet</code> manuals for a more
-thorough description of these options. This manual only aims
-to provide a short description along with what the defaults
-are. Defaults may be different in Ranch compared to <code>gen_tcp</code>.
-Defaults are given next to the option name.</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-backlog (1024)
-</dt>
-<dd>
-<p>
- Max length of the queue of pending connections.
-</p>
+<p>None of the options are required.</p>
+<p>Please consult the <code>gen_tcp</code> and <code>inet</code> manuals for a more thorough description of these options. This manual only aims to provide a short description along with what the defaults are. Defaults may be different in Ranch compared to <code>gen_tcp</code>. Defaults are given next to the option name.</p>
+<dl><dt>backlog (1024)</dt>
+<dd><p>Max length of the queue of pending connections.</p>
</dd>
-<dt class="hdlist1">
-buffer
-</dt>
-<dd>
-<p>
- Size of the buffer used by the Erlang driver. Default is system-dependent.
-</p>
+<dt>buffer</dt>
+<dd><p>Size of the buffer used by the Erlang driver. Default is system-dependent.</p>
</dd>
-<dt class="hdlist1">
-delay_send (false)
-</dt>
-<dd>
-<p>
- Always queue packets before sending, to send fewer, larger packets over the network.
-</p>
+<dt>delay_send (false)</dt>
+<dd><p>Always queue packets before sending, to send fewer, larger packets over the network.</p>
</dd>
-<dt class="hdlist1">
-dontroute (false)
-</dt>
-<dd>
-<p>
- Don&#8217;t send via a gateway, only send to directly connected hosts.
-</p>
+<dt>dontroute (false)</dt>
+<dd><p>Don&apos;t send via a gateway, only send to directly connected hosts.</p>
</dd>
-<dt class="hdlist1">
-exit_on_close (true)
-</dt>
-<dd>
-<p>
- Disable to allow sending data after a close has been detected.
-</p>
+<dt>exit_on_close (true)</dt>
+<dd><p>Disable to allow sending data after a close has been detected.</p>
</dd>
-<dt class="hdlist1">
-fd
-</dt>
-<dd>
-<p>
- File descriptor of the socket, if it was opened externally.
-</p>
+<dt>fd</dt>
+<dd><p>File descriptor of the socket, if it was opened externally.</p>
</dd>
-<dt class="hdlist1">
-high_msgq_watermark (8192)
-</dt>
-<dd>
-<p>
- Limit in the amount of data in the socket message queue before the socket queue becomes busy.
-</p>
+<dt>high_msgq_watermark (8192)</dt>
+<dd><p>Limit in the amount of data in the socket message queue before the socket queue becomes busy.</p>
</dd>
-<dt class="hdlist1">
-high_watermark (8192)
-</dt>
-<dd>
-<p>
- Limit in the amount of data in the ERTS socket implementation&#8217;s queue before the socket becomes busy.
-</p>
+<dt>high_watermark (8192)</dt>
+<dd><p>Limit in the amount of data in the ERTS socket implementation&apos;s queue before the socket becomes busy.</p>
</dd>
-<dt class="hdlist1">
-inet
-</dt>
-<dd>
-<p>
- Set up the socket for IPv4.
-</p>
+<dt>inet</dt>
+<dd><p>Set up the socket for IPv4.</p>
</dd>
-<dt class="hdlist1">
-inet6
-</dt>
-<dd>
-<p>
- Set up the socket for IPv6.
-</p>
+<dt>inet6</dt>
+<dd><p>Set up the socket for IPv6.</p>
</dd>
-<dt class="hdlist1">
-ip
-</dt>
-<dd>
-<p>
- Interface to listen on. Listen on all interfaces by default.
-</p>
+<dt>ip</dt>
+<dd><p>Interface to listen on. Listen on all interfaces by default.</p>
</dd>
-<dt class="hdlist1">
-keepalive (false)
-</dt>
-<dd>
-<p>
- Enable sending of keep-alive messages.
-</p>
+<dt>keepalive (false)</dt>
+<dd><p>Enable sending of keep-alive messages.</p>
</dd>
-<dt class="hdlist1">
-linger ({false, 0})
-</dt>
-<dd>
-<p>
- Whether to wait and how long to flush data sent before closing the socket.
-</p>
+<dt>linger ({false, 0})</dt>
+<dd><p>Whether to wait and how long to flush data sent before closing the socket.</p>
</dd>
-<dt class="hdlist1">
-low_msgq_watermark (4096)
-</dt>
-<dd>
-<p>
- Amount of data in the socket message queue before the socket queue leaves busy state.
-</p>
+<dt>low_msgq_watermark (4096)</dt>
+<dd><p>Amount of data in the socket message queue before the socket queue leaves busy state.</p>
</dd>
-<dt class="hdlist1">
-low_watermark (4096)
-</dt>
-<dd>
-<p>
- Amount of data in the ERTS socket implementation&#8217;s queue before the socket leaves busy state.
-</p>
+<dt>low_watermark (4096)</dt>
+<dd><p>Amount of data in the ERTS socket implementation&apos;s queue before the socket leaves busy state.</p>
</dd>
-<dt class="hdlist1">
-nodelay (true)
-</dt>
-<dd>
-<p>
- Whether to enable TCP_NODELAY.
-</p>
+<dt>nodelay (true)</dt>
+<dd><p>Whether to enable TCP_NODELAY.</p>
</dd>
-<dt class="hdlist1">
-port (0)
-</dt>
-<dd>
-<p>
- TCP port number to listen on. 0 means a random port will be used.
-</p>
+<dt>port (0)</dt>
+<dd><p>TCP port number to listen on. 0 means a random port will be used.</p>
</dd>
-<dt class="hdlist1">
-priority (0)
-</dt>
-<dd>
-<p>
- Priority value for all packets to be sent by this socket.
-</p>
+<dt>priority (0)</dt>
+<dd><p>Priority value for all packets to be sent by this socket.</p>
</dd>
-<dt class="hdlist1">
-recbuf
-</dt>
-<dd>
-<p>
- Minimum size of the socket&#8217;s receive buffer. Default is system-dependent.
-</p>
+<dt>recbuf</dt>
+<dd><p>Minimum size of the socket&apos;s receive buffer. Default is system-dependent.</p>
</dd>
-<dt class="hdlist1">
-send_timeout (30000)
-</dt>
-<dd>
-<p>
- How long the send call may wait for confirmation before returning.
-</p>
+<dt>send_timeout (30000)</dt>
+<dd><p>How long the send call may wait for confirmation before returning.</p>
</dd>
-<dt class="hdlist1">
-send_timeout_close (true)
-</dt>
-<dd>
-<p>
- Whether to close the socket when the confirmation wasn&#8217;t received.
-</p>
+<dt>send_timeout_close (true)</dt>
+<dd><p>Whether to close the socket when the confirmation wasn&apos;t received.</p>
</dd>
-<dt class="hdlist1">
-sndbuf
-</dt>
-<dd>
-<p>
- Minimum size of the socket&#8217;s send buffer. Default is system-dependent.
-</p>
+<dt>sndbuf</dt>
+<dd><p>Minimum size of the socket&apos;s send buffer. Default is system-dependent.</p>
</dd>
-<dt class="hdlist1">
-tos
-</dt>
-<dd>
-<p>
- Value for the IP_TOS IP level option. Use with caution.
-</p>
+<dt>tos</dt>
+<dd><p>Value for the IP_TOS IP level option. Use with caution.</p>
</dd>
-</dl></div>
-<div class="paragraph"><p>In addition, the <code>raw</code> option can be used to set system-specific
-options by specifying the protocol level, the option number and
-the actual option value specified as a binary. This option is not
-portable. Use with caution.</p></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
+<p>In addition, the <code>raw</code> option can be used to set system-specific options by specifying the protocol level, the option number and the actual option value specified as a binary. This option is not portable. Use with caution.</p>
<h2 id="_exports">Exports</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>None.</p></div>
-</div>
-</div>
+<p>None.</p>
+
@@ -364,6 +213,8 @@ portable. Use with caution.</p></div>
+ <li><a href="/docs/en/ranch/1.5/manual">1.5</a></li>
+
<li><a href="/docs/en/ranch/1.4/manual">1.4</a></li>
<li><a href="/docs/en/ranch/1.3/manual">1.3</a></li>
diff --git a/docs/en/ranch/1.2/manual/ranch_transport/index.html b/docs/en/ranch/1.2/manual/ranch_transport/index.html
index c0c08417..f276197e 100644
--- a/docs/en/ranch/1.2/manual/ranch_transport/index.html
+++ b/docs/en/ranch/1.2/manual/ranch_transport/index.html
@@ -62,494 +62,198 @@
<h1 class="lined-header"><span>ranch_transport(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>ranch_transport - behaviour for transport modules</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>ranch_transport - behaviour for transport modules</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <code>ranch_transport</code> behaviour defines the interface used
-by Ranch transports.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The <code>ranch_transport</code> behaviour defines the interface used by Ranch transports.</p>
<h2 id="_types">Types</h2>
-<div class="sectionbody">
-<div class="sect2">
-<h3 id="_sendfile_opts_chunk_size_non_neg_integer">sendfile_opts() = [{chunk_size, non_neg_integer()}]</h3>
-<div class="paragraph"><p>Options used by the sendfile function and callbacks.</p></div>
-<div class="paragraph"><p>Allows configuring the chunk size, in bytes. Defaults to 8191 bytes.</p></div>
-</div>
-</div>
-</div>
-<div class="sect1">
+<h3 id="_sendfile_opts_______chunk_size__non_neg_integer">sendfile_opts() = [{chunk_size, non_neg_integer()}]</h3>
+<p>Options used by the sendfile function and callbacks.</p>
+<p>Allows configuring the chunk size, in bytes. Defaults to 8191 bytes.</p>
<h2 id="_callbacks">Callbacks</h2>
-<div class="sectionbody">
-<div class="sect2">
-<h3 id="_accept_lsocket_timeout_8594_ok_csocket_error_closed_timeout_atom">accept(LSocket, Timeout) &#8594; {ok, CSocket} | {error, closed | timeout | atom()}</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-LSocket = CSocket = any()
-</dt>
-<dd>
-<p>
-Listening socket.
-</p>
-</dd>
-<dt class="hdlist1">
-Timeout = timeout()
-</dt>
-<dd>
-<p>
-Accept timeout.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Accept a connection on the given listening socket.</p></div>
-<div class="paragraph"><p>The <code>accept_ack</code> callback will be used to initialize the socket
-after accepting the connection. This is most useful when the
-transport is not raw TCP, like with SSL for example.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_accept_ack_csocket_timeout_8594_ok">accept_ack(CSocket, Timeout) &#8594; ok</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-CSocket = any()
-</dt>
-<dd>
-<p>
-Socket for this connection.
-</p>
-</dd>
-<dt class="hdlist1">
-Timeout = timeout()
-</dt>
-<dd>
-<p>
-Ack timeout.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Perform post-accept initialization of the connection.</p></div>
-<div class="paragraph"><p>This function will be called by connection processes
-before performing any socket operation. It allows
-transports that require extra initialization to perform
-their task and make the socket ready to use.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_close_socket_8594_ok">close(Socket) &#8594; ok</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Socket = any()
-</dt>
-<dd>
-<p>
-Socket opened with listen/1 or accept/2.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Close the given socket.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_controlling_process_socket_pid_8594_ok_error_closed_not_owner_atom">controlling_process(Socket, Pid) &#8594; ok | {error, closed | not_owner | atom()}</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Socket = any()
-</dt>
-<dd>
-<p>
-Socket opened with listen/1 or accept/2.
-</p>
-</dd>
-<dt class="hdlist1">
-Pid = pid()
-</dt>
-<dd>
-<p>
-Pid of the new owner of the socket.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Change the controlling process for the given socket.</p></div>
-<div class="paragraph"><p>The controlling process is the process that is allowed to
-perform operations on the socket, and that will receive
-messages from the socket when active mode is used. When
-the controlling process dies, the socket is closed.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_listen_transopts_8594_ok_lsocket_error_atom">listen(TransOpts) &#8594; {ok, LSocket} | {error, atom()}</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-TransOpts = any()
-</dt>
-<dd>
-<p>
-Transport options.
-</p>
-</dd>
-<dt class="hdlist1">
-LSocket = any()
-</dt>
-<dd>
-<p>
-Listening socket.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Listen for connections on the given port.</p></div>
-<div class="paragraph"><p>The port is given as part of the transport options under
-the key <code>port</code>. Any other option is transport dependent.</p></div>
-<div class="paragraph"><p>The socket returned by this call can then be used to
-accept connections. It is not possible to send or receive
-data from the listening socket.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_messages_8594_ok_closed_error">messages() &#8594; {OK, Closed, Error}</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-OK = Closed = Error = atom()
-</dt>
-<dd>
-<p>
-Tuple names.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Return the atoms used to identify messages sent in active mode.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_name_8594_name">name() &#8594; Name</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Name = atom()
-</dt>
-<dd>
-<p>
-Transport module name.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Return the name of the transport.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_peername_csocket_8594_ok_ip_port_error_atom">peername(CSocket) &#8594; {ok, {IP, Port}} | {error, atom()}</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-CSocket = any()
-</dt>
-<dd>
-<p>
-Socket for this connection.
-</p>
-</dd>
-<dt class="hdlist1">
-IP = inet:ip_address()
-</dt>
-<dd>
-<p>
-IP of the remote endpoint.
-</p>
-</dd>
-<dt class="hdlist1">
-Port = inet:port_number()
-</dt>
-<dd>
-<p>
-Port of the remote endpoint.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Return the IP and port of the remote endpoint.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_recv_csocket_length_timeout_8594_ok_packet_error_closed_timeout_atom">recv(CSocket, Length, Timeout) &#8594; {ok, Packet} | {error, closed | timeout | atom()}</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-CSocket = any()
-</dt>
-<dd>
-<p>
-Socket for this connection.
-</p>
-</dd>
-<dt class="hdlist1">
-Length = non_neg_integer()
-</dt>
-<dd>
-<p>
-Requested length.
-</p>
-</dd>
-<dt class="hdlist1">
-Timeout = timeout()
-</dt>
-<dd>
-<p>
-Receive timeout.
-</p>
-</dd>
-<dt class="hdlist1">
-Packet = iodata() | any()
-</dt>
-<dd>
-<p>
-Data received.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Receive data from the given socket when in passive mode.</p></div>
-<div class="paragraph"><p>Trying to receive data from a socket that is in active mode
-will return an error.</p></div>
-<div class="paragraph"><p>A length of 0 will return any data available on the socket.</p></div>
-<div class="paragraph"><p>While it is possible to use the timeout value <code>infinity</code>,
-this is highly discouraged as this could cause your process
-to get stuck waiting for data that will never come. This may
-happen when a socket becomes half-open due to a crash of the
-remote endpoint. Wi-Fi going down is another common culprit
-of this issue.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_send_csocket_packet_8594_ok_error_atom">send(CSocket, Packet) &#8594; ok | {error, atom()}</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-CSocket = any()
-</dt>
-<dd>
-<p>
-Socket for this connection.
-</p>
-</dd>
-<dt class="hdlist1">
-Packet = iodata()
-</dt>
-<dd>
-<p>
-Data to be sent.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Send data to the given socket.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_sendfile_csocket_file_8594_sendfile_csocket_file_0_0">sendfile(CSocket, File) &#8594; sendfile(CSocket, File, 0, 0, [])</h3>
-<div class="paragraph"><p>Alias of <code>ranch_transport:sendfile/5</code>.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_sendfile_csocket_file_offset_bytes_8594_sendfile_csocket_file_offset_bytes">sendfile(CSocket, File, Offset, Bytes) &#8594; sendfile(CSocket, File, Offset, Bytes, [])</h3>
-<div class="paragraph"><p>Alias of <code>ranch_transport:sendfile/5</code>.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_sendfile_csocket_file_offset_bytes_sfopts_8594_ok_sentbytes_error_atom">sendfile(CSocket, File, Offset, Bytes, SfOpts) &#8594; {ok, SentBytes} | {error, atom()}</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-CSocket = any()
-</dt>
-<dd>
-<p>
-Socket for this connection.
-</p>
-</dd>
-<dt class="hdlist1">
-File = file:filename_all() | file:fd()
-</dt>
-<dd>
-<p>
-Filename or file descriptor for the file to be sent.
-</p>
-</dd>
-<dt class="hdlist1">
-Offset = non_neg_integer()
-</dt>
-<dd>
-<p>
-Begin sending at this position in the file.
-</p>
-</dd>
-<dt class="hdlist1">
-Bytes = non_neg_integer()
-</dt>
-<dd>
-<p>
-Send this many bytes.
-</p>
-</dd>
-<dt class="hdlist1">
-SentBytes = non_neg_integer()
-</dt>
-<dd>
-<p>
-This many bytes were sent.
-</p>
-</dd>
-<dt class="hdlist1">
-SfOpts = sendfile_opts()
-</dt>
-<dd>
-<p>
-Sendfile options.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Send data from a file to the given socket.</p></div>
-<div class="paragraph"><p>The file may be sent full or in parts, and may be specified
-by its filename or by an already open file descriptor.</p></div>
-<div class="paragraph"><p>Transports that manipulate TCP directly may use the
-<code>file:sendfile/{2,4,5}</code> function, which calls the sendfile
-syscall where applicable (on Linux, for example). Other
-transports can use the <code>sendfile/6</code> function exported from
-this module.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_setopts_csocket_sockopts_8594_ok_error_atom">setopts(CSocket, SockOpts) &#8594; ok | {error, atom()}</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-CSocket = any()
-</dt>
-<dd>
-<p>
-Socket for this connection.
-</p>
-</dd>
-<dt class="hdlist1">
-SockOpts = any()
-</dt>
-<dd>
-<p>
-Socket options.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Change options for the given socket.</p></div>
-<div class="paragraph"><p>This is mainly useful for switching to active or passive mode
-or to set protocol-specific options.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_shutdown_csocket_how_8594_ok_error_atom">shutdown(CSocket, How) &#8594; ok | {error, atom()}</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-CSocket = any()
-</dt>
-<dd>
-<p>
-Socket for this connection.
-</p>
-</dd>
-<dt class="hdlist1">
-How = read | write | read_write
-</dt>
-<dd>
-<p>
-Which side(s) of the socket to close.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Immediately close the socket in one or two directions.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_sockname_socket_8594_ok_ip_port_error_atom">sockname(Socket) &#8594; {ok, {IP, Port}} | {error, atom()}</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Socket = any()
-</dt>
-<dd>
-<p>
-Socket opened with listen/1 or accept/2.
-</p>
-</dd>
-<dt class="hdlist1">
-IP = inet:ip_address()
-</dt>
-<dd>
-<p>
-IP of the local endpoint.
-</p>
-</dd>
-<dt class="hdlist1">
-Port = inet:port_number()
-</dt>
-<dd>
-<p>
-Port of the local endpoint.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Return the IP and port of the local endpoint.</p></div>
-</div>
-</div>
-</div>
-<div class="sect1">
+<h3 id="_accept_lsocket__timeout______ok__csocket_____error__closed___timeout___atom">accept(LSocket, Timeout) -&gt; {ok, CSocket} | {error, closed | timeout | atom()}</h3>
+<dl><dt>LSocket = CSocket = any()</dt>
+<dd><p>Listening socket.</p>
+</dd>
+<dt>Timeout = timeout()</dt>
+<dd><p>Accept timeout.</p>
+</dd>
+</dl>
+<p>Accept a connection on the given listening socket.</p>
+<p>The <code>accept_ack</code> callback will be used to initialize the socket after accepting the connection. This is most useful when the transport is not raw TCP, like with SSL for example.</p>
+<h3 id="_accept_ack_csocket__timeout_____ok">accept_ack(CSocket, Timeout) -&gt; ok</h3>
+<dl><dt>CSocket = any()</dt>
+<dd><p>Socket for this connection.</p>
+</dd>
+<dt>Timeout = timeout()</dt>
+<dd><p>Ack timeout.</p>
+</dd>
+</dl>
+<p>Perform post-accept initialization of the connection.</p>
+<p>This function will be called by connection processes before performing any socket operation. It allows transports that require extra initialization to perform their task and make the socket ready to use.</p>
+<h3 id="_close_socket_____ok">close(Socket) -&gt; ok</h3>
+<dl><dt>Socket = any()</dt>
+<dd><p>Socket opened with listen/1 or accept/2.</p>
+</dd>
+</dl>
+<p>Close the given socket.</p>
+<h3 id="_controlling_process_socket__pid_____ok____error__closed___not_owner___atom">controlling_process(Socket, Pid) -&gt; ok | {error, closed | not_owner | atom()}</h3>
+<dl><dt>Socket = any()</dt>
+<dd><p>Socket opened with listen/1 or accept/2.</p>
+</dd>
+<dt>Pid = pid()</dt>
+<dd><p>Pid of the new owner of the socket.</p>
+</dd>
+</dl>
+<p>Change the controlling process for the given socket.</p>
+<p>The controlling process is the process that is allowed to perform operations on the socket, and that will receive messages from the socket when active mode is used. When the controlling process dies, the socket is closed.</p>
+<h3 id="_listen_transopts______ok__lsocket_____error__atom">listen(TransOpts) -&gt; {ok, LSocket} | {error, atom()}</h3>
+<dl><dt>TransOpts = any()</dt>
+<dd><p>Transport options.</p>
+</dd>
+<dt>LSocket = any()</dt>
+<dd><p>Listening socket.</p>
+</dd>
+</dl>
+<p>Listen for connections on the given port.</p>
+<p>The port is given as part of the transport options under the key <code>port</code>. Any other option is transport dependent.</p>
+<p>The socket returned by this call can then be used to accept connections. It is not possible to send or receive data from the listening socket.</p>
+<h3 id="_messages_______ok__closed__error">messages() -&gt; {OK, Closed, Error}</h3>
+<dl><dt>OK = Closed = Error = atom()</dt>
+<dd><p>Tuple names.</p>
+</dd>
+</dl>
+<p>Return the atoms used to identify messages sent in active mode.</p>
+<h3 id="_name______name">name() -&gt; Name</h3>
+<dl><dt>Name = atom()</dt>
+<dd><p>Transport module name.</p>
+</dd>
+</dl>
+<p>Return the name of the transport.</p>
+<h3 id="_peername_csocket______ok___ip__port______error__atom">peername(CSocket) -&gt; {ok, {IP, Port}} | {error, atom()}</h3>
+<dl><dt>CSocket = any()</dt>
+<dd><p>Socket for this connection.</p>
+</dd>
+<dt>IP = inet:ip_address()</dt>
+<dd><p>IP of the remote endpoint.</p>
+</dd>
+<dt>Port = inet:port_number()</dt>
+<dd><p>Port of the remote endpoint.</p>
+</dd>
+</dl>
+<p>Return the IP and port of the remote endpoint.</p>
+<h3 id="_recv_csocket__length__timeout______ok__packet_____error__closed___timeout___atom">recv(CSocket, Length, Timeout) -&gt; {ok, Packet} | {error, closed | timeout | atom()}</h3>
+<dl><dt>CSocket = any()</dt>
+<dd><p>Socket for this connection.</p>
+</dd>
+<dt>Length = non_neg_integer()</dt>
+<dd><p>Requested length.</p>
+</dd>
+<dt>Timeout = timeout()</dt>
+<dd><p>Receive timeout.</p>
+</dd>
+<dt>Packet = iodata() | any()</dt>
+<dd><p>Data received.</p>
+</dd>
+</dl>
+<p>Receive data from the given socket when in passive mode.</p>
+<p>Trying to receive data from a socket that is in active mode will return an error.</p>
+<p>A length of 0 will return any data available on the socket.</p>
+<p>While it is possible to use the timeout value <code>infinity</code>, this is highly discouraged as this could cause your process to get stuck waiting for data that will never come. This may happen when a socket becomes half-open due to a crash of the remote endpoint. Wi-Fi going down is another common culprit of this issue.</p>
+<h3 id="_send_csocket__packet_____ok____error__atom">send(CSocket, Packet) -&gt; ok | {error, atom()}</h3>
+<dl><dt>CSocket = any()</dt>
+<dd><p>Socket for this connection.</p>
+</dd>
+<dt>Packet = iodata()</dt>
+<dd><p>Data to be sent.</p>
+</dd>
+</dl>
+<p>Send data to the given socket.</p>
+<h3 id="_sendfile_csocket__file_____sendfile_csocket__file__0__0">sendfile(CSocket, File) -&gt; sendfile(CSocket, File, 0, 0, [])</h3>
+<p>Alias of <code>ranch_transport:sendfile/5</code>.</p>
+<h3 id="_sendfile_csocket__file__offset__bytes_____sendfile_csocket__file__offset__bytes">sendfile(CSocket, File, Offset, Bytes) -&gt; sendfile(CSocket, File, Offset, Bytes, [])</h3>
+<p>Alias of <code>ranch_transport:sendfile/5</code>.</p>
+<h3 id="_sendfile_csocket__file__offset__bytes__sfopts______ok__sentbytes_____error__atom">sendfile(CSocket, File, Offset, Bytes, SfOpts) -&gt; {ok, SentBytes} | {error, atom()}</h3>
+<dl><dt>CSocket = any()</dt>
+<dd><p>Socket for this connection.</p>
+</dd>
+<dt>File = file:filename_all() | file:fd()</dt>
+<dd><p>Filename or file descriptor for the file to be sent.</p>
+</dd>
+<dt>Offset = non_neg_integer()</dt>
+<dd><p>Begin sending at this position in the file.</p>
+</dd>
+<dt>Bytes = non_neg_integer()</dt>
+<dd><p>Send this many bytes.</p>
+</dd>
+<dt>SentBytes = non_neg_integer()</dt>
+<dd><p>This many bytes were sent.</p>
+</dd>
+<dt>SfOpts = sendfile_opts()</dt>
+<dd><p>Sendfile options.</p>
+</dd>
+</dl>
+<p>Send data from a file to the given socket.</p>
+<p>The file may be sent full or in parts, and may be specified by its filename or by an already open file descriptor.</p>
+<p>Transports that manipulate TCP directly may use the <code>file:sendfile/{2,4,5}</code> function, which calls the sendfile syscall where applicable (on Linux, for example). Other transports can use the <code>sendfile/6</code> function exported from this module.</p>
+<h3 id="_setopts_csocket__sockopts_____ok____error__atom">setopts(CSocket, SockOpts) -&gt; ok | {error, atom()}</h3>
+<dl><dt>CSocket = any()</dt>
+<dd><p>Socket for this connection.</p>
+</dd>
+<dt>SockOpts = any()</dt>
+<dd><p>Socket options.</p>
+</dd>
+</dl>
+<p>Change options for the given socket.</p>
+<p>This is mainly useful for switching to active or passive mode or to set protocol-specific options.</p>
+<h3 id="_shutdown_csocket__how_____ok____error__atom">shutdown(CSocket, How) -&gt; ok | {error, atom()}</h3>
+<dl><dt>CSocket = any()</dt>
+<dd><p>Socket for this connection.</p>
+</dd>
+<dt>How = read | write | read_write</dt>
+<dd><p>Which side(s) of the socket to close.</p>
+</dd>
+</dl>
+<p>Immediately close the socket in one or two directions.</p>
+<h3 id="_sockname_socket______ok___ip__port______error__atom">sockname(Socket) -&gt; {ok, {IP, Port}} | {error, atom()}</h3>
+<dl><dt>Socket = any()</dt>
+<dd><p>Socket opened with listen/1 or accept/2.</p>
+</dd>
+<dt>IP = inet:ip_address()</dt>
+<dd><p>IP of the local endpoint.</p>
+</dd>
+<dt>Port = inet:port_number()</dt>
+<dd><p>Port of the local endpoint.</p>
+</dd>
+</dl>
+<p>Return the IP and port of the local endpoint.</p>
<h2 id="_exports">Exports</h2>
-<div class="sectionbody">
-<div class="sect2">
-<h3 id="_sendfile_transport_csocket_file_offset_bytes_sfopts_8594_ok_sentbytes_error_atom">sendfile(Transport, CSocket, File, Offset, Bytes, SfOpts) &#8594; {ok, SentBytes} | {error, atom()}</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Transport = module()
-</dt>
-<dd>
-<p>
-Transport module for this socket.
-</p>
-</dd>
-<dt class="hdlist1">
-CSocket = any()
-</dt>
-<dd>
-<p>
-Socket for this connection.
-</p>
-</dd>
-<dt class="hdlist1">
-File = file:filename_all() | file:fd()
-</dt>
-<dd>
-<p>
-Filename or file descriptor for the file to be sent.
-</p>
-</dd>
-<dt class="hdlist1">
-Offset = non_neg_integer()
-</dt>
-<dd>
-<p>
-Begin sending at this position in the file.
-</p>
-</dd>
-<dt class="hdlist1">
-Bytes = non_neg_integer()
-</dt>
-<dd>
-<p>
-Send this many bytes.
-</p>
-</dd>
-<dt class="hdlist1">
-SentBytes = non_neg_integer()
-</dt>
-<dd>
-<p>
-This many bytes were sent.
-</p>
-</dd>
-<dt class="hdlist1">
-SfOpts = sendfile_opts()
-</dt>
-<dd>
-<p>
-Sendfile options.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Send data from a file to the given socket.</p></div>
-<div class="paragraph"><p>This function emulates the function <code>file:sendfile/{2,4,5}</code>
-and may be used when transports are not manipulating TCP
-directly.</p></div>
-</div>
-</div>
-</div>
+<h3 id="_sendfile_transport__csocket__file__offset__bytes__sfopts______ok__sentbytes_____error__atom">sendfile(Transport, CSocket, File, Offset, Bytes, SfOpts) -&gt; {ok, SentBytes} | {error, atom()}</h3>
+<dl><dt>Transport = module()</dt>
+<dd><p>Transport module for this socket.</p>
+</dd>
+<dt>CSocket = any()</dt>
+<dd><p>Socket for this connection.</p>
+</dd>
+<dt>File = file:filename_all() | file:fd()</dt>
+<dd><p>Filename or file descriptor for the file to be sent.</p>
+</dd>
+<dt>Offset = non_neg_integer()</dt>
+<dd><p>Begin sending at this position in the file.</p>
+</dd>
+<dt>Bytes = non_neg_integer()</dt>
+<dd><p>Send this many bytes.</p>
+</dd>
+<dt>SentBytes = non_neg_integer()</dt>
+<dd><p>This many bytes were sent.</p>
+</dd>
+<dt>SfOpts = sendfile_opts()</dt>
+<dd><p>Sendfile options.</p>
+</dd>
+</dl>
+<p>Send data from a file to the given socket.</p>
+<p>This function emulates the function <code>file:sendfile/{2,4,5}</code> and may be used when transports are not manipulating TCP directly.</p>
+
@@ -584,6 +288,8 @@ directly.</p></div>
+ <li><a href="/docs/en/ranch/1.5/manual">1.5</a></li>
+
<li><a href="/docs/en/ranch/1.4/manual">1.4</a></li>
<li><a href="/docs/en/ranch/1.3/manual">1.3</a></li>
diff --git a/docs/en/ranch/1.3/guide/embedded/index.html b/docs/en/ranch/1.3/guide/embedded/index.html
index 48adad24..a3b31404 100644
--- a/docs/en/ranch/1.3/guide/embedded/index.html
+++ b/docs/en/ranch/1.3/guide/embedded/index.html
@@ -62,48 +62,30 @@
<h1 class="lined-header"><span>Embedded mode</span></h1>
-<div class="paragraph"><p>Embedded mode allows you to insert Ranch listeners directly
-in your supervision tree. This allows for greater fault tolerance
-control by permitting the shutdown of a listener due to the
-failure of another part of the application and vice versa.</p></div>
-<div class="sect1">
+<p>Embedded mode allows you to insert Ranch listeners directly in your supervision tree. This allows for greater fault tolerance control by permitting the shutdown of a listener due to the failure of another part of the application and vice versa.</p>
<h2 id="_embedding">Embedding</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>To embed Ranch in your application you can simply add the child specs
-to your supervision tree. This can all be done in the <code>init/1</code> function
-of one of your application supervisors.</p></div>
-<div class="paragraph"><p>Ranch requires at the minimum two kinds of child specs for embedding.
-First, you need to add <code>ranch_sup</code> to your supervision tree, only once,
-regardless of the number of listeners you will use. Then you need to
-add the child specs for each listener.</p></div>
-<div class="paragraph"><p>Ranch has a convenience function for getting the listeners child specs
-called <code>ranch:child_spec/6</code>, that works like <code>ranch:start_listener/6</code>,
-except that it doesn&#8217;t start anything, it only returns child specs.</p></div>
-<div class="paragraph"><p>As for <code>ranch_sup</code>, the child spec is simple enough to not require a
-convenience function.</p></div>
-<div class="paragraph"><p>The following example adds both <code>ranch_sup</code> and one listener to another
-application&#8217;s supervision tree.</p></div>
-<div class="listingblock">
-<div class="title">Embed Ranch directly in your supervision tree</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<p>To embed Ranch in your application you can simply add the child specs to your supervision tree. This can all be done in the <code>init/1</code> function of one of your application supervisors.</p>
+<p>Ranch requires at the minimum two kinds of child specs for embedding. First, you need to add <code>ranch_sup</code> to your supervision tree, only once, regardless of the number of listeners you will use. Then you need to add the child specs for each listener.</p>
+<p>Ranch has a convenience function for getting the listeners child specs called <code>ranch:child_spec/6</code>, that works like <code>ranch:start_listener/6</code>, except that it doesn&apos;t start anything, it only returns child specs.</p>
+<p>As for <code>ranch_sup</code>, the child spec is simple enough to not require a convenience function.</p>
+<p>The following example adds both <code>ranch_sup</code> and one listener to another application&apos;s supervision tree.</p>
+<div class="listingblock"><div class="title">Embed Ranch directly in your supervision tree</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: #990000">-&gt;</span>
- <span style="color: #009900">RanchSupSpec</span> <span style="color: #990000">=</span> {<span style="color: #FF6600">ranch_sup</span>, {<span style="color: #FF6600">ranch_sup</span>, <span style="color: #FF6600">start_link</span>, []},
- <span style="color: #FF6600">permanent</span>, <span style="color: #993399">5000</span>, <span style="color: #FF6600">supervisor</span>, [<span style="color: #FF6600">ranch_sup</span>]},
- <span style="color: #009900">ListenerSpec</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">ranch:child_spec</span></span>(<span style="color: #FF6600">echo</span>, <span style="color: #993399">100</span>,
- <span style="color: #FF6600">ranch_tcp</span>, [{<span style="color: #FF6600">port</span>, <span style="color: #993399">5555</span>}],
- <span style="color: #FF6600">echo_protocol</span>, []
- ),
- {<span style="color: #FF6600">ok</span>, {{<span style="color: #FF6600">one_for_one</span>, <span style="color: #993399">10</span>, <span style="color: #993399">10</span>}, [<span style="color: #009900">RanchSupSpec</span>, <span style="color: #009900">ListenerSpec</span>]}}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Remember, you can add as many listener child specs as needed, but only
-one <code>ranch_sup</code> spec!</p></div>
-<div class="paragraph"><p>It is recommended that your architecture makes sure that all listeners
-are restarted if <code>ranch_sup</code> fails. See the Ranch internals chapter for
-more details on how Ranch does it.</p></div>
-</div>
-</div>
+<pre><tt><b><font color="#000000">init</font></b>([]) <font color="#990000">-&gt;</font>
+ <font color="#009900">RanchSupSpec</font> <font color="#990000">=</font> {<font color="#FF6600">ranch_sup</font>, {<font color="#FF6600">ranch_sup</font>, <font color="#FF6600">start_link</font>, []},
+ <font color="#FF6600">permanent</font>, <font color="#993399">5000</font>, <font color="#FF6600">supervisor</font>, [<font color="#FF6600">ranch_sup</font>]},
+ <font color="#009900">ListenerSpec</font> <font color="#990000">=</font> <b><font color="#000000">ranch:child_spec</font></b>(<font color="#FF6600">echo</font>, <font color="#993399">100</font>,
+ <font color="#FF6600">ranch_tcp</font>, [{<font color="#FF6600">port</font>, <font color="#993399">5555</font>}],
+ <font color="#FF6600">echo_protocol</font>, []
+ ),
+ {<font color="#FF6600">ok</font>, {{<font color="#FF6600">one_for_one</font>, <font color="#993399">10</font>, <font color="#993399">10</font>}, [<font color="#009900">RanchSupSpec</font>, <font color="#009900">ListenerSpec</font>]}}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Remember, you can add as many listener child specs as needed, but only one <code>ranch_sup</code> spec!</p>
+<p>It is recommended that your architecture makes sure that all listeners are restarted if <code>ranch_sup</code> fails. See the Ranch internals chapter for more details on how Ranch does it.</p>
+
@@ -160,6 +142,8 @@ more details on how Ranch does it.</p></div>
+ <li><a href="/docs/en/ranch/1.5/guide">1.5</a></li>
+
<li><a href="/docs/en/ranch/1.4/guide">1.4</a></li>
<li><a href="/docs/en/ranch/1.3/guide">1.3</a></li>
diff --git a/docs/en/ranch/1.3/guide/index.html b/docs/en/ranch/1.3/guide/index.html
index 20ecfab5..02ac7fe7 100644
--- a/docs/en/ranch/1.3/guide/index.html
+++ b/docs/en/ranch/1.3/guide/index.html
@@ -62,48 +62,24 @@
<h1 class="lined-header"><span>Ranch User Guide</span></h1>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="introduction/">Introduction</a>
-</p>
+<ul><li><a href="introduction/">Introduction</a>
</li>
-<li>
-<p>
-<a href="listeners/">Listeners</a>
-</p>
+<li><a href="listeners/">Listeners</a>
</li>
-<li>
-<p>
-<a href="transports/">Transports</a>
-</p>
+<li><a href="transports/">Transports</a>
</li>
-<li>
-<p>
-<a href="protocols/">Protocols</a>
-</p>
+<li><a href="protocols/">Protocols</a>
</li>
-<li>
-<p>
-<a href="embedded/">Embedded mode</a>
-</p>
+<li><a href="embedded/">Embedded mode</a>
</li>
-<li>
-<p>
-<a href="parsers/">Writing parsers</a>
-</p>
+<li><a href="parsers/">Writing parsers</a>
</li>
-<li>
-<p>
-<a href="ssl_auth/">SSL client authentication</a>
-</p>
+<li><a href="ssl_auth/">SSL client authentication</a>
</li>
-<li>
-<p>
-<a href="internals/">Internals</a>
-</p>
+<li><a href="internals/">Internals</a>
</li>
-</ul></div>
+</ul>
+
@@ -138,6 +114,8 @@
+ <li><a href="/docs/en/ranch/1.5/guide">1.5</a></li>
+
<li><a href="/docs/en/ranch/1.4/guide">1.4</a></li>
<li><a href="/docs/en/ranch/1.3/guide">1.3</a></li>
diff --git a/docs/en/ranch/1.3/guide/internals/index.html b/docs/en/ranch/1.3/guide/internals/index.html
index 89ae1e28..ecb5f90d 100644
--- a/docs/en/ranch/1.3/guide/internals/index.html
+++ b/docs/en/ranch/1.3/guide/internals/index.html
@@ -62,93 +62,34 @@
<h1 class="lined-header"><span>Internals</span></h1>
-<div class="paragraph"><p>This chapter may not apply to embedded Ranch as embedding allows you
-to use an architecture specific to your application, which may or may
-not be compatible with the description of the Ranch application.</p></div>
-<div class="paragraph"><p>Note that for everything related to efficiency and performance,
-you should perform the benchmarks yourself to get the numbers that
-matter to you. Generic benchmarks found on the web may or may not
-be of use to you, you can never know until you benchmark your own
-system.</p></div>
-<div class="sect1">
+<p>This chapter may not apply to embedded Ranch as embedding allows you to use an architecture specific to your application, which may or may not be compatible with the description of the Ranch application.</p>
+<p>Note that for everything related to efficiency and performance, you should perform the benchmarks yourself to get the numbers that matter to you. Generic benchmarks found on the web may or may not be of use to you, you can never know until you benchmark your own system.</p>
<h2 id="_architecture">Architecture</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Ranch is an OTP application.</p></div>
-<div class="paragraph"><p>Like all OTP applications, Ranch has a top supervisor. It is responsible
-for supervising the <code>ranch_server</code> process and all the listeners that
-will be started.</p></div>
-<div class="paragraph"><p>The <code>ranch_server</code> gen_server is a central process keeping track of the
-listeners and their acceptors. It does so through the use of a public ets
-table called <code>ranch_server</code>. The table is owned by the top supervisor
-to improve fault tolerance. This way if the <code>ranch_server</code> gen_server
-fails, it doesn&#8217;t lose any information and the restarted process can
-continue as if nothing happened.</p></div>
-<div class="paragraph"><p>Ranch uses a custom supervisor for managing connections. This supervisor
-keeps track of the number of connections and handles connection limits
-directly. While it is heavily optimized to perform the task of creating
-connection processes for accepted connections, it is still following the
-OTP principles and the usual <code>sys</code> and <code>supervisor</code> calls will work on
-it as expected.</p></div>
-<div class="paragraph"><p>Listeners are grouped into the <code>ranch_listener_sup</code> supervisor and
-consist of three kinds of processes: the listener gen_server, the
-acceptor processes and the connection processes, both grouped under
-their own supervisor. All of these processes are registered to the
-<code>ranch_server</code> gen_server with varying amount of information.</p></div>
-<div class="paragraph"><p>All socket operations, including listening for connections, go through
-transport handlers. Accepted connections are given to the protocol handler.
-Transport handlers are simple callback modules for performing operations on
-sockets. Protocol handlers start a new process, which receives socket
-ownership, with no requirements on how the code should be written inside
-that new process.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Ranch is an OTP application.</p>
+<p>Like all OTP applications, Ranch has a top supervisor. It is responsible for supervising the <code>ranch_server</code> process and all the listeners that will be started.</p>
+<p>The <code>ranch_server</code> gen_server is a central process keeping track of the listeners and their acceptors. It does so through the use of a public ets table called <code>ranch_server</code>. The table is owned by the top supervisor to improve fault tolerance. This way if the <code>ranch_server</code> gen_server fails, it doesn&apos;t lose any information and the restarted process can continue as if nothing happened.</p>
+<p>Ranch uses a custom supervisor for managing connections. This supervisor keeps track of the number of connections and handles connection limits directly. While it is heavily optimized to perform the task of creating connection processes for accepted connections, it is still following the OTP principles and the usual <code>sys</code> and <code>supervisor</code> calls will work on it as expected.</p>
+<p>Listeners are grouped into the <code>ranch_listener_sup</code> supervisor and consist of three kinds of processes: the listener gen_server, the acceptor processes and the connection processes, both grouped under their own supervisor. All of these processes are registered to the <code>ranch_server</code> gen_server with varying amount of information.</p>
+<p>All socket operations, including listening for connections, go through transport handlers. Accepted connections are given to the protocol handler. Transport handlers are simple callback modules for performing operations on sockets. Protocol handlers start a new process, which receives socket ownership, with no requirements on how the code should be written inside that new process.</p>
<h2 id="_number_of_acceptors">Number of acceptors</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The second argument to <code>ranch:start_listener/6</code> is the number of
-processes that will be accepting connections. Care should be taken
-when choosing this number.</p></div>
-<div class="paragraph"><p>First of all, it should not be confused with the maximum number
-of connections. Acceptor processes are only used for accepting and
-have nothing else in common with connection processes. Therefore
-there is nothing to be gained from setting this number too high,
-in fact it can slow everything else down.</p></div>
-<div class="paragraph"><p>Second, this number should be high enough to allow Ranch to accept
-connections concurrently. But the number of cores available doesn&#8217;t
-seem to be the only factor for choosing this number, as we can
-observe faster accepts if we have more acceptors than cores. It
-might be entirely dependent on the protocol, however.</p></div>
-<div class="paragraph"><p>Our observations suggest that using 100 acceptors on modern hardware
-is a good solution, as it&#8217;s big enough to always have acceptors ready
-and it&#8217;s low enough that it doesn&#8217;t have a negative impact on the
-system&#8217;s performances.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The second argument to <code>ranch:start_listener/6</code> is the number of processes that will be accepting connections. Care should be taken when choosing this number.</p>
+<p>First of all, it should not be confused with the maximum number of connections. Acceptor processes are only used for accepting and have nothing else in common with connection processes. Therefore there is nothing to be gained from setting this number too high, in fact it can slow everything else down.</p>
+<p>Second, this number should be high enough to allow Ranch to accept connections concurrently. But the number of cores available doesn&apos;t seem to be the only factor for choosing this number, as we can observe faster accepts if we have more acceptors than cores. It might be entirely dependent on the protocol, however.</p>
+<p>Our observations suggest that using 100 acceptors on modern hardware is a good solution, as it&apos;s big enough to always have acceptors ready and it&apos;s low enough that it doesn&apos;t have a negative impact on the system&apos;s performances.</p>
<h2 id="_platform_specific_tcp_features">Platform-specific TCP features</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Some socket options are platform-specific and not supported by <code>inet</code>.
-They can be of interest because they generally are related to
-optimizations provided by the underlying OS. They can still be enabled
-thanks to the <code>raw</code> option, for which we will see an example.</p></div>
-<div class="paragraph"><p>One of these features is <code>TCP_DEFER_ACCEPT</code> on Linux. It is a simplified
-accept mechanism which will wait for application data to come in before
-handing out the connection to the Erlang process.</p></div>
-<div class="paragraph"><p>This is especially useful if you expect many connections to be mostly
-idle, perhaps part of a connection pool. They can be handled by the
-kernel directly until they send any real data, instead of allocating
-resources to idle connections.</p></div>
-<div class="paragraph"><p>To enable this mechanism, the following option can be used.</p></div>
-<div class="listingblock">
-<div class="title">Using raw transport options</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Some socket options are platform-specific and not supported by <code>inet</code>. They can be of interest because they generally are related to optimizations provided by the underlying OS. They can still be enabled thanks to the <code>raw</code> option, for which we will see an example.</p>
+<p>One of these features is <code>TCP_DEFER_ACCEPT</code> on Linux. It is a simplified accept mechanism which will wait for application data to come in before handing out the connection to the Erlang process.</p>
+<p>This is especially useful if you expect many connections to be mostly idle, perhaps part of a connection pool. They can be handled by the kernel directly until they send any real data, instead of allocating resources to idle connections.</p>
+<p>To enable this mechanism, the following option can be used.</p>
+<div class="listingblock"><div class="title">Using raw transport options</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: #FF6600">raw</span>, <span style="color: #993399">6</span>, <span style="color: #993399">9</span>, <span style="color: #990000">&lt;&lt;</span> <span style="font-weight: bold"><span style="color: #000000">30:32</span></span><span style="color: #990000">/</span><span style="color: #FF6600">native</span> <span style="color: #990000">&gt;&gt;</span>}</tt></pre></div></div>
-<div class="paragraph"><p>It means go on layer 6, turn on option 9 with the given integer parameter.</p></div>
-</div>
-</div>
+<pre><tt>{<font color="#FF6600">raw</font>, <font color="#993399">6</font>, <font color="#993399">9</font>, <font color="#990000">&lt;&lt;</font> <b><font color="#000000">30:32</font></b><font color="#990000">/</font><font color="#FF6600">native</font> <font color="#990000">&gt;&gt;</font>}</tt></pre>
+</div></div>
+<p>It means go on layer 6, turn on option 9 with the given integer parameter.</p>
+
@@ -201,6 +142,8 @@ http://www.gnu.org/software/src-highlite -->
+ <li><a href="/docs/en/ranch/1.5/guide">1.5</a></li>
+
<li><a href="/docs/en/ranch/1.4/guide">1.4</a></li>
<li><a href="/docs/en/ranch/1.3/guide">1.3</a></li>
diff --git a/docs/en/ranch/1.3/guide/introduction/index.html b/docs/en/ranch/1.3/guide/introduction/index.html
index f361ce69..e2868f41 100644
--- a/docs/en/ranch/1.3/guide/introduction/index.html
+++ b/docs/en/ranch/1.3/guide/introduction/index.html
@@ -62,34 +62,18 @@
<h1 class="lined-header"><span>Introduction</span></h1>
-<div class="paragraph"><p>Ranch is a socket acceptor pool for TCP protocols.</p></div>
-<div class="paragraph"><p>Ranch aims to provide everything you need to accept TCP connections
-with a small code base and low latency while being easy to use directly
-as an application or to embed into your own.</p></div>
-<div class="sect1">
+<p>Ranch is a socket acceptor pool for TCP protocols.</p>
+<p>Ranch aims to provide everything you need to accept TCP connections with a small code base and low latency while being easy to use directly as an application or to embed into your own.</p>
<h2 id="_prerequisites">Prerequisites</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>It is assumed the developer already knows Erlang and has some experience
-with socket programming and TCP protocols.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>It is assumed the developer already knows Erlang and has some experience with socket programming and TCP protocols.</p>
<h2 id="_supported_platforms">Supported platforms</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Ranch is tested and supported on Linux, FreeBSD, OSX and Windows.</p></div>
-<div class="paragraph"><p>Ranch is developed for Erlang/OTP R16B+.</p></div>
-<div class="paragraph"><p>There are known issues with the SSL application found in Erlang/OTP
-18.3.2 and 18.3.3. These versions are therefore not supported.</p></div>
-<div class="paragraph"><p>Ranch may be compiled on earlier Erlang versions with small source code
-modifications but there is no guarantee that it will work as expected.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Ranch is tested and supported on Linux, FreeBSD, OSX and Windows.</p>
+<p>Ranch is developed for Erlang/OTP R16B+.</p>
+<p>There are known issues with the SSL application found in Erlang/OTP 18.3.2 and 18.3.3. These versions are therefore not supported.</p>
+<p>Ranch may be compiled on earlier Erlang versions with small source code modifications but there is no guarantee that it will work as expected.</p>
<h2 id="_versioning">Versioning</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Ranch uses <a href="http://semver.org/">Semantic Versioning 2.0.0</a></p></div>
-</div>
-</div>
+<p>Ranch uses <a href="http://semver.org/">Semantic Versioning 2.0.0</a></p>
+
@@ -142,6 +126,8 @@ modifications but there is no guarantee that it will work as expected.</p></div>
+ <li><a href="/docs/en/ranch/1.5/guide">1.5</a></li>
+
<li><a href="/docs/en/ranch/1.4/guide">1.4</a></li>
<li><a href="/docs/en/ranch/1.3/guide">1.3</a></li>
diff --git a/docs/en/ranch/1.3/guide/listeners/index.html b/docs/en/ranch/1.3/guide/listeners/index.html
index 1195d3ca..b1c30867 100644
--- a/docs/en/ranch/1.3/guide/listeners/index.html
+++ b/docs/en/ranch/1.3/guide/listeners/index.html
@@ -62,346 +62,200 @@
<h1 class="lined-header"><span>Listeners</span></h1>
-<div class="paragraph"><p>A listener is a set of processes whose role is to listen on a port
-for new connections. It manages a pool of acceptor processes, each
-of them indefinitely accepting connections. When it does, it starts
-a new process executing the protocol handler code. All the socket
-programming is abstracted through the use of transport handlers.</p></div>
-<div class="paragraph"><p>The listener takes care of supervising all the acceptor and connection
-processes, allowing developers to focus on building their application.</p></div>
-<div class="sect1">
+<p>A listener is a set of processes whose role is to listen on a port for new connections. It manages a pool of acceptor processes, each of them indefinitely accepting connections. When it does, it starts a new process executing the protocol handler code. All the socket programming is abstracted through the use of transport handlers.</p>
+<p>The listener takes care of supervising all the acceptor and connection processes, allowing developers to focus on building their application.</p>
<h2 id="_starting_a_listener">Starting a listener</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Ranch does nothing by default. It is up to the application developer
-to request that Ranch listens for connections.</p></div>
-<div class="paragraph"><p>A listener can be started and stopped at will.</p></div>
-<div class="paragraph"><p>When starting a listener, a number of different settings are required:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-A name to identify it locally and be able to interact with it.
-</p>
+<p>Ranch does nothing by default. It is up to the application developer to request that Ranch listens for connections.</p>
+<p>A listener can be started and stopped at will.</p>
+<p>When starting a listener, a number of different settings are required:</p>
+<ul><li>A name to identify it locally and be able to interact with it.
</li>
-<li>
-<p>
-The number of acceptors in the pool.
-</p>
+<li>The number of acceptors in the pool.
</li>
-<li>
-<p>
-A transport handler and its associated options.
-</p>
+<li>A transport handler and its associated options.
</li>
-<li>
-<p>
-A protocol handler and its associated options.
-</p>
+<li>A protocol handler and its associated options.
</li>
-</ul></div>
-<div class="paragraph"><p>Ranch includes both TCP and SSL transport handlers, respectively
-<code>ranch_tcp</code> and <code>ranch_ssl</code>.</p></div>
-<div class="paragraph"><p>A listener can be started by calling the <code>ranch:start_listener/6</code>
-function. Before doing so however, you must ensure that the <code>ranch</code>
-application is started.</p></div>
-<div class="listingblock">
-<div class="title">Starting the Ranch application</div>
-<div class="content"><!-- Generator: GNU source-highlight
+</ul>
+<p>Ranch includes both TCP and SSL transport handlers, respectively <code>ranch_tcp</code> and <code>ranch_ssl</code>.</p>
+<p>A listener can be started by calling the <code>ranch:start_listener/6</code> function. Before doing so however, you must ensure that the <code>ranch</code> application is started.</p>
+<div class="listingblock"><div class="title">Starting the Ranch application</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: #0000FF">ok</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">application:start</span></span>(<span style="color: #FF6600">ranch</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>You are then ready to start a listener. Let&#8217;s call it <code>tcp_echo</code>. It will
-have a pool of 100 acceptors, use a TCP transport and forward connections
-to the <code>echo_protocol</code> handler.</p></div>
-<div class="listingblock">
-<div class="title">Starting a listener for TCP connections on port 5555</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#0000FF">ok</font> <font color="#990000">=</font> <b><font color="#000000">application:start</font></b>(<font color="#FF6600">ranch</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>You are then ready to start a listener. Let&apos;s call it <code>tcp_echo</code>. It will have a pool of 100 acceptors, use a TCP transport and forward connections to the <code>echo_protocol</code> handler.</p>
+<div class="listingblock"><div class="title">Starting a listener for TCP connections on port 5555</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: #FF6600">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">ranch:start_listener</span></span>(<span style="color: #FF6600">tcp_echo</span>, <span style="color: #993399">100</span>,
- <span style="color: #FF6600">ranch_tcp</span>, [{<span style="color: #FF6600">port</span>, <span style="color: #993399">5555</span>}],
- <span style="color: #FF6600">echo_protocol</span>, []
-)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>You can try this out by compiling and running the <code>tcp_echo</code> example in the
-examples directory. To do so, open a shell in the <em>examples/tcp_echo/</em>
-directory and run the following command:</p></div>
-<div class="listingblock">
-<div class="title">Building and starting a Ranch example</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">ranch:start_listener</font></b>(<font color="#FF6600">tcp_echo</font>, <font color="#993399">100</font>,
+ <font color="#FF6600">ranch_tcp</font>, [{<font color="#FF6600">port</font>, <font color="#993399">5555</font>}],
+ <font color="#FF6600">echo_protocol</font>, []
+)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>You can try this out by compiling and running the <code>tcp_echo</code> example in the examples directory. To do so, open a shell in the <em>examples/tcp_echo/</em> directory and run the following command:</p>
+<div class="listingblock"><div class="title">Building and starting a Ranch example</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>$ make run</tt></pre></div></div>
-<div class="paragraph"><p>You can then connect to it using telnet and see the echo server reply
-everything you send to it. Then when you&#8217;re done testing, you can use
-the <code>Ctrl+]</code> key to escape to the telnet command line and type
-<code>quit</code> to exit.</p></div>
-<div class="listingblock">
-<div class="title">Connecting to the example listener with telnet</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>$ make run</tt></pre>
+</div></div>
+<p>You can then connect to it using telnet and see the echo server reply everything you send to it. Then when you&apos;re done testing, you can use the <code>Ctrl+]</code> key to escape to the telnet command line and type <code>quit</code> to exit.</p>
+<div class="listingblock"><div class="title">Connecting to the example listener with telnet</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>$ telnet localhost <span style="color: #993399">5555</span>
-Trying <span style="color: #993399">127.0</span><span style="color: #990000">.</span><span style="color: #993399">0.1</span><span style="color: #990000">...</span>
-Connected to localhost<span style="color: #990000">.</span>
-Escape character is <span style="color: #FF0000">'^]'</span><span style="color: #990000">.</span>
-Hello<span style="color: #990000">!</span>
-Hello<span style="color: #990000">!</span>
-It works<span style="color: #990000">!</span>
-It works<span style="color: #990000">!</span>
-<span style="color: #990000">^]</span>
-
-telnet<span style="color: #990000">&gt;</span> quit
-Connection closed<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>$ telnet localhost <font color="#993399">5555</font>
+Trying <font color="#993399">127.0</font><font color="#990000">.</font><font color="#993399">0.1</font><font color="#990000">...</font>
+Connected to localhost<font color="#990000">.</font>
+Escape character is <font color="#FF0000">'^]'</font><font color="#990000">.</font>
+Hello<font color="#990000">!</font>
+Hello<font color="#990000">!</font>
+It works<font color="#990000">!</font>
+It works<font color="#990000">!</font>
+<font color="#990000">^]</font>
+
+telnet<font color="#990000">&gt;</font> quit
+Connection closed<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_stopping_a_listener">Stopping a listener</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>All you need to stop a Ranch listener is to call the
-<code>ranch:stop_listener/1</code> function with the listener&#8217;s name
-as argument. In the previous section we started the listener
-named <code>tcp_echo</code>. We can now stop it.</p></div>
-<div class="listingblock">
-<div class="title">Stopping a listener</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<p>All you need to stop a Ranch listener is to call the <code>ranch:stop_listener/1</code> function with the listener&apos;s name as argument. In the previous section we started the listener named <code>tcp_echo</code>. We can now stop it.</p>
+<div class="listingblock"><div class="title">Stopping a listener</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">ranch:stop_listener</span></span>(<span style="color: #FF6600">tcp_echo</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">ranch:stop_listener</font></b>(<font color="#FF6600">tcp_echo</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_default_transport_options">Default transport options</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>By default the socket will be set to return <code>binary</code> data, with the
-options <code>{active, false}</code>, <code>{packet, raw}</code>, <code>{reuseaddr, true}</code> set.
-These values can&#8217;t be overriden when starting the listener, but
-they can be overriden using <code>Transport:setopts/2</code> in the protocol.</p></div>
-<div class="paragraph"><p>It will also set <code>{backlog, 1024}</code> and <code>{nodelay, true}</code>, which
-can be overriden at listener startup.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>By default the socket will be set to return <code>binary</code> data, with the options <code>{active, false}</code>, <code>{packet, raw}</code>, <code>{reuseaddr, true}</code> set. These values can&apos;t be overriden when starting the listener, but they can be overriden using <code>Transport:setopts/2</code> in the protocol.</p>
+<p>It will also set <code>{backlog, 1024}</code> and <code>{nodelay, true}</code>, which can be overriden at listener startup.</p>
<h2 id="_listening_on_a_random_port">Listening on a random port</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>You do not have to specify a specific port to listen on. If you give
-the port number 0, or if you omit the port number entirely, Ranch will
-start listening on a random port.</p></div>
-<div class="paragraph"><p>You can retrieve this port number by calling <code>ranch:get_port/1</code>. The
-argument is the name of the listener you gave in <code>ranch:start_listener/6</code>.</p></div>
-<div class="listingblock">
-<div class="title">Starting a listener for TCP connections on a random port</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<p>You do not have to specify a specific port to listen on. If you give the port number 0, or if you omit the port number entirely, Ranch will start listening on a random port.</p>
+<p>You can retrieve this port number by calling <code>ranch:get_port/1</code>. The argument is the name of the listener you gave in <code>ranch:start_listener/6</code>.</p>
+<div class="listingblock"><div class="title">Starting a listener for TCP connections on a random port</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: #FF6600">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">ranch:start_listener</span></span>(<span style="color: #FF6600">tcp_echo</span>, <span style="color: #993399">100</span>,
- <span style="color: #FF6600">ranch_tcp</span>, [{<span style="color: #FF6600">port</span>, <span style="color: #993399">0</span>}],
- <span style="color: #FF6600">echo_protocol</span>, []
-)<span style="color: #990000">.</span>
-<span style="color: #009900">Port</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">ranch:get_port</span></span>(<span style="color: #FF6600">tcp_echo</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">ranch:start_listener</font></b>(<font color="#FF6600">tcp_echo</font>, <font color="#993399">100</font>,
+ <font color="#FF6600">ranch_tcp</font>, [{<font color="#FF6600">port</font>, <font color="#993399">0</font>}],
+ <font color="#FF6600">echo_protocol</font>, []
+)<font color="#990000">.</font>
+<font color="#009900">Port</font> <font color="#990000">=</font> <b><font color="#000000">ranch:get_port</font></b>(<font color="#FF6600">tcp_echo</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_listening_on_privileged_ports">Listening on privileged ports</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Some systems limit access to ports below 1024 for security reasons.
-This can easily be identified by an <code>{error, eacces}</code> error when trying
-to open a listening socket on such a port.</p></div>
-<div class="paragraph"><p>The methods for listening on privileged ports vary between systems,
-please refer to your system&#8217;s documentation for more information.</p></div>
-<div class="paragraph"><p>We recommend the use of port rewriting for systems with a single server,
-and load balancing for systems with multiple servers. Documenting these
-solutions is however out of the scope of this guide.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Some systems limit access to ports below 1024 for security reasons. This can easily be identified by an <code>{error, eacces}</code> error when trying to open a listening socket on such a port.</p>
+<p>The methods for listening on privileged ports vary between systems, please refer to your system&apos;s documentation for more information.</p>
+<p>We recommend the use of port rewriting for systems with a single server, and load balancing for systems with multiple servers. Documenting these solutions is however out of the scope of this guide.</p>
<h2 id="_accepting_connections_on_an_existing_socket">Accepting connections on an existing socket</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>If you want to accept connections on an existing socket, you can use the
-<code>socket</code> transport option, which should just be the relevant data returned
-from the connect function for the transport or the underlying socket library
-(<code>gen_tcp:connect</code>, <code>ssl:connect</code>). The accept function will then be
-called on the passed in socket. You should connect the socket in
-<code>{active, false}</code> mode, as well.</p></div>
-<div class="paragraph"><p>Note, however, that because of a bug in SSL, you cannot change ownership of an
-SSL listen socket prior to R16. Ranch will catch the error thrown, but the
-owner of the SSL socket will remain as whatever process created the socket.
-However, this will not affect accept behaviour unless the owner process dies,
-in which case the socket is closed. Therefore, to use this feature with SSL
-with an erlang release prior to R16, ensure that the SSL socket is opened in a
-persistant process.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>If you want to accept connections on an existing socket, you can use the <code>socket</code> transport option, which should just be the relevant data returned from the connect function for the transport or the underlying socket library (<code>gen_tcp:connect</code>, <code>ssl:connect</code>). The accept function will then be called on the passed in socket. You should connect the socket in <code>{active, false}</code> mode, as well.</p>
+<p>Note, however, that because of a bug in SSL, you cannot change ownership of an SSL listen socket prior to R16. Ranch will catch the error thrown, but the owner of the SSL socket will remain as whatever process created the socket. However, this will not affect accept behaviour unless the owner process dies, in which case the socket is closed. Therefore, to use this feature with SSL with an erlang release prior to R16, ensure that the SSL socket is opened in a persistant process.</p>
<h2 id="_limiting_the_number_of_concurrent_connections">Limiting the number of concurrent connections</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <code>max_connections</code> transport option allows you to limit the number
-of concurrent connections. It defaults to 1024. Its purpose is to
-prevent your system from being overloaded and ensuring all the
-connections are handled optimally.</p></div>
-<div class="listingblock">
-<div class="title">Customizing the maximum number of concurrent connections</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The <code>max_connections</code> transport option allows you to limit the number of concurrent connections. It defaults to 1024. Its purpose is to prevent your system from being overloaded and ensuring all the connections are handled optimally.</p>
+<div class="listingblock"><div class="title">Customizing the maximum number of concurrent connections</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: #FF6600">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">ranch:start_listener</span></span>(<span style="color: #FF6600">tcp_echo</span>, <span style="color: #993399">100</span>,
- <span style="color: #FF6600">ranch_tcp</span>, [{<span style="color: #FF6600">port</span>, <span style="color: #993399">5555</span>}, {<span style="color: #FF6600">max_connections</span>, <span style="color: #993399">100</span>}],
- <span style="color: #FF6600">echo_protocol</span>, []
-)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>You can disable this limit by setting its value to the atom <code>infinity</code>.</p></div>
-<div class="listingblock">
-<div class="title">Disabling the limit for the number of connections</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">ranch:start_listener</font></b>(<font color="#FF6600">tcp_echo</font>, <font color="#993399">100</font>,
+ <font color="#FF6600">ranch_tcp</font>, [{<font color="#FF6600">port</font>, <font color="#993399">5555</font>}, {<font color="#FF6600">max_connections</font>, <font color="#993399">100</font>}],
+ <font color="#FF6600">echo_protocol</font>, []
+)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>You can disable this limit by setting its value to the atom <code>infinity</code>.</p>
+<div class="listingblock"><div class="title">Disabling the limit for the number of connections</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: #FF6600">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">ranch:start_listener</span></span>(<span style="color: #FF6600">tcp_echo</span>, <span style="color: #993399">100</span>,
- <span style="color: #FF6600">ranch_tcp</span>, [{<span style="color: #FF6600">port</span>, <span style="color: #993399">5555</span>}, {<span style="color: #FF6600">max_connections</span>, <span style="color: #FF6600">infinity</span>}],
- <span style="color: #FF6600">echo_protocol</span>, []
-)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>The maximum number of connections is a soft limit. In practice, it
-can reach <code>max_connections</code> + the number of acceptors.</p></div>
-<div class="paragraph"><p>When the maximum number of connections is reached, Ranch will stop
-accepting connections. This will not result in further connections
-being rejected, as the kernel option allows queueing incoming
-connections. The size of this queue is determined by the <code>backlog</code>
-option and defaults to 1024. Ranch does not know about the number
-of connections that are in the backlog.</p></div>
-<div class="paragraph"><p>You may not always want connections to be counted when checking for
-<code>max_connections</code>. For example you might have a protocol where both
-short-lived and long-lived connections are possible. If the long-lived
-connections are mostly waiting for messages, then they don&#8217;t consume
-much resources and can safely be removed from the count.</p></div>
-<div class="paragraph"><p>To remove the connection from the count, you must call the
-<code>ranch:remove_connection/1</code> from within the connection process,
-with the name of the listener as the only argument.</p></div>
-<div class="listingblock">
-<div class="title">Removing a connection from the count of connections</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">ranch:start_listener</font></b>(<font color="#FF6600">tcp_echo</font>, <font color="#993399">100</font>,
+ <font color="#FF6600">ranch_tcp</font>, [{<font color="#FF6600">port</font>, <font color="#993399">5555</font>}, {<font color="#FF6600">max_connections</font>, <font color="#FF6600">infinity</font>}],
+ <font color="#FF6600">echo_protocol</font>, []
+)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>The maximum number of connections is a soft limit. In practice, it can reach <code>max_connections</code><br/> the number of acceptors.</p>
+<p>When the maximum number of connections is reached, Ranch will stop accepting connections. This will not result in further connections being rejected, as the kernel option allows queueing incoming connections. The size of this queue is determined by the <code>backlog</code> option and defaults to 1024. Ranch does not know about the number of connections that are in the backlog.</p>
+<p>You may not always want connections to be counted when checking for <code>max_connections</code>. For example you might have a protocol where both short-lived and long-lived connections are possible. If the long-lived connections are mostly waiting for messages, then they don&apos;t consume much resources and can safely be removed from the count.</p>
+<p>To remove the connection from the count, you must call the <code>ranch:remove_connection/1</code> from within the connection process, with the name of the listener as the only argument.</p>
+<div class="listingblock"><div class="title">Removing a connection from the count of connections</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">ranch:remove_connection</span></span>(<span style="color: #009900">Ref</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>As seen in the chapter covering protocols, this pid is received as the
-first argument of the protocol&#8217;s <code>start_link/4</code> callback.</p></div>
-<div class="paragraph"><p>You can modify the <code>max_connections</code> value on a running listener by
-using the <code>ranch:set_max_connections/2</code> function, with the name of the
-listener as first argument and the new value as the second.</p></div>
-<div class="listingblock">
-<div class="title">Upgrading the maximum number of connections</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">ranch:remove_connection</font></b>(<font color="#009900">Ref</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>As seen in the chapter covering protocols, this pid is received as the first argument of the protocol&apos;s <code>start_link/4</code> callback.</p>
+<p>You can modify the <code>max_connections</code> value on a running listener by using the <code>ranch:set_max_connections/2</code> function, with the name of the listener as first argument and the new value as the second.</p>
+<div class="listingblock"><div class="title">Upgrading the maximum number of connections</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">ranch:set_max_connections</span></span>(<span style="color: #FF6600">tcp_echo</span>, <span style="color: #009900">MaxConns</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>The change will occur immediately.</p></div>
-</div>
-</div>
-<div class="sect1">
-<h2 id="_when_running_out_of_file_descriptors">When running out of file descriptors</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Operating systems have limits on the number of sockets
-which can be opened by applications. When this maximum is
-reached the listener can no longer accept new connections. The
-accept rate of the listener will be automatically reduced, and a
-warning message will be logged.</p></div>
-<div class="listingblock">
-<div class="content">
-<pre><code>=ERROR REPORT==== 13-Jan-2016::12:24:38 ===
-Ranch acceptor reducing accept rate: out of file descriptors</code></pre>
+<pre><tt><b><font color="#000000">ranch:set_max_connections</font></b>(<font color="#FF6600">tcp_echo</font>, <font color="#009900">MaxConns</font>)<font color="#990000">.</font></tt></pre>
</div></div>
-<div class="paragraph"><p>If you notice messages like this you should increase the number
-of file-descriptors which can be opened by your application. How
-this should be done is operating-system dependent. Please consult
-the documentation of your operating system.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The change will occur immediately.</p>
+<h2 id="_when_running_out_of_file_descriptors">When running out of file descriptors</h2>
+<p>Operating systems have limits on the number of sockets which can be opened by applications. When this maximum is reached the listener can no longer accept new connections. The accept rate of the listener will be automatically reduced, and a warning message will be logged.</p>
+<div class="listingblock"><div class="content"><pre>=ERROR REPORT==== 13-Jan-2016::12:24:38 ===
+Ranch acceptor reducing accept rate: out of file descriptors</pre></div></div>
+<p>If you notice messages like this you should increase the number of file-descriptors which can be opened by your application. How this should be done is operating-system dependent. Please consult the documentation of your operating system.</p>
<h2 id="_using_a_supervisor_for_connection_processes">Using a supervisor for connection processes</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Ranch allows you to define the type of process that will be used
-for the connection processes. By default it expects a <code>worker</code>.
-When the <code>connection_type</code> configuration value is set to <code>supervisor</code>,
-Ranch will consider that the connection process it manages is a
-supervisor and will reflect that in its supervision tree.</p></div>
-<div class="paragraph"><p>Connection processes of type <code>supervisor</code> can either handle the
-socket directly or through one of their children. In the latter
-case the start function for the connection process must return
-two pids: the pid of the supervisor you created (that will be
-supervised) and the pid of the protocol handling process (that
-will receive the socket).</p></div>
-<div class="paragraph"><p>Instead of returning <code>{ok, ConnPid}</code>, simply return
-<code>{ok, SupPid, ConnPid}</code>.</p></div>
-<div class="paragraph"><p>It is very important that the connection process be created
-under the supervisor process so that everything works as intended.
-If not, you will most likely experience issues when the supervised
-process is stopped.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Ranch allows you to define the type of process that will be used for the connection processes. By default it expects a <code>worker</code>. When the <code>connection_type</code> configuration value is set to <code>supervisor</code>, Ranch will consider that the connection process it manages is a supervisor and will reflect that in its supervision tree.</p>
+<p>Connection processes of type <code>supervisor</code> can either handle the socket directly or through one of their children. In the latter case the start function for the connection process must return two pids: the pid of the supervisor you created (that will be supervised) and the pid of the protocol handling process (that will receive the socket).</p>
+<p>Instead of returning <code>{ok, ConnPid}</code>, simply return <code>{ok, SupPid, ConnPid}</code>.</p>
+<p>It is very important that the connection process be created under the supervisor process so that everything works as intended. If not, you will most likely experience issues when the supervised process is stopped.</p>
<h2 id="_upgrading">Upgrading</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Ranch allows you to upgrade the protocol options. This takes effect
-immediately and for all subsequent connections.</p></div>
-<div class="paragraph"><p>To upgrade the protocol options, call <code>ranch:set_protocol_options/2</code>
-with the name of the listener as first argument and the new options
-as the second.</p></div>
-<div class="listingblock">
-<div class="title">Upgrading the protocol options</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Ranch allows you to upgrade the protocol options. This takes effect immediately and for all subsequent connections.</p>
+<p>To upgrade the protocol options, call <code>ranch:set_protocol_options/2</code> with the name of the listener as first argument and the new options as the second.</p>
+<div class="listingblock"><div class="title">Upgrading the protocol options</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">ranch:set_protocol_options</span></span>(<span style="color: #FF6600">tcp_echo</span>, <span style="color: #009900">NewOpts</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>All future connections will use the new options.</p></div>
-<div class="paragraph"><p>You can also retrieve the current options similarly by
-calling <code>ranch:get_protocol_options/1</code>.</p></div>
-<div class="listingblock">
-<div class="title">Retrieving the current protocol options</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">ranch:set_protocol_options</font></b>(<font color="#FF6600">tcp_echo</font>, <font color="#009900">NewOpts</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>All future connections will use the new options.</p>
+<p>You can also retrieve the current options similarly by calling <code>ranch:get_protocol_options/1</code>.</p>
+<div class="listingblock"><div class="title">Retrieving the current protocol options</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">Opts</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">ranch:get_protocol_options</span></span>(<span style="color: #FF6600">tcp_echo</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Opts</font> <font color="#990000">=</font> <b><font color="#000000">ranch:get_protocol_options</font></b>(<font color="#FF6600">tcp_echo</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_obtain_information_about_listeners">Obtain information about listeners</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Ranch provides two functions for retrieving information about the
-listeners, for reporting and diagnostic purposes.</p></div>
-<div class="paragraph"><p>The <code>ranch:info/0</code> function will return detailed information
-about all listeners.</p></div>
-<div class="listingblock">
-<div class="title">Retrieving detailed information</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Ranch provides two functions for retrieving information about the listeners, for reporting and diagnostic purposes.</p>
+<p>The <code>ranch:info/0</code> function will return detailed information about all listeners.</p>
+<div class="listingblock"><div class="title">Retrieving detailed information</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">ranch:info</span></span>()<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>The <code>ranch:procs/2</code> function will return all acceptor or listener
-processes for a given listener.</p></div>
-<div class="listingblock">
-<div class="title">Get all acceptor processes</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">ranch:info</font></b>()<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>The <code>ranch:procs/2</code> function will return all acceptor or listener processes for a given listener.</p>
+<div class="listingblock"><div class="title">Get all acceptor processes</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">ranch:procs</span></span>(<span style="color: #FF6600">tcp_echo</span>, <span style="color: #FF6600">acceptors</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Get all connection processes</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">ranch:procs</font></b>(<font color="#FF6600">tcp_echo</font>, <font color="#FF6600">acceptors</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Get all connection processes</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">ranch:procs</span></span>(<span style="color: #FF6600">tcp_echo</span>, <span style="color: #FF6600">connections</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
+<pre><tt><b><font color="#000000">ranch:procs</font></b>(<font color="#FF6600">tcp_echo</font>, <font color="#FF6600">connections</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+
@@ -458,6 +312,8 @@ http://www.gnu.org/software/src-highlite -->
+ <li><a href="/docs/en/ranch/1.5/guide">1.5</a></li>
+
<li><a href="/docs/en/ranch/1.4/guide">1.4</a></li>
<li><a href="/docs/en/ranch/1.3/guide">1.3</a></li>
diff --git a/docs/en/ranch/1.3/guide/parsers/index.html b/docs/en/ranch/1.3/guide/parsers/index.html
index fb089bde..eb1a7f85 100644
--- a/docs/en/ranch/1.3/guide/parsers/index.html
+++ b/docs/en/ranch/1.3/guide/parsers/index.html
@@ -62,109 +62,69 @@
<h1 class="lined-header"><span>Writing parsers</span></h1>
-<div class="paragraph"><p>There are three kinds of protocols:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-Text protocols
-</p>
+<p>There are three kinds of protocols:</p>
+<ul><li>Text protocols
</li>
-<li>
-<p>
-Schema-less binary protocols
-</p>
+<li>Schema-less binary protocols
</li>
-<li>
-<p>
-Schema-based binary protocols
-</p>
+<li>Schema-based binary protocols
</li>
-</ul></div>
-<div class="paragraph"><p>This chapter introduces the first two kinds. It will not cover
-more advanced topics such as continuations or parser generators.</p></div>
-<div class="paragraph"><p>This chapter isn&#8217;t specifically about Ranch, we assume here that
-you know how to read data from the socket. The data you read and
-the data that hasn&#8217;t been parsed is saved in a buffer. Every
-time you read from the socket, the data read is appended to the
-buffer. What happens next depends on the kind of protocol. We
-will only cover the first two.</p></div>
-<div class="sect1">
+</ul>
+<p>This chapter introduces the first two kinds. It will not cover more advanced topics such as continuations or parser generators.</p>
+<p>This chapter isn&apos;t specifically about Ranch, we assume here that you know how to read data from the socket. The data you read and the data that hasn&apos;t been parsed is saved in a buffer. Every time you read from the socket, the data read is appended to the buffer. What happens next depends on the kind of protocol. We will only cover the first two.</p>
<h2 id="_parsing_text">Parsing text</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Text protocols are generally line based. This means that we can&#8217;t
-do anything with them until we receive the full line.</p></div>
-<div class="paragraph"><p>A simple way to get a full line is to use <code>binary:split/{2,3}</code>.</p></div>
-<div class="listingblock">
-<div class="title">Using binary:split/2 to get a line of input</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Text protocols are generally line based. This means that we can&apos;t do anything with them until we receive the full line.</p>
+<p>A simple way to get a full line is to use <code>binary:split/{2,3}</code>.</p>
+<div class="listingblock"><div class="title">Using binary:split/2 to get a line of input</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: #0000FF">case</span></span> <span style="font-weight: bold"><span style="color: #000000">binary:split</span></span>(<span style="color: #009900">Buffer</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"\n"</span><span style="color: #990000">&gt;&gt;</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
- [<span style="color: #990000">_</span>] <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #000000">get_more_data</span></span>(<span style="color: #009900">Buffer</span>);
- [<span style="color: #009900">Line</span>, <span style="color: #009900">Rest</span>] <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #000000">handle_line</span></span>(<span style="color: #009900">Line</span>, <span style="color: #009900">Rest</span>)
-<span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>In the above example, we can have two results. Either there was
-a line break in the buffer and we get it split into two parts,
-the line and the rest of the buffer; or there was no line break
-in the buffer and we need to get more data from the socket.</p></div>
-<div class="paragraph"><p>Next, we need to parse the line. The simplest way is to again
-split, here on space. The difference is that we want to split
-on all spaces character, as we want to tokenize the whole string.</p></div>
-<div class="listingblock">
-<div class="title">Using binary:split/3 to split text</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#0000FF">case</font></b> <b><font color="#000000">binary:split</font></b>(<font color="#009900">Buffer</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"\n"</font><font color="#990000">&gt;&gt;</font>) <b><font color="#0000FF">of</font></b>
+ [<font color="#990000">_</font>] <font color="#990000">-&gt;</font>
+ <b><font color="#000000">get_more_data</font></b>(<font color="#009900">Buffer</font>);
+ [<font color="#009900">Line</font>, <font color="#009900">Rest</font>] <font color="#990000">-&gt;</font>
+ <b><font color="#000000">handle_line</font></b>(<font color="#009900">Line</font>, <font color="#009900">Rest</font>)
+<b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>In the above example, we can have two results. Either there was a line break in the buffer and we get it split into two parts, the line and the rest of the buffer; or there was no line break in the buffer and we need to get more data from the socket.</p>
+<p>Next, we need to parse the line. The simplest way is to again split, here on space. The difference is that we want to split on all spaces character, as we want to tokenize the whole string.</p>
+<div class="listingblock"><div class="title">Using binary:split/3 to split text</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: #0000FF">case</span></span> <span style="font-weight: bold"><span style="color: #000000">binary:split</span></span>(<span style="color: #009900">Line</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">" "</span><span style="color: #990000">&gt;&gt;</span>, [<span style="color: #FF6600">global</span>]) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
- [<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"HELLO"</span><span style="color: #990000">&gt;&gt;</span>] <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #000000">be_polite</span></span>();
- [<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"AUTH"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">User</span>, <span style="color: #009900">Password</span>] <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #000000">authenticate_user</span></span>(<span style="color: #009900">User</span>, <span style="color: #009900">Password</span>);
- [<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"QUIT"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Reason</span>] <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #000000">quit</span></span>(<span style="color: #009900">Reason</span>)
- <span style="font-style: italic"><span style="color: #9A1900">%% ...</span></span>
-<span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Pretty simple, right? Match on the command name, get the rest
-of the tokens in variables and call the respective functions.</p></div>
-<div class="paragraph"><p>After doing this, you will want to check if there is another
-line in the buffer, and handle it immediately if any.
-Otherwise wait for more data.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#0000FF">case</font></b> <b><font color="#000000">binary:split</font></b>(<font color="#009900">Line</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">" "</font><font color="#990000">&gt;&gt;</font>, [<font color="#FF6600">global</font>]) <b><font color="#0000FF">of</font></b>
+ [<font color="#990000">&lt;&lt;</font><font color="#FF0000">"HELLO"</font><font color="#990000">&gt;&gt;</font>] <font color="#990000">-&gt;</font>
+ <b><font color="#000000">be_polite</font></b>();
+ [<font color="#990000">&lt;&lt;</font><font color="#FF0000">"AUTH"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">User</font>, <font color="#009900">Password</font>] <font color="#990000">-&gt;</font>
+ <b><font color="#000000">authenticate_user</font></b>(<font color="#009900">User</font>, <font color="#009900">Password</font>);
+ [<font color="#990000">&lt;&lt;</font><font color="#FF0000">"QUIT"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Reason</font>] <font color="#990000">-&gt;</font>
+ <b><font color="#000000">quit</font></b>(<font color="#009900">Reason</font>)
+ <i><font color="#9A1900">%% ...</font></i>
+<b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Pretty simple, right? Match on the command name, get the rest of the tokens in variables and call the respective functions.</p>
+<p>After doing this, you will want to check if there is another line in the buffer, and handle it immediately if any. Otherwise wait for more data.</p>
<h2 id="_parsing_binary">Parsing binary</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Binary protocols can be more varied, although most of them are
-pretty similar. The first four bytes of a frame tend to be
-the size of the frame, which is followed by a certain number
-of bytes for the type of frame and then various parameters.</p></div>
-<div class="paragraph"><p>Sometimes the size of the frame includes the first four bytes,
-sometimes not. Other times this size is encoded over two bytes.
-And even other times little-endian is used instead of big-endian.</p></div>
-<div class="paragraph"><p>The general idea stays the same though.</p></div>
-<div class="listingblock">
-<div class="title">Using binary pattern matching to split frames</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Binary protocols can be more varied, although most of them are pretty similar. The first four bytes of a frame tend to be the size of the frame, which is followed by a certain number of bytes for the type of frame and then various parameters.</p>
+<p>Sometimes the size of the frame includes the first four bytes, sometimes not. Other times this size is encoded over two bytes. And even other times little-endian is used instead of big-endian.</p>
+<p>The general idea stays the same though.</p>
+<div class="listingblock"><div class="title">Using binary pattern matching to split frames</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: #009900">Size</span><span style="color: #990000">:</span><span style="color: #993399">32</span>, <span style="color: #990000">_/</span><span style="color: #FF6600">bits</span> <span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=</span> <span style="color: #009900">Buffer</span>,
-<span style="font-weight: bold"><span style="color: #0000FF">case</span></span> <span style="color: #009900">Buffer</span> <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
- <span style="color: #990000">&lt;&lt;</span> <span style="color: #009900">Frame</span><span style="color: #990000">:</span><span style="color: #009900">Size</span><span style="color: #990000">/</span><span style="font-weight: bold"><span style="color: #000080">binary</span></span>, <span style="color: #009900">Rest</span><span style="color: #990000">/</span><span style="color: #FF6600">bits</span> <span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #000000">handle_frame</span></span>(<span style="color: #009900">Frame</span>, <span style="color: #009900">Rest</span>);
- <span style="color: #990000">_</span> <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #000000">get_more_data</span></span>(<span style="color: #009900">Buffer</span>)
-<span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>You will then need to parse this frame using binary pattern
-matching, and handle it. Then you will want to check if there
-is another frame fully received in the buffer, and handle it
-immediately if any. Otherwise wait for more data.</p></div>
-</div>
-</div>
+<pre><tt><font color="#990000">&lt;&lt;</font> <font color="#009900">Size</font><font color="#990000">:</font><font color="#993399">32</font>, <font color="#990000">_/</font><font color="#FF6600">bits</font> <font color="#990000">&gt;&gt;</font> <font color="#990000">=</font> <font color="#009900">Buffer</font>,
+<b><font color="#0000FF">case</font></b> <font color="#009900">Buffer</font> <b><font color="#0000FF">of</font></b>
+ <font color="#990000">&lt;&lt;</font> <font color="#009900">Frame</font><font color="#990000">:</font><font color="#009900">Size</font><font color="#990000">/</font><b><font color="#000080">binary</font></b>, <font color="#009900">Rest</font><font color="#990000">/</font><font color="#FF6600">bits</font> <font color="#990000">&gt;&gt;</font> <font color="#990000">-&gt;</font>
+ <b><font color="#000000">handle_frame</font></b>(<font color="#009900">Frame</font>, <font color="#009900">Rest</font>);
+ <font color="#990000">_</font> <font color="#990000">-&gt;</font>
+ <b><font color="#000000">get_more_data</font></b>(<font color="#009900">Buffer</font>)
+<b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>You will then need to parse this frame using binary pattern matching, and handle it. Then you will want to check if there is another frame fully received in the buffer, and handle it immediately if any. Otherwise wait for more data.</p>
+
@@ -221,6 +181,8 @@ immediately if any. Otherwise wait for more data.</p></div>
+ <li><a href="/docs/en/ranch/1.5/guide">1.5</a></li>
+
<li><a href="/docs/en/ranch/1.4/guide">1.4</a></li>
<li><a href="/docs/en/ranch/1.3/guide">1.3</a></li>
diff --git a/docs/en/ranch/1.3/guide/protocols/index.html b/docs/en/ranch/1.3/guide/protocols/index.html
index ad099507..b14a22b3 100644
--- a/docs/en/ranch/1.3/guide/protocols/index.html
+++ b/docs/en/ranch/1.3/guide/protocols/index.html
@@ -62,104 +62,76 @@
<h1 class="lined-header"><span>Protocols</span></h1>
-<div class="paragraph"><p>A protocol handler starts a connection process and defines the
-protocol logic executed in this process.</p></div>
-<div class="sect1">
+<p>A protocol handler starts a connection process and defines the protocol logic executed in this process.</p>
<h2 id="_writing_a_protocol_handler">Writing a protocol handler</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>All protocol handlers must implement the <code>ranch_protocol</code> behavior
-which defines a single callback, <code>start_link/4</code>. This callback is
-responsible for spawning a new process for handling the connection.
-It receives four arguments: the name of the listener, the socket, the
-transport handler being used and the protocol options defined in
-the call to <code>ranch:start_listener/6</code>. This callback must
-return <code>{ok, Pid}</code>, with <code>Pid</code> the pid of the new process.</p></div>
-<div class="paragraph"><p>The newly started process can then freely initialize itself. However,
-it must call <code>ranch:accept_ack/1</code> before doing any socket operation.
-This will ensure the connection process is the owner of the socket.
-It expects the listener&#8217;s name as argument.</p></div>
-<div class="listingblock">
-<div class="title">Acknowledge accepting the socket</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<p>All protocol handlers must implement the <code>ranch_protocol</code> behavior which defines a single callback, <code>start_link/4</code>. This callback is responsible for spawning a new process for handling the connection. It receives four arguments: the name of the listener, the socket, the transport handler being used and the protocol options defined in the call to <code>ranch:start_listener/6</code>. This callback must return <code>{ok, Pid}</code>, with <code>Pid</code> the pid of the new process.</p>
+<p>The newly started process can then freely initialize itself. However, it must call <code>ranch:accept_ack/1</code> before doing any socket operation. This will ensure the connection process is the owner of the socket. It expects the listener&apos;s name as argument.</p>
+<div class="listingblock"><div class="title">Acknowledge accepting the socket</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: #0000FF">ok</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">ranch:accept_ack</span></span>(<span style="color: #009900">Ref</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>If your protocol code requires specific socket options, you should
-set them while initializing your connection process, after
-calling <code>ranch:accept_ack/1</code>. You can use <code>Transport:setopts/2</code>
-for that purpose.</p></div>
-<div class="paragraph"><p>Following is the complete protocol code for the example found
-in <code>examples/tcp_echo/</code>.</p></div>
-<div class="listingblock">
-<div class="title">Protocol module that echoes everything it receives</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#0000FF">ok</font> <font color="#990000">=</font> <b><font color="#000000">ranch:accept_ack</font></b>(<font color="#009900">Ref</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>If your protocol code requires specific socket options, you should set them while initializing your connection process, after calling <code>ranch:accept_ack/1</code>. You can use <code>Transport:setopts/2</code> for that purpose.</p>
+<p>Following is the complete protocol code for the example found in <code>examples/tcp_echo/</code>.</p>
+<div class="listingblock"><div class="title">Protocol module that echoes everything it receives</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: #000080">-module</span></span>(<span style="color: #FF6600">echo_protocol</span>)<span style="color: #990000">.</span>
-<span style="font-weight: bold"><span style="color: #000080">-behaviour</span></span>(<span style="color: #FF6600">ranch_protocol</span>)<span style="color: #990000">.</span>
-
-<span style="font-weight: bold"><span style="color: #000080">-export</span></span>([<span style="font-weight: bold"><span style="color: #000000">start_link</span></span><span style="color: #990000">/</span><span style="color: #993399">4</span>])<span style="color: #990000">.</span>
-<span style="font-weight: bold"><span style="color: #000080">-export</span></span>([<span style="font-weight: bold"><span style="color: #000000">init</span></span><span style="color: #990000">/</span><span style="color: #993399">4</span>])<span style="color: #990000">.</span>
-
-<span style="font-weight: bold"><span style="color: #000000">start_link</span></span>(<span style="color: #009900">Ref</span>, <span style="color: #009900">Socket</span>, <span style="color: #009900">Transport</span>, <span style="color: #009900">Opts</span>) <span style="color: #990000">-&gt;</span>
- <span style="color: #009900">Pid</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000080">spawn_link</span></span>(<span style="font-weight: bold"><span style="color: #000080">?MODULE</span></span>, <span style="color: #FF6600">init</span>, [<span style="color: #009900">Ref</span>, <span style="color: #009900">Socket</span>, <span style="color: #009900">Transport</span>, <span style="color: #009900">Opts</span>]),
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Pid</span>}<span style="color: #990000">.</span>
-
-<span style="font-weight: bold"><span style="color: #000000">init</span></span>(<span style="color: #009900">Ref</span>, <span style="color: #009900">Socket</span>, <span style="color: #009900">Transport</span>, <span style="color: #009900">_Opts</span> <span style="color: #990000">=</span> []) <span style="color: #990000">-&gt;</span>
- <span style="color: #0000FF">ok</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">ranch:accept_ack</span></span>(<span style="color: #009900">Ref</span>),
- <span style="font-weight: bold"><span style="color: #000000">loop</span></span>(<span style="color: #009900">Socket</span>, <span style="color: #009900">Transport</span>)<span style="color: #990000">.</span>
-
-<span style="font-weight: bold"><span style="color: #000000">loop</span></span>(<span style="color: #009900">Socket</span>, <span style="color: #009900">Transport</span>) <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #0000FF">case</span></span> <span style="color: #009900">Transport</span><span style="color: #990000">:</span><span style="font-weight: bold"><span style="color: #000000">recv</span></span>(<span style="color: #009900">Socket</span>, <span style="color: #993399">0</span>, <span style="color: #993399">5000</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Data</span>} <span style="color: #990000">-&gt;</span>
- <span style="color: #009900">Transport</span><span style="color: #990000">:</span><span style="font-weight: bold"><span style="color: #000000">send</span></span>(<span style="color: #009900">Socket</span>, <span style="color: #009900">Data</span>),
- <span style="font-weight: bold"><span style="color: #000000">loop</span></span>(<span style="color: #009900">Socket</span>, <span style="color: #009900">Transport</span>);
- <span style="color: #990000">_</span> <span style="color: #990000">-&gt;</span>
- <span style="color: #0000FF">ok</span> <span style="color: #990000">=</span> <span style="color: #009900">Transport</span><span style="color: #990000">:</span><span style="font-weight: bold"><span style="color: #000000">close</span></span>(<span style="color: #009900">Socket</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">
+<pre><tt><b><font color="#000080">-module</font></b>(<font color="#FF6600">echo_protocol</font>)<font color="#990000">.</font>
+<b><font color="#000080">-behaviour</font></b>(<font color="#FF6600">ranch_protocol</font>)<font color="#990000">.</font>
+
+<b><font color="#000080">-export</font></b>([<b><font color="#000000">start_link</font></b><font color="#990000">/</font><font color="#993399">4</font>])<font color="#990000">.</font>
+<b><font color="#000080">-export</font></b>([<b><font color="#000000">init</font></b><font color="#990000">/</font><font color="#993399">4</font>])<font color="#990000">.</font>
+
+<b><font color="#000000">start_link</font></b>(<font color="#009900">Ref</font>, <font color="#009900">Socket</font>, <font color="#009900">Transport</font>, <font color="#009900">Opts</font>) <font color="#990000">-&gt;</font>
+ <font color="#009900">Pid</font> <font color="#990000">=</font> <b><font color="#000080">spawn_link</font></b>(<b><font color="#000080">?MODULE</font></b>, <font color="#FF6600">init</font>, [<font color="#009900">Ref</font>, <font color="#009900">Socket</font>, <font color="#009900">Transport</font>, <font color="#009900">Opts</font>]),
+ {<font color="#FF6600">ok</font>, <font color="#009900">Pid</font>}<font color="#990000">.</font>
+
+<b><font color="#000000">init</font></b>(<font color="#009900">Ref</font>, <font color="#009900">Socket</font>, <font color="#009900">Transport</font>, <font color="#009900">_Opts</font> <font color="#990000">=</font> []) <font color="#990000">-&gt;</font>
+ <font color="#0000FF">ok</font> <font color="#990000">=</font> <b><font color="#000000">ranch:accept_ack</font></b>(<font color="#009900">Ref</font>),
+ <b><font color="#000000">loop</font></b>(<font color="#009900">Socket</font>, <font color="#009900">Transport</font>)<font color="#990000">.</font>
+
+<b><font color="#000000">loop</font></b>(<font color="#009900">Socket</font>, <font color="#009900">Transport</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">case</font></b> <font color="#009900">Transport</font><font color="#990000">:</font><b><font color="#000000">recv</font></b>(<font color="#009900">Socket</font>, <font color="#993399">0</font>, <font color="#993399">5000</font>) <b><font color="#0000FF">of</font></b>
+ {<font color="#FF6600">ok</font>, <font color="#009900">Data</font>} <font color="#990000">-&gt;</font>
+ <font color="#009900">Transport</font><font color="#990000">:</font><b><font color="#000000">send</font></b>(<font color="#009900">Socket</font>, <font color="#009900">Data</font>),
+ <b><font color="#000000">loop</font></b>(<font color="#009900">Socket</font>, <font color="#009900">Transport</font>);
+ <font color="#990000">_</font> <font color="#990000">-&gt;</font>
+ <font color="#0000FF">ok</font> <font color="#990000">=</font> <font color="#009900">Transport</font><font color="#990000">:</font><b><font color="#000000">close</font></b>(<font color="#009900">Socket</font>)
+ <b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_using_gen_server">Using gen_server</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Special processes like the ones that use the <code>gen_server</code> or <code>gen_fsm</code>
-behaviours have the particularity of having their <code>start_link</code> call not
-return until the <code>init</code> function returns. This is problematic, because
-you won&#8217;t be able to call <code>ranch:accept_ack/1</code> from the <code>init</code> callback
-as this would cause a deadlock to happen.</p></div>
-<div class="paragraph"><p>Use the <code>gen_server:enter_loop/3</code> function. It allows you to start your process
-normally (although it must be started with <code>proc_lib</code> like all special
-processes), then perform any needed operations before falling back into
-the normal <code>gen_server</code> execution loop.</p></div>
-<div class="listingblock">
-<div class="title">Use a gen_server for protocol handling</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Special processes like the ones that use the <code>gen_server</code> or <code>gen_fsm</code> behaviours have the particularity of having their <code>start_link</code> call not return until the <code>init</code> function returns. This is problematic, because you won&apos;t be able to call <code>ranch:accept_ack/1</code> from the <code>init</code> callback as this would cause a deadlock to happen.</p>
+<p>Use the <code>gen_server:enter_loop/3</code> function. It allows you to start your process normally (although it must be started with <code>proc_lib</code> like all special processes), then perform any needed operations before falling back into the normal <code>gen_server</code> execution loop.</p>
+<div class="listingblock"><div class="title">Use a gen_server for protocol handling</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: #000080">-module</span></span>(<span style="color: #FF6600">my_protocol</span>)<span style="color: #990000">.</span>
-<span style="font-weight: bold"><span style="color: #000080">-behaviour</span></span>(<span style="color: #FF6600">gen_server</span>)<span style="color: #990000">.</span>
-<span style="font-weight: bold"><span style="color: #000080">-behaviour</span></span>(<span style="color: #FF6600">ranch_protocol</span>)<span style="color: #990000">.</span>
+<pre><tt><b><font color="#000080">-module</font></b>(<font color="#FF6600">my_protocol</font>)<font color="#990000">.</font>
+<b><font color="#000080">-behaviour</font></b>(<font color="#FF6600">gen_server</font>)<font color="#990000">.</font>
+<b><font color="#000080">-behaviour</font></b>(<font color="#FF6600">ranch_protocol</font>)<font color="#990000">.</font>
-<span style="font-weight: bold"><span style="color: #000080">-export</span></span>([<span style="font-weight: bold"><span style="color: #000000">start_link</span></span><span style="color: #990000">/</span><span style="color: #993399">4</span>])<span style="color: #990000">.</span>
-<span style="font-weight: bold"><span style="color: #000080">-export</span></span>([<span style="font-weight: bold"><span style="color: #000000">init</span></span><span style="color: #990000">/</span><span style="color: #993399">1</span>])<span style="color: #990000">.</span>
-<span style="font-style: italic"><span style="color: #9A1900">%% Exports of other gen_server callbacks here.</span></span>
+<b><font color="#000080">-export</font></b>([<b><font color="#000000">start_link</font></b><font color="#990000">/</font><font color="#993399">4</font>])<font color="#990000">.</font>
+<b><font color="#000080">-export</font></b>([<b><font color="#000000">init</font></b><font color="#990000">/</font><font color="#993399">1</font>])<font color="#990000">.</font>
+<i><font color="#9A1900">%% Exports of other gen_server callbacks here.</font></i>
-<span style="font-weight: bold"><span style="color: #000000">start_link</span></span>(<span style="color: #009900">Ref</span>, <span style="color: #009900">Socket</span>, <span style="color: #009900">Transport</span>, <span style="color: #009900">Opts</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">ok</span>, <span style="font-weight: bold"><span style="color: #000000">proc_lib:spawn_link</span></span>(<span style="font-weight: bold"><span style="color: #000080">?MODULE</span></span>, <span style="color: #FF6600">init</span>, [{<span style="color: #009900">Ref</span>, <span style="color: #009900">Socket</span>, <span style="color: #009900">Transport</span>, <span style="color: #009900">Opts</span>}])}<span style="color: #990000">.</span>
+<b><font color="#000000">start_link</font></b>(<font color="#009900">Ref</font>, <font color="#009900">Socket</font>, <font color="#009900">Transport</font>, <font color="#009900">Opts</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <b><font color="#000000">proc_lib:spawn_link</font></b>(<b><font color="#000080">?MODULE</font></b>, <font color="#FF6600">init</font>, [{<font color="#009900">Ref</font>, <font color="#009900">Socket</font>, <font color="#009900">Transport</font>, <font color="#009900">Opts</font>}])}<font color="#990000">.</font>
-<span style="font-weight: bold"><span style="color: #000000">init</span></span>({<span style="color: #009900">Ref</span>, <span style="color: #009900">Socket</span>, <span style="color: #009900">Transport</span>, <span style="color: #009900">_Opts</span> <span style="color: #990000">=</span> []}) <span style="color: #990000">-&gt;</span>
- <span style="font-style: italic"><span style="color: #9A1900">%% Perform any required state initialization here.</span></span>
- <span style="color: #0000FF">ok</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">ranch:accept_ack</span></span>(<span style="color: #009900">Ref</span>),
- <span style="color: #0000FF">ok</span> <span style="color: #990000">=</span> <span style="color: #009900">Transport</span><span style="color: #990000">:</span><span style="font-weight: bold"><span style="color: #000000">setopts</span></span>(<span style="color: #009900">Socket</span>, [{<span style="color: #FF6600">active</span>, <span style="color: #FF6600">once</span>}]),
- <span style="font-weight: bold"><span style="color: #000000">gen_server:enter_loop</span></span>(<span style="font-weight: bold"><span style="color: #000080">?MODULE</span></span>, [], {<span style="color: #FF6600">state</span>, <span style="color: #009900">Socket</span>, <span style="color: #009900">Transport</span>})<span style="color: #990000">.</span>
+<b><font color="#000000">init</font></b>({<font color="#009900">Ref</font>, <font color="#009900">Socket</font>, <font color="#009900">Transport</font>, <font color="#009900">_Opts</font> <font color="#990000">=</font> []}) <font color="#990000">-&gt;</font>
+ <i><font color="#9A1900">%% Perform any required state initialization here.</font></i>
+ <font color="#0000FF">ok</font> <font color="#990000">=</font> <b><font color="#000000">ranch:accept_ack</font></b>(<font color="#009900">Ref</font>),
+ <font color="#0000FF">ok</font> <font color="#990000">=</font> <font color="#009900">Transport</font><font color="#990000">:</font><b><font color="#000000">setopts</font></b>(<font color="#009900">Socket</font>, [{<font color="#FF6600">active</font>, <font color="#FF6600">once</font>}]),
+ <b><font color="#000000">gen_server:enter_loop</font></b>(<b><font color="#000080">?MODULE</font></b>, [], {<font color="#FF6600">state</font>, <font color="#009900">Socket</font>, <font color="#009900">Transport</font>})<font color="#990000">.</font>
+
+<i><font color="#9A1900">%% Other gen_server callbacks here.</font></i></tt></pre>
+</div></div>
+<p>Check the <code>tcp_reverse</code> example for a complete example.</p>
-<span style="font-style: italic"><span style="color: #9A1900">%% Other gen_server callbacks here.</span></span></tt></pre></div></div>
-<div class="paragraph"><p>Check the <code>tcp_reverse</code> example for a complete example.</p></div>
-</div>
-</div>
@@ -216,6 +188,8 @@ http://www.gnu.org/software/src-highlite -->
+ <li><a href="/docs/en/ranch/1.5/guide">1.5</a></li>
+
<li><a href="/docs/en/ranch/1.4/guide">1.4</a></li>
<li><a href="/docs/en/ranch/1.3/guide">1.3</a></li>
diff --git a/docs/en/ranch/1.3/guide/ssl_auth/index.html b/docs/en/ranch/1.3/guide/ssl_auth/index.html
index 6f4f93dc..4018790d 100644
--- a/docs/en/ranch/1.3/guide/ssl_auth/index.html
+++ b/docs/en/ranch/1.3/guide/ssl_auth/index.html
@@ -62,158 +62,82 @@
<h1 class="lined-header"><span>SSL client authentication</span></h1>
-<div class="sect1">
<h2 id="_purpose">Purpose</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>SSL client authentication is a mechanism allowing applications to
-identify certificates. This allows your application to make sure that
-the client is an authorized certificate, but makes no claim about
-whether the user can be trusted. This can be combined with a password
-based authentication to attain greater security.</p></div>
-<div class="paragraph"><p>The server only needs to retain the certificate serial number and
-the certificate issuer to authenticate the certificate. Together,
-they can be used to uniquely identify a certicate.</p></div>
-<div class="paragraph"><p>As Ranch allows the same protocol code to be used for both SSL and
-non-SSL transports, you need to make sure you are in an SSL context
-before attempting to perform an SSL client authentication. This
-can be done by checking the return value of <code>Transport:name/0</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>SSL client authentication is a mechanism allowing applications to identify certificates. This allows your application to make sure that the client is an authorized certificate, but makes no claim about whether the user can be trusted. This can be combined with a password based authentication to attain greater security.</p>
+<p>The server only needs to retain the certificate serial number and the certificate issuer to authenticate the certificate. Together, they can be used to uniquely identify a certicate.</p>
+<p>As Ranch allows the same protocol code to be used for both SSL and non-SSL transports, you need to make sure you are in an SSL context before attempting to perform an SSL client authentication. This can be done by checking the return value of <code>Transport:name/0</code>.</p>
<h2 id="_obtaining_client_certificates">Obtaining client certificates</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>You can obtain client certificates from various sources. You can
-generate them yourself, or you can use a service like CAcert.org
-which allows you to generate client and server certificates for
-free.</p></div>
-<div class="paragraph"><p>Following are the steps you need to take to create a CAcert.org
-account, generate a certificate and install it in your favorite
-browser.</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-Open <a href="http://cacert.org">http://cacert.org</a> in your favorite browser
-</p>
+<p>You can obtain client certificates from various sources. You can generate them yourself, or you can use a service like CAcert.org which allows you to generate client and server certificates for free.</p>
+<p>Following are the steps you need to take to create a CAcert.org account, generate a certificate and install it in your favorite browser.</p>
+<ul><li>Open <a href="http://cacert.org">http://cacert.org</a> in your favorite browser
</li>
-<li>
-<p>
-Root Certificate link: install both certificates
-</p>
+<li>Root Certificate link: install both certificates
</li>
-<li>
-<p>
-Join (Register an account)
-</p>
+<li>Join (Register an account)
</li>
-<li>
-<p>
-Verify your account (check your email inbox!)
-</p>
+<li>Verify your account (check your email inbox!)
</li>
-<li>
-<p>
-Log in
-</p>
+<li>Log in
</li>
-<li>
-<p>
-Client Certificates: New
-</p>
+<li>Client Certificates: New
</li>
-<li>
-<p>
-Follow instructions to create the certificate
-</p>
+<li>Follow instructions to create the certificate
</li>
-<li>
-<p>
-Install the certificate in your browser
-</p>
+<li>Install the certificate in your browser
</li>
-</ul></div>
-<div class="paragraph"><p>You can optionally save the certificate for later use, for example
-to extract the <code>IssuerID</code> information as will be detailed later on.</p></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
+<p>You can optionally save the certificate for later use, for example to extract the <code>IssuerID</code> information as will be detailed later on.</p>
<h2 id="_transport_configuration">Transport configuration</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The SSL transport does not request a client certificate by default.
-You need to specify the <code>{verify, verify_peer}</code> option when starting
-the listener to enable this behavior.</p></div>
-<div class="listingblock">
-<div class="title">Configure a listener for SSL authentication</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The SSL transport does not request a client certificate by default. You need to specify the <code>{verify, verify_peer}</code> option when starting the listener to enable this behavior.</p>
+<div class="listingblock"><div class="title">Configure a listener for SSL authentication</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: #FF6600">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">ranch:start_listener</span></span>(<span style="color: #FF6600">my_ssl</span>, <span style="color: #993399">100</span>,
- <span style="color: #FF6600">ranch_ssl</span>, [
- {<span style="color: #FF6600">port</span>, <span style="color: #009900">SSLPort</span>},
- {<span style="color: #FF6600">certfile</span>, <span style="color: #009900">PathToCertfile</span>},
- {<span style="color: #FF6600">cacertfile</span>, <span style="color: #009900">PathToCACertfile</span>},
- {<span style="color: #FF6600">verify</span>, <span style="color: #FF6600">verify_peer</span>}
- ],
- <span style="color: #FF6600">my_protocol</span>, []
-)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>In this example we set the required <code>port</code> and <code>certfile</code>, but also
-the <code>cacertfile</code> containing the CACert.org root certificate, and
-the option to request the client certificate.</p></div>
-<div class="paragraph"><p>If you enable the <code>{verify, verify_peer}</code> option and the client does
-not have a client certificate configured for your domain, then no
-certificate will be sent. This allows you to use SSL for more than
-just authenticated clients.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">ranch:start_listener</font></b>(<font color="#FF6600">my_ssl</font>, <font color="#993399">100</font>,
+ <font color="#FF6600">ranch_ssl</font>, [
+ {<font color="#FF6600">port</font>, <font color="#009900">SSLPort</font>},
+ {<font color="#FF6600">certfile</font>, <font color="#009900">PathToCertfile</font>},
+ {<font color="#FF6600">cacertfile</font>, <font color="#009900">PathToCACertfile</font>},
+ {<font color="#FF6600">verify</font>, <font color="#FF6600">verify_peer</font>}
+ ],
+ <font color="#FF6600">my_protocol</font>, []
+)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>In this example we set the required <code>port</code> and <code>certfile</code>, but also the <code>cacertfile</code> containing the CACert.org root certificate, and the option to request the client certificate.</p>
+<p>If you enable the <code>{verify, verify_peer}</code> option and the client does not have a client certificate configured for your domain, then no certificate will be sent. This allows you to use SSL for more than just authenticated clients.</p>
<h2 id="_authentication">Authentication</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>To authenticate users, you must first save the certificate information
-required. If you have your users' certificate files, you can simply
-load the certificate and retrieve the information directly.</p></div>
-<div class="listingblock">
-<div class="title">Retrieve the issuer ID from a certificate</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<p>To authenticate users, you must first save the certificate information required. If you have your users&apos; certificate files, you can simply load the certificate and retrieve the information directly.</p>
+<div class="listingblock"><div class="title">Retrieve the issuer ID from a certificate</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">certfile_to_issuer_id</span></span>(<span style="color: #009900">Filename</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Data</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">file:read_file</span></span>(<span style="color: #009900">Filename</span>),
- [{<span style="color: #FF6600">'Certificate'</span>, <span style="color: #009900">Cert</span>, <span style="color: #FF6600">not_encrypted</span>}] <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">public_key:pem_decode</span></span>(<span style="color: #009900">Data</span>),
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">IssuerID</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">public_key:pkix_issuer_id</span></span>(<span style="color: #009900">Cert</span>, <span style="font-weight: bold"><span style="color: #000080">self</span></span>),
- <span style="color: #009900">IssuerID</span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>The <code>IssuerID</code> variable contains both the certificate serial number
-and the certificate issuer stored in a tuple, so this value alone can
-be used to uniquely identify the user certificate. You can save this
-value in a database, a configuration file or any other place where an
-Erlang term can be stored and retrieved.</p></div>
-<div class="paragraph"><p>To retrieve the <code>IssuerID</code> from a running connection, you need to first
-retrieve the client certificate and then extract this information from
-it. Ranch does not provide a function to retrieve the client certificate.
-Instead you can use the <code>ssl:peercert/1</code> function. Once you have the
-certificate, you can again use the <code>public_key:pkix_issuer_id/2</code> to
-extract the <code>IssuerID</code> value.</p></div>
-<div class="paragraph"><p>The following function returns the <code>IssuerID</code> or <code>false</code> if no client
-certificate was found. This snippet is intended to be used from your
-protocol code.</p></div>
-<div class="listingblock">
-<div class="title">Retrieve the issuer ID from the certificate for the current connection</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">certfile_to_issuer_id</font></b>(<font color="#009900">Filename</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <font color="#009900">Data</font>} <font color="#990000">=</font> <b><font color="#000000">file:read_file</font></b>(<font color="#009900">Filename</font>),
+ [{<font color="#FF6600">'Certificate'</font>, <font color="#009900">Cert</font>, <font color="#FF6600">not_encrypted</font>}] <font color="#990000">=</font> <b><font color="#000000">public_key:pem_decode</font></b>(<font color="#009900">Data</font>),
+ {<font color="#FF6600">ok</font>, <font color="#009900">IssuerID</font>} <font color="#990000">=</font> <b><font color="#000000">public_key:pkix_issuer_id</font></b>(<font color="#009900">Cert</font>, <b><font color="#000080">self</font></b>),
+ <font color="#009900">IssuerID</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>The <code>IssuerID</code> variable contains both the certificate serial number and the certificate issuer stored in a tuple, so this value alone can be used to uniquely identify the user certificate. You can save this value in a database, a configuration file or any other place where an Erlang term can be stored and retrieved.</p>
+<p>To retrieve the <code>IssuerID</code> from a running connection, you need to first retrieve the client certificate and then extract this information from it. Ranch does not provide a function to retrieve the client certificate. Instead you can use the <code>ssl:peercert/1</code> function. Once you have the certificate, you can again use the <code>public_key:pkix_issuer_id/2</code> to extract the <code>IssuerID</code> value.</p>
+<p>The following function returns the <code>IssuerID</code> or <code>false</code> if no client certificate was found. This snippet is intended to be used from your protocol code.</p>
+<div class="listingblock"><div class="title">Retrieve the issuer ID from the certificate for the current connection</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">socket_to_issuer_id</span></span>(<span style="color: #009900">Socket</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">ssl:peercert</span></span>(<span style="color: #009900">Socket</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
- {<span style="color: #FF6600">error</span>, <span style="color: #FF6600">no_peercert</span>} <span style="color: #990000">-&gt;</span>
- <span style="color: #000080">false</span>;
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Cert</span>} <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">IssuerID</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">public_key:pkix_issuer_id</span></span>(<span style="color: #009900">Cert</span>, <span style="font-weight: bold"><span style="color: #000080">self</span></span>),
- <span style="color: #009900">IssuerID</span>
- <span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>You then only need to match the <code>IssuerID</code> value to authenticate the
-user.</p></div>
-</div>
-</div>
+<pre><tt><b><font color="#000000">socket_to_issuer_id</font></b>(<font color="#009900">Socket</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">case</font></b> <b><font color="#000000">ssl:peercert</font></b>(<font color="#009900">Socket</font>) <b><font color="#0000FF">of</font></b>
+ {<font color="#FF6600">error</font>, <font color="#FF6600">no_peercert</font>} <font color="#990000">-&gt;</font>
+ <font color="#000080">false</font>;
+ {<font color="#FF6600">ok</font>, <font color="#009900">Cert</font>} <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <font color="#009900">IssuerID</font>} <font color="#990000">=</font> <b><font color="#000000">public_key:pkix_issuer_id</font></b>(<font color="#009900">Cert</font>, <b><font color="#000080">self</font></b>),
+ <font color="#009900">IssuerID</font>
+ <b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>You then only need to match the <code>IssuerID</code> value to authenticate the user.</p>
+
@@ -270,6 +194,8 @@ user.</p></div>
+ <li><a href="/docs/en/ranch/1.5/guide">1.5</a></li>
+
<li><a href="/docs/en/ranch/1.4/guide">1.4</a></li>
<li><a href="/docs/en/ranch/1.3/guide">1.3</a></li>
diff --git a/docs/en/ranch/1.3/guide/transports/index.html b/docs/en/ranch/1.3/guide/transports/index.html
index 103ae423..09bf93b3 100644
--- a/docs/en/ranch/1.3/guide/transports/index.html
+++ b/docs/en/ranch/1.3/guide/transports/index.html
@@ -62,179 +62,107 @@
<h1 class="lined-header"><span>Transports</span></h1>
-<div class="paragraph"><p>A transport defines the interface to interact with a socket.</p></div>
-<div class="paragraph"><p>Transports can be used for connecting, listening and accepting
-connections, but also for receiving and sending data. Both
-passive and active mode are supported, although all sockets
-are initialized as passive.</p></div>
-<div class="sect1">
+<p>A transport defines the interface to interact with a socket.</p>
+<p>Transports can be used for connecting, listening and accepting connections, but also for receiving and sending data. Both passive and active mode are supported, although all sockets are initialized as passive.</p>
<h2 id="_tcp_transport">TCP transport</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The TCP transport is a thin wrapper around <code>gen_tcp</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The TCP transport is a thin wrapper around <code>gen_tcp</code>.</p>
<h2 id="_ssl_transport">SSL transport</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The SSL transport is a thin wrapper around <code>ssl</code>.</p></div>
-<div class="paragraph"><p>Ranch depends on <code>ssl</code> by default so any necessary
-dependencies will start when Ranch is started. It is
-possible to remove the dependency when the SSL transport
-will not be used. Refer to your release build tool&#8217;s
-documentation for more information.</p></div>
-<div class="paragraph"><p>When embedding Ranch listeners that have an SSL transport,
-your application must depend on the <code>ssl</code> application for
-proper behavior.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The SSL transport is a thin wrapper around <code>ssl</code>.</p>
+<p>Ranch depends on <code>ssl</code> by default so any necessary dependencies will start when Ranch is started. It is possible to remove the dependency when the SSL transport will not be used. Refer to your release build tool&apos;s documentation for more information.</p>
+<p>When embedding Ranch listeners that have an SSL transport, your application must depend on the <code>ssl</code> application for proper behavior.</p>
<h2 id="_sending_and_receiving_data">Sending and receiving data</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This section assumes that <code>Transport</code> is a valid transport handler
-(like <code>ranch_tcp</code> or <code>ranch_ssl</code>) and <code>Socket</code> is a connected
-socket obtained through the listener.</p></div>
-<div class="paragraph"><p>You can send data to a socket by calling the <code>Transport:send/2</code>
-function. The data can be given as <code>iodata()</code>, which is defined as
-<code>binary() | iolist()</code>. All the following calls will work:</p></div>
-<div class="listingblock">
-<div class="title">Sending data to the socket</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<p>This section assumes that <code>Transport</code> is a valid transport handler (like <code>ranch_tcp</code> or <code>ranch_ssl</code>) and <code>Socket</code> is a connected socket obtained through the listener.</p>
+<p>You can send data to a socket by calling the <code>Transport:send/2</code> function. The data can be given as <code>iodata()</code>, which is defined as <code>binary() | iolist()</code>. All the following calls will work:</p>
+<div class="listingblock"><div class="title">Sending data to the socket</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">Transport</span><span style="color: #990000">:</span><span style="font-weight: bold"><span style="color: #000000">send</span></span>(<span style="color: #009900">Socket</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Ranch is cool!"</span><span style="color: #990000">&gt;&gt;</span>)<span style="color: #990000">.</span>
-<span style="color: #009900">Transport</span><span style="color: #990000">:</span><span style="font-weight: bold"><span style="color: #000000">send</span></span>(<span style="color: #009900">Socket</span>, <span style="color: #FF0000">"Ranch is cool!"</span>)<span style="color: #990000">.</span>
-<span style="color: #009900">Transport</span><span style="color: #990000">:</span><span style="font-weight: bold"><span style="color: #000000">send</span></span>(<span style="color: #009900">Socket</span>, [<span style="color: #FF0000">"Ranch"</span>, [<span style="color: #FF0000">"is"</span>, <span style="color: #FF0000">"cool!"</span>]])<span style="color: #990000">.</span>
-<span style="color: #009900">Transport</span><span style="color: #990000">:</span><span style="font-weight: bold"><span style="color: #000000">send</span></span>(<span style="color: #009900">Socket</span>, [<span style="color: #FF0000">"Ranch"</span>, [<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"is"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #FF0000">"cool!"</span>]])<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>You can receive data either in passive or in active mode. Passive mode
-means that you will perform a blocking <code>Transport:recv/3</code> call, while
-active mode means that you will receive the data as a message.</p></div>
-<div class="paragraph"><p>By default, all data will be received as binary. It is possible to
-receive data as strings, although this is not recommended as binaries
-are a more efficient construct, especially for binary protocols.</p></div>
-<div class="paragraph"><p>Receiving data using passive mode requires a single function call. The
-first argument is the socket, and the third argument is a timeout duration
-before the call returns with <code>{error, timeout}</code>.</p></div>
-<div class="paragraph"><p>The second argument is the amount of data in bytes that we want to receive.
-The function will wait for data until it has received exactly this amount.
-If you are not expecting a precise size, you can specify 0 which will make
-this call return as soon as data was read, regardless of its size.</p></div>
-<div class="listingblock">
-<div class="title">Receiving data from the socket in passive mode</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Transport</font><font color="#990000">:</font><b><font color="#000000">send</font></b>(<font color="#009900">Socket</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"Ranch is cool!"</font><font color="#990000">&gt;&gt;</font>)<font color="#990000">.</font>
+<font color="#009900">Transport</font><font color="#990000">:</font><b><font color="#000000">send</font></b>(<font color="#009900">Socket</font>, <font color="#FF0000">"Ranch is cool!"</font>)<font color="#990000">.</font>
+<font color="#009900">Transport</font><font color="#990000">:</font><b><font color="#000000">send</font></b>(<font color="#009900">Socket</font>, [<font color="#FF0000">"Ranch"</font>, [<font color="#FF0000">"is"</font>, <font color="#FF0000">"cool!"</font>]])<font color="#990000">.</font>
+<font color="#009900">Transport</font><font color="#990000">:</font><b><font color="#000000">send</font></b>(<font color="#009900">Socket</font>, [<font color="#FF0000">"Ranch"</font>, [<font color="#990000">&lt;&lt;</font><font color="#FF0000">"is"</font><font color="#990000">&gt;&gt;</font>, <font color="#FF0000">"cool!"</font>]])<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>You can receive data either in passive or in active mode. Passive mode means that you will perform a blocking <code>Transport:recv/3</code> call, while active mode means that you will receive the data as a message.</p>
+<p>By default, all data will be received as binary. It is possible to receive data as strings, although this is not recommended as binaries are a more efficient construct, especially for binary protocols.</p>
+<p>Receiving data using passive mode requires a single function call. The first argument is the socket, and the third argument is a timeout duration before the call returns with <code>{error, timeout}</code>.</p>
+<p>The second argument is the amount of data in bytes that we want to receive. The function will wait for data until it has received exactly this amount. If you are not expecting a precise size, you can specify 0 which will make this call return as soon as data was read, regardless of its size.</p>
+<div class="listingblock"><div class="title">Receiving data from the socket in passive mode</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: #FF6600">ok</span>, <span style="color: #009900">Data</span>} <span style="color: #990000">=</span> <span style="color: #009900">Transport</span><span style="color: #990000">:</span><span style="font-weight: bold"><span style="color: #000000">recv</span></span>(<span style="color: #009900">Socket</span>, <span style="color: #993399">0</span>, <span style="color: #993399">5000</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Active mode requires you to inform the socket that you want to receive
-data as a message and to write the code to actually receive it.</p></div>
-<div class="paragraph"><p>There are two kinds of active modes: <code>{active, once}</code> and
-<code>{active, true}</code>. The first will send a single message before going
-back to passive mode; the second will send messages indefinitely.
-We recommend not using the <code>{active, true}</code> mode as it could quickly
-flood your process mailbox. It&#8217;s better to keep the data in the socket
-and read it only when required.</p></div>
-<div class="paragraph"><p>Three different messages can be received:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<code>{OK, Socket, Data}</code>
-</p>
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#009900">Data</font>} <font color="#990000">=</font> <font color="#009900">Transport</font><font color="#990000">:</font><b><font color="#000000">recv</font></b>(<font color="#009900">Socket</font>, <font color="#993399">0</font>, <font color="#993399">5000</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Active mode requires you to inform the socket that you want to receive data as a message and to write the code to actually receive it.</p>
+<p>There are two kinds of active modes: <code>{active, once}</code> and <code>{active, true}</code>. The first will send a single message before going back to passive mode; the second will send messages indefinitely. We recommend not using the <code>{active, true}</code> mode as it could quickly flood your process mailbox. It&apos;s better to keep the data in the socket and read it only when required.</p>
+<p>Three different messages can be received:</p>
+<ul><li><code>{OK, Socket, Data}</code>
</li>
-<li>
-<p>
-<code>{Closed, Socket}</code>
-</p>
+<li><code>{Closed, Socket}</code>
</li>
-<li>
-<p>
-<code>{Error, Socket, Reason}</code>
-</p>
+<li><code>{Error, Socket, Reason}</code>
</li>
-</ul></div>
-<div class="paragraph"><p>The value of <code>OK</code>, <code>Closed</code> and <code>Error</code> can be different
-depending on the transport being used. To be able to properly match
-on them you must first call the <code>Transport:messages/0</code> function.</p></div>
-<div class="listingblock">
-<div class="title">Retrieving the transport&#8217;s active message identifiers</div>
-<div class="content"><!-- Generator: GNU source-highlight
+</ul>
+<p>The value of <code>OK</code>, <code>Closed</code> and <code>Error</code> can be different depending on the transport being used. To be able to properly match on them you must first call the <code>Transport:messages/0</code> function.</p>
+<div class="listingblock"><div class="title">Retrieving the transport&apos;s active message identifiers</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">OK</span>, <span style="color: #009900">Closed</span>, <span style="color: #009900">Error</span>} <span style="color: #990000">=</span> <span style="color: #009900">Transport</span><span style="color: #990000">:</span><span style="font-weight: bold"><span style="color: #000000">messages</span></span>()<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>To start receiving messages you will need to call the <code>Transport:setopts/2</code>
-function, and do so every time you want to receive data.</p></div>
-<div class="listingblock">
-<div class="title">Receiving messages from the socket in active mode</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>{<font color="#009900">OK</font>, <font color="#009900">Closed</font>, <font color="#009900">Error</font>} <font color="#990000">=</font> <font color="#009900">Transport</font><font color="#990000">:</font><b><font color="#000000">messages</font></b>()<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>To start receiving messages you will need to call the <code>Transport:setopts/2</code> function, and do so every time you want to receive data.</p>
+<div class="listingblock"><div class="title">Receiving messages from the socket in active mode</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">OK</span>, <span style="color: #009900">Closed</span>, <span style="color: #009900">Error</span>} <span style="color: #990000">=</span> <span style="color: #009900">Transport</span><span style="color: #990000">:</span><span style="font-weight: bold"><span style="color: #000000">messages</span></span>(),
-<span style="color: #009900">Transport</span><span style="color: #990000">:</span><span style="font-weight: bold"><span style="color: #000000">setopts</span></span>(<span style="color: #009900">Socket</span>, [{<span style="color: #FF6600">active</span>, <span style="color: #FF6600">once</span>}]),
-<span style="font-weight: bold"><span style="color: #0000FF">receive</span></span>
- {<span style="color: #009900">OK</span>, <span style="color: #009900">Socket</span>, <span style="color: #009900">Data</span>} <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #000000">io:format</span></span>(<span style="color: #FF0000">"data received: ~p~n"</span>, [<span style="color: #009900">Data</span>]);
- {<span style="color: #009900">Closed</span>, <span style="color: #009900">Socket</span>} <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #000000">io:format</span></span>(<span style="color: #FF0000">"socket got closed!~n"</span>);
- {<span style="color: #009900">Error</span>, <span style="color: #009900">Socket</span>, <span style="color: #009900">Reason</span>} <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #000000">io:format</span></span>(<span style="color: #FF0000">"error happened: ~p~n"</span>, [<span style="color: #009900">Reason</span>])
-<span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>You can easily integrate active sockets with existing Erlang code as all
-you really need is just a few more clauses when receiving messages.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#009900">OK</font>, <font color="#009900">Closed</font>, <font color="#009900">Error</font>} <font color="#990000">=</font> <font color="#009900">Transport</font><font color="#990000">:</font><b><font color="#000000">messages</font></b>(),
+<font color="#009900">Transport</font><font color="#990000">:</font><b><font color="#000000">setopts</font></b>(<font color="#009900">Socket</font>, [{<font color="#FF6600">active</font>, <font color="#FF6600">once</font>}]),
+<b><font color="#0000FF">receive</font></b>
+ {<font color="#009900">OK</font>, <font color="#009900">Socket</font>, <font color="#009900">Data</font>} <font color="#990000">-&gt;</font>
+ <b><font color="#000000">io:format</font></b>(<font color="#FF0000">"data received: ~p~n"</font>, [<font color="#009900">Data</font>]);
+ {<font color="#009900">Closed</font>, <font color="#009900">Socket</font>} <font color="#990000">-&gt;</font>
+ <b><font color="#000000">io:format</font></b>(<font color="#FF0000">"socket got closed!~n"</font>);
+ {<font color="#009900">Error</font>, <font color="#009900">Socket</font>, <font color="#009900">Reason</font>} <font color="#990000">-&gt;</font>
+ <b><font color="#000000">io:format</font></b>(<font color="#FF0000">"error happened: ~p~n"</font>, [<font color="#009900">Reason</font>])
+<b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>You can easily integrate active sockets with existing Erlang code as all you really need is just a few more clauses when receiving messages.</p>
<h2 id="_sending_files">Sending files</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>As in the previous section it is assumed <code>Transport</code> is a valid transport
-handler and <code>Socket</code> is a connected socket obtained through the listener.</p></div>
-<div class="paragraph"><p>To send a whole file, with name <code>Filename</code>, over a socket:</p></div>
-<div class="listingblock">
-<div class="title">Sending a file by filename</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<p>As in the previous section it is assumed <code>Transport</code> is a valid transport handler and <code>Socket</code> is a connected socket obtained through the listener.</p>
+<p>To send a whole file, with name <code>Filename</code>, over a socket:</p>
+<div class="listingblock"><div class="title">Sending a file by filename</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: #FF6600">ok</span>, <span style="color: #009900">SentBytes</span>} <span style="color: #990000">=</span> <span style="color: #009900">Transport</span><span style="color: #990000">:</span><span style="font-weight: bold"><span style="color: #000000">sendfile</span></span>(<span style="color: #009900">Socket</span>, <span style="color: #009900">Filename</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Or part of a file, with <code>Offset</code> greater than or equal to 0, <code>Bytes</code> number of
-bytes and chunks of size <code>ChunkSize</code>:</p></div>
-<div class="listingblock">
-<div class="title">Sending part of a file by filename in chunks</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#009900">SentBytes</font>} <font color="#990000">=</font> <font color="#009900">Transport</font><font color="#990000">:</font><b><font color="#000000">sendfile</font></b>(<font color="#009900">Socket</font>, <font color="#009900">Filename</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Or part of a file, with <code>Offset</code> greater than or equal to 0, <code>Bytes</code> number of bytes and chunks of size <code>ChunkSize</code>:</p>
+<div class="listingblock"><div class="title">Sending part of a file by filename in chunks</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">Opts</span> <span style="color: #990000">=</span> [{<span style="color: #FF6600">chunk_size</span>, <span style="color: #009900">ChunkSize</span>}],
-{<span style="color: #FF6600">ok</span>, <span style="color: #009900">SentBytes</span>} <span style="color: #990000">=</span> <span style="color: #009900">Transport</span><span style="color: #990000">:</span><span style="font-weight: bold"><span style="color: #000000">sendfile</span></span>(<span style="color: #009900">Socket</span>, <span style="color: #009900">Filename</span>, <span style="color: #009900">Offset</span>, <span style="color: #009900">Bytes</span>, <span style="color: #009900">Opts</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>To improve efficiency when sending multiple parts of the same file it is also
-possible to use a file descriptor opened in raw mode:</p></div>
-<div class="listingblock">
-<div class="title">Sending a file opened in raw mode</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Opts</font> <font color="#990000">=</font> [{<font color="#FF6600">chunk_size</font>, <font color="#009900">ChunkSize</font>}],
+{<font color="#FF6600">ok</font>, <font color="#009900">SentBytes</font>} <font color="#990000">=</font> <font color="#009900">Transport</font><font color="#990000">:</font><b><font color="#000000">sendfile</font></b>(<font color="#009900">Socket</font>, <font color="#009900">Filename</font>, <font color="#009900">Offset</font>, <font color="#009900">Bytes</font>, <font color="#009900">Opts</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>To improve efficiency when sending multiple parts of the same file it is also possible to use a file descriptor opened in raw mode:</p>
+<div class="listingblock"><div class="title">Sending a file opened in raw mode</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: #FF6600">ok</span>, <span style="color: #009900">RawFile</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">file:open</span></span>(<span style="color: #009900">Filename</span>, [<span style="color: #FF6600">raw</span>, <span style="color: #FF6600">read</span>, <span style="font-weight: bold"><span style="color: #000080">binary</span></span>]),
-{<span style="color: #FF6600">ok</span>, <span style="color: #009900">SentBytes</span>} <span style="color: #990000">=</span> <span style="color: #009900">Transport</span><span style="color: #990000">:</span><span style="font-weight: bold"><span style="color: #000000">sendfile</span></span>(<span style="color: #009900">Socket</span>, <span style="color: #009900">RawFile</span>, <span style="color: #009900">Offset</span>, <span style="color: #009900">Bytes</span>, <span style="color: #009900">Opts</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#009900">RawFile</font>} <font color="#990000">=</font> <b><font color="#000000">file:open</font></b>(<font color="#009900">Filename</font>, [<font color="#FF6600">raw</font>, <font color="#FF6600">read</font>, <b><font color="#000080">binary</font></b>]),
+{<font color="#FF6600">ok</font>, <font color="#009900">SentBytes</font>} <font color="#990000">=</font> <font color="#009900">Transport</font><font color="#990000">:</font><b><font color="#000000">sendfile</font></b>(<font color="#009900">Socket</font>, <font color="#009900">RawFile</font>, <font color="#009900">Offset</font>, <font color="#009900">Bytes</font>, <font color="#009900">Opts</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_writing_a_transport_handler">Writing a transport handler</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A transport handler is a module implementing the <code>ranch_transport</code> behavior.
-It defines a certain number of callbacks that must be written in order to
-allow transparent usage of the transport handler.</p></div>
-<div class="paragraph"><p>The behavior doesn&#8217;t define the socket options available when opening a
-socket. These do not need to be common to all transports as it&#8217;s easy enough
-to write different initialization functions for the different transports that
-will be used. With one exception though. The <code>setopts/2</code> function <strong>must</strong>
-implement the <code>{active, once}</code> and the <code>{active, true}</code> options.</p></div>
-<div class="paragraph"><p>If the transport handler doesn&#8217;t have a native implementation of <code>sendfile/5</code> a
-fallback is available, <code>ranch_transport:sendfile/6</code>. The extra first argument
-is the transport&#8217;s module. See <code>ranch_ssl</code> for an example.</p></div>
-</div>
-</div>
+<p>A transport handler is a module implementing the <code>ranch_transport</code> behavior. It defines a certain number of callbacks that must be written in order to allow transparent usage of the transport handler.</p>
+<p>The behavior doesn&apos;t define the socket options available when opening a socket. These do not need to be common to all transports as it&apos;s easy enough to write different initialization functions for the different transports that will be used. With one exception though. The <code>setopts/2</code> function <strong>must</strong> implement the <code>{active, once}</code> and the <code>{active, true}</code> options.</p>
+<p>If the transport handler doesn&apos;t have a native implementation of <code>sendfile/5</code> a fallback is available, <code>ranch_transport:sendfile/6</code>. The extra first argument is the transport&apos;s module. See <code>ranch_ssl</code> for an example.</p>
+
@@ -291,6 +219,8 @@ is the transport&#8217;s module. See <code>ranch_ssl</code> for an example.</p><
+ <li><a href="/docs/en/ranch/1.5/guide">1.5</a></li>
+
<li><a href="/docs/en/ranch/1.4/guide">1.4</a></li>
<li><a href="/docs/en/ranch/1.3/guide">1.3</a></li>
diff --git a/docs/en/ranch/1.3/manual/index.html b/docs/en/ranch/1.3/manual/index.html
index 3e9ec4eb..a3d157c5 100644
--- a/docs/en/ranch/1.3/manual/index.html
+++ b/docs/en/ranch/1.3/manual/index.html
@@ -62,38 +62,20 @@
<h1 class="lined-header"><span>Ranch Function Reference</span></h1>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="ranch_app">ranch(7)</a>
-</p>
+<ul><li><a href="ranch_app">ranch(7)</a>
</li>
-<li>
-<p>
-<a href="ranch">ranch(3)</a>
-</p>
+<li><a href="ranch">ranch(3)</a>
</li>
-<li>
-<p>
-<a href="ranch_protocol">ranch_protocol(3)</a>
-</p>
+<li><a href="ranch_protocol">ranch_protocol(3)</a>
</li>
-<li>
-<p>
-<a href="ranch_ssl">ranch_ssl(3)</a>
-</p>
+<li><a href="ranch_ssl">ranch_ssl(3)</a>
</li>
-<li>
-<p>
-<a href="ranch_tcp">ranch_tcp(3)</a>
-</p>
+<li><a href="ranch_tcp">ranch_tcp(3)</a>
</li>
-<li>
-<p>
-<a href="ranch_transport">ranch_transport(3)</a>
-</p>
+<li><a href="ranch_transport">ranch_transport(3)</a>
</li>
-</ul></div>
+</ul>
+
@@ -128,6 +110,8 @@
+ <li><a href="/docs/en/ranch/1.5/manual">1.5</a></li>
+
<li><a href="/docs/en/ranch/1.4/manual">1.4</a></li>
<li><a href="/docs/en/ranch/1.3/manual">1.3</a></li>
diff --git a/docs/en/ranch/1.3/manual/ranch/index.html b/docs/en/ranch/1.3/manual/ranch/index.html
index d1897b1d..d4c74209 100644
--- a/docs/en/ranch/1.3/manual/ranch/index.html
+++ b/docs/en/ranch/1.3/manual/ranch/index.html
@@ -62,558 +62,228 @@
<h1 class="lined-header"><span>ranch(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>ranch - socket acceptor pool</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>ranch - socket acceptor pool</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <code>ranch</code> module provides functions for starting and
-manipulating Ranch listeners.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The <code>ranch</code> module provides functions for starting and manipulating Ranch listeners.</p>
<h2 id="_types">Types</h2>
-<div class="sectionbody">
-<div class="sect2">
-<h3 id="_max_conns_non_neg_integer_infinity">max_conns() = non_neg_integer() | infinity</h3>
-<div class="paragraph"><p>Maximum number of connections allowed on this listener.</p></div>
-<div class="paragraph"><p>This is a soft limit. The actual number of connections
-might be slightly above the limit due to concurrency
-when accepting new connections. Some connections may
-also be removed from this count explicitly by the user
-code.</p></div>
-</div>
-<div class="sect2">
+<h3 id="_max_conns_____non_neg_integer_____infinity">max_conns() = non_neg_integer() | infinity</h3>
+<p>Maximum number of connections allowed on this listener.</p>
+<p>This is a soft limit. The actual number of connections might be slightly above the limit due to concurrency when accepting new connections. Some connections may also be removed from this count explicitly by the user code.</p>
<h3 id="_opt">opt()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">opt</span></span>() <span style="color: #990000">=</span> {<span style="color: #FF6600">ack_timeout</span>, <span style="font-weight: bold"><span style="color: #000000">timeout</span></span>()}
- | {<span style="color: #FF6600">connection_type</span>, <span style="color: #FF6600">worker</span> | <span style="color: #FF6600">supervisor</span>}
- | {<span style="color: #FF6600">max_connections</span>, <span style="font-weight: bold"><span style="color: #000000">max_conns</span></span>()}
- | {<span style="color: #000080">shutdown</span>, <span style="font-weight: bold"><span style="color: #000000">timeout</span></span>() | <span style="color: #FF6600">brutal_kill</span>}
- | {<span style="color: #FF6600">socket</span>, <span style="font-weight: bold"><span style="color: #000000">any</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>Ranch-specific transport options.</p></div>
-<div class="paragraph"><p>These options are not passed on to the transports.
-They are used by Ranch while setting up the listeners.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_ref_any">ref() = any()</h3>
-<div class="paragraph"><p>Unique name used to refer to a listener.</p></div>
-</div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">opt</font></b>() <font color="#990000">=</font> {<font color="#FF6600">ack_timeout</font>, <b><font color="#000000">timeout</font></b>()}
+ | {<font color="#FF6600">connection_type</font>, <font color="#FF6600">worker</font> | <font color="#FF6600">supervisor</font>}
+ | {<font color="#FF6600">max_connections</font>, <b><font color="#000000">max_conns</font></b>()}
+ | {<font color="#000080">shutdown</font>, <b><font color="#000000">timeout</font></b>() | <font color="#FF6600">brutal_kill</font>}
+ | {<font color="#FF6600">socket</font>, <b><font color="#000000">any</font></b>()}</tt></pre>
+</div></div>
+<p>Ranch-specific transport options.</p>
+<p>These options are not passed on to the transports. They are used by Ranch while setting up the listeners.</p>
+<h3 id="_ref_____any">ref() = any()</h3>
+<p>Unique name used to refer to a listener.</p>
<h2 id="_option_descriptions">Option descriptions</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>None of the options are required.</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-ack_timeout (5000)
-</dt>
-<dd>
-<p>
- Maximum allowed time for the <code>ranch:accept_ack/1</code> call to finish.
-</p>
-</dd>
-<dt class="hdlist1">
-connection_type (worker)
-</dt>
-<dd>
-<p>
- Type of process that will handle the connection.
-</p>
-</dd>
-<dt class="hdlist1">
-max_connections (1024)
-</dt>
-<dd>
-<p>
- Maximum number of active connections. Soft limit. Using <code>infinity</code> will disable the limit entirely.
-</p>
-</dd>
-<dt class="hdlist1">
-shutdown (5000)
-</dt>
-<dd>
-<p>
- Maximum allowed time for children to stop on listener shutdown.
-</p>
-</dd>
-<dt class="hdlist1">
-socket
-</dt>
-<dd>
-<p>
- Listening socket opened externally to be used instead of calling <code>Transport:listen/1</code>.
-</p>
-</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+<p>None of the options are required.</p>
+<dl><dt>ack_timeout (5000)</dt>
+<dd><p>Maximum allowed time for the <code>ranch:accept_ack/1</code> call to finish.</p>
+</dd>
+<dt>connection_type (worker)</dt>
+<dd><p>Type of process that will handle the connection.</p>
+</dd>
+<dt>max_connections (1024)</dt>
+<dd><p>Maximum number of active connections. Soft limit. Using <code>infinity</code> will disable the limit entirely.</p>
+</dd>
+<dt>shutdown (5000)</dt>
+<dd><p>Maximum allowed time for children to stop on listener shutdown.</p>
+</dd>
+<dt>socket</dt>
+<dd><p>Listening socket opened externally to be used instead of calling <code>Transport:listen/1</code>.</p>
+</dd>
+</dl>
<h2 id="_exports">Exports</h2>
-<div class="sectionbody">
-<div class="sect2">
-<h3 id="_accept_ack_ref_8594_ok">accept_ack(Ref) &#8594; ok</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Ref = ref()
-</dt>
-<dd>
-<p>
-Listener name.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Acknowledge that the connection is accepted.</p></div>
-<div class="paragraph"><p>This function MUST be used by a connection process to inform
-Ranch that it initialized properly and let it perform any
-additional operations before the socket can be safely used.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_child_spec_ref_numacceptors_transport_transopts_protocol_protoopts_8594_supervisor_child_spec">child_spec(Ref, NumAcceptors, Transport, TransOpts, Protocol, ProtoOpts) &#8594; supervisor:child_spec()</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Ref = ref()
-</dt>
-<dd>
-<p>
-Listener name.
-</p>
-</dd>
-<dt class="hdlist1">
-NumAcceptors = non_neg_integer()
-</dt>
-<dd>
-<p>
-Number of acceptor processes.
-</p>
-</dd>
-<dt class="hdlist1">
-Transport = module()
-</dt>
-<dd>
-<p>
-Transport module.
-</p>
-</dd>
-<dt class="hdlist1">
-TransOpts = any()
-</dt>
-<dd>
-<p>
-Transport options.
-</p>
-</dd>
-<dt class="hdlist1">
-Protocol = module()
-</dt>
-<dd>
-<p>
-Protocol module.
-</p>
-</dd>
-<dt class="hdlist1">
-ProtoOpts = any()
-</dt>
-<dd>
-<p>
-Protocol options.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Return child specifications for a new listener.</p></div>
-<div class="paragraph"><p>This function can be used to embed a listener directly
-in an application instead of letting Ranch handle it.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_get_addr_ref_8594_ip_port">get_addr(Ref) &#8594; {IP, Port}</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Ref = ref()
-</dt>
-<dd>
-<p>
-Listener name.
-</p>
-</dd>
-<dt class="hdlist1">
-IP = inet:ip_address()
-</dt>
-<dd>
-<p>
-IP of the interface used by this listener.
-</p>
-</dd>
-<dt class="hdlist1">
-Port = inet:port_number()
-</dt>
-<dd>
-<p>
-Port number used by this listener.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Return the IP address and port for the given listener.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_get_max_connections_ref_8594_maxconns">get_max_connections(Ref) &#8594; MaxConns</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Ref = ref()
-</dt>
-<dd>
-<p>
-Listener name.
-</p>
-</dd>
-<dt class="hdlist1">
-MaxConns = max_conns()
-</dt>
-<dd>
-<p>
-Current maximum number of connections.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Return the max number of connections allowed for the given listener.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_get_port_ref_8594_port">get_port(Ref) &#8594; Port</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Ref = ref()
-</dt>
-<dd>
-<p>
-Listener name.
-</p>
-</dd>
-<dt class="hdlist1">
-Port = inet:port_number()
-</dt>
-<dd>
-<p>
-Port number used by this listener.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Return the port for the given listener.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_get_protocol_options_ref_8594_protoopts">get_protocol_options(Ref) &#8594; ProtoOpts</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Ref = ref()
-</dt>
-<dd>
-<p>
-Listener name.
-</p>
-</dd>
-<dt class="hdlist1">
-ProtoOpts = any()
-</dt>
-<dd>
-<p>
-Current protocol options.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Return the protocol options set for the given listener.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_info_8594_ref_key_value">info() &#8594; [{Ref, [{Key, Value}]}]</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Ref = ref()
-</dt>
-<dd>
-<p>
-Listener name.
-</p>
-</dd>
-<dt class="hdlist1">
-Key = atom()
-</dt>
-<dd>
-<p>
-Information key.
-</p>
-</dd>
-<dt class="hdlist1">
-Value = any()
-</dt>
-<dd>
-<p>
-Information value.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Return detailed information about all Ranch listeners.</p></div>
-<div class="paragraph"><p>The following keys are defined:</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-pid
-</dt>
-<dd>
-<p>
-Pid of the listener&#8217;s top-level supervisor.
-</p>
-</dd>
-<dt class="hdlist1">
-ip
-</dt>
-<dd>
-<p>
-Interface Ranch listens on.
-</p>
-</dd>
-<dt class="hdlist1">
-port
-</dt>
-<dd>
-<p>
-Port number Ranch listens on.
-</p>
-</dd>
-<dt class="hdlist1">
-num_acceptors
-</dt>
-<dd>
-<p>
-Number of acceptor processes.
-</p>
-</dd>
-<dt class="hdlist1">
-max_connections
-</dt>
-<dd>
-<p>
-Maximum number of connections.
-</p>
-</dd>
-<dt class="hdlist1">
-active_connections
-</dt>
-<dd>
-<p>
-Number of active connections.
-</p>
-</dd>
-<dt class="hdlist1">
-all_connections
-</dt>
-<dd>
-<p>
-Number of connections, including those removed from the count.
-</p>
-</dd>
-<dt class="hdlist1">
-transport
-</dt>
-<dd>
-<p>
-Transport module.
-</p>
-</dd>
-<dt class="hdlist1">
-transport_options
-</dt>
-<dd>
-<p>
-Transport options.
-</p>
-</dd>
-<dt class="hdlist1">
-protocol
-</dt>
-<dd>
-<p>
-Protocol module.
-</p>
-</dd>
-<dt class="hdlist1">
-protocol_options
-</dt>
-<dd>
-<p>
-Protocol options.
-</p>
-</dd>
-</dl></div>
-</div>
-<div class="sect2">
-<h3 id="_procs_ref_acceptors_connections_8594_pid">procs(Ref, acceptors | connections) &#8594; [pid()]</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Ref = ref()
-</dt>
-<dd>
-<p>
-Listener name.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Return all acceptor or connection processes for one listener.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_remove_connection_ref_8594_ok">remove_connection(Ref) &#8594; ok</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Ref = ref()
-</dt>
-<dd>
-<p>
-Listener name.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Do not count this connection when limiting the number of connections.</p></div>
-<div class="paragraph"><p>You can use this function for long-running connection processes
-which spend most of their time idling rather than consuming
-resources. This allows Ranch to accept a lot more connections
-without sacrificing the latency of the system.</p></div>
-<div class="paragraph"><p>This function may only be called from a connection process.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_set_max_connections_ref_maxconns_8594_ok">set_max_connections(Ref, MaxConns) &#8594; ok</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Ref = ref()
-</dt>
-<dd>
-<p>
-Listener name.
-</p>
-</dd>
-<dt class="hdlist1">
-MaxConns = max_conns()
-</dt>
-<dd>
-<p>
-New maximum number of connections.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Set the max number of connections for the given listener.</p></div>
-<div class="paragraph"><p>The change will be applied immediately. If the new value is
-smaller than the previous one, Ranch will not kill the extra
-connections, but will wait for them to terminate properly.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_set_protocol_options_ref_protoopts_8594_ok">set_protocol_options(Ref, ProtoOpts) &#8594; ok</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Ref = ref()
-</dt>
-<dd>
-<p>
-Listener name.
-</p>
-</dd>
-<dt class="hdlist1">
-ProtoOpts = any()
-</dt>
-<dd>
-<p>
-New protocol options.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Set the protocol options for the given listener.</p></div>
-<div class="paragraph"><p>The change will be applied immediately for all new connections.
-Old connections will not receive the new options.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_start_listener_ref_numacceptors_transport_transopts_protocol_protoopts_8594_ok_pid_error_badarg">start_listener(Ref, NumAcceptors, Transport, TransOpts, Protocol, ProtoOpts) &#8594; {ok, pid()} | {error, badarg}</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Ref = ref()
-</dt>
-<dd>
-<p>
-Listener name.
-</p>
-</dd>
-<dt class="hdlist1">
-NumAcceptors = non_neg_integer()
-</dt>
-<dd>
-<p>
-Number of acceptor processes.
-</p>
-</dd>
-<dt class="hdlist1">
-Transport = module()
-</dt>
-<dd>
-<p>
-Transport module.
-</p>
-</dd>
-<dt class="hdlist1">
-TransOpts = any()
-</dt>
-<dd>
-<p>
-Transport options.
-</p>
-</dd>
-<dt class="hdlist1">
-Protocol = module()
-</dt>
-<dd>
-<p>
-Protocol module.
-</p>
-</dd>
-<dt class="hdlist1">
-ProtoOpts = any()
-</dt>
-<dd>
-<p>
-Protocol options.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Start listening for connections using the given transport
-and protocol. Returns the pid for this listener&#8217;s supervisor.</p></div>
-<div class="paragraph"><p>There are additional transport options that apply
-regardless of transport. They allow configuring how the
-connections are supervised, rate limited and more. Please
-consult the previous section for more details.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_stop_listener_ref_8594_ok_error_not_found">stop_listener(Ref) &#8594; ok | {error, not_found}</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Ref = ref()
-</dt>
-<dd>
-<p>
-Listener name.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Stop the given listener.</p></div>
-<div class="paragraph"><p>The listener is stopped gracefully, first by closing the
-listening port, then by stopping the connection processes.
-These processes are stopped according to the <code>shutdown</code>
-transport option, which may be set to brutally kill all
-connection processes or give them some time to stop properly.</p></div>
-<div class="paragraph"><p>This function does not return until the listener is
-completely stopped.</p></div>
-</div>
-</div>
-</div>
+<h3 id="_accept_ack_ref_____ok">accept_ack(Ref) -&gt; ok</h3>
+<dl><dt>Ref = ref()</dt>
+<dd><p>Listener name.</p>
+</dd>
+</dl>
+<p>Acknowledge that the connection is accepted.</p>
+<p>This function MUST be used by a connection process to inform Ranch that it initialized properly and let it perform any additional operations before the socket can be safely used.</p>
+<h3 id="_child_spec_ref__numacceptors__transport__transopts__protocol__protoopts_____supervisor_child_spec">child_spec(Ref, NumAcceptors, Transport, TransOpts, Protocol, ProtoOpts) -&gt; supervisor:child_spec()</h3>
+<dl><dt>Ref = ref()</dt>
+<dd><p>Listener name.</p>
+</dd>
+<dt>NumAcceptors = non_neg_integer()</dt>
+<dd><p>Number of acceptor processes.</p>
+</dd>
+<dt>Transport = module()</dt>
+<dd><p>Transport module.</p>
+</dd>
+<dt>TransOpts = any()</dt>
+<dd><p>Transport options.</p>
+</dd>
+<dt>Protocol = module()</dt>
+<dd><p>Protocol module.</p>
+</dd>
+<dt>ProtoOpts = any()</dt>
+<dd><p>Protocol options.</p>
+</dd>
+</dl>
+<p>Return child specifications for a new listener.</p>
+<p>This function can be used to embed a listener directly in an application instead of letting Ranch handle it.</p>
+<h3 id="_get_addr_ref______ip__port">get_addr(Ref) -&gt; {IP, Port}</h3>
+<dl><dt>Ref = ref()</dt>
+<dd><p>Listener name.</p>
+</dd>
+<dt>IP = inet:ip_address()</dt>
+<dd><p>IP of the interface used by this listener.</p>
+</dd>
+<dt>Port = inet:port_number()</dt>
+<dd><p>Port number used by this listener.</p>
+</dd>
+</dl>
+<p>Return the IP address and port for the given listener.</p>
+<h3 id="_get_max_connections_ref_____maxconns">get_max_connections(Ref) -&gt; MaxConns</h3>
+<dl><dt>Ref = ref()</dt>
+<dd><p>Listener name.</p>
+</dd>
+<dt>MaxConns = max_conns()</dt>
+<dd><p>Current maximum number of connections.</p>
+</dd>
+</dl>
+<p>Return the max number of connections allowed for the given listener.</p>
+<h3 id="_get_port_ref_____port">get_port(Ref) -&gt; Port</h3>
+<dl><dt>Ref = ref()</dt>
+<dd><p>Listener name.</p>
+</dd>
+<dt>Port = inet:port_number()</dt>
+<dd><p>Port number used by this listener.</p>
+</dd>
+</dl>
+<p>Return the port for the given listener.</p>
+<h3 id="_get_protocol_options_ref_____protoopts">get_protocol_options(Ref) -&gt; ProtoOpts</h3>
+<dl><dt>Ref = ref()</dt>
+<dd><p>Listener name.</p>
+</dd>
+<dt>ProtoOpts = any()</dt>
+<dd><p>Current protocol options.</p>
+</dd>
+</dl>
+<p>Return the protocol options set for the given listener.</p>
+<h3 id="_info________ref____key__value">info() -&gt; [{Ref, [{Key, Value}]}]</h3>
+<dl><dt>Ref = ref()</dt>
+<dd><p>Listener name.</p>
+</dd>
+<dt>Key = atom()</dt>
+<dd><p>Information key.</p>
+</dd>
+<dt>Value = any()</dt>
+<dd><p>Information value.</p>
+</dd>
+</dl>
+<p>Return detailed information about all Ranch listeners.</p>
+<p>The following keys are defined:</p>
+<dl><dt>pid</dt>
+<dd><p>Pid of the listener&apos;s top-level supervisor.</p>
+</dd>
+<dt>ip</dt>
+<dd><p>Interface Ranch listens on.</p>
+</dd>
+<dt>port</dt>
+<dd><p>Port number Ranch listens on.</p>
+</dd>
+<dt>num_acceptors</dt>
+<dd><p>Number of acceptor processes.</p>
+</dd>
+<dt>max_connections</dt>
+<dd><p>Maximum number of connections.</p>
+</dd>
+<dt>active_connections</dt>
+<dd><p>Number of active connections.</p>
+</dd>
+<dt>all_connections</dt>
+<dd><p>Number of connections, including those removed from the count.</p>
+</dd>
+<dt>transport</dt>
+<dd><p>Transport module.</p>
+</dd>
+<dt>transport_options</dt>
+<dd><p>Transport options.</p>
+</dd>
+<dt>protocol</dt>
+<dd><p>Protocol module.</p>
+</dd>
+<dt>protocol_options</dt>
+<dd><p>Protocol options.</p>
+</dd>
+</dl>
+<h3 id="_procs_ref__acceptors___connections______pid">procs(Ref, acceptors | connections) -&gt; [pid()]</h3>
+<dl><dt>Ref = ref()</dt>
+<dd><p>Listener name.</p>
+</dd>
+</dl>
+<p>Return all acceptor or connection processes for one listener.</p>
+<h3 id="_remove_connection_ref_____ok">remove_connection(Ref) -&gt; ok</h3>
+<dl><dt>Ref = ref()</dt>
+<dd><p>Listener name.</p>
+</dd>
+</dl>
+<p>Do not count this connection when limiting the number of connections.</p>
+<p>You can use this function for long-running connection processes which spend most of their time idling rather than consuming resources. This allows Ranch to accept a lot more connections without sacrificing the latency of the system.</p>
+<p>This function may only be called from a connection process.</p>
+<h3 id="_set_max_connections_ref__maxconns_____ok">set_max_connections(Ref, MaxConns) -&gt; ok</h3>
+<dl><dt>Ref = ref()</dt>
+<dd><p>Listener name.</p>
+</dd>
+<dt>MaxConns = max_conns()</dt>
+<dd><p>New maximum number of connections.</p>
+</dd>
+</dl>
+<p>Set the max number of connections for the given listener.</p>
+<p>The change will be applied immediately. If the new value is smaller than the previous one, Ranch will not kill the extra connections, but will wait for them to terminate properly.</p>
+<h3 id="_set_protocol_options_ref__protoopts_____ok">set_protocol_options(Ref, ProtoOpts) -&gt; ok</h3>
+<dl><dt>Ref = ref()</dt>
+<dd><p>Listener name.</p>
+</dd>
+<dt>ProtoOpts = any()</dt>
+<dd><p>New protocol options.</p>
+</dd>
+</dl>
+<p>Set the protocol options for the given listener.</p>
+<p>The change will be applied immediately for all new connections. Old connections will not receive the new options.</p>
+<h3 id="_start_listener_ref__numacceptors__transport__transopts__protocol__protoopts______ok__pid_______error__badarg">start_listener(Ref, NumAcceptors, Transport, TransOpts, Protocol, ProtoOpts) -&gt; {ok, pid()} | {error, badarg}</h3>
+<dl><dt>Ref = ref()</dt>
+<dd><p>Listener name.</p>
+</dd>
+<dt>NumAcceptors = non_neg_integer()</dt>
+<dd><p>Number of acceptor processes.</p>
+</dd>
+<dt>Transport = module()</dt>
+<dd><p>Transport module.</p>
+</dd>
+<dt>TransOpts = any()</dt>
+<dd><p>Transport options.</p>
+</dd>
+<dt>Protocol = module()</dt>
+<dd><p>Protocol module.</p>
+</dd>
+<dt>ProtoOpts = any()</dt>
+<dd><p>Protocol options.</p>
+</dd>
+</dl>
+<p>Start listening for connections using the given transport and protocol. Returns the pid for this listener&apos;s supervisor.</p>
+<p>There are additional transport options that apply regardless of transport. They allow configuring how the connections are supervised, rate limited and more. Please consult the previous section for more details.</p>
+<h3 id="_stop_listener_ref_____ok____error__not_found">stop_listener(Ref) -&gt; ok | {error, not_found}</h3>
+<dl><dt>Ref = ref()</dt>
+<dd><p>Listener name.</p>
+</dd>
+</dl>
+<p>Stop the given listener.</p>
+<p>The listener is stopped gracefully, first by closing the listening port, then by stopping the connection processes. These processes are stopped according to the <code>shutdown</code> transport option, which may be set to brutally kill all connection processes or give them some time to stop properly.</p>
+<p>This function does not return until the listener is completely stopped.</p>
+
@@ -648,6 +318,8 @@ completely stopped.</p></div>
+ <li><a href="/docs/en/ranch/1.5/manual">1.5</a></li>
+
<li><a href="/docs/en/ranch/1.4/manual">1.4</a></li>
<li><a href="/docs/en/ranch/1.3/manual">1.3</a></li>
diff --git a/docs/en/ranch/1.3/manual/ranch_app/index.html b/docs/en/ranch/1.3/manual/ranch_app/index.html
index a63f6056..8ae52cde 100644
--- a/docs/en/ranch/1.3/manual/ranch_app/index.html
+++ b/docs/en/ranch/1.3/manual/ranch_app/index.html
@@ -62,41 +62,18 @@
<h1 class="lined-header"><span>ranch(7)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>ranch - Socket acceptor pool for TCP protocols.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>ranch - Socket acceptor pool for TCP protocols.</p>
<h2 id="_dependencies">Dependencies</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <code>ranch</code> application depends on the <code>ssl</code> application to
-start. It is used for handling secure connections, when the
-transport is <code>ranch_ssl</code>. It can be disabled if SSL is not
-used.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The <code>ranch</code> application depends on the <code>ssl</code> application to start. It is used for handling secure connections, when the transport is <code>ranch_ssl</code>. It can be disabled if SSL is not used.</p>
<h2 id="_environment">Environment</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <code>ranch</code> application defines one application environment
-configuration parameter.</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-profile (false)
-</dt>
-<dd>
-<p>
- When enabled, Ranch will start <code>eprof</code> profiling automatically.
-</p>
+<p>The <code>ranch</code> application defines one application environment configuration parameter.</p>
+<dl><dt>profile (false)</dt>
+<dd><p>When enabled, Ranch will start <code>eprof</code> profiling automatically.</p>
</dd>
-</dl></div>
-<div class="paragraph"><p>You can use the <code>ranch_app:profile_output/0</code> function to stop
-profiling and output the results to the files <em>procs.profile</em>
-and <em>total.profile</em>. Do not use in production.</p></div>
-</div>
-</div>
+</dl>
+<p>You can use the <code>ranch_app:profile_output/0</code> function to stop profiling and output the results to the files <em>procs.profile</em> and <em>total.profile</em>. Do not use in production.</p>
+
@@ -131,6 +108,8 @@ and <em>total.profile</em>. Do not use in production.</p></div>
+ <li><a href="/docs/en/ranch/1.5/manual">1.5</a></li>
+
<li><a href="/docs/en/ranch/1.4/manual">1.4</a></li>
<li><a href="/docs/en/ranch/1.3/manual">1.3</a></li>
diff --git a/docs/en/ranch/1.3/manual/ranch_protocol/index.html b/docs/en/ranch/1.3/manual/ranch_protocol/index.html
index 0d9124cf..dde2746d 100644
--- a/docs/en/ranch/1.3/manual/ranch_protocol/index.html
+++ b/docs/en/ranch/1.3/manual/ranch_protocol/index.html
@@ -62,83 +62,33 @@
<h1 class="lined-header"><span>ranch_protocol(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>ranch_protocol - behaviour for protocol modules</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>ranch_protocol - behaviour for protocol modules</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <code>ranch_protocol</code> behaviour defines the interface used
-by Ranch protocols.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The <code>ranch_protocol</code> behaviour defines the interface used by Ranch protocols.</p>
<h2 id="_types">Types</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>None.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>None.</p>
<h2 id="_callbacks">Callbacks</h2>
-<div class="sectionbody">
-<div class="sect2">
-<h3 id="_start_link_ref_socket_transport_protoopts_8594_ok_pid_ok_pid_pid">start_link(Ref, Socket, Transport, ProtoOpts) &#8594; {ok, pid()} | {ok, pid(), pid()}</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Ref = ranch:ref()
-</dt>
-<dd>
-<p>
-Listener name.
-</p>
+<h3 id="_start_link_ref__socket__transport__protoopts______ok__pid_______ok__pid____pid">start_link(Ref, Socket, Transport, ProtoOpts) -&gt; {ok, pid()} | {ok, pid(), pid()}</h3>
+<dl><dt>Ref = ranch:ref()</dt>
+<dd><p>Listener name.</p>
</dd>
-<dt class="hdlist1">
-Socket = any()
-</dt>
-<dd>
-<p>
-Socket for this connection.
-</p>
+<dt>Socket = any()</dt>
+<dd><p>Socket for this connection.</p>
</dd>
-<dt class="hdlist1">
-Transport = module()
-</dt>
-<dd>
-<p>
-Transport module for this socket.
-</p>
+<dt>Transport = module()</dt>
+<dd><p>Transport module for this socket.</p>
</dd>
-<dt class="hdlist1">
-ProtoOpts = any()
-</dt>
-<dd>
-<p>
-Protocol options.
-</p>
+<dt>ProtoOpts = any()</dt>
+<dd><p>Protocol options.</p>
</dd>
-</dl></div>
-<div class="paragraph"><p>Start a new connection process for the given socket.</p></div>
-<div class="paragraph"><p>The only purpose of this callback is to start a process that
-will handle the socket. It must spawn the process, link and
-then return the new pid. This function will always be called
-from inside a supervisor.</p></div>
-<div class="paragraph"><p>This callback can also return two pids. The first pid is the
-pid of the process that will be supervised. The second pid is
-the pid of the process that will receive ownership of the
-socket. This second process must be a child of the first. This
-form is only available when <code>connection_type</code> is set to
-<code>supervisor</code>.</p></div>
-<div class="paragraph"><p>If any other value is returned, the supervisor will close the
-socket and assume no process has been started.</p></div>
-<div class="paragraph"><p>Do not perform any operations in this callback, as this would
-block the supervisor responsible for starting connection
-processes and degrade performance severely.</p></div>
-</div>
-</div>
-</div>
+</dl>
+<p>Start a new connection process for the given socket.</p>
+<p>The only purpose of this callback is to start a process that will handle the socket. It must spawn the process, link and then return the new pid. This function will always be called from inside a supervisor.</p>
+<p>This callback can also return two pids. The first pid is the pid of the process that will be supervised. The second pid is the pid of the process that will receive ownership of the socket. This second process must be a child of the first. This form is only available when <code>connection_type</code> is set to <code>supervisor</code>.</p>
+<p>If any other value is returned, the supervisor will close the socket and assume no process has been started.</p>
+<p>Do not perform any operations in this callback, as this would block the supervisor responsible for starting connection processes and degrade performance severely.</p>
+
@@ -173,6 +123,8 @@ processes and degrade performance severely.</p></div>
+ <li><a href="/docs/en/ranch/1.5/manual">1.5</a></li>
+
<li><a href="/docs/en/ranch/1.4/manual">1.4</a></li>
<li><a href="/docs/en/ranch/1.3/manual">1.3</a></li>
diff --git a/docs/en/ranch/1.3/manual/ranch_ssl/index.html b/docs/en/ranch/1.3/manual/ranch_ssl/index.html
index 1367b965..2132ad99 100644
--- a/docs/en/ranch/1.3/manual/ranch_ssl/index.html
+++ b/docs/en/ranch/1.3/manual/ranch_ssl/index.html
@@ -62,385 +62,174 @@
<h1 class="lined-header"><span>ranch_ssl(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>ranch_ssl - SSL transport module</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>ranch_ssl - SSL transport module</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <code>ranch_ssl</code> module implements an SSL Ranch transport.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The <code>ranch_ssl</code> module implements an SSL Ranch transport.</p>
<h2 id="_types">Types</h2>
-<div class="sectionbody">
-<div class="sect2">
<h3 id="_ssl_opt">ssl_opt()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">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>()}
- | {<span style="color: #FF6600">certfile</span>, <span style="font-weight: bold"><span style="color: #000000">string</span></span>()}
- | {<span style="color: #FF6600">ciphers</span>, [<span style="font-weight: bold"><span style="color: #000000">ssl:erl_cipher_suite</span></span>()] | <span style="font-weight: bold"><span style="color: #000000">string</span></span>()}
- | {<span style="color: #FF6600">client_renegotiation</span>, <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()}
- | {<span style="color: #FF6600">crl_cache</span>, {<span style="font-weight: bold"><span style="color: #000000">module</span></span>(), {<span style="color: #FF6600">internal</span> | <span style="font-weight: bold"><span style="color: #000000">any</span></span>(), <span style="font-weight: bold"><span style="color: #000080">list</span></span>()}}}
- | {<span style="color: #FF6600">crl_check</span>, <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>() | <span style="color: #FF6600">peer</span> | <span style="color: #FF6600">best_effort</span>}
- | {<span style="color: #FF6600">depth</span>, <span style="color: #993399">0</span><span style="color: #990000">..</span><span style="color: #993399">255</span>}
- | {<span style="color: #FF6600">dh</span>, <span style="font-weight: bold"><span style="color: #000000">public_key:der_encoded</span></span>()}
- | {<span style="color: #FF6600">dhfile</span>, <span style="font-weight: bold"><span style="color: #000000">string</span></span>()}
- | {<span style="color: #FF6600">fail_if_no_peer_cert</span>, <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()}
- | {<span style="color: #FF6600">hibernate_after</span>, <span style="font-weight: bold"><span style="color: #000080">integer</span></span>() | <span style="color: #000080">undefined</span>}
- | {<span style="color: #FF6600">honor_cipher_order</span>, <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()}
- | {<span style="color: #FF6600">key</span>, {<span style="color: #FF6600">'RSAPrivateKey'</span> | <span style="color: #FF6600">'DSAPrivateKey'</span> | <span style="color: #FF6600">'PrivateKeyInfo'</span>, <span style="font-weight: bold"><span style="color: #000000">public_key:der_encoded</span></span>()}}
- | {<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>()}
- | {<span style="color: #FF6600">reuse_session</span>, <span style="font-weight: bold"><span style="color: #0000FF">fun</span></span>()}
- | {<span style="color: #FF6600">reuse_sessions</span>, <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()}
- | {<span style="color: #FF6600">secure_renegotiate</span>, <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()}
- | {<span style="color: #FF6600">signature_algs</span>, [{<span style="font-weight: bold"><span style="color: #000080">atom</span></span>(), <span style="font-weight: bold"><span style="color: #000080">atom</span></span>()}]}
- | {<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>
-<div class="paragraph"><p>SSL-specific listen options.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_opt_ranch_tcp_opt_ssl_opt">opt() = ranch_tcp:opt() | ssl_opt()</h3>
-<div class="paragraph"><p>Listen options.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_opts_opt">opts() = [opt()]</h3>
-<div class="paragraph"><p>List of listen options.</p></div>
-</div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">ssl_opt</font></b>() <font color="#990000">=</font> {<font color="#FF6600">alpn_preferred_protocols</font>, [<b><font color="#000080">binary</font></b>()]}
+ | {<font color="#FF6600">beast_mitigation</font>, <font color="#FF6600">one_n_minus_one</font> | <font color="#FF6600">zero_n</font> | <font color="#FF6600">disabled</font>}
+ | {<font color="#FF6600">cacertfile</font>, <b><font color="#000000">string</font></b>()}
+ | {<font color="#FF6600">cacerts</font>, [<b><font color="#000000">public_key:der_encoded</font></b>()]}
+ | {<font color="#FF6600">cert</font>, <b><font color="#000000">public_key:der_encoded</font></b>()}
+ | {<font color="#FF6600">certfile</font>, <b><font color="#000000">string</font></b>()}
+ | {<font color="#FF6600">ciphers</font>, [<b><font color="#000000">ssl:erl_cipher_suite</font></b>()] | <b><font color="#000000">string</font></b>()}
+ | {<font color="#FF6600">client_renegotiation</font>, <b><font color="#000000">boolean</font></b>()}
+ | {<font color="#FF6600">crl_cache</font>, {<b><font color="#000000">module</font></b>(), {<font color="#FF6600">internal</font> | <b><font color="#000000">any</font></b>(), <b><font color="#000080">list</font></b>()}}}
+ | {<font color="#FF6600">crl_check</font>, <b><font color="#000000">boolean</font></b>() | <font color="#FF6600">peer</font> | <font color="#FF6600">best_effort</font>}
+ | {<font color="#FF6600">depth</font>, <font color="#993399">0</font><font color="#990000">..</font><font color="#993399">255</font>}
+ | {<font color="#FF6600">dh</font>, <b><font color="#000000">public_key:der_encoded</font></b>()}
+ | {<font color="#FF6600">dhfile</font>, <b><font color="#000000">string</font></b>()}
+ | {<font color="#FF6600">fail_if_no_peer_cert</font>, <b><font color="#000000">boolean</font></b>()}
+ | {<font color="#FF6600">hibernate_after</font>, <b><font color="#000080">integer</font></b>() | <font color="#000080">undefined</font>}
+ | {<font color="#FF6600">honor_cipher_order</font>, <b><font color="#000000">boolean</font></b>()}
+ | {<font color="#FF6600">key</font>, {<font color="#FF6600">'RSAPrivateKey'</font> | <font color="#FF6600">'DSAPrivateKey'</font> | <font color="#FF6600">'PrivateKeyInfo'</font>, <b><font color="#000000">public_key:der_encoded</font></b>()}}
+ | {<font color="#FF6600">keyfile</font>, <b><font color="#000000">string</font></b>()}
+ | {<font color="#FF6600">log_alert</font>, <b><font color="#000000">boolean</font></b>()}
+ | {<font color="#FF6600">next_protocols_advertised</font>, [<b><font color="#000080">binary</font></b>()]}
+ | {<font color="#FF6600">padding_check</font>, <b><font color="#000000">boolean</font></b>()}
+ | {<font color="#FF6600">partial_chain</font>, <b><font color="#0000FF">fun</font></b>(([<b><font color="#000000">public_key:der_encoded</font></b>()]) <font color="#990000">-&gt;</font> {<font color="#FF6600">trusted_ca</font>, <b><font color="#000000">public_key:der_encoded</font></b>()} | <font color="#FF6600">unknown_ca</font>)}
+ | {<font color="#FF6600">password</font>, <b><font color="#000000">string</font></b>()}
+ | {<font color="#FF6600">psk_identity</font>, <b><font color="#000000">string</font></b>()}
+ | {<font color="#FF6600">reuse_session</font>, <b><font color="#0000FF">fun</font></b>()}
+ | {<font color="#FF6600">reuse_sessions</font>, <b><font color="#000000">boolean</font></b>()}
+ | {<font color="#FF6600">secure_renegotiate</font>, <b><font color="#000000">boolean</font></b>()}
+ | {<font color="#FF6600">signature_algs</font>, [{<b><font color="#000080">atom</font></b>(), <b><font color="#000080">atom</font></b>()}]}
+ | {<font color="#FF6600">sni_fun</font>, <b><font color="#0000FF">fun</font></b>()}
+ | {<font color="#FF6600">sni_hosts</font>, [{<b><font color="#000000">string</font></b>(), <b><font color="#000000">ssl_opt</font></b>()}]}
+ | {<font color="#FF6600">user_lookup_fun</font>, {<b><font color="#0000FF">fun</font></b>(), <b><font color="#000000">any</font></b>()}}
+ | {<font color="#FF6600">v2_hello_compatible</font>, <b><font color="#000000">boolean</font></b>()}
+ | {<font color="#FF6600">verify</font>, <b><font color="#000000">ssl:verify_type</font></b>()}
+ | {<font color="#FF6600">verify_fun</font>, {<b><font color="#0000FF">fun</font></b>(), <b><font color="#000000">any</font></b>()}}
+ | {<font color="#FF6600">versions</font>, [<b><font color="#000080">atom</font></b>()]}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>SSL-specific listen options.</p>
+<h3 id="_opt_____ranch_tcp_opt_____ssl_opt">opt() = ranch_tcp:opt() | ssl_opt()</h3>
+<p>Listen options.</p>
+<h3 id="_opts______opt">opts() = [opt()]</h3>
+<p>List of listen options.</p>
<h2 id="_option_descriptions">Option descriptions</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Specifying a certificate is mandatory, either through the <code>cert</code>
-or the <code>certfile</code> option. None of the other options are required.</p></div>
-<div class="paragraph"><p>The default value is given next to the option name.</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-alpn_preferred_protocols
-</dt>
-<dd>
-<p>
- Perform Application-Layer Protocol Negotiation with the given list of 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>
-<p>
- Path to PEM encoded trusted certificates file used to verify peer certificates.
-</p>
-</dd>
-<dt class="hdlist1">
-cacerts
-</dt>
-<dd>
-<p>
- List of DER encoded trusted certificates.
-</p>
-</dd>
-<dt class="hdlist1">
-cert
-</dt>
-<dd>
-<p>
- DER encoded user certificate.
-</p>
-</dd>
-<dt class="hdlist1">
-certfile
-</dt>
-<dd>
-<p>
- Path to the PEM encoded user certificate file. May also contain the private key.
-</p>
-</dd>
-<dt class="hdlist1">
-ciphers
-</dt>
-<dd>
-<p>
- List of ciphers that clients are allowed to use.
-</p>
-</dd>
-<dt class="hdlist1">
-client_renegotiation (true)
-</dt>
-<dd>
-<p>
- Whether to allow client-initiated renegotiation.
-</p>
-</dd>
-<dt class="hdlist1">
-crl_cache ({ssl_crl_cache, {internal, []}})
-</dt>
-<dd>
-<p>
- Customize the module used to cache Certificate Revocation Lists.
-</p>
-</dd>
-<dt class="hdlist1">
-crl_check (false)
-</dt>
-<dd>
-<p>
- Whether to perform CRL check on all certificates in the chain during validation.
-</p>
-</dd>
-<dt class="hdlist1">
-depth (1)
-</dt>
-<dd>
-<p>
- Maximum of intermediate certificates allowed in the certification path.
-</p>
-</dd>
-<dt class="hdlist1">
-dh
-</dt>
-<dd>
-<p>
- DER encoded Diffie-Hellman parameters.
-</p>
-</dd>
-<dt class="hdlist1">
-dhfile
-</dt>
-<dd>
-<p>
- Path to the PEM encoded Diffie-Hellman parameters file.
-</p>
-</dd>
-<dt class="hdlist1">
-fail_if_no_peer_cert (false)
-</dt>
-<dd>
-<p>
- Whether to refuse the connection if the client sends an empty certificate.
-</p>
-</dd>
-<dt class="hdlist1">
-hibernate_after (undefined)
-</dt>
-<dd>
-<p>
- Time in ms after which SSL socket processes go into hibernation to reduce memory usage.
-</p>
-</dd>
-<dt class="hdlist1">
-honor_cipher_order (false)
-</dt>
-<dd>
-<p>
- If true, use the server&#8217;s preference for cipher selection. If false, use the client&#8217;s preference.
-</p>
-</dd>
-<dt class="hdlist1">
-key
-</dt>
-<dd>
-<p>
- DER encoded user private key.
-</p>
-</dd>
-<dt class="hdlist1">
-keyfile
-</dt>
-<dd>
-<p>
- Path to the PEM encoded private key file, if different than the certfile.
-</p>
-</dd>
-<dt class="hdlist1">
-log_alert (true)
-</dt>
-<dd>
-<p>
- If false, error reports will not be displayed.
-</p>
-</dd>
-<dt class="hdlist1">
-next_protocols_advertised
-</dt>
-<dd>
-<p>
- List of protocols to send to the client if it supports the Next Protocol extension.
-</p>
-</dd>
-<dt class="hdlist1">
-nodelay (true)
-</dt>
-<dd>
-<p>
- Whether to enable TCP_NODELAY.
-</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>
-<p>
- Claim an intermediate CA in the chain as trusted.
-</p>
-</dd>
-<dt class="hdlist1">
-password
-</dt>
-<dd>
-<p>
- Password to the private key file, if password protected.
-</p>
-</dd>
-<dt class="hdlist1">
-psk_identity
-</dt>
-<dd>
-<p>
- Provide the given PSK identity hint to the client during the handshake.
-</p>
-</dd>
-<dt class="hdlist1">
-reuse_session
-</dt>
-<dd>
-<p>
- Custom policy to decide whether a session should be reused.
-</p>
-</dd>
-<dt class="hdlist1">
-reuse_sessions (false)
-</dt>
-<dd>
-<p>
- Whether to allow session reuse.
-</p>
-</dd>
-<dt class="hdlist1">
-secure_renegotiate (false)
-</dt>
-<dd>
-<p>
- Whether to reject renegotiation attempts that do not conform to RFC5746.
-</p>
-</dd>
-<dt class="hdlist1">
-signature_algs
-</dt>
-<dd>
-<p>
- The TLS signature algorithm extension may be used, from TLS 1.2, to negotiate which signature algorithm to use during the TLS handshake.
-</p>
-</dd>
-<dt class="hdlist1">
-sni_fun
-</dt>
-<dd>
-<p>
- Function called when the client requests a host using Server Name Indication. Returns options to apply.
-</p>
-</dd>
-<dt class="hdlist1">
-sni_hosts
-</dt>
-<dd>
-<p>
- Options to apply for the host that matches what the client requested with Server Name Indication.
-</p>
-</dd>
-<dt class="hdlist1">
-user_lookup_fun
-</dt>
-<dd>
-<p>
- Function called to determine the shared secret when using PSK, or provide parameters when using SRP.
-</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>
-<p>
- Use <code>verify_peer</code> to request a certificate from the client.
-</p>
-</dd>
-<dt class="hdlist1">
-verify_fun
-</dt>
-<dd>
-<p>
- Custom policy to decide whether a client certificate is valid.
-</p>
-</dd>
-<dt class="hdlist1">
-versions
-</dt>
-<dd>
-<p>
- TLS protocol versions that will be supported.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Note that the client will not send a certificate unless the
-value for the <code>verify</code> option is set to <code>verify_peer</code>. This
-means that the <code>fail_if_no_peer_cert</code> only apply when combined
-with the <code>verify</code> option. The <code>verify_fun</code> option allows
-greater control over the client certificate validation.</p></div>
-<div class="paragraph"><p>The options <code>sni_fun</code> and <code>sni_hosts</code> are mutually exclusive.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Specifying a certificate is mandatory, either through the <code>cert</code> or the <code>certfile</code> option. None of the other options are required.</p>
+<p>The default value is given next to the option name.</p>
+<dl><dt>alpn_preferred_protocols</dt>
+<dd><p>Perform Application-Layer Protocol Negotiation with the given list of preferred protocols.</p>
+</dd>
+<dt>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>cacertfile</dt>
+<dd><p>Path to PEM encoded trusted certificates file used to verify peer certificates.</p>
+</dd>
+<dt>cacerts</dt>
+<dd><p>List of DER encoded trusted certificates.</p>
+</dd>
+<dt>cert</dt>
+<dd><p>DER encoded user certificate.</p>
+</dd>
+<dt>certfile</dt>
+<dd><p>Path to the PEM encoded user certificate file. May also contain the private key.</p>
+</dd>
+<dt>ciphers</dt>
+<dd><p>List of ciphers that clients are allowed to use.</p>
+</dd>
+<dt>client_renegotiation (true)</dt>
+<dd><p>Whether to allow client-initiated renegotiation.</p>
+</dd>
+<dt>crl_cache ({ssl_crl_cache, {internal, []}})</dt>
+<dd><p>Customize the module used to cache Certificate Revocation Lists.</p>
+</dd>
+<dt>crl_check (false)</dt>
+<dd><p>Whether to perform CRL check on all certificates in the chain during validation.</p>
+</dd>
+<dt>depth (1)</dt>
+<dd><p>Maximum of intermediate certificates allowed in the certification path.</p>
+</dd>
+<dt>dh</dt>
+<dd><p>DER encoded Diffie-Hellman parameters.</p>
+</dd>
+<dt>dhfile</dt>
+<dd><p>Path to the PEM encoded Diffie-Hellman parameters file.</p>
+</dd>
+<dt>fail_if_no_peer_cert (false)</dt>
+<dd><p>Whether to refuse the connection if the client sends an empty certificate.</p>
+</dd>
+<dt>hibernate_after (undefined)</dt>
+<dd><p>Time in ms after which SSL socket processes go into hibernation to reduce memory usage.</p>
+</dd>
+<dt>honor_cipher_order (false)</dt>
+<dd><p>If true, use the server&apos;s preference for cipher selection. If false, use the client&apos;s preference.</p>
+</dd>
+<dt>key</dt>
+<dd><p>DER encoded user private key.</p>
+</dd>
+<dt>keyfile</dt>
+<dd><p>Path to the PEM encoded private key file, if different than the certfile.</p>
+</dd>
+<dt>log_alert (true)</dt>
+<dd><p>If false, error reports will not be displayed.</p>
+</dd>
+<dt>next_protocols_advertised</dt>
+<dd><p>List of protocols to send to the client if it supports the Next Protocol extension.</p>
+</dd>
+<dt>nodelay (true)</dt>
+<dd><p>Whether to enable TCP_NODELAY.</p>
+</dd>
+<dt>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>partial_chain</dt>
+<dd><p>Claim an intermediate CA in the chain as trusted.</p>
+</dd>
+<dt>password</dt>
+<dd><p>Password to the private key file, if password protected.</p>
+</dd>
+<dt>psk_identity</dt>
+<dd><p>Provide the given PSK identity hint to the client during the handshake.</p>
+</dd>
+<dt>reuse_session</dt>
+<dd><p>Custom policy to decide whether a session should be reused.</p>
+</dd>
+<dt>reuse_sessions (false)</dt>
+<dd><p>Whether to allow session reuse.</p>
+</dd>
+<dt>secure_renegotiate (false)</dt>
+<dd><p>Whether to reject renegotiation attempts that do not conform to RFC5746.</p>
+</dd>
+<dt>signature_algs</dt>
+<dd><p>The TLS signature algorithm extension may be used, from TLS 1.2, to negotiate which signature algorithm to use during the TLS handshake.</p>
+</dd>
+<dt>sni_fun</dt>
+<dd><p>Function called when the client requests a host using Server Name Indication. Returns options to apply.</p>
+</dd>
+<dt>sni_hosts</dt>
+<dd><p>Options to apply for the host that matches what the client requested with Server Name Indication.</p>
+</dd>
+<dt>user_lookup_fun</dt>
+<dd><p>Function called to determine the shared secret when using PSK, or provide parameters when using SRP.</p>
+</dd>
+<dt>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>verify (verify_none)</dt>
+<dd><p>Use <code>verify_peer</code> to request a certificate from the client.</p>
+</dd>
+<dt>verify_fun</dt>
+<dd><p>Custom policy to decide whether a client certificate is valid.</p>
+</dd>
+<dt>versions</dt>
+<dd><p>TLS protocol versions that will be supported.</p>
+</dd>
+</dl>
+<p>Note that the client will not send a certificate unless the value for the <code>verify</code> option is set to <code>verify_peer</code>. This means that the <code>fail_if_no_peer_cert</code> only apply when combined with the <code>verify</code> option. The <code>verify_fun</code> option allows greater control over the client certificate validation.</p>
+<p>The options <code>sni_fun</code> and <code>sni_hosts</code> are mutually exclusive.</p>
<h2 id="_exports">Exports</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>None.</p></div>
-</div>
-</div>
+<p>None.</p>
+
@@ -475,6 +264,8 @@ greater control over the client certificate validation.</p></div>
+ <li><a href="/docs/en/ranch/1.5/manual">1.5</a></li>
+
<li><a href="/docs/en/ranch/1.4/manual">1.4</a></li>
<li><a href="/docs/en/ranch/1.3/manual">1.3</a></li>
diff --git a/docs/en/ranch/1.3/manual/ranch_tcp/index.html b/docs/en/ranch/1.3/manual/ranch_tcp/index.html
index 89c3b36a..157371ae 100644
--- a/docs/en/ranch/1.3/manual/ranch_tcp/index.html
+++ b/docs/en/ranch/1.3/manual/ranch_tcp/index.html
@@ -62,283 +62,127 @@
<h1 class="lined-header"><span>ranch_tcp(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>ranch_tcp - TCP transport module</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>ranch_tcp - TCP transport module</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <code>ranch_tcp</code> module implements a TCP Ranch transport.</p></div>
-<div class="paragraph"><p>Note that due to bugs in OTP up to at least R16B02, it is
-recommended to disable async threads when using the
-<code>sendfile</code> function of this transport, as it can make
-the threads stuck indefinitely.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The <code>ranch_tcp</code> module implements a TCP Ranch transport.</p>
+<p>Note that due to bugs in OTP up to at least R16B02, it is recommended to disable async threads when using the <code>sendfile</code> function of this transport, as it can make the threads stuck indefinitely.</p>
<h2 id="_types">Types</h2>
-<div class="sectionbody">
-<div class="sect2">
<h3 id="_opt">opt()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">opt</span></span>() <span style="color: #990000">=</span> {<span style="color: #FF6600">backlog</span>, <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>()}
- | {<span style="color: #FF6600">buffer</span>, <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>()}
- | {<span style="color: #FF6600">delay_send</span>, <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()}
- | {<span style="color: #FF6600">dontroute</span>, <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()}
- | {<span style="color: #FF6600">exit_on_close</span>, <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()}
- | {<span style="color: #FF6600">fd</span>, <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>()}
- | {<span style="color: #FF6600">high_msgq_watermark</span>, <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>()}
- | {<span style="color: #FF6600">high_watermark</span>, <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>()}
- | <span style="color: #FF6600">inet</span>
- | <span style="color: #FF6600">inet6</span>
- | {<span style="color: #FF6600">ip</span>, <span style="font-weight: bold"><span style="color: #000000">inet:ip_address</span></span>()}
- | {<span style="color: #FF6600">ipv6_v6only</span>, <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()}
- | {<span style="color: #FF6600">keepalive</span>, <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()}
- | {<span style="color: #FF6600">linger</span>, {<span style="font-weight: bold"><span style="color: #000000">boolean</span></span>(), <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>()}}
- | {<span style="color: #FF6600">low_msgq_watermark</span>, <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>()}
- | {<span style="color: #FF6600">low_watermark</span>, <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>()}
- | {<span style="color: #FF6600">nodelay</span>, <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()}
- | {<span style="color: #FF6600">port</span>, <span style="font-weight: bold"><span style="color: #000000">inet:port_number</span></span>()}
- | {<span style="font-weight: bold"><span style="color: #000080">priority</span></span>, <span style="font-weight: bold"><span style="color: #000080">integer</span></span>()}
- | {<span style="color: #FF6600">raw</span>, <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>(), <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>(), <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()}
- | {<span style="color: #FF6600">recbuf</span>, <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>()}
- | {<span style="color: #FF6600">send_timeout</span>, <span style="font-weight: bold"><span style="color: #000000">timeout</span></span>()}
- | {<span style="color: #FF6600">send_timeout_close</span>, <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()}
- | {<span style="color: #FF6600">sndbuf</span>, <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>()}
- | {<span style="color: #FF6600">tos</span>, <span style="font-weight: bold"><span style="color: #000080">integer</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>Listen options.</p></div>
-<div class="paragraph"><p>This does not represent the entirety of the options that can
-be set on the socket, but only the options that may be
-set independently of protocol implementation.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_opts_opt">opts() = [opt()]</h3>
-<div class="paragraph"><p>List of listen options.</p></div>
-</div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">opt</font></b>() <font color="#990000">=</font> {<font color="#FF6600">backlog</font>, <b><font color="#000000">non_neg_integer</font></b>()}
+ | {<font color="#FF6600">buffer</font>, <b><font color="#000000">non_neg_integer</font></b>()}
+ | {<font color="#FF6600">delay_send</font>, <b><font color="#000000">boolean</font></b>()}
+ | {<font color="#FF6600">dontroute</font>, <b><font color="#000000">boolean</font></b>()}
+ | {<font color="#FF6600">exit_on_close</font>, <b><font color="#000000">boolean</font></b>()}
+ | {<font color="#FF6600">fd</font>, <b><font color="#000000">non_neg_integer</font></b>()}
+ | {<font color="#FF6600">high_msgq_watermark</font>, <b><font color="#000000">non_neg_integer</font></b>()}
+ | {<font color="#FF6600">high_watermark</font>, <b><font color="#000000">non_neg_integer</font></b>()}
+ | <font color="#FF6600">inet</font>
+ | <font color="#FF6600">inet6</font>
+ | {<font color="#FF6600">ip</font>, <b><font color="#000000">inet:ip_address</font></b>()}
+ | {<font color="#FF6600">ipv6_v6only</font>, <b><font color="#000000">boolean</font></b>()}
+ | {<font color="#FF6600">keepalive</font>, <b><font color="#000000">boolean</font></b>()}
+ | {<font color="#FF6600">linger</font>, {<b><font color="#000000">boolean</font></b>(), <b><font color="#000000">non_neg_integer</font></b>()}}
+ | {<font color="#FF6600">low_msgq_watermark</font>, <b><font color="#000000">non_neg_integer</font></b>()}
+ | {<font color="#FF6600">low_watermark</font>, <b><font color="#000000">non_neg_integer</font></b>()}
+ | {<font color="#FF6600">nodelay</font>, <b><font color="#000000">boolean</font></b>()}
+ | {<font color="#FF6600">port</font>, <b><font color="#000000">inet:port_number</font></b>()}
+ | {<b><font color="#000080">priority</font></b>, <b><font color="#000080">integer</font></b>()}
+ | {<font color="#FF6600">raw</font>, <b><font color="#000000">non_neg_integer</font></b>(), <b><font color="#000000">non_neg_integer</font></b>(), <b><font color="#000080">binary</font></b>()}
+ | {<font color="#FF6600">recbuf</font>, <b><font color="#000000">non_neg_integer</font></b>()}
+ | {<font color="#FF6600">send_timeout</font>, <b><font color="#000000">timeout</font></b>()}
+ | {<font color="#FF6600">send_timeout_close</font>, <b><font color="#000000">boolean</font></b>()}
+ | {<font color="#FF6600">sndbuf</font>, <b><font color="#000000">non_neg_integer</font></b>()}
+ | {<font color="#FF6600">tos</font>, <b><font color="#000080">integer</font></b>()}</tt></pre>
+</div></div>
+<p>Listen options.</p>
+<p>This does not represent the entirety of the options that can be set on the socket, but only the options that may be set independently of protocol implementation.</p>
+<h3 id="_opts______opt">opts() = [opt()]</h3>
+<p>List of listen options.</p>
<h2 id="_option_descriptions">Option descriptions</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>None of the options are required.</p></div>
-<div class="paragraph"><p>Please consult the <code>gen_tcp</code> and <code>inet</code> manuals for a more
-thorough description of these options. This manual only aims
-to provide a short description along with what the defaults
-are. Defaults may be different in Ranch compared to <code>gen_tcp</code>.
-Defaults are given next to the option name.</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-backlog (1024)
-</dt>
-<dd>
-<p>
- Max length of the queue of pending connections.
-</p>
+<p>None of the options are required.</p>
+<p>Please consult the <code>gen_tcp</code> and <code>inet</code> manuals for a more thorough description of these options. This manual only aims to provide a short description along with what the defaults are. Defaults may be different in Ranch compared to <code>gen_tcp</code>. Defaults are given next to the option name.</p>
+<dl><dt>backlog (1024)</dt>
+<dd><p>Max length of the queue of pending connections.</p>
</dd>
-<dt class="hdlist1">
-buffer
-</dt>
-<dd>
-<p>
- Size of the buffer used by the Erlang driver. Default is system-dependent.
-</p>
+<dt>buffer</dt>
+<dd><p>Size of the buffer used by the Erlang driver. Default is system-dependent.</p>
</dd>
-<dt class="hdlist1">
-delay_send (false)
-</dt>
-<dd>
-<p>
- Always queue packets before sending, to send fewer, larger packets over the network.
-</p>
+<dt>delay_send (false)</dt>
+<dd><p>Always queue packets before sending, to send fewer, larger packets over the network.</p>
</dd>
-<dt class="hdlist1">
-dontroute (false)
-</dt>
-<dd>
-<p>
- Don&#8217;t send via a gateway, only send to directly connected hosts.
-</p>
+<dt>dontroute (false)</dt>
+<dd><p>Don&apos;t send via a gateway, only send to directly connected hosts.</p>
</dd>
-<dt class="hdlist1">
-exit_on_close (true)
-</dt>
-<dd>
-<p>
- Disable to allow sending data after a close has been detected.
-</p>
+<dt>exit_on_close (true)</dt>
+<dd><p>Disable to allow sending data after a close has been detected.</p>
</dd>
-<dt class="hdlist1">
-fd
-</dt>
-<dd>
-<p>
- File descriptor of the socket, if it was opened externally.
-</p>
+<dt>fd</dt>
+<dd><p>File descriptor of the socket, if it was opened externally.</p>
</dd>
-<dt class="hdlist1">
-high_msgq_watermark (8192)
-</dt>
-<dd>
-<p>
- Limit in the amount of data in the socket message queue before the socket queue becomes busy.
-</p>
+<dt>high_msgq_watermark (8192)</dt>
+<dd><p>Limit in the amount of data in the socket message queue before the socket queue becomes busy.</p>
</dd>
-<dt class="hdlist1">
-high_watermark (8192)
-</dt>
-<dd>
-<p>
- Limit in the amount of data in the ERTS socket implementation&#8217;s queue before the socket becomes busy.
-</p>
+<dt>high_watermark (8192)</dt>
+<dd><p>Limit in the amount of data in the ERTS socket implementation&apos;s queue before the socket becomes busy.</p>
</dd>
-<dt class="hdlist1">
-inet
-</dt>
-<dd>
-<p>
- Set up the socket for IPv4.
-</p>
+<dt>inet</dt>
+<dd><p>Set up the socket for IPv4.</p>
</dd>
-<dt class="hdlist1">
-inet6
-</dt>
-<dd>
-<p>
- Set up the socket for IPv6.
-</p>
+<dt>inet6</dt>
+<dd><p>Set up the socket for IPv6.</p>
</dd>
-<dt class="hdlist1">
-ip
-</dt>
-<dd>
-<p>
- Interface to listen on. Listen on all interfaces by default.
-</p>
+<dt>ip</dt>
+<dd><p>Interface to listen on. Listen on all interfaces by default.</p>
</dd>
-<dt class="hdlist1">
-ipv6_v6only (false)
-</dt>
-<dd>
-<p>
- Listen on IPv4 and IPv6 (false) or only on IPv6 (true). Use with inet6.
-</p>
+<dt>ipv6_v6only (false)</dt>
+<dd><p>Listen on IPv4 and IPv6 (false) or only on IPv6 (true). Use with inet6.</p>
</dd>
-<dt class="hdlist1">
-keepalive (false)
-</dt>
-<dd>
-<p>
- Enable sending of keep-alive messages.
-</p>
+<dt>keepalive (false)</dt>
+<dd><p>Enable sending of keep-alive messages.</p>
</dd>
-<dt class="hdlist1">
-linger ({false, 0})
-</dt>
-<dd>
-<p>
- Whether to wait and how long to flush data sent before closing the socket.
-</p>
+<dt>linger ({false, 0})</dt>
+<dd><p>Whether to wait and how long to flush data sent before closing the socket.</p>
</dd>
-<dt class="hdlist1">
-low_msgq_watermark (4096)
-</dt>
-<dd>
-<p>
- Amount of data in the socket message queue before the socket queue leaves busy state.
-</p>
+<dt>low_msgq_watermark (4096)</dt>
+<dd><p>Amount of data in the socket message queue before the socket queue leaves busy state.</p>
</dd>
-<dt class="hdlist1">
-low_watermark (4096)
-</dt>
-<dd>
-<p>
- Amount of data in the ERTS socket implementation&#8217;s queue before the socket leaves busy state.
-</p>
+<dt>low_watermark (4096)</dt>
+<dd><p>Amount of data in the ERTS socket implementation&apos;s queue before the socket leaves busy state.</p>
</dd>
-<dt class="hdlist1">
-nodelay (true)
-</dt>
-<dd>
-<p>
- Whether to enable TCP_NODELAY.
-</p>
+<dt>nodelay (true)</dt>
+<dd><p>Whether to enable TCP_NODELAY.</p>
</dd>
-<dt class="hdlist1">
-port (0)
-</dt>
-<dd>
-<p>
- TCP port number to listen on. 0 means a random port will be used.
-</p>
+<dt>port (0)</dt>
+<dd><p>TCP port number to listen on. 0 means a random port will be used.</p>
</dd>
-<dt class="hdlist1">
-priority (0)
-</dt>
-<dd>
-<p>
- Priority value for all packets to be sent by this socket.
-</p>
+<dt>priority (0)</dt>
+<dd><p>Priority value for all packets to be sent by this socket.</p>
</dd>
-<dt class="hdlist1">
-recbuf
-</dt>
-<dd>
-<p>
- Minimum size of the socket&#8217;s receive buffer. Default is system-dependent.
-</p>
+<dt>recbuf</dt>
+<dd><p>Minimum size of the socket&apos;s receive buffer. Default is system-dependent.</p>
</dd>
-<dt class="hdlist1">
-send_timeout (30000)
-</dt>
-<dd>
-<p>
- How long the send call may wait for confirmation before returning.
-</p>
+<dt>send_timeout (30000)</dt>
+<dd><p>How long the send call may wait for confirmation before returning.</p>
</dd>
-<dt class="hdlist1">
-send_timeout_close (true)
-</dt>
-<dd>
-<p>
- Whether to close the socket when the confirmation wasn&#8217;t received.
-</p>
+<dt>send_timeout_close (true)</dt>
+<dd><p>Whether to close the socket when the confirmation wasn&apos;t received.</p>
</dd>
-<dt class="hdlist1">
-sndbuf
-</dt>
-<dd>
-<p>
- Minimum size of the socket&#8217;s send buffer. Default is system-dependent.
-</p>
+<dt>sndbuf</dt>
+<dd><p>Minimum size of the socket&apos;s send buffer. Default is system-dependent.</p>
</dd>
-<dt class="hdlist1">
-tos
-</dt>
-<dd>
-<p>
- Value for the IP_TOS IP level option. Use with caution.
-</p>
+<dt>tos</dt>
+<dd><p>Value for the IP_TOS IP level option. Use with caution.</p>
</dd>
-</dl></div>
-<div class="paragraph"><p>In addition, the <code>raw</code> option can be used to set system-specific
-options by specifying the protocol level, the option number and
-the actual option value specified as a binary. This option is not
-portable. Use with caution.</p></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
+<p>In addition, the <code>raw</code> option can be used to set system-specific options by specifying the protocol level, the option number and the actual option value specified as a binary. This option is not portable. Use with caution.</p>
<h2 id="_exports">Exports</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>None.</p></div>
-</div>
-</div>
+<p>None.</p>
+
@@ -373,6 +217,8 @@ portable. Use with caution.</p></div>
+ <li><a href="/docs/en/ranch/1.5/manual">1.5</a></li>
+
<li><a href="/docs/en/ranch/1.4/manual">1.4</a></li>
<li><a href="/docs/en/ranch/1.3/manual">1.3</a></li>
diff --git a/docs/en/ranch/1.3/manual/ranch_transport/index.html b/docs/en/ranch/1.3/manual/ranch_transport/index.html
index 700559b6..ddce05ce 100644
--- a/docs/en/ranch/1.3/manual/ranch_transport/index.html
+++ b/docs/en/ranch/1.3/manual/ranch_transport/index.html
@@ -62,494 +62,198 @@
<h1 class="lined-header"><span>ranch_transport(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>ranch_transport - behaviour for transport modules</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>ranch_transport - behaviour for transport modules</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <code>ranch_transport</code> behaviour defines the interface used
-by Ranch transports.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The <code>ranch_transport</code> behaviour defines the interface used by Ranch transports.</p>
<h2 id="_types">Types</h2>
-<div class="sectionbody">
-<div class="sect2">
-<h3 id="_sendfile_opts_chunk_size_non_neg_integer">sendfile_opts() = [{chunk_size, non_neg_integer()}]</h3>
-<div class="paragraph"><p>Options used by the sendfile function and callbacks.</p></div>
-<div class="paragraph"><p>Allows configuring the chunk size, in bytes. Defaults to 8191 bytes.</p></div>
-</div>
-</div>
-</div>
-<div class="sect1">
+<h3 id="_sendfile_opts_______chunk_size__non_neg_integer">sendfile_opts() = [{chunk_size, non_neg_integer()}]</h3>
+<p>Options used by the sendfile function and callbacks.</p>
+<p>Allows configuring the chunk size, in bytes. Defaults to 8191 bytes.</p>
<h2 id="_callbacks">Callbacks</h2>
-<div class="sectionbody">
-<div class="sect2">
-<h3 id="_accept_lsocket_timeout_8594_ok_csocket_error_closed_timeout_atom">accept(LSocket, Timeout) &#8594; {ok, CSocket} | {error, closed | timeout | atom()}</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-LSocket = CSocket = any()
-</dt>
-<dd>
-<p>
-Listening socket.
-</p>
-</dd>
-<dt class="hdlist1">
-Timeout = timeout()
-</dt>
-<dd>
-<p>
-Accept timeout.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Accept a connection on the given listening socket.</p></div>
-<div class="paragraph"><p>The <code>accept_ack</code> callback will be used to initialize the socket
-after accepting the connection. This is most useful when the
-transport is not raw TCP, like with SSL for example.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_accept_ack_csocket_timeout_8594_ok">accept_ack(CSocket, Timeout) &#8594; ok</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-CSocket = any()
-</dt>
-<dd>
-<p>
-Socket for this connection.
-</p>
-</dd>
-<dt class="hdlist1">
-Timeout = timeout()
-</dt>
-<dd>
-<p>
-Ack timeout.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Perform post-accept initialization of the connection.</p></div>
-<div class="paragraph"><p>This function will be called by connection processes
-before performing any socket operation. It allows
-transports that require extra initialization to perform
-their task and make the socket ready to use.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_close_socket_8594_ok">close(Socket) &#8594; ok</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Socket = any()
-</dt>
-<dd>
-<p>
-Socket opened with listen/1 or accept/2.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Close the given socket.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_controlling_process_socket_pid_8594_ok_error_closed_not_owner_atom">controlling_process(Socket, Pid) &#8594; ok | {error, closed | not_owner | atom()}</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Socket = any()
-</dt>
-<dd>
-<p>
-Socket opened with listen/1 or accept/2.
-</p>
-</dd>
-<dt class="hdlist1">
-Pid = pid()
-</dt>
-<dd>
-<p>
-Pid of the new owner of the socket.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Change the controlling process for the given socket.</p></div>
-<div class="paragraph"><p>The controlling process is the process that is allowed to
-perform operations on the socket, and that will receive
-messages from the socket when active mode is used. When
-the controlling process dies, the socket is closed.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_listen_transopts_8594_ok_lsocket_error_atom">listen(TransOpts) &#8594; {ok, LSocket} | {error, atom()}</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-TransOpts = any()
-</dt>
-<dd>
-<p>
-Transport options.
-</p>
-</dd>
-<dt class="hdlist1">
-LSocket = any()
-</dt>
-<dd>
-<p>
-Listening socket.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Listen for connections on the given port.</p></div>
-<div class="paragraph"><p>The port is given as part of the transport options under
-the key <code>port</code>. Any other option is transport dependent.</p></div>
-<div class="paragraph"><p>The socket returned by this call can then be used to
-accept connections. It is not possible to send or receive
-data from the listening socket.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_messages_8594_ok_closed_error">messages() &#8594; {OK, Closed, Error}</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-OK = Closed = Error = atom()
-</dt>
-<dd>
-<p>
-Tuple names.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Return the atoms used to identify messages sent in active mode.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_name_8594_name">name() &#8594; Name</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Name = atom()
-</dt>
-<dd>
-<p>
-Transport module name.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Return the name of the transport.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_peername_csocket_8594_ok_ip_port_error_atom">peername(CSocket) &#8594; {ok, {IP, Port}} | {error, atom()}</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-CSocket = any()
-</dt>
-<dd>
-<p>
-Socket for this connection.
-</p>
-</dd>
-<dt class="hdlist1">
-IP = inet:ip_address()
-</dt>
-<dd>
-<p>
-IP of the remote endpoint.
-</p>
-</dd>
-<dt class="hdlist1">
-Port = inet:port_number()
-</dt>
-<dd>
-<p>
-Port of the remote endpoint.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Return the IP and port of the remote endpoint.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_recv_csocket_length_timeout_8594_ok_packet_error_closed_timeout_atom">recv(CSocket, Length, Timeout) &#8594; {ok, Packet} | {error, closed | timeout | atom()}</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-CSocket = any()
-</dt>
-<dd>
-<p>
-Socket for this connection.
-</p>
-</dd>
-<dt class="hdlist1">
-Length = non_neg_integer()
-</dt>
-<dd>
-<p>
-Requested length.
-</p>
-</dd>
-<dt class="hdlist1">
-Timeout = timeout()
-</dt>
-<dd>
-<p>
-Receive timeout.
-</p>
-</dd>
-<dt class="hdlist1">
-Packet = iodata() | any()
-</dt>
-<dd>
-<p>
-Data received.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Receive data from the given socket when in passive mode.</p></div>
-<div class="paragraph"><p>Trying to receive data from a socket that is in active mode
-will return an error.</p></div>
-<div class="paragraph"><p>A length of 0 will return any data available on the socket.</p></div>
-<div class="paragraph"><p>While it is possible to use the timeout value <code>infinity</code>,
-this is highly discouraged as this could cause your process
-to get stuck waiting for data that will never come. This may
-happen when a socket becomes half-open due to a crash of the
-remote endpoint. Wi-Fi going down is another common culprit
-of this issue.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_send_csocket_packet_8594_ok_error_atom">send(CSocket, Packet) &#8594; ok | {error, atom()}</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-CSocket = any()
-</dt>
-<dd>
-<p>
-Socket for this connection.
-</p>
-</dd>
-<dt class="hdlist1">
-Packet = iodata()
-</dt>
-<dd>
-<p>
-Data to be sent.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Send data to the given socket.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_sendfile_csocket_file_8594_sendfile_csocket_file_0_0">sendfile(CSocket, File) &#8594; sendfile(CSocket, File, 0, 0, [])</h3>
-<div class="paragraph"><p>Alias of <code>ranch_transport:sendfile/5</code>.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_sendfile_csocket_file_offset_bytes_8594_sendfile_csocket_file_offset_bytes">sendfile(CSocket, File, Offset, Bytes) &#8594; sendfile(CSocket, File, Offset, Bytes, [])</h3>
-<div class="paragraph"><p>Alias of <code>ranch_transport:sendfile/5</code>.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_sendfile_csocket_file_offset_bytes_sfopts_8594_ok_sentbytes_error_atom">sendfile(CSocket, File, Offset, Bytes, SfOpts) &#8594; {ok, SentBytes} | {error, atom()}</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-CSocket = any()
-</dt>
-<dd>
-<p>
-Socket for this connection.
-</p>
-</dd>
-<dt class="hdlist1">
-File = file:filename_all() | file:fd()
-</dt>
-<dd>
-<p>
-Filename or file descriptor for the file to be sent.
-</p>
-</dd>
-<dt class="hdlist1">
-Offset = non_neg_integer()
-</dt>
-<dd>
-<p>
-Begin sending at this position in the file.
-</p>
-</dd>
-<dt class="hdlist1">
-Bytes = non_neg_integer()
-</dt>
-<dd>
-<p>
-Send this many bytes.
-</p>
-</dd>
-<dt class="hdlist1">
-SentBytes = non_neg_integer()
-</dt>
-<dd>
-<p>
-This many bytes were sent.
-</p>
-</dd>
-<dt class="hdlist1">
-SfOpts = sendfile_opts()
-</dt>
-<dd>
-<p>
-Sendfile options.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Send data from a file to the given socket.</p></div>
-<div class="paragraph"><p>The file may be sent full or in parts, and may be specified
-by its filename or by an already open file descriptor.</p></div>
-<div class="paragraph"><p>Transports that manipulate TCP directly may use the
-<code>file:sendfile/{2,4,5}</code> function, which calls the sendfile
-syscall where applicable (on Linux, for example). Other
-transports can use the <code>sendfile/6</code> function exported from
-this module.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_setopts_csocket_sockopts_8594_ok_error_atom">setopts(CSocket, SockOpts) &#8594; ok | {error, atom()}</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-CSocket = any()
-</dt>
-<dd>
-<p>
-Socket for this connection.
-</p>
-</dd>
-<dt class="hdlist1">
-SockOpts = any()
-</dt>
-<dd>
-<p>
-Socket options.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Change options for the given socket.</p></div>
-<div class="paragraph"><p>This is mainly useful for switching to active or passive mode
-or to set protocol-specific options.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_shutdown_csocket_how_8594_ok_error_atom">shutdown(CSocket, How) &#8594; ok | {error, atom()}</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-CSocket = any()
-</dt>
-<dd>
-<p>
-Socket for this connection.
-</p>
-</dd>
-<dt class="hdlist1">
-How = read | write | read_write
-</dt>
-<dd>
-<p>
-Which side(s) of the socket to close.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Immediately close the socket in one or two directions.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_sockname_socket_8594_ok_ip_port_error_atom">sockname(Socket) &#8594; {ok, {IP, Port}} | {error, atom()}</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Socket = any()
-</dt>
-<dd>
-<p>
-Socket opened with listen/1 or accept/2.
-</p>
-</dd>
-<dt class="hdlist1">
-IP = inet:ip_address()
-</dt>
-<dd>
-<p>
-IP of the local endpoint.
-</p>
-</dd>
-<dt class="hdlist1">
-Port = inet:port_number()
-</dt>
-<dd>
-<p>
-Port of the local endpoint.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Return the IP and port of the local endpoint.</p></div>
-</div>
-</div>
-</div>
-<div class="sect1">
+<h3 id="_accept_lsocket__timeout______ok__csocket_____error__closed___timeout___atom">accept(LSocket, Timeout) -&gt; {ok, CSocket} | {error, closed | timeout | atom()}</h3>
+<dl><dt>LSocket = CSocket = any()</dt>
+<dd><p>Listening socket.</p>
+</dd>
+<dt>Timeout = timeout()</dt>
+<dd><p>Accept timeout.</p>
+</dd>
+</dl>
+<p>Accept a connection on the given listening socket.</p>
+<p>The <code>accept_ack</code> callback will be used to initialize the socket after accepting the connection. This is most useful when the transport is not raw TCP, like with SSL for example.</p>
+<h3 id="_accept_ack_csocket__timeout_____ok">accept_ack(CSocket, Timeout) -&gt; ok</h3>
+<dl><dt>CSocket = any()</dt>
+<dd><p>Socket for this connection.</p>
+</dd>
+<dt>Timeout = timeout()</dt>
+<dd><p>Ack timeout.</p>
+</dd>
+</dl>
+<p>Perform post-accept initialization of the connection.</p>
+<p>This function will be called by connection processes before performing any socket operation. It allows transports that require extra initialization to perform their task and make the socket ready to use.</p>
+<h3 id="_close_socket_____ok">close(Socket) -&gt; ok</h3>
+<dl><dt>Socket = any()</dt>
+<dd><p>Socket opened with listen/1 or accept/2.</p>
+</dd>
+</dl>
+<p>Close the given socket.</p>
+<h3 id="_controlling_process_socket__pid_____ok____error__closed___not_owner___atom">controlling_process(Socket, Pid) -&gt; ok | {error, closed | not_owner | atom()}</h3>
+<dl><dt>Socket = any()</dt>
+<dd><p>Socket opened with listen/1 or accept/2.</p>
+</dd>
+<dt>Pid = pid()</dt>
+<dd><p>Pid of the new owner of the socket.</p>
+</dd>
+</dl>
+<p>Change the controlling process for the given socket.</p>
+<p>The controlling process is the process that is allowed to perform operations on the socket, and that will receive messages from the socket when active mode is used. When the controlling process dies, the socket is closed.</p>
+<h3 id="_listen_transopts______ok__lsocket_____error__atom">listen(TransOpts) -&gt; {ok, LSocket} | {error, atom()}</h3>
+<dl><dt>TransOpts = any()</dt>
+<dd><p>Transport options.</p>
+</dd>
+<dt>LSocket = any()</dt>
+<dd><p>Listening socket.</p>
+</dd>
+</dl>
+<p>Listen for connections on the given port.</p>
+<p>The port is given as part of the transport options under the key <code>port</code>. Any other option is transport dependent.</p>
+<p>The socket returned by this call can then be used to accept connections. It is not possible to send or receive data from the listening socket.</p>
+<h3 id="_messages_______ok__closed__error">messages() -&gt; {OK, Closed, Error}</h3>
+<dl><dt>OK = Closed = Error = atom()</dt>
+<dd><p>Tuple names.</p>
+</dd>
+</dl>
+<p>Return the atoms used to identify messages sent in active mode.</p>
+<h3 id="_name______name">name() -&gt; Name</h3>
+<dl><dt>Name = atom()</dt>
+<dd><p>Transport module name.</p>
+</dd>
+</dl>
+<p>Return the name of the transport.</p>
+<h3 id="_peername_csocket______ok___ip__port______error__atom">peername(CSocket) -&gt; {ok, {IP, Port}} | {error, atom()}</h3>
+<dl><dt>CSocket = any()</dt>
+<dd><p>Socket for this connection.</p>
+</dd>
+<dt>IP = inet:ip_address()</dt>
+<dd><p>IP of the remote endpoint.</p>
+</dd>
+<dt>Port = inet:port_number()</dt>
+<dd><p>Port of the remote endpoint.</p>
+</dd>
+</dl>
+<p>Return the IP and port of the remote endpoint.</p>
+<h3 id="_recv_csocket__length__timeout______ok__packet_____error__closed___timeout___atom">recv(CSocket, Length, Timeout) -&gt; {ok, Packet} | {error, closed | timeout | atom()}</h3>
+<dl><dt>CSocket = any()</dt>
+<dd><p>Socket for this connection.</p>
+</dd>
+<dt>Length = non_neg_integer()</dt>
+<dd><p>Requested length.</p>
+</dd>
+<dt>Timeout = timeout()</dt>
+<dd><p>Receive timeout.</p>
+</dd>
+<dt>Packet = iodata() | any()</dt>
+<dd><p>Data received.</p>
+</dd>
+</dl>
+<p>Receive data from the given socket when in passive mode.</p>
+<p>Trying to receive data from a socket that is in active mode will return an error.</p>
+<p>A length of 0 will return any data available on the socket.</p>
+<p>While it is possible to use the timeout value <code>infinity</code>, this is highly discouraged as this could cause your process to get stuck waiting for data that will never come. This may happen when a socket becomes half-open due to a crash of the remote endpoint. Wi-Fi going down is another common culprit of this issue.</p>
+<h3 id="_send_csocket__packet_____ok____error__atom">send(CSocket, Packet) -&gt; ok | {error, atom()}</h3>
+<dl><dt>CSocket = any()</dt>
+<dd><p>Socket for this connection.</p>
+</dd>
+<dt>Packet = iodata()</dt>
+<dd><p>Data to be sent.</p>
+</dd>
+</dl>
+<p>Send data to the given socket.</p>
+<h3 id="_sendfile_csocket__file_____sendfile_csocket__file__0__0">sendfile(CSocket, File) -&gt; sendfile(CSocket, File, 0, 0, [])</h3>
+<p>Alias of <code>ranch_transport:sendfile/5</code>.</p>
+<h3 id="_sendfile_csocket__file__offset__bytes_____sendfile_csocket__file__offset__bytes">sendfile(CSocket, File, Offset, Bytes) -&gt; sendfile(CSocket, File, Offset, Bytes, [])</h3>
+<p>Alias of <code>ranch_transport:sendfile/5</code>.</p>
+<h3 id="_sendfile_csocket__file__offset__bytes__sfopts______ok__sentbytes_____error__atom">sendfile(CSocket, File, Offset, Bytes, SfOpts) -&gt; {ok, SentBytes} | {error, atom()}</h3>
+<dl><dt>CSocket = any()</dt>
+<dd><p>Socket for this connection.</p>
+</dd>
+<dt>File = file:filename_all() | file:fd()</dt>
+<dd><p>Filename or file descriptor for the file to be sent.</p>
+</dd>
+<dt>Offset = non_neg_integer()</dt>
+<dd><p>Begin sending at this position in the file.</p>
+</dd>
+<dt>Bytes = non_neg_integer()</dt>
+<dd><p>Send this many bytes.</p>
+</dd>
+<dt>SentBytes = non_neg_integer()</dt>
+<dd><p>This many bytes were sent.</p>
+</dd>
+<dt>SfOpts = sendfile_opts()</dt>
+<dd><p>Sendfile options.</p>
+</dd>
+</dl>
+<p>Send data from a file to the given socket.</p>
+<p>The file may be sent full or in parts, and may be specified by its filename or by an already open file descriptor.</p>
+<p>Transports that manipulate TCP directly may use the <code>file:sendfile/{2,4,5}</code> function, which calls the sendfile syscall where applicable (on Linux, for example). Other transports can use the <code>sendfile/6</code> function exported from this module.</p>
+<h3 id="_setopts_csocket__sockopts_____ok____error__atom">setopts(CSocket, SockOpts) -&gt; ok | {error, atom()}</h3>
+<dl><dt>CSocket = any()</dt>
+<dd><p>Socket for this connection.</p>
+</dd>
+<dt>SockOpts = any()</dt>
+<dd><p>Socket options.</p>
+</dd>
+</dl>
+<p>Change options for the given socket.</p>
+<p>This is mainly useful for switching to active or passive mode or to set protocol-specific options.</p>
+<h3 id="_shutdown_csocket__how_____ok____error__atom">shutdown(CSocket, How) -&gt; ok | {error, atom()}</h3>
+<dl><dt>CSocket = any()</dt>
+<dd><p>Socket for this connection.</p>
+</dd>
+<dt>How = read | write | read_write</dt>
+<dd><p>Which side(s) of the socket to close.</p>
+</dd>
+</dl>
+<p>Immediately close the socket in one or two directions.</p>
+<h3 id="_sockname_socket______ok___ip__port______error__atom">sockname(Socket) -&gt; {ok, {IP, Port}} | {error, atom()}</h3>
+<dl><dt>Socket = any()</dt>
+<dd><p>Socket opened with listen/1 or accept/2.</p>
+</dd>
+<dt>IP = inet:ip_address()</dt>
+<dd><p>IP of the local endpoint.</p>
+</dd>
+<dt>Port = inet:port_number()</dt>
+<dd><p>Port of the local endpoint.</p>
+</dd>
+</dl>
+<p>Return the IP and port of the local endpoint.</p>
<h2 id="_exports">Exports</h2>
-<div class="sectionbody">
-<div class="sect2">
-<h3 id="_sendfile_transport_csocket_file_offset_bytes_sfopts_8594_ok_sentbytes_error_atom">sendfile(Transport, CSocket, File, Offset, Bytes, SfOpts) &#8594; {ok, SentBytes} | {error, atom()}</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Transport = module()
-</dt>
-<dd>
-<p>
-Transport module for this socket.
-</p>
-</dd>
-<dt class="hdlist1">
-CSocket = any()
-</dt>
-<dd>
-<p>
-Socket for this connection.
-</p>
-</dd>
-<dt class="hdlist1">
-File = file:filename_all() | file:fd()
-</dt>
-<dd>
-<p>
-Filename or file descriptor for the file to be sent.
-</p>
-</dd>
-<dt class="hdlist1">
-Offset = non_neg_integer()
-</dt>
-<dd>
-<p>
-Begin sending at this position in the file.
-</p>
-</dd>
-<dt class="hdlist1">
-Bytes = non_neg_integer()
-</dt>
-<dd>
-<p>
-Send this many bytes.
-</p>
-</dd>
-<dt class="hdlist1">
-SentBytes = non_neg_integer()
-</dt>
-<dd>
-<p>
-This many bytes were sent.
-</p>
-</dd>
-<dt class="hdlist1">
-SfOpts = sendfile_opts()
-</dt>
-<dd>
-<p>
-Sendfile options.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Send data from a file to the given socket.</p></div>
-<div class="paragraph"><p>This function emulates the function <code>file:sendfile/{2,4,5}</code>
-and may be used when transports are not manipulating TCP
-directly.</p></div>
-</div>
-</div>
-</div>
+<h3 id="_sendfile_transport__csocket__file__offset__bytes__sfopts______ok__sentbytes_____error__atom">sendfile(Transport, CSocket, File, Offset, Bytes, SfOpts) -&gt; {ok, SentBytes} | {error, atom()}</h3>
+<dl><dt>Transport = module()</dt>
+<dd><p>Transport module for this socket.</p>
+</dd>
+<dt>CSocket = any()</dt>
+<dd><p>Socket for this connection.</p>
+</dd>
+<dt>File = file:filename_all() | file:fd()</dt>
+<dd><p>Filename or file descriptor for the file to be sent.</p>
+</dd>
+<dt>Offset = non_neg_integer()</dt>
+<dd><p>Begin sending at this position in the file.</p>
+</dd>
+<dt>Bytes = non_neg_integer()</dt>
+<dd><p>Send this many bytes.</p>
+</dd>
+<dt>SentBytes = non_neg_integer()</dt>
+<dd><p>This many bytes were sent.</p>
+</dd>
+<dt>SfOpts = sendfile_opts()</dt>
+<dd><p>Sendfile options.</p>
+</dd>
+</dl>
+<p>Send data from a file to the given socket.</p>
+<p>This function emulates the function <code>file:sendfile/{2,4,5}</code> and may be used when transports are not manipulating TCP directly.</p>
+
@@ -584,6 +288,8 @@ directly.</p></div>
+ <li><a href="/docs/en/ranch/1.5/manual">1.5</a></li>
+
<li><a href="/docs/en/ranch/1.4/manual">1.4</a></li>
<li><a href="/docs/en/ranch/1.3/manual">1.3</a></li>
diff --git a/docs/en/ranch/1.4/guide/embedded/index.html b/docs/en/ranch/1.4/guide/embedded/index.html
index fdad24c2..533d353d 100644
--- a/docs/en/ranch/1.4/guide/embedded/index.html
+++ b/docs/en/ranch/1.4/guide/embedded/index.html
@@ -62,48 +62,30 @@
<h1 class="lined-header"><span>Embedded mode</span></h1>
-<div class="paragraph"><p>Embedded mode allows you to insert Ranch listeners directly
-in your supervision tree. This allows for greater fault tolerance
-control by permitting the shutdown of a listener due to the
-failure of another part of the application and vice versa.</p></div>
-<div class="sect1">
+<p>Embedded mode allows you to insert Ranch listeners directly in your supervision tree. This allows for greater fault tolerance control by permitting the shutdown of a listener due to the failure of another part of the application and vice versa.</p>
<h2 id="_embedding">Embedding</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>To embed Ranch in your application you can simply add the child specs
-to your supervision tree. This can all be done in the <code>init/1</code> function
-of one of your application supervisors.</p></div>
-<div class="paragraph"><p>Ranch requires at the minimum two kinds of child specs for embedding.
-First, you need to add <code>ranch_sup</code> to your supervision tree, only once,
-regardless of the number of listeners you will use. Then you need to
-add the child specs for each listener.</p></div>
-<div class="paragraph"><p>Ranch has a convenience function for getting the listeners child specs
-called <code>ranch:child_spec/5</code>, that works like <code>ranch:start_listener/5</code>,
-except that it doesn&#8217;t start anything, it only returns child specs.</p></div>
-<div class="paragraph"><p>As for <code>ranch_sup</code>, the child spec is simple enough to not require a
-convenience function.</p></div>
-<div class="paragraph"><p>The following example adds both <code>ranch_sup</code> and one listener to another
-application&#8217;s supervision tree.</p></div>
-<div class="listingblock">
-<div class="title">Embed Ranch directly in your supervision tree</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<p>To embed Ranch in your application you can simply add the child specs to your supervision tree. This can all be done in the <code>init/1</code> function of one of your application supervisors.</p>
+<p>Ranch requires at the minimum two kinds of child specs for embedding. First, you need to add <code>ranch_sup</code> to your supervision tree, only once, regardless of the number of listeners you will use. Then you need to add the child specs for each listener.</p>
+<p>Ranch has a convenience function for getting the listeners child specs called <code>ranch:child_spec/5</code>, that works like <code>ranch:start_listener/5</code>, except that it doesn&apos;t start anything, it only returns child specs.</p>
+<p>As for <code>ranch_sup</code>, the child spec is simple enough to not require a convenience function.</p>
+<p>The following example adds both <code>ranch_sup</code> and one listener to another application&apos;s supervision tree.</p>
+<div class="listingblock"><div class="title">Embed Ranch directly in your supervision tree</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: #990000">-&gt;</span>
- <span style="color: #009900">RanchSupSpec</span> <span style="color: #990000">=</span> {<span style="color: #FF6600">ranch_sup</span>, {<span style="color: #FF6600">ranch_sup</span>, <span style="color: #FF6600">start_link</span>, []},
- <span style="color: #FF6600">permanent</span>, <span style="color: #993399">5000</span>, <span style="color: #FF6600">supervisor</span>, [<span style="color: #FF6600">ranch_sup</span>]},
- <span style="color: #009900">ListenerSpec</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">ranch:child_spec</span></span>(<span style="color: #FF6600">echo</span>, <span style="color: #993399">100</span>,
- <span style="color: #FF6600">ranch_tcp</span>, [{<span style="color: #FF6600">port</span>, <span style="color: #993399">5555</span>}],
- <span style="color: #FF6600">echo_protocol</span>, []
- ),
- {<span style="color: #FF6600">ok</span>, {{<span style="color: #FF6600">one_for_one</span>, <span style="color: #993399">10</span>, <span style="color: #993399">10</span>}, [<span style="color: #009900">RanchSupSpec</span>, <span style="color: #009900">ListenerSpec</span>]}}<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Remember, you can add as many listener child specs as needed, but only
-one <code>ranch_sup</code> spec!</p></div>
-<div class="paragraph"><p>It is recommended that your architecture makes sure that all listeners
-are restarted if <code>ranch_sup</code> fails. See the Ranch internals chapter for
-more details on how Ranch does it.</p></div>
-</div>
-</div>
+<pre><tt><b><font color="#000000">init</font></b>([]) <font color="#990000">-&gt;</font>
+ <font color="#009900">RanchSupSpec</font> <font color="#990000">=</font> {<font color="#FF6600">ranch_sup</font>, {<font color="#FF6600">ranch_sup</font>, <font color="#FF6600">start_link</font>, []},
+ <font color="#FF6600">permanent</font>, <font color="#993399">5000</font>, <font color="#FF6600">supervisor</font>, [<font color="#FF6600">ranch_sup</font>]},
+ <font color="#009900">ListenerSpec</font> <font color="#990000">=</font> <b><font color="#000000">ranch:child_spec</font></b>(<font color="#FF6600">echo</font>, <font color="#993399">100</font>,
+ <font color="#FF6600">ranch_tcp</font>, [{<font color="#FF6600">port</font>, <font color="#993399">5555</font>}],
+ <font color="#FF6600">echo_protocol</font>, []
+ ),
+ {<font color="#FF6600">ok</font>, {{<font color="#FF6600">one_for_one</font>, <font color="#993399">10</font>, <font color="#993399">10</font>}, [<font color="#009900">RanchSupSpec</font>, <font color="#009900">ListenerSpec</font>]}}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Remember, you can add as many listener child specs as needed, but only one <code>ranch_sup</code> spec!</p>
+<p>It is recommended that your architecture makes sure that all listeners are restarted if <code>ranch_sup</code> fails. See the Ranch internals chapter for more details on how Ranch does it.</p>
+
@@ -160,6 +142,8 @@ more details on how Ranch does it.</p></div>
+ <li><a href="/docs/en/ranch/1.5/guide">1.5</a></li>
+
<li><a href="/docs/en/ranch/1.4/guide">1.4</a></li>
<li><a href="/docs/en/ranch/1.3/guide">1.3</a></li>
diff --git a/docs/en/ranch/1.4/guide/index.html b/docs/en/ranch/1.4/guide/index.html
index c5ce61a2..5b381706 100644
--- a/docs/en/ranch/1.4/guide/index.html
+++ b/docs/en/ranch/1.4/guide/index.html
@@ -62,48 +62,24 @@
<h1 class="lined-header"><span>Ranch User Guide</span></h1>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="introduction/">Introduction</a>
-</p>
+<ul><li><a href="introduction/">Introduction</a>
</li>
-<li>
-<p>
-<a href="listeners/">Listeners</a>
-</p>
+<li><a href="listeners/">Listeners</a>
</li>
-<li>
-<p>
-<a href="transports/">Transports</a>
-</p>
+<li><a href="transports/">Transports</a>
</li>
-<li>
-<p>
-<a href="protocols/">Protocols</a>
-</p>
+<li><a href="protocols/">Protocols</a>
</li>
-<li>
-<p>
-<a href="embedded/">Embedded mode</a>
-</p>
+<li><a href="embedded/">Embedded mode</a>
</li>
-<li>
-<p>
-<a href="parsers/">Writing parsers</a>
-</p>
+<li><a href="parsers/">Writing parsers</a>
</li>
-<li>
-<p>
-<a href="ssl_auth/">SSL client authentication</a>
-</p>
+<li><a href="ssl_auth/">SSL client authentication</a>
</li>
-<li>
-<p>
-<a href="internals/">Internals</a>
-</p>
+<li><a href="internals/">Internals</a>
</li>
-</ul></div>
+</ul>
+
@@ -138,6 +114,8 @@
+ <li><a href="/docs/en/ranch/1.5/guide">1.5</a></li>
+
<li><a href="/docs/en/ranch/1.4/guide">1.4</a></li>
<li><a href="/docs/en/ranch/1.3/guide">1.3</a></li>
diff --git a/docs/en/ranch/1.4/guide/internals/index.html b/docs/en/ranch/1.4/guide/internals/index.html
index 721e7324..120d0291 100644
--- a/docs/en/ranch/1.4/guide/internals/index.html
+++ b/docs/en/ranch/1.4/guide/internals/index.html
@@ -62,93 +62,34 @@
<h1 class="lined-header"><span>Internals</span></h1>
-<div class="paragraph"><p>This chapter may not apply to embedded Ranch as embedding allows you
-to use an architecture specific to your application, which may or may
-not be compatible with the description of the Ranch application.</p></div>
-<div class="paragraph"><p>Note that for everything related to efficiency and performance,
-you should perform the benchmarks yourself to get the numbers that
-matter to you. Generic benchmarks found on the web may or may not
-be of use to you, you can never know until you benchmark your own
-system.</p></div>
-<div class="sect1">
+<p>This chapter may not apply to embedded Ranch as embedding allows you to use an architecture specific to your application, which may or may not be compatible with the description of the Ranch application.</p>
+<p>Note that for everything related to efficiency and performance, you should perform the benchmarks yourself to get the numbers that matter to you. Generic benchmarks found on the web may or may not be of use to you, you can never know until you benchmark your own system.</p>
<h2 id="_architecture">Architecture</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Ranch is an OTP application.</p></div>
-<div class="paragraph"><p>Like all OTP applications, Ranch has a top supervisor. It is responsible
-for supervising the <code>ranch_server</code> process and all the listeners that
-will be started.</p></div>
-<div class="paragraph"><p>The <code>ranch_server</code> gen_server is a central process keeping track of the
-listeners and their acceptors. It does so through the use of a public ets
-table called <code>ranch_server</code>. The table is owned by the top supervisor
-to improve fault tolerance. This way if the <code>ranch_server</code> gen_server
-fails, it doesn&#8217;t lose any information and the restarted process can
-continue as if nothing happened.</p></div>
-<div class="paragraph"><p>Ranch uses a custom supervisor for managing connections. This supervisor
-keeps track of the number of connections and handles connection limits
-directly. While it is heavily optimized to perform the task of creating
-connection processes for accepted connections, it is still following the
-OTP principles and the usual <code>sys</code> and <code>supervisor</code> calls will work on
-it as expected.</p></div>
-<div class="paragraph"><p>Listeners are grouped into the <code>ranch_listener_sup</code> supervisor and
-consist of three kinds of processes: the listener gen_server, the
-acceptor processes and the connection processes, both grouped under
-their own supervisor. All of these processes are registered to the
-<code>ranch_server</code> gen_server with varying amount of information.</p></div>
-<div class="paragraph"><p>All socket operations, including listening for connections, go through
-transport handlers. Accepted connections are given to the protocol handler.
-Transport handlers are simple callback modules for performing operations on
-sockets. Protocol handlers start a new process, which receives socket
-ownership, with no requirements on how the code should be written inside
-that new process.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Ranch is an OTP application.</p>
+<p>Like all OTP applications, Ranch has a top supervisor. It is responsible for supervising the <code>ranch_server</code> process and all the listeners that will be started.</p>
+<p>The <code>ranch_server</code> gen_server is a central process keeping track of the listeners and their acceptors. It does so through the use of a public ets table called <code>ranch_server</code>. The table is owned by the top supervisor to improve fault tolerance. This way if the <code>ranch_server</code> gen_server fails, it doesn&apos;t lose any information and the restarted process can continue as if nothing happened.</p>
+<p>Ranch uses a custom supervisor for managing connections. This supervisor keeps track of the number of connections and handles connection limits directly. While it is heavily optimized to perform the task of creating connection processes for accepted connections, it is still following the OTP principles and the usual <code>sys</code> and <code>supervisor</code> calls will work on it as expected.</p>
+<p>Listeners are grouped into the <code>ranch_listener_sup</code> supervisor and consist of three kinds of processes: the listener gen_server, the acceptor processes and the connection processes, both grouped under their own supervisor. All of these processes are registered to the <code>ranch_server</code> gen_server with varying amount of information.</p>
+<p>All socket operations, including listening for connections, go through transport handlers. Accepted connections are given to the protocol handler. Transport handlers are simple callback modules for performing operations on sockets. Protocol handlers start a new process, which receives socket ownership, with no requirements on how the code should be written inside that new process.</p>
<h2 id="_number_of_acceptors">Number of acceptors</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The second argument to <code>ranch:start_listener/5</code> is the number of
-processes that will be accepting connections. Care should be taken
-when choosing this number.</p></div>
-<div class="paragraph"><p>First of all, it should not be confused with the maximum number
-of connections. Acceptor processes are only used for accepting and
-have nothing else in common with connection processes. Therefore
-there is nothing to be gained from setting this number too high,
-in fact it can slow everything else down.</p></div>
-<div class="paragraph"><p>Second, this number should be high enough to allow Ranch to accept
-connections concurrently. But the number of cores available doesn&#8217;t
-seem to be the only factor for choosing this number, as we can
-observe faster accepts if we have more acceptors than cores. It
-might be entirely dependent on the protocol, however.</p></div>
-<div class="paragraph"><p>Our observations suggest that using 100 acceptors on modern hardware
-is a good solution, as it&#8217;s big enough to always have acceptors ready
-and it&#8217;s low enough that it doesn&#8217;t have a negative impact on the
-system&#8217;s performances.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The second argument to <code>ranch:start_listener/5</code> is the number of processes that will be accepting connections. Care should be taken when choosing this number.</p>
+<p>First of all, it should not be confused with the maximum number of connections. Acceptor processes are only used for accepting and have nothing else in common with connection processes. Therefore there is nothing to be gained from setting this number too high, in fact it can slow everything else down.</p>
+<p>Second, this number should be high enough to allow Ranch to accept connections concurrently. But the number of cores available doesn&apos;t seem to be the only factor for choosing this number, as we can observe faster accepts if we have more acceptors than cores. It might be entirely dependent on the protocol, however.</p>
+<p>Our observations suggest that using 100 acceptors on modern hardware is a good solution, as it&apos;s big enough to always have acceptors ready and it&apos;s low enough that it doesn&apos;t have a negative impact on the system&apos;s performances.</p>
<h2 id="_platform_specific_tcp_features">Platform-specific TCP features</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Some socket options are platform-specific and not supported by <code>inet</code>.
-They can be of interest because they generally are related to
-optimizations provided by the underlying OS. They can still be enabled
-thanks to the <code>raw</code> option, for which we will see an example.</p></div>
-<div class="paragraph"><p>One of these features is <code>TCP_DEFER_ACCEPT</code> on Linux. It is a simplified
-accept mechanism which will wait for application data to come in before
-handing out the connection to the Erlang process.</p></div>
-<div class="paragraph"><p>This is especially useful if you expect many connections to be mostly
-idle, perhaps part of a connection pool. They can be handled by the
-kernel directly until they send any real data, instead of allocating
-resources to idle connections.</p></div>
-<div class="paragraph"><p>To enable this mechanism, the following option can be used.</p></div>
-<div class="listingblock">
-<div class="title">Using raw transport options</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Some socket options are platform-specific and not supported by <code>inet</code>. They can be of interest because they generally are related to optimizations provided by the underlying OS. They can still be enabled thanks to the <code>raw</code> option, for which we will see an example.</p>
+<p>One of these features is <code>TCP_DEFER_ACCEPT</code> on Linux. It is a simplified accept mechanism which will wait for application data to come in before handing out the connection to the Erlang process.</p>
+<p>This is especially useful if you expect many connections to be mostly idle, perhaps part of a connection pool. They can be handled by the kernel directly until they send any real data, instead of allocating resources to idle connections.</p>
+<p>To enable this mechanism, the following option can be used.</p>
+<div class="listingblock"><div class="title">Using raw transport options</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: #FF6600">raw</span>, <span style="color: #993399">6</span>, <span style="color: #993399">9</span>, <span style="color: #990000">&lt;&lt;</span> <span style="font-weight: bold"><span style="color: #000000">30:32</span></span><span style="color: #990000">/</span><span style="color: #FF6600">native</span> <span style="color: #990000">&gt;&gt;</span>}</tt></pre></div></div>
-<div class="paragraph"><p>It means go on layer 6, turn on option 9 with the given integer parameter.</p></div>
-</div>
-</div>
+<pre><tt>{<font color="#FF6600">raw</font>, <font color="#993399">6</font>, <font color="#993399">9</font>, <font color="#990000">&lt;&lt;</font> <b><font color="#000000">30:32</font></b><font color="#990000">/</font><font color="#FF6600">native</font> <font color="#990000">&gt;&gt;</font>}</tt></pre>
+</div></div>
+<p>It means go on layer 6, turn on option 9 with the given integer parameter.</p>
+
@@ -201,6 +142,8 @@ http://www.gnu.org/software/src-highlite -->
+ <li><a href="/docs/en/ranch/1.5/guide">1.5</a></li>
+
<li><a href="/docs/en/ranch/1.4/guide">1.4</a></li>
<li><a href="/docs/en/ranch/1.3/guide">1.3</a></li>
diff --git a/docs/en/ranch/1.4/guide/introduction/index.html b/docs/en/ranch/1.4/guide/introduction/index.html
index aac9305e..897bdebd 100644
--- a/docs/en/ranch/1.4/guide/introduction/index.html
+++ b/docs/en/ranch/1.4/guide/introduction/index.html
@@ -62,34 +62,18 @@
<h1 class="lined-header"><span>Introduction</span></h1>
-<div class="paragraph"><p>Ranch is a socket acceptor pool for TCP protocols.</p></div>
-<div class="paragraph"><p>Ranch aims to provide everything you need to accept TCP connections
-with a small code base and low latency while being easy to use directly
-as an application or to embed into your own.</p></div>
-<div class="sect1">
+<p>Ranch is a socket acceptor pool for TCP protocols.</p>
+<p>Ranch aims to provide everything you need to accept TCP connections with a small code base and low latency while being easy to use directly as an application or to embed into your own.</p>
<h2 id="_prerequisites">Prerequisites</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>It is assumed the developer already knows Erlang and has some experience
-with socket programming and TCP protocols.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>It is assumed the developer already knows Erlang and has some experience with socket programming and TCP protocols.</p>
<h2 id="_supported_platforms">Supported platforms</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Ranch is tested and supported on Linux, FreeBSD, OSX and Windows.</p></div>
-<div class="paragraph"><p>Ranch is developed for Erlang/OTP R16B+.</p></div>
-<div class="paragraph"><p>There are known issues with the SSL application found in Erlang/OTP
-18.3.2 and 18.3.3. These versions are therefore not supported.</p></div>
-<div class="paragraph"><p>Ranch may be compiled on earlier Erlang versions with small source code
-modifications but there is no guarantee that it will work as expected.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Ranch is tested and supported on Linux, FreeBSD, OSX and Windows.</p>
+<p>Ranch is developed for Erlang/OTP R16B+.</p>
+<p>There are known issues with the SSL application found in Erlang/OTP 18.3.2 and 18.3.3. These versions are therefore not supported.</p>
+<p>Ranch may be compiled on earlier Erlang versions with small source code modifications but there is no guarantee that it will work as expected.</p>
<h2 id="_versioning">Versioning</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Ranch uses <a href="http://semver.org/">Semantic Versioning 2.0.0</a></p></div>
-</div>
-</div>
+<p>Ranch uses <a href="http://semver.org/">Semantic Versioning 2.0.0</a></p>
+
@@ -142,6 +126,8 @@ modifications but there is no guarantee that it will work as expected.</p></div>
+ <li><a href="/docs/en/ranch/1.5/guide">1.5</a></li>
+
<li><a href="/docs/en/ranch/1.4/guide">1.4</a></li>
<li><a href="/docs/en/ranch/1.3/guide">1.3</a></li>
diff --git a/docs/en/ranch/1.4/guide/listeners/index.html b/docs/en/ranch/1.4/guide/listeners/index.html
index 3a0af22a..633c942c 100644
--- a/docs/en/ranch/1.4/guide/listeners/index.html
+++ b/docs/en/ranch/1.4/guide/listeners/index.html
@@ -62,367 +62,213 @@
<h1 class="lined-header"><span>Listeners</span></h1>
-<div class="paragraph"><p>A listener is a set of processes whose role is to listen on a port
-for new connections. It manages a pool of acceptor processes, each
-of them indefinitely accepting connections. When it does, it starts
-a new process executing the protocol handler code. All the socket
-programming is abstracted through the use of transport handlers.</p></div>
-<div class="paragraph"><p>The listener takes care of supervising all the acceptor and connection
-processes, allowing developers to focus on building their application.</p></div>
-<div class="sect1">
+<p>A listener is a set of processes whose role is to listen on a port for new connections. It manages a pool of acceptor processes, each of them indefinitely accepting connections. When it does, it starts a new process executing the protocol handler code. All the socket programming is abstracted through the use of transport handlers.</p>
+<p>The listener takes care of supervising all the acceptor and connection processes, allowing developers to focus on building their application.</p>
<h2 id="_starting_a_listener">Starting a listener</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Ranch does nothing by default. It is up to the application developer
-to request that Ranch listens for connections.</p></div>
-<div class="paragraph"><p>A listener can be started and stopped at will.</p></div>
-<div class="paragraph"><p>When starting a listener, a number of different settings are required:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-A name to identify it locally and be able to interact with it.
-</p>
+<p>Ranch does nothing by default. It is up to the application developer to request that Ranch listens for connections.</p>
+<p>A listener can be started and stopped at will.</p>
+<p>When starting a listener, a number of different settings are required:</p>
+<ul><li>A name to identify it locally and be able to interact with it.
</li>
-<li>
-<p>
-The number of acceptors in the pool.
-</p>
+<li>The number of acceptors in the pool.
</li>
-<li>
-<p>
-A transport handler and its associated options.
-</p>
+<li>A transport handler and its associated options.
</li>
-<li>
-<p>
-A protocol handler and its associated options.
-</p>
+<li>A protocol handler and its associated options.
</li>
-</ul></div>
-<div class="paragraph"><p>Ranch includes both TCP and SSL transport handlers, respectively
-<code>ranch_tcp</code> and <code>ranch_ssl</code>.</p></div>
-<div class="paragraph"><p>A listener can be started by calling the <code>ranch:start_listener/5</code>
-function. Before doing so however, you must ensure that the <code>ranch</code>
-application is started.</p></div>
-<div class="listingblock">
-<div class="title">Starting the Ranch application</div>
-<div class="content"><!-- Generator: GNU source-highlight
+</ul>
+<p>Ranch includes both TCP and SSL transport handlers, respectively <code>ranch_tcp</code> and <code>ranch_ssl</code>.</p>
+<p>A listener can be started by calling the <code>ranch:start_listener/5</code> function. Before doing so however, you must ensure that the <code>ranch</code> application is started.</p>
+<div class="listingblock"><div class="title">Starting the Ranch application</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: #0000FF">ok</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">application:start</span></span>(<span style="color: #FF6600">ranch</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>You are then ready to start a listener. Let&#8217;s call it <code>tcp_echo</code>. It will
-have a pool of 100 acceptors, use a TCP transport and forward connections
-to the <code>echo_protocol</code> handler.</p></div>
-<div class="listingblock">
-<div class="title">Starting a listener for TCP connections on port 5555</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#0000FF">ok</font> <font color="#990000">=</font> <b><font color="#000000">application:start</font></b>(<font color="#FF6600">ranch</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>You are then ready to start a listener. Let&apos;s call it <code>tcp_echo</code>. It will have a pool of 100 acceptors, use a TCP transport and forward connections to the <code>echo_protocol</code> handler.</p>
+<div class="listingblock"><div class="title">Starting a listener for TCP connections on port 5555</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: #FF6600">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">ranch:start_listener</span></span>(<span style="color: #FF6600">tcp_echo</span>,
- <span style="color: #FF6600">ranch_tcp</span>, [{<span style="color: #FF6600">port</span>, <span style="color: #993399">5555</span>}],
- <span style="color: #FF6600">echo_protocol</span>, []
-)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>You can try this out by compiling and running the <code>tcp_echo</code> example in the
-examples directory. To do so, open a shell in the <em>examples/tcp_echo/</em>
-directory and run the following command:</p></div>
-<div class="listingblock">
-<div class="title">Building and starting a Ranch example</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">ranch:start_listener</font></b>(<font color="#FF6600">tcp_echo</font>,
+ <font color="#FF6600">ranch_tcp</font>, [{<font color="#FF6600">port</font>, <font color="#993399">5555</font>}],
+ <font color="#FF6600">echo_protocol</font>, []
+)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>You can try this out by compiling and running the <code>tcp_echo</code> example in the examples directory. To do so, open a shell in the <em>examples/tcp_echo/</em> directory and run the following command:</p>
+<div class="listingblock"><div class="title">Building and starting a Ranch example</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>$ make run</tt></pre></div></div>
-<div class="paragraph"><p>You can then connect to it using telnet and see the echo server reply
-everything you send to it. Then when you&#8217;re done testing, you can use
-the <code>Ctrl+]</code> key to escape to the telnet command line and type
-<code>quit</code> to exit.</p></div>
-<div class="listingblock">
-<div class="title">Connecting to the example listener with telnet</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>$ make run</tt></pre>
+</div></div>
+<p>You can then connect to it using telnet and see the echo server reply everything you send to it. Then when you&apos;re done testing, you can use the <code>Ctrl+]</code> key to escape to the telnet command line and type <code>quit</code> to exit.</p>
+<div class="listingblock"><div class="title">Connecting to the example listener with telnet</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>$ telnet localhost <span style="color: #993399">5555</span>
-Trying <span style="color: #993399">127.0</span><span style="color: #990000">.</span><span style="color: #993399">0.1</span><span style="color: #990000">...</span>
-Connected to localhost<span style="color: #990000">.</span>
-Escape character is <span style="color: #FF0000">'^]'</span><span style="color: #990000">.</span>
-Hello<span style="color: #990000">!</span>
-Hello<span style="color: #990000">!</span>
-It works<span style="color: #990000">!</span>
-It works<span style="color: #990000">!</span>
-<span style="color: #990000">^]</span>
-
-telnet<span style="color: #990000">&gt;</span> quit
-Connection closed<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>$ telnet localhost <font color="#993399">5555</font>
+Trying <font color="#993399">127.0</font><font color="#990000">.</font><font color="#993399">0.1</font><font color="#990000">...</font>
+Connected to localhost<font color="#990000">.</font>
+Escape character is <font color="#FF0000">'^]'</font><font color="#990000">.</font>
+Hello<font color="#990000">!</font>
+Hello<font color="#990000">!</font>
+It works<font color="#990000">!</font>
+It works<font color="#990000">!</font>
+<font color="#990000">^]</font>
+
+telnet<font color="#990000">&gt;</font> quit
+Connection closed<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_stopping_a_listener">Stopping a listener</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>All you need to stop a Ranch listener is to call the
-<code>ranch:stop_listener/1</code> function with the listener&#8217;s name
-as argument. In the previous section we started the listener
-named <code>tcp_echo</code>. We can now stop it.</p></div>
-<div class="listingblock">
-<div class="title">Stopping a listener</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<p>All you need to stop a Ranch listener is to call the <code>ranch:stop_listener/1</code> function with the listener&apos;s name as argument. In the previous section we started the listener named <code>tcp_echo</code>. We can now stop it.</p>
+<div class="listingblock"><div class="title">Stopping a listener</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">ranch:stop_listener</span></span>(<span style="color: #FF6600">tcp_echo</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">ranch:stop_listener</font></b>(<font color="#FF6600">tcp_echo</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_default_transport_options">Default transport options</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>By default the socket will be set to return <code>binary</code> data, with the
-options <code>{active, false}</code>, <code>{packet, raw}</code>, <code>{reuseaddr, true}</code> set.
-These values can&#8217;t be overriden when starting the listener, but
-they can be overriden using <code>Transport:setopts/2</code> in the protocol.</p></div>
-<div class="paragraph"><p>It will also set <code>{backlog, 1024}</code> and <code>{nodelay, true}</code>, which
-can be overriden at listener startup.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>By default the socket will be set to return <code>binary</code> data, with the options <code>{active, false}</code>, <code>{packet, raw}</code>, <code>{reuseaddr, true}</code> set. These values can&apos;t be overriden when starting the listener, but they can be overriden using <code>Transport:setopts/2</code> in the protocol.</p>
+<p>It will also set <code>{backlog, 1024}</code> and <code>{nodelay, true}</code>, which can be overriden at listener startup.</p>
<h2 id="_listening_on_a_random_port">Listening on a random port</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>You do not have to specify a specific port to listen on. If you give
-the port number 0, or if you omit the port number entirely, Ranch will
-start listening on a random port.</p></div>
-<div class="paragraph"><p>You can retrieve this port number by calling <code>ranch:get_port/1</code>. The
-argument is the name of the listener you gave in <code>ranch:start_listener/5</code>.</p></div>
-<div class="listingblock">
-<div class="title">Starting a listener for TCP connections on a random port</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<p>You do not have to specify a specific port to listen on. If you give the port number 0, or if you omit the port number entirely, Ranch will start listening on a random port.</p>
+<p>You can retrieve this port number by calling <code>ranch:get_port/1</code>. The argument is the name of the listener you gave in <code>ranch:start_listener/5</code>.</p>
+<div class="listingblock"><div class="title">Starting a listener for TCP connections on a random port</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: #FF6600">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">ranch:start_listener</span></span>(<span style="color: #FF6600">tcp_echo</span>,
- <span style="color: #FF6600">ranch_tcp</span>, [{<span style="color: #FF6600">port</span>, <span style="color: #993399">0</span>}],
- <span style="color: #FF6600">echo_protocol</span>, []
-)<span style="color: #990000">.</span>
-<span style="color: #009900">Port</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">ranch:get_port</span></span>(<span style="color: #FF6600">tcp_echo</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">ranch:start_listener</font></b>(<font color="#FF6600">tcp_echo</font>,
+ <font color="#FF6600">ranch_tcp</font>, [{<font color="#FF6600">port</font>, <font color="#993399">0</font>}],
+ <font color="#FF6600">echo_protocol</font>, []
+)<font color="#990000">.</font>
+<font color="#009900">Port</font> <font color="#990000">=</font> <b><font color="#000000">ranch:get_port</font></b>(<font color="#FF6600">tcp_echo</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_listening_on_privileged_ports">Listening on privileged ports</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Some systems limit access to ports below 1024 for security reasons.
-This can easily be identified by an <code>{error, eacces}</code> error when trying
-to open a listening socket on such a port.</p></div>
-<div class="paragraph"><p>The methods for listening on privileged ports vary between systems,
-please refer to your system&#8217;s documentation for more information.</p></div>
-<div class="paragraph"><p>We recommend the use of port rewriting for systems with a single server,
-and load balancing for systems with multiple servers. Documenting these
-solutions is however out of the scope of this guide.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Some systems limit access to ports below 1024 for security reasons. This can easily be identified by an <code>{error, eacces}</code> error when trying to open a listening socket on such a port.</p>
+<p>The methods for listening on privileged ports vary between systems, please refer to your system&apos;s documentation for more information.</p>
+<p>We recommend the use of port rewriting for systems with a single server, and load balancing for systems with multiple servers. Documenting these solutions is however out of the scope of this guide.</p>
<h2 id="_accepting_connections_on_an_existing_socket">Accepting connections on an existing socket</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>If you want to accept connections on an existing socket, you can use the
-<code>socket</code> transport option, which should just be the relevant data returned
-from the connect function for the transport or the underlying socket library
-(<code>gen_tcp:connect</code>, <code>ssl:connect</code>). The accept function will then be
-called on the passed in socket. You should connect the socket in
-<code>{active, false}</code> mode, as well.</p></div>
-<div class="paragraph"><p>Note, however, that because of a bug in SSL, you cannot change ownership of an
-SSL listen socket prior to R16. Ranch will catch the error thrown, but the
-owner of the SSL socket will remain as whatever process created the socket.
-However, this will not affect accept behaviour unless the owner process dies,
-in which case the socket is closed. Therefore, to use this feature with SSL
-with an erlang release prior to R16, ensure that the SSL socket is opened in a
-persistant process.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>If you want to accept connections on an existing socket, you can use the <code>socket</code> transport option, which should just be the relevant data returned from the connect function for the transport or the underlying socket library (<code>gen_tcp:connect</code>, <code>ssl:connect</code>). The accept function will then be called on the passed in socket. You should connect the socket in <code>{active, false}</code> mode, as well.</p>
+<p>Note, however, that because of a bug in SSL, you cannot change ownership of an SSL listen socket prior to R16. Ranch will catch the error thrown, but the owner of the SSL socket will remain as whatever process created the socket. However, this will not affect accept behaviour unless the owner process dies, in which case the socket is closed. Therefore, to use this feature with SSL with an erlang release prior to R16, ensure that the SSL socket is opened in a persistant process.</p>
<h2 id="_limiting_the_number_of_concurrent_connections">Limiting the number of concurrent connections</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <code>max_connections</code> transport option allows you to limit the number
-of concurrent connections. It defaults to 1024. Its purpose is to
-prevent your system from being overloaded and ensuring all the
-connections are handled optimally.</p></div>
-<div class="listingblock">
-<div class="title">Customizing the maximum number of concurrent connections</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The <code>max_connections</code> transport option allows you to limit the number of concurrent connections. It defaults to 1024. Its purpose is to prevent your system from being overloaded and ensuring all the connections are handled optimally.</p>
+<div class="listingblock"><div class="title">Customizing the maximum number of concurrent connections</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: #FF6600">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">ranch:start_listener</span></span>(<span style="color: #FF6600">tcp_echo</span>,
- <span style="color: #FF6600">ranch_tcp</span>, [{<span style="color: #FF6600">port</span>, <span style="color: #993399">5555</span>}, {<span style="color: #FF6600">max_connections</span>, <span style="color: #993399">100</span>}],
- <span style="color: #FF6600">echo_protocol</span>, []
-)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>You can disable this limit by setting its value to the atom <code>infinity</code>.</p></div>
-<div class="listingblock">
-<div class="title">Disabling the limit for the number of connections</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">ranch:start_listener</font></b>(<font color="#FF6600">tcp_echo</font>,
+ <font color="#FF6600">ranch_tcp</font>, [{<font color="#FF6600">port</font>, <font color="#993399">5555</font>}, {<font color="#FF6600">max_connections</font>, <font color="#993399">100</font>}],
+ <font color="#FF6600">echo_protocol</font>, []
+)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>You can disable this limit by setting its value to the atom <code>infinity</code>.</p>
+<div class="listingblock"><div class="title">Disabling the limit for the number of connections</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: #FF6600">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">ranch:start_listener</span></span>(<span style="color: #FF6600">tcp_echo</span>,
- <span style="color: #FF6600">ranch_tcp</span>, [{<span style="color: #FF6600">port</span>, <span style="color: #993399">5555</span>}, {<span style="color: #FF6600">max_connections</span>, <span style="color: #FF6600">infinity</span>}],
- <span style="color: #FF6600">echo_protocol</span>, []
-)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>The maximum number of connections is a soft limit. In practice, it
-can reach <code>max_connections</code> + the number of acceptors.</p></div>
-<div class="paragraph"><p>When the maximum number of connections is reached, Ranch will stop
-accepting connections. This will not result in further connections
-being rejected, as the kernel option allows queueing incoming
-connections. The size of this queue is determined by the <code>backlog</code>
-option and defaults to 1024. Ranch does not know about the number
-of connections that are in the backlog.</p></div>
-<div class="paragraph"><p>You may not always want connections to be counted when checking for
-<code>max_connections</code>. For example you might have a protocol where both
-short-lived and long-lived connections are possible. If the long-lived
-connections are mostly waiting for messages, then they don&#8217;t consume
-much resources and can safely be removed from the count.</p></div>
-<div class="paragraph"><p>To remove the connection from the count, you must call the
-<code>ranch:remove_connection/1</code> from within the connection process,
-with the name of the listener as the only argument.</p></div>
-<div class="listingblock">
-<div class="title">Removing a connection from the count of connections</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">ranch:start_listener</font></b>(<font color="#FF6600">tcp_echo</font>,
+ <font color="#FF6600">ranch_tcp</font>, [{<font color="#FF6600">port</font>, <font color="#993399">5555</font>}, {<font color="#FF6600">max_connections</font>, <font color="#FF6600">infinity</font>}],
+ <font color="#FF6600">echo_protocol</font>, []
+)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>The maximum number of connections is a soft limit. In practice, it can reach <code>max_connections</code><br/> the number of acceptors.</p>
+<p>When the maximum number of connections is reached, Ranch will stop accepting connections. This will not result in further connections being rejected, as the kernel option allows queueing incoming connections. The size of this queue is determined by the <code>backlog</code> option and defaults to 1024. Ranch does not know about the number of connections that are in the backlog.</p>
+<p>You may not always want connections to be counted when checking for <code>max_connections</code>. For example you might have a protocol where both short-lived and long-lived connections are possible. If the long-lived connections are mostly waiting for messages, then they don&apos;t consume much resources and can safely be removed from the count.</p>
+<p>To remove the connection from the count, you must call the <code>ranch:remove_connection/1</code> from within the connection process, with the name of the listener as the only argument.</p>
+<div class="listingblock"><div class="title">Removing a connection from the count of connections</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">ranch:remove_connection</span></span>(<span style="color: #009900">Ref</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>As seen in the chapter covering protocols, this pid is received as the
-first argument of the protocol&#8217;s <code>start_link/4</code> callback.</p></div>
-<div class="paragraph"><p>You can modify the <code>max_connections</code> value on a running listener by
-using the <code>ranch:set_max_connections/2</code> function, with the name of the
-listener as first argument and the new value as the second.</p></div>
-<div class="listingblock">
-<div class="title">Upgrading the maximum number of connections</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">ranch:remove_connection</font></b>(<font color="#009900">Ref</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>As seen in the chapter covering protocols, this pid is received as the first argument of the protocol&apos;s <code>start_link/4</code> callback.</p>
+<p>You can modify the <code>max_connections</code> value on a running listener by using the <code>ranch:set_max_connections/2</code> function, with the name of the listener as first argument and the new value as the second.</p>
+<div class="listingblock"><div class="title">Upgrading the maximum number of connections</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">ranch:set_max_connections</span></span>(<span style="color: #FF6600">tcp_echo</span>, <span style="color: #009900">MaxConns</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>The change will occur immediately.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">ranch:set_max_connections</font></b>(<font color="#FF6600">tcp_echo</font>, <font color="#009900">MaxConns</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>The change will occur immediately.</p>
<h2 id="_customizing_the_number_of_acceptor_processes">Customizing the number of acceptor processes</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>By default Ranch will use 10 acceptor processes. Their role is
-to accept connections and spawn a connection process for every
-new connection.</p></div>
-<div class="paragraph"><p>This number can be tweaked to improve performance. A good
-number is typically between 10 or 100 acceptors. You must
-measure to find the best value for your application.</p></div>
-<div class="listingblock">
-<div class="title">Specifying a custom number of acceptor processes</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<p>By default Ranch will use 10 acceptor processes. Their role is to accept connections and spawn a connection process for every new connection.</p>
+<p>This number can be tweaked to improve performance. A good number is typically between 10 or 100 acceptors. You must measure to find the best value for your application.</p>
+<div class="listingblock"><div class="title">Specifying a custom number of acceptor processes</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: #FF6600">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">ranch:start_listener</span></span>(<span style="color: #FF6600">tcp_echo</span>,
- <span style="color: #FF6600">ranch_tcp</span>, [{<span style="color: #FF6600">port</span>, <span style="color: #993399">5555</span>}, {<span style="color: #FF6600">num_acceptors</span>, <span style="color: #993399">42</span>}],
- <span style="color: #FF6600">echo_protocol</span>, []
-)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
-<h2 id="_when_running_out_of_file_descriptors">When running out of file descriptors</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Operating systems have limits on the number of sockets
-which can be opened by applications. When this maximum is
-reached the listener can no longer accept new connections. The
-accept rate of the listener will be automatically reduced, and a
-warning message will be logged.</p></div>
-<div class="listingblock">
-<div class="content">
-<pre><code>=ERROR REPORT==== 13-Jan-2016::12:24:38 ===
-Ranch acceptor reducing accept rate: out of file descriptors</code></pre>
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">ranch:start_listener</font></b>(<font color="#FF6600">tcp_echo</font>,
+ <font color="#FF6600">ranch_tcp</font>, [{<font color="#FF6600">port</font>, <font color="#993399">5555</font>}, {<font color="#FF6600">num_acceptors</font>, <font color="#993399">42</font>}],
+ <font color="#FF6600">echo_protocol</font>, []
+)<font color="#990000">.</font></tt></pre>
</div></div>
-<div class="paragraph"><p>If you notice messages like this you should increase the number
-of file-descriptors which can be opened by your application. How
-this should be done is operating-system dependent. Please consult
-the documentation of your operating system.</p></div>
-</div>
-</div>
-<div class="sect1">
+<h2 id="_when_running_out_of_file_descriptors">When running out of file descriptors</h2>
+<p>Operating systems have limits on the number of sockets which can be opened by applications. When this maximum is reached the listener can no longer accept new connections. The accept rate of the listener will be automatically reduced, and a warning message will be logged.</p>
+<div class="listingblock"><div class="content"><pre>=ERROR REPORT==== 13-Jan-2016::12:24:38 ===
+Ranch acceptor reducing accept rate: out of file descriptors</pre></div></div>
+<p>If you notice messages like this you should increase the number of file-descriptors which can be opened by your application. How this should be done is operating-system dependent. Please consult the documentation of your operating system.</p>
<h2 id="_using_a_supervisor_for_connection_processes">Using a supervisor for connection processes</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Ranch allows you to define the type of process that will be used
-for the connection processes. By default it expects a <code>worker</code>.
-When the <code>connection_type</code> configuration value is set to <code>supervisor</code>,
-Ranch will consider that the connection process it manages is a
-supervisor and will reflect that in its supervision tree.</p></div>
-<div class="paragraph"><p>Connection processes of type <code>supervisor</code> can either handle the
-socket directly or through one of their children. In the latter
-case the start function for the connection process must return
-two pids: the pid of the supervisor you created (that will be
-supervised) and the pid of the protocol handling process (that
-will receive the socket).</p></div>
-<div class="paragraph"><p>Instead of returning <code>{ok, ConnPid}</code>, simply return
-<code>{ok, SupPid, ConnPid}</code>.</p></div>
-<div class="paragraph"><p>It is very important that the connection process be created
-under the supervisor process so that everything works as intended.
-If not, you will most likely experience issues when the supervised
-process is stopped.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Ranch allows you to define the type of process that will be used for the connection processes. By default it expects a <code>worker</code>. When the <code>connection_type</code> configuration value is set to <code>supervisor</code>, Ranch will consider that the connection process it manages is a supervisor and will reflect that in its supervision tree.</p>
+<p>Connection processes of type <code>supervisor</code> can either handle the socket directly or through one of their children. In the latter case the start function for the connection process must return two pids: the pid of the supervisor you created (that will be supervised) and the pid of the protocol handling process (that will receive the socket).</p>
+<p>Instead of returning <code>{ok, ConnPid}</code>, simply return <code>{ok, SupPid, ConnPid}</code>.</p>
+<p>It is very important that the connection process be created under the supervisor process so that everything works as intended. If not, you will most likely experience issues when the supervised process is stopped.</p>
<h2 id="_upgrading">Upgrading</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Ranch allows you to upgrade the protocol options. This takes effect
-immediately and for all subsequent connections.</p></div>
-<div class="paragraph"><p>To upgrade the protocol options, call <code>ranch:set_protocol_options/2</code>
-with the name of the listener as first argument and the new options
-as the second.</p></div>
-<div class="listingblock">
-<div class="title">Upgrading the protocol options</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Ranch allows you to upgrade the protocol options. This takes effect immediately and for all subsequent connections.</p>
+<p>To upgrade the protocol options, call <code>ranch:set_protocol_options/2</code> with the name of the listener as first argument and the new options as the second.</p>
+<div class="listingblock"><div class="title">Upgrading the protocol options</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">ranch:set_protocol_options</span></span>(<span style="color: #FF6600">tcp_echo</span>, <span style="color: #009900">NewOpts</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>All future connections will use the new options.</p></div>
-<div class="paragraph"><p>You can also retrieve the current options similarly by
-calling <code>ranch:get_protocol_options/1</code>.</p></div>
-<div class="listingblock">
-<div class="title">Retrieving the current protocol options</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">ranch:set_protocol_options</font></b>(<font color="#FF6600">tcp_echo</font>, <font color="#009900">NewOpts</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>All future connections will use the new options.</p>
+<p>You can also retrieve the current options similarly by calling <code>ranch:get_protocol_options/1</code>.</p>
+<div class="listingblock"><div class="title">Retrieving the current protocol options</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">Opts</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">ranch:get_protocol_options</span></span>(<span style="color: #FF6600">tcp_echo</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">Opts</font> <font color="#990000">=</font> <b><font color="#000000">ranch:get_protocol_options</font></b>(<font color="#FF6600">tcp_echo</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_obtaining_information_about_listeners">Obtaining information about listeners</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Ranch provides two functions for retrieving information about the
-listeners, for reporting and diagnostic purposes.</p></div>
-<div class="paragraph"><p>The <code>ranch:info/0</code> function will return detailed information
-about all listeners.</p></div>
-<div class="listingblock">
-<div class="title">Retrieving detailed information</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Ranch provides two functions for retrieving information about the listeners, for reporting and diagnostic purposes.</p>
+<p>The <code>ranch:info/0</code> function will return detailed information about all listeners.</p>
+<div class="listingblock"><div class="title">Retrieving detailed information</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">ranch:info</span></span>()<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>The <code>ranch:procs/2</code> function will return all acceptor or listener
-processes for a given listener.</p></div>
-<div class="listingblock">
-<div class="title">Get all acceptor processes</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">ranch:info</font></b>()<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>The <code>ranch:procs/2</code> function will return all acceptor or listener processes for a given listener.</p>
+<div class="listingblock"><div class="title">Get all acceptor processes</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">ranch:procs</span></span>(<span style="color: #FF6600">tcp_echo</span>, <span style="color: #FF6600">acceptors</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Get all connection processes</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">ranch:procs</font></b>(<font color="#FF6600">tcp_echo</font>, <font color="#FF6600">acceptors</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Get all connection processes</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">ranch:procs</span></span>(<span style="color: #FF6600">tcp_echo</span>, <span style="color: #FF6600">connections</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
+<pre><tt><b><font color="#000000">ranch:procs</font></b>(<font color="#FF6600">tcp_echo</font>, <font color="#FF6600">connections</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+
@@ -479,6 +325,8 @@ http://www.gnu.org/software/src-highlite -->
+ <li><a href="/docs/en/ranch/1.5/guide">1.5</a></li>
+
<li><a href="/docs/en/ranch/1.4/guide">1.4</a></li>
<li><a href="/docs/en/ranch/1.3/guide">1.3</a></li>
diff --git a/docs/en/ranch/1.4/guide/parsers/index.html b/docs/en/ranch/1.4/guide/parsers/index.html
index 4b2aa2b8..065d4914 100644
--- a/docs/en/ranch/1.4/guide/parsers/index.html
+++ b/docs/en/ranch/1.4/guide/parsers/index.html
@@ -62,109 +62,69 @@
<h1 class="lined-header"><span>Writing parsers</span></h1>
-<div class="paragraph"><p>There are three kinds of protocols:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-Text protocols
-</p>
+<p>There are three kinds of protocols:</p>
+<ul><li>Text protocols
</li>
-<li>
-<p>
-Schema-less binary protocols
-</p>
+<li>Schema-less binary protocols
</li>
-<li>
-<p>
-Schema-based binary protocols
-</p>
+<li>Schema-based binary protocols
</li>
-</ul></div>
-<div class="paragraph"><p>This chapter introduces the first two kinds. It will not cover
-more advanced topics such as continuations or parser generators.</p></div>
-<div class="paragraph"><p>This chapter isn&#8217;t specifically about Ranch, we assume here that
-you know how to read data from the socket. The data you read and
-the data that hasn&#8217;t been parsed is saved in a buffer. Every
-time you read from the socket, the data read is appended to the
-buffer. What happens next depends on the kind of protocol. We
-will only cover the first two.</p></div>
-<div class="sect1">
+</ul>
+<p>This chapter introduces the first two kinds. It will not cover more advanced topics such as continuations or parser generators.</p>
+<p>This chapter isn&apos;t specifically about Ranch, we assume here that you know how to read data from the socket. The data you read and the data that hasn&apos;t been parsed is saved in a buffer. Every time you read from the socket, the data read is appended to the buffer. What happens next depends on the kind of protocol. We will only cover the first two.</p>
<h2 id="_parsing_text">Parsing text</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Text protocols are generally line based. This means that we can&#8217;t
-do anything with them until we receive the full line.</p></div>
-<div class="paragraph"><p>A simple way to get a full line is to use <code>binary:split/{2,3}</code>.</p></div>
-<div class="listingblock">
-<div class="title">Using binary:split/2 to get a line of input</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Text protocols are generally line based. This means that we can&apos;t do anything with them until we receive the full line.</p>
+<p>A simple way to get a full line is to use <code>binary:split/{2,3}</code>.</p>
+<div class="listingblock"><div class="title">Using binary:split/2 to get a line of input</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: #0000FF">case</span></span> <span style="font-weight: bold"><span style="color: #000000">binary:split</span></span>(<span style="color: #009900">Buffer</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"\n"</span><span style="color: #990000">&gt;&gt;</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
- [<span style="color: #990000">_</span>] <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #000000">get_more_data</span></span>(<span style="color: #009900">Buffer</span>);
- [<span style="color: #009900">Line</span>, <span style="color: #009900">Rest</span>] <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #000000">handle_line</span></span>(<span style="color: #009900">Line</span>, <span style="color: #009900">Rest</span>)
-<span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>In the above example, we can have two results. Either there was
-a line break in the buffer and we get it split into two parts,
-the line and the rest of the buffer; or there was no line break
-in the buffer and we need to get more data from the socket.</p></div>
-<div class="paragraph"><p>Next, we need to parse the line. The simplest way is to again
-split, here on space. The difference is that we want to split
-on all spaces character, as we want to tokenize the whole string.</p></div>
-<div class="listingblock">
-<div class="title">Using binary:split/3 to split text</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#0000FF">case</font></b> <b><font color="#000000">binary:split</font></b>(<font color="#009900">Buffer</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"\n"</font><font color="#990000">&gt;&gt;</font>) <b><font color="#0000FF">of</font></b>
+ [<font color="#990000">_</font>] <font color="#990000">-&gt;</font>
+ <b><font color="#000000">get_more_data</font></b>(<font color="#009900">Buffer</font>);
+ [<font color="#009900">Line</font>, <font color="#009900">Rest</font>] <font color="#990000">-&gt;</font>
+ <b><font color="#000000">handle_line</font></b>(<font color="#009900">Line</font>, <font color="#009900">Rest</font>)
+<b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>In the above example, we can have two results. Either there was a line break in the buffer and we get it split into two parts, the line and the rest of the buffer; or there was no line break in the buffer and we need to get more data from the socket.</p>
+<p>Next, we need to parse the line. The simplest way is to again split, here on space. The difference is that we want to split on all spaces character, as we want to tokenize the whole string.</p>
+<div class="listingblock"><div class="title">Using binary:split/3 to split text</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: #0000FF">case</span></span> <span style="font-weight: bold"><span style="color: #000000">binary:split</span></span>(<span style="color: #009900">Line</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">" "</span><span style="color: #990000">&gt;&gt;</span>, [<span style="color: #FF6600">global</span>]) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
- [<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"HELLO"</span><span style="color: #990000">&gt;&gt;</span>] <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #000000">be_polite</span></span>();
- [<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"AUTH"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">User</span>, <span style="color: #009900">Password</span>] <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #000000">authenticate_user</span></span>(<span style="color: #009900">User</span>, <span style="color: #009900">Password</span>);
- [<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"QUIT"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Reason</span>] <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #000000">quit</span></span>(<span style="color: #009900">Reason</span>)
- <span style="font-style: italic"><span style="color: #9A1900">%% ...</span></span>
-<span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Pretty simple, right? Match on the command name, get the rest
-of the tokens in variables and call the respective functions.</p></div>
-<div class="paragraph"><p>After doing this, you will want to check if there is another
-line in the buffer, and handle it immediately if any.
-Otherwise wait for more data.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#0000FF">case</font></b> <b><font color="#000000">binary:split</font></b>(<font color="#009900">Line</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">" "</font><font color="#990000">&gt;&gt;</font>, [<font color="#FF6600">global</font>]) <b><font color="#0000FF">of</font></b>
+ [<font color="#990000">&lt;&lt;</font><font color="#FF0000">"HELLO"</font><font color="#990000">&gt;&gt;</font>] <font color="#990000">-&gt;</font>
+ <b><font color="#000000">be_polite</font></b>();
+ [<font color="#990000">&lt;&lt;</font><font color="#FF0000">"AUTH"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">User</font>, <font color="#009900">Password</font>] <font color="#990000">-&gt;</font>
+ <b><font color="#000000">authenticate_user</font></b>(<font color="#009900">User</font>, <font color="#009900">Password</font>);
+ [<font color="#990000">&lt;&lt;</font><font color="#FF0000">"QUIT"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Reason</font>] <font color="#990000">-&gt;</font>
+ <b><font color="#000000">quit</font></b>(<font color="#009900">Reason</font>)
+ <i><font color="#9A1900">%% ...</font></i>
+<b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Pretty simple, right? Match on the command name, get the rest of the tokens in variables and call the respective functions.</p>
+<p>After doing this, you will want to check if there is another line in the buffer, and handle it immediately if any. Otherwise wait for more data.</p>
<h2 id="_parsing_binary">Parsing binary</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Binary protocols can be more varied, although most of them are
-pretty similar. The first four bytes of a frame tend to be
-the size of the frame, which is followed by a certain number
-of bytes for the type of frame and then various parameters.</p></div>
-<div class="paragraph"><p>Sometimes the size of the frame includes the first four bytes,
-sometimes not. Other times this size is encoded over two bytes.
-And even other times little-endian is used instead of big-endian.</p></div>
-<div class="paragraph"><p>The general idea stays the same though.</p></div>
-<div class="listingblock">
-<div class="title">Using binary pattern matching to split frames</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Binary protocols can be more varied, although most of them are pretty similar. The first four bytes of a frame tend to be the size of the frame, which is followed by a certain number of bytes for the type of frame and then various parameters.</p>
+<p>Sometimes the size of the frame includes the first four bytes, sometimes not. Other times this size is encoded over two bytes. And even other times little-endian is used instead of big-endian.</p>
+<p>The general idea stays the same though.</p>
+<div class="listingblock"><div class="title">Using binary pattern matching to split frames</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: #009900">Size</span><span style="color: #990000">:</span><span style="color: #993399">32</span>, <span style="color: #990000">_/</span><span style="color: #FF6600">bits</span> <span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=</span> <span style="color: #009900">Buffer</span>,
-<span style="font-weight: bold"><span style="color: #0000FF">case</span></span> <span style="color: #009900">Buffer</span> <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
- <span style="color: #990000">&lt;&lt;</span> <span style="color: #009900">Frame</span><span style="color: #990000">:</span><span style="color: #009900">Size</span><span style="color: #990000">/</span><span style="font-weight: bold"><span style="color: #000080">binary</span></span>, <span style="color: #009900">Rest</span><span style="color: #990000">/</span><span style="color: #FF6600">bits</span> <span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #000000">handle_frame</span></span>(<span style="color: #009900">Frame</span>, <span style="color: #009900">Rest</span>);
- <span style="color: #990000">_</span> <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #000000">get_more_data</span></span>(<span style="color: #009900">Buffer</span>)
-<span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>You will then need to parse this frame using binary pattern
-matching, and handle it. Then you will want to check if there
-is another frame fully received in the buffer, and handle it
-immediately if any. Otherwise wait for more data.</p></div>
-</div>
-</div>
+<pre><tt><font color="#990000">&lt;&lt;</font> <font color="#009900">Size</font><font color="#990000">:</font><font color="#993399">32</font>, <font color="#990000">_/</font><font color="#FF6600">bits</font> <font color="#990000">&gt;&gt;</font> <font color="#990000">=</font> <font color="#009900">Buffer</font>,
+<b><font color="#0000FF">case</font></b> <font color="#009900">Buffer</font> <b><font color="#0000FF">of</font></b>
+ <font color="#990000">&lt;&lt;</font> <font color="#009900">Frame</font><font color="#990000">:</font><font color="#009900">Size</font><font color="#990000">/</font><b><font color="#000080">binary</font></b>, <font color="#009900">Rest</font><font color="#990000">/</font><font color="#FF6600">bits</font> <font color="#990000">&gt;&gt;</font> <font color="#990000">-&gt;</font>
+ <b><font color="#000000">handle_frame</font></b>(<font color="#009900">Frame</font>, <font color="#009900">Rest</font>);
+ <font color="#990000">_</font> <font color="#990000">-&gt;</font>
+ <b><font color="#000000">get_more_data</font></b>(<font color="#009900">Buffer</font>)
+<b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>You will then need to parse this frame using binary pattern matching, and handle it. Then you will want to check if there is another frame fully received in the buffer, and handle it immediately if any. Otherwise wait for more data.</p>
+
@@ -221,6 +181,8 @@ immediately if any. Otherwise wait for more data.</p></div>
+ <li><a href="/docs/en/ranch/1.5/guide">1.5</a></li>
+
<li><a href="/docs/en/ranch/1.4/guide">1.4</a></li>
<li><a href="/docs/en/ranch/1.3/guide">1.3</a></li>
diff --git a/docs/en/ranch/1.4/guide/protocols/index.html b/docs/en/ranch/1.4/guide/protocols/index.html
index 579faf62..c2d019a4 100644
--- a/docs/en/ranch/1.4/guide/protocols/index.html
+++ b/docs/en/ranch/1.4/guide/protocols/index.html
@@ -62,104 +62,76 @@
<h1 class="lined-header"><span>Protocols</span></h1>
-<div class="paragraph"><p>A protocol handler starts a connection process and defines the
-protocol logic executed in this process.</p></div>
-<div class="sect1">
+<p>A protocol handler starts a connection process and defines the protocol logic executed in this process.</p>
<h2 id="_writing_a_protocol_handler">Writing a protocol handler</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>All protocol handlers must implement the <code>ranch_protocol</code> behavior
-which defines a single callback, <code>start_link/4</code>. This callback is
-responsible for spawning a new process for handling the connection.
-It receives four arguments: the name of the listener, the socket, the
-transport handler being used and the protocol options defined in
-the call to <code>ranch:start_listener/5</code>. This callback must
-return <code>{ok, Pid}</code>, with <code>Pid</code> the pid of the new process.</p></div>
-<div class="paragraph"><p>The newly started process can then freely initialize itself. However,
-it must call <code>ranch:accept_ack/1</code> before doing any socket operation.
-This will ensure the connection process is the owner of the socket.
-It expects the listener&#8217;s name as argument.</p></div>
-<div class="listingblock">
-<div class="title">Acknowledge accepting the socket</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<p>All protocol handlers must implement the <code>ranch_protocol</code> behavior which defines a single callback, <code>start_link/4</code>. This callback is responsible for spawning a new process for handling the connection. It receives four arguments: the name of the listener, the socket, the transport handler being used and the protocol options defined in the call to <code>ranch:start_listener/5</code>. This callback must return <code>{ok, Pid}</code>, with <code>Pid</code> the pid of the new process.</p>
+<p>The newly started process can then freely initialize itself. However, it must call <code>ranch:accept_ack/1</code> before doing any socket operation. This will ensure the connection process is the owner of the socket. It expects the listener&apos;s name as argument.</p>
+<div class="listingblock"><div class="title">Acknowledge accepting the socket</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: #0000FF">ok</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">ranch:accept_ack</span></span>(<span style="color: #009900">Ref</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>If your protocol code requires specific socket options, you should
-set them while initializing your connection process, after
-calling <code>ranch:accept_ack/1</code>. You can use <code>Transport:setopts/2</code>
-for that purpose.</p></div>
-<div class="paragraph"><p>Following is the complete protocol code for the example found
-in <code>examples/tcp_echo/</code>.</p></div>
-<div class="listingblock">
-<div class="title">Protocol module that echoes everything it receives</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#0000FF">ok</font> <font color="#990000">=</font> <b><font color="#000000">ranch:accept_ack</font></b>(<font color="#009900">Ref</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>If your protocol code requires specific socket options, you should set them while initializing your connection process, after calling <code>ranch:accept_ack/1</code>. You can use <code>Transport:setopts/2</code> for that purpose.</p>
+<p>Following is the complete protocol code for the example found in <code>examples/tcp_echo/</code>.</p>
+<div class="listingblock"><div class="title">Protocol module that echoes everything it receives</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: #000080">-module</span></span>(<span style="color: #FF6600">echo_protocol</span>)<span style="color: #990000">.</span>
-<span style="font-weight: bold"><span style="color: #000080">-behaviour</span></span>(<span style="color: #FF6600">ranch_protocol</span>)<span style="color: #990000">.</span>
-
-<span style="font-weight: bold"><span style="color: #000080">-export</span></span>([<span style="font-weight: bold"><span style="color: #000000">start_link</span></span><span style="color: #990000">/</span><span style="color: #993399">4</span>])<span style="color: #990000">.</span>
-<span style="font-weight: bold"><span style="color: #000080">-export</span></span>([<span style="font-weight: bold"><span style="color: #000000">init</span></span><span style="color: #990000">/</span><span style="color: #993399">4</span>])<span style="color: #990000">.</span>
-
-<span style="font-weight: bold"><span style="color: #000000">start_link</span></span>(<span style="color: #009900">Ref</span>, <span style="color: #009900">Socket</span>, <span style="color: #009900">Transport</span>, <span style="color: #009900">Opts</span>) <span style="color: #990000">-&gt;</span>
- <span style="color: #009900">Pid</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000080">spawn_link</span></span>(<span style="font-weight: bold"><span style="color: #000080">?MODULE</span></span>, <span style="color: #FF6600">init</span>, [<span style="color: #009900">Ref</span>, <span style="color: #009900">Socket</span>, <span style="color: #009900">Transport</span>, <span style="color: #009900">Opts</span>]),
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Pid</span>}<span style="color: #990000">.</span>
-
-<span style="font-weight: bold"><span style="color: #000000">init</span></span>(<span style="color: #009900">Ref</span>, <span style="color: #009900">Socket</span>, <span style="color: #009900">Transport</span>, <span style="color: #009900">_Opts</span> <span style="color: #990000">=</span> []) <span style="color: #990000">-&gt;</span>
- <span style="color: #0000FF">ok</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">ranch:accept_ack</span></span>(<span style="color: #009900">Ref</span>),
- <span style="font-weight: bold"><span style="color: #000000">loop</span></span>(<span style="color: #009900">Socket</span>, <span style="color: #009900">Transport</span>)<span style="color: #990000">.</span>
-
-<span style="font-weight: bold"><span style="color: #000000">loop</span></span>(<span style="color: #009900">Socket</span>, <span style="color: #009900">Transport</span>) <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #0000FF">case</span></span> <span style="color: #009900">Transport</span><span style="color: #990000">:</span><span style="font-weight: bold"><span style="color: #000000">recv</span></span>(<span style="color: #009900">Socket</span>, <span style="color: #993399">0</span>, <span style="color: #993399">5000</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Data</span>} <span style="color: #990000">-&gt;</span>
- <span style="color: #009900">Transport</span><span style="color: #990000">:</span><span style="font-weight: bold"><span style="color: #000000">send</span></span>(<span style="color: #009900">Socket</span>, <span style="color: #009900">Data</span>),
- <span style="font-weight: bold"><span style="color: #000000">loop</span></span>(<span style="color: #009900">Socket</span>, <span style="color: #009900">Transport</span>);
- <span style="color: #990000">_</span> <span style="color: #990000">-&gt;</span>
- <span style="color: #0000FF">ok</span> <span style="color: #990000">=</span> <span style="color: #009900">Transport</span><span style="color: #990000">:</span><span style="font-weight: bold"><span style="color: #000000">close</span></span>(<span style="color: #009900">Socket</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">
+<pre><tt><b><font color="#000080">-module</font></b>(<font color="#FF6600">echo_protocol</font>)<font color="#990000">.</font>
+<b><font color="#000080">-behaviour</font></b>(<font color="#FF6600">ranch_protocol</font>)<font color="#990000">.</font>
+
+<b><font color="#000080">-export</font></b>([<b><font color="#000000">start_link</font></b><font color="#990000">/</font><font color="#993399">4</font>])<font color="#990000">.</font>
+<b><font color="#000080">-export</font></b>([<b><font color="#000000">init</font></b><font color="#990000">/</font><font color="#993399">4</font>])<font color="#990000">.</font>
+
+<b><font color="#000000">start_link</font></b>(<font color="#009900">Ref</font>, <font color="#009900">Socket</font>, <font color="#009900">Transport</font>, <font color="#009900">Opts</font>) <font color="#990000">-&gt;</font>
+ <font color="#009900">Pid</font> <font color="#990000">=</font> <b><font color="#000080">spawn_link</font></b>(<b><font color="#000080">?MODULE</font></b>, <font color="#FF6600">init</font>, [<font color="#009900">Ref</font>, <font color="#009900">Socket</font>, <font color="#009900">Transport</font>, <font color="#009900">Opts</font>]),
+ {<font color="#FF6600">ok</font>, <font color="#009900">Pid</font>}<font color="#990000">.</font>
+
+<b><font color="#000000">init</font></b>(<font color="#009900">Ref</font>, <font color="#009900">Socket</font>, <font color="#009900">Transport</font>, <font color="#009900">_Opts</font> <font color="#990000">=</font> []) <font color="#990000">-&gt;</font>
+ <font color="#0000FF">ok</font> <font color="#990000">=</font> <b><font color="#000000">ranch:accept_ack</font></b>(<font color="#009900">Ref</font>),
+ <b><font color="#000000">loop</font></b>(<font color="#009900">Socket</font>, <font color="#009900">Transport</font>)<font color="#990000">.</font>
+
+<b><font color="#000000">loop</font></b>(<font color="#009900">Socket</font>, <font color="#009900">Transport</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">case</font></b> <font color="#009900">Transport</font><font color="#990000">:</font><b><font color="#000000">recv</font></b>(<font color="#009900">Socket</font>, <font color="#993399">0</font>, <font color="#993399">5000</font>) <b><font color="#0000FF">of</font></b>
+ {<font color="#FF6600">ok</font>, <font color="#009900">Data</font>} <font color="#990000">-&gt;</font>
+ <font color="#009900">Transport</font><font color="#990000">:</font><b><font color="#000000">send</font></b>(<font color="#009900">Socket</font>, <font color="#009900">Data</font>),
+ <b><font color="#000000">loop</font></b>(<font color="#009900">Socket</font>, <font color="#009900">Transport</font>);
+ <font color="#990000">_</font> <font color="#990000">-&gt;</font>
+ <font color="#0000FF">ok</font> <font color="#990000">=</font> <font color="#009900">Transport</font><font color="#990000">:</font><b><font color="#000000">close</font></b>(<font color="#009900">Socket</font>)
+ <b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_using_gen_server">Using gen_server</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Special processes like the ones that use the <code>gen_server</code> or <code>gen_fsm</code>
-behaviours have the particularity of having their <code>start_link</code> call not
-return until the <code>init</code> function returns. This is problematic, because
-you won&#8217;t be able to call <code>ranch:accept_ack/1</code> from the <code>init</code> callback
-as this would cause a deadlock to happen.</p></div>
-<div class="paragraph"><p>Use the <code>gen_server:enter_loop/3</code> function. It allows you to start your process
-normally (although it must be started with <code>proc_lib</code> like all special
-processes), then perform any needed operations before falling back into
-the normal <code>gen_server</code> execution loop.</p></div>
-<div class="listingblock">
-<div class="title">Use a gen_server for protocol handling</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<p>Special processes like the ones that use the <code>gen_server</code> or <code>gen_fsm</code> behaviours have the particularity of having their <code>start_link</code> call not return until the <code>init</code> function returns. This is problematic, because you won&apos;t be able to call <code>ranch:accept_ack/1</code> from the <code>init</code> callback as this would cause a deadlock to happen.</p>
+<p>Use the <code>gen_server:enter_loop/3</code> function. It allows you to start your process normally (although it must be started with <code>proc_lib</code> like all special processes), then perform any needed operations before falling back into the normal <code>gen_server</code> execution loop.</p>
+<div class="listingblock"><div class="title">Use a gen_server for protocol handling</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: #000080">-module</span></span>(<span style="color: #FF6600">my_protocol</span>)<span style="color: #990000">.</span>
-<span style="font-weight: bold"><span style="color: #000080">-behaviour</span></span>(<span style="color: #FF6600">gen_server</span>)<span style="color: #990000">.</span>
-<span style="font-weight: bold"><span style="color: #000080">-behaviour</span></span>(<span style="color: #FF6600">ranch_protocol</span>)<span style="color: #990000">.</span>
+<pre><tt><b><font color="#000080">-module</font></b>(<font color="#FF6600">my_protocol</font>)<font color="#990000">.</font>
+<b><font color="#000080">-behaviour</font></b>(<font color="#FF6600">gen_server</font>)<font color="#990000">.</font>
+<b><font color="#000080">-behaviour</font></b>(<font color="#FF6600">ranch_protocol</font>)<font color="#990000">.</font>
-<span style="font-weight: bold"><span style="color: #000080">-export</span></span>([<span style="font-weight: bold"><span style="color: #000000">start_link</span></span><span style="color: #990000">/</span><span style="color: #993399">4</span>])<span style="color: #990000">.</span>
-<span style="font-weight: bold"><span style="color: #000080">-export</span></span>([<span style="font-weight: bold"><span style="color: #000000">init</span></span><span style="color: #990000">/</span><span style="color: #993399">1</span>])<span style="color: #990000">.</span>
-<span style="font-style: italic"><span style="color: #9A1900">%% Exports of other gen_server callbacks here.</span></span>
+<b><font color="#000080">-export</font></b>([<b><font color="#000000">start_link</font></b><font color="#990000">/</font><font color="#993399">4</font>])<font color="#990000">.</font>
+<b><font color="#000080">-export</font></b>([<b><font color="#000000">init</font></b><font color="#990000">/</font><font color="#993399">1</font>])<font color="#990000">.</font>
+<i><font color="#9A1900">%% Exports of other gen_server callbacks here.</font></i>
-<span style="font-weight: bold"><span style="color: #000000">start_link</span></span>(<span style="color: #009900">Ref</span>, <span style="color: #009900">Socket</span>, <span style="color: #009900">Transport</span>, <span style="color: #009900">Opts</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">ok</span>, <span style="font-weight: bold"><span style="color: #000000">proc_lib:spawn_link</span></span>(<span style="font-weight: bold"><span style="color: #000080">?MODULE</span></span>, <span style="color: #FF6600">init</span>, [{<span style="color: #009900">Ref</span>, <span style="color: #009900">Socket</span>, <span style="color: #009900">Transport</span>, <span style="color: #009900">Opts</span>}])}<span style="color: #990000">.</span>
+<b><font color="#000000">start_link</font></b>(<font color="#009900">Ref</font>, <font color="#009900">Socket</font>, <font color="#009900">Transport</font>, <font color="#009900">Opts</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <b><font color="#000000">proc_lib:spawn_link</font></b>(<b><font color="#000080">?MODULE</font></b>, <font color="#FF6600">init</font>, [{<font color="#009900">Ref</font>, <font color="#009900">Socket</font>, <font color="#009900">Transport</font>, <font color="#009900">Opts</font>}])}<font color="#990000">.</font>
-<span style="font-weight: bold"><span style="color: #000000">init</span></span>({<span style="color: #009900">Ref</span>, <span style="color: #009900">Socket</span>, <span style="color: #009900">Transport</span>, <span style="color: #009900">_Opts</span> <span style="color: #990000">=</span> []}) <span style="color: #990000">-&gt;</span>
- <span style="font-style: italic"><span style="color: #9A1900">%% Perform any required state initialization here.</span></span>
- <span style="color: #0000FF">ok</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">ranch:accept_ack</span></span>(<span style="color: #009900">Ref</span>),
- <span style="color: #0000FF">ok</span> <span style="color: #990000">=</span> <span style="color: #009900">Transport</span><span style="color: #990000">:</span><span style="font-weight: bold"><span style="color: #000000">setopts</span></span>(<span style="color: #009900">Socket</span>, [{<span style="color: #FF6600">active</span>, <span style="color: #FF6600">once</span>}]),
- <span style="font-weight: bold"><span style="color: #000000">gen_server:enter_loop</span></span>(<span style="font-weight: bold"><span style="color: #000080">?MODULE</span></span>, [], {<span style="color: #FF6600">state</span>, <span style="color: #009900">Socket</span>, <span style="color: #009900">Transport</span>})<span style="color: #990000">.</span>
+<b><font color="#000000">init</font></b>({<font color="#009900">Ref</font>, <font color="#009900">Socket</font>, <font color="#009900">Transport</font>, <font color="#009900">_Opts</font> <font color="#990000">=</font> []}) <font color="#990000">-&gt;</font>
+ <i><font color="#9A1900">%% Perform any required state initialization here.</font></i>
+ <font color="#0000FF">ok</font> <font color="#990000">=</font> <b><font color="#000000">ranch:accept_ack</font></b>(<font color="#009900">Ref</font>),
+ <font color="#0000FF">ok</font> <font color="#990000">=</font> <font color="#009900">Transport</font><font color="#990000">:</font><b><font color="#000000">setopts</font></b>(<font color="#009900">Socket</font>, [{<font color="#FF6600">active</font>, <font color="#FF6600">once</font>}]),
+ <b><font color="#000000">gen_server:enter_loop</font></b>(<b><font color="#000080">?MODULE</font></b>, [], {<font color="#FF6600">state</font>, <font color="#009900">Socket</font>, <font color="#009900">Transport</font>})<font color="#990000">.</font>
+
+<i><font color="#9A1900">%% Other gen_server callbacks here.</font></i></tt></pre>
+</div></div>
+<p>Check the <code>tcp_reverse</code> example for a complete example.</p>
-<span style="font-style: italic"><span style="color: #9A1900">%% Other gen_server callbacks here.</span></span></tt></pre></div></div>
-<div class="paragraph"><p>Check the <code>tcp_reverse</code> example for a complete example.</p></div>
-</div>
-</div>
@@ -216,6 +188,8 @@ http://www.gnu.org/software/src-highlite -->
+ <li><a href="/docs/en/ranch/1.5/guide">1.5</a></li>
+
<li><a href="/docs/en/ranch/1.4/guide">1.4</a></li>
<li><a href="/docs/en/ranch/1.3/guide">1.3</a></li>
diff --git a/docs/en/ranch/1.4/guide/ssl_auth/index.html b/docs/en/ranch/1.4/guide/ssl_auth/index.html
index 821199d8..54209966 100644
--- a/docs/en/ranch/1.4/guide/ssl_auth/index.html
+++ b/docs/en/ranch/1.4/guide/ssl_auth/index.html
@@ -62,158 +62,82 @@
<h1 class="lined-header"><span>SSL client authentication</span></h1>
-<div class="sect1">
<h2 id="_purpose">Purpose</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>SSL client authentication is a mechanism allowing applications to
-identify certificates. This allows your application to make sure that
-the client is an authorized certificate, but makes no claim about
-whether the user can be trusted. This can be combined with a password
-based authentication to attain greater security.</p></div>
-<div class="paragraph"><p>The server only needs to retain the certificate serial number and
-the certificate issuer to authenticate the certificate. Together,
-they can be used to uniquely identify a certicate.</p></div>
-<div class="paragraph"><p>As Ranch allows the same protocol code to be used for both SSL and
-non-SSL transports, you need to make sure you are in an SSL context
-before attempting to perform an SSL client authentication. This
-can be done by checking the return value of <code>Transport:name/0</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>SSL client authentication is a mechanism allowing applications to identify certificates. This allows your application to make sure that the client is an authorized certificate, but makes no claim about whether the user can be trusted. This can be combined with a password based authentication to attain greater security.</p>
+<p>The server only needs to retain the certificate serial number and the certificate issuer to authenticate the certificate. Together, they can be used to uniquely identify a certicate.</p>
+<p>As Ranch allows the same protocol code to be used for both SSL and non-SSL transports, you need to make sure you are in an SSL context before attempting to perform an SSL client authentication. This can be done by checking the return value of <code>Transport:name/0</code>.</p>
<h2 id="_obtaining_client_certificates">Obtaining client certificates</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>You can obtain client certificates from various sources. You can
-generate them yourself, or you can use a service like CAcert.org
-which allows you to generate client and server certificates for
-free.</p></div>
-<div class="paragraph"><p>Following are the steps you need to take to create a CAcert.org
-account, generate a certificate and install it in your favorite
-browser.</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-Open <a href="http://cacert.org">http://cacert.org</a> in your favorite browser
-</p>
+<p>You can obtain client certificates from various sources. You can generate them yourself, or you can use a service like CAcert.org which allows you to generate client and server certificates for free.</p>
+<p>Following are the steps you need to take to create a CAcert.org account, generate a certificate and install it in your favorite browser.</p>
+<ul><li>Open <a href="http://cacert.org">http://cacert.org</a> in your favorite browser
</li>
-<li>
-<p>
-Root Certificate link: install both certificates
-</p>
+<li>Root Certificate link: install both certificates
</li>
-<li>
-<p>
-Join (Register an account)
-</p>
+<li>Join (Register an account)
</li>
-<li>
-<p>
-Verify your account (check your email inbox!)
-</p>
+<li>Verify your account (check your email inbox!)
</li>
-<li>
-<p>
-Log in
-</p>
+<li>Log in
</li>
-<li>
-<p>
-Client Certificates: New
-</p>
+<li>Client Certificates: New
</li>
-<li>
-<p>
-Follow instructions to create the certificate
-</p>
+<li>Follow instructions to create the certificate
</li>
-<li>
-<p>
-Install the certificate in your browser
-</p>
+<li>Install the certificate in your browser
</li>
-</ul></div>
-<div class="paragraph"><p>You can optionally save the certificate for later use, for example
-to extract the <code>IssuerID</code> information as will be detailed later on.</p></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
+<p>You can optionally save the certificate for later use, for example to extract the <code>IssuerID</code> information as will be detailed later on.</p>
<h2 id="_transport_configuration">Transport configuration</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The SSL transport does not request a client certificate by default.
-You need to specify the <code>{verify, verify_peer}</code> option when starting
-the listener to enable this behavior.</p></div>
-<div class="listingblock">
-<div class="title">Configure a listener for SSL authentication</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<p>The SSL transport does not request a client certificate by default. You need to specify the <code>{verify, verify_peer}</code> option when starting the listener to enable this behavior.</p>
+<div class="listingblock"><div class="title">Configure a listener for SSL authentication</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: #FF6600">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">ranch:start_listener</span></span>(<span style="color: #FF6600">my_ssl</span>,
- <span style="color: #FF6600">ranch_ssl</span>, [
- {<span style="color: #FF6600">port</span>, <span style="color: #009900">SSLPort</span>},
- {<span style="color: #FF6600">certfile</span>, <span style="color: #009900">PathToCertfile</span>},
- {<span style="color: #FF6600">cacertfile</span>, <span style="color: #009900">PathToCACertfile</span>},
- {<span style="color: #FF6600">verify</span>, <span style="color: #FF6600">verify_peer</span>}
- ],
- <span style="color: #FF6600">my_protocol</span>, []
-)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>In this example we set the required <code>port</code> and <code>certfile</code>, but also
-the <code>cacertfile</code> containing the CACert.org root certificate, and
-the option to request the client certificate.</p></div>
-<div class="paragraph"><p>If you enable the <code>{verify, verify_peer}</code> option and the client does
-not have a client certificate configured for your domain, then no
-certificate will be sent. This allows you to use SSL for more than
-just authenticated clients.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">ranch:start_listener</font></b>(<font color="#FF6600">my_ssl</font>,
+ <font color="#FF6600">ranch_ssl</font>, [
+ {<font color="#FF6600">port</font>, <font color="#009900">SSLPort</font>},
+ {<font color="#FF6600">certfile</font>, <font color="#009900">PathToCertfile</font>},
+ {<font color="#FF6600">cacertfile</font>, <font color="#009900">PathToCACertfile</font>},
+ {<font color="#FF6600">verify</font>, <font color="#FF6600">verify_peer</font>}
+ ],
+ <font color="#FF6600">my_protocol</font>, []
+)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>In this example we set the required <code>port</code> and <code>certfile</code>, but also the <code>cacertfile</code> containing the CACert.org root certificate, and the option to request the client certificate.</p>
+<p>If you enable the <code>{verify, verify_peer}</code> option and the client does not have a client certificate configured for your domain, then no certificate will be sent. This allows you to use SSL for more than just authenticated clients.</p>
<h2 id="_authentication">Authentication</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>To authenticate users, you must first save the certificate information
-required. If you have your users' certificate files, you can simply
-load the certificate and retrieve the information directly.</p></div>
-<div class="listingblock">
-<div class="title">Retrieve the issuer ID from a certificate</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<p>To authenticate users, you must first save the certificate information required. If you have your users&apos; certificate files, you can simply load the certificate and retrieve the information directly.</p>
+<div class="listingblock"><div class="title">Retrieve the issuer ID from a certificate</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">certfile_to_issuer_id</span></span>(<span style="color: #009900">Filename</span>) <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Data</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">file:read_file</span></span>(<span style="color: #009900">Filename</span>),
- [{<span style="color: #FF6600">'Certificate'</span>, <span style="color: #009900">Cert</span>, <span style="color: #FF6600">not_encrypted</span>}] <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">public_key:pem_decode</span></span>(<span style="color: #009900">Data</span>),
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">IssuerID</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">public_key:pkix_issuer_id</span></span>(<span style="color: #009900">Cert</span>, <span style="font-weight: bold"><span style="color: #000080">self</span></span>),
- <span style="color: #009900">IssuerID</span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>The <code>IssuerID</code> variable contains both the certificate serial number
-and the certificate issuer stored in a tuple, so this value alone can
-be used to uniquely identify the user certificate. You can save this
-value in a database, a configuration file or any other place where an
-Erlang term can be stored and retrieved.</p></div>
-<div class="paragraph"><p>To retrieve the <code>IssuerID</code> from a running connection, you need to first
-retrieve the client certificate and then extract this information from
-it. Ranch does not provide a function to retrieve the client certificate.
-Instead you can use the <code>ssl:peercert/1</code> function. Once you have the
-certificate, you can again use the <code>public_key:pkix_issuer_id/2</code> to
-extract the <code>IssuerID</code> value.</p></div>
-<div class="paragraph"><p>The following function returns the <code>IssuerID</code> or <code>false</code> if no client
-certificate was found. This snippet is intended to be used from your
-protocol code.</p></div>
-<div class="listingblock">
-<div class="title">Retrieve the issuer ID from the certificate for the current connection</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">certfile_to_issuer_id</font></b>(<font color="#009900">Filename</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <font color="#009900">Data</font>} <font color="#990000">=</font> <b><font color="#000000">file:read_file</font></b>(<font color="#009900">Filename</font>),
+ [{<font color="#FF6600">'Certificate'</font>, <font color="#009900">Cert</font>, <font color="#FF6600">not_encrypted</font>}] <font color="#990000">=</font> <b><font color="#000000">public_key:pem_decode</font></b>(<font color="#009900">Data</font>),
+ {<font color="#FF6600">ok</font>, <font color="#009900">IssuerID</font>} <font color="#990000">=</font> <b><font color="#000000">public_key:pkix_issuer_id</font></b>(<font color="#009900">Cert</font>, <b><font color="#000080">self</font></b>),
+ <font color="#009900">IssuerID</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>The <code>IssuerID</code> variable contains both the certificate serial number and the certificate issuer stored in a tuple, so this value alone can be used to uniquely identify the user certificate. You can save this value in a database, a configuration file or any other place where an Erlang term can be stored and retrieved.</p>
+<p>To retrieve the <code>IssuerID</code> from a running connection, you need to first retrieve the client certificate and then extract this information from it. Ranch does not provide a function to retrieve the client certificate. Instead you can use the <code>ssl:peercert/1</code> function. Once you have the certificate, you can again use the <code>public_key:pkix_issuer_id/2</code> to extract the <code>IssuerID</code> value.</p>
+<p>The following function returns the <code>IssuerID</code> or <code>false</code> if no client certificate was found. This snippet is intended to be used from your protocol code.</p>
+<div class="listingblock"><div class="title">Retrieve the issuer ID from the certificate for the current connection</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">socket_to_issuer_id</span></span>(<span style="color: #009900">Socket</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">ssl:peercert</span></span>(<span style="color: #009900">Socket</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
- {<span style="color: #FF6600">error</span>, <span style="color: #FF6600">no_peercert</span>} <span style="color: #990000">-&gt;</span>
- <span style="color: #000080">false</span>;
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Cert</span>} <span style="color: #990000">-&gt;</span>
- {<span style="color: #FF6600">ok</span>, <span style="color: #009900">IssuerID</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">public_key:pkix_issuer_id</span></span>(<span style="color: #009900">Cert</span>, <span style="font-weight: bold"><span style="color: #000080">self</span></span>),
- <span style="color: #009900">IssuerID</span>
- <span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>You then only need to match the <code>IssuerID</code> value to authenticate the
-user.</p></div>
-</div>
-</div>
+<pre><tt><b><font color="#000000">socket_to_issuer_id</font></b>(<font color="#009900">Socket</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">case</font></b> <b><font color="#000000">ssl:peercert</font></b>(<font color="#009900">Socket</font>) <b><font color="#0000FF">of</font></b>
+ {<font color="#FF6600">error</font>, <font color="#FF6600">no_peercert</font>} <font color="#990000">-&gt;</font>
+ <font color="#000080">false</font>;
+ {<font color="#FF6600">ok</font>, <font color="#009900">Cert</font>} <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <font color="#009900">IssuerID</font>} <font color="#990000">=</font> <b><font color="#000000">public_key:pkix_issuer_id</font></b>(<font color="#009900">Cert</font>, <b><font color="#000080">self</font></b>),
+ <font color="#009900">IssuerID</font>
+ <b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>You then only need to match the <code>IssuerID</code> value to authenticate the user.</p>
+
@@ -270,6 +194,8 @@ user.</p></div>
+ <li><a href="/docs/en/ranch/1.5/guide">1.5</a></li>
+
<li><a href="/docs/en/ranch/1.4/guide">1.4</a></li>
<li><a href="/docs/en/ranch/1.3/guide">1.3</a></li>
diff --git a/docs/en/ranch/1.4/guide/transports/index.html b/docs/en/ranch/1.4/guide/transports/index.html
index 6c803fb3..dd96e531 100644
--- a/docs/en/ranch/1.4/guide/transports/index.html
+++ b/docs/en/ranch/1.4/guide/transports/index.html
@@ -62,179 +62,107 @@
<h1 class="lined-header"><span>Transports</span></h1>
-<div class="paragraph"><p>A transport defines the interface to interact with a socket.</p></div>
-<div class="paragraph"><p>Transports can be used for connecting, listening and accepting
-connections, but also for receiving and sending data. Both
-passive and active mode are supported, although all sockets
-are initialized as passive.</p></div>
-<div class="sect1">
+<p>A transport defines the interface to interact with a socket.</p>
+<p>Transports can be used for connecting, listening and accepting connections, but also for receiving and sending data. Both passive and active mode are supported, although all sockets are initialized as passive.</p>
<h2 id="_tcp_transport">TCP transport</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The TCP transport is a thin wrapper around <code>gen_tcp</code>.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The TCP transport is a thin wrapper around <code>gen_tcp</code>.</p>
<h2 id="_ssl_transport">SSL transport</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The SSL transport is a thin wrapper around <code>ssl</code>.</p></div>
-<div class="paragraph"><p>Ranch depends on <code>ssl</code> by default so any necessary
-dependencies will start when Ranch is started. It is
-possible to remove the dependency when the SSL transport
-will not be used. Refer to your release build tool&#8217;s
-documentation for more information.</p></div>
-<div class="paragraph"><p>When embedding Ranch listeners that have an SSL transport,
-your application must depend on the <code>ssl</code> application for
-proper behavior.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The SSL transport is a thin wrapper around <code>ssl</code>.</p>
+<p>Ranch depends on <code>ssl</code> by default so any necessary dependencies will start when Ranch is started. It is possible to remove the dependency when the SSL transport will not be used. Refer to your release build tool&apos;s documentation for more information.</p>
+<p>When embedding Ranch listeners that have an SSL transport, your application must depend on the <code>ssl</code> application for proper behavior.</p>
<h2 id="_sending_and_receiving_data">Sending and receiving data</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>This section assumes that <code>Transport</code> is a valid transport handler
-(like <code>ranch_tcp</code> or <code>ranch_ssl</code>) and <code>Socket</code> is a connected
-socket obtained through the listener.</p></div>
-<div class="paragraph"><p>You can send data to a socket by calling the <code>Transport:send/2</code>
-function. The data can be given as <code>iodata()</code>, which is defined as
-<code>binary() | iolist()</code>. All the following calls will work:</p></div>
-<div class="listingblock">
-<div class="title">Sending data to the socket</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<p>This section assumes that <code>Transport</code> is a valid transport handler (like <code>ranch_tcp</code> or <code>ranch_ssl</code>) and <code>Socket</code> is a connected socket obtained through the listener.</p>
+<p>You can send data to a socket by calling the <code>Transport:send/2</code> function. The data can be given as <code>iodata()</code>, which is defined as <code>binary() | iolist()</code>. All the following calls will work:</p>
+<div class="listingblock"><div class="title">Sending data to the socket</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">Transport</span><span style="color: #990000">:</span><span style="font-weight: bold"><span style="color: #000000">send</span></span>(<span style="color: #009900">Socket</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Ranch is cool!"</span><span style="color: #990000">&gt;&gt;</span>)<span style="color: #990000">.</span>
-<span style="color: #009900">Transport</span><span style="color: #990000">:</span><span style="font-weight: bold"><span style="color: #000000">send</span></span>(<span style="color: #009900">Socket</span>, <span style="color: #FF0000">"Ranch is cool!"</span>)<span style="color: #990000">.</span>
-<span style="color: #009900">Transport</span><span style="color: #990000">:</span><span style="font-weight: bold"><span style="color: #000000">send</span></span>(<span style="color: #009900">Socket</span>, [<span style="color: #FF0000">"Ranch"</span>, [<span style="color: #FF0000">"is"</span>, <span style="color: #FF0000">"cool!"</span>]])<span style="color: #990000">.</span>
-<span style="color: #009900">Transport</span><span style="color: #990000">:</span><span style="font-weight: bold"><span style="color: #000000">send</span></span>(<span style="color: #009900">Socket</span>, [<span style="color: #FF0000">"Ranch"</span>, [<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"is"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #FF0000">"cool!"</span>]])<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>You can receive data either in passive or in active mode. Passive mode
-means that you will perform a blocking <code>Transport:recv/3</code> call, while
-active mode means that you will receive the data as a message.</p></div>
-<div class="paragraph"><p>By default, all data will be received as binary. It is possible to
-receive data as strings, although this is not recommended as binaries
-are a more efficient construct, especially for binary protocols.</p></div>
-<div class="paragraph"><p>Receiving data using passive mode requires a single function call. The
-first argument is the socket, and the third argument is a timeout duration
-before the call returns with <code>{error, timeout}</code>.</p></div>
-<div class="paragraph"><p>The second argument is the amount of data in bytes that we want to receive.
-The function will wait for data until it has received exactly this amount.
-If you are not expecting a precise size, you can specify 0 which will make
-this call return as soon as data was read, regardless of its size.</p></div>
-<div class="listingblock">
-<div class="title">Receiving data from the socket in passive mode</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Transport</font><font color="#990000">:</font><b><font color="#000000">send</font></b>(<font color="#009900">Socket</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"Ranch is cool!"</font><font color="#990000">&gt;&gt;</font>)<font color="#990000">.</font>
+<font color="#009900">Transport</font><font color="#990000">:</font><b><font color="#000000">send</font></b>(<font color="#009900">Socket</font>, <font color="#FF0000">"Ranch is cool!"</font>)<font color="#990000">.</font>
+<font color="#009900">Transport</font><font color="#990000">:</font><b><font color="#000000">send</font></b>(<font color="#009900">Socket</font>, [<font color="#FF0000">"Ranch"</font>, [<font color="#FF0000">"is"</font>, <font color="#FF0000">"cool!"</font>]])<font color="#990000">.</font>
+<font color="#009900">Transport</font><font color="#990000">:</font><b><font color="#000000">send</font></b>(<font color="#009900">Socket</font>, [<font color="#FF0000">"Ranch"</font>, [<font color="#990000">&lt;&lt;</font><font color="#FF0000">"is"</font><font color="#990000">&gt;&gt;</font>, <font color="#FF0000">"cool!"</font>]])<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>You can receive data either in passive or in active mode. Passive mode means that you will perform a blocking <code>Transport:recv/3</code> call, while active mode means that you will receive the data as a message.</p>
+<p>By default, all data will be received as binary. It is possible to receive data as strings, although this is not recommended as binaries are a more efficient construct, especially for binary protocols.</p>
+<p>Receiving data using passive mode requires a single function call. The first argument is the socket, and the third argument is a timeout duration before the call returns with <code>{error, timeout}</code>.</p>
+<p>The second argument is the amount of data in bytes that we want to receive. The function will wait for data until it has received exactly this amount. If you are not expecting a precise size, you can specify 0 which will make this call return as soon as data was read, regardless of its size.</p>
+<div class="listingblock"><div class="title">Receiving data from the socket in passive mode</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: #FF6600">ok</span>, <span style="color: #009900">Data</span>} <span style="color: #990000">=</span> <span style="color: #009900">Transport</span><span style="color: #990000">:</span><span style="font-weight: bold"><span style="color: #000000">recv</span></span>(<span style="color: #009900">Socket</span>, <span style="color: #993399">0</span>, <span style="color: #993399">5000</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Active mode requires you to inform the socket that you want to receive
-data as a message and to write the code to actually receive it.</p></div>
-<div class="paragraph"><p>There are two kinds of active modes: <code>{active, once}</code> and
-<code>{active, true}</code>. The first will send a single message before going
-back to passive mode; the second will send messages indefinitely.
-We recommend not using the <code>{active, true}</code> mode as it could quickly
-flood your process mailbox. It&#8217;s better to keep the data in the socket
-and read it only when required.</p></div>
-<div class="paragraph"><p>Three different messages can be received:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<code>{OK, Socket, Data}</code>
-</p>
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#009900">Data</font>} <font color="#990000">=</font> <font color="#009900">Transport</font><font color="#990000">:</font><b><font color="#000000">recv</font></b>(<font color="#009900">Socket</font>, <font color="#993399">0</font>, <font color="#993399">5000</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Active mode requires you to inform the socket that you want to receive data as a message and to write the code to actually receive it.</p>
+<p>There are two kinds of active modes: <code>{active, once}</code> and <code>{active, true}</code>. The first will send a single message before going back to passive mode; the second will send messages indefinitely. We recommend not using the <code>{active, true}</code> mode as it could quickly flood your process mailbox. It&apos;s better to keep the data in the socket and read it only when required.</p>
+<p>Three different messages can be received:</p>
+<ul><li><code>{OK, Socket, Data}</code>
</li>
-<li>
-<p>
-<code>{Closed, Socket}</code>
-</p>
+<li><code>{Closed, Socket}</code>
</li>
-<li>
-<p>
-<code>{Error, Socket, Reason}</code>
-</p>
+<li><code>{Error, Socket, Reason}</code>
</li>
-</ul></div>
-<div class="paragraph"><p>The value of <code>OK</code>, <code>Closed</code> and <code>Error</code> can be different
-depending on the transport being used. To be able to properly match
-on them you must first call the <code>Transport:messages/0</code> function.</p></div>
-<div class="listingblock">
-<div class="title">Retrieving the transport&#8217;s active message identifiers</div>
-<div class="content"><!-- Generator: GNU source-highlight
+</ul>
+<p>The value of <code>OK</code>, <code>Closed</code> and <code>Error</code> can be different depending on the transport being used. To be able to properly match on them you must first call the <code>Transport:messages/0</code> function.</p>
+<div class="listingblock"><div class="title">Retrieving the transport&apos;s active message identifiers</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">OK</span>, <span style="color: #009900">Closed</span>, <span style="color: #009900">Error</span>} <span style="color: #990000">=</span> <span style="color: #009900">Transport</span><span style="color: #990000">:</span><span style="font-weight: bold"><span style="color: #000000">messages</span></span>()<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>To start receiving messages you will need to call the <code>Transport:setopts/2</code>
-function, and do so every time you want to receive data.</p></div>
-<div class="listingblock">
-<div class="title">Receiving messages from the socket in active mode</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>{<font color="#009900">OK</font>, <font color="#009900">Closed</font>, <font color="#009900">Error</font>} <font color="#990000">=</font> <font color="#009900">Transport</font><font color="#990000">:</font><b><font color="#000000">messages</font></b>()<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>To start receiving messages you will need to call the <code>Transport:setopts/2</code> function, and do so every time you want to receive data.</p>
+<div class="listingblock"><div class="title">Receiving messages from the socket in active mode</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">OK</span>, <span style="color: #009900">Closed</span>, <span style="color: #009900">Error</span>} <span style="color: #990000">=</span> <span style="color: #009900">Transport</span><span style="color: #990000">:</span><span style="font-weight: bold"><span style="color: #000000">messages</span></span>(),
-<span style="color: #009900">Transport</span><span style="color: #990000">:</span><span style="font-weight: bold"><span style="color: #000000">setopts</span></span>(<span style="color: #009900">Socket</span>, [{<span style="color: #FF6600">active</span>, <span style="color: #FF6600">once</span>}]),
-<span style="font-weight: bold"><span style="color: #0000FF">receive</span></span>
- {<span style="color: #009900">OK</span>, <span style="color: #009900">Socket</span>, <span style="color: #009900">Data</span>} <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #000000">io:format</span></span>(<span style="color: #FF0000">"data received: ~p~n"</span>, [<span style="color: #009900">Data</span>]);
- {<span style="color: #009900">Closed</span>, <span style="color: #009900">Socket</span>} <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #000000">io:format</span></span>(<span style="color: #FF0000">"socket got closed!~n"</span>);
- {<span style="color: #009900">Error</span>, <span style="color: #009900">Socket</span>, <span style="color: #009900">Reason</span>} <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #000000">io:format</span></span>(<span style="color: #FF0000">"error happened: ~p~n"</span>, [<span style="color: #009900">Reason</span>])
-<span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>You can easily integrate active sockets with existing Erlang code as all
-you really need is just a few more clauses when receiving messages.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#009900">OK</font>, <font color="#009900">Closed</font>, <font color="#009900">Error</font>} <font color="#990000">=</font> <font color="#009900">Transport</font><font color="#990000">:</font><b><font color="#000000">messages</font></b>(),
+<font color="#009900">Transport</font><font color="#990000">:</font><b><font color="#000000">setopts</font></b>(<font color="#009900">Socket</font>, [{<font color="#FF6600">active</font>, <font color="#FF6600">once</font>}]),
+<b><font color="#0000FF">receive</font></b>
+ {<font color="#009900">OK</font>, <font color="#009900">Socket</font>, <font color="#009900">Data</font>} <font color="#990000">-&gt;</font>
+ <b><font color="#000000">io:format</font></b>(<font color="#FF0000">"data received: ~p~n"</font>, [<font color="#009900">Data</font>]);
+ {<font color="#009900">Closed</font>, <font color="#009900">Socket</font>} <font color="#990000">-&gt;</font>
+ <b><font color="#000000">io:format</font></b>(<font color="#FF0000">"socket got closed!~n"</font>);
+ {<font color="#009900">Error</font>, <font color="#009900">Socket</font>, <font color="#009900">Reason</font>} <font color="#990000">-&gt;</font>
+ <b><font color="#000000">io:format</font></b>(<font color="#FF0000">"error happened: ~p~n"</font>, [<font color="#009900">Reason</font>])
+<b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>You can easily integrate active sockets with existing Erlang code as all you really need is just a few more clauses when receiving messages.</p>
<h2 id="_sending_files">Sending files</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>As in the previous section it is assumed <code>Transport</code> is a valid transport
-handler and <code>Socket</code> is a connected socket obtained through the listener.</p></div>
-<div class="paragraph"><p>To send a whole file, with name <code>Filename</code>, over a socket:</p></div>
-<div class="listingblock">
-<div class="title">Sending a file by filename</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<p>As in the previous section it is assumed <code>Transport</code> is a valid transport handler and <code>Socket</code> is a connected socket obtained through the listener.</p>
+<p>To send a whole file, with name <code>Filename</code>, over a socket:</p>
+<div class="listingblock"><div class="title">Sending a file by filename</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: #FF6600">ok</span>, <span style="color: #009900">SentBytes</span>} <span style="color: #990000">=</span> <span style="color: #009900">Transport</span><span style="color: #990000">:</span><span style="font-weight: bold"><span style="color: #000000">sendfile</span></span>(<span style="color: #009900">Socket</span>, <span style="color: #009900">Filename</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Or part of a file, with <code>Offset</code> greater than or equal to 0, <code>Bytes</code> number of
-bytes and chunks of size <code>ChunkSize</code>:</p></div>
-<div class="listingblock">
-<div class="title">Sending part of a file by filename in chunks</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#009900">SentBytes</font>} <font color="#990000">=</font> <font color="#009900">Transport</font><font color="#990000">:</font><b><font color="#000000">sendfile</font></b>(<font color="#009900">Socket</font>, <font color="#009900">Filename</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Or part of a file, with <code>Offset</code> greater than or equal to 0, <code>Bytes</code> number of bytes and chunks of size <code>ChunkSize</code>:</p>
+<div class="listingblock"><div class="title">Sending part of a file by filename in chunks</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">Opts</span> <span style="color: #990000">=</span> [{<span style="color: #FF6600">chunk_size</span>, <span style="color: #009900">ChunkSize</span>}],
-{<span style="color: #FF6600">ok</span>, <span style="color: #009900">SentBytes</span>} <span style="color: #990000">=</span> <span style="color: #009900">Transport</span><span style="color: #990000">:</span><span style="font-weight: bold"><span style="color: #000000">sendfile</span></span>(<span style="color: #009900">Socket</span>, <span style="color: #009900">Filename</span>, <span style="color: #009900">Offset</span>, <span style="color: #009900">Bytes</span>, <span style="color: #009900">Opts</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>To improve efficiency when sending multiple parts of the same file it is also
-possible to use a file descriptor opened in raw mode:</p></div>
-<div class="listingblock">
-<div class="title">Sending a file opened in raw mode</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">Opts</font> <font color="#990000">=</font> [{<font color="#FF6600">chunk_size</font>, <font color="#009900">ChunkSize</font>}],
+{<font color="#FF6600">ok</font>, <font color="#009900">SentBytes</font>} <font color="#990000">=</font> <font color="#009900">Transport</font><font color="#990000">:</font><b><font color="#000000">sendfile</font></b>(<font color="#009900">Socket</font>, <font color="#009900">Filename</font>, <font color="#009900">Offset</font>, <font color="#009900">Bytes</font>, <font color="#009900">Opts</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>To improve efficiency when sending multiple parts of the same file it is also possible to use a file descriptor opened in raw mode:</p>
+<div class="listingblock"><div class="title">Sending a file opened in raw mode</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: #FF6600">ok</span>, <span style="color: #009900">RawFile</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">file:open</span></span>(<span style="color: #009900">Filename</span>, [<span style="color: #FF6600">raw</span>, <span style="color: #FF6600">read</span>, <span style="font-weight: bold"><span style="color: #000080">binary</span></span>]),
-{<span style="color: #FF6600">ok</span>, <span style="color: #009900">SentBytes</span>} <span style="color: #990000">=</span> <span style="color: #009900">Transport</span><span style="color: #990000">:</span><span style="font-weight: bold"><span style="color: #000000">sendfile</span></span>(<span style="color: #009900">Socket</span>, <span style="color: #009900">RawFile</span>, <span style="color: #009900">Offset</span>, <span style="color: #009900">Bytes</span>, <span style="color: #009900">Opts</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt>{<font color="#FF6600">ok</font>, <font color="#009900">RawFile</font>} <font color="#990000">=</font> <b><font color="#000000">file:open</font></b>(<font color="#009900">Filename</font>, [<font color="#FF6600">raw</font>, <font color="#FF6600">read</font>, <b><font color="#000080">binary</font></b>]),
+{<font color="#FF6600">ok</font>, <font color="#009900">SentBytes</font>} <font color="#990000">=</font> <font color="#009900">Transport</font><font color="#990000">:</font><b><font color="#000000">sendfile</font></b>(<font color="#009900">Socket</font>, <font color="#009900">RawFile</font>, <font color="#009900">Offset</font>, <font color="#009900">Bytes</font>, <font color="#009900">Opts</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_writing_a_transport_handler">Writing a transport handler</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A transport handler is a module implementing the <code>ranch_transport</code> behavior.
-It defines a certain number of callbacks that must be written in order to
-allow transparent usage of the transport handler.</p></div>
-<div class="paragraph"><p>The behavior doesn&#8217;t define the socket options available when opening a
-socket. These do not need to be common to all transports as it&#8217;s easy enough
-to write different initialization functions for the different transports that
-will be used. With one exception though. The <code>setopts/2</code> function <strong>must</strong>
-implement the <code>{active, once}</code> and the <code>{active, true}</code> options.</p></div>
-<div class="paragraph"><p>If the transport handler doesn&#8217;t have a native implementation of <code>sendfile/5</code> a
-fallback is available, <code>ranch_transport:sendfile/6</code>. The extra first argument
-is the transport&#8217;s module. See <code>ranch_ssl</code> for an example.</p></div>
-</div>
-</div>
+<p>A transport handler is a module implementing the <code>ranch_transport</code> behavior. It defines a certain number of callbacks that must be written in order to allow transparent usage of the transport handler.</p>
+<p>The behavior doesn&apos;t define the socket options available when opening a socket. These do not need to be common to all transports as it&apos;s easy enough to write different initialization functions for the different transports that will be used. With one exception though. The <code>setopts/2</code> function <strong>must</strong> implement the <code>{active, once}</code> and the <code>{active, true}</code> options.</p>
+<p>If the transport handler doesn&apos;t have a native implementation of <code>sendfile/5</code> a fallback is available, <code>ranch_transport:sendfile/6</code>. The extra first argument is the transport&apos;s module. See <code>ranch_ssl</code> for an example.</p>
+
@@ -291,6 +219,8 @@ is the transport&#8217;s module. See <code>ranch_ssl</code> for an example.</p><
+ <li><a href="/docs/en/ranch/1.5/guide">1.5</a></li>
+
<li><a href="/docs/en/ranch/1.4/guide">1.4</a></li>
<li><a href="/docs/en/ranch/1.3/guide">1.3</a></li>
diff --git a/docs/en/ranch/1.4/manual/index.html b/docs/en/ranch/1.4/manual/index.html
index a8c6943c..4f300b68 100644
--- a/docs/en/ranch/1.4/manual/index.html
+++ b/docs/en/ranch/1.4/manual/index.html
@@ -62,38 +62,20 @@
<h1 class="lined-header"><span>Ranch Function Reference</span></h1>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="ranch_app">ranch(7)</a>
-</p>
+<ul><li><a href="ranch_app">ranch(7)</a>
</li>
-<li>
-<p>
-<a href="ranch">ranch(3)</a>
-</p>
+<li><a href="ranch">ranch(3)</a>
</li>
-<li>
-<p>
-<a href="ranch_protocol">ranch_protocol(3)</a>
-</p>
+<li><a href="ranch_protocol">ranch_protocol(3)</a>
</li>
-<li>
-<p>
-<a href="ranch_ssl">ranch_ssl(3)</a>
-</p>
+<li><a href="ranch_ssl">ranch_ssl(3)</a>
</li>
-<li>
-<p>
-<a href="ranch_tcp">ranch_tcp(3)</a>
-</p>
+<li><a href="ranch_tcp">ranch_tcp(3)</a>
</li>
-<li>
-<p>
-<a href="ranch_transport">ranch_transport(3)</a>
-</p>
+<li><a href="ranch_transport">ranch_transport(3)</a>
</li>
-</ul></div>
+</ul>
+
@@ -128,6 +110,8 @@
+ <li><a href="/docs/en/ranch/1.5/manual">1.5</a></li>
+
<li><a href="/docs/en/ranch/1.4/manual">1.4</a></li>
<li><a href="/docs/en/ranch/1.3/manual">1.3</a></li>
diff --git a/docs/en/ranch/1.4/manual/ranch/index.html b/docs/en/ranch/1.4/manual/ranch/index.html
index b77d7548..2dfdd506 100644
--- a/docs/en/ranch/1.4/manual/ranch/index.html
+++ b/docs/en/ranch/1.4/manual/ranch/index.html
@@ -62,567 +62,232 @@
<h1 class="lined-header"><span>ranch(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>ranch - socket acceptor pool</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>ranch - socket acceptor pool</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <code>ranch</code> module provides functions for starting and
-manipulating Ranch listeners.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The <code>ranch</code> module provides functions for starting and manipulating Ranch listeners.</p>
<h2 id="_types">Types</h2>
-<div class="sectionbody">
-<div class="sect2">
-<h3 id="_max_conns_non_neg_integer_infinity">max_conns() = non_neg_integer() | infinity</h3>
-<div class="paragraph"><p>Maximum number of connections allowed on this listener.</p></div>
-<div class="paragraph"><p>This is a soft limit. The actual number of connections
-might be slightly above the limit due to concurrency
-when accepting new connections. Some connections may
-also be removed from this count explicitly by the user
-code.</p></div>
-</div>
-<div class="sect2">
+<h3 id="_max_conns_____non_neg_integer_____infinity">max_conns() = non_neg_integer() | infinity</h3>
+<p>Maximum number of connections allowed on this listener.</p>
+<p>This is a soft limit. The actual number of connections might be slightly above the limit due to concurrency when accepting new connections. Some connections may also be removed from this count explicitly by the user code.</p>
<h3 id="_opt">opt()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">opt</span></span>() <span style="color: #990000">=</span> {<span style="color: #FF6600">ack_timeout</span>, <span style="font-weight: bold"><span style="color: #000000">timeout</span></span>()}
- | {<span style="color: #FF6600">connection_type</span>, <span style="color: #FF6600">worker</span> | <span style="color: #FF6600">supervisor</span>}
- | {<span style="color: #FF6600">max_connections</span>, <span style="font-weight: bold"><span style="color: #000000">max_conns</span></span>()}
- | {<span style="color: #FF6600">num_acceptors</span>, <span style="font-weight: bold"><span style="color: #000000">pos_integer</span></span>()}
- | {<span style="color: #000080">shutdown</span>, <span style="font-weight: bold"><span style="color: #000000">timeout</span></span>() | <span style="color: #FF6600">brutal_kill</span>}
- | {<span style="color: #FF6600">socket</span>, <span style="font-weight: bold"><span style="color: #000000">any</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>Ranch-specific transport options.</p></div>
-<div class="paragraph"><p>These options are not passed on to the transports.
-They are used by Ranch while setting up the listeners.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_ref_any">ref() = any()</h3>
-<div class="paragraph"><p>Unique name used to refer to a listener.</p></div>
-</div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">opt</font></b>() <font color="#990000">=</font> {<font color="#FF6600">ack_timeout</font>, <b><font color="#000000">timeout</font></b>()}
+ | {<font color="#FF6600">connection_type</font>, <font color="#FF6600">worker</font> | <font color="#FF6600">supervisor</font>}
+ | {<font color="#FF6600">max_connections</font>, <b><font color="#000000">max_conns</font></b>()}
+ | {<font color="#FF6600">num_acceptors</font>, <b><font color="#000000">pos_integer</font></b>()}
+ | {<font color="#000080">shutdown</font>, <b><font color="#000000">timeout</font></b>() | <font color="#FF6600">brutal_kill</font>}
+ | {<font color="#FF6600">socket</font>, <b><font color="#000000">any</font></b>()}</tt></pre>
+</div></div>
+<p>Ranch-specific transport options.</p>
+<p>These options are not passed on to the transports. They are used by Ranch while setting up the listeners.</p>
+<h3 id="_ref_____any">ref() = any()</h3>
+<p>Unique name used to refer to a listener.</p>
<h2 id="_option_descriptions">Option descriptions</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>None of the options are required.</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-ack_timeout (5000)
-</dt>
-<dd>
-<p>
- Maximum allowed time for the <code>ranch:accept_ack/1</code> call to finish.
-</p>
-</dd>
-<dt class="hdlist1">
-connection_type (worker)
-</dt>
-<dd>
-<p>
- Type of process that will handle the connection.
-</p>
-</dd>
-<dt class="hdlist1">
-max_connections (1024)
-</dt>
-<dd>
-<p>
- Maximum number of active connections. Soft limit. Using <code>infinity</code> will disable the limit entirely.
-</p>
-</dd>
-<dt class="hdlist1">
-num_acceptors (10)
-</dt>
-<dd>
-<p>
- Number of processes that accept connections.
-</p>
-</dd>
-<dt class="hdlist1">
-shutdown (5000)
-</dt>
-<dd>
-<p>
- Maximum allowed time for children to stop on listener shutdown.
-</p>
-</dd>
-<dt class="hdlist1">
-socket
-</dt>
-<dd>
-<p>
- Listening socket opened externally to be used instead of calling <code>Transport:listen/1</code>.
-</p>
-</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+<p>None of the options are required.</p>
+<dl><dt>ack_timeout (5000)</dt>
+<dd><p>Maximum allowed time for the <code>ranch:accept_ack/1</code> call to finish.</p>
+</dd>
+<dt>connection_type (worker)</dt>
+<dd><p>Type of process that will handle the connection.</p>
+</dd>
+<dt>max_connections (1024)</dt>
+<dd><p>Maximum number of active connections. Soft limit. Using <code>infinity</code> will disable the limit entirely.</p>
+</dd>
+<dt>num_acceptors (10)</dt>
+<dd><p>Number of processes that accept connections.</p>
+</dd>
+<dt>shutdown (5000)</dt>
+<dd><p>Maximum allowed time for children to stop on listener shutdown.</p>
+</dd>
+<dt>socket</dt>
+<dd><p>Listening socket opened externally to be used instead of calling <code>Transport:listen/1</code>.</p>
+</dd>
+</dl>
<h2 id="_exports">Exports</h2>
-<div class="sectionbody">
-<div class="sect2">
-<h3 id="_accept_ack_ref_8594_ok">accept_ack(Ref) &#8594; ok</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Ref = ref()
-</dt>
-<dd>
-<p>
-Listener name.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Acknowledge that the connection is accepted.</p></div>
-<div class="paragraph"><p>This function MUST be used by a connection process to inform
-Ranch that it initialized properly and let it perform any
-additional operations before the socket can be safely used.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_child_spec_ref_numacceptors_transport_transopts_protocol_protoopts_8594_supervisor_child_spec">child_spec(Ref, NumAcceptors, Transport, TransOpts, Protocol, ProtoOpts) &#8594; supervisor:child_spec()</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Ref = ref()
-</dt>
-<dd>
-<p>
-Listener name.
-</p>
-</dd>
-<dt class="hdlist1">
-NumAcceptors = non_neg_integer()
-</dt>
-<dd>
-<p>
-Number of acceptor processes.
-</p>
-</dd>
-<dt class="hdlist1">
-Transport = module()
-</dt>
-<dd>
-<p>
-Transport module.
-</p>
-</dd>
-<dt class="hdlist1">
-TransOpts = any()
-</dt>
-<dd>
-<p>
-Transport options.
-</p>
-</dd>
-<dt class="hdlist1">
-Protocol = module()
-</dt>
-<dd>
-<p>
-Protocol module.
-</p>
-</dd>
-<dt class="hdlist1">
-ProtoOpts = any()
-</dt>
-<dd>
-<p>
-Protocol options.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Return child specifications for a new listener.</p></div>
-<div class="paragraph"><p>This function can be used to embed a listener directly
-in an application instead of letting Ranch handle it.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_get_addr_ref_8594_ip_port">get_addr(Ref) &#8594; {IP, Port}</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Ref = ref()
-</dt>
-<dd>
-<p>
-Listener name.
-</p>
-</dd>
-<dt class="hdlist1">
-IP = inet:ip_address()
-</dt>
-<dd>
-<p>
-IP of the interface used by this listener.
-</p>
-</dd>
-<dt class="hdlist1">
-Port = inet:port_number()
-</dt>
-<dd>
-<p>
-Port number used by this listener.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Return the IP address and port for the given listener.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_get_max_connections_ref_8594_maxconns">get_max_connections(Ref) &#8594; MaxConns</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Ref = ref()
-</dt>
-<dd>
-<p>
-Listener name.
-</p>
-</dd>
-<dt class="hdlist1">
-MaxConns = max_conns()
-</dt>
-<dd>
-<p>
-Current maximum number of connections.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Return the max number of connections allowed for the given listener.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_get_port_ref_8594_port">get_port(Ref) &#8594; Port</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Ref = ref()
-</dt>
-<dd>
-<p>
-Listener name.
-</p>
-</dd>
-<dt class="hdlist1">
-Port = inet:port_number()
-</dt>
-<dd>
-<p>
-Port number used by this listener.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Return the port for the given listener.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_get_protocol_options_ref_8594_protoopts">get_protocol_options(Ref) &#8594; ProtoOpts</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Ref = ref()
-</dt>
-<dd>
-<p>
-Listener name.
-</p>
-</dd>
-<dt class="hdlist1">
-ProtoOpts = any()
-</dt>
-<dd>
-<p>
-Current protocol options.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Return the protocol options set for the given listener.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_info_8594_ref_key_value">info() &#8594; [{Ref, [{Key, Value}]}]</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Ref = ref()
-</dt>
-<dd>
-<p>
-Listener name.
-</p>
-</dd>
-<dt class="hdlist1">
-Key = atom()
-</dt>
-<dd>
-<p>
-Information key.
-</p>
-</dd>
-<dt class="hdlist1">
-Value = any()
-</dt>
-<dd>
-<p>
-Information value.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Return detailed information about all Ranch listeners.</p></div>
-<div class="paragraph"><p>The following keys are defined:</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-pid
-</dt>
-<dd>
-<p>
-Pid of the listener&#8217;s top-level supervisor.
-</p>
-</dd>
-<dt class="hdlist1">
-ip
-</dt>
-<dd>
-<p>
-Interface Ranch listens on.
-</p>
-</dd>
-<dt class="hdlist1">
-port
-</dt>
-<dd>
-<p>
-Port number Ranch listens on.
-</p>
-</dd>
-<dt class="hdlist1">
-num_acceptors
-</dt>
-<dd>
-<p>
-Number of acceptor processes.
-</p>
-</dd>
-<dt class="hdlist1">
-max_connections
-</dt>
-<dd>
-<p>
-Maximum number of connections.
-</p>
-</dd>
-<dt class="hdlist1">
-active_connections
-</dt>
-<dd>
-<p>
-Number of active connections.
-</p>
-</dd>
-<dt class="hdlist1">
-all_connections
-</dt>
-<dd>
-<p>
-Number of connections, including those removed from the count.
-</p>
-</dd>
-<dt class="hdlist1">
-transport
-</dt>
-<dd>
-<p>
-Transport module.
-</p>
-</dd>
-<dt class="hdlist1">
-transport_options
-</dt>
-<dd>
-<p>
-Transport options.
-</p>
-</dd>
-<dt class="hdlist1">
-protocol
-</dt>
-<dd>
-<p>
-Protocol module.
-</p>
-</dd>
-<dt class="hdlist1">
-protocol_options
-</dt>
-<dd>
-<p>
-Protocol options.
-</p>
-</dd>
-</dl></div>
-</div>
-<div class="sect2">
-<h3 id="_procs_ref_acceptors_connections_8594_pid">procs(Ref, acceptors | connections) &#8594; [pid()]</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Ref = ref()
-</dt>
-<dd>
-<p>
-Listener name.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Return all acceptor or connection processes for one listener.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_remove_connection_ref_8594_ok">remove_connection(Ref) &#8594; ok</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Ref = ref()
-</dt>
-<dd>
-<p>
-Listener name.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Do not count this connection when limiting the number of connections.</p></div>
-<div class="paragraph"><p>You can use this function for long-running connection processes
-which spend most of their time idling rather than consuming
-resources. This allows Ranch to accept a lot more connections
-without sacrificing the latency of the system.</p></div>
-<div class="paragraph"><p>This function may only be called from a connection process.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_set_max_connections_ref_maxconns_8594_ok">set_max_connections(Ref, MaxConns) &#8594; ok</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Ref = ref()
-</dt>
-<dd>
-<p>
-Listener name.
-</p>
-</dd>
-<dt class="hdlist1">
-MaxConns = max_conns()
-</dt>
-<dd>
-<p>
-New maximum number of connections.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Set the max number of connections for the given listener.</p></div>
-<div class="paragraph"><p>The change will be applied immediately. If the new value is
-smaller than the previous one, Ranch will not kill the extra
-connections, but will wait for them to terminate properly.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_set_protocol_options_ref_protoopts_8594_ok">set_protocol_options(Ref, ProtoOpts) &#8594; ok</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Ref = ref()
-</dt>
-<dd>
-<p>
-Listener name.
-</p>
-</dd>
-<dt class="hdlist1">
-ProtoOpts = any()
-</dt>
-<dd>
-<p>
-New protocol options.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Set the protocol options for the given listener.</p></div>
-<div class="paragraph"><p>The change will be applied immediately for all new connections.
-Old connections will not receive the new options.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_start_listener_ref_numacceptors_transport_transopts_protocol_protoopts_8594_ok_pid_error_badarg">start_listener(Ref, NumAcceptors, Transport, TransOpts, Protocol, ProtoOpts) &#8594; {ok, pid()} | {error, badarg}</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Ref = ref()
-</dt>
-<dd>
-<p>
-Listener name.
-</p>
-</dd>
-<dt class="hdlist1">
-NumAcceptors = non_neg_integer()
-</dt>
-<dd>
-<p>
-Number of acceptor processes.
-</p>
-</dd>
-<dt class="hdlist1">
-Transport = module()
-</dt>
-<dd>
-<p>
-Transport module.
-</p>
-</dd>
-<dt class="hdlist1">
-TransOpts = any()
-</dt>
-<dd>
-<p>
-Transport options.
-</p>
-</dd>
-<dt class="hdlist1">
-Protocol = module()
-</dt>
-<dd>
-<p>
-Protocol module.
-</p>
-</dd>
-<dt class="hdlist1">
-ProtoOpts = any()
-</dt>
-<dd>
-<p>
-Protocol options.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Start listening for connections using the given transport
-and protocol. Returns the pid for this listener&#8217;s supervisor.</p></div>
-<div class="paragraph"><p>There are additional transport options that apply
-regardless of transport. They allow configuring how the
-connections are supervised, rate limited and more. Please
-consult the previous section for more details.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_stop_listener_ref_8594_ok_error_not_found">stop_listener(Ref) &#8594; ok | {error, not_found}</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Ref = ref()
-</dt>
-<dd>
-<p>
-Listener name.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Stop the given listener.</p></div>
-<div class="paragraph"><p>The listener is stopped gracefully, first by closing the
-listening port, then by stopping the connection processes.
-These processes are stopped according to the <code>shutdown</code>
-transport option, which may be set to brutally kill all
-connection processes or give them some time to stop properly.</p></div>
-<div class="paragraph"><p>This function does not return until the listener is
-completely stopped.</p></div>
-</div>
-</div>
-</div>
+<h3 id="_accept_ack_ref_____ok">accept_ack(Ref) -&gt; ok</h3>
+<dl><dt>Ref = ref()</dt>
+<dd><p>Listener name.</p>
+</dd>
+</dl>
+<p>Acknowledge that the connection is accepted.</p>
+<p>This function MUST be used by a connection process to inform Ranch that it initialized properly and let it perform any additional operations before the socket can be safely used.</p>
+<h3 id="_child_spec_ref__numacceptors__transport__transopts__protocol__protoopts_____supervisor_child_spec">child_spec(Ref, NumAcceptors, Transport, TransOpts, Protocol, ProtoOpts) -&gt; supervisor:child_spec()</h3>
+<dl><dt>Ref = ref()</dt>
+<dd><p>Listener name.</p>
+</dd>
+<dt>NumAcceptors = non_neg_integer()</dt>
+<dd><p>Number of acceptor processes.</p>
+</dd>
+<dt>Transport = module()</dt>
+<dd><p>Transport module.</p>
+</dd>
+<dt>TransOpts = any()</dt>
+<dd><p>Transport options.</p>
+</dd>
+<dt>Protocol = module()</dt>
+<dd><p>Protocol module.</p>
+</dd>
+<dt>ProtoOpts = any()</dt>
+<dd><p>Protocol options.</p>
+</dd>
+</dl>
+<p>Return child specifications for a new listener.</p>
+<p>This function can be used to embed a listener directly in an application instead of letting Ranch handle it.</p>
+<h3 id="_get_addr_ref______ip__port">get_addr(Ref) -&gt; {IP, Port}</h3>
+<dl><dt>Ref = ref()</dt>
+<dd><p>Listener name.</p>
+</dd>
+<dt>IP = inet:ip_address()</dt>
+<dd><p>IP of the interface used by this listener.</p>
+</dd>
+<dt>Port = inet:port_number()</dt>
+<dd><p>Port number used by this listener.</p>
+</dd>
+</dl>
+<p>Return the IP address and port for the given listener.</p>
+<h3 id="_get_max_connections_ref_____maxconns">get_max_connections(Ref) -&gt; MaxConns</h3>
+<dl><dt>Ref = ref()</dt>
+<dd><p>Listener name.</p>
+</dd>
+<dt>MaxConns = max_conns()</dt>
+<dd><p>Current maximum number of connections.</p>
+</dd>
+</dl>
+<p>Return the max number of connections allowed for the given listener.</p>
+<h3 id="_get_port_ref_____port">get_port(Ref) -&gt; Port</h3>
+<dl><dt>Ref = ref()</dt>
+<dd><p>Listener name.</p>
+</dd>
+<dt>Port = inet:port_number()</dt>
+<dd><p>Port number used by this listener.</p>
+</dd>
+</dl>
+<p>Return the port for the given listener.</p>
+<h3 id="_get_protocol_options_ref_____protoopts">get_protocol_options(Ref) -&gt; ProtoOpts</h3>
+<dl><dt>Ref = ref()</dt>
+<dd><p>Listener name.</p>
+</dd>
+<dt>ProtoOpts = any()</dt>
+<dd><p>Current protocol options.</p>
+</dd>
+</dl>
+<p>Return the protocol options set for the given listener.</p>
+<h3 id="_info________ref____key__value">info() -&gt; [{Ref, [{Key, Value}]}]</h3>
+<dl><dt>Ref = ref()</dt>
+<dd><p>Listener name.</p>
+</dd>
+<dt>Key = atom()</dt>
+<dd><p>Information key.</p>
+</dd>
+<dt>Value = any()</dt>
+<dd><p>Information value.</p>
+</dd>
+</dl>
+<p>Return detailed information about all Ranch listeners.</p>
+<p>The following keys are defined:</p>
+<dl><dt>pid</dt>
+<dd><p>Pid of the listener&apos;s top-level supervisor.</p>
+</dd>
+<dt>ip</dt>
+<dd><p>Interface Ranch listens on.</p>
+</dd>
+<dt>port</dt>
+<dd><p>Port number Ranch listens on.</p>
+</dd>
+<dt>num_acceptors</dt>
+<dd><p>Number of acceptor processes.</p>
+</dd>
+<dt>max_connections</dt>
+<dd><p>Maximum number of connections.</p>
+</dd>
+<dt>active_connections</dt>
+<dd><p>Number of active connections.</p>
+</dd>
+<dt>all_connections</dt>
+<dd><p>Number of connections, including those removed from the count.</p>
+</dd>
+<dt>transport</dt>
+<dd><p>Transport module.</p>
+</dd>
+<dt>transport_options</dt>
+<dd><p>Transport options.</p>
+</dd>
+<dt>protocol</dt>
+<dd><p>Protocol module.</p>
+</dd>
+<dt>protocol_options</dt>
+<dd><p>Protocol options.</p>
+</dd>
+</dl>
+<h3 id="_procs_ref__acceptors___connections______pid">procs(Ref, acceptors | connections) -&gt; [pid()]</h3>
+<dl><dt>Ref = ref()</dt>
+<dd><p>Listener name.</p>
+</dd>
+</dl>
+<p>Return all acceptor or connection processes for one listener.</p>
+<h3 id="_remove_connection_ref_____ok">remove_connection(Ref) -&gt; ok</h3>
+<dl><dt>Ref = ref()</dt>
+<dd><p>Listener name.</p>
+</dd>
+</dl>
+<p>Do not count this connection when limiting the number of connections.</p>
+<p>You can use this function for long-running connection processes which spend most of their time idling rather than consuming resources. This allows Ranch to accept a lot more connections without sacrificing the latency of the system.</p>
+<p>This function may only be called from a connection process.</p>
+<h3 id="_set_max_connections_ref__maxconns_____ok">set_max_connections(Ref, MaxConns) -&gt; ok</h3>
+<dl><dt>Ref = ref()</dt>
+<dd><p>Listener name.</p>
+</dd>
+<dt>MaxConns = max_conns()</dt>
+<dd><p>New maximum number of connections.</p>
+</dd>
+</dl>
+<p>Set the max number of connections for the given listener.</p>
+<p>The change will be applied immediately. If the new value is smaller than the previous one, Ranch will not kill the extra connections, but will wait for them to terminate properly.</p>
+<h3 id="_set_protocol_options_ref__protoopts_____ok">set_protocol_options(Ref, ProtoOpts) -&gt; ok</h3>
+<dl><dt>Ref = ref()</dt>
+<dd><p>Listener name.</p>
+</dd>
+<dt>ProtoOpts = any()</dt>
+<dd><p>New protocol options.</p>
+</dd>
+</dl>
+<p>Set the protocol options for the given listener.</p>
+<p>The change will be applied immediately for all new connections. Old connections will not receive the new options.</p>
+<h3 id="_start_listener_ref__numacceptors__transport__transopts__protocol__protoopts______ok__pid_______error__badarg">start_listener(Ref, NumAcceptors, Transport, TransOpts, Protocol, ProtoOpts) -&gt; {ok, pid()} | {error, badarg}</h3>
+<dl><dt>Ref = ref()</dt>
+<dd><p>Listener name.</p>
+</dd>
+<dt>NumAcceptors = non_neg_integer()</dt>
+<dd><p>Number of acceptor processes.</p>
+</dd>
+<dt>Transport = module()</dt>
+<dd><p>Transport module.</p>
+</dd>
+<dt>TransOpts = any()</dt>
+<dd><p>Transport options.</p>
+</dd>
+<dt>Protocol = module()</dt>
+<dd><p>Protocol module.</p>
+</dd>
+<dt>ProtoOpts = any()</dt>
+<dd><p>Protocol options.</p>
+</dd>
+</dl>
+<p>Start listening for connections using the given transport and protocol. Returns the pid for this listener&apos;s supervisor.</p>
+<p>There are additional transport options that apply regardless of transport. They allow configuring how the connections are supervised, rate limited and more. Please consult the previous section for more details.</p>
+<h3 id="_stop_listener_ref_____ok____error__not_found">stop_listener(Ref) -&gt; ok | {error, not_found}</h3>
+<dl><dt>Ref = ref()</dt>
+<dd><p>Listener name.</p>
+</dd>
+</dl>
+<p>Stop the given listener.</p>
+<p>The listener is stopped gracefully, first by closing the listening port, then by stopping the connection processes. These processes are stopped according to the <code>shutdown</code> transport option, which may be set to brutally kill all connection processes or give them some time to stop properly.</p>
+<p>This function does not return until the listener is completely stopped.</p>
+
@@ -657,6 +322,8 @@ completely stopped.</p></div>
+ <li><a href="/docs/en/ranch/1.5/manual">1.5</a></li>
+
<li><a href="/docs/en/ranch/1.4/manual">1.4</a></li>
<li><a href="/docs/en/ranch/1.3/manual">1.3</a></li>
diff --git a/docs/en/ranch/1.4/manual/ranch_app/index.html b/docs/en/ranch/1.4/manual/ranch_app/index.html
index 0457f868..bdda66af 100644
--- a/docs/en/ranch/1.4/manual/ranch_app/index.html
+++ b/docs/en/ranch/1.4/manual/ranch_app/index.html
@@ -62,41 +62,18 @@
<h1 class="lined-header"><span>ranch(7)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>ranch - Socket acceptor pool for TCP protocols.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>ranch - Socket acceptor pool for TCP protocols.</p>
<h2 id="_dependencies">Dependencies</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <code>ranch</code> application depends on the <code>ssl</code> application to
-start. It is used for handling secure connections, when the
-transport is <code>ranch_ssl</code>. It can be disabled if SSL is not
-used.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The <code>ranch</code> application depends on the <code>ssl</code> application to start. It is used for handling secure connections, when the transport is <code>ranch_ssl</code>. It can be disabled if SSL is not used.</p>
<h2 id="_environment">Environment</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <code>ranch</code> application defines one application environment
-configuration parameter.</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-profile (false)
-</dt>
-<dd>
-<p>
- When enabled, Ranch will start <code>eprof</code> profiling automatically.
-</p>
+<p>The <code>ranch</code> application defines one application environment configuration parameter.</p>
+<dl><dt>profile (false)</dt>
+<dd><p>When enabled, Ranch will start <code>eprof</code> profiling automatically.</p>
</dd>
-</dl></div>
-<div class="paragraph"><p>You can use the <code>ranch_app:profile_output/0</code> function to stop
-profiling and output the results to the files <em>procs.profile</em>
-and <em>total.profile</em>. Do not use in production.</p></div>
-</div>
-</div>
+</dl>
+<p>You can use the <code>ranch_app:profile_output/0</code> function to stop profiling and output the results to the files <em>procs.profile</em> and <em>total.profile</em>. Do not use in production.</p>
+
@@ -131,6 +108,8 @@ and <em>total.profile</em>. Do not use in production.</p></div>
+ <li><a href="/docs/en/ranch/1.5/manual">1.5</a></li>
+
<li><a href="/docs/en/ranch/1.4/manual">1.4</a></li>
<li><a href="/docs/en/ranch/1.3/manual">1.3</a></li>
diff --git a/docs/en/ranch/1.4/manual/ranch_protocol/index.html b/docs/en/ranch/1.4/manual/ranch_protocol/index.html
index 333d8fe8..a54db606 100644
--- a/docs/en/ranch/1.4/manual/ranch_protocol/index.html
+++ b/docs/en/ranch/1.4/manual/ranch_protocol/index.html
@@ -62,83 +62,33 @@
<h1 class="lined-header"><span>ranch_protocol(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>ranch_protocol - behaviour for protocol modules</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>ranch_protocol - behaviour for protocol modules</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <code>ranch_protocol</code> behaviour defines the interface used
-by Ranch protocols.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The <code>ranch_protocol</code> behaviour defines the interface used by Ranch protocols.</p>
<h2 id="_types">Types</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>None.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>None.</p>
<h2 id="_callbacks">Callbacks</h2>
-<div class="sectionbody">
-<div class="sect2">
-<h3 id="_start_link_ref_socket_transport_protoopts_8594_ok_pid_ok_pid_pid">start_link(Ref, Socket, Transport, ProtoOpts) &#8594; {ok, pid()} | {ok, pid(), pid()}</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Ref = ranch:ref()
-</dt>
-<dd>
-<p>
-Listener name.
-</p>
+<h3 id="_start_link_ref__socket__transport__protoopts______ok__pid_______ok__pid____pid">start_link(Ref, Socket, Transport, ProtoOpts) -&gt; {ok, pid()} | {ok, pid(), pid()}</h3>
+<dl><dt>Ref = ranch:ref()</dt>
+<dd><p>Listener name.</p>
</dd>
-<dt class="hdlist1">
-Socket = any()
-</dt>
-<dd>
-<p>
-Socket for this connection.
-</p>
+<dt>Socket = any()</dt>
+<dd><p>Socket for this connection.</p>
</dd>
-<dt class="hdlist1">
-Transport = module()
-</dt>
-<dd>
-<p>
-Transport module for this socket.
-</p>
+<dt>Transport = module()</dt>
+<dd><p>Transport module for this socket.</p>
</dd>
-<dt class="hdlist1">
-ProtoOpts = any()
-</dt>
-<dd>
-<p>
-Protocol options.
-</p>
+<dt>ProtoOpts = any()</dt>
+<dd><p>Protocol options.</p>
</dd>
-</dl></div>
-<div class="paragraph"><p>Start a new connection process for the given socket.</p></div>
-<div class="paragraph"><p>The only purpose of this callback is to start a process that
-will handle the socket. It must spawn the process, link and
-then return the new pid. This function will always be called
-from inside a supervisor.</p></div>
-<div class="paragraph"><p>This callback can also return two pids. The first pid is the
-pid of the process that will be supervised. The second pid is
-the pid of the process that will receive ownership of the
-socket. This second process must be a child of the first. This
-form is only available when <code>connection_type</code> is set to
-<code>supervisor</code>.</p></div>
-<div class="paragraph"><p>If any other value is returned, the supervisor will close the
-socket and assume no process has been started.</p></div>
-<div class="paragraph"><p>Do not perform any operations in this callback, as this would
-block the supervisor responsible for starting connection
-processes and degrade performance severely.</p></div>
-</div>
-</div>
-</div>
+</dl>
+<p>Start a new connection process for the given socket.</p>
+<p>The only purpose of this callback is to start a process that will handle the socket. It must spawn the process, link and then return the new pid. This function will always be called from inside a supervisor.</p>
+<p>This callback can also return two pids. The first pid is the pid of the process that will be supervised. The second pid is the pid of the process that will receive ownership of the socket. This second process must be a child of the first. This form is only available when <code>connection_type</code> is set to <code>supervisor</code>.</p>
+<p>If any other value is returned, the supervisor will close the socket and assume no process has been started.</p>
+<p>Do not perform any operations in this callback, as this would block the supervisor responsible for starting connection processes and degrade performance severely.</p>
+
@@ -173,6 +123,8 @@ processes and degrade performance severely.</p></div>
+ <li><a href="/docs/en/ranch/1.5/manual">1.5</a></li>
+
<li><a href="/docs/en/ranch/1.4/manual">1.4</a></li>
<li><a href="/docs/en/ranch/1.3/manual">1.3</a></li>
diff --git a/docs/en/ranch/1.4/manual/ranch_ssl/index.html b/docs/en/ranch/1.4/manual/ranch_ssl/index.html
index c6f5221e..6701e689 100644
--- a/docs/en/ranch/1.4/manual/ranch_ssl/index.html
+++ b/docs/en/ranch/1.4/manual/ranch_ssl/index.html
@@ -62,385 +62,174 @@
<h1 class="lined-header"><span>ranch_ssl(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>ranch_ssl - SSL transport module</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>ranch_ssl - SSL transport module</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <code>ranch_ssl</code> module implements an SSL Ranch transport.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The <code>ranch_ssl</code> module implements an SSL Ranch transport.</p>
<h2 id="_types">Types</h2>
-<div class="sectionbody">
-<div class="sect2">
<h3 id="_ssl_opt">ssl_opt()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">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>()}
- | {<span style="color: #FF6600">certfile</span>, <span style="font-weight: bold"><span style="color: #000000">string</span></span>()}
- | {<span style="color: #FF6600">ciphers</span>, [<span style="font-weight: bold"><span style="color: #000000">ssl:erl_cipher_suite</span></span>()] | <span style="font-weight: bold"><span style="color: #000000">string</span></span>()}
- | {<span style="color: #FF6600">client_renegotiation</span>, <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()}
- | {<span style="color: #FF6600">crl_cache</span>, {<span style="font-weight: bold"><span style="color: #000000">module</span></span>(), {<span style="color: #FF6600">internal</span> | <span style="font-weight: bold"><span style="color: #000000">any</span></span>(), <span style="font-weight: bold"><span style="color: #000080">list</span></span>()}}}
- | {<span style="color: #FF6600">crl_check</span>, <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>() | <span style="color: #FF6600">peer</span> | <span style="color: #FF6600">best_effort</span>}
- | {<span style="color: #FF6600">depth</span>, <span style="color: #993399">0</span><span style="color: #990000">..</span><span style="color: #993399">255</span>}
- | {<span style="color: #FF6600">dh</span>, <span style="font-weight: bold"><span style="color: #000000">public_key:der_encoded</span></span>()}
- | {<span style="color: #FF6600">dhfile</span>, <span style="font-weight: bold"><span style="color: #000000">string</span></span>()}
- | {<span style="color: #FF6600">fail_if_no_peer_cert</span>, <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()}
- | {<span style="color: #FF6600">hibernate_after</span>, <span style="font-weight: bold"><span style="color: #000080">integer</span></span>() | <span style="color: #000080">undefined</span>}
- | {<span style="color: #FF6600">honor_cipher_order</span>, <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()}
- | {<span style="color: #FF6600">key</span>, {<span style="color: #FF6600">'RSAPrivateKey'</span> | <span style="color: #FF6600">'DSAPrivateKey'</span> | <span style="color: #FF6600">'PrivateKeyInfo'</span>, <span style="font-weight: bold"><span style="color: #000000">public_key:der_encoded</span></span>()}}
- | {<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>()}
- | {<span style="color: #FF6600">reuse_session</span>, <span style="font-weight: bold"><span style="color: #0000FF">fun</span></span>()}
- | {<span style="color: #FF6600">reuse_sessions</span>, <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()}
- | {<span style="color: #FF6600">secure_renegotiate</span>, <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()}
- | {<span style="color: #FF6600">signature_algs</span>, [{<span style="font-weight: bold"><span style="color: #000080">atom</span></span>(), <span style="font-weight: bold"><span style="color: #000080">atom</span></span>()}]}
- | {<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>
-<div class="paragraph"><p>SSL-specific listen options.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_opt_ranch_tcp_opt_ssl_opt">opt() = ranch_tcp:opt() | ssl_opt()</h3>
-<div class="paragraph"><p>Listen options.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_opts_opt">opts() = [opt()]</h3>
-<div class="paragraph"><p>List of listen options.</p></div>
-</div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">ssl_opt</font></b>() <font color="#990000">=</font> {<font color="#FF6600">alpn_preferred_protocols</font>, [<b><font color="#000080">binary</font></b>()]}
+ | {<font color="#FF6600">beast_mitigation</font>, <font color="#FF6600">one_n_minus_one</font> | <font color="#FF6600">zero_n</font> | <font color="#FF6600">disabled</font>}
+ | {<font color="#FF6600">cacertfile</font>, <b><font color="#000000">string</font></b>()}
+ | {<font color="#FF6600">cacerts</font>, [<b><font color="#000000">public_key:der_encoded</font></b>()]}
+ | {<font color="#FF6600">cert</font>, <b><font color="#000000">public_key:der_encoded</font></b>()}
+ | {<font color="#FF6600">certfile</font>, <b><font color="#000000">string</font></b>()}
+ | {<font color="#FF6600">ciphers</font>, [<b><font color="#000000">ssl:erl_cipher_suite</font></b>()] | <b><font color="#000000">string</font></b>()}
+ | {<font color="#FF6600">client_renegotiation</font>, <b><font color="#000000">boolean</font></b>()}
+ | {<font color="#FF6600">crl_cache</font>, {<b><font color="#000000">module</font></b>(), {<font color="#FF6600">internal</font> | <b><font color="#000000">any</font></b>(), <b><font color="#000080">list</font></b>()}}}
+ | {<font color="#FF6600">crl_check</font>, <b><font color="#000000">boolean</font></b>() | <font color="#FF6600">peer</font> | <font color="#FF6600">best_effort</font>}
+ | {<font color="#FF6600">depth</font>, <font color="#993399">0</font><font color="#990000">..</font><font color="#993399">255</font>}
+ | {<font color="#FF6600">dh</font>, <b><font color="#000000">public_key:der_encoded</font></b>()}
+ | {<font color="#FF6600">dhfile</font>, <b><font color="#000000">string</font></b>()}
+ | {<font color="#FF6600">fail_if_no_peer_cert</font>, <b><font color="#000000">boolean</font></b>()}
+ | {<font color="#FF6600">hibernate_after</font>, <b><font color="#000080">integer</font></b>() | <font color="#000080">undefined</font>}
+ | {<font color="#FF6600">honor_cipher_order</font>, <b><font color="#000000">boolean</font></b>()}
+ | {<font color="#FF6600">key</font>, {<font color="#FF6600">'RSAPrivateKey'</font> | <font color="#FF6600">'DSAPrivateKey'</font> | <font color="#FF6600">'PrivateKeyInfo'</font>, <b><font color="#000000">public_key:der_encoded</font></b>()}}
+ | {<font color="#FF6600">keyfile</font>, <b><font color="#000000">string</font></b>()}
+ | {<font color="#FF6600">log_alert</font>, <b><font color="#000000">boolean</font></b>()}
+ | {<font color="#FF6600">next_protocols_advertised</font>, [<b><font color="#000080">binary</font></b>()]}
+ | {<font color="#FF6600">padding_check</font>, <b><font color="#000000">boolean</font></b>()}
+ | {<font color="#FF6600">partial_chain</font>, <b><font color="#0000FF">fun</font></b>(([<b><font color="#000000">public_key:der_encoded</font></b>()]) <font color="#990000">-&gt;</font> {<font color="#FF6600">trusted_ca</font>, <b><font color="#000000">public_key:der_encoded</font></b>()} | <font color="#FF6600">unknown_ca</font>)}
+ | {<font color="#FF6600">password</font>, <b><font color="#000000">string</font></b>()}
+ | {<font color="#FF6600">psk_identity</font>, <b><font color="#000000">string</font></b>()}
+ | {<font color="#FF6600">reuse_session</font>, <b><font color="#0000FF">fun</font></b>()}
+ | {<font color="#FF6600">reuse_sessions</font>, <b><font color="#000000">boolean</font></b>()}
+ | {<font color="#FF6600">secure_renegotiate</font>, <b><font color="#000000">boolean</font></b>()}
+ | {<font color="#FF6600">signature_algs</font>, [{<b><font color="#000080">atom</font></b>(), <b><font color="#000080">atom</font></b>()}]}
+ | {<font color="#FF6600">sni_fun</font>, <b><font color="#0000FF">fun</font></b>()}
+ | {<font color="#FF6600">sni_hosts</font>, [{<b><font color="#000000">string</font></b>(), <b><font color="#000000">ssl_opt</font></b>()}]}
+ | {<font color="#FF6600">user_lookup_fun</font>, {<b><font color="#0000FF">fun</font></b>(), <b><font color="#000000">any</font></b>()}}
+ | {<font color="#FF6600">v2_hello_compatible</font>, <b><font color="#000000">boolean</font></b>()}
+ | {<font color="#FF6600">verify</font>, <b><font color="#000000">ssl:verify_type</font></b>()}
+ | {<font color="#FF6600">verify_fun</font>, {<b><font color="#0000FF">fun</font></b>(), <b><font color="#000000">any</font></b>()}}
+ | {<font color="#FF6600">versions</font>, [<b><font color="#000080">atom</font></b>()]}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>SSL-specific listen options.</p>
+<h3 id="_opt_____ranch_tcp_opt_____ssl_opt">opt() = ranch_tcp:opt() | ssl_opt()</h3>
+<p>Listen options.</p>
+<h3 id="_opts______opt">opts() = [opt()]</h3>
+<p>List of listen options.</p>
<h2 id="_option_descriptions">Option descriptions</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>Specifying a certificate is mandatory, either through the <code>cert</code>
-or the <code>certfile</code> option. None of the other options are required.</p></div>
-<div class="paragraph"><p>The default value is given next to the option name.</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-alpn_preferred_protocols
-</dt>
-<dd>
-<p>
- Perform Application-Layer Protocol Negotiation with the given list of 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>
-<p>
- Path to PEM encoded trusted certificates file used to verify peer certificates.
-</p>
-</dd>
-<dt class="hdlist1">
-cacerts
-</dt>
-<dd>
-<p>
- List of DER encoded trusted certificates.
-</p>
-</dd>
-<dt class="hdlist1">
-cert
-</dt>
-<dd>
-<p>
- DER encoded user certificate.
-</p>
-</dd>
-<dt class="hdlist1">
-certfile
-</dt>
-<dd>
-<p>
- Path to the PEM encoded user certificate file. May also contain the private key.
-</p>
-</dd>
-<dt class="hdlist1">
-ciphers
-</dt>
-<dd>
-<p>
- List of ciphers that clients are allowed to use.
-</p>
-</dd>
-<dt class="hdlist1">
-client_renegotiation (true)
-</dt>
-<dd>
-<p>
- Whether to allow client-initiated renegotiation.
-</p>
-</dd>
-<dt class="hdlist1">
-crl_cache ({ssl_crl_cache, {internal, []}})
-</dt>
-<dd>
-<p>
- Customize the module used to cache Certificate Revocation Lists.
-</p>
-</dd>
-<dt class="hdlist1">
-crl_check (false)
-</dt>
-<dd>
-<p>
- Whether to perform CRL check on all certificates in the chain during validation.
-</p>
-</dd>
-<dt class="hdlist1">
-depth (1)
-</dt>
-<dd>
-<p>
- Maximum of intermediate certificates allowed in the certification path.
-</p>
-</dd>
-<dt class="hdlist1">
-dh
-</dt>
-<dd>
-<p>
- DER encoded Diffie-Hellman parameters.
-</p>
-</dd>
-<dt class="hdlist1">
-dhfile
-</dt>
-<dd>
-<p>
- Path to the PEM encoded Diffie-Hellman parameters file.
-</p>
-</dd>
-<dt class="hdlist1">
-fail_if_no_peer_cert (false)
-</dt>
-<dd>
-<p>
- Whether to refuse the connection if the client sends an empty certificate.
-</p>
-</dd>
-<dt class="hdlist1">
-hibernate_after (undefined)
-</dt>
-<dd>
-<p>
- Time in ms after which SSL socket processes go into hibernation to reduce memory usage.
-</p>
-</dd>
-<dt class="hdlist1">
-honor_cipher_order (false)
-</dt>
-<dd>
-<p>
- If true, use the server&#8217;s preference for cipher selection. If false, use the client&#8217;s preference.
-</p>
-</dd>
-<dt class="hdlist1">
-key
-</dt>
-<dd>
-<p>
- DER encoded user private key.
-</p>
-</dd>
-<dt class="hdlist1">
-keyfile
-</dt>
-<dd>
-<p>
- Path to the PEM encoded private key file, if different than the certfile.
-</p>
-</dd>
-<dt class="hdlist1">
-log_alert (true)
-</dt>
-<dd>
-<p>
- If false, error reports will not be displayed.
-</p>
-</dd>
-<dt class="hdlist1">
-next_protocols_advertised
-</dt>
-<dd>
-<p>
- List of protocols to send to the client if it supports the Next Protocol extension.
-</p>
-</dd>
-<dt class="hdlist1">
-nodelay (true)
-</dt>
-<dd>
-<p>
- Whether to enable TCP_NODELAY.
-</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>
-<p>
- Claim an intermediate CA in the chain as trusted.
-</p>
-</dd>
-<dt class="hdlist1">
-password
-</dt>
-<dd>
-<p>
- Password to the private key file, if password protected.
-</p>
-</dd>
-<dt class="hdlist1">
-psk_identity
-</dt>
-<dd>
-<p>
- Provide the given PSK identity hint to the client during the handshake.
-</p>
-</dd>
-<dt class="hdlist1">
-reuse_session
-</dt>
-<dd>
-<p>
- Custom policy to decide whether a session should be reused.
-</p>
-</dd>
-<dt class="hdlist1">
-reuse_sessions (false)
-</dt>
-<dd>
-<p>
- Whether to allow session reuse.
-</p>
-</dd>
-<dt class="hdlist1">
-secure_renegotiate (false)
-</dt>
-<dd>
-<p>
- Whether to reject renegotiation attempts that do not conform to RFC5746.
-</p>
-</dd>
-<dt class="hdlist1">
-signature_algs
-</dt>
-<dd>
-<p>
- The TLS signature algorithm extension may be used, from TLS 1.2, to negotiate which signature algorithm to use during the TLS handshake.
-</p>
-</dd>
-<dt class="hdlist1">
-sni_fun
-</dt>
-<dd>
-<p>
- Function called when the client requests a host using Server Name Indication. Returns options to apply.
-</p>
-</dd>
-<dt class="hdlist1">
-sni_hosts
-</dt>
-<dd>
-<p>
- Options to apply for the host that matches what the client requested with Server Name Indication.
-</p>
-</dd>
-<dt class="hdlist1">
-user_lookup_fun
-</dt>
-<dd>
-<p>
- Function called to determine the shared secret when using PSK, or provide parameters when using SRP.
-</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>
-<p>
- Use <code>verify_peer</code> to request a certificate from the client.
-</p>
-</dd>
-<dt class="hdlist1">
-verify_fun
-</dt>
-<dd>
-<p>
- Custom policy to decide whether a client certificate is valid.
-</p>
-</dd>
-<dt class="hdlist1">
-versions
-</dt>
-<dd>
-<p>
- TLS protocol versions that will be supported.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Note that the client will not send a certificate unless the
-value for the <code>verify</code> option is set to <code>verify_peer</code>. This
-means that the <code>fail_if_no_peer_cert</code> only apply when combined
-with the <code>verify</code> option. The <code>verify_fun</code> option allows
-greater control over the client certificate validation.</p></div>
-<div class="paragraph"><p>The options <code>sni_fun</code> and <code>sni_hosts</code> are mutually exclusive.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>Specifying a certificate is mandatory, either through the <code>cert</code> or the <code>certfile</code> option. None of the other options are required.</p>
+<p>The default value is given next to the option name.</p>
+<dl><dt>alpn_preferred_protocols</dt>
+<dd><p>Perform Application-Layer Protocol Negotiation with the given list of preferred protocols.</p>
+</dd>
+<dt>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>cacertfile</dt>
+<dd><p>Path to PEM encoded trusted certificates file used to verify peer certificates.</p>
+</dd>
+<dt>cacerts</dt>
+<dd><p>List of DER encoded trusted certificates.</p>
+</dd>
+<dt>cert</dt>
+<dd><p>DER encoded user certificate.</p>
+</dd>
+<dt>certfile</dt>
+<dd><p>Path to the PEM encoded user certificate file. May also contain the private key.</p>
+</dd>
+<dt>ciphers</dt>
+<dd><p>List of ciphers that clients are allowed to use.</p>
+</dd>
+<dt>client_renegotiation (true)</dt>
+<dd><p>Whether to allow client-initiated renegotiation.</p>
+</dd>
+<dt>crl_cache ({ssl_crl_cache, {internal, []}})</dt>
+<dd><p>Customize the module used to cache Certificate Revocation Lists.</p>
+</dd>
+<dt>crl_check (false)</dt>
+<dd><p>Whether to perform CRL check on all certificates in the chain during validation.</p>
+</dd>
+<dt>depth (1)</dt>
+<dd><p>Maximum of intermediate certificates allowed in the certification path.</p>
+</dd>
+<dt>dh</dt>
+<dd><p>DER encoded Diffie-Hellman parameters.</p>
+</dd>
+<dt>dhfile</dt>
+<dd><p>Path to the PEM encoded Diffie-Hellman parameters file.</p>
+</dd>
+<dt>fail_if_no_peer_cert (false)</dt>
+<dd><p>Whether to refuse the connection if the client sends an empty certificate.</p>
+</dd>
+<dt>hibernate_after (undefined)</dt>
+<dd><p>Time in ms after which SSL socket processes go into hibernation to reduce memory usage.</p>
+</dd>
+<dt>honor_cipher_order (false)</dt>
+<dd><p>If true, use the server&apos;s preference for cipher selection. If false, use the client&apos;s preference.</p>
+</dd>
+<dt>key</dt>
+<dd><p>DER encoded user private key.</p>
+</dd>
+<dt>keyfile</dt>
+<dd><p>Path to the PEM encoded private key file, if different than the certfile.</p>
+</dd>
+<dt>log_alert (true)</dt>
+<dd><p>If false, error reports will not be displayed.</p>
+</dd>
+<dt>next_protocols_advertised</dt>
+<dd><p>List of protocols to send to the client if it supports the Next Protocol extension.</p>
+</dd>
+<dt>nodelay (true)</dt>
+<dd><p>Whether to enable TCP_NODELAY.</p>
+</dd>
+<dt>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>partial_chain</dt>
+<dd><p>Claim an intermediate CA in the chain as trusted.</p>
+</dd>
+<dt>password</dt>
+<dd><p>Password to the private key file, if password protected.</p>
+</dd>
+<dt>psk_identity</dt>
+<dd><p>Provide the given PSK identity hint to the client during the handshake.</p>
+</dd>
+<dt>reuse_session</dt>
+<dd><p>Custom policy to decide whether a session should be reused.</p>
+</dd>
+<dt>reuse_sessions (false)</dt>
+<dd><p>Whether to allow session reuse.</p>
+</dd>
+<dt>secure_renegotiate (false)</dt>
+<dd><p>Whether to reject renegotiation attempts that do not conform to RFC5746.</p>
+</dd>
+<dt>signature_algs</dt>
+<dd><p>The TLS signature algorithm extension may be used, from TLS 1.2, to negotiate which signature algorithm to use during the TLS handshake.</p>
+</dd>
+<dt>sni_fun</dt>
+<dd><p>Function called when the client requests a host using Server Name Indication. Returns options to apply.</p>
+</dd>
+<dt>sni_hosts</dt>
+<dd><p>Options to apply for the host that matches what the client requested with Server Name Indication.</p>
+</dd>
+<dt>user_lookup_fun</dt>
+<dd><p>Function called to determine the shared secret when using PSK, or provide parameters when using SRP.</p>
+</dd>
+<dt>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>verify (verify_none)</dt>
+<dd><p>Use <code>verify_peer</code> to request a certificate from the client.</p>
+</dd>
+<dt>verify_fun</dt>
+<dd><p>Custom policy to decide whether a client certificate is valid.</p>
+</dd>
+<dt>versions</dt>
+<dd><p>TLS protocol versions that will be supported.</p>
+</dd>
+</dl>
+<p>Note that the client will not send a certificate unless the value for the <code>verify</code> option is set to <code>verify_peer</code>. This means that the <code>fail_if_no_peer_cert</code> only apply when combined with the <code>verify</code> option. The <code>verify_fun</code> option allows greater control over the client certificate validation.</p>
+<p>The options <code>sni_fun</code> and <code>sni_hosts</code> are mutually exclusive.</p>
<h2 id="_exports">Exports</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>None.</p></div>
-</div>
-</div>
+<p>None.</p>
+
@@ -475,6 +264,8 @@ greater control over the client certificate validation.</p></div>
+ <li><a href="/docs/en/ranch/1.5/manual">1.5</a></li>
+
<li><a href="/docs/en/ranch/1.4/manual">1.4</a></li>
<li><a href="/docs/en/ranch/1.3/manual">1.3</a></li>
diff --git a/docs/en/ranch/1.4/manual/ranch_tcp/index.html b/docs/en/ranch/1.4/manual/ranch_tcp/index.html
index 8f2120e3..9fa98c07 100644
--- a/docs/en/ranch/1.4/manual/ranch_tcp/index.html
+++ b/docs/en/ranch/1.4/manual/ranch_tcp/index.html
@@ -62,283 +62,127 @@
<h1 class="lined-header"><span>ranch_tcp(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>ranch_tcp - TCP transport module</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>ranch_tcp - TCP transport module</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <code>ranch_tcp</code> module implements a TCP Ranch transport.</p></div>
-<div class="paragraph"><p>Note that due to bugs in OTP up to at least R16B02, it is
-recommended to disable async threads when using the
-<code>sendfile</code> function of this transport, as it can make
-the threads stuck indefinitely.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The <code>ranch_tcp</code> module implements a TCP Ranch transport.</p>
+<p>Note that due to bugs in OTP up to at least R16B02, it is recommended to disable async threads when using the <code>sendfile</code> function of this transport, as it can make the threads stuck indefinitely.</p>
<h2 id="_types">Types</h2>
-<div class="sectionbody">
-<div class="sect2">
<h3 id="_opt">opt()</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<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">opt</span></span>() <span style="color: #990000">=</span> {<span style="color: #FF6600">backlog</span>, <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>()}
- | {<span style="color: #FF6600">buffer</span>, <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>()}
- | {<span style="color: #FF6600">delay_send</span>, <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()}
- | {<span style="color: #FF6600">dontroute</span>, <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()}
- | {<span style="color: #FF6600">exit_on_close</span>, <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()}
- | {<span style="color: #FF6600">fd</span>, <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>()}
- | {<span style="color: #FF6600">high_msgq_watermark</span>, <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>()}
- | {<span style="color: #FF6600">high_watermark</span>, <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>()}
- | <span style="color: #FF6600">inet</span>
- | <span style="color: #FF6600">inet6</span>
- | {<span style="color: #FF6600">ip</span>, <span style="font-weight: bold"><span style="color: #000000">inet:ip_address</span></span>()}
- | {<span style="color: #FF6600">ipv6_v6only</span>, <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()}
- | {<span style="color: #FF6600">keepalive</span>, <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()}
- | {<span style="color: #FF6600">linger</span>, {<span style="font-weight: bold"><span style="color: #000000">boolean</span></span>(), <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>()}}
- | {<span style="color: #FF6600">low_msgq_watermark</span>, <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>()}
- | {<span style="color: #FF6600">low_watermark</span>, <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>()}
- | {<span style="color: #FF6600">nodelay</span>, <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()}
- | {<span style="color: #FF6600">port</span>, <span style="font-weight: bold"><span style="color: #000000">inet:port_number</span></span>()}
- | {<span style="font-weight: bold"><span style="color: #000080">priority</span></span>, <span style="font-weight: bold"><span style="color: #000080">integer</span></span>()}
- | {<span style="color: #FF6600">raw</span>, <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>(), <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>(), <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()}
- | {<span style="color: #FF6600">recbuf</span>, <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>()}
- | {<span style="color: #FF6600">send_timeout</span>, <span style="font-weight: bold"><span style="color: #000000">timeout</span></span>()}
- | {<span style="color: #FF6600">send_timeout_close</span>, <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()}
- | {<span style="color: #FF6600">sndbuf</span>, <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>()}
- | {<span style="color: #FF6600">tos</span>, <span style="font-weight: bold"><span style="color: #000080">integer</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>Listen options.</p></div>
-<div class="paragraph"><p>This does not represent the entirety of the options that can
-be set on the socket, but only the options that may be
-set independently of protocol implementation.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_opts_opt">opts() = [opt()]</h3>
-<div class="paragraph"><p>List of listen options.</p></div>
-</div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">opt</font></b>() <font color="#990000">=</font> {<font color="#FF6600">backlog</font>, <b><font color="#000000">non_neg_integer</font></b>()}
+ | {<font color="#FF6600">buffer</font>, <b><font color="#000000">non_neg_integer</font></b>()}
+ | {<font color="#FF6600">delay_send</font>, <b><font color="#000000">boolean</font></b>()}
+ | {<font color="#FF6600">dontroute</font>, <b><font color="#000000">boolean</font></b>()}
+ | {<font color="#FF6600">exit_on_close</font>, <b><font color="#000000">boolean</font></b>()}
+ | {<font color="#FF6600">fd</font>, <b><font color="#000000">non_neg_integer</font></b>()}
+ | {<font color="#FF6600">high_msgq_watermark</font>, <b><font color="#000000">non_neg_integer</font></b>()}
+ | {<font color="#FF6600">high_watermark</font>, <b><font color="#000000">non_neg_integer</font></b>()}
+ | <font color="#FF6600">inet</font>
+ | <font color="#FF6600">inet6</font>
+ | {<font color="#FF6600">ip</font>, <b><font color="#000000">inet:ip_address</font></b>()}
+ | {<font color="#FF6600">ipv6_v6only</font>, <b><font color="#000000">boolean</font></b>()}
+ | {<font color="#FF6600">keepalive</font>, <b><font color="#000000">boolean</font></b>()}
+ | {<font color="#FF6600">linger</font>, {<b><font color="#000000">boolean</font></b>(), <b><font color="#000000">non_neg_integer</font></b>()}}
+ | {<font color="#FF6600">low_msgq_watermark</font>, <b><font color="#000000">non_neg_integer</font></b>()}
+ | {<font color="#FF6600">low_watermark</font>, <b><font color="#000000">non_neg_integer</font></b>()}
+ | {<font color="#FF6600">nodelay</font>, <b><font color="#000000">boolean</font></b>()}
+ | {<font color="#FF6600">port</font>, <b><font color="#000000">inet:port_number</font></b>()}
+ | {<b><font color="#000080">priority</font></b>, <b><font color="#000080">integer</font></b>()}
+ | {<font color="#FF6600">raw</font>, <b><font color="#000000">non_neg_integer</font></b>(), <b><font color="#000000">non_neg_integer</font></b>(), <b><font color="#000080">binary</font></b>()}
+ | {<font color="#FF6600">recbuf</font>, <b><font color="#000000">non_neg_integer</font></b>()}
+ | {<font color="#FF6600">send_timeout</font>, <b><font color="#000000">timeout</font></b>()}
+ | {<font color="#FF6600">send_timeout_close</font>, <b><font color="#000000">boolean</font></b>()}
+ | {<font color="#FF6600">sndbuf</font>, <b><font color="#000000">non_neg_integer</font></b>()}
+ | {<font color="#FF6600">tos</font>, <b><font color="#000080">integer</font></b>()}</tt></pre>
+</div></div>
+<p>Listen options.</p>
+<p>This does not represent the entirety of the options that can be set on the socket, but only the options that may be set independently of protocol implementation.</p>
+<h3 id="_opts______opt">opts() = [opt()]</h3>
+<p>List of listen options.</p>
<h2 id="_option_descriptions">Option descriptions</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>None of the options are required.</p></div>
-<div class="paragraph"><p>Please consult the <code>gen_tcp</code> and <code>inet</code> manuals for a more
-thorough description of these options. This manual only aims
-to provide a short description along with what the defaults
-are. Defaults may be different in Ranch compared to <code>gen_tcp</code>.
-Defaults are given next to the option name.</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-backlog (1024)
-</dt>
-<dd>
-<p>
- Max length of the queue of pending connections.
-</p>
+<p>None of the options are required.</p>
+<p>Please consult the <code>gen_tcp</code> and <code>inet</code> manuals for a more thorough description of these options. This manual only aims to provide a short description along with what the defaults are. Defaults may be different in Ranch compared to <code>gen_tcp</code>. Defaults are given next to the option name.</p>
+<dl><dt>backlog (1024)</dt>
+<dd><p>Max length of the queue of pending connections.</p>
</dd>
-<dt class="hdlist1">
-buffer
-</dt>
-<dd>
-<p>
- Size of the buffer used by the Erlang driver. Default is system-dependent.
-</p>
+<dt>buffer</dt>
+<dd><p>Size of the buffer used by the Erlang driver. Default is system-dependent.</p>
</dd>
-<dt class="hdlist1">
-delay_send (false)
-</dt>
-<dd>
-<p>
- Always queue packets before sending, to send fewer, larger packets over the network.
-</p>
+<dt>delay_send (false)</dt>
+<dd><p>Always queue packets before sending, to send fewer, larger packets over the network.</p>
</dd>
-<dt class="hdlist1">
-dontroute (false)
-</dt>
-<dd>
-<p>
- Don&#8217;t send via a gateway, only send to directly connected hosts.
-</p>
+<dt>dontroute (false)</dt>
+<dd><p>Don&apos;t send via a gateway, only send to directly connected hosts.</p>
</dd>
-<dt class="hdlist1">
-exit_on_close (true)
-</dt>
-<dd>
-<p>
- Disable to allow sending data after a close has been detected.
-</p>
+<dt>exit_on_close (true)</dt>
+<dd><p>Disable to allow sending data after a close has been detected.</p>
</dd>
-<dt class="hdlist1">
-fd
-</dt>
-<dd>
-<p>
- File descriptor of the socket, if it was opened externally.
-</p>
+<dt>fd</dt>
+<dd><p>File descriptor of the socket, if it was opened externally.</p>
</dd>
-<dt class="hdlist1">
-high_msgq_watermark (8192)
-</dt>
-<dd>
-<p>
- Limit in the amount of data in the socket message queue before the socket queue becomes busy.
-</p>
+<dt>high_msgq_watermark (8192)</dt>
+<dd><p>Limit in the amount of data in the socket message queue before the socket queue becomes busy.</p>
</dd>
-<dt class="hdlist1">
-high_watermark (8192)
-</dt>
-<dd>
-<p>
- Limit in the amount of data in the ERTS socket implementation&#8217;s queue before the socket becomes busy.
-</p>
+<dt>high_watermark (8192)</dt>
+<dd><p>Limit in the amount of data in the ERTS socket implementation&apos;s queue before the socket becomes busy.</p>
</dd>
-<dt class="hdlist1">
-inet
-</dt>
-<dd>
-<p>
- Set up the socket for IPv4.
-</p>
+<dt>inet</dt>
+<dd><p>Set up the socket for IPv4.</p>
</dd>
-<dt class="hdlist1">
-inet6
-</dt>
-<dd>
-<p>
- Set up the socket for IPv6.
-</p>
+<dt>inet6</dt>
+<dd><p>Set up the socket for IPv6.</p>
</dd>
-<dt class="hdlist1">
-ip
-</dt>
-<dd>
-<p>
- Interface to listen on. Listen on all interfaces by default.
-</p>
+<dt>ip</dt>
+<dd><p>Interface to listen on. Listen on all interfaces by default.</p>
</dd>
-<dt class="hdlist1">
-ipv6_v6only (false)
-</dt>
-<dd>
-<p>
- Listen on IPv4 and IPv6 (false) or only on IPv6 (true). Use with inet6.
-</p>
+<dt>ipv6_v6only (false)</dt>
+<dd><p>Listen on IPv4 and IPv6 (false) or only on IPv6 (true). Use with inet6.</p>
</dd>
-<dt class="hdlist1">
-keepalive (false)
-</dt>
-<dd>
-<p>
- Enable sending of keep-alive messages.
-</p>
+<dt>keepalive (false)</dt>
+<dd><p>Enable sending of keep-alive messages.</p>
</dd>
-<dt class="hdlist1">
-linger ({false, 0})
-</dt>
-<dd>
-<p>
- Whether to wait and how long to flush data sent before closing the socket.
-</p>
+<dt>linger ({false, 0})</dt>
+<dd><p>Whether to wait and how long to flush data sent before closing the socket.</p>
</dd>
-<dt class="hdlist1">
-low_msgq_watermark (4096)
-</dt>
-<dd>
-<p>
- Amount of data in the socket message queue before the socket queue leaves busy state.
-</p>
+<dt>low_msgq_watermark (4096)</dt>
+<dd><p>Amount of data in the socket message queue before the socket queue leaves busy state.</p>
</dd>
-<dt class="hdlist1">
-low_watermark (4096)
-</dt>
-<dd>
-<p>
- Amount of data in the ERTS socket implementation&#8217;s queue before the socket leaves busy state.
-</p>
+<dt>low_watermark (4096)</dt>
+<dd><p>Amount of data in the ERTS socket implementation&apos;s queue before the socket leaves busy state.</p>
</dd>
-<dt class="hdlist1">
-nodelay (true)
-</dt>
-<dd>
-<p>
- Whether to enable TCP_NODELAY.
-</p>
+<dt>nodelay (true)</dt>
+<dd><p>Whether to enable TCP_NODELAY.</p>
</dd>
-<dt class="hdlist1">
-port (0)
-</dt>
-<dd>
-<p>
- TCP port number to listen on. 0 means a random port will be used.
-</p>
+<dt>port (0)</dt>
+<dd><p>TCP port number to listen on. 0 means a random port will be used.</p>
</dd>
-<dt class="hdlist1">
-priority (0)
-</dt>
-<dd>
-<p>
- Priority value for all packets to be sent by this socket.
-</p>
+<dt>priority (0)</dt>
+<dd><p>Priority value for all packets to be sent by this socket.</p>
</dd>
-<dt class="hdlist1">
-recbuf
-</dt>
-<dd>
-<p>
- Minimum size of the socket&#8217;s receive buffer. Default is system-dependent.
-</p>
+<dt>recbuf</dt>
+<dd><p>Minimum size of the socket&apos;s receive buffer. Default is system-dependent.</p>
</dd>
-<dt class="hdlist1">
-send_timeout (30000)
-</dt>
-<dd>
-<p>
- How long the send call may wait for confirmation before returning.
-</p>
+<dt>send_timeout (30000)</dt>
+<dd><p>How long the send call may wait for confirmation before returning.</p>
</dd>
-<dt class="hdlist1">
-send_timeout_close (true)
-</dt>
-<dd>
-<p>
- Whether to close the socket when the confirmation wasn&#8217;t received.
-</p>
+<dt>send_timeout_close (true)</dt>
+<dd><p>Whether to close the socket when the confirmation wasn&apos;t received.</p>
</dd>
-<dt class="hdlist1">
-sndbuf
-</dt>
-<dd>
-<p>
- Minimum size of the socket&#8217;s send buffer. Default is system-dependent.
-</p>
+<dt>sndbuf</dt>
+<dd><p>Minimum size of the socket&apos;s send buffer. Default is system-dependent.</p>
</dd>
-<dt class="hdlist1">
-tos
-</dt>
-<dd>
-<p>
- Value for the IP_TOS IP level option. Use with caution.
-</p>
+<dt>tos</dt>
+<dd><p>Value for the IP_TOS IP level option. Use with caution.</p>
</dd>
-</dl></div>
-<div class="paragraph"><p>In addition, the <code>raw</code> option can be used to set system-specific
-options by specifying the protocol level, the option number and
-the actual option value specified as a binary. This option is not
-portable. Use with caution.</p></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
+<p>In addition, the <code>raw</code> option can be used to set system-specific options by specifying the protocol level, the option number and the actual option value specified as a binary. This option is not portable. Use with caution.</p>
<h2 id="_exports">Exports</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>None.</p></div>
-</div>
-</div>
+<p>None.</p>
+
@@ -373,6 +217,8 @@ portable. Use with caution.</p></div>
+ <li><a href="/docs/en/ranch/1.5/manual">1.5</a></li>
+
<li><a href="/docs/en/ranch/1.4/manual">1.4</a></li>
<li><a href="/docs/en/ranch/1.3/manual">1.3</a></li>
diff --git a/docs/en/ranch/1.4/manual/ranch_transport/index.html b/docs/en/ranch/1.4/manual/ranch_transport/index.html
index e0ee8844..5b275cda 100644
--- a/docs/en/ranch/1.4/manual/ranch_transport/index.html
+++ b/docs/en/ranch/1.4/manual/ranch_transport/index.html
@@ -62,494 +62,198 @@
<h1 class="lined-header"><span>ranch_transport(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>ranch_transport - behaviour for transport modules</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>ranch_transport - behaviour for transport modules</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The <code>ranch_transport</code> behaviour defines the interface used
-by Ranch transports.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The <code>ranch_transport</code> behaviour defines the interface used by Ranch transports.</p>
<h2 id="_types">Types</h2>
-<div class="sectionbody">
-<div class="sect2">
-<h3 id="_sendfile_opts_chunk_size_non_neg_integer">sendfile_opts() = [{chunk_size, non_neg_integer()}]</h3>
-<div class="paragraph"><p>Options used by the sendfile function and callbacks.</p></div>
-<div class="paragraph"><p>Allows configuring the chunk size, in bytes. Defaults to 8191 bytes.</p></div>
-</div>
-</div>
-</div>
-<div class="sect1">
+<h3 id="_sendfile_opts_______chunk_size__non_neg_integer">sendfile_opts() = [{chunk_size, non_neg_integer()}]</h3>
+<p>Options used by the sendfile function and callbacks.</p>
+<p>Allows configuring the chunk size, in bytes. Defaults to 8191 bytes.</p>
<h2 id="_callbacks">Callbacks</h2>
-<div class="sectionbody">
-<div class="sect2">
-<h3 id="_accept_lsocket_timeout_8594_ok_csocket_error_closed_timeout_atom">accept(LSocket, Timeout) &#8594; {ok, CSocket} | {error, closed | timeout | atom()}</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-LSocket = CSocket = any()
-</dt>
-<dd>
-<p>
-Listening socket.
-</p>
-</dd>
-<dt class="hdlist1">
-Timeout = timeout()
-</dt>
-<dd>
-<p>
-Accept timeout.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Accept a connection on the given listening socket.</p></div>
-<div class="paragraph"><p>The <code>accept_ack</code> callback will be used to initialize the socket
-after accepting the connection. This is most useful when the
-transport is not raw TCP, like with SSL for example.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_accept_ack_csocket_timeout_8594_ok">accept_ack(CSocket, Timeout) &#8594; ok</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-CSocket = any()
-</dt>
-<dd>
-<p>
-Socket for this connection.
-</p>
-</dd>
-<dt class="hdlist1">
-Timeout = timeout()
-</dt>
-<dd>
-<p>
-Ack timeout.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Perform post-accept initialization of the connection.</p></div>
-<div class="paragraph"><p>This function will be called by connection processes
-before performing any socket operation. It allows
-transports that require extra initialization to perform
-their task and make the socket ready to use.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_close_socket_8594_ok">close(Socket) &#8594; ok</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Socket = any()
-</dt>
-<dd>
-<p>
-Socket opened with listen/1 or accept/2.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Close the given socket.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_controlling_process_socket_pid_8594_ok_error_closed_not_owner_atom">controlling_process(Socket, Pid) &#8594; ok | {error, closed | not_owner | atom()}</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Socket = any()
-</dt>
-<dd>
-<p>
-Socket opened with listen/1 or accept/2.
-</p>
-</dd>
-<dt class="hdlist1">
-Pid = pid()
-</dt>
-<dd>
-<p>
-Pid of the new owner of the socket.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Change the controlling process for the given socket.</p></div>
-<div class="paragraph"><p>The controlling process is the process that is allowed to
-perform operations on the socket, and that will receive
-messages from the socket when active mode is used. When
-the controlling process dies, the socket is closed.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_listen_transopts_8594_ok_lsocket_error_atom">listen(TransOpts) &#8594; {ok, LSocket} | {error, atom()}</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-TransOpts = any()
-</dt>
-<dd>
-<p>
-Transport options.
-</p>
-</dd>
-<dt class="hdlist1">
-LSocket = any()
-</dt>
-<dd>
-<p>
-Listening socket.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Listen for connections on the given port.</p></div>
-<div class="paragraph"><p>The port is given as part of the transport options under
-the key <code>port</code>. Any other option is transport dependent.</p></div>
-<div class="paragraph"><p>The socket returned by this call can then be used to
-accept connections. It is not possible to send or receive
-data from the listening socket.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_messages_8594_ok_closed_error">messages() &#8594; {OK, Closed, Error}</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-OK = Closed = Error = atom()
-</dt>
-<dd>
-<p>
-Tuple names.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Return the atoms used to identify messages sent in active mode.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_name_8594_name">name() &#8594; Name</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Name = atom()
-</dt>
-<dd>
-<p>
-Transport module name.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Return the name of the transport.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_peername_csocket_8594_ok_ip_port_error_atom">peername(CSocket) &#8594; {ok, {IP, Port}} | {error, atom()}</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-CSocket = any()
-</dt>
-<dd>
-<p>
-Socket for this connection.
-</p>
-</dd>
-<dt class="hdlist1">
-IP = inet:ip_address()
-</dt>
-<dd>
-<p>
-IP of the remote endpoint.
-</p>
-</dd>
-<dt class="hdlist1">
-Port = inet:port_number()
-</dt>
-<dd>
-<p>
-Port of the remote endpoint.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Return the IP and port of the remote endpoint.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_recv_csocket_length_timeout_8594_ok_packet_error_closed_timeout_atom">recv(CSocket, Length, Timeout) &#8594; {ok, Packet} | {error, closed | timeout | atom()}</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-CSocket = any()
-</dt>
-<dd>
-<p>
-Socket for this connection.
-</p>
-</dd>
-<dt class="hdlist1">
-Length = non_neg_integer()
-</dt>
-<dd>
-<p>
-Requested length.
-</p>
-</dd>
-<dt class="hdlist1">
-Timeout = timeout()
-</dt>
-<dd>
-<p>
-Receive timeout.
-</p>
-</dd>
-<dt class="hdlist1">
-Packet = iodata() | any()
-</dt>
-<dd>
-<p>
-Data received.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Receive data from the given socket when in passive mode.</p></div>
-<div class="paragraph"><p>Trying to receive data from a socket that is in active mode
-will return an error.</p></div>
-<div class="paragraph"><p>A length of 0 will return any data available on the socket.</p></div>
-<div class="paragraph"><p>While it is possible to use the timeout value <code>infinity</code>,
-this is highly discouraged as this could cause your process
-to get stuck waiting for data that will never come. This may
-happen when a socket becomes half-open due to a crash of the
-remote endpoint. Wi-Fi going down is another common culprit
-of this issue.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_send_csocket_packet_8594_ok_error_atom">send(CSocket, Packet) &#8594; ok | {error, atom()}</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-CSocket = any()
-</dt>
-<dd>
-<p>
-Socket for this connection.
-</p>
-</dd>
-<dt class="hdlist1">
-Packet = iodata()
-</dt>
-<dd>
-<p>
-Data to be sent.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Send data to the given socket.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_sendfile_csocket_file_8594_sendfile_csocket_file_0_0">sendfile(CSocket, File) &#8594; sendfile(CSocket, File, 0, 0, [])</h3>
-<div class="paragraph"><p>Alias of <code>ranch_transport:sendfile/5</code>.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_sendfile_csocket_file_offset_bytes_8594_sendfile_csocket_file_offset_bytes">sendfile(CSocket, File, Offset, Bytes) &#8594; sendfile(CSocket, File, Offset, Bytes, [])</h3>
-<div class="paragraph"><p>Alias of <code>ranch_transport:sendfile/5</code>.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_sendfile_csocket_file_offset_bytes_sfopts_8594_ok_sentbytes_error_atom">sendfile(CSocket, File, Offset, Bytes, SfOpts) &#8594; {ok, SentBytes} | {error, atom()}</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-CSocket = any()
-</dt>
-<dd>
-<p>
-Socket for this connection.
-</p>
-</dd>
-<dt class="hdlist1">
-File = file:filename_all() | file:fd()
-</dt>
-<dd>
-<p>
-Filename or file descriptor for the file to be sent.
-</p>
-</dd>
-<dt class="hdlist1">
-Offset = non_neg_integer()
-</dt>
-<dd>
-<p>
-Begin sending at this position in the file.
-</p>
-</dd>
-<dt class="hdlist1">
-Bytes = non_neg_integer()
-</dt>
-<dd>
-<p>
-Send this many bytes.
-</p>
-</dd>
-<dt class="hdlist1">
-SentBytes = non_neg_integer()
-</dt>
-<dd>
-<p>
-This many bytes were sent.
-</p>
-</dd>
-<dt class="hdlist1">
-SfOpts = sendfile_opts()
-</dt>
-<dd>
-<p>
-Sendfile options.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Send data from a file to the given socket.</p></div>
-<div class="paragraph"><p>The file may be sent full or in parts, and may be specified
-by its filename or by an already open file descriptor.</p></div>
-<div class="paragraph"><p>Transports that manipulate TCP directly may use the
-<code>file:sendfile/{2,4,5}</code> function, which calls the sendfile
-syscall where applicable (on Linux, for example). Other
-transports can use the <code>sendfile/6</code> function exported from
-this module.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_setopts_csocket_sockopts_8594_ok_error_atom">setopts(CSocket, SockOpts) &#8594; ok | {error, atom()}</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-CSocket = any()
-</dt>
-<dd>
-<p>
-Socket for this connection.
-</p>
-</dd>
-<dt class="hdlist1">
-SockOpts = any()
-</dt>
-<dd>
-<p>
-Socket options.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Change options for the given socket.</p></div>
-<div class="paragraph"><p>This is mainly useful for switching to active or passive mode
-or to set protocol-specific options.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_shutdown_csocket_how_8594_ok_error_atom">shutdown(CSocket, How) &#8594; ok | {error, atom()}</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-CSocket = any()
-</dt>
-<dd>
-<p>
-Socket for this connection.
-</p>
-</dd>
-<dt class="hdlist1">
-How = read | write | read_write
-</dt>
-<dd>
-<p>
-Which side(s) of the socket to close.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Immediately close the socket in one or two directions.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_sockname_socket_8594_ok_ip_port_error_atom">sockname(Socket) &#8594; {ok, {IP, Port}} | {error, atom()}</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Socket = any()
-</dt>
-<dd>
-<p>
-Socket opened with listen/1 or accept/2.
-</p>
-</dd>
-<dt class="hdlist1">
-IP = inet:ip_address()
-</dt>
-<dd>
-<p>
-IP of the local endpoint.
-</p>
-</dd>
-<dt class="hdlist1">
-Port = inet:port_number()
-</dt>
-<dd>
-<p>
-Port of the local endpoint.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Return the IP and port of the local endpoint.</p></div>
-</div>
-</div>
-</div>
-<div class="sect1">
+<h3 id="_accept_lsocket__timeout______ok__csocket_____error__closed___timeout___atom">accept(LSocket, Timeout) -&gt; {ok, CSocket} | {error, closed | timeout | atom()}</h3>
+<dl><dt>LSocket = CSocket = any()</dt>
+<dd><p>Listening socket.</p>
+</dd>
+<dt>Timeout = timeout()</dt>
+<dd><p>Accept timeout.</p>
+</dd>
+</dl>
+<p>Accept a connection on the given listening socket.</p>
+<p>The <code>accept_ack</code> callback will be used to initialize the socket after accepting the connection. This is most useful when the transport is not raw TCP, like with SSL for example.</p>
+<h3 id="_accept_ack_csocket__timeout_____ok">accept_ack(CSocket, Timeout) -&gt; ok</h3>
+<dl><dt>CSocket = any()</dt>
+<dd><p>Socket for this connection.</p>
+</dd>
+<dt>Timeout = timeout()</dt>
+<dd><p>Ack timeout.</p>
+</dd>
+</dl>
+<p>Perform post-accept initialization of the connection.</p>
+<p>This function will be called by connection processes before performing any socket operation. It allows transports that require extra initialization to perform their task and make the socket ready to use.</p>
+<h3 id="_close_socket_____ok">close(Socket) -&gt; ok</h3>
+<dl><dt>Socket = any()</dt>
+<dd><p>Socket opened with listen/1 or accept/2.</p>
+</dd>
+</dl>
+<p>Close the given socket.</p>
+<h3 id="_controlling_process_socket__pid_____ok____error__closed___not_owner___atom">controlling_process(Socket, Pid) -&gt; ok | {error, closed | not_owner | atom()}</h3>
+<dl><dt>Socket = any()</dt>
+<dd><p>Socket opened with listen/1 or accept/2.</p>
+</dd>
+<dt>Pid = pid()</dt>
+<dd><p>Pid of the new owner of the socket.</p>
+</dd>
+</dl>
+<p>Change the controlling process for the given socket.</p>
+<p>The controlling process is the process that is allowed to perform operations on the socket, and that will receive messages from the socket when active mode is used. When the controlling process dies, the socket is closed.</p>
+<h3 id="_listen_transopts______ok__lsocket_____error__atom">listen(TransOpts) -&gt; {ok, LSocket} | {error, atom()}</h3>
+<dl><dt>TransOpts = any()</dt>
+<dd><p>Transport options.</p>
+</dd>
+<dt>LSocket = any()</dt>
+<dd><p>Listening socket.</p>
+</dd>
+</dl>
+<p>Listen for connections on the given port.</p>
+<p>The port is given as part of the transport options under the key <code>port</code>. Any other option is transport dependent.</p>
+<p>The socket returned by this call can then be used to accept connections. It is not possible to send or receive data from the listening socket.</p>
+<h3 id="_messages_______ok__closed__error">messages() -&gt; {OK, Closed, Error}</h3>
+<dl><dt>OK = Closed = Error = atom()</dt>
+<dd><p>Tuple names.</p>
+</dd>
+</dl>
+<p>Return the atoms used to identify messages sent in active mode.</p>
+<h3 id="_name______name">name() -&gt; Name</h3>
+<dl><dt>Name = atom()</dt>
+<dd><p>Transport module name.</p>
+</dd>
+</dl>
+<p>Return the name of the transport.</p>
+<h3 id="_peername_csocket______ok___ip__port______error__atom">peername(CSocket) -&gt; {ok, {IP, Port}} | {error, atom()}</h3>
+<dl><dt>CSocket = any()</dt>
+<dd><p>Socket for this connection.</p>
+</dd>
+<dt>IP = inet:ip_address()</dt>
+<dd><p>IP of the remote endpoint.</p>
+</dd>
+<dt>Port = inet:port_number()</dt>
+<dd><p>Port of the remote endpoint.</p>
+</dd>
+</dl>
+<p>Return the IP and port of the remote endpoint.</p>
+<h3 id="_recv_csocket__length__timeout______ok__packet_____error__closed___timeout___atom">recv(CSocket, Length, Timeout) -&gt; {ok, Packet} | {error, closed | timeout | atom()}</h3>
+<dl><dt>CSocket = any()</dt>
+<dd><p>Socket for this connection.</p>
+</dd>
+<dt>Length = non_neg_integer()</dt>
+<dd><p>Requested length.</p>
+</dd>
+<dt>Timeout = timeout()</dt>
+<dd><p>Receive timeout.</p>
+</dd>
+<dt>Packet = iodata() | any()</dt>
+<dd><p>Data received.</p>
+</dd>
+</dl>
+<p>Receive data from the given socket when in passive mode.</p>
+<p>Trying to receive data from a socket that is in active mode will return an error.</p>
+<p>A length of 0 will return any data available on the socket.</p>
+<p>While it is possible to use the timeout value <code>infinity</code>, this is highly discouraged as this could cause your process to get stuck waiting for data that will never come. This may happen when a socket becomes half-open due to a crash of the remote endpoint. Wi-Fi going down is another common culprit of this issue.</p>
+<h3 id="_send_csocket__packet_____ok____error__atom">send(CSocket, Packet) -&gt; ok | {error, atom()}</h3>
+<dl><dt>CSocket = any()</dt>
+<dd><p>Socket for this connection.</p>
+</dd>
+<dt>Packet = iodata()</dt>
+<dd><p>Data to be sent.</p>
+</dd>
+</dl>
+<p>Send data to the given socket.</p>
+<h3 id="_sendfile_csocket__file_____sendfile_csocket__file__0__0">sendfile(CSocket, File) -&gt; sendfile(CSocket, File, 0, 0, [])</h3>
+<p>Alias of <code>ranch_transport:sendfile/5</code>.</p>
+<h3 id="_sendfile_csocket__file__offset__bytes_____sendfile_csocket__file__offset__bytes">sendfile(CSocket, File, Offset, Bytes) -&gt; sendfile(CSocket, File, Offset, Bytes, [])</h3>
+<p>Alias of <code>ranch_transport:sendfile/5</code>.</p>
+<h3 id="_sendfile_csocket__file__offset__bytes__sfopts______ok__sentbytes_____error__atom">sendfile(CSocket, File, Offset, Bytes, SfOpts) -&gt; {ok, SentBytes} | {error, atom()}</h3>
+<dl><dt>CSocket = any()</dt>
+<dd><p>Socket for this connection.</p>
+</dd>
+<dt>File = file:filename_all() | file:fd()</dt>
+<dd><p>Filename or file descriptor for the file to be sent.</p>
+</dd>
+<dt>Offset = non_neg_integer()</dt>
+<dd><p>Begin sending at this position in the file.</p>
+</dd>
+<dt>Bytes = non_neg_integer()</dt>
+<dd><p>Send this many bytes.</p>
+</dd>
+<dt>SentBytes = non_neg_integer()</dt>
+<dd><p>This many bytes were sent.</p>
+</dd>
+<dt>SfOpts = sendfile_opts()</dt>
+<dd><p>Sendfile options.</p>
+</dd>
+</dl>
+<p>Send data from a file to the given socket.</p>
+<p>The file may be sent full or in parts, and may be specified by its filename or by an already open file descriptor.</p>
+<p>Transports that manipulate TCP directly may use the <code>file:sendfile/{2,4,5}</code> function, which calls the sendfile syscall where applicable (on Linux, for example). Other transports can use the <code>sendfile/6</code> function exported from this module.</p>
+<h3 id="_setopts_csocket__sockopts_____ok____error__atom">setopts(CSocket, SockOpts) -&gt; ok | {error, atom()}</h3>
+<dl><dt>CSocket = any()</dt>
+<dd><p>Socket for this connection.</p>
+</dd>
+<dt>SockOpts = any()</dt>
+<dd><p>Socket options.</p>
+</dd>
+</dl>
+<p>Change options for the given socket.</p>
+<p>This is mainly useful for switching to active or passive mode or to set protocol-specific options.</p>
+<h3 id="_shutdown_csocket__how_____ok____error__atom">shutdown(CSocket, How) -&gt; ok | {error, atom()}</h3>
+<dl><dt>CSocket = any()</dt>
+<dd><p>Socket for this connection.</p>
+</dd>
+<dt>How = read | write | read_write</dt>
+<dd><p>Which side(s) of the socket to close.</p>
+</dd>
+</dl>
+<p>Immediately close the socket in one or two directions.</p>
+<h3 id="_sockname_socket______ok___ip__port______error__atom">sockname(Socket) -&gt; {ok, {IP, Port}} | {error, atom()}</h3>
+<dl><dt>Socket = any()</dt>
+<dd><p>Socket opened with listen/1 or accept/2.</p>
+</dd>
+<dt>IP = inet:ip_address()</dt>
+<dd><p>IP of the local endpoint.</p>
+</dd>
+<dt>Port = inet:port_number()</dt>
+<dd><p>Port of the local endpoint.</p>
+</dd>
+</dl>
+<p>Return the IP and port of the local endpoint.</p>
<h2 id="_exports">Exports</h2>
-<div class="sectionbody">
-<div class="sect2">
-<h3 id="_sendfile_transport_csocket_file_offset_bytes_sfopts_8594_ok_sentbytes_error_atom">sendfile(Transport, CSocket, File, Offset, Bytes, SfOpts) &#8594; {ok, SentBytes} | {error, atom()}</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Transport = module()
-</dt>
-<dd>
-<p>
-Transport module for this socket.
-</p>
-</dd>
-<dt class="hdlist1">
-CSocket = any()
-</dt>
-<dd>
-<p>
-Socket for this connection.
-</p>
-</dd>
-<dt class="hdlist1">
-File = file:filename_all() | file:fd()
-</dt>
-<dd>
-<p>
-Filename or file descriptor for the file to be sent.
-</p>
-</dd>
-<dt class="hdlist1">
-Offset = non_neg_integer()
-</dt>
-<dd>
-<p>
-Begin sending at this position in the file.
-</p>
-</dd>
-<dt class="hdlist1">
-Bytes = non_neg_integer()
-</dt>
-<dd>
-<p>
-Send this many bytes.
-</p>
-</dd>
-<dt class="hdlist1">
-SentBytes = non_neg_integer()
-</dt>
-<dd>
-<p>
-This many bytes were sent.
-</p>
-</dd>
-<dt class="hdlist1">
-SfOpts = sendfile_opts()
-</dt>
-<dd>
-<p>
-Sendfile options.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Send data from a file to the given socket.</p></div>
-<div class="paragraph"><p>This function emulates the function <code>file:sendfile/{2,4,5}</code>
-and may be used when transports are not manipulating TCP
-directly.</p></div>
-</div>
-</div>
-</div>
+<h3 id="_sendfile_transport__csocket__file__offset__bytes__sfopts______ok__sentbytes_____error__atom">sendfile(Transport, CSocket, File, Offset, Bytes, SfOpts) -&gt; {ok, SentBytes} | {error, atom()}</h3>
+<dl><dt>Transport = module()</dt>
+<dd><p>Transport module for this socket.</p>
+</dd>
+<dt>CSocket = any()</dt>
+<dd><p>Socket for this connection.</p>
+</dd>
+<dt>File = file:filename_all() | file:fd()</dt>
+<dd><p>Filename or file descriptor for the file to be sent.</p>
+</dd>
+<dt>Offset = non_neg_integer()</dt>
+<dd><p>Begin sending at this position in the file.</p>
+</dd>
+<dt>Bytes = non_neg_integer()</dt>
+<dd><p>Send this many bytes.</p>
+</dd>
+<dt>SentBytes = non_neg_integer()</dt>
+<dd><p>This many bytes were sent.</p>
+</dd>
+<dt>SfOpts = sendfile_opts()</dt>
+<dd><p>Sendfile options.</p>
+</dd>
+</dl>
+<p>Send data from a file to the given socket.</p>
+<p>This function emulates the function <code>file:sendfile/{2,4,5}</code> and may be used when transports are not manipulating TCP directly.</p>
+
@@ -584,6 +288,8 @@ directly.</p></div>
+ <li><a href="/docs/en/ranch/1.5/manual">1.5</a></li>
+
<li><a href="/docs/en/ranch/1.4/manual">1.4</a></li>
<li><a href="/docs/en/ranch/1.3/manual">1.3</a></li>
diff --git a/docs/en/ranch/1.5/guide/embedded.asciidoc b/docs/en/ranch/1.5/guide/embedded.asciidoc
new file mode 100644
index 00000000..55c018b1
--- /dev/null
+++ b/docs/en/ranch/1.5/guide/embedded.asciidoc
@@ -0,0 +1,48 @@
+== Embedded mode
+
+Embedded mode allows you to insert Ranch listeners directly
+in your supervision tree. This allows for greater fault tolerance
+control by permitting the shutdown of a listener due to the
+failure of another part of the application and vice versa.
+
+=== Embedding
+
+To embed Ranch in your application you can simply add the child specs
+to your supervision tree. This can all be done in the `init/1` function
+of one of your application supervisors.
+
+Ranch requires at the minimum two kinds of child specs for embedding.
+First, you need to add `ranch_sup` to your supervision tree, only once,
+regardless of the number of listeners you will use. Then you need to
+add the child specs for each listener.
+
+Ranch has a convenience function for getting the listeners child specs
+called `ranch:child_spec/5`, that works like `ranch:start_listener/5`,
+except that it doesn't start anything, it only returns child specs.
+
+As for `ranch_sup`, the child spec is simple enough to not require a
+convenience function.
+
+The following example adds both `ranch_sup` and one listener to another
+application's supervision tree.
+
+.Embed Ranch directly in your supervision tree
+
+[source,erlang]
+----
+init([]) ->
+ RanchSupSpec = {ranch_sup, {ranch_sup, start_link, []},
+ permanent, 5000, supervisor, [ranch_sup]},
+ ListenerSpec = ranch:child_spec(echo, 100,
+ ranch_tcp, [{port, 5555}],
+ echo_protocol, []
+ ),
+ {ok, {{one_for_one, 10, 10}, [RanchSupSpec, ListenerSpec]}}.
+----
+
+Remember, you can add as many listener child specs as needed, but only
+one `ranch_sup` spec!
+
+It is recommended that your architecture makes sure that all listeners
+are restarted if `ranch_sup` fails. See the Ranch internals chapter for
+more details on how Ranch does it.
diff --git a/docs/en/ranch/1.5/guide/embedded/index.html b/docs/en/ranch/1.5/guide/embedded/index.html
new file mode 100644
index 00000000..e3dab665
--- /dev/null
+++ b/docs/en/ranch/1.5/guide/embedded/index.html
@@ -0,0 +1,184 @@
+<!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">
+
+ <title>Nine Nines: Embedded mode</title>
+
+ <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+ <link href="/css/99s.css?r=1" 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="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>Embedded mode</span></h1>
+
+<p>Embedded mode allows you to insert Ranch listeners directly in your supervision tree. This allows for greater fault tolerance control by permitting the shutdown of a listener due to the failure of another part of the application and vice versa.</p>
+<h2 id="_embedding">Embedding</h2>
+<p>To embed Ranch in your application you can simply add the child specs to your supervision tree. This can all be done in the <code>init/1</code> function of one of your application supervisors.</p>
+<p>Ranch requires at the minimum two kinds of child specs for embedding. First, you need to add <code>ranch_sup</code> to your supervision tree, only once, regardless of the number of listeners you will use. Then you need to add the child specs for each listener.</p>
+<p>Ranch has a convenience function for getting the listeners child specs called <code>ranch:child_spec/5</code>, that works like <code>ranch:start_listener/5</code>, except that it doesn&apos;t start anything, it only returns child specs.</p>
+<p>As for <code>ranch_sup</code>, the child spec is simple enough to not require a convenience function.</p>
+<p>The following example adds both <code>ranch_sup</code> and one listener to another application&apos;s supervision tree.</p>
+<div class="listingblock"><div class="title">Embed Ranch directly in your supervision tree</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><b><font color="#000000">init</font></b>([]) <font color="#990000">-&gt;</font>
+ <font color="#009900">RanchSupSpec</font> <font color="#990000">=</font> {<font color="#FF6600">ranch_sup</font>, {<font color="#FF6600">ranch_sup</font>, <font color="#FF6600">start_link</font>, []},
+ <font color="#FF6600">permanent</font>, <font color="#993399">5000</font>, <font color="#FF6600">supervisor</font>, [<font color="#FF6600">ranch_sup</font>]},
+ <font color="#009900">ListenerSpec</font> <font color="#990000">=</font> <b><font color="#000000">ranch:child_spec</font></b>(<font color="#FF6600">echo</font>, <font color="#993399">100</font>,
+ <font color="#FF6600">ranch_tcp</font>, [{<font color="#FF6600">port</font>, <font color="#993399">5555</font>}],
+ <font color="#FF6600">echo_protocol</font>, []
+ ),
+ {<font color="#FF6600">ok</font>, {{<font color="#FF6600">one_for_one</font>, <font color="#993399">10</font>, <font color="#993399">10</font>}, [<font color="#009900">RanchSupSpec</font>, <font color="#009900">ListenerSpec</font>]}}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Remember, you can add as many listener child specs as needed, but only one <code>ranch_sup</code> spec!</p>
+<p>It is recommended that your architecture makes sure that all listeners are restarted if <code>ranch_sup</code> fails. See the Ranch internals chapter for more details on how Ranch does it.</p>
+
+
+
+
+
+
+
+
+
+
+
+ <nav style="margin:1em 0">
+
+ <a style="float:left" href="https://ninenines.eu/docs/en/ranch/1.5/guide/protocols/">
+ Protocols
+ </a>
+
+
+
+ <a style="float:right" href="https://ninenines.eu/docs/en/ranch/1.5/guide/parsers/">
+ Writing parsers
+ </a>
+
+ </nav>
+
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Ranch
+ 1.5
+
+ User Guide
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/1.5/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/1.5/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/1.5/guide">1.5</a></li>
+
+ <li><a href="/docs/en/ranch/1.4/guide">1.4</a></li>
+
+ <li><a href="/docs/en/ranch/1.3/guide">1.3</a></li>
+
+ <li><a href="/docs/en/ranch/1.2/guide">1.2</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-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/1.5/guide/index.html b/docs/en/ranch/1.5/guide/index.html
new file mode 100644
index 00000000..860a61cd
--- /dev/null
+++ b/docs/en/ranch/1.5/guide/index.html
@@ -0,0 +1,156 @@
+<!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">
+
+ <title>Nine Nines: Ranch User Guide</title>
+
+ <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+ <link href="/css/99s.css?r=1" 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="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>Ranch User Guide</span></h1>
+
+<ul><li><a href="introduction/">Introduction</a>
+</li>
+<li><a href="listeners/">Listeners</a>
+</li>
+<li><a href="transports/">Transports</a>
+</li>
+<li><a href="protocols/">Protocols</a>
+</li>
+<li><a href="embedded/">Embedded mode</a>
+</li>
+<li><a href="parsers/">Writing parsers</a>
+</li>
+<li><a href="ssl_auth/">SSL client authentication</a>
+</li>
+<li><a href="internals/">Internals</a>
+</li>
+</ul>
+
+
+
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Ranch
+ 1.5
+
+ User Guide
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/1.5/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/1.5/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/1.5/guide">1.5</a></li>
+
+ <li><a href="/docs/en/ranch/1.4/guide">1.4</a></li>
+
+ <li><a href="/docs/en/ranch/1.3/guide">1.3</a></li>
+
+ <li><a href="/docs/en/ranch/1.2/guide">1.2</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-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/1.5/guide/internals.asciidoc b/docs/en/ranch/1.5/guide/internals.asciidoc
new file mode 100644
index 00000000..c5bde58f
--- /dev/null
+++ b/docs/en/ranch/1.5/guide/internals.asciidoc
@@ -0,0 +1,94 @@
+== Internals
+
+This chapter may not apply to embedded Ranch as embedding allows you
+to use an architecture specific to your application, which may or may
+not be compatible with the description of the Ranch application.
+
+Note that for everything related to efficiency and performance,
+you should perform the benchmarks yourself to get the numbers that
+matter to you. Generic benchmarks found on the web may or may not
+be of use to you, you can never know until you benchmark your own
+system.
+
+=== Architecture
+
+Ranch is an OTP application.
+
+Like all OTP applications, Ranch has a top supervisor. It is responsible
+for supervising the `ranch_server` process and all the listeners that
+will be started.
+
+The `ranch_server` gen_server is a central process keeping track of the
+listeners and their acceptors. It does so through the use of a public ets
+table called `ranch_server`. The table is owned by the top supervisor
+to improve fault tolerance. This way if the `ranch_server` gen_server
+fails, it doesn't lose any information and the restarted process can
+continue as if nothing happened.
+
+Ranch uses a custom supervisor for managing connections. This supervisor
+keeps track of the number of connections and handles connection limits
+directly. While it is heavily optimized to perform the task of creating
+connection processes for accepted connections, it is still following the
+OTP principles and the usual `sys` and `supervisor` calls will work on
+it as expected.
+
+Listeners are grouped into the `ranch_listener_sup` supervisor and
+consist of three kinds of processes: the listener gen_server, the
+acceptor processes and the connection processes, both grouped under
+their own supervisor. All of these processes are registered to the
+`ranch_server` gen_server with varying amount of information.
+
+All socket operations, including listening for connections, go through
+transport handlers. Accepted connections are given to the protocol handler.
+Transport handlers are simple callback modules for performing operations on
+sockets. Protocol handlers start a new process, which receives socket
+ownership, with no requirements on how the code should be written inside
+that new process.
+
+=== Number of acceptors
+
+The second argument to `ranch:start_listener/5` is the number of
+processes that will be accepting connections. Care should be taken
+when choosing this number.
+
+First of all, it should not be confused with the maximum number
+of connections. Acceptor processes are only used for accepting and
+have nothing else in common with connection processes. Therefore
+there is nothing to be gained from setting this number too high,
+in fact it can slow everything else down.
+
+Second, this number should be high enough to allow Ranch to accept
+connections concurrently. But the number of cores available doesn't
+seem to be the only factor for choosing this number, as we can
+observe faster accepts if we have more acceptors than cores. It
+might be entirely dependent on the protocol, however.
+
+Our observations suggest that using 100 acceptors on modern hardware
+is a good solution, as it's big enough to always have acceptors ready
+and it's low enough that it doesn't have a negative impact on the
+system's performances.
+
+=== Platform-specific TCP features
+
+Some socket options are platform-specific and not supported by `inet`.
+They can be of interest because they generally are related to
+optimizations provided by the underlying OS. They can still be enabled
+thanks to the `raw` option, for which we will see an example.
+
+One of these features is `TCP_DEFER_ACCEPT` on Linux. It is a simplified
+accept mechanism which will wait for application data to come in before
+handing out the connection to the Erlang process.
+
+This is especially useful if you expect many connections to be mostly
+idle, perhaps part of a connection pool. They can be handled by the
+kernel directly until they send any real data, instead of allocating
+resources to idle connections.
+
+To enable this mechanism, the following option can be used.
+
+.Using raw transport options
+
+[source,erlang]
+{raw, 6, 9, << 30:32/native >>}
+
+It means go on layer 6, turn on option 9 with the given integer parameter.
diff --git a/docs/en/ranch/1.5/guide/internals/index.html b/docs/en/ranch/1.5/guide/internals/index.html
new file mode 100644
index 00000000..10bb644b
--- /dev/null
+++ b/docs/en/ranch/1.5/guide/internals/index.html
@@ -0,0 +1,184 @@
+<!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">
+
+ <title>Nine Nines: Internals</title>
+
+ <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+ <link href="/css/99s.css?r=1" 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="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>Internals</span></h1>
+
+<p>This chapter may not apply to embedded Ranch as embedding allows you to use an architecture specific to your application, which may or may not be compatible with the description of the Ranch application.</p>
+<p>Note that for everything related to efficiency and performance, you should perform the benchmarks yourself to get the numbers that matter to you. Generic benchmarks found on the web may or may not be of use to you, you can never know until you benchmark your own system.</p>
+<h2 id="_architecture">Architecture</h2>
+<p>Ranch is an OTP application.</p>
+<p>Like all OTP applications, Ranch has a top supervisor. It is responsible for supervising the <code>ranch_server</code> process and all the listeners that will be started.</p>
+<p>The <code>ranch_server</code> gen_server is a central process keeping track of the listeners and their acceptors. It does so through the use of a public ets table called <code>ranch_server</code>. The table is owned by the top supervisor to improve fault tolerance. This way if the <code>ranch_server</code> gen_server fails, it doesn&apos;t lose any information and the restarted process can continue as if nothing happened.</p>
+<p>Ranch uses a custom supervisor for managing connections. This supervisor keeps track of the number of connections and handles connection limits directly. While it is heavily optimized to perform the task of creating connection processes for accepted connections, it is still following the OTP principles and the usual <code>sys</code> and <code>supervisor</code> calls will work on it as expected.</p>
+<p>Listeners are grouped into the <code>ranch_listener_sup</code> supervisor and consist of three kinds of processes: the listener gen_server, the acceptor processes and the connection processes, both grouped under their own supervisor. All of these processes are registered to the <code>ranch_server</code> gen_server with varying amount of information.</p>
+<p>All socket operations, including listening for connections, go through transport handlers. Accepted connections are given to the protocol handler. Transport handlers are simple callback modules for performing operations on sockets. Protocol handlers start a new process, which receives socket ownership, with no requirements on how the code should be written inside that new process.</p>
+<h2 id="_number_of_acceptors">Number of acceptors</h2>
+<p>The second argument to <code>ranch:start_listener/5</code> is the number of processes that will be accepting connections. Care should be taken when choosing this number.</p>
+<p>First of all, it should not be confused with the maximum number of connections. Acceptor processes are only used for accepting and have nothing else in common with connection processes. Therefore there is nothing to be gained from setting this number too high, in fact it can slow everything else down.</p>
+<p>Second, this number should be high enough to allow Ranch to accept connections concurrently. But the number of cores available doesn&apos;t seem to be the only factor for choosing this number, as we can observe faster accepts if we have more acceptors than cores. It might be entirely dependent on the protocol, however.</p>
+<p>Our observations suggest that using 100 acceptors on modern hardware is a good solution, as it&apos;s big enough to always have acceptors ready and it&apos;s low enough that it doesn&apos;t have a negative impact on the system&apos;s performances.</p>
+<h2 id="_platform_specific_tcp_features">Platform-specific TCP features</h2>
+<p>Some socket options are platform-specific and not supported by <code>inet</code>. They can be of interest because they generally are related to optimizations provided by the underlying OS. They can still be enabled thanks to the <code>raw</code> option, for which we will see an example.</p>
+<p>One of these features is <code>TCP_DEFER_ACCEPT</code> on Linux. It is a simplified accept mechanism which will wait for application data to come in before handing out the connection to the Erlang process.</p>
+<p>This is especially useful if you expect many connections to be mostly idle, perhaps part of a connection pool. They can be handled by the kernel directly until they send any real data, instead of allocating resources to idle connections.</p>
+<p>To enable this mechanism, the following option can be used.</p>
+<div class="listingblock"><div class="title">Using raw transport options</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>{<font color="#FF6600">raw</font>, <font color="#993399">6</font>, <font color="#993399">9</font>, <font color="#990000">&lt;&lt;</font> <b><font color="#000000">30:32</font></b><font color="#990000">/</font><font color="#FF6600">native</font> <font color="#990000">&gt;&gt;</font>}</tt></pre>
+</div></div>
+<p>It means go on layer 6, turn on option 9 with the given integer parameter.</p>
+
+
+
+
+
+
+
+
+
+
+
+ <nav style="margin:1em 0">
+
+ <a style="float:left" href="https://ninenines.eu/docs/en/ranch/1.5/guide/ssl_auth/">
+ SSL client authentication
+ </a>
+
+
+
+ </nav>
+
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Ranch
+ 1.5
+
+ User Guide
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/1.5/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/1.5/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/1.5/guide">1.5</a></li>
+
+ <li><a href="/docs/en/ranch/1.4/guide">1.4</a></li>
+
+ <li><a href="/docs/en/ranch/1.3/guide">1.3</a></li>
+
+ <li><a href="/docs/en/ranch/1.2/guide">1.2</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-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/1.5/guide/introduction.asciidoc b/docs/en/ranch/1.5/guide/introduction.asciidoc
new file mode 100644
index 00000000..ac27862e
--- /dev/null
+++ b/docs/en/ranch/1.5/guide/introduction.asciidoc
@@ -0,0 +1,28 @@
+== Introduction
+
+Ranch is a socket acceptor pool for TCP protocols.
+
+Ranch aims to provide everything you need to accept TCP connections
+with a small code base and low latency while being easy to use directly
+as an application or to embed into your own.
+
+=== Prerequisites
+
+It is assumed the developer already knows Erlang and has some experience
+with socket programming and TCP protocols.
+
+=== Supported platforms
+
+Ranch is tested and supported on Linux, FreeBSD, OSX and Windows.
+
+Ranch is developed for Erlang/OTP R16B+.
+
+There are known issues with the SSL application found in Erlang/OTP
+18.3.2 and 18.3.3. These versions are therefore not supported.
+
+Ranch may be compiled on earlier Erlang versions with small source code
+modifications but there is no guarantee that it will work as expected.
+
+=== Versioning
+
+Ranch uses http://semver.org/[Semantic Versioning 2.0.0]
diff --git a/docs/en/ranch/1.5/guide/introduction/index.html b/docs/en/ranch/1.5/guide/introduction/index.html
new file mode 100644
index 00000000..f9c50f8f
--- /dev/null
+++ b/docs/en/ranch/1.5/guide/introduction/index.html
@@ -0,0 +1,168 @@
+<!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">
+
+ <title>Nine Nines: Introduction</title>
+
+ <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+ <link href="/css/99s.css?r=1" 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="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>Introduction</span></h1>
+
+<p>Ranch is a socket acceptor pool for TCP protocols.</p>
+<p>Ranch aims to provide everything you need to accept TCP connections with a small code base and low latency while being easy to use directly as an application or to embed into your own.</p>
+<h2 id="_prerequisites">Prerequisites</h2>
+<p>It is assumed the developer already knows Erlang and has some experience with socket programming and TCP protocols.</p>
+<h2 id="_supported_platforms">Supported platforms</h2>
+<p>Ranch is tested and supported on Linux, FreeBSD, OSX and Windows.</p>
+<p>Ranch is developed for Erlang/OTP R16B+.</p>
+<p>There are known issues with the SSL application found in Erlang/OTP 18.3.2 and 18.3.3. These versions are therefore not supported.</p>
+<p>Ranch may be compiled on earlier Erlang versions with small source code modifications but there is no guarantee that it will work as expected.</p>
+<h2 id="_versioning">Versioning</h2>
+<p>Ranch uses <a href="http://semver.org/">Semantic Versioning 2.0.0</a></p>
+
+
+
+
+
+
+
+
+
+
+
+ <nav style="margin:1em 0">
+
+
+
+ <a style="float:right" href="https://ninenines.eu/docs/en/ranch/1.5/guide/listeners/">
+ Listeners
+ </a>
+
+ </nav>
+
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Ranch
+ 1.5
+
+ User Guide
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/1.5/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/1.5/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/1.5/guide">1.5</a></li>
+
+ <li><a href="/docs/en/ranch/1.4/guide">1.4</a></li>
+
+ <li><a href="/docs/en/ranch/1.3/guide">1.3</a></li>
+
+ <li><a href="/docs/en/ranch/1.2/guide">1.2</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-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/1.5/guide/listeners.asciidoc b/docs/en/ranch/1.5/guide/listeners.asciidoc
new file mode 100644
index 00000000..97afa223
--- /dev/null
+++ b/docs/en/ranch/1.5/guide/listeners.asciidoc
@@ -0,0 +1,320 @@
+== Listeners
+
+A listener is a set of processes whose role is to listen on a port
+for new connections. It manages a pool of acceptor processes, each
+of them indefinitely accepting connections. When it does, it starts
+a new process executing the protocol handler code. All the socket
+programming is abstracted through the use of transport handlers.
+
+The listener takes care of supervising all the acceptor and connection
+processes, allowing developers to focus on building their application.
+
+=== Starting a listener
+
+Ranch does nothing by default. It is up to the application developer
+to request that Ranch listens for connections.
+
+A listener can be started and stopped at will.
+
+When starting a listener, a number of different settings are required:
+
+* A name to identify it locally and be able to interact with it.
+* The number of acceptors in the pool.
+* A transport handler and its associated options.
+* A protocol handler and its associated options.
+
+Ranch includes both TCP and SSL transport handlers, respectively
+`ranch_tcp` and `ranch_ssl`.
+
+A listener can be started by calling the `ranch:start_listener/5`
+function. Before doing so however, you must ensure that the `ranch`
+application is started.
+
+.Starting the Ranch application
+
+[source,erlang]
+ok = application:start(ranch).
+
+You are then ready to start a listener. Let's call it `tcp_echo`. It will
+have a pool of 100 acceptors, use a TCP transport and forward connections
+to the `echo_protocol` handler.
+
+.Starting a listener for TCP connections on port 5555
+
+[source,erlang]
+{ok, _} = ranch:start_listener(tcp_echo,
+ ranch_tcp, [{port, 5555}],
+ echo_protocol, []
+).
+
+You can try this out by compiling and running the `tcp_echo` example in the
+examples directory. To do so, open a shell in the 'examples/tcp_echo/'
+directory and run the following command:
+
+.Building and starting a Ranch example
+
+[source,bash]
+$ make run
+
+You can then connect to it using telnet and see the echo server reply
+everything you send to it. Then when you're done testing, you can use
+the `Ctrl+]` key to escape to the telnet command line and type
+`quit` to exit.
+
+.Connecting to the example listener with telnet
+
+[source,bash]
+----
+$ telnet localhost 5555
+Trying 127.0.0.1...
+Connected to localhost.
+Escape character is '^]'.
+Hello!
+Hello!
+It works!
+It works!
+^]
+
+telnet> quit
+Connection closed.
+----
+
+=== Stopping a listener
+
+All you need to stop a Ranch listener is to call the
+`ranch:stop_listener/1` function with the listener's name
+as argument. In the previous section we started the listener
+named `tcp_echo`. We can now stop it.
+
+.Stopping a listener
+
+[source,erlang]
+ranch:stop_listener(tcp_echo).
+
+=== Default transport options
+
+By default the socket will be set to return `binary` data, with the
+options `{active, false}`, `{packet, raw}`, `{reuseaddr, true}` set.
+These values can't be overriden when starting the listener, but
+they can be overriden using `Transport:setopts/2` in the protocol.
+
+It will also set `{backlog, 1024}` and `{nodelay, true}`, which
+can be overriden at listener startup.
+
+=== Listening on a random port
+
+You do not have to specify a specific port to listen on. If you give
+the port number 0, or if you omit the port number entirely, Ranch will
+start listening on a random port.
+
+You can retrieve this port number by calling `ranch:get_port/1`. The
+argument is the name of the listener you gave in `ranch:start_listener/5`.
+
+.Starting a listener for TCP connections on a random port
+
+[source,erlang]
+{ok, _} = ranch:start_listener(tcp_echo,
+ ranch_tcp, [{port, 0}],
+ echo_protocol, []
+).
+Port = ranch:get_port(tcp_echo).
+
+=== Listening on privileged ports
+
+Some systems limit access to ports below 1024 for security reasons.
+This can easily be identified by an `{error, eacces}` error when trying
+to open a listening socket on such a port.
+
+The methods for listening on privileged ports vary between systems,
+please refer to your system's documentation for more information.
+
+We recommend the use of port rewriting for systems with a single server,
+and load balancing for systems with multiple servers. Documenting these
+solutions is however out of the scope of this guide.
+
+=== Accepting connections on an existing socket
+
+If you want to accept connections on an existing socket, you can use the
+`socket` transport option, which should just be the relevant data returned
+from the connect function for the transport or the underlying socket library
+(`gen_tcp:connect`, `ssl:connect`). The accept function will then be
+called on the passed in socket. You should connect the socket in
+`{active, false}` mode, as well.
+
+Note, however, that because of a bug in SSL, you cannot change ownership of an
+SSL listen socket prior to R16. Ranch will catch the error thrown, but the
+owner of the SSL socket will remain as whatever process created the socket.
+However, this will not affect accept behaviour unless the owner process dies,
+in which case the socket is closed. Therefore, to use this feature with SSL
+with an erlang release prior to R16, ensure that the SSL socket is opened in a
+persistant process.
+
+=== Limiting the number of concurrent connections
+
+The `max_connections` transport option allows you to limit the number
+of concurrent connections. It defaults to 1024. Its purpose is to
+prevent your system from being overloaded and ensuring all the
+connections are handled optimally.
+
+.Customizing the maximum number of concurrent connections
+
+[source,erlang]
+{ok, _} = ranch:start_listener(tcp_echo,
+ ranch_tcp, [{port, 5555}, {max_connections, 100}],
+ echo_protocol, []
+).
+
+You can disable this limit by setting its value to the atom `infinity`.
+
+.Disabling the limit for the number of connections
+
+[source,erlang]
+{ok, _} = ranch:start_listener(tcp_echo,
+ ranch_tcp, [{port, 5555}, {max_connections, infinity}],
+ echo_protocol, []
+).
+
+The maximum number of connections is a soft limit. In practice, it
+can reach `max_connections` + the number of acceptors.
+
+When the maximum number of connections is reached, Ranch will stop
+accepting connections. This will not result in further connections
+being rejected, as the kernel option allows queueing incoming
+connections. The size of this queue is determined by the `backlog`
+option and defaults to 1024. Ranch does not know about the number
+of connections that are in the backlog.
+
+You may not always want connections to be counted when checking for
+`max_connections`. For example you might have a protocol where both
+short-lived and long-lived connections are possible. If the long-lived
+connections are mostly waiting for messages, then they don't consume
+much resources and can safely be removed from the count.
+
+To remove the connection from the count, you must call the
+`ranch:remove_connection/1` from within the connection process,
+with the name of the listener as the only argument.
+
+.Removing a connection from the count of connections
+
+[source,erlang]
+ranch:remove_connection(Ref).
+
+As seen in the chapter covering protocols, this pid is received as the
+first argument of the protocol's `start_link/4` callback.
+
+You can modify the `max_connections` value on a running listener by
+using the `ranch:set_max_connections/2` function, with the name of the
+listener as first argument and the new value as the second.
+
+.Upgrading the maximum number of connections
+
+[source,erlang]
+ranch:set_max_connections(tcp_echo, MaxConns).
+
+The change will occur immediately.
+
+=== Customizing the number of acceptor processes
+
+By default Ranch will use 10 acceptor processes. Their role is
+to accept connections and spawn a connection process for every
+new connection.
+
+This number can be tweaked to improve performance. A good
+number is typically between 10 or 100 acceptors. You must
+measure to find the best value for your application.
+
+.Specifying a custom number of acceptor processes
+
+[source,erlang]
+{ok, _} = ranch:start_listener(tcp_echo,
+ ranch_tcp, [{port, 5555}, {num_acceptors, 42}],
+ echo_protocol, []
+).
+
+=== When running out of file descriptors
+
+Operating systems have limits on the number of sockets
+which can be opened by applications. When this maximum is
+reached the listener can no longer accept new connections. The
+accept rate of the listener will be automatically reduced, and a
+warning message will be logged.
+
+----
+=ERROR REPORT==== 13-Jan-2016::12:24:38 ===
+Ranch acceptor reducing accept rate: out of file descriptors
+----
+
+If you notice messages like this you should increase the number
+of file-descriptors which can be opened by your application. How
+this should be done is operating-system dependent. Please consult
+the documentation of your operating system.
+
+=== Using a supervisor for connection processes
+
+Ranch allows you to define the type of process that will be used
+for the connection processes. By default it expects a `worker`.
+When the `connection_type` configuration value is set to `supervisor`,
+Ranch will consider that the connection process it manages is a
+supervisor and will reflect that in its supervision tree.
+
+Connection processes of type `supervisor` can either handle the
+socket directly or through one of their children. In the latter
+case the start function for the connection process must return
+two pids: the pid of the supervisor you created (that will be
+supervised) and the pid of the protocol handling process (that
+will receive the socket).
+
+Instead of returning `{ok, ConnPid}`, simply return
+`{ok, SupPid, ConnPid}`.
+
+It is very important that the connection process be created
+under the supervisor process so that everything works as intended.
+If not, you will most likely experience issues when the supervised
+process is stopped.
+
+=== Upgrading
+
+Ranch allows you to upgrade the protocol options. This takes effect
+immediately and for all subsequent connections.
+
+To upgrade the protocol options, call `ranch:set_protocol_options/2`
+with the name of the listener as first argument and the new options
+as the second.
+
+.Upgrading the protocol options
+
+[source,erlang]
+ranch:set_protocol_options(tcp_echo, NewOpts).
+
+All future connections will use the new options.
+
+You can also retrieve the current options similarly by
+calling `ranch:get_protocol_options/1`.
+
+.Retrieving the current protocol options
+
+[source,erlang]
+Opts = ranch:get_protocol_options(tcp_echo).
+
+=== Obtaining information about listeners
+
+Ranch provides two functions for retrieving information about the
+listeners, for reporting and diagnostic purposes.
+
+The `ranch:info/0` function will return detailed information
+about all listeners.
+
+.Retrieving detailed information
+[source,erlang]
+ranch:info().
+
+The `ranch:procs/2` function will return all acceptor or listener
+processes for a given listener.
+
+.Get all acceptor processes
+[source,erlang]
+ranch:procs(tcp_echo, acceptors).
+
+.Get all connection processes
+[source,erlang]
+ranch:procs(tcp_echo, connections).
diff --git a/docs/en/ranch/1.5/guide/listeners/index.html b/docs/en/ranch/1.5/guide/listeners/index.html
new file mode 100644
index 00000000..3f33574b
--- /dev/null
+++ b/docs/en/ranch/1.5/guide/listeners/index.html
@@ -0,0 +1,367 @@
+<!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">
+
+ <title>Nine Nines: Listeners</title>
+
+ <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+ <link href="/css/99s.css?r=1" 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="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>Listeners</span></h1>
+
+<p>A listener is a set of processes whose role is to listen on a port for new connections. It manages a pool of acceptor processes, each of them indefinitely accepting connections. When it does, it starts a new process executing the protocol handler code. All the socket programming is abstracted through the use of transport handlers.</p>
+<p>The listener takes care of supervising all the acceptor and connection processes, allowing developers to focus on building their application.</p>
+<h2 id="_starting_a_listener">Starting a listener</h2>
+<p>Ranch does nothing by default. It is up to the application developer to request that Ranch listens for connections.</p>
+<p>A listener can be started and stopped at will.</p>
+<p>When starting a listener, a number of different settings are required:</p>
+<ul><li>A name to identify it locally and be able to interact with it.
+</li>
+<li>The number of acceptors in the pool.
+</li>
+<li>A transport handler and its associated options.
+</li>
+<li>A protocol handler and its associated options.
+</li>
+</ul>
+<p>Ranch includes both TCP and SSL transport handlers, respectively <code>ranch_tcp</code> and <code>ranch_ssl</code>.</p>
+<p>A listener can be started by calling the <code>ranch:start_listener/5</code> function. Before doing so however, you must ensure that the <code>ranch</code> application is started.</p>
+<div class="listingblock"><div class="title">Starting the Ranch application</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><font color="#0000FF">ok</font> <font color="#990000">=</font> <b><font color="#000000">application:start</font></b>(<font color="#FF6600">ranch</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>You are then ready to start a listener. Let&apos;s call it <code>tcp_echo</code>. It will have a pool of 100 acceptors, use a TCP transport and forward connections to the <code>echo_protocol</code> handler.</p>
+<div class="listingblock"><div class="title">Starting a listener for TCP connections on port 5555</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>{<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">ranch:start_listener</font></b>(<font color="#FF6600">tcp_echo</font>,
+ <font color="#FF6600">ranch_tcp</font>, [{<font color="#FF6600">port</font>, <font color="#993399">5555</font>}],
+ <font color="#FF6600">echo_protocol</font>, []
+)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>You can try this out by compiling and running the <code>tcp_echo</code> example in the examples directory. To do so, open a shell in the <em>examples/tcp_echo/</em> directory and run the following command:</p>
+<div class="listingblock"><div class="title">Building and starting a Ranch example</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>$ make run</tt></pre>
+</div></div>
+<p>You can then connect to it using telnet and see the echo server reply everything you send to it. Then when you&apos;re done testing, you can use the <code>Ctrl+]</code> key to escape to the telnet command line and type <code>quit</code> to exit.</p>
+<div class="listingblock"><div class="title">Connecting to the example listener with telnet</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>$ telnet localhost <font color="#993399">5555</font>
+Trying <font color="#993399">127.0</font><font color="#990000">.</font><font color="#993399">0.1</font><font color="#990000">...</font>
+Connected to localhost<font color="#990000">.</font>
+Escape character is <font color="#FF0000">'^]'</font><font color="#990000">.</font>
+Hello<font color="#990000">!</font>
+Hello<font color="#990000">!</font>
+It works<font color="#990000">!</font>
+It works<font color="#990000">!</font>
+<font color="#990000">^]</font>
+
+telnet<font color="#990000">&gt;</font> quit
+Connection closed<font color="#990000">.</font></tt></pre>
+</div></div>
+<h2 id="_stopping_a_listener">Stopping a listener</h2>
+<p>All you need to stop a Ranch listener is to call the <code>ranch:stop_listener/1</code> function with the listener&apos;s name as argument. In the previous section we started the listener named <code>tcp_echo</code>. We can now stop it.</p>
+<div class="listingblock"><div class="title">Stopping a listener</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><b><font color="#000000">ranch:stop_listener</font></b>(<font color="#FF6600">tcp_echo</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<h2 id="_default_transport_options">Default transport options</h2>
+<p>By default the socket will be set to return <code>binary</code> data, with the options <code>{active, false}</code>, <code>{packet, raw}</code>, <code>{reuseaddr, true}</code> set. These values can&apos;t be overriden when starting the listener, but they can be overriden using <code>Transport:setopts/2</code> in the protocol.</p>
+<p>It will also set <code>{backlog, 1024}</code> and <code>{nodelay, true}</code>, which can be overriden at listener startup.</p>
+<h2 id="_listening_on_a_random_port">Listening on a random port</h2>
+<p>You do not have to specify a specific port to listen on. If you give the port number 0, or if you omit the port number entirely, Ranch will start listening on a random port.</p>
+<p>You can retrieve this port number by calling <code>ranch:get_port/1</code>. The argument is the name of the listener you gave in <code>ranch:start_listener/5</code>.</p>
+<div class="listingblock"><div class="title">Starting a listener for TCP connections on a random port</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>{<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">ranch:start_listener</font></b>(<font color="#FF6600">tcp_echo</font>,
+ <font color="#FF6600">ranch_tcp</font>, [{<font color="#FF6600">port</font>, <font color="#993399">0</font>}],
+ <font color="#FF6600">echo_protocol</font>, []
+)<font color="#990000">.</font>
+<font color="#009900">Port</font> <font color="#990000">=</font> <b><font color="#000000">ranch:get_port</font></b>(<font color="#FF6600">tcp_echo</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<h2 id="_listening_on_privileged_ports">Listening on privileged ports</h2>
+<p>Some systems limit access to ports below 1024 for security reasons. This can easily be identified by an <code>{error, eacces}</code> error when trying to open a listening socket on such a port.</p>
+<p>The methods for listening on privileged ports vary between systems, please refer to your system&apos;s documentation for more information.</p>
+<p>We recommend the use of port rewriting for systems with a single server, and load balancing for systems with multiple servers. Documenting these solutions is however out of the scope of this guide.</p>
+<h2 id="_accepting_connections_on_an_existing_socket">Accepting connections on an existing socket</h2>
+<p>If you want to accept connections on an existing socket, you can use the <code>socket</code> transport option, which should just be the relevant data returned from the connect function for the transport or the underlying socket library (<code>gen_tcp:connect</code>, <code>ssl:connect</code>). The accept function will then be called on the passed in socket. You should connect the socket in <code>{active, false}</code> mode, as well.</p>
+<p>Note, however, that because of a bug in SSL, you cannot change ownership of an SSL listen socket prior to R16. Ranch will catch the error thrown, but the owner of the SSL socket will remain as whatever process created the socket. However, this will not affect accept behaviour unless the owner process dies, in which case the socket is closed. Therefore, to use this feature with SSL with an erlang release prior to R16, ensure that the SSL socket is opened in a persistant process.</p>
+<h2 id="_limiting_the_number_of_concurrent_connections">Limiting the number of concurrent connections</h2>
+<p>The <code>max_connections</code> transport option allows you to limit the number of concurrent connections. It defaults to 1024. Its purpose is to prevent your system from being overloaded and ensuring all the connections are handled optimally.</p>
+<div class="listingblock"><div class="title">Customizing the maximum number of concurrent connections</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>{<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">ranch:start_listener</font></b>(<font color="#FF6600">tcp_echo</font>,
+ <font color="#FF6600">ranch_tcp</font>, [{<font color="#FF6600">port</font>, <font color="#993399">5555</font>}, {<font color="#FF6600">max_connections</font>, <font color="#993399">100</font>}],
+ <font color="#FF6600">echo_protocol</font>, []
+)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>You can disable this limit by setting its value to the atom <code>infinity</code>.</p>
+<div class="listingblock"><div class="title">Disabling the limit for the number of connections</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>{<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">ranch:start_listener</font></b>(<font color="#FF6600">tcp_echo</font>,
+ <font color="#FF6600">ranch_tcp</font>, [{<font color="#FF6600">port</font>, <font color="#993399">5555</font>}, {<font color="#FF6600">max_connections</font>, <font color="#FF6600">infinity</font>}],
+ <font color="#FF6600">echo_protocol</font>, []
+)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>The maximum number of connections is a soft limit. In practice, it can reach <code>max_connections</code><br/> the number of acceptors.</p>
+<p>When the maximum number of connections is reached, Ranch will stop accepting connections. This will not result in further connections being rejected, as the kernel option allows queueing incoming connections. The size of this queue is determined by the <code>backlog</code> option and defaults to 1024. Ranch does not know about the number of connections that are in the backlog.</p>
+<p>You may not always want connections to be counted when checking for <code>max_connections</code>. For example you might have a protocol where both short-lived and long-lived connections are possible. If the long-lived connections are mostly waiting for messages, then they don&apos;t consume much resources and can safely be removed from the count.</p>
+<p>To remove the connection from the count, you must call the <code>ranch:remove_connection/1</code> from within the connection process, with the name of the listener as the only argument.</p>
+<div class="listingblock"><div class="title">Removing a connection from the count of connections</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><b><font color="#000000">ranch:remove_connection</font></b>(<font color="#009900">Ref</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>As seen in the chapter covering protocols, this pid is received as the first argument of the protocol&apos;s <code>start_link/4</code> callback.</p>
+<p>You can modify the <code>max_connections</code> value on a running listener by using the <code>ranch:set_max_connections/2</code> function, with the name of the listener as first argument and the new value as the second.</p>
+<div class="listingblock"><div class="title">Upgrading the maximum number of connections</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><b><font color="#000000">ranch:set_max_connections</font></b>(<font color="#FF6600">tcp_echo</font>, <font color="#009900">MaxConns</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>The change will occur immediately.</p>
+<h2 id="_customizing_the_number_of_acceptor_processes">Customizing the number of acceptor processes</h2>
+<p>By default Ranch will use 10 acceptor processes. Their role is to accept connections and spawn a connection process for every new connection.</p>
+<p>This number can be tweaked to improve performance. A good number is typically between 10 or 100 acceptors. You must measure to find the best value for your application.</p>
+<div class="listingblock"><div class="title">Specifying a custom number of acceptor processes</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>{<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">ranch:start_listener</font></b>(<font color="#FF6600">tcp_echo</font>,
+ <font color="#FF6600">ranch_tcp</font>, [{<font color="#FF6600">port</font>, <font color="#993399">5555</font>}, {<font color="#FF6600">num_acceptors</font>, <font color="#993399">42</font>}],
+ <font color="#FF6600">echo_protocol</font>, []
+)<font color="#990000">.</font></tt></pre>
+</div></div>
+<h2 id="_when_running_out_of_file_descriptors">When running out of file descriptors</h2>
+<p>Operating systems have limits on the number of sockets which can be opened by applications. When this maximum is reached the listener can no longer accept new connections. The accept rate of the listener will be automatically reduced, and a warning message will be logged.</p>
+<div class="listingblock"><div class="content"><pre>=ERROR REPORT==== 13-Jan-2016::12:24:38 ===
+Ranch acceptor reducing accept rate: out of file descriptors</pre></div></div>
+<p>If you notice messages like this you should increase the number of file-descriptors which can be opened by your application. How this should be done is operating-system dependent. Please consult the documentation of your operating system.</p>
+<h2 id="_using_a_supervisor_for_connection_processes">Using a supervisor for connection processes</h2>
+<p>Ranch allows you to define the type of process that will be used for the connection processes. By default it expects a <code>worker</code>. When the <code>connection_type</code> configuration value is set to <code>supervisor</code>, Ranch will consider that the connection process it manages is a supervisor and will reflect that in its supervision tree.</p>
+<p>Connection processes of type <code>supervisor</code> can either handle the socket directly or through one of their children. In the latter case the start function for the connection process must return two pids: the pid of the supervisor you created (that will be supervised) and the pid of the protocol handling process (that will receive the socket).</p>
+<p>Instead of returning <code>{ok, ConnPid}</code>, simply return <code>{ok, SupPid, ConnPid}</code>.</p>
+<p>It is very important that the connection process be created under the supervisor process so that everything works as intended. If not, you will most likely experience issues when the supervised process is stopped.</p>
+<h2 id="_upgrading">Upgrading</h2>
+<p>Ranch allows you to upgrade the protocol options. This takes effect immediately and for all subsequent connections.</p>
+<p>To upgrade the protocol options, call <code>ranch:set_protocol_options/2</code> with the name of the listener as first argument and the new options as the second.</p>
+<div class="listingblock"><div class="title">Upgrading the protocol options</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><b><font color="#000000">ranch:set_protocol_options</font></b>(<font color="#FF6600">tcp_echo</font>, <font color="#009900">NewOpts</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>All future connections will use the new options.</p>
+<p>You can also retrieve the current options similarly by calling <code>ranch:get_protocol_options/1</code>.</p>
+<div class="listingblock"><div class="title">Retrieving the current protocol options</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><font color="#009900">Opts</font> <font color="#990000">=</font> <b><font color="#000000">ranch:get_protocol_options</font></b>(<font color="#FF6600">tcp_echo</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<h2 id="_obtaining_information_about_listeners">Obtaining information about listeners</h2>
+<p>Ranch provides two functions for retrieving information about the listeners, for reporting and diagnostic purposes.</p>
+<p>The <code>ranch:info/0</code> function will return detailed information about all listeners.</p>
+<div class="listingblock"><div class="title">Retrieving detailed information</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><b><font color="#000000">ranch:info</font></b>()<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>The <code>ranch:procs/2</code> function will return all acceptor or listener processes for a given listener.</p>
+<div class="listingblock"><div class="title">Get all acceptor processes</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><b><font color="#000000">ranch:procs</font></b>(<font color="#FF6600">tcp_echo</font>, <font color="#FF6600">acceptors</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Get all connection processes</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><b><font color="#000000">ranch:procs</font></b>(<font color="#FF6600">tcp_echo</font>, <font color="#FF6600">connections</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+
+
+
+
+
+
+
+
+
+
+
+ <nav style="margin:1em 0">
+
+ <a style="float:left" href="https://ninenines.eu/docs/en/ranch/1.5/guide/introduction/">
+ Introduction
+ </a>
+
+
+
+ <a style="float:right" href="https://ninenines.eu/docs/en/ranch/1.5/guide/transports/">
+ Transports
+ </a>
+
+ </nav>
+
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Ranch
+ 1.5
+
+ User Guide
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/1.5/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/1.5/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/1.5/guide">1.5</a></li>
+
+ <li><a href="/docs/en/ranch/1.4/guide">1.4</a></li>
+
+ <li><a href="/docs/en/ranch/1.3/guide">1.3</a></li>
+
+ <li><a href="/docs/en/ranch/1.2/guide">1.2</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-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/1.5/guide/parsers.asciidoc b/docs/en/ranch/1.5/guide/parsers.asciidoc
new file mode 100644
index 00000000..9eacbfa9
--- /dev/null
+++ b/docs/en/ranch/1.5/guide/parsers.asciidoc
@@ -0,0 +1,92 @@
+== Writing parsers
+
+There are three kinds of protocols:
+
+* Text protocols
+* Schema-less binary protocols
+* Schema-based binary protocols
+
+This chapter introduces the first two kinds. It will not cover
+more advanced topics such as continuations or parser generators.
+
+This chapter isn't specifically about Ranch, we assume here that
+you know how to read data from the socket. The data you read and
+the data that hasn't been parsed is saved in a buffer. Every
+time you read from the socket, the data read is appended to the
+buffer. What happens next depends on the kind of protocol. We
+will only cover the first two.
+
+=== Parsing text
+
+Text protocols are generally line based. This means that we can't
+do anything with them until we receive the full line.
+
+A simple way to get a full line is to use `binary:split/{2,3}`.
+
+.Using binary:split/2 to get a line of input
+
+[source,erlang]
+case binary:split(Buffer, <<"\n">>) of
+ [_] ->
+ get_more_data(Buffer);
+ [Line, Rest] ->
+ handle_line(Line, Rest)
+end.
+
+In the above example, we can have two results. Either there was
+a line break in the buffer and we get it split into two parts,
+the line and the rest of the buffer; or there was no line break
+in the buffer and we need to get more data from the socket.
+
+Next, we need to parse the line. The simplest way is to again
+split, here on space. The difference is that we want to split
+on all spaces character, as we want to tokenize the whole string.
+
+.Using binary:split/3 to split text
+
+[source,erlang]
+case binary:split(Line, <<" ">>, [global]) of
+ [<<"HELLO">>] ->
+ be_polite();
+ [<<"AUTH">>, User, Password] ->
+ authenticate_user(User, Password);
+ [<<"QUIT">>, Reason] ->
+ quit(Reason)
+ %% ...
+end.
+
+Pretty simple, right? Match on the command name, get the rest
+of the tokens in variables and call the respective functions.
+
+After doing this, you will want to check if there is another
+line in the buffer, and handle it immediately if any.
+Otherwise wait for more data.
+
+=== Parsing binary
+
+Binary protocols can be more varied, although most of them are
+pretty similar. The first four bytes of a frame tend to be
+the size of the frame, which is followed by a certain number
+of bytes for the type of frame and then various parameters.
+
+Sometimes the size of the frame includes the first four bytes,
+sometimes not. Other times this size is encoded over two bytes.
+And even other times little-endian is used instead of big-endian.
+
+The general idea stays the same though.
+
+.Using binary pattern matching to split frames
+
+[source,erlang]
+<< Size:32, _/bits >> = Buffer,
+case Buffer of
+ << Frame:Size/binary, Rest/bits >> ->
+ handle_frame(Frame, Rest);
+ _ ->
+ get_more_data(Buffer)
+end.
+
+You will then need to parse this frame using binary pattern
+matching, and handle it. Then you will want to check if there
+is another frame fully received in the buffer, and handle it
+immediately if any. Otherwise wait for more data.
diff --git a/docs/en/ranch/1.5/guide/parsers/index.html b/docs/en/ranch/1.5/guide/parsers/index.html
new file mode 100644
index 00000000..b52a430f
--- /dev/null
+++ b/docs/en/ranch/1.5/guide/parsers/index.html
@@ -0,0 +1,223 @@
+<!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">
+
+ <title>Nine Nines: Writing parsers</title>
+
+ <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+ <link href="/css/99s.css?r=1" 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="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>Writing parsers</span></h1>
+
+<p>There are three kinds of protocols:</p>
+<ul><li>Text protocols
+</li>
+<li>Schema-less binary protocols
+</li>
+<li>Schema-based binary protocols
+</li>
+</ul>
+<p>This chapter introduces the first two kinds. It will not cover more advanced topics such as continuations or parser generators.</p>
+<p>This chapter isn&apos;t specifically about Ranch, we assume here that you know how to read data from the socket. The data you read and the data that hasn&apos;t been parsed is saved in a buffer. Every time you read from the socket, the data read is appended to the buffer. What happens next depends on the kind of protocol. We will only cover the first two.</p>
+<h2 id="_parsing_text">Parsing text</h2>
+<p>Text protocols are generally line based. This means that we can&apos;t do anything with them until we receive the full line.</p>
+<p>A simple way to get a full line is to use <code>binary:split/{2,3}</code>.</p>
+<div class="listingblock"><div class="title">Using binary:split/2 to get a line of input</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><b><font color="#0000FF">case</font></b> <b><font color="#000000">binary:split</font></b>(<font color="#009900">Buffer</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"\n"</font><font color="#990000">&gt;&gt;</font>) <b><font color="#0000FF">of</font></b>
+ [<font color="#990000">_</font>] <font color="#990000">-&gt;</font>
+ <b><font color="#000000">get_more_data</font></b>(<font color="#009900">Buffer</font>);
+ [<font color="#009900">Line</font>, <font color="#009900">Rest</font>] <font color="#990000">-&gt;</font>
+ <b><font color="#000000">handle_line</font></b>(<font color="#009900">Line</font>, <font color="#009900">Rest</font>)
+<b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>In the above example, we can have two results. Either there was a line break in the buffer and we get it split into two parts, the line and the rest of the buffer; or there was no line break in the buffer and we need to get more data from the socket.</p>
+<p>Next, we need to parse the line. The simplest way is to again split, here on space. The difference is that we want to split on all spaces character, as we want to tokenize the whole string.</p>
+<div class="listingblock"><div class="title">Using binary:split/3 to split text</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><b><font color="#0000FF">case</font></b> <b><font color="#000000">binary:split</font></b>(<font color="#009900">Line</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">" "</font><font color="#990000">&gt;&gt;</font>, [<font color="#FF6600">global</font>]) <b><font color="#0000FF">of</font></b>
+ [<font color="#990000">&lt;&lt;</font><font color="#FF0000">"HELLO"</font><font color="#990000">&gt;&gt;</font>] <font color="#990000">-&gt;</font>
+ <b><font color="#000000">be_polite</font></b>();
+ [<font color="#990000">&lt;&lt;</font><font color="#FF0000">"AUTH"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">User</font>, <font color="#009900">Password</font>] <font color="#990000">-&gt;</font>
+ <b><font color="#000000">authenticate_user</font></b>(<font color="#009900">User</font>, <font color="#009900">Password</font>);
+ [<font color="#990000">&lt;&lt;</font><font color="#FF0000">"QUIT"</font><font color="#990000">&gt;&gt;</font>, <font color="#009900">Reason</font>] <font color="#990000">-&gt;</font>
+ <b><font color="#000000">quit</font></b>(<font color="#009900">Reason</font>)
+ <i><font color="#9A1900">%% ...</font></i>
+<b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Pretty simple, right? Match on the command name, get the rest of the tokens in variables and call the respective functions.</p>
+<p>After doing this, you will want to check if there is another line in the buffer, and handle it immediately if any. Otherwise wait for more data.</p>
+<h2 id="_parsing_binary">Parsing binary</h2>
+<p>Binary protocols can be more varied, although most of them are pretty similar. The first four bytes of a frame tend to be the size of the frame, which is followed by a certain number of bytes for the type of frame and then various parameters.</p>
+<p>Sometimes the size of the frame includes the first four bytes, sometimes not. Other times this size is encoded over two bytes. And even other times little-endian is used instead of big-endian.</p>
+<p>The general idea stays the same though.</p>
+<div class="listingblock"><div class="title">Using binary pattern matching to split frames</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><font color="#990000">&lt;&lt;</font> <font color="#009900">Size</font><font color="#990000">:</font><font color="#993399">32</font>, <font color="#990000">_/</font><font color="#FF6600">bits</font> <font color="#990000">&gt;&gt;</font> <font color="#990000">=</font> <font color="#009900">Buffer</font>,
+<b><font color="#0000FF">case</font></b> <font color="#009900">Buffer</font> <b><font color="#0000FF">of</font></b>
+ <font color="#990000">&lt;&lt;</font> <font color="#009900">Frame</font><font color="#990000">:</font><font color="#009900">Size</font><font color="#990000">/</font><b><font color="#000080">binary</font></b>, <font color="#009900">Rest</font><font color="#990000">/</font><font color="#FF6600">bits</font> <font color="#990000">&gt;&gt;</font> <font color="#990000">-&gt;</font>
+ <b><font color="#000000">handle_frame</font></b>(<font color="#009900">Frame</font>, <font color="#009900">Rest</font>);
+ <font color="#990000">_</font> <font color="#990000">-&gt;</font>
+ <b><font color="#000000">get_more_data</font></b>(<font color="#009900">Buffer</font>)
+<b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>You will then need to parse this frame using binary pattern matching, and handle it. Then you will want to check if there is another frame fully received in the buffer, and handle it immediately if any. Otherwise wait for more data.</p>
+
+
+
+
+
+
+
+
+
+
+
+ <nav style="margin:1em 0">
+
+ <a style="float:left" href="https://ninenines.eu/docs/en/ranch/1.5/guide/embedded/">
+ Embedded mode
+ </a>
+
+
+
+ <a style="float:right" href="https://ninenines.eu/docs/en/ranch/1.5/guide/ssl_auth/">
+ SSL client authentication
+ </a>
+
+ </nav>
+
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Ranch
+ 1.5
+
+ User Guide
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/1.5/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/1.5/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/1.5/guide">1.5</a></li>
+
+ <li><a href="/docs/en/ranch/1.4/guide">1.4</a></li>
+
+ <li><a href="/docs/en/ranch/1.3/guide">1.3</a></li>
+
+ <li><a href="/docs/en/ranch/1.2/guide">1.2</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-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/1.5/guide/protocols.asciidoc b/docs/en/ranch/1.5/guide/protocols.asciidoc
new file mode 100644
index 00000000..b9a31f27
--- /dev/null
+++ b/docs/en/ranch/1.5/guide/protocols.asciidoc
@@ -0,0 +1,99 @@
+== Protocols
+
+A protocol handler starts a connection process and defines the
+protocol logic executed in this process.
+
+=== Writing a protocol handler
+
+All protocol handlers must implement the `ranch_protocol` behavior
+which defines a single callback, `start_link/4`. This callback is
+responsible for spawning a new process for handling the connection.
+It receives four arguments: the name of the listener, the socket, the
+transport handler being used and the protocol options defined in
+the call to `ranch:start_listener/5`. This callback must
+return `{ok, Pid}`, with `Pid` the pid of the new process.
+
+The newly started process can then freely initialize itself. However,
+it must call `ranch:accept_ack/1` before doing any socket operation.
+This will ensure the connection process is the owner of the socket.
+It expects the listener's name as argument.
+
+.Acknowledge accepting the socket
+
+[source,erlang]
+ok = ranch:accept_ack(Ref).
+
+If your protocol code requires specific socket options, you should
+set them while initializing your connection process, after
+calling `ranch:accept_ack/1`. You can use `Transport:setopts/2`
+for that purpose.
+
+Following is the complete protocol code for the example found
+in `examples/tcp_echo/`.
+
+.Protocol module that echoes everything it receives
+
+[source,erlang]
+----
+-module(echo_protocol).
+-behaviour(ranch_protocol).
+
+-export([start_link/4]).
+-export([init/4]).
+
+start_link(Ref, Socket, Transport, Opts) ->
+ Pid = spawn_link(?MODULE, init, [Ref, Socket, Transport, Opts]),
+ {ok, Pid}.
+
+init(Ref, Socket, Transport, _Opts = []) ->
+ ok = ranch:accept_ack(Ref),
+ loop(Socket, Transport).
+
+loop(Socket, Transport) ->
+ case Transport:recv(Socket, 0, 5000) of
+ {ok, Data} ->
+ Transport:send(Socket, Data),
+ loop(Socket, Transport);
+ _ ->
+ ok = Transport:close(Socket)
+ end.
+----
+
+=== Using gen_server
+
+Special processes like the ones that use the `gen_server` or `gen_fsm`
+behaviours have the particularity of having their `start_link` call not
+return until the `init` function returns. This is problematic, because
+you won't be able to call `ranch:accept_ack/1` from the `init` callback
+as this would cause a deadlock to happen.
+
+Use the `gen_server:enter_loop/3` function. It allows you to start your process
+normally (although it must be started with `proc_lib` like all special
+processes), then perform any needed operations before falling back into
+the normal `gen_server` execution loop.
+
+.Use a gen_server for protocol handling
+
+[source,erlang]
+----
+-module(my_protocol).
+-behaviour(gen_server).
+-behaviour(ranch_protocol).
+
+-export([start_link/4]).
+-export([init/1]).
+%% Exports of other gen_server callbacks here.
+
+start_link(Ref, Socket, Transport, Opts) ->
+ {ok, proc_lib:spawn_link(?MODULE, init, [{Ref, Socket, Transport, Opts}])}.
+
+init({Ref, Socket, Transport, _Opts = []}) ->
+ %% Perform any required state initialization here.
+ ok = ranch:accept_ack(Ref),
+ ok = Transport:setopts(Socket, [{active, once}]),
+ gen_server:enter_loop(?MODULE, [], {state, Socket, Transport}).
+
+%% Other gen_server callbacks here.
+----
+
+Check the `tcp_reverse` example for a complete example.
diff --git a/docs/en/ranch/1.5/guide/protocols/index.html b/docs/en/ranch/1.5/guide/protocols/index.html
new file mode 100644
index 00000000..4f8c6a29
--- /dev/null
+++ b/docs/en/ranch/1.5/guide/protocols/index.html
@@ -0,0 +1,230 @@
+<!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">
+
+ <title>Nine Nines: Protocols</title>
+
+ <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+ <link href="/css/99s.css?r=1" 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="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>Protocols</span></h1>
+
+<p>A protocol handler starts a connection process and defines the protocol logic executed in this process.</p>
+<h2 id="_writing_a_protocol_handler">Writing a protocol handler</h2>
+<p>All protocol handlers must implement the <code>ranch_protocol</code> behavior which defines a single callback, <code>start_link/4</code>. This callback is responsible for spawning a new process for handling the connection. It receives four arguments: the name of the listener, the socket, the transport handler being used and the protocol options defined in the call to <code>ranch:start_listener/5</code>. This callback must return <code>{ok, Pid}</code>, with <code>Pid</code> the pid of the new process.</p>
+<p>The newly started process can then freely initialize itself. However, it must call <code>ranch:accept_ack/1</code> before doing any socket operation. This will ensure the connection process is the owner of the socket. It expects the listener&apos;s name as argument.</p>
+<div class="listingblock"><div class="title">Acknowledge accepting the socket</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><font color="#0000FF">ok</font> <font color="#990000">=</font> <b><font color="#000000">ranch:accept_ack</font></b>(<font color="#009900">Ref</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>If your protocol code requires specific socket options, you should set them while initializing your connection process, after calling <code>ranch:accept_ack/1</code>. You can use <code>Transport:setopts/2</code> for that purpose.</p>
+<p>Following is the complete protocol code for the example found in <code>examples/tcp_echo/</code>.</p>
+<div class="listingblock"><div class="title">Protocol module that echoes everything it receives</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><b><font color="#000080">-module</font></b>(<font color="#FF6600">echo_protocol</font>)<font color="#990000">.</font>
+<b><font color="#000080">-behaviour</font></b>(<font color="#FF6600">ranch_protocol</font>)<font color="#990000">.</font>
+
+<b><font color="#000080">-export</font></b>([<b><font color="#000000">start_link</font></b><font color="#990000">/</font><font color="#993399">4</font>])<font color="#990000">.</font>
+<b><font color="#000080">-export</font></b>([<b><font color="#000000">init</font></b><font color="#990000">/</font><font color="#993399">4</font>])<font color="#990000">.</font>
+
+<b><font color="#000000">start_link</font></b>(<font color="#009900">Ref</font>, <font color="#009900">Socket</font>, <font color="#009900">Transport</font>, <font color="#009900">Opts</font>) <font color="#990000">-&gt;</font>
+ <font color="#009900">Pid</font> <font color="#990000">=</font> <b><font color="#000080">spawn_link</font></b>(<b><font color="#000080">?MODULE</font></b>, <font color="#FF6600">init</font>, [<font color="#009900">Ref</font>, <font color="#009900">Socket</font>, <font color="#009900">Transport</font>, <font color="#009900">Opts</font>]),
+ {<font color="#FF6600">ok</font>, <font color="#009900">Pid</font>}<font color="#990000">.</font>
+
+<b><font color="#000000">init</font></b>(<font color="#009900">Ref</font>, <font color="#009900">Socket</font>, <font color="#009900">Transport</font>, <font color="#009900">_Opts</font> <font color="#990000">=</font> []) <font color="#990000">-&gt;</font>
+ <font color="#0000FF">ok</font> <font color="#990000">=</font> <b><font color="#000000">ranch:accept_ack</font></b>(<font color="#009900">Ref</font>),
+ <b><font color="#000000">loop</font></b>(<font color="#009900">Socket</font>, <font color="#009900">Transport</font>)<font color="#990000">.</font>
+
+<b><font color="#000000">loop</font></b>(<font color="#009900">Socket</font>, <font color="#009900">Transport</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">case</font></b> <font color="#009900">Transport</font><font color="#990000">:</font><b><font color="#000000">recv</font></b>(<font color="#009900">Socket</font>, <font color="#993399">0</font>, <font color="#993399">5000</font>) <b><font color="#0000FF">of</font></b>
+ {<font color="#FF6600">ok</font>, <font color="#009900">Data</font>} <font color="#990000">-&gt;</font>
+ <font color="#009900">Transport</font><font color="#990000">:</font><b><font color="#000000">send</font></b>(<font color="#009900">Socket</font>, <font color="#009900">Data</font>),
+ <b><font color="#000000">loop</font></b>(<font color="#009900">Socket</font>, <font color="#009900">Transport</font>);
+ <font color="#990000">_</font> <font color="#990000">-&gt;</font>
+ <font color="#0000FF">ok</font> <font color="#990000">=</font> <font color="#009900">Transport</font><font color="#990000">:</font><b><font color="#000000">close</font></b>(<font color="#009900">Socket</font>)
+ <b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
+<h2 id="_using_gen_server">Using gen_server</h2>
+<p>Special processes like the ones that use the <code>gen_server</code> or <code>gen_fsm</code> behaviours have the particularity of having their <code>start_link</code> call not return until the <code>init</code> function returns. This is problematic, because you won&apos;t be able to call <code>ranch:accept_ack/1</code> from the <code>init</code> callback as this would cause a deadlock to happen.</p>
+<p>Use the <code>gen_server:enter_loop/3</code> function. It allows you to start your process normally (although it must be started with <code>proc_lib</code> like all special processes), then perform any needed operations before falling back into the normal <code>gen_server</code> execution loop.</p>
+<div class="listingblock"><div class="title">Use a gen_server for protocol handling</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><b><font color="#000080">-module</font></b>(<font color="#FF6600">my_protocol</font>)<font color="#990000">.</font>
+<b><font color="#000080">-behaviour</font></b>(<font color="#FF6600">gen_server</font>)<font color="#990000">.</font>
+<b><font color="#000080">-behaviour</font></b>(<font color="#FF6600">ranch_protocol</font>)<font color="#990000">.</font>
+
+<b><font color="#000080">-export</font></b>([<b><font color="#000000">start_link</font></b><font color="#990000">/</font><font color="#993399">4</font>])<font color="#990000">.</font>
+<b><font color="#000080">-export</font></b>([<b><font color="#000000">init</font></b><font color="#990000">/</font><font color="#993399">1</font>])<font color="#990000">.</font>
+<i><font color="#9A1900">%% Exports of other gen_server callbacks here.</font></i>
+
+<b><font color="#000000">start_link</font></b>(<font color="#009900">Ref</font>, <font color="#009900">Socket</font>, <font color="#009900">Transport</font>, <font color="#009900">Opts</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <b><font color="#000000">proc_lib:spawn_link</font></b>(<b><font color="#000080">?MODULE</font></b>, <font color="#FF6600">init</font>, [{<font color="#009900">Ref</font>, <font color="#009900">Socket</font>, <font color="#009900">Transport</font>, <font color="#009900">Opts</font>}])}<font color="#990000">.</font>
+
+<b><font color="#000000">init</font></b>({<font color="#009900">Ref</font>, <font color="#009900">Socket</font>, <font color="#009900">Transport</font>, <font color="#009900">_Opts</font> <font color="#990000">=</font> []}) <font color="#990000">-&gt;</font>
+ <i><font color="#9A1900">%% Perform any required state initialization here.</font></i>
+ <font color="#0000FF">ok</font> <font color="#990000">=</font> <b><font color="#000000">ranch:accept_ack</font></b>(<font color="#009900">Ref</font>),
+ <font color="#0000FF">ok</font> <font color="#990000">=</font> <font color="#009900">Transport</font><font color="#990000">:</font><b><font color="#000000">setopts</font></b>(<font color="#009900">Socket</font>, [{<font color="#FF6600">active</font>, <font color="#FF6600">once</font>}]),
+ <b><font color="#000000">gen_server:enter_loop</font></b>(<b><font color="#000080">?MODULE</font></b>, [], {<font color="#FF6600">state</font>, <font color="#009900">Socket</font>, <font color="#009900">Transport</font>})<font color="#990000">.</font>
+
+<i><font color="#9A1900">%% Other gen_server callbacks here.</font></i></tt></pre>
+</div></div>
+<p>Check the <code>tcp_reverse</code> example for a complete example.</p>
+
+
+
+
+
+
+
+
+
+
+
+ <nav style="margin:1em 0">
+
+ <a style="float:left" href="https://ninenines.eu/docs/en/ranch/1.5/guide/transports/">
+ Transports
+ </a>
+
+
+
+ <a style="float:right" href="https://ninenines.eu/docs/en/ranch/1.5/guide/embedded/">
+ Embedded mode
+ </a>
+
+ </nav>
+
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Ranch
+ 1.5
+
+ User Guide
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/1.5/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/1.5/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/1.5/guide">1.5</a></li>
+
+ <li><a href="/docs/en/ranch/1.4/guide">1.4</a></li>
+
+ <li><a href="/docs/en/ranch/1.3/guide">1.3</a></li>
+
+ <li><a href="/docs/en/ranch/1.2/guide">1.2</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-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/1.5/guide/ssl_auth.asciidoc b/docs/en/ranch/1.5/guide/ssl_auth.asciidoc
new file mode 100644
index 00000000..de16107a
--- /dev/null
+++ b/docs/en/ranch/1.5/guide/ssl_auth.asciidoc
@@ -0,0 +1,120 @@
+== SSL client authentication
+
+=== Purpose
+
+SSL client authentication is a mechanism allowing applications to
+identify certificates. This allows your application to make sure that
+the client is an authorized certificate, but makes no claim about
+whether the user can be trusted. This can be combined with a password
+based authentication to attain greater security.
+
+The server only needs to retain the certificate serial number and
+the certificate issuer to authenticate the certificate. Together,
+they can be used to uniquely identify a certicate.
+
+As Ranch allows the same protocol code to be used for both SSL and
+non-SSL transports, you need to make sure you are in an SSL context
+before attempting to perform an SSL client authentication. This
+can be done by checking the return value of `Transport:name/0`.
+
+=== Obtaining client certificates
+
+You can obtain client certificates from various sources. You can
+generate them yourself, or you can use a service like CAcert.org
+which allows you to generate client and server certificates for
+free.
+
+Following are the steps you need to take to create a CAcert.org
+account, generate a certificate and install it in your favorite
+browser.
+
+* Open http://cacert.org in your favorite browser
+* Root Certificate link: install both certificates
+* Join (Register an account)
+* Verify your account (check your email inbox!)
+* Log in
+* Client Certificates: New
+* Follow instructions to create the certificate
+* Install the certificate in your browser
+
+You can optionally save the certificate for later use, for example
+to extract the `IssuerID` information as will be detailed later on.
+
+=== Transport configuration
+
+The SSL transport does not request a client certificate by default.
+You need to specify the `{verify, verify_peer}` option when starting
+the listener to enable this behavior.
+
+.Configure a listener for SSL authentication
+
+[source,erlang]
+{ok, _} = ranch:start_listener(my_ssl,
+ ranch_ssl, [
+ {port, SSLPort},
+ {certfile, PathToCertfile},
+ {cacertfile, PathToCACertfile},
+ {verify, verify_peer}
+ ],
+ my_protocol, []
+).
+
+In this example we set the required `port` and `certfile`, but also
+the `cacertfile` containing the CACert.org root certificate, and
+the option to request the client certificate.
+
+If you enable the `{verify, verify_peer}` option and the client does
+not have a client certificate configured for your domain, then no
+certificate will be sent. This allows you to use SSL for more than
+just authenticated clients.
+
+=== Authentication
+
+To authenticate users, you must first save the certificate information
+required. If you have your users' certificate files, you can simply
+load the certificate and retrieve the information directly.
+
+.Retrieve the issuer ID from a certificate
+
+[source,erlang]
+----
+certfile_to_issuer_id(Filename) ->
+ {ok, Data} = file:read_file(Filename),
+ [{'Certificate', Cert, not_encrypted}] = public_key:pem_decode(Data),
+ {ok, IssuerID} = public_key:pkix_issuer_id(Cert, self),
+ IssuerID.
+----
+
+The `IssuerID` variable contains both the certificate serial number
+and the certificate issuer stored in a tuple, so this value alone can
+be used to uniquely identify the user certificate. You can save this
+value in a database, a configuration file or any other place where an
+Erlang term can be stored and retrieved.
+
+To retrieve the `IssuerID` from a running connection, you need to first
+retrieve the client certificate and then extract this information from
+it. Ranch does not provide a function to retrieve the client certificate.
+Instead you can use the `ssl:peercert/1` function. Once you have the
+certificate, you can again use the `public_key:pkix_issuer_id/2` to
+extract the `IssuerID` value.
+
+The following function returns the `IssuerID` or `false` if no client
+certificate was found. This snippet is intended to be used from your
+protocol code.
+
+.Retrieve the issuer ID from the certificate for the current connection
+
+[source,erlang]
+----
+socket_to_issuer_id(Socket) ->
+ case ssl:peercert(Socket) of
+ {error, no_peercert} ->
+ false;
+ {ok, Cert} ->
+ {ok, IssuerID} = public_key:pkix_issuer_id(Cert, self),
+ IssuerID
+ end.
+----
+
+You then only need to match the `IssuerID` value to authenticate the
+user.
diff --git a/docs/en/ranch/1.5/guide/ssl_auth/index.html b/docs/en/ranch/1.5/guide/ssl_auth/index.html
new file mode 100644
index 00000000..d1103fd8
--- /dev/null
+++ b/docs/en/ranch/1.5/guide/ssl_auth/index.html
@@ -0,0 +1,236 @@
+<!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">
+
+ <title>Nine Nines: SSL client authentication</title>
+
+ <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+ <link href="/css/99s.css?r=1" 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="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>SSL client authentication</span></h1>
+
+<h2 id="_purpose">Purpose</h2>
+<p>SSL client authentication is a mechanism allowing applications to identify certificates. This allows your application to make sure that the client is an authorized certificate, but makes no claim about whether the user can be trusted. This can be combined with a password based authentication to attain greater security.</p>
+<p>The server only needs to retain the certificate serial number and the certificate issuer to authenticate the certificate. Together, they can be used to uniquely identify a certicate.</p>
+<p>As Ranch allows the same protocol code to be used for both SSL and non-SSL transports, you need to make sure you are in an SSL context before attempting to perform an SSL client authentication. This can be done by checking the return value of <code>Transport:name/0</code>.</p>
+<h2 id="_obtaining_client_certificates">Obtaining client certificates</h2>
+<p>You can obtain client certificates from various sources. You can generate them yourself, or you can use a service like CAcert.org which allows you to generate client and server certificates for free.</p>
+<p>Following are the steps you need to take to create a CAcert.org account, generate a certificate and install it in your favorite browser.</p>
+<ul><li>Open <a href="http://cacert.org">http://cacert.org</a> in your favorite browser
+</li>
+<li>Root Certificate link: install both certificates
+</li>
+<li>Join (Register an account)
+</li>
+<li>Verify your account (check your email inbox!)
+</li>
+<li>Log in
+</li>
+<li>Client Certificates: New
+</li>
+<li>Follow instructions to create the certificate
+</li>
+<li>Install the certificate in your browser
+</li>
+</ul>
+<p>You can optionally save the certificate for later use, for example to extract the <code>IssuerID</code> information as will be detailed later on.</p>
+<h2 id="_transport_configuration">Transport configuration</h2>
+<p>The SSL transport does not request a client certificate by default. You need to specify the <code>{verify, verify_peer}</code> option when starting the listener to enable this behavior.</p>
+<div class="listingblock"><div class="title">Configure a listener for SSL authentication</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>{<font color="#FF6600">ok</font>, <font color="#990000">_</font>} <font color="#990000">=</font> <b><font color="#000000">ranch:start_listener</font></b>(<font color="#FF6600">my_ssl</font>,
+ <font color="#FF6600">ranch_ssl</font>, [
+ {<font color="#FF6600">port</font>, <font color="#009900">SSLPort</font>},
+ {<font color="#FF6600">certfile</font>, <font color="#009900">PathToCertfile</font>},
+ {<font color="#FF6600">cacertfile</font>, <font color="#009900">PathToCACertfile</font>},
+ {<font color="#FF6600">verify</font>, <font color="#FF6600">verify_peer</font>}
+ ],
+ <font color="#FF6600">my_protocol</font>, []
+)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>In this example we set the required <code>port</code> and <code>certfile</code>, but also the <code>cacertfile</code> containing the CACert.org root certificate, and the option to request the client certificate.</p>
+<p>If you enable the <code>{verify, verify_peer}</code> option and the client does not have a client certificate configured for your domain, then no certificate will be sent. This allows you to use SSL for more than just authenticated clients.</p>
+<h2 id="_authentication">Authentication</h2>
+<p>To authenticate users, you must first save the certificate information required. If you have your users&apos; certificate files, you can simply load the certificate and retrieve the information directly.</p>
+<div class="listingblock"><div class="title">Retrieve the issuer ID from a certificate</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><b><font color="#000000">certfile_to_issuer_id</font></b>(<font color="#009900">Filename</font>) <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <font color="#009900">Data</font>} <font color="#990000">=</font> <b><font color="#000000">file:read_file</font></b>(<font color="#009900">Filename</font>),
+ [{<font color="#FF6600">'Certificate'</font>, <font color="#009900">Cert</font>, <font color="#FF6600">not_encrypted</font>}] <font color="#990000">=</font> <b><font color="#000000">public_key:pem_decode</font></b>(<font color="#009900">Data</font>),
+ {<font color="#FF6600">ok</font>, <font color="#009900">IssuerID</font>} <font color="#990000">=</font> <b><font color="#000000">public_key:pkix_issuer_id</font></b>(<font color="#009900">Cert</font>, <b><font color="#000080">self</font></b>),
+ <font color="#009900">IssuerID</font><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>The <code>IssuerID</code> variable contains both the certificate serial number and the certificate issuer stored in a tuple, so this value alone can be used to uniquely identify the user certificate. You can save this value in a database, a configuration file or any other place where an Erlang term can be stored and retrieved.</p>
+<p>To retrieve the <code>IssuerID</code> from a running connection, you need to first retrieve the client certificate and then extract this information from it. Ranch does not provide a function to retrieve the client certificate. Instead you can use the <code>ssl:peercert/1</code> function. Once you have the certificate, you can again use the <code>public_key:pkix_issuer_id/2</code> to extract the <code>IssuerID</code> value.</p>
+<p>The following function returns the <code>IssuerID</code> or <code>false</code> if no client certificate was found. This snippet is intended to be used from your protocol code.</p>
+<div class="listingblock"><div class="title">Retrieve the issuer ID from the certificate for the current connection</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><b><font color="#000000">socket_to_issuer_id</font></b>(<font color="#009900">Socket</font>) <font color="#990000">-&gt;</font>
+ <b><font color="#0000FF">case</font></b> <b><font color="#000000">ssl:peercert</font></b>(<font color="#009900">Socket</font>) <b><font color="#0000FF">of</font></b>
+ {<font color="#FF6600">error</font>, <font color="#FF6600">no_peercert</font>} <font color="#990000">-&gt;</font>
+ <font color="#000080">false</font>;
+ {<font color="#FF6600">ok</font>, <font color="#009900">Cert</font>} <font color="#990000">-&gt;</font>
+ {<font color="#FF6600">ok</font>, <font color="#009900">IssuerID</font>} <font color="#990000">=</font> <b><font color="#000000">public_key:pkix_issuer_id</font></b>(<font color="#009900">Cert</font>, <b><font color="#000080">self</font></b>),
+ <font color="#009900">IssuerID</font>
+ <b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>You then only need to match the <code>IssuerID</code> value to authenticate the user.</p>
+
+
+
+
+
+
+
+
+
+
+
+ <nav style="margin:1em 0">
+
+ <a style="float:left" href="https://ninenines.eu/docs/en/ranch/1.5/guide/parsers/">
+ Writing parsers
+ </a>
+
+
+
+ <a style="float:right" href="https://ninenines.eu/docs/en/ranch/1.5/guide/internals/">
+ Internals
+ </a>
+
+ </nav>
+
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Ranch
+ 1.5
+
+ User Guide
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/1.5/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/1.5/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/1.5/guide">1.5</a></li>
+
+ <li><a href="/docs/en/ranch/1.4/guide">1.4</a></li>
+
+ <li><a href="/docs/en/ranch/1.3/guide">1.3</a></li>
+
+ <li><a href="/docs/en/ranch/1.2/guide">1.2</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-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/1.5/guide/transports.asciidoc b/docs/en/ranch/1.5/guide/transports.asciidoc
new file mode 100644
index 00000000..f5bb17eb
--- /dev/null
+++ b/docs/en/ranch/1.5/guide/transports.asciidoc
@@ -0,0 +1,161 @@
+== Transports
+
+A transport defines the interface to interact with a socket.
+
+Transports can be used for connecting, listening and accepting
+connections, but also for receiving and sending data. Both
+passive and active mode are supported, although all sockets
+are initialized as passive.
+
+=== TCP transport
+
+The TCP transport is a thin wrapper around `gen_tcp`.
+
+=== SSL transport
+
+The SSL transport is a thin wrapper around `ssl`.
+
+Ranch depends on `ssl` by default so any necessary
+dependencies will start when Ranch is started. It is
+possible to remove the dependency when the SSL transport
+will not be used. Refer to your release build tool's
+documentation for more information.
+
+When embedding Ranch listeners that have an SSL transport,
+your application must depend on the `ssl` application for
+proper behavior.
+
+=== Sending and receiving data
+
+This section assumes that `Transport` is a valid transport handler
+(like `ranch_tcp` or `ranch_ssl`) and `Socket` is a connected
+socket obtained through the listener.
+
+You can send data to a socket by calling the `Transport:send/2`
+function. The data can be given as `iodata()`, which is defined as
+`binary() | iolist()`. All the following calls will work:
+
+.Sending data to the socket
+
+[source,erlang]
+----
+Transport:send(Socket, <<"Ranch is cool!">>).
+Transport:send(Socket, "Ranch is cool!").
+Transport:send(Socket, ["Ranch", ["is", "cool!"]]).
+Transport:send(Socket, ["Ranch", [<<"is">>, "cool!"]]).
+----
+
+You can receive data either in passive or in active mode. Passive mode
+means that you will perform a blocking `Transport:recv/3` call, while
+active mode means that you will receive the data as a message.
+
+By default, all data will be received as binary. It is possible to
+receive data as strings, although this is not recommended as binaries
+are a more efficient construct, especially for binary protocols.
+
+Receiving data using passive mode requires a single function call. The
+first argument is the socket, and the third argument is a timeout duration
+before the call returns with `{error, timeout}`.
+
+The second argument is the amount of data in bytes that we want to receive.
+The function will wait for data until it has received exactly this amount.
+If you are not expecting a precise size, you can specify 0 which will make
+this call return as soon as data was read, regardless of its size.
+
+.Receiving data from the socket in passive mode
+
+[source,erlang]
+{ok, Data} = Transport:recv(Socket, 0, 5000).
+
+Active mode requires you to inform the socket that you want to receive
+data as a message and to write the code to actually receive it.
+
+There are two kinds of active modes: `{active, once}` and
+`{active, true}`. The first will send a single message before going
+back to passive mode; the second will send messages indefinitely.
+We recommend not using the `{active, true}` mode as it could quickly
+flood your process mailbox. It's better to keep the data in the socket
+and read it only when required.
+
+Three different messages can be received:
+
+* `{OK, Socket, Data}`
+* `{Closed, Socket}`
+* `{Error, Socket, Reason}`
+
+The value of `OK`, `Closed` and `Error` can be different
+depending on the transport being used. To be able to properly match
+on them you must first call the `Transport:messages/0` function.
+
+.Retrieving the transport's active message identifiers
+
+[source,erlang]
+{OK, Closed, Error} = Transport:messages().
+
+To start receiving messages you will need to call the `Transport:setopts/2`
+function, and do so every time you want to receive data.
+
+.Receiving messages from the socket in active mode
+
+[source,erlang]
+----
+{OK, Closed, Error} = Transport:messages(),
+Transport:setopts(Socket, [{active, once}]),
+receive
+ {OK, Socket, Data} ->
+ io:format("data received: ~p~n", [Data]);
+ {Closed, Socket} ->
+ io:format("socket got closed!~n");
+ {Error, Socket, Reason} ->
+ io:format("error happened: ~p~n", [Reason])
+end.
+----
+
+You can easily integrate active sockets with existing Erlang code as all
+you really need is just a few more clauses when receiving messages.
+
+=== Sending files
+
+As in the previous section it is assumed `Transport` is a valid transport
+handler and `Socket` is a connected socket obtained through the listener.
+
+To send a whole file, with name `Filename`, over a socket:
+
+.Sending a file by filename
+
+[source,erlang]
+{ok, SentBytes} = Transport:sendfile(Socket, Filename).
+
+Or part of a file, with `Offset` greater than or equal to 0, `Bytes` number of
+bytes and chunks of size `ChunkSize`:
+
+.Sending part of a file by filename in chunks
+
+[source,erlang]
+Opts = [{chunk_size, ChunkSize}],
+{ok, SentBytes} = Transport:sendfile(Socket, Filename, Offset, Bytes, Opts).
+
+To improve efficiency when sending multiple parts of the same file it is also
+possible to use a file descriptor opened in raw mode:
+
+.Sending a file opened in raw mode
+
+[source,erlang]
+{ok, RawFile} = file:open(Filename, [raw, read, binary]),
+{ok, SentBytes} = Transport:sendfile(Socket, RawFile, Offset, Bytes, Opts).
+
+=== Writing a transport handler
+
+A transport handler is a module implementing the `ranch_transport` behavior.
+It defines a certain number of callbacks that must be written in order to
+allow transparent usage of the transport handler.
+
+The behavior doesn't define the socket options available when opening a
+socket. These do not need to be common to all transports as it's easy enough
+to write different initialization functions for the different transports that
+will be used. With one exception though. The `setopts/2` function *must*
+implement the `{active, once}` and the `{active, true}` options.
+
+If the transport handler doesn't have a native implementation of `sendfile/5` a
+fallback is available, `ranch_transport:sendfile/6`. The extra first argument
+is the transport's module. See `ranch_ssl` for an example.
diff --git a/docs/en/ranch/1.5/guide/transports/index.html b/docs/en/ranch/1.5/guide/transports/index.html
new file mode 100644
index 00000000..6b732dd7
--- /dev/null
+++ b/docs/en/ranch/1.5/guide/transports/index.html
@@ -0,0 +1,261 @@
+<!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">
+
+ <title>Nine Nines: Transports</title>
+
+ <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+ <link href="/css/99s.css?r=1" 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="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>Transports</span></h1>
+
+<p>A transport defines the interface to interact with a socket.</p>
+<p>Transports can be used for connecting, listening and accepting connections, but also for receiving and sending data. Both passive and active mode are supported, although all sockets are initialized as passive.</p>
+<h2 id="_tcp_transport">TCP transport</h2>
+<p>The TCP transport is a thin wrapper around <code>gen_tcp</code>.</p>
+<h2 id="_ssl_transport">SSL transport</h2>
+<p>The SSL transport is a thin wrapper around <code>ssl</code>.</p>
+<p>Ranch depends on <code>ssl</code> by default so any necessary dependencies will start when Ranch is started. It is possible to remove the dependency when the SSL transport will not be used. Refer to your release build tool&apos;s documentation for more information.</p>
+<p>When embedding Ranch listeners that have an SSL transport, your application must depend on the <code>ssl</code> application for proper behavior.</p>
+<h2 id="_sending_and_receiving_data">Sending and receiving data</h2>
+<p>This section assumes that <code>Transport</code> is a valid transport handler (like <code>ranch_tcp</code> or <code>ranch_ssl</code>) and <code>Socket</code> is a connected socket obtained through the listener.</p>
+<p>You can send data to a socket by calling the <code>Transport:send/2</code> function. The data can be given as <code>iodata()</code>, which is defined as <code>binary() | iolist()</code>. All the following calls will work:</p>
+<div class="listingblock"><div class="title">Sending data to the socket</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><font color="#009900">Transport</font><font color="#990000">:</font><b><font color="#000000">send</font></b>(<font color="#009900">Socket</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"Ranch is cool!"</font><font color="#990000">&gt;&gt;</font>)<font color="#990000">.</font>
+<font color="#009900">Transport</font><font color="#990000">:</font><b><font color="#000000">send</font></b>(<font color="#009900">Socket</font>, <font color="#FF0000">"Ranch is cool!"</font>)<font color="#990000">.</font>
+<font color="#009900">Transport</font><font color="#990000">:</font><b><font color="#000000">send</font></b>(<font color="#009900">Socket</font>, [<font color="#FF0000">"Ranch"</font>, [<font color="#FF0000">"is"</font>, <font color="#FF0000">"cool!"</font>]])<font color="#990000">.</font>
+<font color="#009900">Transport</font><font color="#990000">:</font><b><font color="#000000">send</font></b>(<font color="#009900">Socket</font>, [<font color="#FF0000">"Ranch"</font>, [<font color="#990000">&lt;&lt;</font><font color="#FF0000">"is"</font><font color="#990000">&gt;&gt;</font>, <font color="#FF0000">"cool!"</font>]])<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>You can receive data either in passive or in active mode. Passive mode means that you will perform a blocking <code>Transport:recv/3</code> call, while active mode means that you will receive the data as a message.</p>
+<p>By default, all data will be received as binary. It is possible to receive data as strings, although this is not recommended as binaries are a more efficient construct, especially for binary protocols.</p>
+<p>Receiving data using passive mode requires a single function call. The first argument is the socket, and the third argument is a timeout duration before the call returns with <code>{error, timeout}</code>.</p>
+<p>The second argument is the amount of data in bytes that we want to receive. The function will wait for data until it has received exactly this amount. If you are not expecting a precise size, you can specify 0 which will make this call return as soon as data was read, regardless of its size.</p>
+<div class="listingblock"><div class="title">Receiving data from the socket in passive mode</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>{<font color="#FF6600">ok</font>, <font color="#009900">Data</font>} <font color="#990000">=</font> <font color="#009900">Transport</font><font color="#990000">:</font><b><font color="#000000">recv</font></b>(<font color="#009900">Socket</font>, <font color="#993399">0</font>, <font color="#993399">5000</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Active mode requires you to inform the socket that you want to receive data as a message and to write the code to actually receive it.</p>
+<p>There are two kinds of active modes: <code>{active, once}</code> and <code>{active, true}</code>. The first will send a single message before going back to passive mode; the second will send messages indefinitely. We recommend not using the <code>{active, true}</code> mode as it could quickly flood your process mailbox. It&apos;s better to keep the data in the socket and read it only when required.</p>
+<p>Three different messages can be received:</p>
+<ul><li><code>{OK, Socket, Data}</code>
+</li>
+<li><code>{Closed, Socket}</code>
+</li>
+<li><code>{Error, Socket, Reason}</code>
+</li>
+</ul>
+<p>The value of <code>OK</code>, <code>Closed</code> and <code>Error</code> can be different depending on the transport being used. To be able to properly match on them you must first call the <code>Transport:messages/0</code> function.</p>
+<div class="listingblock"><div class="title">Retrieving the transport&apos;s active message identifiers</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>{<font color="#009900">OK</font>, <font color="#009900">Closed</font>, <font color="#009900">Error</font>} <font color="#990000">=</font> <font color="#009900">Transport</font><font color="#990000">:</font><b><font color="#000000">messages</font></b>()<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>To start receiving messages you will need to call the <code>Transport:setopts/2</code> function, and do so every time you want to receive data.</p>
+<div class="listingblock"><div class="title">Receiving messages from the socket in active mode</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>{<font color="#009900">OK</font>, <font color="#009900">Closed</font>, <font color="#009900">Error</font>} <font color="#990000">=</font> <font color="#009900">Transport</font><font color="#990000">:</font><b><font color="#000000">messages</font></b>(),
+<font color="#009900">Transport</font><font color="#990000">:</font><b><font color="#000000">setopts</font></b>(<font color="#009900">Socket</font>, [{<font color="#FF6600">active</font>, <font color="#FF6600">once</font>}]),
+<b><font color="#0000FF">receive</font></b>
+ {<font color="#009900">OK</font>, <font color="#009900">Socket</font>, <font color="#009900">Data</font>} <font color="#990000">-&gt;</font>
+ <b><font color="#000000">io:format</font></b>(<font color="#FF0000">"data received: ~p~n"</font>, [<font color="#009900">Data</font>]);
+ {<font color="#009900">Closed</font>, <font color="#009900">Socket</font>} <font color="#990000">-&gt;</font>
+ <b><font color="#000000">io:format</font></b>(<font color="#FF0000">"socket got closed!~n"</font>);
+ {<font color="#009900">Error</font>, <font color="#009900">Socket</font>, <font color="#009900">Reason</font>} <font color="#990000">-&gt;</font>
+ <b><font color="#000000">io:format</font></b>(<font color="#FF0000">"error happened: ~p~n"</font>, [<font color="#009900">Reason</font>])
+<b><font color="#0000FF">end</font></b><font color="#990000">.</font></tt></pre>
+</div></div>
+<p>You can easily integrate active sockets with existing Erlang code as all you really need is just a few more clauses when receiving messages.</p>
+<h2 id="_sending_files">Sending files</h2>
+<p>As in the previous section it is assumed <code>Transport</code> is a valid transport handler and <code>Socket</code> is a connected socket obtained through the listener.</p>
+<p>To send a whole file, with name <code>Filename</code>, over a socket:</p>
+<div class="listingblock"><div class="title">Sending a file by filename</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>{<font color="#FF6600">ok</font>, <font color="#009900">SentBytes</font>} <font color="#990000">=</font> <font color="#009900">Transport</font><font color="#990000">:</font><b><font color="#000000">sendfile</font></b>(<font color="#009900">Socket</font>, <font color="#009900">Filename</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>Or part of a file, with <code>Offset</code> greater than or equal to 0, <code>Bytes</code> number of bytes and chunks of size <code>ChunkSize</code>:</p>
+<div class="listingblock"><div class="title">Sending part of a file by filename in chunks</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><font color="#009900">Opts</font> <font color="#990000">=</font> [{<font color="#FF6600">chunk_size</font>, <font color="#009900">ChunkSize</font>}],
+{<font color="#FF6600">ok</font>, <font color="#009900">SentBytes</font>} <font color="#990000">=</font> <font color="#009900">Transport</font><font color="#990000">:</font><b><font color="#000000">sendfile</font></b>(<font color="#009900">Socket</font>, <font color="#009900">Filename</font>, <font color="#009900">Offset</font>, <font color="#009900">Bytes</font>, <font color="#009900">Opts</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>To improve efficiency when sending multiple parts of the same file it is also possible to use a file descriptor opened in raw mode:</p>
+<div class="listingblock"><div class="title">Sending a file opened in raw mode</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>{<font color="#FF6600">ok</font>, <font color="#009900">RawFile</font>} <font color="#990000">=</font> <b><font color="#000000">file:open</font></b>(<font color="#009900">Filename</font>, [<font color="#FF6600">raw</font>, <font color="#FF6600">read</font>, <b><font color="#000080">binary</font></b>]),
+{<font color="#FF6600">ok</font>, <font color="#009900">SentBytes</font>} <font color="#990000">=</font> <font color="#009900">Transport</font><font color="#990000">:</font><b><font color="#000000">sendfile</font></b>(<font color="#009900">Socket</font>, <font color="#009900">RawFile</font>, <font color="#009900">Offset</font>, <font color="#009900">Bytes</font>, <font color="#009900">Opts</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<h2 id="_writing_a_transport_handler">Writing a transport handler</h2>
+<p>A transport handler is a module implementing the <code>ranch_transport</code> behavior. It defines a certain number of callbacks that must be written in order to allow transparent usage of the transport handler.</p>
+<p>The behavior doesn&apos;t define the socket options available when opening a socket. These do not need to be common to all transports as it&apos;s easy enough to write different initialization functions for the different transports that will be used. With one exception though. The <code>setopts/2</code> function <strong>must</strong> implement the <code>{active, once}</code> and the <code>{active, true}</code> options.</p>
+<p>If the transport handler doesn&apos;t have a native implementation of <code>sendfile/5</code> a fallback is available, <code>ranch_transport:sendfile/6</code>. The extra first argument is the transport&apos;s module. See <code>ranch_ssl</code> for an example.</p>
+
+
+
+
+
+
+
+
+
+
+
+ <nav style="margin:1em 0">
+
+ <a style="float:left" href="https://ninenines.eu/docs/en/ranch/1.5/guide/listeners/">
+ Listeners
+ </a>
+
+
+
+ <a style="float:right" href="https://ninenines.eu/docs/en/ranch/1.5/guide/protocols/">
+ Protocols
+ </a>
+
+ </nav>
+
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Ranch
+ 1.5
+
+ User Guide
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/1.5/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/1.5/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/1.5/guide">1.5</a></li>
+
+ <li><a href="/docs/en/ranch/1.4/guide">1.4</a></li>
+
+ <li><a href="/docs/en/ranch/1.3/guide">1.3</a></li>
+
+ <li><a href="/docs/en/ranch/1.2/guide">1.2</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-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/1.5/manual/index.html b/docs/en/ranch/1.5/manual/index.html
new file mode 100644
index 00000000..7a40ebd6
--- /dev/null
+++ b/docs/en/ranch/1.5/manual/index.html
@@ -0,0 +1,152 @@
+<!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">
+
+ <title>Nine Nines: Ranch Function Reference</title>
+
+ <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+ <link href="/css/99s.css?r=1" 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="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>Ranch Function Reference</span></h1>
+
+<ul><li><a href="ranch_app">ranch(7)</a>
+</li>
+<li><a href="ranch">ranch(3)</a>
+</li>
+<li><a href="ranch_protocol">ranch_protocol(3)</a>
+</li>
+<li><a href="ranch_ssl">ranch_ssl(3)</a>
+</li>
+<li><a href="ranch_tcp">ranch_tcp(3)</a>
+</li>
+<li><a href="ranch_transport">ranch_transport(3)</a>
+</li>
+</ul>
+
+
+
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Ranch
+ 1.5
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/1.5/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/1.5/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/1.5/manual">1.5</a></li>
+
+ <li><a href="/docs/en/ranch/1.4/manual">1.4</a></li>
+
+ <li><a href="/docs/en/ranch/1.3/manual">1.3</a></li>
+
+ <li><a href="/docs/en/ranch/1.2/manual">1.2</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-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/1.5/manual/ranch/index.html b/docs/en/ranch/1.5/manual/ranch/index.html
new file mode 100644
index 00000000..f3c2d021
--- /dev/null
+++ b/docs/en/ranch/1.5/manual/ranch/index.html
@@ -0,0 +1,364 @@
+<!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">
+
+ <title>Nine Nines: ranch(3)</title>
+
+ <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+ <link href="/css/99s.css?r=1" 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="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>ranch(3)</span></h1>
+
+<h2 id="_name">Name</h2>
+<p>ranch - socket acceptor pool</p>
+<h2 id="_description">Description</h2>
+<p>The <code>ranch</code> module provides functions for starting and manipulating Ranch listeners.</p>
+<h2 id="_types">Types</h2>
+<h3 id="_max_conns_____non_neg_integer_____infinity">max_conns() = non_neg_integer() | infinity</h3>
+<p>Maximum number of connections allowed on this listener.</p>
+<p>This is a soft limit. The actual number of connections might be slightly above the limit due to concurrency when accepting new connections. Some connections may also be removed from this count explicitly by the user code.</p>
+<h3 id="_opt">opt()</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><b><font color="#000000">opt</font></b>() <font color="#990000">=</font> {<font color="#FF6600">ack_timeout</font>, <b><font color="#000000">timeout</font></b>()}
+ | {<font color="#FF6600">connection_type</font>, <font color="#FF6600">worker</font> | <font color="#FF6600">supervisor</font>}
+ | {<font color="#FF6600">max_connections</font>, <b><font color="#000000">max_conns</font></b>()}
+ | {<font color="#FF6600">num_acceptors</font>, <b><font color="#000000">pos_integer</font></b>()}
+ | {<font color="#000080">shutdown</font>, <b><font color="#000000">timeout</font></b>() | <font color="#FF6600">brutal_kill</font>}
+ | {<font color="#FF6600">socket</font>, <b><font color="#000000">any</font></b>()}</tt></pre>
+</div></div>
+<p>Ranch-specific transport options.</p>
+<p>These options are not passed on to the transports. They are used by Ranch while setting up the listeners.</p>
+<h3 id="_ref_____any">ref() = any()</h3>
+<p>Unique name used to refer to a listener.</p>
+<h2 id="_option_descriptions">Option descriptions</h2>
+<p>None of the options are required.</p>
+<dl><dt>ack_timeout (5000)</dt>
+<dd><p>Maximum allowed time for the <code>ranch:accept_ack/1</code> call to finish.</p>
+</dd>
+<dt>connection_type (worker)</dt>
+<dd><p>Type of process that will handle the connection.</p>
+</dd>
+<dt>max_connections (1024)</dt>
+<dd><p>Maximum number of active connections. Soft limit. Using <code>infinity</code> will disable the limit entirely.</p>
+</dd>
+<dt>num_acceptors (10)</dt>
+<dd><p>Number of processes that accept connections.</p>
+</dd>
+<dt>shutdown (5000)</dt>
+<dd><p>Maximum allowed time for children to stop on listener shutdown.</p>
+</dd>
+<dt>socket</dt>
+<dd><p>Listening socket opened externally to be used instead of calling <code>Transport:listen/1</code>.</p>
+</dd>
+</dl>
+<h2 id="_exports">Exports</h2>
+<h3 id="_accept_ack_ref_____ok">accept_ack(Ref) -&gt; ok</h3>
+<dl><dt>Ref = ref()</dt>
+<dd><p>Listener name.</p>
+</dd>
+</dl>
+<p>Acknowledge that the connection is accepted.</p>
+<p>This function MUST be used by a connection process to inform Ranch that it initialized properly and let it perform any additional operations before the socket can be safely used.</p>
+<h3 id="_child_spec_ref__numacceptors__transport__transopts__protocol__protoopts_____supervisor_child_spec">child_spec(Ref, NumAcceptors, Transport, TransOpts, Protocol, ProtoOpts) -&gt; supervisor:child_spec()</h3>
+<dl><dt>Ref = ref()</dt>
+<dd><p>Listener name.</p>
+</dd>
+<dt>NumAcceptors = non_neg_integer()</dt>
+<dd><p>Number of acceptor processes.</p>
+</dd>
+<dt>Transport = module()</dt>
+<dd><p>Transport module.</p>
+</dd>
+<dt>TransOpts = any()</dt>
+<dd><p>Transport options.</p>
+</dd>
+<dt>Protocol = module()</dt>
+<dd><p>Protocol module.</p>
+</dd>
+<dt>ProtoOpts = any()</dt>
+<dd><p>Protocol options.</p>
+</dd>
+</dl>
+<p>Return child specifications for a new listener.</p>
+<p>This function can be used to embed a listener directly in an application instead of letting Ranch handle it.</p>
+<h3 id="_get_addr_ref______ip__port">get_addr(Ref) -&gt; {IP, Port}</h3>
+<dl><dt>Ref = ref()</dt>
+<dd><p>Listener name.</p>
+</dd>
+<dt>IP = inet:ip_address()</dt>
+<dd><p>IP of the interface used by this listener.</p>
+</dd>
+<dt>Port = inet:port_number()</dt>
+<dd><p>Port number used by this listener.</p>
+</dd>
+</dl>
+<p>Return the IP address and port for the given listener.</p>
+<h3 id="_get_max_connections_ref_____maxconns">get_max_connections(Ref) -&gt; MaxConns</h3>
+<dl><dt>Ref = ref()</dt>
+<dd><p>Listener name.</p>
+</dd>
+<dt>MaxConns = max_conns()</dt>
+<dd><p>Current maximum number of connections.</p>
+</dd>
+</dl>
+<p>Return the max number of connections allowed for the given listener.</p>
+<h3 id="_get_port_ref_____port">get_port(Ref) -&gt; Port</h3>
+<dl><dt>Ref = ref()</dt>
+<dd><p>Listener name.</p>
+</dd>
+<dt>Port = inet:port_number()</dt>
+<dd><p>Port number used by this listener.</p>
+</dd>
+</dl>
+<p>Return the port for the given listener.</p>
+<h3 id="_get_protocol_options_ref_____protoopts">get_protocol_options(Ref) -&gt; ProtoOpts</h3>
+<dl><dt>Ref = ref()</dt>
+<dd><p>Listener name.</p>
+</dd>
+<dt>ProtoOpts = any()</dt>
+<dd><p>Current protocol options.</p>
+</dd>
+</dl>
+<p>Return the protocol options set for the given listener.</p>
+<h3 id="_info________ref____key__value">info() -&gt; [{Ref, [{Key, Value}]}]</h3>
+<dl><dt>Ref = ref()</dt>
+<dd><p>Listener name.</p>
+</dd>
+<dt>Key = atom()</dt>
+<dd><p>Information key.</p>
+</dd>
+<dt>Value = any()</dt>
+<dd><p>Information value.</p>
+</dd>
+</dl>
+<p>Return detailed information about all Ranch listeners.</p>
+<p>The following keys are defined:</p>
+<dl><dt>pid</dt>
+<dd><p>Pid of the listener&apos;s top-level supervisor.</p>
+</dd>
+<dt>ip</dt>
+<dd><p>Interface Ranch listens on.</p>
+</dd>
+<dt>port</dt>
+<dd><p>Port number Ranch listens on.</p>
+</dd>
+<dt>num_acceptors</dt>
+<dd><p>Number of acceptor processes.</p>
+</dd>
+<dt>max_connections</dt>
+<dd><p>Maximum number of connections.</p>
+</dd>
+<dt>active_connections</dt>
+<dd><p>Number of active connections.</p>
+</dd>
+<dt>all_connections</dt>
+<dd><p>Number of connections, including those removed from the count.</p>
+</dd>
+<dt>transport</dt>
+<dd><p>Transport module.</p>
+</dd>
+<dt>transport_options</dt>
+<dd><p>Transport options.</p>
+</dd>
+<dt>protocol</dt>
+<dd><p>Protocol module.</p>
+</dd>
+<dt>protocol_options</dt>
+<dd><p>Protocol options.</p>
+</dd>
+</dl>
+<h3 id="_procs_ref__acceptors___connections______pid">procs(Ref, acceptors | connections) -&gt; [pid()]</h3>
+<dl><dt>Ref = ref()</dt>
+<dd><p>Listener name.</p>
+</dd>
+</dl>
+<p>Return all acceptor or connection processes for one listener.</p>
+<h3 id="_remove_connection_ref_____ok">remove_connection(Ref) -&gt; ok</h3>
+<dl><dt>Ref = ref()</dt>
+<dd><p>Listener name.</p>
+</dd>
+</dl>
+<p>Do not count this connection when limiting the number of connections.</p>
+<p>You can use this function for long-running connection processes which spend most of their time idling rather than consuming resources. This allows Ranch to accept a lot more connections without sacrificing the latency of the system.</p>
+<p>This function may only be called from a connection process.</p>
+<h3 id="_set_max_connections_ref__maxconns_____ok">set_max_connections(Ref, MaxConns) -&gt; ok</h3>
+<dl><dt>Ref = ref()</dt>
+<dd><p>Listener name.</p>
+</dd>
+<dt>MaxConns = max_conns()</dt>
+<dd><p>New maximum number of connections.</p>
+</dd>
+</dl>
+<p>Set the max number of connections for the given listener.</p>
+<p>The change will be applied immediately. If the new value is smaller than the previous one, Ranch will not kill the extra connections, but will wait for them to terminate properly.</p>
+<h3 id="_set_protocol_options_ref__protoopts_____ok">set_protocol_options(Ref, ProtoOpts) -&gt; ok</h3>
+<dl><dt>Ref = ref()</dt>
+<dd><p>Listener name.</p>
+</dd>
+<dt>ProtoOpts = any()</dt>
+<dd><p>New protocol options.</p>
+</dd>
+</dl>
+<p>Set the protocol options for the given listener.</p>
+<p>The change will be applied immediately for all new connections. Old connections will not receive the new options.</p>
+<h3 id="_start_listener_ref__numacceptors__transport__transopts__protocol__protoopts______ok__pid_______error__badarg">start_listener(Ref, NumAcceptors, Transport, TransOpts, Protocol, ProtoOpts) -&gt; {ok, pid()} | {error, badarg}</h3>
+<dl><dt>Ref = ref()</dt>
+<dd><p>Listener name.</p>
+</dd>
+<dt>NumAcceptors = non_neg_integer()</dt>
+<dd><p>Number of acceptor processes.</p>
+</dd>
+<dt>Transport = module()</dt>
+<dd><p>Transport module.</p>
+</dd>
+<dt>TransOpts = any()</dt>
+<dd><p>Transport options.</p>
+</dd>
+<dt>Protocol = module()</dt>
+<dd><p>Protocol module.</p>
+</dd>
+<dt>ProtoOpts = any()</dt>
+<dd><p>Protocol options.</p>
+</dd>
+</dl>
+<p>Start listening for connections using the given transport and protocol. Returns the pid for this listener&apos;s supervisor.</p>
+<p>There are additional transport options that apply regardless of transport. They allow configuring how the connections are supervised, rate limited and more. Please consult the previous section for more details.</p>
+<h3 id="_stop_listener_ref_____ok____error__not_found">stop_listener(Ref) -&gt; ok | {error, not_found}</h3>
+<dl><dt>Ref = ref()</dt>
+<dd><p>Listener name.</p>
+</dd>
+</dl>
+<p>Stop the given listener.</p>
+<p>The listener is stopped gracefully, first by closing the listening port, then by stopping the connection processes. These processes are stopped according to the <code>shutdown</code> transport option, which may be set to brutally kill all connection processes or give them some time to stop properly.</p>
+<p>This function does not return until the listener is completely stopped.</p>
+
+
+
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Ranch
+ 1.5
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/1.5/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/1.5/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/1.5/manual">1.5</a></li>
+
+ <li><a href="/docs/en/ranch/1.4/manual">1.4</a></li>
+
+ <li><a href="/docs/en/ranch/1.3/manual">1.3</a></li>
+
+ <li><a href="/docs/en/ranch/1.2/manual">1.2</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-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/1.5/manual/ranch_app/index.html b/docs/en/ranch/1.5/manual/ranch_app/index.html
new file mode 100644
index 00000000..0cf53650
--- /dev/null
+++ b/docs/en/ranch/1.5/manual/ranch_app/index.html
@@ -0,0 +1,150 @@
+<!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">
+
+ <title>Nine Nines: ranch(7)</title>
+
+ <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+ <link href="/css/99s.css?r=1" 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="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>ranch(7)</span></h1>
+
+<h2 id="_name">Name</h2>
+<p>ranch - Socket acceptor pool for TCP protocols.</p>
+<h2 id="_dependencies">Dependencies</h2>
+<p>The <code>ranch</code> application depends on the <code>ssl</code> application to start. It is used for handling secure connections, when the transport is <code>ranch_ssl</code>. It can be disabled if SSL is not used.</p>
+<h2 id="_environment">Environment</h2>
+<p>The <code>ranch</code> application defines one application environment configuration parameter.</p>
+<dl><dt>profile (false)</dt>
+<dd><p>When enabled, Ranch will start <code>eprof</code> profiling automatically.</p>
+</dd>
+</dl>
+<p>You can use the <code>ranch_app:profile_output/0</code> function to stop profiling and output the results to the files <em>procs.profile</em> and <em>total.profile</em>. Do not use in production.</p>
+
+
+
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Ranch
+ 1.5
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/1.5/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/1.5/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/1.5/manual">1.5</a></li>
+
+ <li><a href="/docs/en/ranch/1.4/manual">1.4</a></li>
+
+ <li><a href="/docs/en/ranch/1.3/manual">1.3</a></li>
+
+ <li><a href="/docs/en/ranch/1.2/manual">1.2</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-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/1.5/manual/ranch_protocol/index.html b/docs/en/ranch/1.5/manual/ranch_protocol/index.html
new file mode 100644
index 00000000..507edc7d
--- /dev/null
+++ b/docs/en/ranch/1.5/manual/ranch_protocol/index.html
@@ -0,0 +1,165 @@
+<!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">
+
+ <title>Nine Nines: ranch_protocol(3)</title>
+
+ <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+ <link href="/css/99s.css?r=1" 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="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>ranch_protocol(3)</span></h1>
+
+<h2 id="_name">Name</h2>
+<p>ranch_protocol - behaviour for protocol modules</p>
+<h2 id="_description">Description</h2>
+<p>The <code>ranch_protocol</code> behaviour defines the interface used by Ranch protocols.</p>
+<h2 id="_types">Types</h2>
+<p>None.</p>
+<h2 id="_callbacks">Callbacks</h2>
+<h3 id="_start_link_ref__socket__transport__protoopts______ok__pid_______ok__pid____pid">start_link(Ref, Socket, Transport, ProtoOpts) -&gt; {ok, pid()} | {ok, pid(), pid()}</h3>
+<dl><dt>Ref = ranch:ref()</dt>
+<dd><p>Listener name.</p>
+</dd>
+<dt>Socket = any()</dt>
+<dd><p>Socket for this connection.</p>
+</dd>
+<dt>Transport = module()</dt>
+<dd><p>Transport module for this socket.</p>
+</dd>
+<dt>ProtoOpts = any()</dt>
+<dd><p>Protocol options.</p>
+</dd>
+</dl>
+<p>Start a new connection process for the given socket.</p>
+<p>The only purpose of this callback is to start a process that will handle the socket. It must spawn the process, link and then return the new pid. This function will always be called from inside a supervisor.</p>
+<p>This callback can also return two pids. The first pid is the pid of the process that will be supervised. The second pid is the pid of the process that will receive ownership of the socket. This second process must be a child of the first. This form is only available when <code>connection_type</code> is set to <code>supervisor</code>.</p>
+<p>If any other value is returned, the supervisor will close the socket and assume no process has been started.</p>
+<p>Do not perform any operations in this callback, as this would block the supervisor responsible for starting connection processes and degrade performance severely.</p>
+
+
+
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Ranch
+ 1.5
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/1.5/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/1.5/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/1.5/manual">1.5</a></li>
+
+ <li><a href="/docs/en/ranch/1.4/manual">1.4</a></li>
+
+ <li><a href="/docs/en/ranch/1.3/manual">1.3</a></li>
+
+ <li><a href="/docs/en/ranch/1.2/manual">1.2</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-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/1.5/manual/ranch_ssl/index.html b/docs/en/ranch/1.5/manual/ranch_ssl/index.html
new file mode 100644
index 00000000..139f475c
--- /dev/null
+++ b/docs/en/ranch/1.5/manual/ranch_ssl/index.html
@@ -0,0 +1,306 @@
+<!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">
+
+ <title>Nine Nines: ranch_ssl(3)</title>
+
+ <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+ <link href="/css/99s.css?r=1" 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="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>ranch_ssl(3)</span></h1>
+
+<h2 id="_name">Name</h2>
+<p>ranch_ssl - SSL transport module</p>
+<h2 id="_description">Description</h2>
+<p>The <code>ranch_ssl</code> module implements an SSL Ranch transport.</p>
+<h2 id="_types">Types</h2>
+<h3 id="_ssl_opt">ssl_opt()</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><b><font color="#000000">ssl_opt</font></b>() <font color="#990000">=</font> {<font color="#FF6600">alpn_preferred_protocols</font>, [<b><font color="#000080">binary</font></b>()]}
+ | {<font color="#FF6600">beast_mitigation</font>, <font color="#FF6600">one_n_minus_one</font> | <font color="#FF6600">zero_n</font> | <font color="#FF6600">disabled</font>}
+ | {<font color="#FF6600">cacertfile</font>, <b><font color="#000000">string</font></b>()}
+ | {<font color="#FF6600">cacerts</font>, [<b><font color="#000000">public_key:der_encoded</font></b>()]}
+ | {<font color="#FF6600">cert</font>, <b><font color="#000000">public_key:der_encoded</font></b>()}
+ | {<font color="#FF6600">certfile</font>, <b><font color="#000000">string</font></b>()}
+ | {<font color="#FF6600">ciphers</font>, [<b><font color="#000000">ssl:erl_cipher_suite</font></b>()] | <b><font color="#000000">string</font></b>()}
+ | {<font color="#FF6600">client_renegotiation</font>, <b><font color="#000000">boolean</font></b>()}
+ | {<font color="#FF6600">crl_cache</font>, {<b><font color="#000000">module</font></b>(), {<font color="#FF6600">internal</font> | <b><font color="#000000">any</font></b>(), <b><font color="#000080">list</font></b>()}}}
+ | {<font color="#FF6600">crl_check</font>, <b><font color="#000000">boolean</font></b>() | <font color="#FF6600">peer</font> | <font color="#FF6600">best_effort</font>}
+ | {<font color="#FF6600">depth</font>, <font color="#993399">0</font><font color="#990000">..</font><font color="#993399">255</font>}
+ | {<font color="#FF6600">dh</font>, <b><font color="#000000">public_key:der_encoded</font></b>()}
+ | {<font color="#FF6600">dhfile</font>, <b><font color="#000000">string</font></b>()}
+ | {<font color="#FF6600">fail_if_no_peer_cert</font>, <b><font color="#000000">boolean</font></b>()}
+ | {<font color="#FF6600">hibernate_after</font>, <b><font color="#000080">integer</font></b>() | <font color="#000080">undefined</font>}
+ | {<font color="#FF6600">honor_cipher_order</font>, <b><font color="#000000">boolean</font></b>()}
+ | {<font color="#FF6600">key</font>, {<font color="#FF6600">'RSAPrivateKey'</font> | <font color="#FF6600">'DSAPrivateKey'</font> | <font color="#FF6600">'PrivateKeyInfo'</font>, <b><font color="#000000">public_key:der_encoded</font></b>()}}
+ | {<font color="#FF6600">keyfile</font>, <b><font color="#000000">string</font></b>()}
+ | {<font color="#FF6600">log_alert</font>, <b><font color="#000000">boolean</font></b>()}
+ | {<font color="#FF6600">next_protocols_advertised</font>, [<b><font color="#000080">binary</font></b>()]}
+ | {<font color="#FF6600">padding_check</font>, <b><font color="#000000">boolean</font></b>()}
+ | {<font color="#FF6600">partial_chain</font>, <b><font color="#0000FF">fun</font></b>(([<b><font color="#000000">public_key:der_encoded</font></b>()]) <font color="#990000">-&gt;</font> {<font color="#FF6600">trusted_ca</font>, <b><font color="#000000">public_key:der_encoded</font></b>()} | <font color="#FF6600">unknown_ca</font>)}
+ | {<font color="#FF6600">password</font>, <b><font color="#000000">string</font></b>()}
+ | {<font color="#FF6600">psk_identity</font>, <b><font color="#000000">string</font></b>()}
+ | {<font color="#FF6600">reuse_session</font>, <b><font color="#0000FF">fun</font></b>()}
+ | {<font color="#FF6600">reuse_sessions</font>, <b><font color="#000000">boolean</font></b>()}
+ | {<font color="#FF6600">secure_renegotiate</font>, <b><font color="#000000">boolean</font></b>()}
+ | {<font color="#FF6600">signature_algs</font>, [{<b><font color="#000080">atom</font></b>(), <b><font color="#000080">atom</font></b>()}]}
+ | {<font color="#FF6600">sni_fun</font>, <b><font color="#0000FF">fun</font></b>()}
+ | {<font color="#FF6600">sni_hosts</font>, [{<b><font color="#000000">string</font></b>(), <b><font color="#000000">ssl_opt</font></b>()}]}
+ | {<font color="#FF6600">user_lookup_fun</font>, {<b><font color="#0000FF">fun</font></b>(), <b><font color="#000000">any</font></b>()}}
+ | {<font color="#FF6600">v2_hello_compatible</font>, <b><font color="#000000">boolean</font></b>()}
+ | {<font color="#FF6600">verify</font>, <b><font color="#000000">ssl:verify_type</font></b>()}
+ | {<font color="#FF6600">verify_fun</font>, {<b><font color="#0000FF">fun</font></b>(), <b><font color="#000000">any</font></b>()}}
+ | {<font color="#FF6600">versions</font>, [<b><font color="#000080">atom</font></b>()]}<font color="#990000">.</font></tt></pre>
+</div></div>
+<p>SSL-specific listen options.</p>
+<h3 id="_opt_____ranch_tcp_opt_____ssl_opt">opt() = ranch_tcp:opt() | ssl_opt()</h3>
+<p>Listen options.</p>
+<h3 id="_opts______opt">opts() = [opt()]</h3>
+<p>List of listen options.</p>
+<h2 id="_option_descriptions">Option descriptions</h2>
+<p>Specifying a certificate is mandatory, either through the <code>cert</code> or the <code>certfile</code> option. None of the other options are required.</p>
+<p>The default value is given next to the option name.</p>
+<dl><dt>alpn_preferred_protocols</dt>
+<dd><p>Perform Application-Layer Protocol Negotiation with the given list of preferred protocols.</p>
+</dd>
+<dt>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>cacertfile</dt>
+<dd><p>Path to PEM encoded trusted certificates file used to verify peer certificates.</p>
+</dd>
+<dt>cacerts</dt>
+<dd><p>List of DER encoded trusted certificates.</p>
+</dd>
+<dt>cert</dt>
+<dd><p>DER encoded user certificate.</p>
+</dd>
+<dt>certfile</dt>
+<dd><p>Path to the PEM encoded user certificate file. May also contain the private key.</p>
+</dd>
+<dt>ciphers</dt>
+<dd><p>List of ciphers that clients are allowed to use.</p>
+</dd>
+<dt>client_renegotiation (true)</dt>
+<dd><p>Whether to allow client-initiated renegotiation.</p>
+</dd>
+<dt>crl_cache ({ssl_crl_cache, {internal, []}})</dt>
+<dd><p>Customize the module used to cache Certificate Revocation Lists.</p>
+</dd>
+<dt>crl_check (false)</dt>
+<dd><p>Whether to perform CRL check on all certificates in the chain during validation.</p>
+</dd>
+<dt>depth (1)</dt>
+<dd><p>Maximum of intermediate certificates allowed in the certification path.</p>
+</dd>
+<dt>dh</dt>
+<dd><p>DER encoded Diffie-Hellman parameters.</p>
+</dd>
+<dt>dhfile</dt>
+<dd><p>Path to the PEM encoded Diffie-Hellman parameters file.</p>
+</dd>
+<dt>fail_if_no_peer_cert (false)</dt>
+<dd><p>Whether to refuse the connection if the client sends an empty certificate.</p>
+</dd>
+<dt>hibernate_after (undefined)</dt>
+<dd><p>Time in ms after which SSL socket processes go into hibernation to reduce memory usage.</p>
+</dd>
+<dt>honor_cipher_order (false)</dt>
+<dd><p>If true, use the server&apos;s preference for cipher selection. If false, use the client&apos;s preference.</p>
+</dd>
+<dt>key</dt>
+<dd><p>DER encoded user private key.</p>
+</dd>
+<dt>keyfile</dt>
+<dd><p>Path to the PEM encoded private key file, if different than the certfile.</p>
+</dd>
+<dt>log_alert (true)</dt>
+<dd><p>If false, error reports will not be displayed.</p>
+</dd>
+<dt>next_protocols_advertised</dt>
+<dd><p>List of protocols to send to the client if it supports the Next Protocol extension.</p>
+</dd>
+<dt>nodelay (true)</dt>
+<dd><p>Whether to enable TCP_NODELAY.</p>
+</dd>
+<dt>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>partial_chain</dt>
+<dd><p>Claim an intermediate CA in the chain as trusted.</p>
+</dd>
+<dt>password</dt>
+<dd><p>Password to the private key file, if password protected.</p>
+</dd>
+<dt>psk_identity</dt>
+<dd><p>Provide the given PSK identity hint to the client during the handshake.</p>
+</dd>
+<dt>reuse_session</dt>
+<dd><p>Custom policy to decide whether a session should be reused.</p>
+</dd>
+<dt>reuse_sessions (false)</dt>
+<dd><p>Whether to allow session reuse.</p>
+</dd>
+<dt>secure_renegotiate (false)</dt>
+<dd><p>Whether to reject renegotiation attempts that do not conform to RFC5746.</p>
+</dd>
+<dt>signature_algs</dt>
+<dd><p>The TLS signature algorithm extension may be used, from TLS 1.2, to negotiate which signature algorithm to use during the TLS handshake.</p>
+</dd>
+<dt>sni_fun</dt>
+<dd><p>Function called when the client requests a host using Server Name Indication. Returns options to apply.</p>
+</dd>
+<dt>sni_hosts</dt>
+<dd><p>Options to apply for the host that matches what the client requested with Server Name Indication.</p>
+</dd>
+<dt>user_lookup_fun</dt>
+<dd><p>Function called to determine the shared secret when using PSK, or provide parameters when using SRP.</p>
+</dd>
+<dt>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>verify (verify_none)</dt>
+<dd><p>Use <code>verify_peer</code> to request a certificate from the client.</p>
+</dd>
+<dt>verify_fun</dt>
+<dd><p>Custom policy to decide whether a client certificate is valid.</p>
+</dd>
+<dt>versions</dt>
+<dd><p>TLS protocol versions that will be supported.</p>
+</dd>
+</dl>
+<p>Note that the client will not send a certificate unless the value for the <code>verify</code> option is set to <code>verify_peer</code>. This means that the <code>fail_if_no_peer_cert</code> only apply when combined with the <code>verify</code> option. The <code>verify_fun</code> option allows greater control over the client certificate validation.</p>
+<p>The options <code>sni_fun</code> and <code>sni_hosts</code> are mutually exclusive.</p>
+<h2 id="_exports">Exports</h2>
+<p>None.</p>
+
+
+
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Ranch
+ 1.5
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/1.5/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/1.5/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/1.5/manual">1.5</a></li>
+
+ <li><a href="/docs/en/ranch/1.4/manual">1.4</a></li>
+
+ <li><a href="/docs/en/ranch/1.3/manual">1.3</a></li>
+
+ <li><a href="/docs/en/ranch/1.2/manual">1.2</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-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/1.5/manual/ranch_tcp/index.html b/docs/en/ranch/1.5/manual/ranch_tcp/index.html
new file mode 100644
index 00000000..ce4f4adc
--- /dev/null
+++ b/docs/en/ranch/1.5/manual/ranch_tcp/index.html
@@ -0,0 +1,259 @@
+<!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">
+
+ <title>Nine Nines: ranch_tcp(3)</title>
+
+ <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+ <link href="/css/99s.css?r=1" 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="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>ranch_tcp(3)</span></h1>
+
+<h2 id="_name">Name</h2>
+<p>ranch_tcp - TCP transport module</p>
+<h2 id="_description">Description</h2>
+<p>The <code>ranch_tcp</code> module implements a TCP Ranch transport.</p>
+<p>Note that due to bugs in OTP up to at least R16B02, it is recommended to disable async threads when using the <code>sendfile</code> function of this transport, as it can make the threads stuck indefinitely.</p>
+<h2 id="_types">Types</h2>
+<h3 id="_opt">opt()</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><b><font color="#000000">opt</font></b>() <font color="#990000">=</font> {<font color="#FF6600">backlog</font>, <b><font color="#000000">non_neg_integer</font></b>()}
+ | {<font color="#FF6600">buffer</font>, <b><font color="#000000">non_neg_integer</font></b>()}
+ | {<font color="#FF6600">delay_send</font>, <b><font color="#000000">boolean</font></b>()}
+ | {<font color="#FF6600">dontroute</font>, <b><font color="#000000">boolean</font></b>()}
+ | {<font color="#FF6600">exit_on_close</font>, <b><font color="#000000">boolean</font></b>()}
+ | {<font color="#FF6600">fd</font>, <b><font color="#000000">non_neg_integer</font></b>()}
+ | {<font color="#FF6600">high_msgq_watermark</font>, <b><font color="#000000">non_neg_integer</font></b>()}
+ | {<font color="#FF6600">high_watermark</font>, <b><font color="#000000">non_neg_integer</font></b>()}
+ | <font color="#FF6600">inet</font>
+ | <font color="#FF6600">inet6</font>
+ | {<font color="#FF6600">ip</font>, <b><font color="#000000">inet:ip_address</font></b>()}
+ | {<font color="#FF6600">ipv6_v6only</font>, <b><font color="#000000">boolean</font></b>()}
+ | {<font color="#FF6600">keepalive</font>, <b><font color="#000000">boolean</font></b>()}
+ | {<font color="#FF6600">linger</font>, {<b><font color="#000000">boolean</font></b>(), <b><font color="#000000">non_neg_integer</font></b>()}}
+ | {<font color="#FF6600">low_msgq_watermark</font>, <b><font color="#000000">non_neg_integer</font></b>()}
+ | {<font color="#FF6600">low_watermark</font>, <b><font color="#000000">non_neg_integer</font></b>()}
+ | {<font color="#FF6600">nodelay</font>, <b><font color="#000000">boolean</font></b>()}
+ | {<font color="#FF6600">port</font>, <b><font color="#000000">inet:port_number</font></b>()}
+ | {<b><font color="#000080">priority</font></b>, <b><font color="#000080">integer</font></b>()}
+ | {<font color="#FF6600">raw</font>, <b><font color="#000000">non_neg_integer</font></b>(), <b><font color="#000000">non_neg_integer</font></b>(), <b><font color="#000080">binary</font></b>()}
+ | {<font color="#FF6600">recbuf</font>, <b><font color="#000000">non_neg_integer</font></b>()}
+ | {<font color="#FF6600">send_timeout</font>, <b><font color="#000000">timeout</font></b>()}
+ | {<font color="#FF6600">send_timeout_close</font>, <b><font color="#000000">boolean</font></b>()}
+ | {<font color="#FF6600">sndbuf</font>, <b><font color="#000000">non_neg_integer</font></b>()}
+ | {<font color="#FF6600">tos</font>, <b><font color="#000080">integer</font></b>()}</tt></pre>
+</div></div>
+<p>Listen options.</p>
+<p>This does not represent the entirety of the options that can be set on the socket, but only the options that may be set independently of protocol implementation.</p>
+<h3 id="_opts______opt">opts() = [opt()]</h3>
+<p>List of listen options.</p>
+<h2 id="_option_descriptions">Option descriptions</h2>
+<p>None of the options are required.</p>
+<p>Please consult the <code>gen_tcp</code> and <code>inet</code> manuals for a more thorough description of these options. This manual only aims to provide a short description along with what the defaults are. Defaults may be different in Ranch compared to <code>gen_tcp</code>. Defaults are given next to the option name.</p>
+<dl><dt>backlog (1024)</dt>
+<dd><p>Max length of the queue of pending connections.</p>
+</dd>
+<dt>buffer</dt>
+<dd><p>Size of the buffer used by the Erlang driver. Default is system-dependent.</p>
+</dd>
+<dt>delay_send (false)</dt>
+<dd><p>Always queue packets before sending, to send fewer, larger packets over the network.</p>
+</dd>
+<dt>dontroute (false)</dt>
+<dd><p>Don&apos;t send via a gateway, only send to directly connected hosts.</p>
+</dd>
+<dt>exit_on_close (true)</dt>
+<dd><p>Disable to allow sending data after a close has been detected.</p>
+</dd>
+<dt>fd</dt>
+<dd><p>File descriptor of the socket, if it was opened externally.</p>
+</dd>
+<dt>high_msgq_watermark (8192)</dt>
+<dd><p>Limit in the amount of data in the socket message queue before the socket queue becomes busy.</p>
+</dd>
+<dt>high_watermark (8192)</dt>
+<dd><p>Limit in the amount of data in the ERTS socket implementation&apos;s queue before the socket becomes busy.</p>
+</dd>
+<dt>inet</dt>
+<dd><p>Set up the socket for IPv4.</p>
+</dd>
+<dt>inet6</dt>
+<dd><p>Set up the socket for IPv6.</p>
+</dd>
+<dt>ip</dt>
+<dd><p>Interface to listen on. Listen on all interfaces by default.</p>
+</dd>
+<dt>ipv6_v6only (false)</dt>
+<dd><p>Listen on IPv4 and IPv6 (false) or only on IPv6 (true). Use with inet6.</p>
+</dd>
+<dt>keepalive (false)</dt>
+<dd><p>Enable sending of keep-alive messages.</p>
+</dd>
+<dt>linger ({false, 0})</dt>
+<dd><p>Whether to wait and how long to flush data sent before closing the socket.</p>
+</dd>
+<dt>low_msgq_watermark (4096)</dt>
+<dd><p>Amount of data in the socket message queue before the socket queue leaves busy state.</p>
+</dd>
+<dt>low_watermark (4096)</dt>
+<dd><p>Amount of data in the ERTS socket implementation&apos;s queue before the socket leaves busy state.</p>
+</dd>
+<dt>nodelay (true)</dt>
+<dd><p>Whether to enable TCP_NODELAY.</p>
+</dd>
+<dt>port (0)</dt>
+<dd><p>TCP port number to listen on. 0 means a random port will be used.</p>
+</dd>
+<dt>priority (0)</dt>
+<dd><p>Priority value for all packets to be sent by this socket.</p>
+</dd>
+<dt>recbuf</dt>
+<dd><p>Minimum size of the socket&apos;s receive buffer. Default is system-dependent.</p>
+</dd>
+<dt>send_timeout (30000)</dt>
+<dd><p>How long the send call may wait for confirmation before returning.</p>
+</dd>
+<dt>send_timeout_close (true)</dt>
+<dd><p>Whether to close the socket when the confirmation wasn&apos;t received.</p>
+</dd>
+<dt>sndbuf</dt>
+<dd><p>Minimum size of the socket&apos;s send buffer. Default is system-dependent.</p>
+</dd>
+<dt>tos</dt>
+<dd><p>Value for the IP_TOS IP level option. Use with caution.</p>
+</dd>
+</dl>
+<p>In addition, the <code>raw</code> option can be used to set system-specific options by specifying the protocol level, the option number and the actual option value specified as a binary. This option is not portable. Use with caution.</p>
+<h2 id="_exports">Exports</h2>
+<p>None.</p>
+
+
+
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Ranch
+ 1.5
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/1.5/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/1.5/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/1.5/manual">1.5</a></li>
+
+ <li><a href="/docs/en/ranch/1.4/manual">1.4</a></li>
+
+ <li><a href="/docs/en/ranch/1.3/manual">1.3</a></li>
+
+ <li><a href="/docs/en/ranch/1.2/manual">1.2</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-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/1.5/manual/ranch_transport/index.html b/docs/en/ranch/1.5/manual/ranch_transport/index.html
new file mode 100644
index 00000000..87994787
--- /dev/null
+++ b/docs/en/ranch/1.5/manual/ranch_transport/index.html
@@ -0,0 +1,363 @@
+<!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">
+
+ <title>Nine Nines: ranch_transport(3)</title>
+
+ <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+ <link href="/css/99s.css?r=1" 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="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>ranch_transport(3)</span></h1>
+
+<h2 id="_name">Name</h2>
+<p>ranch_transport - behaviour for transport modules</p>
+<h2 id="_description">Description</h2>
+<p>The <code>ranch_transport</code> behaviour defines the interface used by Ranch transports.</p>
+<h2 id="_types">Types</h2>
+<h3 id="_sendfile_opts_______chunk_size__non_neg_integer">sendfile_opts() = [{chunk_size, non_neg_integer()}]</h3>
+<p>Options used by the sendfile function and callbacks.</p>
+<p>Allows configuring the chunk size, in bytes. Defaults to 8191 bytes.</p>
+<h2 id="_callbacks">Callbacks</h2>
+<h3 id="_accept_lsocket__timeout______ok__csocket_____error__closed___timeout___atom">accept(LSocket, Timeout) -&gt; {ok, CSocket} | {error, closed | timeout | atom()}</h3>
+<dl><dt>LSocket = CSocket = any()</dt>
+<dd><p>Listening socket.</p>
+</dd>
+<dt>Timeout = timeout()</dt>
+<dd><p>Accept timeout.</p>
+</dd>
+</dl>
+<p>Accept a connection on the given listening socket.</p>
+<p>The <code>accept_ack</code> callback will be used to initialize the socket after accepting the connection. This is most useful when the transport is not raw TCP, like with SSL for example.</p>
+<h3 id="_accept_ack_csocket__timeout_____ok">accept_ack(CSocket, Timeout) -&gt; ok</h3>
+<dl><dt>CSocket = any()</dt>
+<dd><p>Socket for this connection.</p>
+</dd>
+<dt>Timeout = timeout()</dt>
+<dd><p>Ack timeout.</p>
+</dd>
+</dl>
+<p>Perform post-accept initialization of the connection.</p>
+<p>This function will be called by connection processes before performing any socket operation. It allows transports that require extra initialization to perform their task and make the socket ready to use.</p>
+<h3 id="_close_socket_____ok">close(Socket) -&gt; ok</h3>
+<dl><dt>Socket = any()</dt>
+<dd><p>Socket opened with listen/1 or accept/2.</p>
+</dd>
+</dl>
+<p>Close the given socket.</p>
+<h3 id="_controlling_process_socket__pid_____ok____error__closed___not_owner___atom">controlling_process(Socket, Pid) -&gt; ok | {error, closed | not_owner | atom()}</h3>
+<dl><dt>Socket = any()</dt>
+<dd><p>Socket opened with listen/1 or accept/2.</p>
+</dd>
+<dt>Pid = pid()</dt>
+<dd><p>Pid of the new owner of the socket.</p>
+</dd>
+</dl>
+<p>Change the controlling process for the given socket.</p>
+<p>The controlling process is the process that is allowed to perform operations on the socket, and that will receive messages from the socket when active mode is used. When the controlling process dies, the socket is closed.</p>
+<h3 id="_listen_transopts______ok__lsocket_____error__atom">listen(TransOpts) -&gt; {ok, LSocket} | {error, atom()}</h3>
+<dl><dt>TransOpts = any()</dt>
+<dd><p>Transport options.</p>
+</dd>
+<dt>LSocket = any()</dt>
+<dd><p>Listening socket.</p>
+</dd>
+</dl>
+<p>Listen for connections on the given port.</p>
+<p>The port is given as part of the transport options under the key <code>port</code>. Any other option is transport dependent.</p>
+<p>The socket returned by this call can then be used to accept connections. It is not possible to send or receive data from the listening socket.</p>
+<h3 id="_messages_______ok__closed__error">messages() -&gt; {OK, Closed, Error}</h3>
+<dl><dt>OK = Closed = Error = atom()</dt>
+<dd><p>Tuple names.</p>
+</dd>
+</dl>
+<p>Return the atoms used to identify messages sent in active mode.</p>
+<h3 id="_name______name">name() -&gt; Name</h3>
+<dl><dt>Name = atom()</dt>
+<dd><p>Transport module name.</p>
+</dd>
+</dl>
+<p>Return the name of the transport.</p>
+<h3 id="_peername_csocket______ok___ip__port______error__atom">peername(CSocket) -&gt; {ok, {IP, Port}} | {error, atom()}</h3>
+<dl><dt>CSocket = any()</dt>
+<dd><p>Socket for this connection.</p>
+</dd>
+<dt>IP = inet:ip_address()</dt>
+<dd><p>IP of the remote endpoint.</p>
+</dd>
+<dt>Port = inet:port_number()</dt>
+<dd><p>Port of the remote endpoint.</p>
+</dd>
+</dl>
+<p>Return the IP and port of the remote endpoint.</p>
+<h3 id="_recv_csocket__length__timeout______ok__packet_____error__closed___timeout___atom">recv(CSocket, Length, Timeout) -&gt; {ok, Packet} | {error, closed | timeout | atom()}</h3>
+<dl><dt>CSocket = any()</dt>
+<dd><p>Socket for this connection.</p>
+</dd>
+<dt>Length = non_neg_integer()</dt>
+<dd><p>Requested length.</p>
+</dd>
+<dt>Timeout = timeout()</dt>
+<dd><p>Receive timeout.</p>
+</dd>
+<dt>Packet = iodata() | any()</dt>
+<dd><p>Data received.</p>
+</dd>
+</dl>
+<p>Receive data from the given socket when in passive mode.</p>
+<p>Trying to receive data from a socket that is in active mode will return an error.</p>
+<p>A length of 0 will return any data available on the socket.</p>
+<p>While it is possible to use the timeout value <code>infinity</code>, this is highly discouraged as this could cause your process to get stuck waiting for data that will never come. This may happen when a socket becomes half-open due to a crash of the remote endpoint. Wi-Fi going down is another common culprit of this issue.</p>
+<h3 id="_send_csocket__packet_____ok____error__atom">send(CSocket, Packet) -&gt; ok | {error, atom()}</h3>
+<dl><dt>CSocket = any()</dt>
+<dd><p>Socket for this connection.</p>
+</dd>
+<dt>Packet = iodata()</dt>
+<dd><p>Data to be sent.</p>
+</dd>
+</dl>
+<p>Send data to the given socket.</p>
+<h3 id="_sendfile_csocket__file_____sendfile_csocket__file__0__0">sendfile(CSocket, File) -&gt; sendfile(CSocket, File, 0, 0, [])</h3>
+<p>Alias of <code>ranch_transport:sendfile/5</code>.</p>
+<h3 id="_sendfile_csocket__file__offset__bytes_____sendfile_csocket__file__offset__bytes">sendfile(CSocket, File, Offset, Bytes) -&gt; sendfile(CSocket, File, Offset, Bytes, [])</h3>
+<p>Alias of <code>ranch_transport:sendfile/5</code>.</p>
+<h3 id="_sendfile_csocket__file__offset__bytes__sfopts______ok__sentbytes_____error__atom">sendfile(CSocket, File, Offset, Bytes, SfOpts) -&gt; {ok, SentBytes} | {error, atom()}</h3>
+<dl><dt>CSocket = any()</dt>
+<dd><p>Socket for this connection.</p>
+</dd>
+<dt>File = file:filename_all() | file:fd()</dt>
+<dd><p>Filename or file descriptor for the file to be sent.</p>
+</dd>
+<dt>Offset = non_neg_integer()</dt>
+<dd><p>Begin sending at this position in the file.</p>
+</dd>
+<dt>Bytes = non_neg_integer()</dt>
+<dd><p>Send this many bytes.</p>
+</dd>
+<dt>SentBytes = non_neg_integer()</dt>
+<dd><p>This many bytes were sent.</p>
+</dd>
+<dt>SfOpts = sendfile_opts()</dt>
+<dd><p>Sendfile options.</p>
+</dd>
+</dl>
+<p>Send data from a file to the given socket.</p>
+<p>The file may be sent full or in parts, and may be specified by its filename or by an already open file descriptor.</p>
+<p>Transports that manipulate TCP directly may use the <code>file:sendfile/{2,4,5}</code> function, which calls the sendfile syscall where applicable (on Linux, for example). Other transports can use the <code>sendfile/6</code> function exported from this module.</p>
+<h3 id="_setopts_csocket__sockopts_____ok____error__atom">setopts(CSocket, SockOpts) -&gt; ok | {error, atom()}</h3>
+<dl><dt>CSocket = any()</dt>
+<dd><p>Socket for this connection.</p>
+</dd>
+<dt>SockOpts = any()</dt>
+<dd><p>Socket options.</p>
+</dd>
+</dl>
+<p>Change options for the given socket.</p>
+<p>This is mainly useful for switching to active or passive mode or to set protocol-specific options.</p>
+<h3 id="_getopts_csocket__sockopts______ok__sockoptvalues_____error__atom">getopts(CSocket, SockOpts) -&gt; {ok, SockOptValues} | {error, atom()}</h3>
+<dl><dt>CSocket = any()</dt>
+<dd><p>Socket for this connection.</p>
+</dd>
+<dt>SockOpts = [atom]</dt>
+<dd><p>Socket option names.</p>
+</dd>
+<dt>SockOptValues = list()</dt>
+<dd><p>Socket options.</p>
+</dd>
+</dl>
+<p>Get options for the given socket.</p>
+<h3 id="_getstat_csocket______ok__sockstatvalues_____error__atom">getstat(CSocket) -&gt; {ok, SockStatValues} | {error, atom()}</h3>
+<dl><dt>CSocket = any()</dt>
+<dd><p>Socket for this connection.</p>
+</dd>
+<dt>SockStatValues = list()</dt>
+<dd><p>Socket statistics.</p>
+</dd>
+</dl>
+<p>Get statistics for the given socket.</p>
+<h3 id="_getstat_csocket__sockstats______ok__sockstatvalues_____error__atom">getstat(CSocket, SockStats) -&gt; {ok, SockStatValues} | {error, atom()}</h3>
+<dl><dt>CSocket = any()</dt>
+<dd><p>Socket for this connection.</p>
+</dd>
+<dt>SockStats = [atom()]</dt>
+<dd><p>Socket statistic names.</p>
+</dd>
+<dt>SockStatValues = list()</dt>
+<dd><p>Socket statistics.</p>
+</dd>
+</dl>
+<p>Get statistics for the given socket.</p>
+<h3 id="_shutdown_csocket__how_____ok____error__atom">shutdown(CSocket, How) -&gt; ok | {error, atom()}</h3>
+<dl><dt>CSocket = any()</dt>
+<dd><p>Socket for this connection.</p>
+</dd>
+<dt>How = read | write | read_write</dt>
+<dd><p>Which side(s) of the socket to close.</p>
+</dd>
+</dl>
+<p>Immediately close the socket in one or two directions.</p>
+<h3 id="_sockname_socket______ok___ip__port______error__atom">sockname(Socket) -&gt; {ok, {IP, Port}} | {error, atom()}</h3>
+<dl><dt>Socket = any()</dt>
+<dd><p>Socket opened with listen/1 or accept/2.</p>
+</dd>
+<dt>IP = inet:ip_address()</dt>
+<dd><p>IP of the local endpoint.</p>
+</dd>
+<dt>Port = inet:port_number()</dt>
+<dd><p>Port of the local endpoint.</p>
+</dd>
+</dl>
+<p>Return the IP and port of the local endpoint.</p>
+<h2 id="_exports">Exports</h2>
+<h3 id="_sendfile_transport__csocket__file__offset__bytes__sfopts______ok__sentbytes_____error__atom">sendfile(Transport, CSocket, File, Offset, Bytes, SfOpts) -&gt; {ok, SentBytes} | {error, atom()}</h3>
+<dl><dt>Transport = module()</dt>
+<dd><p>Transport module for this socket.</p>
+</dd>
+<dt>CSocket = any()</dt>
+<dd><p>Socket for this connection.</p>
+</dd>
+<dt>File = file:filename_all() | file:fd()</dt>
+<dd><p>Filename or file descriptor for the file to be sent.</p>
+</dd>
+<dt>Offset = non_neg_integer()</dt>
+<dd><p>Begin sending at this position in the file.</p>
+</dd>
+<dt>Bytes = non_neg_integer()</dt>
+<dd><p>Send this many bytes.</p>
+</dd>
+<dt>SentBytes = non_neg_integer()</dt>
+<dd><p>This many bytes were sent.</p>
+</dd>
+<dt>SfOpts = sendfile_opts()</dt>
+<dd><p>Sendfile options.</p>
+</dd>
+</dl>
+<p>Send data from a file to the given socket.</p>
+<p>This function emulates the function <code>file:sendfile/{2,4,5}</code> and may be used when transports are not manipulating TCP directly.</p>
+
+
+
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Ranch
+ 1.5
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/1.5/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/1.5/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/1.5/manual">1.5</a></li>
+
+ <li><a href="/docs/en/ranch/1.4/manual">1.4</a></li>
+
+ <li><a href="/docs/en/ranch/1.3/manual">1.3</a></li>
+
+ <li><a href="/docs/en/ranch/1.2/manual">1.2</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-2018</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/index.html b/docs/index.html
index f7a623bf..0070fe3a 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -146,6 +146,13 @@
<ul>
+ <li><a href="/docs/en/ranch/1.5/guide">Ranch 1.5 User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/1.5/manual">Ranch 1.5 Function Reference</a></li>
+
+
+
<li><a href="/docs/en/ranch/1.4/guide">Ranch 1.4 User Guide</a></li>
@@ -197,12 +204,10 @@
</ul>
-<div class="sect2">
<h3 id="_contribute">Contribute</h3>
-<div class="paragraph"><p>Do you have examples, tutorials, videos about one or more
-of my projects? I would happily include them on this page.</p></div>
-<div class="paragraph"><p><a href="mailto:[email protected]">Send me an email with the details</a>.</p></div>
-</div>
+<p>Do you have examples, tutorials, videos about one or more of my projects? I would happily include them on this page.</p>
+<p><a href="mailto:[email protected]">Send me an email with the details</a>.</p>
+
</div>
</div>
diff --git a/docs/index.xml b/docs/index.xml
index 1089c86f..33a58867 100644
--- a/docs/index.xml
+++ b/docs/index.xml
@@ -17,8 +17,9 @@
<guid>https://ninenines.eu/docs/en/erlang.mk/1/guide/installation/</guid>
<description>On Unix 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.</description>
+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.
+Some packages may require additional libraries.</description>
</item>
<item>
@@ -28,11 +29,12 @@
<guid>https://ninenines.eu/docs/en/gun/1.0/guide/introduction/</guid>
<description>Gun is an HTTP client for Erlang/OTP.
- Gun supports the HTTP/2, HTTP/1.1 and Websocket protocols.
- Prerequisites Knowledge of Erlang, but also of the HTTP/1.1, HTTP/2 and Websocket protocols is required in order to read this guide.
- Supported platforms Gun is tested and supported on Linux, FreeBSD, Windows and OSX.
- Gun is developed for Erlang/OTP 19.0 and newer.
- License Gun uses the ISC License.</description>
+Gun supports the HTTP/2, HTTP/1.1 and Websocket protocols.
+Prerequisites Knowledge of Erlang, but also of the HTTP/1.1, HTTP/2 and Websocket protocols is required in order to read this guide.
+Supported platforms Gun is tested and supported on Linux, FreeBSD, Windows and OSX.
+Gun is developed for Erlang/OTP 19.0 and newer.
+License Gun uses the ISC License.
+Copyright (c) 2013-2018, Loïc Hoguin &amp;lt;[email protected]&amp;gt; Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.</description>
</item>
<item>
@@ -42,9 +44,9 @@
<guid>https://ninenines.eu/docs/en/ranch/1.2/guide/introduction/</guid>
<description>Ranch is a socket acceptor pool for TCP protocols.
- Ranch aims to provide everything you need to accept TCP connections with a small code base and low latency while being easy to use directly as an application or to embed into your own.
- Prerequisites It is assumed the developer already knows Erlang and has some experience with socket programming and TCP protocols.
- Supported platforms Ranch is tested and supported on Linux.</description>
+Ranch aims to provide everything you need to accept TCP connections with a small code base and low latency while being easy to use directly as an application or to embed into your own.
+Prerequisites It is assumed the developer already knows Erlang and has some experience with socket programming and TCP protocols.
+Supported platforms Ranch is tested and supported on Linux.</description>
</item>
<item>
@@ -54,9 +56,9 @@
<guid>https://ninenines.eu/docs/en/ranch/1.3/guide/introduction/</guid>
<description>Ranch is a socket acceptor pool for TCP protocols.
- Ranch aims to provide everything you need to accept TCP connections with a small code base and low latency while being easy to use directly as an application or to embed into your own.
- Prerequisites It is assumed the developer already knows Erlang and has some experience with socket programming and TCP protocols.
- Supported platforms Ranch is tested and supported on Linux, FreeBSD, OSX and Windows.</description>
+Ranch aims to provide everything you need to accept TCP connections with a small code base and low latency while being easy to use directly as an application or to embed into your own.
+Prerequisites It is assumed the developer already knows Erlang and has some experience with socket programming and TCP protocols.
+Supported platforms Ranch is tested and supported on Linux, FreeBSD, OSX and Windows.</description>
</item>
<item>
@@ -66,9 +68,21 @@
<guid>https://ninenines.eu/docs/en/ranch/1.4/guide/introduction/</guid>
<description>Ranch is a socket acceptor pool for TCP protocols.
- Ranch aims to provide everything you need to accept TCP connections with a small code base and low latency while being easy to use directly as an application or to embed into your own.
- Prerequisites It is assumed the developer already knows Erlang and has some experience with socket programming and TCP protocols.
- Supported platforms Ranch is tested and supported on Linux, FreeBSD, OSX and Windows.</description>
+Ranch aims to provide everything you need to accept TCP connections with a small code base and low latency while being easy to use directly as an application or to embed into your own.
+Prerequisites It is assumed the developer already knows Erlang and has some experience with socket programming and TCP protocols.
+Supported platforms Ranch is tested and supported on Linux, FreeBSD, OSX and Windows.</description>
+ </item>
+
+ <item>
+ <title>Introduction</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.5/guide/introduction/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.5/guide/introduction/</guid>
+ <description>Ranch is a socket acceptor pool for TCP protocols.
+Ranch aims to provide everything you need to accept TCP connections with a small code base and low latency while being easy to use directly as an application or to embed into your own.
+Prerequisites It is assumed the developer already knows Erlang and has some experience with socket programming and TCP protocols.
+Supported platforms Ranch is tested and supported on Linux, FreeBSD, OSX and Windows.</description>
</item>
<item>
@@ -78,8 +92,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.0/guide/modern_web/</guid>
<description>Cowboy is a server for the modern Web. This chapter explains what it means and details all the standards involved.
- Cowboy supports all the standards listed in this document.
- HTTP/2 HTTP/2 is the most efficient protocol for consuming Web services. It enables clients to keep a connection open for long periods of time; to send requests concurrently; to reduce the size of requests through HTTP headers compression; and more.</description>
+Cowboy supports all the standards listed in this document.
+HTTP/2 HTTP/2 is the most efficient protocol for consuming Web services. It enables clients to keep a connection open for long periods of time; to send requests concurrently; to reduce the size of requests through HTTP headers compression; and more. The protocol is binary, greatly reducing the resources needed to parse it.</description>
</item>
<item>
@@ -89,8 +103,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/guide/modern_web/</guid>
<description>Cowboy is a server for the modern Web. This chapter explains what it means and details all the standards involved.
- Cowboy supports all the standards listed in this document.
- HTTP/2 HTTP/2 is the most efficient protocol for consuming Web services. It enables clients to keep a connection open for long periods of time; to send requests concurrently; to reduce the size of requests through HTTP headers compression; and more.</description>
+Cowboy supports all the standards listed in this document.
+HTTP/2 HTTP/2 is the most efficient protocol for consuming Web services. It enables clients to keep a connection open for long periods of time; to send requests concurrently; to reduce the size of requests through HTTP headers compression; and more. The protocol is binary, greatly reducing the resources needed to parse it.</description>
</item>
<item>
@@ -100,8 +114,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/guide/modern_web/</guid>
<description>Cowboy is a server for the modern Web. This chapter explains what it means and details all the standards involved.
- Cowboy supports all the standards listed in this document.
- HTTP/2 HTTP/2 is the most efficient protocol for consuming Web services. It enables clients to keep a connection open for long periods of time; to send requests concurrently; to reduce the size of requests through HTTP headers compression; and more.</description>
+Cowboy supports all the standards listed in this document.
+HTTP/2 HTTP/2 is the most efficient protocol for consuming Web services. It enables clients to keep a connection open for long periods of time; to send requests concurrently; to reduce the size of requests through HTTP headers compression; and more. The protocol is binary, greatly reducing the resources needed to parse it.</description>
</item>
<item>
@@ -111,8 +125,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/guide/modern_web/</guid>
<description>Cowboy is a server for the modern Web. This chapter explains what it means and details all the standards involved.
- Cowboy supports all the standards listed in this document.
- HTTP/2 HTTP/2 is the most efficient protocol for consuming Web services. It enables clients to keep a connection open for long periods of time; to send requests concurrently; to reduce the size of requests through HTTP headers compression; and more.</description>
+Cowboy supports all the standards listed in this document.
+HTTP/2 HTTP/2 is the most efficient protocol for consuming Web services. It enables clients to keep a connection open for long periods of time; to send requests concurrently; to reduce the size of requests through HTTP headers compression; and more. The protocol is binary, greatly reducing the resources needed to parse it.</description>
</item>
<item>
@@ -122,8 +136,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/guide/modern_web/</guid>
<description>Cowboy is a server for the modern Web. This chapter explains what it means and details all the standards involved.
- Cowboy supports all the standards listed in this document.
- HTTP/2 HTTP/2 is the most efficient protocol for consuming Web services. It enables clients to keep a connection open for long periods of time; to send requests concurrently; to reduce the size of requests through HTTP headers compression; and more.</description>
+Cowboy supports all the standards listed in this document.
+HTTP/2 HTTP/2 is the most efficient protocol for consuming Web services. It enables clients to keep a connection open for long periods of time; to send requests concurrently; to reduce the size of requests through HTTP headers compression; and more. The protocol is binary, greatly reducing the resources needed to parse it.</description>
</item>
<item>
@@ -133,7 +147,7 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.0/guide/erlang_web/</guid>
<description>Erlang is the ideal platform for writing Web applications. Its features are a perfect match for the requirements of modern Web applications.
- The Web is concurrent When you access a website there is little concurrency involved. A few connections are opened and requests are sent through these connections. Then the web page is displayed on your screen. Your browser will only open up to 4 or 8 connections to the server, depending on your settings.</description>
+The Web is concurrent When you access a website there is little concurrency involved. A few connections are opened and requests are sent through these connections. Then the web page is displayed on your screen. Your browser will only open up to 4 or 8 connections to the server, depending on your settings.</description>
</item>
<item>
@@ -143,7 +157,7 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/guide/erlang_web/</guid>
<description>Erlang is the ideal platform for writing Web applications. Its features are a perfect match for the requirements of modern Web applications.
- The Web is concurrent When you access a website there is little concurrency involved. A few connections are opened and requests are sent through these connections. Then the web page is displayed on your screen. Your browser will only open up to 4 or 8 connections to the server, depending on your settings.</description>
+The Web is concurrent When you access a website there is little concurrency involved. A few connections are opened and requests are sent through these connections. Then the web page is displayed on your screen. Your browser will only open up to 4 or 8 connections to the server, depending on your settings.</description>
</item>
<item>
@@ -153,7 +167,7 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/guide/erlang_web/</guid>
<description>Erlang is the ideal platform for writing Web applications. Its features are a perfect match for the requirements of modern Web applications.
- The Web is concurrent When you access a website there is little concurrency involved. A few connections are opened and requests are sent through these connections. Then the web page is displayed on your screen. Your browser will only open up to 4 or 8 connections to the server, depending on your settings.</description>
+The Web is concurrent When you access a website there is little concurrency involved. A few connections are opened and requests are sent through these connections. Then the web page is displayed on your screen. Your browser will only open up to 4 or 8 connections to the server, depending on your settings.</description>
</item>
<item>
@@ -163,7 +177,7 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/guide/erlang_web/</guid>
<description>Erlang is the ideal platform for writing Web applications. Its features are a perfect match for the requirements of modern Web applications.
- The Web is concurrent When you access a website there is little concurrency involved. A few connections are opened and requests are sent through these connections. Then the web page is displayed on your screen. Your browser will only open up to 4 or 8 connections to the server, depending on your settings.</description>
+The Web is concurrent When you access a website there is little concurrency involved. A few connections are opened and requests are sent through these connections. Then the web page is displayed on your screen. Your browser will only open up to 4 or 8 connections to the server, depending on your settings.</description>
</item>
<item>
@@ -173,7 +187,7 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/guide/erlang_web/</guid>
<description>Erlang is the ideal platform for writing Web applications. Its features are a perfect match for the requirements of modern Web applications.
- The Web is concurrent When you access a website there is little concurrency involved. A few connections are opened and requests are sent through these connections. Then the web page is displayed on your screen. Your browser will only open up to 4 or 8 connections to the server, depending on your settings.</description>
+The Web is concurrent When you access a website there is little concurrency involved. A few connections are opened and requests are sent through these connections. Then the web page is displayed on your screen. Your browser will only open up to 4 or 8 connections to the server, depending on your settings.</description>
</item>
<item>
@@ -183,8 +197,8 @@
<guid>https://ninenines.eu/docs/en/erlang.mk/1/guide/getting_started/</guid>
<description>This chapter explains how to get started using Erlang.mk.
- Creating a folder for your project The first step is always to create a new folder that will contain your project.
- $ mkdir hello_joe $ cd hello_joe Most people tend to put all their projects side by side in a common folder. We recommend keeping an organization similar to your remote repositories. For example, for GitHub users, put all your projects in a common folder with the same name as your username.</description>
+Creating a folder for your project The first step is always to create a new folder that will contain your project.
+$ mkdir hello_joe $ cd hello_joe Most people tend to put all their projects side by side in a common folder. We recommend keeping an organization similar to your remote repositories. For example, for GitHub users, put all your projects in a common folder with the same name as your username.</description>
</item>
<item>
@@ -194,7 +208,7 @@
<guid>https://ninenines.eu/docs/en/ranch/1.2/guide/listeners/</guid>
<description>A listener is a set of processes whose role is to listen on a port for new connections. It manages a pool of acceptor processes, each of them indefinitely accepting connections. When it does, it starts a new process executing the protocol handler code. All the socket programming is abstracted through the user of transport handlers.
- The listener takes care of supervising all the acceptor and connection processes, allowing developers to focus on building their application.</description>
+The listener takes care of supervising all the acceptor and connection processes, allowing developers to focus on building their application.</description>
</item>
<item>
@@ -204,7 +218,7 @@
<guid>https://ninenines.eu/docs/en/ranch/1.3/guide/listeners/</guid>
<description>A listener is a set of processes whose role is to listen on a port for new connections. It manages a pool of acceptor processes, each of them indefinitely accepting connections. When it does, it starts a new process executing the protocol handler code. All the socket programming is abstracted through the use of transport handlers.
- The listener takes care of supervising all the acceptor and connection processes, allowing developers to focus on building their application.</description>
+The listener takes care of supervising all the acceptor and connection processes, allowing developers to focus on building their application.</description>
</item>
<item>
@@ -214,7 +228,17 @@
<guid>https://ninenines.eu/docs/en/ranch/1.4/guide/listeners/</guid>
<description>A listener is a set of processes whose role is to listen on a port for new connections. It manages a pool of acceptor processes, each of them indefinitely accepting connections. When it does, it starts a new process executing the protocol handler code. All the socket programming is abstracted through the use of transport handlers.
- The listener takes care of supervising all the acceptor and connection processes, allowing developers to focus on building their application.</description>
+The listener takes care of supervising all the acceptor and connection processes, allowing developers to focus on building their application.</description>
+ </item>
+
+ <item>
+ <title>Listeners</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.5/guide/listeners/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.5/guide/listeners/</guid>
+ <description>A listener is a set of processes whose role is to listen on a port for new connections. It manages a pool of acceptor processes, each of them indefinitely accepting connections. When it does, it starts a new process executing the protocol handler code. All the socket programming is abstracted through the use of transport handlers.
+The listener takes care of supervising all the acceptor and connection processes, allowing developers to focus on building their application.</description>
</item>
<item>
@@ -224,9 +248,10 @@
<guid>https://ninenines.eu/docs/en/gun/1.0/guide/start/</guid>
<description>This chapter describes how to start and stop the Gun application.
- Setting up Specify Gun as a dependency to your application in your favorite build tool.
- With Erlang.mk this is done by adding gun to the DEPS variable in your Makefile.
- Adding Gun as an Erlang.mk dependency DEPS = gun Starting Gun is an OTP application. It needs to be started before you can use it.</description>
+Setting up Specify Gun as a dependency to your application in your favorite build tool.
+With Erlang.mk this is done by adding gun to the DEPS variable in your Makefile.
+Adding Gun as an Erlang.mk dependency DEPS = gun Starting Gun is an OTP application. It needs to be started before you can use it.
+Starting Gun in an Erlang shell 1&amp;gt; application:ensure_all_started(gun).</description>
</item>
<item>
@@ -236,9 +261,9 @@
<guid>https://ninenines.eu/docs/en/gun/1.0/guide/protocols/</guid>
<description>This chapter describes the protocols supported and the operations available to them.
- HTTP/1.1 HTTP/1.1 is a text request-response protocol. The client sends a request, the server sends back a response.
- Gun provides convenience functions for performing GET, HEAD, OPTIONS, POST, PATCH, PUT, and DELETE requests. All these functions are aliases of gun:request/4,5,6 for the respective methods. Gun also provides a gun:data/4 function for streaming the request body.
- Gun will send a gun_inform message for every intermediate informational responses received.</description>
+HTTP/1.1 HTTP/1.1 is a text request-response protocol. The client sends a request, the server sends back a response.
+Gun provides convenience functions for performing GET, HEAD, OPTIONS, POST, PATCH, PUT, and DELETE requests. All these functions are aliases of gun:request/4,5,6 for the respective methods. Gun also provides a gun:data/4 function for streaming the request body.
+Gun will send a gun_inform message for every intermediate informational responses received.</description>
</item>
<item>
@@ -248,9 +273,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.0/guide/introduction/</guid>
<description>Cowboy is a small, fast and modern HTTP server for Erlang/OTP.
- Cowboy aims to provide a complete modern Web stack. This includes HTTP/1.1, HTTP/2, Websocket, Server-Sent Events and Webmachine-based REST.
- Cowboy comes with functions for introspection and tracing, enabling developers to know precisely what is happening at any time. Its modular design also easily enable developers to add instrumentation.
- Cowboy is a high quality project. It has a small code base, is very efficient (both in latency and memory use) and can easily be embedded in another application.</description>
+Cowboy aims to provide a complete modern Web stack. This includes HTTP/1.1, HTTP/2, Websocket, Server-Sent Events and Webmachine-based REST.
+Cowboy comes with functions for introspection and tracing, enabling developers to know precisely what is happening at any time. Its modular design also easily enable developers to add instrumentation.
+Cowboy is a high quality project. It has a small code base, is very efficient (both in latency and memory use) and can easily be embedded in another application.</description>
</item>
<item>
@@ -260,9 +285,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/guide/introduction/</guid>
<description>Cowboy is a small, fast and modern HTTP server for Erlang/OTP.
- Cowboy aims to provide a complete modern Web stack. This includes HTTP/1.1, HTTP/2, Websocket, Server-Sent Events and Webmachine-based REST.
- Cowboy comes with functions for introspection and tracing, enabling developers to know precisely what is happening at any time. Its modular design also easily enable developers to add instrumentation.
- Cowboy is a high quality project. It has a small code base, is very efficient (both in latency and memory use) and can easily be embedded in another application.</description>
+Cowboy aims to provide a complete modern Web stack. This includes HTTP/1.1, HTTP/2, Websocket, Server-Sent Events and Webmachine-based REST.
+Cowboy comes with functions for introspection and tracing, enabling developers to know precisely what is happening at any time. Its modular design also easily enable developers to add instrumentation.
+Cowboy is a high quality project. It has a small code base, is very efficient (both in latency and memory use) and can easily be embedded in another application.</description>
</item>
<item>
@@ -272,9 +297,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/guide/introduction/</guid>
<description>Cowboy is a small, fast and modern HTTP server for Erlang/OTP.
- Cowboy aims to provide a complete modern Web stack. This includes HTTP/1.1, HTTP/2, Websocket, Server-Sent Events and Webmachine-based REST.
- Cowboy comes with functions for introspection and tracing, enabling developers to know precisely what is happening at any time. Its modular design also easily enable developers to add instrumentation.
- Cowboy is a high quality project. It has a small code base, is very efficient (both in latency and memory use) and can easily be embedded in another application.</description>
+Cowboy aims to provide a complete modern Web stack. This includes HTTP/1.1, HTTP/2, Websocket, Server-Sent Events and Webmachine-based REST.
+Cowboy comes with functions for introspection and tracing, enabling developers to know precisely what is happening at any time. Its modular design also easily enable developers to add instrumentation.
+Cowboy is a high quality project. It has a small code base, is very efficient (both in latency and memory use) and can easily be embedded in another application.</description>
</item>
<item>
@@ -284,9 +309,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/guide/introduction/</guid>
<description>Cowboy is a small, fast and modern HTTP server for Erlang/OTP.
- Cowboy aims to provide a complete modern Web stack. This includes HTTP/1.1, HTTP/2, Websocket, Server-Sent Events and Webmachine-based REST.
- Cowboy comes with functions for introspection and tracing, enabling developers to know precisely what is happening at any time. Its modular design also easily enable developers to add instrumentation.
- Cowboy is a high quality project. It has a small code base, is very efficient (both in latency and memory use) and can easily be embedded in another application.</description>
+Cowboy aims to provide a complete modern Web stack. This includes HTTP/1.1, HTTP/2, Websocket, Server-Sent Events and Webmachine-based REST.
+Cowboy comes with functions for introspection and tracing, enabling developers to know precisely what is happening at any time. Its modular design also easily enable developers to add instrumentation.
+Cowboy is a high quality project. It has a small code base, is very efficient (both in latency and memory use) and can easily be embedded in another application.</description>
</item>
<item>
@@ -296,9 +321,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/guide/introduction/</guid>
<description>Cowboy is a small, fast and modern HTTP server for Erlang/OTP.
- Cowboy aims to provide a complete modern Web stack. This includes HTTP/1.1, HTTP/2, Websocket, Server-Sent Events and Webmachine-based REST.
- Cowboy comes with functions for introspection and tracing, enabling developers to know precisely what is happening at any time. Its modular design also easily enable developers to add instrumentation.
- Cowboy is a high quality project. It has a small code base, is very efficient (both in latency and memory use) and can easily be embedded in another application.</description>
+Cowboy aims to provide a complete modern Web stack. This includes HTTP/1.1, HTTP/2, Websocket, Server-Sent Events and Webmachine-based REST.
+Cowboy comes with functions for introspection and tracing, enabling developers to know precisely what is happening at any time. Its modular design also easily enable developers to add instrumentation.
+Cowboy is a high quality project. It has a small code base, is very efficient (both in latency and memory use) and can easily be embedded in another application.</description>
</item>
<item>
@@ -308,9 +333,9 @@
<guid>https://ninenines.eu/docs/en/ranch/1.2/guide/transports/</guid>
<description>A transport defines the interface to interact with a socket.
- Transports can be used for connecting, listening and accepting connections, but also for receiving and sending data. Both passive and active mode are supported, although all sockets are initialized as passive.
- TCP transport The TCP transport is a thin wrapper around gen_tcp.
- SSL transport The SSL transport is a thin wrapper around ssl. It requires the crypto, asn1, public_key and ssl applications to be started.</description>
+Transports can be used for connecting, listening and accepting connections, but also for receiving and sending data. Both passive and active mode are supported, although all sockets are initialized as passive.
+TCP transport The TCP transport is a thin wrapper around gen_tcp.
+SSL transport The SSL transport is a thin wrapper around ssl. It requires the crypto, asn1, public_key and ssl applications to be started.</description>
</item>
<item>
@@ -320,10 +345,10 @@
<guid>https://ninenines.eu/docs/en/ranch/1.3/guide/transports/</guid>
<description>A transport defines the interface to interact with a socket.
- Transports can be used for connecting, listening and accepting connections, but also for receiving and sending data. Both passive and active mode are supported, although all sockets are initialized as passive.
- TCP transport The TCP transport is a thin wrapper around gen_tcp.
- SSL transport The SSL transport is a thin wrapper around ssl.
- Ranch depends on ssl by default so any necessary dependencies will start when Ranch is started.</description>
+Transports can be used for connecting, listening and accepting connections, but also for receiving and sending data. Both passive and active mode are supported, although all sockets are initialized as passive.
+TCP transport The TCP transport is a thin wrapper around gen_tcp.
+SSL transport The SSL transport is a thin wrapper around ssl.
+Ranch depends on ssl by default so any necessary dependencies will start when Ranch is started.</description>
</item>
<item>
@@ -333,10 +358,23 @@
<guid>https://ninenines.eu/docs/en/ranch/1.4/guide/transports/</guid>
<description>A transport defines the interface to interact with a socket.
- Transports can be used for connecting, listening and accepting connections, but also for receiving and sending data. Both passive and active mode are supported, although all sockets are initialized as passive.
- TCP transport The TCP transport is a thin wrapper around gen_tcp.
- SSL transport The SSL transport is a thin wrapper around ssl.
- Ranch depends on ssl by default so any necessary dependencies will start when Ranch is started.</description>
+Transports can be used for connecting, listening and accepting connections, but also for receiving and sending data. Both passive and active mode are supported, although all sockets are initialized as passive.
+TCP transport The TCP transport is a thin wrapper around gen_tcp.
+SSL transport The SSL transport is a thin wrapper around ssl.
+Ranch depends on ssl by default so any necessary dependencies will start when Ranch is started.</description>
+ </item>
+
+ <item>
+ <title>Transports</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.5/guide/transports/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.5/guide/transports/</guid>
+ <description>A transport defines the interface to interact with a socket.
+Transports can be used for connecting, listening and accepting connections, but also for receiving and sending data. Both passive and active mode are supported, although all sockets are initialized as passive.
+TCP transport The TCP transport is a thin wrapper around gen_tcp.
+SSL transport The SSL transport is a thin wrapper around ssl.
+Ranch depends on ssl by default so any necessary dependencies will start when Ranch is started.</description>
</item>
<item>
@@ -345,9 +383,9 @@
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://ninenines.eu/docs/en/erlang.mk/1/guide/overview/</guid>
- <description>Now that you know how to get started, let&amp;#8217;s take a look at what Erlang.mk can do for you.
- Building your project Erlang.mk is first and foremost a build tool. It is especially tailored for Erlang developers and follows widely accepted practices in the Erlang community.
- Erlang.mk will happily build all Erlang-specific files you throw at it. Other kinds of files too, like C or C++ code when you are working on a NIF or a port driver.</description>
+ <description>Now that you know how to get started, let&amp;apos;s take a look at what Erlang.mk can do for you.
+Building your project Erlang.mk is first and foremost a build tool. It is especially tailored for Erlang developers and follows widely accepted practices in the Erlang community.
+Erlang.mk will happily build all Erlang-specific files you throw at it. Other kinds of files too, like C or C++ code when you are working on a NIF or a port driver.</description>
</item>
<item>
@@ -357,8 +395,8 @@
<guid>https://ninenines.eu/docs/en/gun/1.0/guide/connect/</guid>
<description>This chapter describes how to open, monitor and close a connection using the Gun client.
- Gun connections Gun is designed with the HTTP/2 and Websocket protocols in mind. They are built for long-running connections that allow concurrent exchange of data, either in the form of request/responses for HTTP/2 or in the form of messages for Websocket.
- A Gun connection is an Erlang process that manages a socket to a remote endpoint.</description>
+Gun connections Gun is designed with the HTTP/2 and Websocket protocols in mind. They are built for long-running connections that allow concurrent exchange of data, either in the form of request/responses for HTTP/2 or in the form of messages for Websocket.
+A Gun connection is an Erlang process that manages a socket to a remote endpoint.</description>
</item>
<item>
@@ -368,7 +406,7 @@
<guid>https://ninenines.eu/docs/en/ranch/1.2/guide/protocols/</guid>
<description>A protocol handler starts a connection process and defines the protocol logic executed in this process.
- Writing a protocol handler All protocol handlers must implement the ranch_protocol behavior which defines a single callback, start_link/4. This callback is responsible for spawning a new process for handling the connection. It receives four arguments: the name of the listener, the socket, the transport handler being used and the protocol options defined in the call to ranch:start_listener/6.</description>
+Writing a protocol handler All protocol handlers must implement the ranch_protocol behavior which defines a single callback, start_link/4. This callback is responsible for spawning a new process for handling the connection. It receives four arguments: the name of the listener, the socket, the transport handler being used and the protocol options defined in the call to ranch:start_listener/6.</description>
</item>
<item>
@@ -378,7 +416,7 @@
<guid>https://ninenines.eu/docs/en/ranch/1.3/guide/protocols/</guid>
<description>A protocol handler starts a connection process and defines the protocol logic executed in this process.
- Writing a protocol handler All protocol handlers must implement the ranch_protocol behavior which defines a single callback, start_link/4. This callback is responsible for spawning a new process for handling the connection. It receives four arguments: the name of the listener, the socket, the transport handler being used and the protocol options defined in the call to ranch:start_listener/6.</description>
+Writing a protocol handler All protocol handlers must implement the ranch_protocol behavior which defines a single callback, start_link/4. This callback is responsible for spawning a new process for handling the connection. It receives four arguments: the name of the listener, the socket, the transport handler being used and the protocol options defined in the call to ranch:start_listener/6.</description>
</item>
<item>
@@ -388,7 +426,17 @@
<guid>https://ninenines.eu/docs/en/ranch/1.4/guide/protocols/</guid>
<description>A protocol handler starts a connection process and defines the protocol logic executed in this process.
- Writing a protocol handler All protocol handlers must implement the ranch_protocol behavior which defines a single callback, start_link/4. This callback is responsible for spawning a new process for handling the connection. It receives four arguments: the name of the listener, the socket, the transport handler being used and the protocol options defined in the call to ranch:start_listener/5.</description>
+Writing a protocol handler All protocol handlers must implement the ranch_protocol behavior which defines a single callback, start_link/4. This callback is responsible for spawning a new process for handling the connection. It receives four arguments: the name of the listener, the socket, the transport handler being used and the protocol options defined in the call to ranch:start_listener/5.</description>
+ </item>
+
+ <item>
+ <title>Protocols</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.5/guide/protocols/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.5/guide/protocols/</guid>
+ <description>A protocol handler starts a connection process and defines the protocol logic executed in this process.
+Writing a protocol handler All protocol handlers must implement the ranch_protocol behavior which defines a single callback, start_link/4. This callback is responsible for spawning a new process for handling the connection. It receives four arguments: the name of the listener, the socket, the transport handler being used and the protocol options defined in the call to ranch:start_listener/5.</description>
</item>
<item>
@@ -398,7 +446,7 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.0/guide/getting_started/</guid>
<description>Erlang is more than a language, it is also an operating system for your applications. Erlang developers rarely write standalone modules, they write libraries or applications, and then bundle those into what is called a release. A release contains the Erlang VM plus all applications required to run the node, so it can be pushed to production directly.
- This chapter walks you through all the steps of setting up Cowboy, writing your first application and generating your first release.</description>
+This chapter walks you through all the steps of setting up Cowboy, writing your first application and generating your first release.</description>
</item>
<item>
@@ -408,7 +456,7 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/guide/getting_started/</guid>
<description>Erlang is more than a language, it is also an operating system for your applications. Erlang developers rarely write standalone modules, they write libraries or applications, and then bundle those into what is called a release. A release contains the Erlang VM plus all applications required to run the node, so it can be pushed to production directly.
- This chapter walks you through all the steps of setting up Cowboy, writing your first application and generating your first release.</description>
+This chapter walks you through all the steps of setting up Cowboy, writing your first application and generating your first release.</description>
</item>
<item>
@@ -418,7 +466,7 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/guide/getting_started/</guid>
<description>Erlang is more than a language, it is also an operating system for your applications. Erlang developers rarely write standalone modules, they write libraries or applications, and then bundle those into what is called a release. A release contains the Erlang VM plus all applications required to run the node, so it can be pushed to production directly.
- This chapter walks you through all the steps of setting up Cowboy, writing your first application and generating your first release.</description>
+This chapter walks you through all the steps of setting up Cowboy, writing your first application and generating your first release.</description>
</item>
<item>
@@ -428,7 +476,7 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/guide/getting_started/</guid>
<description>Erlang is more than a language, it is also an operating system for your applications. Erlang developers rarely write standalone modules, they write libraries or applications, and then bundle those into what is called a release. A release contains the Erlang VM plus all applications required to run the node, so it can be pushed to production directly.
- This chapter walks you through all the steps of setting up Cowboy, writing your first application and generating your first release.</description>
+This chapter walks you through all the steps of setting up Cowboy, writing your first application and generating your first release.</description>
</item>
<item>
@@ -438,7 +486,7 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/guide/getting_started/</guid>
<description>Erlang is more than a language, it is also an operating system for your applications. Erlang developers rarely write standalone modules, they write libraries or applications, and then bundle those into what is called a release. A release contains the Erlang VM plus all applications required to run the node, so it can be pushed to production directly.
- This chapter walks you through all the steps of setting up Cowboy, writing your first application and generating your first release.</description>
+This chapter walks you through all the steps of setting up Cowboy, writing your first application and generating your first release.</description>
</item>
<item>
@@ -448,8 +496,8 @@
<guid>https://ninenines.eu/docs/en/erlang.mk/1/guide/updating/</guid>
<description>This chapter describes how to update the erlang.mk file in your repository.
- Initial bootstrap The first time you use Erlang.mk, it will bootstrap itself. It always uses the most recent version for this, so you don&amp;#8217;t have to update after creating your project.
- Updating Later on though, updating becomes a necessity. Erlang.mk developers and contributors relentlessly improve the project and add new features; it would be a waste not to benefit from this.</description>
+Initial bootstrap The first time you use Erlang.mk, it will bootstrap itself. It always uses the most recent version for this, so you don&amp;apos;t have to update after creating your project.
+Updating Later on though, updating becomes a necessity. Erlang.mk developers and contributors relentlessly improve the project and add new features; it would be a waste not to benefit from this.</description>
</item>
<item>
@@ -459,9 +507,9 @@
<guid>https://ninenines.eu/docs/en/gun/1.0/guide/http/</guid>
<description>This chapter describes how to use the Gun client for communicating with an HTTP/1.1 or HTTP/2 server.
- Streams Every time a request is initiated, Gun creates a stream. A stream reference uniquely identifies a set of request and response and must be used to perform additional operations with a stream or to identify its messages.
- Stream references use the Erlang reference data type and are therefore unique.
- Streams can be canceled at any time.</description>
+Streams Every time a request is initiated, Gun creates a stream. A stream reference uniquely identifies a set of request and response and must be used to perform additional operations with a stream or to identify its messages.
+Stream references use the Erlang reference data type and are therefore unique.
+Streams can be canceled at any time.</description>
</item>
<item>
@@ -471,7 +519,7 @@
<guid>https://ninenines.eu/docs/en/ranch/1.2/guide/embedded/</guid>
<description>Embedded mode allows you to insert Ranch listeners directly in your supervision tree. This allows for greater fault tolerance control by permitting the shutdown of a listener due to the failure of another part of the application and vice versa.
- Embedding To embed Ranch in your application you can simply add the child specs to your supervision tree. This can all be done in the init/1 function of one of your application supervisors.</description>
+Embedding To embed Ranch in your application you can simply add the child specs to your supervision tree. This can all be done in the init/1 function of one of your application supervisors.</description>
</item>
<item>
@@ -481,7 +529,7 @@
<guid>https://ninenines.eu/docs/en/ranch/1.3/guide/embedded/</guid>
<description>Embedded mode allows you to insert Ranch listeners directly in your supervision tree. This allows for greater fault tolerance control by permitting the shutdown of a listener due to the failure of another part of the application and vice versa.
- Embedding To embed Ranch in your application you can simply add the child specs to your supervision tree. This can all be done in the init/1 function of one of your application supervisors.</description>
+Embedding To embed Ranch in your application you can simply add the child specs to your supervision tree. This can all be done in the init/1 function of one of your application supervisors.</description>
</item>
<item>
@@ -491,7 +539,17 @@
<guid>https://ninenines.eu/docs/en/ranch/1.4/guide/embedded/</guid>
<description>Embedded mode allows you to insert Ranch listeners directly in your supervision tree. This allows for greater fault tolerance control by permitting the shutdown of a listener due to the failure of another part of the application and vice versa.
- Embedding To embed Ranch in your application you can simply add the child specs to your supervision tree. This can all be done in the init/1 function of one of your application supervisors.</description>
+Embedding To embed Ranch in your application you can simply add the child specs to your supervision tree. This can all be done in the init/1 function of one of your application supervisors.</description>
+ </item>
+
+ <item>
+ <title>Embedded mode</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.5/guide/embedded/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.5/guide/embedded/</guid>
+ <description>Embedded mode allows you to insert Ranch listeners directly in your supervision tree. This allows for greater fault tolerance control by permitting the shutdown of a listener due to the failure of another part of the application and vice versa.
+Embedding To embed Ranch in your application you can simply add the child specs to your supervision tree. This can all be done in the init/1 function of one of your application supervisors.</description>
</item>
<item>
@@ -501,9 +559,10 @@
<guid>https://ninenines.eu/docs/en/erlang.mk/1/guide/limitations/</guid>
<description>No software is perfect.
- It&amp;#8217;s very important, when evaluating and when using a tool, to understand its limitations, so as to avoid making mistakes and wasting valuable time.
- This chapter lists all known limitations of Erlang.mk.
- Erlang must be available Currently Erlang.mk requires you to install Erlang beforehand. Installing Erlang is not always easy, particularly if you need a specific version of Erlang for a specific project.</description>
+It&amp;apos;s very important, when evaluating and when using a tool, to understand its limitations, so as to avoid making mistakes and wasting valuable time.
+This chapter lists all known limitations of Erlang.mk.
+Erlang must be available Currently Erlang.mk requires you to install Erlang beforehand. Installing Erlang is not always easy, particularly if you need a specific version of Erlang for a specific project.
+In addition, the Erlang being used must be in your $PATH before you use Erlang.</description>
</item>
<item>
@@ -513,8 +572,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.0/guide/flow_diagram/</guid>
<description>Cowboy is a lightweight HTTP server with support for HTTP/1.1, HTTP/2 and Websocket.
- It is built on top of Ranch. Please see the Ranch guide for more information about how the network connections are handled.
- Overview As you can see on the diagram, the client begins by connecting to the server. This step is handled by a Ranch acceptor, which is a process dedicated to accepting new connections.</description>
+It is built on top of Ranch. Please see the Ranch guide for more information about how the network connections are handled.
+Overview As you can see on the diagram, the client begins by connecting to the server. This step is handled by a Ranch acceptor, which is a process dedicated to accepting new connections.
+After Ranch accepts a new connection, whether it is an HTTP/1.</description>
</item>
<item>
@@ -524,8 +584,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/guide/flow_diagram/</guid>
<description>Cowboy is a lightweight HTTP server with support for HTTP/1.1, HTTP/2 and Websocket.
- It is built on top of Ranch. Please see the Ranch guide for more information about how the network connections are handled.
- Overview As you can see on the diagram, the client begins by connecting to the server. This step is handled by a Ranch acceptor, which is a process dedicated to accepting new connections.</description>
+It is built on top of Ranch. Please see the Ranch guide for more information about how the network connections are handled.
+Overview As you can see on the diagram, the client begins by connecting to the server. This step is handled by a Ranch acceptor, which is a process dedicated to accepting new connections.
+After Ranch accepts a new connection, whether it is an HTTP/1.</description>
</item>
<item>
@@ -535,8 +596,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/guide/flow_diagram/</guid>
<description>Cowboy is a lightweight HTTP server with support for HTTP/1.1, HTTP/2 and Websocket.
- It is built on top of Ranch. Please see the Ranch guide for more information about how the network connections are handled.
- Overview As you can see on the diagram, the client begins by connecting to the server. This step is handled by a Ranch acceptor, which is a process dedicated to accepting new connections.</description>
+It is built on top of Ranch. Please see the Ranch guide for more information about how the network connections are handled.
+Overview As you can see on the diagram, the client begins by connecting to the server. This step is handled by a Ranch acceptor, which is a process dedicated to accepting new connections.
+After Ranch accepts a new connection, whether it is an HTTP/1.</description>
</item>
<item>
@@ -546,8 +608,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/guide/flow_diagram/</guid>
<description>Cowboy is a lightweight HTTP server with support for HTTP/1.1, HTTP/2 and Websocket.
- It is built on top of Ranch. Please see the Ranch guide for more information about how the network connections are handled.
- Overview As you can see on the diagram, the client begins by connecting to the server. This step is handled by a Ranch acceptor, which is a process dedicated to accepting new connections.</description>
+It is built on top of Ranch. Please see the Ranch guide for more information about how the network connections are handled.
+Overview As you can see on the diagram, the client begins by connecting to the server. This step is handled by a Ranch acceptor, which is a process dedicated to accepting new connections.
+After Ranch accepts a new connection, whether it is an HTTP/1.</description>
</item>
<item>
@@ -557,8 +620,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/guide/flow_diagram/</guid>
<description>Cowboy is a lightweight HTTP server with support for HTTP/1.1, HTTP/2 and Websocket.
- It is built on top of Ranch. Please see the Ranch guide for more information about how the network connections are handled.
- Overview As you can see on the diagram, the client begins by connecting to the server. This step is handled by a Ranch acceptor, which is a process dedicated to accepting new connections.</description>
+It is built on top of Ranch. Please see the Ranch guide for more information about how the network connections are handled.
+Overview As you can see on the diagram, the client begins by connecting to the server. This step is handled by a Ranch acceptor, which is a process dedicated to accepting new connections.
+After Ranch accepts a new connection, whether it is an HTTP/1.</description>
</item>
<item>
@@ -568,8 +632,8 @@
<guid>https://ninenines.eu/docs/en/gun/1.0/guide/websocket/</guid>
<description>This chapter describes how to use the Gun client for communicating with a Websocket server.
- HTTP upgrade Websocket is a protocol built on top of HTTP. To use Websocket, you must first request for the connection to be upgraded. Only HTTP/1.1 connections can be upgraded to Websocket, so you might need to restrict the protocol to HTTP/1.1 if you are planning to use Websocket over TLS.
- You must use the gun:ws_upgrade/2,3,4 function to upgrade to Websocket.</description>
+HTTP upgrade Websocket is a protocol built on top of HTTP. To use Websocket, you must first request for the connection to be upgraded. Only HTTP/1.1 connections can be upgraded to Websocket, so you might need to restrict the protocol to HTTP/1.1 if you are planning to use Websocket over TLS.
+You must use the gun:ws_upgrade/2,3,4 function to upgrade to Websocket.</description>
</item>
<item>
@@ -579,8 +643,8 @@
<guid>https://ninenines.eu/docs/en/ranch/1.2/guide/parsers/</guid>
<description>There are three kinds of protocols:
- Text protocols Schema-less binary protocols Schema-based binary protocols This chapter introduces the first two kinds. It will not cover more advanced topics such as continuations or parser generators.
- This chapter isn&amp;#8217;t specifically about Ranch, we assume here that you know how to read data from the socket. The data you read and the data that hasn&amp;#8217;t been parsed is saved in a buffer.</description>
+Text protocols Schema-less binary protocols Schema-based binary protocols This chapter introduces the first two kinds. It will not cover more advanced topics such as continuations or parser generators.
+This chapter isn&amp;apos;t specifically about Ranch, we assume here that you know how to read data from the socket. The data you read and the data that hasn&amp;apos;t been parsed is saved in a buffer.</description>
</item>
<item>
@@ -590,8 +654,8 @@
<guid>https://ninenines.eu/docs/en/ranch/1.3/guide/parsers/</guid>
<description>There are three kinds of protocols:
- Text protocols Schema-less binary protocols Schema-based binary protocols This chapter introduces the first two kinds. It will not cover more advanced topics such as continuations or parser generators.
- This chapter isn&amp;#8217;t specifically about Ranch, we assume here that you know how to read data from the socket. The data you read and the data that hasn&amp;#8217;t been parsed is saved in a buffer.</description>
+Text protocols Schema-less binary protocols Schema-based binary protocols This chapter introduces the first two kinds. It will not cover more advanced topics such as continuations or parser generators.
+This chapter isn&amp;apos;t specifically about Ranch, we assume here that you know how to read data from the socket. The data you read and the data that hasn&amp;apos;t been parsed is saved in a buffer.</description>
</item>
<item>
@@ -601,8 +665,19 @@
<guid>https://ninenines.eu/docs/en/ranch/1.4/guide/parsers/</guid>
<description>There are three kinds of protocols:
- Text protocols Schema-less binary protocols Schema-based binary protocols This chapter introduces the first two kinds. It will not cover more advanced topics such as continuations or parser generators.
- This chapter isn&amp;#8217;t specifically about Ranch, we assume here that you know how to read data from the socket. The data you read and the data that hasn&amp;#8217;t been parsed is saved in a buffer.</description>
+Text protocols Schema-less binary protocols Schema-based binary protocols This chapter introduces the first two kinds. It will not cover more advanced topics such as continuations or parser generators.
+This chapter isn&amp;apos;t specifically about Ranch, we assume here that you know how to read data from the socket. The data you read and the data that hasn&amp;apos;t been parsed is saved in a buffer.</description>
+ </item>
+
+ <item>
+ <title>Writing parsers</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.5/guide/parsers/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.5/guide/parsers/</guid>
+ <description>There are three kinds of protocols:
+Text protocols Schema-less binary protocols Schema-based binary protocols This chapter introduces the first two kinds. It will not cover more advanced topics such as continuations or parser generators.
+This chapter isn&amp;apos;t specifically about Ranch, we assume here that you know how to read data from the socket. The data you read and the data that hasn&amp;apos;t been parsed is saved in a buffer.</description>
</item>
<item>
@@ -612,9 +687,9 @@
<guid>https://ninenines.eu/docs/en/erlang.mk/1/guide/app/</guid>
<description>Erlang.mk can do a lot of things, but it is, first and foremost, a build tool. In this chapter we will cover the basics of building a project with Erlang.mk.
- For most of this chapter, we will assume that you are using a project generated by Erlang.mk.
- How to build To build a project, all you have to do is type make:
- $ make It will work regardless of your project: OTP applications, library applications, NIFs, port drivers or even releases.</description>
+For most of this chapter, we will assume that you are using a project generated by Erlang.mk.
+How to build To build a project, all you have to do is type make:
+$ make It will work regardless of your project: OTP applications, library applications, NIFs, port drivers or even releases.</description>
</item>
<item>
@@ -624,8 +699,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.0/guide/listeners/</guid>
<description>A listener is a set of processes that listens on a port for new connections. Incoming connections get handled by Cowboy. Depending on the connection handshake, one or another protocol may be used.
- This chapter is specific to Cowboy. Please refer to the Ranch User Guide for more information about listeners.
- Cowboy provides two types of listeners: one listening for clear TCP connections, and one listening for secure TLS connections.</description>
+This chapter is specific to Cowboy. Please refer to the Ranch User Guide for more information about listeners.
+Cowboy provides two types of listeners: one listening for clear TCP connections, and one listening for secure TLS connections. Both of them support the HTTP/1.</description>
</item>
<item>
@@ -635,8 +710,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/guide/listeners/</guid>
<description>A listener is a set of processes that listens on a port for new connections. Incoming connections get handled by Cowboy. Depending on the connection handshake, one or another protocol may be used.
- This chapter is specific to Cowboy. Please refer to the Ranch User Guide for more information about listeners.
- Cowboy provides two types of listeners: one listening for clear TCP connections, and one listening for secure TLS connections.</description>
+This chapter is specific to Cowboy. Please refer to the Ranch User Guide for more information about listeners.
+Cowboy provides two types of listeners: one listening for clear TCP connections, and one listening for secure TLS connections. Both of them support the HTTP/1.</description>
</item>
<item>
@@ -646,8 +721,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/guide/listeners/</guid>
<description>A listener is a set of processes that listens on a port for new connections. Incoming connections get handled by Cowboy. Depending on the connection handshake, one or another protocol may be used.
- This chapter is specific to Cowboy. Please refer to the Ranch User Guide for more information about listeners.
- Cowboy provides two types of listeners: one listening for clear TCP connections, and one listening for secure TLS connections.</description>
+This chapter is specific to Cowboy. Please refer to the Ranch User Guide for more information about listeners.
+Cowboy provides two types of listeners: one listening for clear TCP connections, and one listening for secure TLS connections. Both of them support the HTTP/1.</description>
</item>
<item>
@@ -657,8 +732,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/guide/listeners/</guid>
<description>A listener is a set of processes that listens on a port for new connections. Incoming connections get handled by Cowboy. Depending on the connection handshake, one or another protocol may be used.
- This chapter is specific to Cowboy. Please refer to the Ranch User Guide for more information about listeners.
- Cowboy provides two types of listeners: one listening for clear TCP connections, and one listening for secure TLS connections.</description>
+This chapter is specific to Cowboy. Please refer to the Ranch User Guide for more information about listeners.
+Cowboy provides two types of listeners: one listening for clear TCP connections, and one listening for secure TLS connections. Both of them support the HTTP/1.</description>
</item>
<item>
@@ -668,8 +743,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/guide/listeners/</guid>
<description>A listener is a set of processes that listens on a port for new connections. Incoming connections get handled by Cowboy. Depending on the connection handshake, one or another protocol may be used.
- This chapter is specific to Cowboy. Please refer to the Ranch User Guide for more information about listeners.
- Cowboy provides two types of listeners: one listening for clear TCP connections, and one listening for secure TLS connections.</description>
+This chapter is specific to Cowboy. Please refer to the Ranch User Guide for more information about listeners.
+Cowboy provides two types of listeners: one listening for clear TCP connections, and one listening for secure TLS connections. Both of them support the HTTP/1.</description>
</item>
<item>
@@ -679,7 +754,7 @@
<guid>https://ninenines.eu/docs/en/ranch/1.2/guide/ssl_auth/</guid>
<description>Purpose SSL client authentication is a mechanism allowing applications to identify certificates. This allows your application to make sure that the client is an authorized certificate, but makes no claim about whether the user can be trusted. This can be combined with a password based authentication to attain greater security.
- The server only needs to retain the certificate serial number and the certificate issuer to authenticate the certificate. Together, they can be used to uniquely identify a certicate.</description>
+The server only needs to retain the certificate serial number and the certificate issuer to authenticate the certificate. Together, they can be used to uniquely identify a certicate.</description>
</item>
<item>
@@ -689,7 +764,7 @@
<guid>https://ninenines.eu/docs/en/ranch/1.3/guide/ssl_auth/</guid>
<description>Purpose SSL client authentication is a mechanism allowing applications to identify certificates. This allows your application to make sure that the client is an authorized certificate, but makes no claim about whether the user can be trusted. This can be combined with a password based authentication to attain greater security.
- The server only needs to retain the certificate serial number and the certificate issuer to authenticate the certificate. Together, they can be used to uniquely identify a certicate.</description>
+The server only needs to retain the certificate serial number and the certificate issuer to authenticate the certificate. Together, they can be used to uniquely identify a certicate.</description>
</item>
<item>
@@ -699,7 +774,17 @@
<guid>https://ninenines.eu/docs/en/ranch/1.4/guide/ssl_auth/</guid>
<description>Purpose SSL client authentication is a mechanism allowing applications to identify certificates. This allows your application to make sure that the client is an authorized certificate, but makes no claim about whether the user can be trusted. This can be combined with a password based authentication to attain greater security.
- The server only needs to retain the certificate serial number and the certificate issuer to authenticate the certificate. Together, they can be used to uniquely identify a certicate.</description>
+The server only needs to retain the certificate serial number and the certificate issuer to authenticate the certificate. Together, they can be used to uniquely identify a certicate.</description>
+ </item>
+
+ <item>
+ <title>SSL client authentication</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.5/guide/ssl_auth/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.5/guide/ssl_auth/</guid>
+ <description>Purpose SSL client authentication is a mechanism allowing applications to identify certificates. This allows your application to make sure that the client is an authorized certificate, but makes no claim about whether the user can be trusted. This can be combined with a password based authentication to attain greater security.
+The server only needs to retain the certificate serial number and the certificate issuer to authenticate the certificate. Together, they can be used to uniquely identify a certicate.</description>
</item>
<item>
@@ -709,8 +794,8 @@
<guid>https://ninenines.eu/docs/en/erlang.mk/1/guide/deps/</guid>
<description>Erlang.mk can fetch and compile the dependencies that your project requires. Erlang.mk improves upon the concepts introduced by Rebar, so they should be familiar to many seasoned Erlang developers.
- Erlang.mk is not a package manager, nor is it trying to be, but it does include an index of Erlang packages to make discovering useful projects easier.
- This chapter will explain how to use packages, add dependencies to your project or bundle them directly in a single repository.</description>
+Erlang.mk is not a package manager, nor is it trying to be, but it does include an index of Erlang packages to make discovering useful projects easier.
+This chapter will explain how to use packages, add dependencies to your project or bundle them directly in a single repository.</description>
</item>
<item>
@@ -720,9 +805,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.0/guide/routing/</guid>
<description>Cowboy does nothing by default.
- To make Cowboy useful, you need to map URIs to Erlang modules that will handle the requests. This is called routing.
- When Cowboy receives a request, it tries to match the requested host and path to the configured routes. When there&amp;#8217;s a match, the route&amp;#8217;s associated handler is executed.
- Routes need to be compiled before they can be used by Cowboy. The result of the compilation is the dispatch rules.</description>
+To make Cowboy useful, you need to map URIs to Erlang modules that will handle the requests. This is called routing.
+When Cowboy receives a request, it tries to match the requested host and path to the configured routes. When there&amp;apos;s a match, the route&amp;apos;s associated handler is executed.
+Routes need to be compiled before they can be used by Cowboy. The result of the compilation is the dispatch rules.</description>
</item>
<item>
@@ -732,9 +817,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/guide/routing/</guid>
<description>Cowboy does nothing by default.
- To make Cowboy useful, you need to map URIs to Erlang modules that will handle the requests. This is called routing.
- When Cowboy receives a request, it tries to match the requested host and path to the configured routes. When there&amp;#8217;s a match, the route&amp;#8217;s associated handler is executed.
- Routes need to be compiled before they can be used by Cowboy. The result of the compilation is the dispatch rules.</description>
+To make Cowboy useful, you need to map URIs to Erlang modules that will handle the requests. This is called routing.
+When Cowboy receives a request, it tries to match the requested host and path to the configured routes. When there&amp;apos;s a match, the route&amp;apos;s associated handler is executed.
+Routes need to be compiled before they can be used by Cowboy. The result of the compilation is the dispatch rules.</description>
</item>
<item>
@@ -744,9 +829,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/guide/routing/</guid>
<description>Cowboy does nothing by default.
- To make Cowboy useful, you need to map URIs to Erlang modules that will handle the requests. This is called routing.
- When Cowboy receives a request, it tries to match the requested host and path to the configured routes. When there&amp;#8217;s a match, the route&amp;#8217;s associated handler is executed.
- Routes need to be compiled before they can be used by Cowboy. The result of the compilation is the dispatch rules.</description>
+To make Cowboy useful, you need to map URIs to Erlang modules that will handle the requests. This is called routing.
+When Cowboy receives a request, it tries to match the requested host and path to the configured routes. When there&amp;apos;s a match, the route&amp;apos;s associated handler is executed.
+Routes need to be compiled before they can be used by Cowboy. The result of the compilation is the dispatch rules.</description>
</item>
<item>
@@ -756,9 +841,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/guide/routing/</guid>
<description>Cowboy does nothing by default.
- To make Cowboy useful, you need to map URIs to Erlang modules that will handle the requests. This is called routing.
- When Cowboy receives a request, it tries to match the requested host and path to the configured routes. When there&amp;#8217;s a match, the route&amp;#8217;s associated handler is executed.
- Routes need to be compiled before they can be used by Cowboy. The result of the compilation is the dispatch rules.</description>
+To make Cowboy useful, you need to map URIs to Erlang modules that will handle the requests. This is called routing.
+When Cowboy receives a request, it tries to match the requested host and path to the configured routes. When there&amp;apos;s a match, the route&amp;apos;s associated handler is executed.
+Routes need to be compiled before they can be used by Cowboy. The result of the compilation is the dispatch rules.</description>
</item>
<item>
@@ -768,9 +853,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/guide/routing/</guid>
<description>Cowboy does nothing by default.
- To make Cowboy useful, you need to map URIs to Erlang modules that will handle the requests. This is called routing.
- When Cowboy receives a request, it tries to match the requested host and path to the configured routes. When there&amp;#8217;s a match, the route&amp;#8217;s associated handler is executed.
- Routes need to be compiled before they can be used by Cowboy. The result of the compilation is the dispatch rules.</description>
+To make Cowboy useful, you need to map URIs to Erlang modules that will handle the requests. This is called routing.
+When Cowboy receives a request, it tries to match the requested host and path to the configured routes. When there&amp;apos;s a match, the route&amp;apos;s associated handler is executed.
+Routes need to be compiled before they can be used by Cowboy. The result of the compilation is the dispatch rules.</description>
</item>
<item>
@@ -780,8 +865,8 @@
<guid>https://ninenines.eu/docs/en/erlang.mk/1/guide/ports/</guid>
<description>Erlang.mk can not only build Erlang projects, but also the C code that some projects come with, like NIFs and port drivers.
- There are two ways to build the C code: using a custom Makefile, or making Erlang.mk do it directly. The C code will be built as needed when you run make.
- C source code location and Erlang environment The C source code should be located in the $(C_SRC_DIR) directory.</description>
+There are two ways to build the C code: using a custom Makefile, or making Erlang.mk do it directly. The C code will be built as needed when you run make.
+C source code location and Erlang environment The C source code should be located in the $(C_SRC_DIR) directory.</description>
</item>
<item>
@@ -791,7 +876,7 @@
<guid>https://ninenines.eu/docs/en/ranch/1.2/guide/internals/</guid>
<description>This chapter may not apply to embedded Ranch as embedding allows you to use an architecture specific to your application, which may or may not be compatible with the description of the Ranch application.
- Note that for everything related to efficiency and performance, you should perform the benchmarks yourself to get the numbers that matter to you. Generic benchmarks found on the web may or may not be of use to you, you can never know until you benchmark your own system.</description>
+Note that for everything related to efficiency and performance, you should perform the benchmarks yourself to get the numbers that matter to you. Generic benchmarks found on the web may or may not be of use to you, you can never know until you benchmark your own system.</description>
</item>
<item>
@@ -801,7 +886,7 @@
<guid>https://ninenines.eu/docs/en/ranch/1.3/guide/internals/</guid>
<description>This chapter may not apply to embedded Ranch as embedding allows you to use an architecture specific to your application, which may or may not be compatible with the description of the Ranch application.
- Note that for everything related to efficiency and performance, you should perform the benchmarks yourself to get the numbers that matter to you. Generic benchmarks found on the web may or may not be of use to you, you can never know until you benchmark your own system.</description>
+Note that for everything related to efficiency and performance, you should perform the benchmarks yourself to get the numbers that matter to you. Generic benchmarks found on the web may or may not be of use to you, you can never know until you benchmark your own system.</description>
</item>
<item>
@@ -811,7 +896,17 @@
<guid>https://ninenines.eu/docs/en/ranch/1.4/guide/internals/</guid>
<description>This chapter may not apply to embedded Ranch as embedding allows you to use an architecture specific to your application, which may or may not be compatible with the description of the Ranch application.
- Note that for everything related to efficiency and performance, you should perform the benchmarks yourself to get the numbers that matter to you. Generic benchmarks found on the web may or may not be of use to you, you can never know until you benchmark your own system.</description>
+Note that for everything related to efficiency and performance, you should perform the benchmarks yourself to get the numbers that matter to you. Generic benchmarks found on the web may or may not be of use to you, you can never know until you benchmark your own system.</description>
+ </item>
+
+ <item>
+ <title>Internals</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.5/guide/internals/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.5/guide/internals/</guid>
+ <description>This chapter may not apply to embedded Ranch as embedding allows you to use an architecture specific to your application, which may or may not be compatible with the description of the Ranch application.
+Note that for everything related to efficiency and performance, you should perform the benchmarks yourself to get the numbers that matter to you. Generic benchmarks found on the web may or may not be of use to you, you can never know until you benchmark your own system.</description>
</item>
<item>
@@ -821,9 +916,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.0/guide/constraints/</guid>
<description>Constraints are validation and conversion functions applied to user input.
- They are used in various places in Cowboy, including the router and the cowboy_req match functions.
- Syntax Constraints are provided as a list of fields. For each field in the list, specific constraints can be applied, as well as a default value if the field is missing.
- A field can take the form of an atom field, a tuple with constraints {field, Constraints} or a tuple with constraints and a default value {field, Constraints, Default}.</description>
+They are used in various places in Cowboy, including the router and the cowboy_req match functions.
+Syntax Constraints are provided as a list of fields. For each field in the list, specific constraints can be applied, as well as a default value if the field is missing.
+A field can take the form of an atom field, a tuple with constraints {field, Constraints} or a tuple with constraints and a default value {field, Constraints, Default}.</description>
</item>
<item>
@@ -833,9 +928,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/guide/constraints/</guid>
<description>Constraints are validation and conversion functions applied to user input.
- They are used in various places in Cowboy, including the router and the cowboy_req match functions.
- Syntax Constraints are provided as a list of fields. For each field in the list, specific constraints can be applied, as well as a default value if the field is missing.
- A field can take the form of an atom field, a tuple with constraints {field, Constraints} or a tuple with constraints and a default value {field, Constraints, Default}.</description>
+They are used in various places in Cowboy, including the router and the cowboy_req match functions.
+Syntax Constraints are provided as a list of fields. For each field in the list, specific constraints can be applied, as well as a default value if the field is missing.
+A field can take the form of an atom field, a tuple with constraints {field, Constraints} or a tuple with constraints and a default value {field, Constraints, Default}.</description>
</item>
<item>
@@ -845,9 +940,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/guide/constraints/</guid>
<description>Constraints are validation and conversion functions applied to user input.
- They are used in various places in Cowboy, including the router and the cowboy_req match functions.
- Syntax Constraints are provided as a list of fields. For each field in the list, specific constraints can be applied, as well as a default value if the field is missing.
- A field can take the form of an atom field, a tuple with constraints {field, Constraints} or a tuple with constraints and a default value {field, Constraints, Default}.</description>
+They are used in various places in Cowboy, including the router and the cowboy_req match functions.
+Syntax Constraints are provided as a list of fields. For each field in the list, specific constraints can be applied, as well as a default value if the field is missing.
+A field can take the form of an atom field, a tuple with constraints {field, Constraints} or a tuple with constraints and a default value {field, Constraints, Default}.</description>
</item>
<item>
@@ -857,9 +952,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/guide/constraints/</guid>
<description>Constraints are validation and conversion functions applied to user input.
- They are used in various places in Cowboy, including the router and the cowboy_req match functions.
- Syntax Constraints are provided as a list of fields. For each field in the list, specific constraints can be applied, as well as a default value if the field is missing.
- A field can take the form of an atom field, a tuple with constraints {field, Constraints} or a tuple with constraints and a default value {field, Constraints, Default}.</description>
+They are used in various places in Cowboy, including the router and the cowboy_req match functions.
+Syntax Constraints are provided as a list of fields. For each field in the list, specific constraints can be applied, as well as a default value if the field is missing.
+A field can take the form of an atom field, a tuple with constraints {field, Constraints} or a tuple with constraints and a default value {field, Constraints, Default}.</description>
</item>
<item>
@@ -869,9 +964,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/guide/constraints/</guid>
<description>Constraints are validation and conversion functions applied to user input.
- They are used in various places in Cowboy, including the router and the cowboy_req match functions.
- Syntax Constraints are provided as a list of fields. For each field in the list, specific constraints can be applied, as well as a default value if the field is missing.
- A field can take the form of an atom field, a tuple with constraints {field, Constraints} or a tuple with constraints and a default value {field, Constraints, Default}.</description>
+They are used in various places in Cowboy, including the router and the cowboy_req match functions.
+Syntax Constraints are provided as a list of fields. For each field in the list, specific constraints can be applied, as well as a default value if the field is missing.
+A field can take the form of an atom field, a tuple with constraints {field, Constraints} or a tuple with constraints and a default value {field, Constraints, Default}.</description>
</item>
<item>
@@ -881,8 +976,8 @@
<guid>https://ninenines.eu/docs/en/erlang.mk/1/guide/releases/</guid>
<description>Erlang.mk relies on Relx for generating releases. This chapter covers the Erlang.mk-specific bits. Consult the Relx website for more information.
- Setup Erlang.mk will create a release if it detects a Relx configuration file in the $(RELX_CONFIG) location. This defaults to $(CURDIR)/relx.config. You can override it by defining the variable before including Erlang.mk:
- RELX_CONFIG = $(CURDIR)/webchat.config Relx does not need to be installed. Erlang.mk will download and build it automatically.</description>
+Setup Erlang.mk will create a release if it detects a Relx configuration file in the $(RELX_CONFIG) location. This defaults to $(CURDIR)/relx.config. You can override it by defining the variable before including Erlang.mk:
+RELX_CONFIG = $(CURDIR)/webchat.config Relx does not need to be installed. Erlang.mk will download and build it automatically.</description>
</item>
<item>
@@ -892,9 +987,9 @@
<guid>https://ninenines.eu/docs/en/erlang.mk/1/guide/sfx/</guid>
<description>Erlang.mk allows you to package 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:</description>
+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:</description>
</item>
<item>
@@ -904,10 +999,10 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.0/guide/handlers/</guid>
<description>Handlers are Erlang modules that handle HTTP requests.
- Plain HTTP handlers The most basic handler in Cowboy implements the mandatory init/2 callback, manipulates the request, optionally sends a response and then returns.
- This callback receives the Req object and the initial state defined in the router configuration.
- A handler that does nothing would look like this:
- init(Req, State) -&amp;gt; {ok, Req, State}. Despite sending no reply, a 204 No Content response will be sent to the client, as Cowboy makes sure that a response is sent for every request.</description>
+Plain HTTP handlers The most basic handler in Cowboy implements the mandatory init/2 callback, manipulates the request, optionally sends a response and then returns.
+This callback receives the Req object and the initial state defined in the router configuration.
+A handler that does nothing would look like this:
+init(Req, State) -&amp;gt; {ok, Req, State}. Despite sending no reply, a 204 No Content response will be sent to the client, as Cowboy makes sure that a response is sent for every request.</description>
</item>
<item>
@@ -917,10 +1012,10 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/guide/handlers/</guid>
<description>Handlers are Erlang modules that handle HTTP requests.
- Plain HTTP handlers The most basic handler in Cowboy implements the mandatory init/2 callback, manipulates the request, optionally sends a response and then returns.
- This callback receives the Req object and the initial state defined in the router configuration.
- A handler that does nothing would look like this:
- init(Req, State) -&amp;gt; {ok, Req, State}. Despite sending no reply, a 204 No Content response will be sent to the client, as Cowboy makes sure that a response is sent for every request.</description>
+Plain HTTP handlers The most basic handler in Cowboy implements the mandatory init/2 callback, manipulates the request, optionally sends a response and then returns.
+This callback receives the Req object and the initial state defined in the router configuration.
+A handler that does nothing would look like this:
+init(Req, State) -&amp;gt; {ok, Req, State}. Despite sending no reply, a 204 No Content response will be sent to the client, as Cowboy makes sure that a response is sent for every request.</description>
</item>
<item>
@@ -930,10 +1025,10 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/guide/handlers/</guid>
<description>Handlers are Erlang modules that handle HTTP requests.
- Plain HTTP handlers The most basic handler in Cowboy implements the mandatory init/2 callback, manipulates the request, optionally sends a response and then returns.
- This callback receives the Req object and the initial state defined in the router configuration.
- A handler that does nothing would look like this:
- init(Req, State) -&amp;gt; {ok, Req, State}. Despite sending no reply, a 204 No Content response will be sent to the client, as Cowboy makes sure that a response is sent for every request.</description>
+Plain HTTP handlers The most basic handler in Cowboy implements the mandatory init/2 callback, manipulates the request, optionally sends a response and then returns.
+This callback receives the Req object and the initial state defined in the router configuration.
+A handler that does nothing would look like this:
+init(Req, State) -&amp;gt; {ok, Req, State}. Despite sending no reply, a 204 No Content response will be sent to the client, as Cowboy makes sure that a response is sent for every request.</description>
</item>
<item>
@@ -943,10 +1038,10 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/guide/handlers/</guid>
<description>Handlers are Erlang modules that handle HTTP requests.
- Plain HTTP handlers The most basic handler in Cowboy implements the mandatory init/2 callback, manipulates the request, optionally sends a response and then returns.
- This callback receives the Req object and the initial state defined in the router configuration.
- A handler that does nothing would look like this:
- init(Req, State) -&amp;gt; {ok, Req, State}. Despite sending no reply, a 204 No Content response will be sent to the client, as Cowboy makes sure that a response is sent for every request.</description>
+Plain HTTP handlers The most basic handler in Cowboy implements the mandatory init/2 callback, manipulates the request, optionally sends a response and then returns.
+This callback receives the Req object and the initial state defined in the router configuration.
+A handler that does nothing would look like this:
+init(Req, State) -&amp;gt; {ok, Req, State}. Despite sending no reply, a 204 No Content response will be sent to the client, as Cowboy makes sure that a response is sent for every request.</description>
</item>
<item>
@@ -956,10 +1051,10 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/guide/handlers/</guid>
<description>Handlers are Erlang modules that handle HTTP requests.
- Plain HTTP handlers The most basic handler in Cowboy implements the mandatory init/2 callback, manipulates the request, optionally sends a response and then returns.
- This callback receives the Req object and the initial state defined in the router configuration.
- A handler that does nothing would look like this:
- init(Req, State) -&amp;gt; {ok, Req, State}. Despite sending no reply, a 204 No Content response will be sent to the client, as Cowboy makes sure that a response is sent for every request.</description>
+Plain HTTP handlers The most basic handler in Cowboy implements the mandatory init/2 callback, manipulates the request, optionally sends a response and then returns.
+This callback receives the Req object and the initial state defined in the router configuration.
+A handler that does nothing would look like this:
+init(Req, State) -&amp;gt; {ok, Req, State}. Despite sending no reply, a 204 No Content response will be sent to the client, as Cowboy makes sure that a response is sent for every request.</description>
</item>
<item>
@@ -969,9 +1064,9 @@
<guid>https://ninenines.eu/docs/en/erlang.mk/1/guide/escripts/</guid>
<description>Escripts are an alternative to release. They are meant to be used for small command line executables written in Erlang.
- They are not self-contained, unlike 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 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.</description>
+They are not self-contained, unlike 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 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.</description>
</item>
<item>
@@ -981,7 +1076,7 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.0/guide/loop_handlers/</guid>
<description>Loop handlers are a special kind of HTTP handlers used when the response can not be sent right away. The handler enters instead a receive loop waiting for the right message before it can send a response.
- Loop handlers are used for requests where a response might not be immediately available, but where you would like to keep the connection open for a while in case the response arrives. The most known example of such practice is known as long polling.</description>
+Loop handlers are used for requests where a response might not be immediately available, but where you would like to keep the connection open for a while in case the response arrives. The most known example of such practice is known as long polling.</description>
</item>
<item>
@@ -991,7 +1086,7 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/guide/loop_handlers/</guid>
<description>Loop handlers are a special kind of HTTP handlers used when the response can not be sent right away. The handler enters instead a receive loop waiting for the right message before it can send a response.
- Loop handlers are used for requests where a response might not be immediately available, but where you would like to keep the connection open for a while in case the response arrives. The most known example of such practice is known as long polling.</description>
+Loop handlers are used for requests where a response might not be immediately available, but where you would like to keep the connection open for a while in case the response arrives. The most known example of such practice is known as long polling.</description>
</item>
<item>
@@ -1001,7 +1096,7 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/guide/loop_handlers/</guid>
<description>Loop handlers are a special kind of HTTP handlers used when the response can not be sent right away. The handler enters instead a receive loop waiting for the right message before it can send a response.
- Loop handlers are used for requests where a response might not be immediately available, but where you would like to keep the connection open for a while in case the response arrives. The most known example of such practice is known as long polling.</description>
+Loop handlers are used for requests where a response might not be immediately available, but where you would like to keep the connection open for a while in case the response arrives. The most known example of such practice is known as long polling.</description>
</item>
<item>
@@ -1011,7 +1106,7 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/guide/loop_handlers/</guid>
<description>Loop handlers are a special kind of HTTP handlers used when the response can not be sent right away. The handler enters instead a receive loop waiting for the right message before it can send a response.
- Loop handlers are used for requests where a response might not be immediately available, but where you would like to keep the connection open for a while in case the response arrives. The most known example of such practice is known as long polling.</description>
+Loop handlers are used for requests where a response might not be immediately available, but where you would like to keep the connection open for a while in case the response arrives. The most known example of such practice is known as long polling.</description>
</item>
<item>
@@ -1021,7 +1116,7 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/guide/loop_handlers/</guid>
<description>Loop handlers are a special kind of HTTP handlers used when the response can not be sent right away. The handler enters instead a receive loop waiting for the right message before it can send a response.
- Loop handlers are used for requests where a response might not be immediately available, but where you would like to keep the connection open for a while in case the response arrives. The most known example of such practice is known as long polling.</description>
+Loop handlers are used for requests where a response might not be immediately available, but where you would like to keep the connection open for a while in case the response arrives. The most known example of such practice is known as long polling.</description>
</item>
<item>
@@ -1031,7 +1126,7 @@
<guid>https://ninenines.eu/docs/en/erlang.mk/1/guide/kerl/</guid>
<description>Erlang.mk comes with integrated support for Kerl, a shell script that automates the downloading, building and installing of Erlang/OTP. It can be used to easily build a specific Erlang/OTP version (with or without custom build options) or maintain different versions side by side.
- Erlang versions Erlang.mk uses the Git tags from Erlang/OTP to identify OTP versions. The most recent tag at the time of writing is OTP-20.0.4, which is a patch release of OTP-20.</description>
+Erlang versions Erlang.mk uses the Git tags from Erlang/OTP to identify OTP versions. The most recent tag at the time of writing is OTP-20.0.4, which is a patch release of OTP-20.</description>
</item>
<item>
@@ -1041,8 +1136,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.0/guide/static_files/</guid>
<description>Cowboy comes with a ready to use handler for serving static files. It is provided as a convenience for serving files during development.
- For systems in production, consider using one of the many Content Distribution Network (CDN) available on the market, as they are the best solution for serving files.
- The static handler can serve either one file or all files from a given directory. The etag generation and mime types can be configured.</description>
+For systems in production, consider using one of the many Content Distribution Network (CDN) available on the market, as they are the best solution for serving files.
+The static handler can serve either one file or all files from a given directory. The etag generation and mime types can be configured.</description>
</item>
<item>
@@ -1052,8 +1147,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/guide/static_files/</guid>
<description>Cowboy comes with a ready to use handler for serving static files. It is provided as a convenience for serving files during development.
- For systems in production, consider using one of the many Content Distribution Network (CDN) available on the market, as they are the best solution for serving files.
- The static handler can serve either one file or all files from a given directory. The etag generation and mime types can be configured.</description>
+For systems in production, consider using one of the many Content Distribution Network (CDN) available on the market, as they are the best solution for serving files.
+The static handler can serve either one file or all files from a given directory. The etag generation and mime types can be configured.</description>
</item>
<item>
@@ -1063,8 +1158,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/guide/static_files/</guid>
<description>Cowboy comes with a ready to use handler for serving static files. It is provided as a convenience for serving files during development.
- For systems in production, consider using one of the many Content Distribution Network (CDN) available on the market, as they are the best solution for serving files.
- The static handler can serve either one file or all files from a given directory. The etag generation and mime types can be configured.</description>
+For systems in production, consider using one of the many Content Distribution Network (CDN) available on the market, as they are the best solution for serving files.
+The static handler can serve either one file or all files from a given directory. The etag generation and mime types can be configured.</description>
</item>
<item>
@@ -1074,8 +1169,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/guide/static_files/</guid>
<description>Cowboy comes with a ready to use handler for serving static files. It is provided as a convenience for serving files during development.
- For systems in production, consider using one of the many Content Distribution Network (CDN) available on the market, as they are the best solution for serving files.
- The static handler can serve either one file or all files from a given directory. The etag generation and mime types can be configured.</description>
+For systems in production, consider using one of the many Content Distribution Network (CDN) available on the market, as they are the best solution for serving files.
+The static handler can serve either one file or all files from a given directory. The etag generation and mime types can be configured.</description>
</item>
<item>
@@ -1085,8 +1180,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/guide/static_files/</guid>
<description>Cowboy comes with a ready to use handler for serving static files. It is provided as a convenience for serving files during development.
- For systems in production, consider using one of the many Content Distribution Network (CDN) available on the market, as they are the best solution for serving files.
- The static handler can serve either one file or all files from a given directory. The etag generation and mime types can be configured.</description>
+For systems in production, consider using one of the many Content Distribution Network (CDN) available on the market, as they are the best solution for serving files.
+The static handler can serve either one file or all files from a given directory. The etag generation and mime types can be configured.</description>
</item>
<item>
@@ -1096,7 +1191,7 @@
<guid>https://ninenines.eu/docs/en/erlang.mk/1/guide/compat/</guid>
<description>Erlang.mk tries its best to be compatible with the other Erlang build tools. It can use dependencies written with other build tools in mind, and can also make your projects usable by those build tools as well. Erlang.mk is like the cool kid that gets along with everybody.
- In this chapter I will use the term Rebar project to refer to a project built using Rebar 2, Rebar 3 or Mad.</description>
+In this chapter I will use the term Rebar project to refer to a project built using Rebar 2, Rebar 3 or Mad.</description>
</item>
<item>
@@ -1106,8 +1201,8 @@
<guid>https://ninenines.eu/docs/en/erlang.mk/1/guide/asciidoc/</guid>
<description>Erlang.mk provides rules for generating documentation from AsciiDoc files. It can automatically build a user guide PDF, chunked HTML documentation and Unix manual pages.
- Requirements It is necessary to have AsciiDoc, xsltproc and dblatex installed on your system for Erlang.mk to generate documentation from AsciiDoc sources.
- Writing AsciiDoc documentation AsciiDoc is a text document format for writing notes, documentation, articles, books, ebooks, slideshows, web pages, man pages and blogs.</description>
+Requirements It is necessary to have AsciiDoc, xsltproc and dblatex installed on your system for Erlang.mk to generate documentation from AsciiDoc sources.
+Writing AsciiDoc documentation AsciiDoc is a text document format for writing notes, documentation, articles, books, ebooks, slideshows, web pages, man pages and blogs. AsciiDoc files can be translated to many formats including HTML, PDF, EPUB, man page.</description>
</item>
<item>
@@ -1117,8 +1212,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.0/guide/req/</guid>
<description>The Req object is a variable used for obtaining information about a request, read its body or send a response.
- It is not really an object in the object-oriented sense. It is a simple map that can be directly accessed or used when calling functions from the cowboy_req module.
- The Req object is the subject of a few different chapters. In this chapter we will learn about the Req object and look at how to retrieve information about the request.</description>
+It is not really an object in the object-oriented sense. It is a simple map that can be directly accessed or used when calling functions from the cowboy_req module.
+The Req object is the subject of a few different chapters. In this chapter we will learn about the Req object and look at how to retrieve information about the request.</description>
</item>
<item>
@@ -1128,8 +1223,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/guide/req/</guid>
<description>The Req object is a variable used for obtaining information about a request, read its body or send a response.
- It is not really an object in the object-oriented sense. It is a simple map that can be directly accessed or used when calling functions from the cowboy_req module.
- The Req object is the subject of a few different chapters. In this chapter we will learn about the Req object and look at how to retrieve information about the request.</description>
+It is not really an object in the object-oriented sense. It is a simple map that can be directly accessed or used when calling functions from the cowboy_req module.
+The Req object is the subject of a few different chapters. In this chapter we will learn about the Req object and look at how to retrieve information about the request.</description>
</item>
<item>
@@ -1139,8 +1234,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/guide/req/</guid>
<description>The Req object is a variable used for obtaining information about a request, read its body or send a response.
- It is not really an object in the object-oriented sense. It is a simple map that can be directly accessed or used when calling functions from the cowboy_req module.
- The Req object is the subject of a few different chapters. In this chapter we will learn about the Req object and look at how to retrieve information about the request.</description>
+It is not really an object in the object-oriented sense. It is a simple map that can be directly accessed or used when calling functions from the cowboy_req module.
+The Req object is the subject of a few different chapters. In this chapter we will learn about the Req object and look at how to retrieve information about the request.</description>
</item>
<item>
@@ -1150,8 +1245,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/guide/req/</guid>
<description>The Req object is a variable used for obtaining information about a request, read its body or send a response.
- It is not really an object in the object-oriented sense. It is a simple map that can be directly accessed or used when calling functions from the cowboy_req module.
- The Req object is the subject of a few different chapters. In this chapter we will learn about the Req object and look at how to retrieve information about the request.</description>
+It is not really an object in the object-oriented sense. It is a simple map that can be directly accessed or used when calling functions from the cowboy_req module.
+The Req object is the subject of a few different chapters. In this chapter we will learn about the Req object and look at how to retrieve information about the request.</description>
</item>
<item>
@@ -1161,8 +1256,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/guide/req/</guid>
<description>The Req object is a variable used for obtaining information about a request, read its body or send a response.
- It is not really an object in the object-oriented sense. It is a simple map that can be directly accessed or used when calling functions from the cowboy_req module.
- The Req object is the subject of a few different chapters. In this chapter we will learn about the Req object and look at how to retrieve information about the request.</description>
+It is not really an object in the object-oriented sense. It is a simple map that can be directly accessed or used when calling functions from the cowboy_req module.
+The Req object is the subject of a few different chapters. In this chapter we will learn about the Req object and look at how to retrieve information about the request.</description>
</item>
<item>
@@ -1172,9 +1267,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.0/guide/req_body/</guid>
<description>The request body can be read using the Req object.
- Cowboy will not attempt to read the body until requested. You need to call the body reading functions in order to retrieve it.
- Cowboy will not cache the body, it is therefore only possible to read it once.
- You are not required to read it, however. If a body is present and was not read, Cowboy will either cancel or skip its download, depending on the protocol.</description>
+Cowboy will not attempt to read the body until requested. You need to call the body reading functions in order to retrieve it.
+Cowboy will not cache the body, it is therefore only possible to read it once.
+You are not required to read it, however. If a body is present and was not read, Cowboy will either cancel or skip its download, depending on the protocol.</description>
</item>
<item>
@@ -1184,9 +1279,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/guide/req_body/</guid>
<description>The request body can be read using the Req object.
- Cowboy will not attempt to read the body until requested. You need to call the body reading functions in order to retrieve it.
- Cowboy will not cache the body, it is therefore only possible to read it once.
- You are not required to read it, however. If a body is present and was not read, Cowboy will either cancel or skip its download, depending on the protocol.</description>
+Cowboy will not attempt to read the body until requested. You need to call the body reading functions in order to retrieve it.
+Cowboy will not cache the body, it is therefore only possible to read it once.
+You are not required to read it, however. If a body is present and was not read, Cowboy will either cancel or skip its download, depending on the protocol.</description>
</item>
<item>
@@ -1196,9 +1291,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/guide/req_body/</guid>
<description>The request body can be read using the Req object.
- Cowboy will not attempt to read the body until requested. You need to call the body reading functions in order to retrieve it.
- Cowboy will not cache the body, it is therefore only possible to read it once.
- You are not required to read it, however. If a body is present and was not read, Cowboy will either cancel or skip its download, depending on the protocol.</description>
+Cowboy will not attempt to read the body until requested. You need to call the body reading functions in order to retrieve it.
+Cowboy will not cache the body, it is therefore only possible to read it once.
+You are not required to read it, however. If a body is present and was not read, Cowboy will either cancel or skip its download, depending on the protocol.</description>
</item>
<item>
@@ -1208,9 +1303,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/guide/req_body/</guid>
<description>The request body can be read using the Req object.
- Cowboy will not attempt to read the body until requested. You need to call the body reading functions in order to retrieve it.
- Cowboy will not cache the body, it is therefore only possible to read it once.
- You are not required to read it, however. If a body is present and was not read, Cowboy will either cancel or skip its download, depending on the protocol.</description>
+Cowboy will not attempt to read the body until requested. You need to call the body reading functions in order to retrieve it.
+Cowboy will not cache the body, it is therefore only possible to read it once.
+You are not required to read it, however. If a body is present and was not read, Cowboy will either cancel or skip its download, depending on the protocol.</description>
</item>
<item>
@@ -1220,9 +1315,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/guide/req_body/</guid>
<description>The request body can be read using the Req object.
- Cowboy will not attempt to read the body until requested. You need to call the body reading functions in order to retrieve it.
- Cowboy will not cache the body, it is therefore only possible to read it once.
- You are not required to read it, however. If a body is present and was not read, Cowboy will either cancel or skip its download, depending on the protocol.</description>
+Cowboy will not attempt to read the body until requested. You need to call the body reading functions in order to retrieve it.
+Cowboy will not cache the body, it is therefore only possible to read it once.
+You are not required to read it, however. If a body is present and was not read, Cowboy will either cancel or skip its download, depending on the protocol.</description>
</item>
<item>
@@ -1232,9 +1327,9 @@
<guid>https://ninenines.eu/docs/en/erlang.mk/1/guide/edoc/</guid>
<description>Erlang.mk provides a thin wrapper on top of EDoc, an application that generates documentation based on comments found in modules.
- Writing EDoc comments The EDoc user guide explains everything you need to know about EDoc comments.
- Configuration The EDOC_OPTS variable allows you to specify additional EDoc options. Options are documented in the EDoc manual.
- A common use for this variable is to enable Markdown in doc comments, using the edown application:</description>
+Writing EDoc comments The EDoc user guide explains everything you need to know about EDoc comments.
+Configuration The EDOC_OPTS variable allows you to specify additional EDoc options. Options are documented in the EDoc manual.
+A common use for this variable is to enable Markdown in doc comments, using the edown application:</description>
</item>
<item>
@@ -1244,8 +1339,8 @@
<guid>https://ninenines.eu/docs/en/erlang.mk/1/guide/sphinx/</guid>
<description>Erlang.mk includes targets for running the Sphinx documentation generator, which can produce documentation in various formats, like HTML, man pages, Texinfo, LaTeX, and others.
- Writing Sphinx documentation Sphinx generates documentation from a set of reST documents. There is a quick start guide on Sphinx&#39; website. For Erlang.mk, we&amp;#8217;ll set up a minimal environment instead.
- Basic setup By default, Erlang.mk expects Sphinx documentation to be placed in the doc directory, with doc/conf.</description>
+Writing Sphinx documentation Sphinx generates documentation from a set of reST documents. There is a quick start guide on Sphinx&amp;apos; website. For Erlang.mk, we&amp;apos;ll set up a minimal environment instead.
+Basic setup By default, Erlang.mk expects Sphinx documentation to be placed in the doc directory, with doc/conf.</description>
</item>
<item>
@@ -1255,8 +1350,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.0/guide/resp/</guid>
<description>The response must be sent using the Req object.
- Cowboy provides two different ways of sending responses: either directly or by streaming the body. Response headers and body may be set in advance. The response is sent as soon as one of the reply or stream reply function is called.
- Cowboy also provides a simplified interface for sending files. It can also send only specific parts of a file.</description>
+Cowboy provides two different ways of sending responses: either directly or by streaming the body. Response headers and body may be set in advance. The response is sent as soon as one of the reply or stream reply function is called.
+Cowboy also provides a simplified interface for sending files. It can also send only specific parts of a file.
+While only one response is allowed for every request, HTTP/2 introduced a mechanism that allows the server to push additional resources related to the response.</description>
</item>
<item>
@@ -1266,8 +1362,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/guide/resp/</guid>
<description>The response must be sent using the Req object.
- Cowboy provides two different ways of sending responses: either directly or by streaming the body. Response headers and body may be set in advance. The response is sent as soon as one of the reply or stream reply function is called.
- Cowboy also provides a simplified interface for sending files. It can also send only specific parts of a file.</description>
+Cowboy provides two different ways of sending responses: either directly or by streaming the body. Response headers and body may be set in advance. The response is sent as soon as one of the reply or stream reply function is called.
+Cowboy also provides a simplified interface for sending files. It can also send only specific parts of a file.
+While only one response is allowed for every request, HTTP/2 introduced a mechanism that allows the server to push additional resources related to the response.</description>
</item>
<item>
@@ -1277,8 +1374,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/guide/resp/</guid>
<description>The response must be sent using the Req object.
- Cowboy provides two different ways of sending responses: either directly or by streaming the body. Response headers and body may be set in advance. The response is sent as soon as one of the reply or stream reply function is called.
- Cowboy also provides a simplified interface for sending files. It can also send only specific parts of a file.</description>
+Cowboy provides two different ways of sending responses: either directly or by streaming the body. Response headers and body may be set in advance. The response is sent as soon as one of the reply or stream reply function is called.
+Cowboy also provides a simplified interface for sending files. It can also send only specific parts of a file.
+While only one response is allowed for every request, HTTP/2 introduced a mechanism that allows the server to push additional resources related to the response.</description>
</item>
<item>
@@ -1288,8 +1386,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/guide/resp/</guid>
<description>The response must be sent using the Req object.
- Cowboy provides two different ways of sending responses: either directly or by streaming the body. Response headers and body may be set in advance. The response is sent as soon as one of the reply or stream reply function is called.
- Cowboy also provides a simplified interface for sending files. It can also send only specific parts of a file.</description>
+Cowboy provides two different ways of sending responses: either directly or by streaming the body. Response headers and body may be set in advance. The response is sent as soon as one of the reply or stream reply function is called.
+Cowboy also provides a simplified interface for sending files. It can also send only specific parts of a file.
+While only one response is allowed for every request, HTTP/2 introduced a mechanism that allows the server to push additional resources related to the response.</description>
</item>
<item>
@@ -1299,8 +1398,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/guide/resp/</guid>
<description>The response must be sent using the Req object.
- Cowboy provides two different ways of sending responses: either directly or by streaming the body. Response headers and body may be set in advance. The response is sent as soon as one of the reply or stream reply function is called.
- Cowboy also provides a simplified interface for sending files. It can also send only specific parts of a file.</description>
+Cowboy provides two different ways of sending responses: either directly or by streaming the body. Response headers and body may be set in advance. The response is sent as soon as one of the reply or stream reply function is called.
+Cowboy also provides a simplified interface for sending files. It can also send only specific parts of a file.
+While only one response is allowed for every request, HTTP/2 introduced a mechanism that allows the server to push additional resources related to the response.</description>
</item>
<item>
@@ -1310,8 +1410,8 @@
<guid>https://ninenines.eu/docs/en/erlang.mk/1/guide/shell/</guid>
<description>Erlang.mk provides a convenient target for starting a shell with all the paths set properly to experiment with your code.
- Configuration The SHELL_DEPS variable can be used to define dependencies that are only to be used when the make shell command is called. For example, if you want to use kjell as your shell:
- SHELL_DEPS = kjell Dependencies are downloaded and compiled the first time you run the make shell command.</description>
+Configuration The SHELL_DEPS variable can be used to define dependencies that are only to be used when the make shell command is called. For example, if you want to use kjell as your shell:
+SHELL_DEPS = kjell Dependencies are downloaded and compiled the first time you run the make shell command.</description>
</item>
<item>
@@ -1321,7 +1421,7 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.0/guide/cookies/</guid>
<description>Cookies are a mechanism allowing applications to maintain state on top of the stateless HTTP protocol.
- Cookies are a name/value store where the names and values are stored in plain text. They expire either after a delay or when the browser closes. They can be configured on a specific domain name or path, and restricted to secure resources (sent or downloaded over HTTPS), or restricted to the server (disallowing access from client-side scripts).</description>
+Cookies are a name/value store where the names and values are stored in plain text. They expire either after a delay or when the browser closes. They can be configured on a specific domain name or path, and restricted to secure resources (sent or downloaded over HTTPS), or restricted to the server (disallowing access from client-side scripts).</description>
</item>
<item>
@@ -1331,7 +1431,7 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/guide/cookies/</guid>
<description>Cookies are a mechanism allowing applications to maintain state on top of the stateless HTTP protocol.
- Cookies are a name/value store where the names and values are stored in plain text. They expire either after a delay or when the browser closes. They can be configured on a specific domain name or path, and restricted to secure resources (sent or downloaded over HTTPS), or restricted to the server (disallowing access from client-side scripts).</description>
+Cookies are a name/value store where the names and values are stored in plain text. They expire either after a delay or when the browser closes. They can be configured on a specific domain name or path, and restricted to secure resources (sent or downloaded over HTTPS), or restricted to the server (disallowing access from client-side scripts).</description>
</item>
<item>
@@ -1341,7 +1441,7 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/guide/cookies/</guid>
<description>Cookies are a mechanism allowing applications to maintain state on top of the stateless HTTP protocol.
- Cookies are a name/value store where the names and values are stored in plain text. They expire either after a delay or when the browser closes. They can be configured on a specific domain name or path, and restricted to secure resources (sent or downloaded over HTTPS), or restricted to the server (disallowing access from client-side scripts).</description>
+Cookies are a name/value store where the names and values are stored in plain text. They expire either after a delay or when the browser closes. They can be configured on a specific domain name or path, and restricted to secure resources (sent or downloaded over HTTPS), or restricted to the server (disallowing access from client-side scripts).</description>
</item>
<item>
@@ -1351,7 +1451,7 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/guide/cookies/</guid>
<description>Cookies are a mechanism allowing applications to maintain state on top of the stateless HTTP protocol.
- Cookies are a name/value store where the names and values are stored in plain text. They expire either after a delay or when the browser closes. They can be configured on a specific domain name or path, and restricted to secure resources (sent or downloaded over HTTPS), or restricted to the server (disallowing access from client-side scripts).</description>
+Cookies are a name/value store where the names and values are stored in plain text. They expire either after a delay or when the browser closes. They can be configured on a specific domain name or path, and restricted to secure resources (sent or downloaded over HTTPS), or restricted to the server (disallowing access from client-side scripts).</description>
</item>
<item>
@@ -1361,7 +1461,7 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/guide/cookies/</guid>
<description>Cookies are a mechanism allowing applications to maintain state on top of the stateless HTTP protocol.
- Cookies are a name/value store where the names and values are stored in plain text. They expire either after a delay or when the browser closes. They can be configured on a specific domain name or path, and restricted to secure resources (sent or downloaded over HTTPS), or restricted to the server (disallowing access from client-side scripts).</description>
+Cookies are a name/value store where the names and values are stored in plain text. They expire either after a delay or when the browser closes. They can be configured on a specific domain name or path, and restricted to secure resources (sent or downloaded over HTTPS), or restricted to the server (disallowing access from client-side scripts).</description>
</item>
<item>
@@ -1371,8 +1471,8 @@
<guid>https://ninenines.eu/docs/en/erlang.mk/1/guide/eunit/</guid>
<description>EUnit is the tool of choice for unit testing. Erlang.mk automates a few things on top of EUnit, including the discovery and running of unit tests.
- Writing tests The EUnit user guide is the best place to learn how to write tests. Of note is that all functions ending with _test or _test_ will be picked up as EUnit test cases.
- Erlang.mk will automatically pick up tests found in any of the Erlang modules of your application.</description>
+Writing tests The EUnit user guide is the best place to learn how to write tests. Of note is that all functions ending with _test or _test_ will be picked up as EUnit test cases.
+Erlang.mk will automatically pick up tests found in any of the Erlang modules of your application.</description>
</item>
<item>
@@ -1382,8 +1482,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.0/guide/multipart/</guid>
<description>Multipart originates from MIME, an Internet standard that extends the format of emails.
- A multipart message is a list of parts. A part contains headers and a body. The body of the parts may be of any media type, and contain text or binary data. It is possible for parts to contain a multipart media type.
- In the context of HTTP, multipart is most often used with the multipart/form-data media type.</description>
+A multipart message is a list of parts. A part contains headers and a body. The body of the parts may be of any media type, and contain text or binary data. It is possible for parts to contain a multipart media type.
+In the context of HTTP, multipart is most often used with the multipart/form-data media type.</description>
</item>
<item>
@@ -1393,8 +1493,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/guide/multipart/</guid>
<description>Multipart originates from MIME, an Internet standard that extends the format of emails.
- A multipart message is a list of parts. A part contains headers and a body. The body of the parts may be of any media type, and contain text or binary data. It is possible for parts to contain a multipart media type.
- In the context of HTTP, multipart is most often used with the multipart/form-data media type.</description>
+A multipart message is a list of parts. A part contains headers and a body. The body of the parts may be of any media type, and contain text or binary data. It is possible for parts to contain a multipart media type.
+In the context of HTTP, multipart is most often used with the multipart/form-data media type.</description>
</item>
<item>
@@ -1404,8 +1504,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/guide/multipart/</guid>
<description>Multipart originates from MIME, an Internet standard that extends the format of emails.
- A multipart message is a list of parts. A part contains headers and a body. The body of the parts may be of any media type, and contain text or binary data. It is possible for parts to contain a multipart media type.
- In the context of HTTP, multipart is most often used with the multipart/form-data media type.</description>
+A multipart message is a list of parts. A part contains headers and a body. The body of the parts may be of any media type, and contain text or binary data. It is possible for parts to contain a multipart media type.
+In the context of HTTP, multipart is most often used with the multipart/form-data media type.</description>
</item>
<item>
@@ -1415,8 +1515,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/guide/multipart/</guid>
<description>Multipart originates from MIME, an Internet standard that extends the format of emails.
- A multipart message is a list of parts. A part contains headers and a body. The body of the parts may be of any media type, and contain text or binary data. It is possible for parts to contain a multipart media type.
- In the context of HTTP, multipart is most often used with the multipart/form-data media type.</description>
+A multipart message is a list of parts. A part contains headers and a body. The body of the parts may be of any media type, and contain text or binary data. It is possible for parts to contain a multipart media type.
+In the context of HTTP, multipart is most often used with the multipart/form-data media type.</description>
</item>
<item>
@@ -1426,8 +1526,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/guide/multipart/</guid>
<description>Multipart originates from MIME, an Internet standard that extends the format of emails.
- A multipart message is a list of parts. A part contains headers and a body. The body of the parts may be of any media type, and contain text or binary data. It is possible for parts to contain a multipart media type.
- In the context of HTTP, multipart is most often used with the multipart/form-data media type.</description>
+A multipart message is a list of parts. A part contains headers and a body. The body of the parts may be of any media type, and contain text or binary data. It is possible for parts to contain a multipart media type.
+In the context of HTTP, multipart is most often used with the multipart/form-data media type.</description>
</item>
<item>
@@ -1436,9 +1536,9 @@
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://ninenines.eu/docs/en/erlang.mk/1/guide/common_test/</guid>
- <description>Common Test is Erlang&amp;#8217;s functional testing framework. Erlang.mk automates the discovery and running of Common Test suites.
- Writing tests The Common Test user guide is the best place to learn how to write tests. Erlang.mk requires that file names for test suites end with _SUITE.erl and that the files be located in the $(TEST_DIR) directory. This defaults to test/.
- Configuration The CT_OPTS variable allows you to set extra Common Test options.</description>
+ <description>Common Test is Erlang&amp;apos;s functional testing framework. Erlang.mk automates the discovery and running of Common Test suites.
+Writing tests The Common Test user guide is the best place to learn how to write tests. Erlang.mk requires that file names for test suites end with _SUITE.erl and that the files be located in the $(TEST_DIR) directory. This defaults to test/.
+Configuration The CT_OPTS variable allows you to set extra Common Test options.</description>
</item>
<item>
@@ -1448,8 +1548,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.0/guide/rest_principles/</guid>
<description>This chapter will attempt to define the concepts behind REST and explain what makes a service RESTful.
- REST is often confused with performing a distinct operation depending on the HTTP method, while using more than the GET and POST methods. That&amp;#8217;s highly misguided at best.
- We will first attempt to define REST and will look at what it means in the context of HTTP and the Web. For a more in-depth explanation of REST, you can read Roy T.</description>
+REST is often confused with performing a distinct operation depending on the HTTP method, while using more than the GET and POST methods. That&amp;apos;s highly misguided at best.
+We will first attempt to define REST and will look at what it means in the context of HTTP and the Web. For a more in-depth explanation of REST, you can read Roy T.</description>
</item>
<item>
@@ -1459,8 +1559,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/guide/rest_principles/</guid>
<description>This chapter will attempt to define the concepts behind REST and explain what makes a service RESTful.
- REST is often confused with performing a distinct operation depending on the HTTP method, while using more than the GET and POST methods. That&amp;#8217;s highly misguided at best.
- We will first attempt to define REST and will look at what it means in the context of HTTP and the Web. For a more in-depth explanation of REST, you can read Roy T.</description>
+REST is often confused with performing a distinct operation depending on the HTTP method, while using more than the GET and POST methods. That&amp;apos;s highly misguided at best.
+We will first attempt to define REST and will look at what it means in the context of HTTP and the Web. For a more in-depth explanation of REST, you can read Roy T.</description>
</item>
<item>
@@ -1470,8 +1570,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/guide/rest_principles/</guid>
<description>This chapter will attempt to define the concepts behind REST and explain what makes a service RESTful.
- REST is often confused with performing a distinct operation depending on the HTTP method, while using more than the GET and POST methods. That&amp;#8217;s highly misguided at best.
- We will first attempt to define REST and will look at what it means in the context of HTTP and the Web. For a more in-depth explanation of REST, you can read Roy T.</description>
+REST is often confused with performing a distinct operation depending on the HTTP method, while using more than the GET and POST methods. That&amp;apos;s highly misguided at best.
+We will first attempt to define REST and will look at what it means in the context of HTTP and the Web. For a more in-depth explanation of REST, you can read Roy T.</description>
</item>
<item>
@@ -1481,8 +1581,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/guide/rest_principles/</guid>
<description>This chapter will attempt to define the concepts behind REST and explain what makes a service RESTful.
- REST is often confused with performing a distinct operation depending on the HTTP method, while using more than the GET and POST methods. That&amp;#8217;s highly misguided at best.
- We will first attempt to define REST and will look at what it means in the context of HTTP and the Web. For a more in-depth explanation of REST, you can read Roy T.</description>
+REST is often confused with performing a distinct operation depending on the HTTP method, while using more than the GET and POST methods. That&amp;apos;s highly misguided at best.
+We will first attempt to define REST and will look at what it means in the context of HTTP and the Web. For a more in-depth explanation of REST, you can read Roy T.</description>
</item>
<item>
@@ -1492,8 +1592,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/guide/rest_principles/</guid>
<description>This chapter will attempt to define the concepts behind REST and explain what makes a service RESTful.
- REST is often confused with performing a distinct operation depending on the HTTP method, while using more than the GET and POST methods. That&amp;#8217;s highly misguided at best.
- We will first attempt to define REST and will look at what it means in the context of HTTP and the Web. For a more in-depth explanation of REST, you can read Roy T.</description>
+REST is often confused with performing a distinct operation depending on the HTTP method, while using more than the GET and POST methods. That&amp;apos;s highly misguided at best.
+We will first attempt to define REST and will look at what it means in the context of HTTP and the Web. For a more in-depth explanation of REST, you can read Roy T.</description>
</item>
<item>
@@ -1503,12 +1603,12 @@
<guid>https://ninenines.eu/docs/en/erlang.mk/1/guide/triq/</guid>
<description>Triq is a QuickCheck-like library for property-based testing. Erlang.mk automates discovery and checking of Triq properties.
- To run all tests (including Triq):
- $ make tests To run all tests and static checks (including Triq):
- $ make check You can also run Triq separately:
- $ make triq To check properties from a single module:
- $ make triq t=foo_tests To check a single property:
- $ make triq t=foo_tests:bar </description>
+To run all tests (including Triq):
+$ make tests To run all tests and static checks (including Triq):
+$ make check You can also run Triq separately:
+$ make triq To check properties from a single module:
+$ make triq t=foo_tests To check a single property:
+$ make triq t=foo_tests:bar </description>
</item>
<item>
@@ -1517,9 +1617,10 @@
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://ninenines.eu/docs/en/cowboy/2.0/guide/rest_handlers/</guid>
- <description>REST is implemented in Cowboy as a sub protocol. The request is handled as a state machine with many optional callbacks describing the resource and modifying the machine&amp;#8217;s behavior.
- The REST handler is the recommended way to handle HTTP requests.
- Initialization First, the init/2 callback is called. This callback is common to all handlers. To use REST for the current request, this function must return a cowboy_rest tuple.</description>
+ <description>REST is implemented in Cowboy as a sub protocol. The request is handled as a state machine with many optional callbacks describing the resource and modifying the machine&amp;apos;s behavior.
+The REST handler is the recommended way to handle HTTP requests.
+Initialization First, the init/2 callback is called. This callback is common to all handlers. To use REST for the current request, this function must return a cowboy_rest tuple.
+init(Req, State) -&amp;gt; {cowboy_rest, Req, State}.</description>
</item>
<item>
@@ -1528,9 +1629,10 @@
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://ninenines.eu/docs/en/cowboy/2.1/guide/rest_handlers/</guid>
- <description>REST is implemented in Cowboy as a sub protocol. The request is handled as a state machine with many optional callbacks describing the resource and modifying the machine&amp;#8217;s behavior.
- The REST handler is the recommended way to handle HTTP requests.
- Initialization First, the init/2 callback is called. This callback is common to all handlers. To use REST for the current request, this function must return a cowboy_rest tuple.</description>
+ <description>REST is implemented in Cowboy as a sub protocol. The request is handled as a state machine with many optional callbacks describing the resource and modifying the machine&amp;apos;s behavior.
+The REST handler is the recommended way to handle HTTP requests.
+Initialization First, the init/2 callback is called. This callback is common to all handlers. To use REST for the current request, this function must return a cowboy_rest tuple.
+init(Req, State) -&amp;gt; {cowboy_rest, Req, State}.</description>
</item>
<item>
@@ -1539,9 +1641,10 @@
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://ninenines.eu/docs/en/cowboy/2.2/guide/rest_handlers/</guid>
- <description>REST is implemented in Cowboy as a sub protocol. The request is handled as a state machine with many optional callbacks describing the resource and modifying the machine&amp;#8217;s behavior.
- The REST handler is the recommended way to handle HTTP requests.
- Initialization First, the init/2 callback is called. This callback is common to all handlers. To use REST for the current request, this function must return a cowboy_rest tuple.</description>
+ <description>REST is implemented in Cowboy as a sub protocol. The request is handled as a state machine with many optional callbacks describing the resource and modifying the machine&amp;apos;s behavior.
+The REST handler is the recommended way to handle HTTP requests.
+Initialization First, the init/2 callback is called. This callback is common to all handlers. To use REST for the current request, this function must return a cowboy_rest tuple.
+init(Req, State) -&amp;gt; {cowboy_rest, Req, State}.</description>
</item>
<item>
@@ -1550,9 +1653,10 @@
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://ninenines.eu/docs/en/cowboy/2.3/guide/rest_handlers/</guid>
- <description>REST is implemented in Cowboy as a sub protocol. The request is handled as a state machine with many optional callbacks describing the resource and modifying the machine&amp;#8217;s behavior.
- The REST handler is the recommended way to handle HTTP requests.
- Initialization First, the init/2 callback is called. This callback is common to all handlers. To use REST for the current request, this function must return a cowboy_rest tuple.</description>
+ <description>REST is implemented in Cowboy as a sub protocol. The request is handled as a state machine with many optional callbacks describing the resource and modifying the machine&amp;apos;s behavior.
+The REST handler is the recommended way to handle HTTP requests.
+Initialization First, the init/2 callback is called. This callback is common to all handlers. To use REST for the current request, this function must return a cowboy_rest tuple.
+init(Req, State) -&amp;gt; {cowboy_rest, Req, State}.</description>
</item>
<item>
@@ -1561,9 +1665,10 @@
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://ninenines.eu/docs/en/cowboy/2.4/guide/rest_handlers/</guid>
- <description>REST is implemented in Cowboy as a sub protocol. The request is handled as a state machine with many optional callbacks describing the resource and modifying the machine&amp;#8217;s behavior.
- The REST handler is the recommended way to handle HTTP requests.
- Initialization First, the init/2 callback is called. This callback is common to all handlers. To use REST for the current request, this function must return a cowboy_rest tuple.</description>
+ <description>REST is implemented in Cowboy as a sub protocol. The request is handled as a state machine with many optional callbacks describing the resource and modifying the machine&amp;apos;s behavior.
+The REST handler is the recommended way to handle HTTP requests.
+Initialization First, the init/2 callback is called. This callback is common to all handlers. To use REST for the current request, this function must return a cowboy_rest tuple.
+init(Req, State) -&amp;gt; {cowboy_rest, Req, State}.</description>
</item>
<item>
@@ -1572,8 +1677,7 @@
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://ninenines.eu/docs/en/erlang.mk/1/guide/coverage/</guid>
- <description>Placeholder chapter.
- </description>
+ <description>Placeholder chapter.</description>
</item>
<item>
@@ -1583,7 +1687,7 @@
<guid>https://ninenines.eu/docs/en/erlang.mk/1/guide/ci/</guid>
<description>Erlang.mk comes with some support for continuous integration, aimed at open source projects that need to support more than one specific Erlang/OTP release. (If you target one specific release, check the OTP version pinning section of the OTP version management chapter.)
- Configuring Erlang/OTP versions to test To use the CI plugin you must first configure which versions of Erlang/OTP will be used. Erlang.mk provides three separate configuration variables depending on whether you need a normal OTP release, a HiPE-enabled release or an ErLLVM-enabled release.</description>
+Configuring Erlang/OTP versions to test To use the CI plugin you must first configure which versions of Erlang/OTP will be used. Erlang.mk provides three separate configuration variables depending on whether you need a normal OTP release, a HiPE-enabled release or an ErLLVM-enabled release.</description>
</item>
<item>
@@ -1593,8 +1697,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.0/guide/rest_flowcharts/</guid>
<description>This chapter will explain the REST handler state machine through a number of different diagrams.
- There are four main paths that requests may follow. One for the method OPTIONS; one for the methods GET and HEAD; one for the methods PUT, POST and PATCH; and one for the method DELETE.
- All paths start with the &#34;Start&#34; diagram, and all paths excluding the OPTIONS path go through the &#34;Content negotiation&#34;</description>
+There are four main paths that requests may follow. One for the method OPTIONS; one for the methods GET and HEAD; one for the methods PUT, POST and PATCH; and one for the method DELETE.
+All paths start with the &amp;quot;Start&amp;quot; diagram, and all paths excluding the OPTIONS path go through the &amp;quot;Content negotiation&amp;quot; diagram and optionally the &amp;quot;Conditional requests&amp;quot; diagram if the resource exists.</description>
</item>
<item>
@@ -1604,8 +1708,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/guide/rest_flowcharts/</guid>
<description>This chapter will explain the REST handler state machine through a number of different diagrams.
- There are four main paths that requests may follow. One for the method OPTIONS; one for the methods GET and HEAD; one for the methods PUT, POST and PATCH; and one for the method DELETE.
- All paths start with the &#34;Start&#34; diagram, and all paths excluding the OPTIONS path go through the &#34;Content negotiation&#34;</description>
+There are four main paths that requests may follow. One for the method OPTIONS; one for the methods GET and HEAD; one for the methods PUT, POST and PATCH; and one for the method DELETE.
+All paths start with the &amp;quot;Start&amp;quot; diagram, and all paths excluding the OPTIONS path go through the &amp;quot;Content negotiation&amp;quot; diagram and optionally the &amp;quot;Conditional requests&amp;quot; diagram if the resource exists.</description>
</item>
<item>
@@ -1615,8 +1719,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/guide/rest_flowcharts/</guid>
<description>This chapter will explain the REST handler state machine through a number of different diagrams.
- There are four main paths that requests may follow. One for the method OPTIONS; one for the methods GET and HEAD; one for the methods PUT, POST and PATCH; and one for the method DELETE.
- All paths start with the &#34;Start&#34; diagram, and all paths excluding the OPTIONS path go through the &#34;Content negotiation&#34;</description>
+There are four main paths that requests may follow. One for the method OPTIONS; one for the methods GET and HEAD; one for the methods PUT, POST and PATCH; and one for the method DELETE.
+All paths start with the &amp;quot;Start&amp;quot; diagram, and all paths excluding the OPTIONS path go through the &amp;quot;Content negotiation&amp;quot; diagram and optionally the &amp;quot;Conditional requests&amp;quot; diagram if the resource exists.</description>
</item>
<item>
@@ -1626,8 +1730,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/guide/rest_flowcharts/</guid>
<description>This chapter will explain the REST handler state machine through a number of different diagrams.
- There are four main paths that requests may follow. One for the method OPTIONS; one for the methods GET and HEAD; one for the methods PUT, POST and PATCH; and one for the method DELETE.
- All paths start with the &#34;Start&#34; diagram, and all paths excluding the OPTIONS path go through the &#34;Content negotiation&#34;</description>
+There are four main paths that requests may follow. One for the method OPTIONS; one for the methods GET and HEAD; one for the methods PUT, POST and PATCH; and one for the method DELETE.
+All paths start with the &amp;quot;Start&amp;quot; diagram, and all paths excluding the OPTIONS path go through the &amp;quot;Content negotiation&amp;quot; diagram and optionally the &amp;quot;Conditional requests&amp;quot; diagram if the resource exists.</description>
</item>
<item>
@@ -1637,8 +1741,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/guide/rest_flowcharts/</guid>
<description>This chapter will explain the REST handler state machine through a number of different diagrams.
- There are four main paths that requests may follow. One for the method OPTIONS; one for the methods GET and HEAD; one for the methods PUT, POST and PATCH; and one for the method DELETE.
- All paths start with the &#34;Start&#34; diagram, and all paths excluding the OPTIONS path go through the &#34;Content negotiation&#34;</description>
+There are four main paths that requests may follow. One for the method OPTIONS; one for the methods GET and HEAD; one for the methods PUT, POST and PATCH; and one for the method DELETE.
+All paths start with the &amp;quot;Start&amp;quot; diagram, and all paths excluding the OPTIONS path go through the &amp;quot;Content negotiation&amp;quot; diagram and optionally the &amp;quot;Conditional requests&amp;quot; diagram if the resource exists.</description>
</item>
<item>
@@ -1648,8 +1752,8 @@
<guid>https://ninenines.eu/docs/en/erlang.mk/1/guide/dialyzer/</guid>
<description>Dialyzer is a tool that will detect discrepancies in your program. It does so using a technique known as success typing analysis which has the advantage of providing no false positives. Dialyzer is able to detect type errors, dead code and more.
- Erlang.mk provides a wrapper around Dialyzer.
- How it works Dialyzer requires a PLT file to work. The PLT file contains the analysis information from all applications which are not expected to change, or rarely do.</description>
+Erlang.mk provides a wrapper around Dialyzer.
+How it works Dialyzer requires a PLT file to work. The PLT file contains the analysis information from all applications which are not expected to change, or rarely do.</description>
</item>
<item>
@@ -1659,7 +1763,7 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.0/guide/resource_design/</guid>
<description>This chapter aims to provide you with a list of questions you must answer in order to write a good resource handler. It is meant to be usable as a step by step guide.
- The service Can the service become unavailable, and when it does, can we detect it? For example, database connectivity problems may be detected early. We may also have planned outages of all or parts of the system.</description>
+The service Can the service become unavailable, and when it does, can we detect it? For example, database connectivity problems may be detected early. We may also have planned outages of all or parts of the system.</description>
</item>
<item>
@@ -1669,7 +1773,7 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/guide/resource_design/</guid>
<description>This chapter aims to provide you with a list of questions you must answer in order to write a good resource handler. It is meant to be usable as a step by step guide.
- The service Can the service become unavailable, and when it does, can we detect it? For example, database connectivity problems may be detected early. We may also have planned outages of all or parts of the system.</description>
+The service Can the service become unavailable, and when it does, can we detect it? For example, database connectivity problems may be detected early. We may also have planned outages of all or parts of the system.</description>
</item>
<item>
@@ -1679,7 +1783,7 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/guide/resource_design/</guid>
<description>This chapter aims to provide you with a list of questions you must answer in order to write a good resource handler. It is meant to be usable as a step by step guide.
- The service Can the service become unavailable, and when it does, can we detect it? For example, database connectivity problems may be detected early. We may also have planned outages of all or parts of the system.</description>
+The service Can the service become unavailable, and when it does, can we detect it? For example, database connectivity problems may be detected early. We may also have planned outages of all or parts of the system.</description>
</item>
<item>
@@ -1689,7 +1793,7 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/guide/resource_design/</guid>
<description>This chapter aims to provide you with a list of questions you must answer in order to write a good resource handler. It is meant to be usable as a step by step guide.
- The service Can the service become unavailable, and when it does, can we detect it? For example, database connectivity problems may be detected early. We may also have planned outages of all or parts of the system.</description>
+The service Can the service become unavailable, and when it does, can we detect it? For example, database connectivity problems may be detected early. We may also have planned outages of all or parts of the system.</description>
</item>
<item>
@@ -1699,7 +1803,7 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/guide/resource_design/</guid>
<description>This chapter aims to provide you with a list of questions you must answer in order to write a good resource handler. It is meant to be usable as a step by step guide.
- The service Can the service become unavailable, and when it does, can we detect it? For example, database connectivity problems may be detected early. We may also have planned outages of all or parts of the system.</description>
+The service Can the service become unavailable, and when it does, can we detect it? For example, database connectivity problems may be detected early. We may also have planned outages of all or parts of the system.</description>
</item>
<item>
@@ -1708,8 +1812,7 @@
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://ninenines.eu/docs/en/erlang.mk/1/guide/xref/</guid>
- <description>Placeholder chapter.
- </description>
+ <description>Placeholder chapter.</description>
</item>
<item>
@@ -1719,8 +1822,8 @@
<guid>https://ninenines.eu/docs/en/erlang.mk/1/guide/external_plugins/</guid>
<description>It is often convenient to be able to keep the build files used by all your projects in one place. Those files could be Makefiles, configuration files, templates and more.
- Erlang.mk allows you to automatically load plugins from dependencies. Plugins can do anything, including defining new variables, defining file templates, hooking themselves inside the normal Erlang.mk processing or even adding new rules.
- You can load plugins using one of two methods.</description>
+Erlang.mk allows you to automatically load plugins from dependencies. Plugins can do anything, including defining new variables, defining file templates, hooking themselves inside the normal Erlang.mk processing or even adding new rules.
+You can load plugins using one of two methods.</description>
</item>
<item>
@@ -1730,8 +1833,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.0/guide/ws_protocol/</guid>
<description>This chapter explains what Websocket is and why it is a vital component of soft realtime Web applications.
- Description Websocket is an extension to HTTP that emulates plain TCP connections between the client, typically a Web browser, and the server. It uses the HTTP Upgrade mechanism to establish the connection.
- Websocket connections are fully asynchronous, unlike HTTP/1.1 (synchronous) and HTTP/2 (asynchronous, but the server can only initiate streams in response to requests).</description>
+Description Websocket is an extension to HTTP that emulates plain TCP connections between the client, typically a Web browser, and the server. It uses the HTTP Upgrade mechanism to establish the connection.
+Websocket connections are fully asynchronous, unlike HTTP/1.1 (synchronous) and HTTP/2 (asynchronous, but the server can only initiate streams in response to requests).</description>
</item>
<item>
@@ -1741,8 +1844,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/guide/ws_protocol/</guid>
<description>This chapter explains what Websocket is and why it is a vital component of soft realtime Web applications.
- Description Websocket is an extension to HTTP that emulates plain TCP connections between the client, typically a Web browser, and the server. It uses the HTTP Upgrade mechanism to establish the connection.
- Websocket connections are fully asynchronous, unlike HTTP/1.1 (synchronous) and HTTP/2 (asynchronous, but the server can only initiate streams in response to requests).</description>
+Description Websocket is an extension to HTTP that emulates plain TCP connections between the client, typically a Web browser, and the server. It uses the HTTP Upgrade mechanism to establish the connection.
+Websocket connections are fully asynchronous, unlike HTTP/1.1 (synchronous) and HTTP/2 (asynchronous, but the server can only initiate streams in response to requests).</description>
</item>
<item>
@@ -1752,8 +1855,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/guide/ws_protocol/</guid>
<description>This chapter explains what Websocket is and why it is a vital component of soft realtime Web applications.
- Description Websocket is an extension to HTTP that emulates plain TCP connections between the client, typically a Web browser, and the server. It uses the HTTP Upgrade mechanism to establish the connection.
- Websocket connections are fully asynchronous, unlike HTTP/1.1 (synchronous) and HTTP/2 (asynchronous, but the server can only initiate streams in response to requests).</description>
+Description Websocket is an extension to HTTP that emulates plain TCP connections between the client, typically a Web browser, and the server. It uses the HTTP Upgrade mechanism to establish the connection.
+Websocket connections are fully asynchronous, unlike HTTP/1.1 (synchronous) and HTTP/2 (asynchronous, but the server can only initiate streams in response to requests).</description>
</item>
<item>
@@ -1763,8 +1866,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/guide/ws_protocol/</guid>
<description>This chapter explains what Websocket is and why it is a vital component of soft realtime Web applications.
- Description Websocket is an extension to HTTP that emulates plain TCP connections between the client, typically a Web browser, and the server. It uses the HTTP Upgrade mechanism to establish the connection.
- Websocket connections are fully asynchronous, unlike HTTP/1.1 (synchronous) and HTTP/2 (asynchronous, but the server can only initiate streams in response to requests).</description>
+Description Websocket is an extension to HTTP that emulates plain TCP connections between the client, typically a Web browser, and the server. It uses the HTTP Upgrade mechanism to establish the connection.
+Websocket connections are fully asynchronous, unlike HTTP/1.1 (synchronous) and HTTP/2 (asynchronous, but the server can only initiate streams in response to requests).</description>
</item>
<item>
@@ -1774,8 +1877,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/guide/ws_protocol/</guid>
<description>This chapter explains what Websocket is and why it is a vital component of soft realtime Web applications.
- Description Websocket is an extension to HTTP that emulates plain TCP connections between the client, typically a Web browser, and the server. It uses the HTTP Upgrade mechanism to establish the connection.
- Websocket connections are fully asynchronous, unlike HTTP/1.1 (synchronous) and HTTP/2 (asynchronous, but the server can only initiate streams in response to requests).</description>
+Description Websocket is an extension to HTTP that emulates plain TCP connections between the client, typically a Web browser, and the server. It uses the HTTP Upgrade mechanism to establish the connection.
+Websocket connections are fully asynchronous, unlike HTTP/1.1 (synchronous) and HTTP/2 (asynchronous, but the server can only initiate streams in response to requests).</description>
</item>
<item>
@@ -1785,10 +1888,11 @@
<guid>https://ninenines.eu/docs/en/erlang.mk/1/guide/external_plugins_list/</guid>
<description>This is a non-exhaustive list of Erlang.mk plugins, sorted alphabetically.
- efene.mk An Efene plugin for Erlang.mk. Efene is an alternative language for the BEAM.
- elixir.mk An Elixir plugin for Erlang.mk. Elixir is an alternative language for the BEAM.
- elvis.mk An Elvis plugin for Erlang.mk. Elvis is an Erlang style reviewer.
- geas Geas gives aggregated information on a project and its dependencies, and is available as an Erlang.</description>
+efene.mk An Efene plugin for Erlang.mk. Efene is an alternative language for the BEAM.
+elixir.mk An Elixir plugin for Erlang.mk. Elixir is an alternative language for the BEAM.
+elvis.mk An Elvis plugin for Erlang.mk. Elvis is an Erlang style reviewer.
+geas Geas gives aggregated information on a project and its dependencies, and is available as an Erlang.mk plugin.
+hexer.mk An Hex plugin for Erlang.</description>
</item>
<item>
@@ -1798,7 +1902,7 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.0/guide/ws_handlers/</guid>
<description>Websocket handlers provide an interface for upgrading HTTP/1.1 connections to Websocket and sending or receiving frames on the Websocket connection.
- As Websocket connections are established through the HTTP/1.1 upgrade mechanism, Websocket handlers need to be able to first receive the HTTP request for the upgrade, before switching to Websocket and taking over the connection. They can then receive or send Websocket frames, handle incoming Erlang messages or close the connection.</description>
+As Websocket connections are established through the HTTP/1.1 upgrade mechanism, Websocket handlers need to be able to first receive the HTTP request for the upgrade, before switching to Websocket and taking over the connection. They can then receive or send Websocket frames, handle incoming Erlang messages or close the connection.</description>
</item>
<item>
@@ -1808,7 +1912,7 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/guide/ws_handlers/</guid>
<description>Websocket handlers provide an interface for upgrading HTTP/1.1 connections to Websocket and sending or receiving frames on the Websocket connection.
- As Websocket connections are established through the HTTP/1.1 upgrade mechanism, Websocket handlers need to be able to first receive the HTTP request for the upgrade, before switching to Websocket and taking over the connection. They can then receive or send Websocket frames, handle incoming Erlang messages or close the connection.</description>
+As Websocket connections are established through the HTTP/1.1 upgrade mechanism, Websocket handlers need to be able to first receive the HTTP request for the upgrade, before switching to Websocket and taking over the connection. They can then receive or send Websocket frames, handle incoming Erlang messages or close the connection.</description>
</item>
<item>
@@ -1818,7 +1922,7 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/guide/ws_handlers/</guid>
<description>Websocket handlers provide an interface for upgrading HTTP/1.1 connections to Websocket and sending or receiving frames on the Websocket connection.
- As Websocket connections are established through the HTTP/1.1 upgrade mechanism, Websocket handlers need to be able to first receive the HTTP request for the upgrade, before switching to Websocket and taking over the connection. They can then receive or send Websocket frames, handle incoming Erlang messages or close the connection.</description>
+As Websocket connections are established through the HTTP/1.1 upgrade mechanism, Websocket handlers need to be able to first receive the HTTP request for the upgrade, before switching to Websocket and taking over the connection. They can then receive or send Websocket frames, handle incoming Erlang messages or close the connection.</description>
</item>
<item>
@@ -1828,7 +1932,7 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/guide/ws_handlers/</guid>
<description>Websocket handlers provide an interface for upgrading HTTP/1.1 connections to Websocket and sending or receiving frames on the Websocket connection.
- As Websocket connections are established through the HTTP/1.1 upgrade mechanism, Websocket handlers need to be able to first receive the HTTP request for the upgrade, before switching to Websocket and taking over the connection. They can then receive or send Websocket frames, handle incoming Erlang messages or close the connection.</description>
+As Websocket connections are established through the HTTP/1.1 upgrade mechanism, Websocket handlers need to be able to first receive the HTTP request for the upgrade, before switching to Websocket and taking over the connection. They can then receive or send Websocket frames, handle incoming Erlang messages or close the connection.</description>
</item>
<item>
@@ -1838,7 +1942,7 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/guide/ws_handlers/</guid>
<description>Websocket handlers provide an interface for upgrading HTTP/1.1 connections to Websocket and sending or receiving frames on the Websocket connection.
- As Websocket connections are established through the HTTP/1.1 upgrade mechanism, Websocket handlers need to be able to first receive the HTTP request for the upgrade, before switching to Websocket and taking over the connection. They can then receive or send Websocket frames, handle incoming Erlang messages or close the connection.</description>
+As Websocket connections are established through the HTTP/1.1 upgrade mechanism, Websocket handlers need to be able to first receive the HTTP request for the upgrade, before switching to Websocket and taking over the connection. They can then receive or send Websocket frames, handle incoming Erlang messages or close the connection.</description>
</item>
<item>
@@ -1848,8 +1952,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.0/guide/streams/</guid>
<description>A stream is the set of messages that form an HTTP request/response pair.
- The term stream comes from HTTP/2. In Cowboy, it is also used when talking about HTTP/1.1 or HTTP/1.0. It should not be confused with streaming the request or response body.
- All versions of HTTP allow clients to initiate streams. HTTP/2 is the only one also allowing servers, through its server push feature. Both client and server-initiated streams go through the same process in Cowboy.</description>
+The term stream comes from HTTP/2. In Cowboy, it is also used when talking about HTTP/1.1 or HTTP/1.0. It should not be confused with streaming the request or response body.
+All versions of HTTP allow clients to initiate streams. HTTP/2 is the only one also allowing servers, through its server push feature. Both client and server-initiated streams go through the same process in Cowboy.</description>
</item>
<item>
@@ -1859,8 +1963,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/guide/streams/</guid>
<description>A stream is the set of messages that form an HTTP request/response pair.
- The term stream comes from HTTP/2. In Cowboy, it is also used when talking about HTTP/1.1 or HTTP/1.0. It should not be confused with streaming the request or response body.
- All versions of HTTP allow clients to initiate streams. HTTP/2 is the only one also allowing servers, through its server push feature. Both client and server-initiated streams go through the same process in Cowboy.</description>
+The term stream comes from HTTP/2. In Cowboy, it is also used when talking about HTTP/1.1 or HTTP/1.0. It should not be confused with streaming the request or response body.
+All versions of HTTP allow clients to initiate streams. HTTP/2 is the only one also allowing servers, through its server push feature. Both client and server-initiated streams go through the same process in Cowboy.</description>
</item>
<item>
@@ -1870,8 +1974,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/guide/streams/</guid>
<description>A stream is the set of messages that form an HTTP request/response pair.
- The term stream comes from HTTP/2. In Cowboy, it is also used when talking about HTTP/1.1 or HTTP/1.0. It should not be confused with streaming the request or response body.
- All versions of HTTP allow clients to initiate streams. HTTP/2 is the only one also allowing servers, through its server push feature. Both client and server-initiated streams go through the same process in Cowboy.</description>
+The term stream comes from HTTP/2. In Cowboy, it is also used when talking about HTTP/1.1 or HTTP/1.0. It should not be confused with streaming the request or response body.
+All versions of HTTP allow clients to initiate streams. HTTP/2 is the only one also allowing servers, through its server push feature. Both client and server-initiated streams go through the same process in Cowboy.</description>
</item>
<item>
@@ -1881,8 +1985,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/guide/streams/</guid>
<description>A stream is the set of messages that form an HTTP request/response pair.
- The term stream comes from HTTP/2. In Cowboy, it is also used when talking about HTTP/1.1 or HTTP/1.0. It should not be confused with streaming the request or response body.
- All versions of HTTP allow clients to initiate streams. HTTP/2 is the only one also allowing servers, through its server push feature. Both client and server-initiated streams go through the same process in Cowboy.</description>
+The term stream comes from HTTP/2. In Cowboy, it is also used when talking about HTTP/1.1 or HTTP/1.0. It should not be confused with streaming the request or response body.
+All versions of HTTP allow clients to initiate streams. HTTP/2 is the only one also allowing servers, through its server push feature. Both client and server-initiated streams go through the same process in Cowboy.</description>
</item>
<item>
@@ -1892,8 +1996,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/guide/streams/</guid>
<description>A stream is the set of messages that form an HTTP request/response pair.
- The term stream comes from HTTP/2. In Cowboy, it is also used when talking about HTTP/1.1 or HTTP/1.0. It should not be confused with streaming the request or response body.
- All versions of HTTP allow clients to initiate streams. HTTP/2 is the only one also allowing servers, through its server push feature. Both client and server-initiated streams go through the same process in Cowboy.</description>
+The term stream comes from HTTP/2. In Cowboy, it is also used when talking about HTTP/1.1 or HTTP/1.0. It should not be confused with streaming the request or response body.
+All versions of HTTP allow clients to initiate streams. HTTP/2 is the only one also allowing servers, through its server push feature. Both client and server-initiated streams go through the same process in Cowboy.</description>
</item>
<item>
@@ -1903,9 +2007,9 @@
<guid>https://ninenines.eu/docs/en/erlang.mk/1/guide/why/</guid>
<description>Why would you choose Erlang.mk, if not for its many features? This chapter will attempt to answer that.
- Erlang.mk is fast Erlang.mk is as fast as it gets.
- Erlang.mk will group the compilation of files so as to avoid running the BEAM more than necessary. This saves many seconds compared to traditional Makefiles, even on small projects.
- Erlang.mk will not try to be too smart. It provides a simple solution that works for most people, and gives additional options for projects that run into edge cases, often in the form of extra variables or rules to be defined.</description>
+Erlang.mk is fast Erlang.mk is as fast as it gets.
+Erlang.mk will group the compilation of files so as to avoid running the BEAM more than necessary. This saves many seconds compared to traditional Makefiles, even on small projects.
+Erlang.mk will not try to be too smart. It provides a simple solution that works for most people, and gives additional options for projects that run into edge cases, often in the form of extra variables or rules to be defined.</description>
</item>
<item>
@@ -1915,8 +2019,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.0/guide/middlewares/</guid>
<description>Cowboy delegates the request processing to middleware components. By default, two middlewares are defined, for the routing and handling of the request, as is detailed in most of this guide.
- Middlewares give you complete control over how requests are to be processed. You can add your own middlewares to the mix or completely change the chain of middlewares as needed.
- Cowboy will execute all middlewares in the given order, unless one of them decides to stop processing.</description>
+Middlewares give you complete control over how requests are to be processed. You can add your own middlewares to the mix or completely change the chain of middlewares as needed.
+Cowboy will execute all middlewares in the given order, unless one of them decides to stop processing.</description>
</item>
<item>
@@ -1926,8 +2030,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/guide/middlewares/</guid>
<description>Cowboy delegates the request processing to middleware components. By default, two middlewares are defined, for the routing and handling of the request, as is detailed in most of this guide.
- Middlewares give you complete control over how requests are to be processed. You can add your own middlewares to the mix or completely change the chain of middlewares as needed.
- Cowboy will execute all middlewares in the given order, unless one of them decides to stop processing.</description>
+Middlewares give you complete control over how requests are to be processed. You can add your own middlewares to the mix or completely change the chain of middlewares as needed.
+Cowboy will execute all middlewares in the given order, unless one of them decides to stop processing.</description>
</item>
<item>
@@ -1937,8 +2041,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/guide/middlewares/</guid>
<description>Cowboy delegates the request processing to middleware components. By default, two middlewares are defined, for the routing and handling of the request, as is detailed in most of this guide.
- Middlewares give you complete control over how requests are to be processed. You can add your own middlewares to the mix or completely change the chain of middlewares as needed.
- Cowboy will execute all middlewares in the given order, unless one of them decides to stop processing.</description>
+Middlewares give you complete control over how requests are to be processed. You can add your own middlewares to the mix or completely change the chain of middlewares as needed.
+Cowboy will execute all middlewares in the given order, unless one of them decides to stop processing.</description>
</item>
<item>
@@ -1948,8 +2052,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/guide/middlewares/</guid>
<description>Cowboy delegates the request processing to middleware components. By default, two middlewares are defined, for the routing and handling of the request, as is detailed in most of this guide.
- Middlewares give you complete control over how requests are to be processed. You can add your own middlewares to the mix or completely change the chain of middlewares as needed.
- Cowboy will execute all middlewares in the given order, unless one of them decides to stop processing.</description>
+Middlewares give you complete control over how requests are to be processed. You can add your own middlewares to the mix or completely change the chain of middlewares as needed.
+Cowboy will execute all middlewares in the given order, unless one of them decides to stop processing.</description>
</item>
<item>
@@ -1959,8 +2063,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/guide/middlewares/</guid>
<description>Cowboy delegates the request processing to middleware components. By default, two middlewares are defined, for the routing and handling of the request, as is detailed in most of this guide.
- Middlewares give you complete control over how requests are to be processed. You can add your own middlewares to the mix or completely change the chain of middlewares as needed.
- Cowboy will execute all middlewares in the given order, unless one of them decides to stop processing.</description>
+Middlewares give you complete control over how requests are to be processed. You can add your own middlewares to the mix or completely change the chain of middlewares as needed.
+Cowboy will execute all middlewares in the given order, unless one of them decides to stop processing.</description>
</item>
<item>
@@ -1970,8 +2074,8 @@
<guid>https://ninenines.eu/docs/en/erlang.mk/1/guide/history/</guid>
<description>This chapter aims to be a brief record of the life of the Erlang.mk project.
- Before Erlang.mk Erlang.mk originates from the Cowboy project. Cowboy started as a Rebar project and I, Loïc Hoguin, was very happy with it for a couple years. Over time however I started getting annoyed and frustrated by a number of things, including bad defaults, changing defaults and overall slowness.
- In particular, at the time I gave up on Rebar, the Cowboy test suite was taking about five minutes to run.</description>
+Before Erlang.mk Erlang.mk originates from the Cowboy project. Cowboy started as a Rebar project and I, Loïc Hoguin, was very happy with it for a couple years. Over time however I started getting annoyed and frustrated by a number of things, including bad defaults, changing defaults and overall slowness.
+In particular, at the time I gave up on Rebar, the Cowboy test suite was taking about five minutes to run.</description>
</item>
<item>
@@ -1981,9 +2085,10 @@
<guid>https://ninenines.eu/docs/en/erlang.mk/1/guide/contributing/</guid>
<description>You are welcome and encouraged to contribute.
- This is how.
- Priorities From the most important to the least important:
- Bugs Package issues/additions Refactoring Features Bugs If you have found a bug, you should open a ticket. Include everything relevant including the command you used, output, a link to the code that triggers the issue, why you think this is a bug, etc.</description>
+This is how.
+Priorities From the most important to the least important:
+Bugs Package issues/additions Refactoring Features Bugs If you have found a bug, you should open a ticket. Include everything relevant including the command you used, output, a link to the code that triggers the issue, why you think this is a bug, etc.
+If you think you have found a bug but you are not sure, you should open a ticket as previously explained.</description>
</item>
<item>
@@ -1993,7 +2098,7 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/guide/migrating_from_2.2/</guid>
<description>The following patch versions were released since Cowboy 2.2:
- Cowboy 2.2.2 While fixing the miscount in the previous patch release an issue was introduced where HTTP/2 bodies could be sent out of orders when using iolists. This has been corrected. Cowboy 2.2.1 Colons are now allowed within path segments in routes provided to cowboy_router:compile/1 as long as they are not the first character of the path segment.</description>
+Cowboy 2.2.2 While fixing the miscount in the previous patch release an issue was introduced where HTTP/2 bodies could be sent out of orders when using iolists. This has been corrected. Cowboy 2.2.1 Colons are now allowed within path segments in routes provided to cowboy_router:compile/1 as long as they are not the first character of the path segment. The cowboy_req:delete_resp_header/2 function will no longer crash when no response header was set before calling it.</description>
</item>
<item>
@@ -2003,8 +2108,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.0/guide/migrating_from_1.0/</guid>
<description>A lot has changed between Cowboy 1.0 and 2.0. The cowboy_req interface in particular has seen a massive revamp. Hooks are gone, their functionality can now be achieved via stream handlers.
- The documentation has seen great work, in particular the manual. Each module and each function now has its own dedicated manual page with full details and examples.
- Compatibility Compatibility with Erlang/OTP R16, 17 and 18 has been dropped.</description>
+The documentation has seen great work, in particular the manual. Each module and each function now has its own dedicated manual page with full details and examples.
+Compatibility Compatibility with Erlang/OTP R16, 17 and 18 has been dropped. Erlang/OTP 19.</description>
</item>
<item>
@@ -2014,7 +2119,7 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/guide/migrating_from_2.0/</guid>
<description>Cowboy 2.1 focused on adding features that were temporarily removed in Cowboy 2.0. A number of bugs found in the 2.0 release were also fixed.
- Features added It is now possible to obtain the client TLS certificate and the local IP/port for the connection from the Req object. Informational responses (1XX responses) can now be sent. They must be sent before initiating the final response.</description>
+Features added It is now possible to obtain the client TLS certificate and the local IP/port for the connection from the Req object. Informational responses (1XX responses) can now be sent. They must be sent before initiating the final response. The expect: 100-continue header is now handled automatically.</description>
</item>
<item>
@@ -2024,7 +2129,7 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/guide/migrating_from_2.2/</guid>
<description>Cowboy 2.3 focused on making the Cowboy processes behave properly according to OTP principles. This version is a very good milestone toward that goal and most of everything should now work. Release upgrades and a few details will be improved in future versions.
- Features added Add support for all functions from the module sys. Note that Cowboy currently does not implement the sys debugging mechanisms as tracing is recommended instead.</description>
+Features added Add support for all functions from the module sys. Note that Cowboy currently does not implement the sys debugging mechanisms as tracing is recommended instead. Add a max_frame_size option for Websocket handlers to close the connection when the client attempts to send a frame that&amp;apos;s too large.</description>
</item>
<item>
@@ -2034,7 +2139,7 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/guide/migrating_from_2.3/</guid>
<description>Cowboy 2.4 focused on improving the HTTP/2 implementation. All existing tests from RFC7540 and the h2spec test suite now all pass. Numerous options have been added to control SETTINGS and related behavior. In addition experimental support for Websocket over HTTP/2 was added.
- Features added Add experimental support for Websocket over HTTP/2. You can use the enable_connect_protocol option to enable. It implements the following draft: https://tools.ietf.org/html/draft-ietf-httpbis-h2-websockets-01 Add options max_decode_table_size and max_encode_table_size to restrict the size of the HPACK compression dictionary.</description>
+Features added Add experimental support for Websocket over HTTP/2. You can use the enable_connect_protocol option to enable. It implements the following draft: https://tools.ietf.org/html/draft-ietf-httpbis-h2-websockets-01 Add options max_decode_table_size and max_encode_table_size to restrict the size of the HPACK compression dictionary.</description>
</item>
<item>
@@ -2044,7 +2149,7 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.0/guide/specs/</guid>
<description>This chapter intends to list all the specification documents for or related to HTTP.
- HTTP IANA Registries HTTP Method Registry HTTP Status Code Registry Message Headers HTTP Parameters HTTP Alt-Svc Parameter Registry HTTP Authentication Scheme Registry HTTP Cache Directive Registry HTTP Digest Algorithm Values HTTP Origin-Bound Authentication Device Identifier Types HTTP Upgrade Token Registry HTTP Warn Codes HTTP/2 Parameters WebSocket Protocol Registries Current CORS: Cross-Origin Resource Sharing CSP2: Content Security Policy Level 2 DNT: Tracking Preference Expression (DNT) eventsource: Server-Sent Events Form content types: Form content types Preload: Preload REST: Fielding&amp;#8217;s Dissertation RFC 1945: HTTP/1.</description>
+HTTP IANA Registries HTTP Method Registry HTTP Status Code Registry Message Headers HTTP Parameters HTTP Alt-Svc Parameter Registry HTTP Authentication Scheme Registry HTTP Cache Directive Registry HTTP Digest Algorithm Values HTTP Origin-Bound Authentication Device Identifier Types HTTP Upgrade Token Registry HTTP Warn Codes HTTP/2 Parameters WebSocket Protocol Registries Current CORS: Cross-Origin Resource Sharing CSP2: Content Security Policy Level 2 DNT: Tracking Preference Expression (DNT) eventsource: Server-Sent Events Form content types: Form content types Preload: Preload REST: Fielding&amp;apos;s Dissertation RFC 1945: HTTP/1.</description>
</item>
<item>
@@ -2054,8 +2159,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/guide/migrating_from_1.0/</guid>
<description>A lot has changed between Cowboy 1.0 and 2.0. The cowboy_req interface in particular has seen a massive revamp. Hooks are gone, their functionality can now be achieved via stream handlers.
- The documentation has seen great work, in particular the manual. Each module and each function now has its own dedicated manual page with full details and examples.
- Compatibility Compatibility with Erlang/OTP R16, 17 and 18 has been dropped.</description>
+The documentation has seen great work, in particular the manual. Each module and each function now has its own dedicated manual page with full details and examples.
+Compatibility Compatibility with Erlang/OTP R16, 17 and 18 has been dropped. Erlang/OTP 19.</description>
</item>
<item>
@@ -2065,7 +2170,7 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/guide/migrating_from_2.1/</guid>
<description>Cowboy 2.2 focused on adding features required for writing gRPC servers and on completing test suites for the core HTTP RFCs, fixing many bugs along the way.
- Features added Add support for sending trailers at the end of response bodies. Trailers are additional header fields that may be sent after the body to add more information to the response. Their usage is required in gRPC servers. They are optional and may be discarded in other scenarios (for example if the request goes through an HTTP/1.</description>
+Features added Add support for sending trailers at the end of response bodies. Trailers are additional header fields that may be sent after the body to add more information to the response. Their usage is required in gRPC servers. They are optional and may be discarded in other scenarios (for example if the request goes through an HTTP/1.</description>
</item>
<item>
@@ -2075,7 +2180,7 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/guide/migrating_from_2.1/</guid>
<description>Cowboy 2.2 focused on adding features required for writing gRPC servers and on completing test suites for the core HTTP RFCs, fixing many bugs along the way.
- Features added Add support for sending trailers at the end of response bodies. Trailers are additional header fields that may be sent after the body to add more information to the response. Their usage is required in gRPC servers. They are optional and may be discarded in other scenarios (for example if the request goes through an HTTP/1.</description>
+Features added Add support for sending trailers at the end of response bodies. Trailers are additional header fields that may be sent after the body to add more information to the response. Their usage is required in gRPC servers. They are optional and may be discarded in other scenarios (for example if the request goes through an HTTP/1.</description>
</item>
<item>
@@ -2085,7 +2190,7 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/guide/migrating_from_2.2/</guid>
<description>Cowboy 2.3 focused on making the Cowboy processes behave properly according to OTP principles. This version is a very good milestone toward that goal and most of everything should now work. Release upgrades and a few details will be improved in future versions.
- Features added Add support for all functions from the module sys. Note that Cowboy currently does not implement the sys debugging mechanisms as tracing is recommended instead.</description>
+Features added Add support for all functions from the module sys. Note that Cowboy currently does not implement the sys debugging mechanisms as tracing is recommended instead. Add a max_frame_size option for Websocket handlers to close the connection when the client attempts to send a frame that&amp;apos;s too large.</description>
</item>
<item>
@@ -2095,7 +2200,7 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/guide/specs/</guid>
<description>This chapter intends to list all the specification documents for or related to HTTP.
- HTTP IANA Registries HTTP Method Registry HTTP Status Code Registry Message Headers HTTP Parameters HTTP Alt-Svc Parameter Registry HTTP Authentication Scheme Registry HTTP Cache Directive Registry HTTP Digest Algorithm Values HTTP Origin-Bound Authentication Device Identifier Types HTTP Upgrade Token Registry HTTP Warn Codes HTTP/2 Parameters WebSocket Protocol Registries Current CORS: Cross-Origin Resource Sharing CSP2: Content Security Policy Level 2 DNT: Tracking Preference Expression (DNT) eventsource: Server-Sent Events Form content types: Form content types Preload: Preload REST: Fielding&amp;#8217;s Dissertation RFC 1945: HTTP/1.</description>
+HTTP IANA Registries HTTP Method Registry HTTP Status Code Registry Message Headers HTTP Parameters HTTP Alt-Svc Parameter Registry HTTP Authentication Scheme Registry HTTP Cache Directive Registry HTTP Digest Algorithm Values HTTP Origin-Bound Authentication Device Identifier Types HTTP Upgrade Token Registry HTTP Warn Codes HTTP/2 Parameters WebSocket Protocol Registries Current CORS: Cross-Origin Resource Sharing CSP2: Content Security Policy Level 2 DNT: Tracking Preference Expression (DNT) eventsource: Server-Sent Events Form content types: Form content types Preload: Preload REST: Fielding&amp;apos;s Dissertation RFC 1945: HTTP/1.</description>
</item>
<item>
@@ -2105,7 +2210,7 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/guide/migrating_from_2.0/</guid>
<description>Cowboy 2.1 focused on adding features that were temporarily removed in Cowboy 2.0. A number of bugs found in the 2.0 release were also fixed.
- Features added It is now possible to obtain the client TLS certificate and the local IP/port for the connection from the Req object. Informational responses (1XX responses) can now be sent. They must be sent before initiating the final response.</description>
+Features added It is now possible to obtain the client TLS certificate and the local IP/port for the connection from the Req object. Informational responses (1XX responses) can now be sent. They must be sent before initiating the final response. The expect: 100-continue header is now handled automatically.</description>
</item>
<item>
@@ -2115,7 +2220,7 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/guide/migrating_from_2.0/</guid>
<description>Cowboy 2.1 focused on adding features that were temporarily removed in Cowboy 2.0. A number of bugs found in the 2.0 release were also fixed.
- Features added It is now possible to obtain the client TLS certificate and the local IP/port for the connection from the Req object. Informational responses (1XX responses) can now be sent. They must be sent before initiating the final response.</description>
+Features added It is now possible to obtain the client TLS certificate and the local IP/port for the connection from the Req object. Informational responses (1XX responses) can now be sent. They must be sent before initiating the final response. The expect: 100-continue header is now handled automatically.</description>
</item>
<item>
@@ -2125,7 +2230,7 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/guide/migrating_from_2.1/</guid>
<description>Cowboy 2.2 focused on adding features required for writing gRPC servers and on completing test suites for the core HTTP RFCs, fixing many bugs along the way.
- Features added Add support for sending trailers at the end of response bodies. Trailers are additional header fields that may be sent after the body to add more information to the response. Their usage is required in gRPC servers. They are optional and may be discarded in other scenarios (for example if the request goes through an HTTP/1.</description>
+Features added Add support for sending trailers at the end of response bodies. Trailers are additional header fields that may be sent after the body to add more information to the response. Their usage is required in gRPC servers. They are optional and may be discarded in other scenarios (for example if the request goes through an HTTP/1.</description>
</item>
<item>
@@ -2135,8 +2240,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/guide/migrating_from_1.0/</guid>
<description>A lot has changed between Cowboy 1.0 and 2.0. The cowboy_req interface in particular has seen a massive revamp. Hooks are gone, their functionality can now be achieved via stream handlers.
- The documentation has seen great work, in particular the manual. Each module and each function now has its own dedicated manual page with full details and examples.
- Compatibility Compatibility with Erlang/OTP R16, 17 and 18 has been dropped.</description>
+The documentation has seen great work, in particular the manual. Each module and each function now has its own dedicated manual page with full details and examples.
+Compatibility Compatibility with Erlang/OTP R16, 17 and 18 has been dropped. Erlang/OTP 19.</description>
</item>
<item>
@@ -2146,8 +2251,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/guide/migrating_from_1.0/</guid>
<description>A lot has changed between Cowboy 1.0 and 2.0. The cowboy_req interface in particular has seen a massive revamp. Hooks are gone, their functionality can now be achieved via stream handlers.
- The documentation has seen great work, in particular the manual. Each module and each function now has its own dedicated manual page with full details and examples.
- Compatibility Compatibility with Erlang/OTP R16, 17 and 18 has been dropped.</description>
+The documentation has seen great work, in particular the manual. Each module and each function now has its own dedicated manual page with full details and examples.
+Compatibility Compatibility with Erlang/OTP R16, 17 and 18 has been dropped. Erlang/OTP 19.</description>
</item>
<item>
@@ -2157,7 +2262,7 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/guide/migrating_from_2.0/</guid>
<description>Cowboy 2.1 focused on adding features that were temporarily removed in Cowboy 2.0. A number of bugs found in the 2.0 release were also fixed.
- Features added It is now possible to obtain the client TLS certificate and the local IP/port for the connection from the Req object. Informational responses (1XX responses) can now be sent. They must be sent before initiating the final response.</description>
+Features added It is now possible to obtain the client TLS certificate and the local IP/port for the connection from the Req object. Informational responses (1XX responses) can now be sent. They must be sent before initiating the final response. The expect: 100-continue header is now handled automatically.</description>
</item>
<item>
@@ -2167,7 +2272,7 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/guide/specs/</guid>
<description>This chapter intends to list all the specification documents for or related to HTTP.
- HTTP IANA Registries HTTP Method Registry HTTP Status Code Registry Message Headers HTTP Parameters HTTP Alt-Svc Parameter Registry HTTP Authentication Scheme Registry HTTP Cache Directive Registry HTTP Digest Algorithm Values HTTP Origin-Bound Authentication Device Identifier Types HTTP Upgrade Token Registry HTTP Warn Codes HTTP/2 Parameters WebSocket Protocol Registries Current CORS: Cross-Origin Resource Sharing CSP2: Content Security Policy Level 2 DNT: Tracking Preference Expression (DNT) eventsource: Server-Sent Events Form content types: Form content types Preload: Preload REST: Fielding&amp;#8217;s Dissertation RFC 1945: HTTP/1.</description>
+HTTP IANA Registries HTTP Method Registry HTTP Status Code Registry Message Headers HTTP Parameters HTTP Alt-Svc Parameter Registry HTTP Authentication Scheme Registry HTTP Cache Directive Registry HTTP Digest Algorithm Values HTTP Origin-Bound Authentication Device Identifier Types HTTP Upgrade Token Registry HTTP Warn Codes HTTP/2 Parameters WebSocket Protocol Registries Current CORS: Cross-Origin Resource Sharing CSP2: Content Security Policy Level 2 DNT: Tracking Preference Expression (DNT) eventsource: Server-Sent Events Form content types: Form content types Preload: Preload REST: Fielding&amp;apos;s Dissertation RFC 1945: HTTP/1.</description>
</item>
<item>
@@ -2177,7 +2282,7 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/guide/specs/</guid>
<description>This chapter intends to list all the specification documents for or related to HTTP.
- HTTP IANA Registries HTTP Method Registry HTTP Status Code Registry Message Headers HTTP Parameters HTTP Alt-Svc Parameter Registry HTTP Authentication Scheme Registry HTTP Cache Directive Registry HTTP Digest Algorithm Values HTTP Origin-Bound Authentication Device Identifier Types HTTP Upgrade Token Registry HTTP Warn Codes HTTP/2 Parameters WebSocket Protocol Registries Current CORS: Cross-Origin Resource Sharing CSP2: Content Security Policy Level 2 DNT: Tracking Preference Expression (DNT) eventsource: Server-Sent Events Form content types: Form content types Preload: Preload PROXY: The PROXY protocol REST: Fielding&amp;#8217;s Dissertation RFC 1945: HTTP/1.</description>
+HTTP IANA Registries HTTP Method Registry HTTP Status Code Registry Message Headers HTTP Parameters HTTP Alt-Svc Parameter Registry HTTP Authentication Scheme Registry HTTP Cache Directive Registry HTTP Digest Algorithm Values HTTP Origin-Bound Authentication Device Identifier Types HTTP Upgrade Token Registry HTTP Warn Codes HTTP/2 Parameters WebSocket Protocol Registries Current CORS: Cross-Origin Resource Sharing CSP2: Content Security Policy Level 2 DNT: Tracking Preference Expression (DNT) eventsource: Server-Sent Events Form content types: Form content types Preload: Preload PROXY: The PROXY protocol REST: Fielding&amp;apos;s Dissertation RFC 1945: HTTP/1.</description>
</item>
<item>
@@ -2187,8 +2292,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/guide/migrating_from_1.0/</guid>
<description>A lot has changed between Cowboy 1.0 and 2.0. The cowboy_req interface in particular has seen a massive revamp. Hooks are gone, their functionality can now be achieved via stream handlers.
- The documentation has seen great work, in particular the manual. Each module and each function now has its own dedicated manual page with full details and examples.
- Compatibility Compatibility with Erlang/OTP R16, 17 and 18 has been dropped.</description>
+The documentation has seen great work, in particular the manual. Each module and each function now has its own dedicated manual page with full details and examples.
+Compatibility Compatibility with Erlang/OTP R16, 17 and 18 has been dropped. Erlang/OTP 19.</description>
</item>
<item>
@@ -2198,7 +2303,7 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/guide/specs/</guid>
<description>This chapter intends to list all the specification documents for or related to HTTP.
- HTTP IANA Registries HTTP Method Registry HTTP Status Code Registry Message Headers HTTP Parameters HTTP Alt-Svc Parameter Registry HTTP Authentication Scheme Registry HTTP Cache Directive Registry HTTP Digest Algorithm Values HTTP Origin-Bound Authentication Device Identifier Types HTTP Upgrade Token Registry HTTP Warn Codes HTTP/2 Parameters WebSocket Protocol Registries Current CORS: Cross-Origin Resource Sharing CSP2: Content Security Policy Level 2 DNT: Tracking Preference Expression (DNT) eventsource: Server-Sent Events Form content types: Form content types Preload: Preload PROXY: The PROXY protocol REST: Fielding&amp;#8217;s Dissertation RFC 1945: HTTP/1.</description>
+HTTP IANA Registries HTTP Method Registry HTTP Status Code Registry Message Headers HTTP Parameters HTTP Alt-Svc Parameter Registry HTTP Authentication Scheme Registry HTTP Cache Directive Registry HTTP Digest Algorithm Values HTTP Origin-Bound Authentication Device Identifier Types HTTP Upgrade Token Registry HTTP Warn Codes HTTP/2 Parameters WebSocket Protocol Registries Current CORS: Cross-Origin Resource Sharing CSP2: Content Security Policy Level 2 DNT: Tracking Preference Expression (DNT) eventsource: Server-Sent Events Form content types: Form content types Preload: Preload PROXY: The PROXY protocol REST: Fielding&amp;apos;s Dissertation RFC 1945: HTTP/1.</description>
</item>
<item>
@@ -2208,10 +2313,10 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.0/manual/</guid>
<description>Name cowboy - Small, fast, modern HTTP server for Erlang/OTP
- Description Cowboy is an HTTP server for Erlang/OTP with support for the HTTP/1.1, HTTP/2 and Websocket protocols.
- Cowboy aims to provide a complete HTTP stack. This includes the implementation of the HTTP RFCs but also any directly related standards, like Websocket or Server-Sent Events.
- Modules Functions:
- cowboy(3) - Listener management cowboy_req(3) - Request and response cowboy_router(3) - Router cowboy_constraints(3) - Constraints Protocols:</description>
+Description Cowboy is an HTTP server for Erlang/OTP with support for the HTTP/1.1, HTTP/2 and Websocket protocols.
+Cowboy aims to provide a complete HTTP stack. This includes the implementation of the HTTP RFCs but also any directly related standards, like Websocket or Server-Sent Events.
+Modules Functions:
+cowboy(3) - Listener management cowboy_req(3) - Request and response cowboy_router(3) - Router cowboy_constraints(3) - Constraints Protocols:</description>
</item>
<item>
@@ -2221,10 +2326,10 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/manual/</guid>
<description>Name cowboy - Small, fast, modern HTTP server for Erlang/OTP
- Description Cowboy is an HTTP server for Erlang/OTP with support for the HTTP/1.1, HTTP/2 and Websocket protocols.
- Cowboy aims to provide a complete HTTP stack. This includes the implementation of the HTTP RFCs but also any directly related standards, like Websocket or Server-Sent Events.
- Modules Functions:
- cowboy(3) - Listener management cowboy_req(3) - Request and response cowboy_router(3) - Router cowboy_constraints(3) - Constraints Protocols:</description>
+Description Cowboy is an HTTP server for Erlang/OTP with support for the HTTP/1.1, HTTP/2 and Websocket protocols.
+Cowboy aims to provide a complete HTTP stack. This includes the implementation of the HTTP RFCs but also any directly related standards, like Websocket or Server-Sent Events.
+Modules Functions:
+cowboy(3) - Listener management cowboy_req(3) - Request and response cowboy_router(3) - Router cowboy_constraints(3) - Constraints Protocols:</description>
</item>
<item>
@@ -2234,10 +2339,10 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/manual/</guid>
<description>Name cowboy - Small, fast, modern HTTP server for Erlang/OTP
- Description Cowboy is an HTTP server for Erlang/OTP with support for the HTTP/1.1, HTTP/2 and Websocket protocols.
- Cowboy aims to provide a complete HTTP stack. This includes the implementation of the HTTP RFCs but also any directly related standards, like Websocket or Server-Sent Events.
- Modules Functions:
- cowboy(3) - Listener management cowboy_req(3) - Request and response cowboy_router(3) - Router cowboy_constraints(3) - Constraints Protocols:</description>
+Description Cowboy is an HTTP server for Erlang/OTP with support for the HTTP/1.1, HTTP/2 and Websocket protocols.
+Cowboy aims to provide a complete HTTP stack. This includes the implementation of the HTTP RFCs but also any directly related standards, like Websocket or Server-Sent Events.
+Modules Functions:
+cowboy(3) - Listener management cowboy_req(3) - Request and response cowboy_router(3) - Router cowboy_constraints(3) - Constraints Protocols:</description>
</item>
<item>
@@ -2247,10 +2352,10 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/manual/</guid>
<description>Name cowboy - Small, fast, modern HTTP server for Erlang/OTP
- Description Cowboy is an HTTP server for Erlang/OTP with support for the HTTP/1.1, HTTP/2 and Websocket protocols.
- Cowboy aims to provide a complete HTTP stack. This includes the implementation of the HTTP RFCs but also any directly related standards, like Websocket or Server-Sent Events.
- Modules Functions:
- cowboy(3) - Listener management cowboy_req(3) - Request and response cowboy_router(3) - Router cowboy_constraints(3) - Constraints Protocols:</description>
+Description Cowboy is an HTTP server for Erlang/OTP with support for the HTTP/1.1, HTTP/2 and Websocket protocols.
+Cowboy aims to provide a complete HTTP stack. This includes the implementation of the HTTP RFCs but also any directly related standards, like Websocket or Server-Sent Events.
+Modules Functions:
+cowboy(3) - Listener management cowboy_req(3) - Request and response cowboy_router(3) - Router cowboy_constraints(3) - Constraints Protocols:</description>
</item>
<item>
@@ -2260,10 +2365,10 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/manual/</guid>
<description>Name cowboy - Small, fast, modern HTTP server for Erlang/OTP
- Description Cowboy is an HTTP server for Erlang/OTP with support for the HTTP/1.1, HTTP/2 and Websocket protocols.
- Cowboy aims to provide a complete HTTP stack. This includes the implementation of the HTTP RFCs but also any directly related standards, like Websocket or Server-Sent Events.
- Modules Functions:
- cowboy(3) - Listener management cowboy_req(3) - Request and response cowboy_router(3) - Router cowboy_constraints(3) - Constraints Protocols:</description>
+Description Cowboy is an HTTP server for Erlang/OTP with support for the HTTP/1.1, HTTP/2 and Websocket protocols.
+Cowboy aims to provide a complete HTTP stack. This includes the implementation of the HTTP RFCs but also any directly related standards, like Websocket or Server-Sent Events.
+Modules Functions:
+cowboy(3) - Listener management cowboy_req(3) - Request and response cowboy_router(3) - Router cowboy_constraints(3) - Constraints Protocols:</description>
</item>
<item>
@@ -2272,7 +2377,7 @@
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://ninenines.eu/docs/en/cowboy/2.0/guide/</guid>
- <description>Rationale The modern Web Erlang and the Web Introduction Introduction Getting started Flow diagram Configuration Listeners Routing Constraints Handlers Handlers Loop handlers Static files Request and response Request details Reading the request body Sending a response Using cookies Multipart REST REST principles Handling REST requests REST flowcharts Designing a resource handler Websocket The Websocket protocol Websocket handlers Advanced Streams Middlewares Additional information Migrating from Cowboy 1.</description>
+ <description>Rationale The modern Web Erlang and the Web Introduction Introduction Getting started Flow diagram Configuration Listeners Routing Constraints Handlers Handlers Loop handlers Static files Request and response Request details Reading the request body Sending a response Using cookies Multipart REST REST principles Handling REST requests REST flowcharts Designing a resource handler Websocket The Websocket protocol Websocket handlers Advanced Streams Middlewares Additional information Migrating from Cowboy 1.</description>
</item>
<item>
@@ -2281,7 +2386,7 @@
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://ninenines.eu/docs/en/cowboy/2.1/guide/</guid>
- <description>Rationale The modern Web Erlang and the Web Introduction Introduction Getting started Flow diagram Configuration Listeners Routing Constraints Handlers Handlers Loop handlers Static files Request and response Request details Reading the request body Sending a response Using cookies Multipart REST REST principles Handling REST requests REST flowcharts Designing a resource handler Websocket The Websocket protocol Websocket handlers Advanced Streams Middlewares Additional information Migrating from Cowboy 2.</description>
+ <description>Rationale The modern Web Erlang and the Web Introduction Introduction Getting started Flow diagram Configuration Listeners Routing Constraints Handlers Handlers Loop handlers Static files Request and response Request details Reading the request body Sending a response Using cookies Multipart REST REST principles Handling REST requests REST flowcharts Designing a resource handler Websocket The Websocket protocol Websocket handlers Advanced Streams Middlewares Additional information Migrating from Cowboy 2.</description>
</item>
<item>
@@ -2290,7 +2395,7 @@
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://ninenines.eu/docs/en/cowboy/2.2/guide/</guid>
- <description>Rationale The modern Web Erlang and the Web Introduction Introduction Getting started Flow diagram Configuration Listeners Routing Constraints Handlers Handlers Loop handlers Static files Request and response Request details Reading the request body Sending a response Using cookies Multipart REST REST principles Handling REST requests REST flowcharts Designing a resource handler Websocket The Websocket protocol Websocket handlers Advanced Streams Middlewares Additional information Changes since Cowboy 2.</description>
+ <description>Rationale The modern Web Erlang and the Web Introduction Introduction Getting started Flow diagram Configuration Listeners Routing Constraints Handlers Handlers Loop handlers Static files Request and response Request details Reading the request body Sending a response Using cookies Multipart REST REST principles Handling REST requests REST flowcharts Designing a resource handler Websocket The Websocket protocol Websocket handlers Advanced Streams Middlewares Additional information Changes since Cowboy 2.</description>
</item>
<item>
@@ -2299,7 +2404,7 @@
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://ninenines.eu/docs/en/cowboy/2.3/guide/</guid>
- <description>Rationale The modern Web Erlang and the Web Introduction Introduction Getting started Flow diagram Configuration Listeners Routing Constraints Handlers Handlers Loop handlers Static files Request and response Request details Reading the request body Sending a response Using cookies Multipart REST REST principles Handling REST requests REST flowcharts Designing a resource handler Websocket The Websocket protocol Websocket handlers Advanced Streams Middlewares Additional information Migrating from Cowboy 2.</description>
+ <description>Rationale The modern Web Erlang and the Web Introduction Introduction Getting started Flow diagram Configuration Listeners Routing Constraints Handlers Handlers Loop handlers Static files Request and response Request details Reading the request body Sending a response Using cookies Multipart REST REST principles Handling REST requests REST flowcharts Designing a resource handler Websocket The Websocket protocol Websocket handlers Advanced Streams Middlewares Additional information Migrating from Cowboy 2.</description>
</item>
<item>
@@ -2308,7 +2413,7 @@
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://ninenines.eu/docs/en/cowboy/2.4/guide/</guid>
- <description>Rationale The modern Web Erlang and the Web Introduction Introduction Getting started Flow diagram Configuration Listeners Routing Constraints Handlers Handlers Loop handlers Static files Request and response Request details Reading the request body Sending a response Using cookies Multipart REST REST principles Handling REST requests REST flowcharts Designing a resource handler Websocket The Websocket protocol Websocket handlers Advanced Streams Middlewares Additional information Migrating from Cowboy 2.</description>
+ <description>Rationale The modern Web Erlang and the Web Introduction Introduction Getting started Flow diagram Configuration Listeners Routing Constraints Handlers Handlers Loop handlers Static files Request and response Request details Reading the request body Sending a response Using cookies Multipart REST REST principles Handling REST requests REST flowcharts Designing a resource handler Websocket The Websocket protocol Websocket handlers Advanced Streams Middlewares Additional information Migrating from Cowboy 2.</description>
</item>
<item>
@@ -2317,7 +2422,7 @@
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://ninenines.eu/docs/en/erlang.mk/1/guide/</guid>
- <description>Installation Getting started Overview Updating Erlang.mk Limitations Code Building Packages and dependencies NIFs and port drivers Releases Self-extracting releases Escripts OTP version management Compatibility with other build tools Documentation Asciidoc documentation EDoc comments Sphinx documentation Tests Erlang shell EUnit Common Test Triq Code coverage Continuous integration Dialyzer Xref Third-party plugins External plugins List of plugins About Erlang.</description>
+ <description>Installation Getting started Overview Updating Erlang.mk Limitations Code Building Packages and dependencies NIFs and port drivers Releases Self-extracting releases Escripts OTP version management Compatibility with other build tools Documentation Asciidoc documentation EDoc comments Sphinx documentation Tests Erlang shell EUnit Common Test Triq Code coverage Continuous integration Dialyzer Xref Third-party plugins External plugins List of plugins About Erlang.</description>
</item>
<item>
@@ -2327,9 +2432,9 @@
<guid>https://ninenines.eu/docs/en/gun/1.0/manual/</guid>
<description>Name gun - HTTP/1.1, HTTP/2 and Websocket client for Erlang/OTP
- Description Gun is an HTTP client for Erlang/OTP with support for the HTTP/1.1, HTTP/2 and Websocket protocols.
- Gun aims to provide an easy to use, asynchronous and always-connected client. It maintains a permanent connection to the server and reconnects automatically when necessary.
- Modules gun(3) - Asynchronous HTTP client Dependencies cowlib(7) - Support library for manipulating Web protocols ssl - Secure communication over sockets All these applications must be started before the gun application.</description>
+Description Gun is an HTTP client for Erlang/OTP with support for the HTTP/1.1, HTTP/2 and Websocket protocols.
+Gun aims to provide an easy to use, asynchronous and always-connected client. It maintains a permanent connection to the server and reconnects automatically when necessary.
+Modules gun(3) - Asynchronous HTTP client Dependencies cowlib(7) - Support library for manipulating Web protocols ssl - Secure communication over sockets All these applications must be started before the gun application.</description>
</item>
<item>
@@ -2338,7 +2443,7 @@
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://ninenines.eu/docs/en/gun/1.0/guide/</guid>
- <description> Introduction Starting and stopping Supported protocols Connection Using HTTP Using Websocket </description>
+ <description>Introduction Starting and stopping Supported protocols Connection Using HTTP Using Websocket </description>
</item>
<item>
@@ -2348,8 +2453,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.0/manual/http_status_codes/</guid>
<description>Name HTTP status codes - status codes used by Cowboy
- Description This chapter aims to list all HTTP status codes that Cowboy may return, with details on the reasons why. The list given here only includes the replies that Cowboy sends, not user replies.
- 100 Continue When the client sends an expect: 100-continue header, Cowboy automatically sends a this status code before trying to read the request body.</description>
+Description This chapter aims to list all HTTP status codes that Cowboy may return, with details on the reasons why. The list given here only includes the replies that Cowboy sends, not user replies.
+100 Continue When the client sends an expect: 100-continue header, Cowboy automatically sends a this status code before trying to read the request body. This behavior can be disabled using the appropriate body option.</description>
</item>
<item>
@@ -2359,8 +2464,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/manual/http_status_codes/</guid>
<description>Name HTTP status codes - status codes used by Cowboy
- Description This chapter aims to list all HTTP status codes that Cowboy may return, with details on the reasons why. The list given here only includes the replies that Cowboy sends, not user replies.
- 100 Continue When the client sends an expect: 100-continue header, Cowboy automatically sends a this status code before trying to read the request body.</description>
+Description This chapter aims to list all HTTP status codes that Cowboy may return, with details on the reasons why. The list given here only includes the replies that Cowboy sends, not user replies.
+100 Continue When the client sends an expect: 100-continue header, Cowboy automatically sends a this status code before trying to read the request body. This behavior can be disabled using the appropriate body option.</description>
</item>
<item>
@@ -2370,8 +2475,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/manual/http_status_codes/</guid>
<description>Name HTTP status codes - status codes used by Cowboy
- Description This chapter aims to list all HTTP status codes that Cowboy may return, with details on the reasons why. The list given here only includes the replies that Cowboy sends, not user replies.
- 100 Continue When the client sends an expect: 100-continue header, Cowboy automatically sends a this status code before trying to read the request body.</description>
+Description This chapter aims to list all HTTP status codes that Cowboy may return, with details on the reasons why. The list given here only includes the replies that Cowboy sends, not user replies.
+100 Continue When the client sends an expect: 100-continue header, Cowboy automatically sends a this status code before trying to read the request body. This behavior can be disabled using the appropriate body option.</description>
</item>
<item>
@@ -2381,8 +2486,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/manual/http_status_codes/</guid>
<description>Name HTTP status codes - status codes used by Cowboy
- Description This chapter aims to list all HTTP status codes that Cowboy may return, with details on the reasons why. The list given here only includes the replies that Cowboy sends, not user replies.
- 100 Continue When the client sends an expect: 100-continue header, Cowboy automatically sends a this status code before trying to read the request body.</description>
+Description This chapter aims to list all HTTP status codes that Cowboy may return, with details on the reasons why. The list given here only includes the replies that Cowboy sends, not user replies.
+100 Continue When the client sends an expect: 100-continue header, Cowboy automatically sends a this status code before trying to read the request body. This behavior can be disabled using the appropriate body option.</description>
</item>
<item>
@@ -2392,8 +2497,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/manual/http_status_codes/</guid>
<description>Name HTTP status codes - status codes used by Cowboy
- Description This chapter aims to list all HTTP status codes that Cowboy may return, with details on the reasons why. The list given here only includes the replies that Cowboy sends, not user replies.
- 100 Continue When the client sends an expect: 100-continue header, Cowboy automatically sends a this status code before trying to read the request body.</description>
+Description This chapter aims to list all HTTP status codes that Cowboy may return, with details on the reasons why. The list given here only includes the replies that Cowboy sends, not user replies.
+100 Continue When the client sends an expect: 100-continue header, Cowboy automatically sends a this status code before trying to read the request body. This behavior can be disabled using the appropriate body option.</description>
</item>
<item>
@@ -2402,7 +2507,7 @@
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://ninenines.eu/docs/en/ranch/1.2/manual/</guid>
- <description> ranch(7) ranch(3) ranch_protocol(3) ranch_ssl(3) ranch_tcp(3) ranch_transport(3) </description>
+ <description>ranch(7) ranch(3) ranch_protocol(3) ranch_ssl(3) ranch_tcp(3) ranch_transport(3) </description>
</item>
<item>
@@ -2411,7 +2516,7 @@
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://ninenines.eu/docs/en/ranch/1.3/manual/</guid>
- <description> ranch(7) ranch(3) ranch_protocol(3) ranch_ssl(3) ranch_tcp(3) ranch_transport(3) </description>
+ <description>ranch(7) ranch(3) ranch_protocol(3) ranch_ssl(3) ranch_tcp(3) ranch_transport(3) </description>
</item>
<item>
@@ -2420,7 +2525,16 @@
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://ninenines.eu/docs/en/ranch/1.4/manual/</guid>
- <description> ranch(7) ranch(3) ranch_protocol(3) ranch_ssl(3) ranch_tcp(3) ranch_transport(3) </description>
+ <description>ranch(7) ranch(3) ranch_protocol(3) ranch_ssl(3) ranch_tcp(3) ranch_transport(3) </description>
+ </item>
+
+ <item>
+ <title>Ranch Function Reference</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.5/manual/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.5/manual/</guid>
+ <description>ranch(7) ranch(3) ranch_protocol(3) ranch_ssl(3) ranch_tcp(3) ranch_transport(3) </description>
</item>
<item>
@@ -2429,7 +2543,7 @@
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://ninenines.eu/docs/en/ranch/1.2/guide/</guid>
- <description> Introduction Listeners Transports Protocols Embedded mode Writing parsers SSL client authentication Internals </description>
+ <description>Introduction Listeners Transports Protocols Embedded mode Writing parsers SSL client authentication Internals </description>
</item>
<item>
@@ -2438,7 +2552,7 @@
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://ninenines.eu/docs/en/ranch/1.3/guide/</guid>
- <description> Introduction Listeners Transports Protocols Embedded mode Writing parsers SSL client authentication Internals </description>
+ <description>Introduction Listeners Transports Protocols Embedded mode Writing parsers SSL client authentication Internals </description>
</item>
<item>
@@ -2447,7 +2561,16 @@
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://ninenines.eu/docs/en/ranch/1.4/guide/</guid>
- <description> Introduction Listeners Transports Protocols Embedded mode Writing parsers SSL client authentication Internals </description>
+ <description>Introduction Listeners Transports Protocols Embedded mode Writing parsers SSL client authentication Internals </description>
+ </item>
+
+ <item>
+ <title>Ranch User Guide</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.5/guide/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.5/guide/</guid>
+ <description>Introduction Listeners Transports Protocols Embedded mode Writing parsers SSL client authentication Internals </description>
</item>
<item>
@@ -2457,8 +2580,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy/</guid>
<description>Name cowboy - HTTP server
- Description The module cowboy provides convenience functions for manipulating Ranch listeners.
- Exports cowboy:start_clear(3) - Listen for connections using plain TCP cowboy:start_tls(3) - Listen for connections using TLS cowboy:stop_listener(3) - Stop the given listener cowboy:set_env(3) - Update a listener&amp;#8217;s environment value Types fields() fields() :: [Name | {Name, Constraints} | {Name, Constraints, Default}] Name :: atom() Constraints :: Constraint | [Constraint] Constraint :: cowboy_constraints:constraint() Default :: any() Fields description for match operations.</description>
+Description The module cowboy provides convenience functions for manipulating Ranch listeners.
+Exports cowboy:start_clear(3) - Listen for connections using plain TCP cowboy:start_tls(3) - Listen for connections using TLS cowboy:stop_listener(3) - Stop the given listener cowboy:set_env(3) - Update a listener&amp;apos;s environment value Types fields() fields() :: [Name | {Name, Constraints} | {Name, Constraints, Default}] Name :: atom() Constraints :: Constraint | [Constraint] Constraint :: cowboy_constraints:constraint() Default :: any() Fields description for match operations.</description>
</item>
<item>
@@ -2468,8 +2591,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/manual/cowboy/</guid>
<description>Name cowboy - HTTP server
- Description The module cowboy provides convenience functions for manipulating Ranch listeners.
- Exports cowboy:start_clear(3) - Listen for connections using plain TCP cowboy:start_tls(3) - Listen for connections using TLS cowboy:stop_listener(3) - Stop the given listener cowboy:set_env(3) - Update a listener&amp;#8217;s environment value Types fields() fields() :: [Name | {Name, Constraints} | {Name, Constraints, Default}] Name :: atom() Constraints :: Constraint | [Constraint] Constraint :: cowboy_constraints:constraint() Default :: any() Fields description for match operations.</description>
+Description The module cowboy provides convenience functions for manipulating Ranch listeners.
+Exports cowboy:start_clear(3) - Listen for connections using plain TCP cowboy:start_tls(3) - Listen for connections using TLS cowboy:stop_listener(3) - Stop the given listener cowboy:set_env(3) - Update a listener&amp;apos;s environment value Types fields() fields() :: [Name | {Name, Constraints} | {Name, Constraints, Default}] Name :: atom() Constraints :: Constraint | [Constraint] Constraint :: cowboy_constraints:constraint() Default :: any() Fields description for match operations.</description>
</item>
<item>
@@ -2479,8 +2602,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/manual/cowboy/</guid>
<description>Name cowboy - HTTP server
- Description The module cowboy provides convenience functions for manipulating Ranch listeners.
- Exports cowboy:start_clear(3) - Listen for connections using plain TCP cowboy:start_tls(3) - Listen for connections using TLS cowboy:stop_listener(3) - Stop the given listener cowboy:set_env(3) - Update a listener&amp;#8217;s environment value Types fields() fields() :: [Name | {Name, Constraints} | {Name, Constraints, Default}] Name :: atom() Constraints :: Constraint | [Constraint] Constraint :: cowboy_constraints:constraint() Default :: any() Fields description for match operations.</description>
+Description The module cowboy provides convenience functions for manipulating Ranch listeners.
+Exports cowboy:start_clear(3) - Listen for connections using plain TCP cowboy:start_tls(3) - Listen for connections using TLS cowboy:stop_listener(3) - Stop the given listener cowboy:set_env(3) - Update a listener&amp;apos;s environment value Types fields() fields() :: [Name | {Name, Constraints} | {Name, Constraints, Default}] Name :: atom() Constraints :: Constraint | [Constraint] Constraint :: cowboy_constraints:constraint() Default :: any() Fields description for match operations.</description>
</item>
<item>
@@ -2490,8 +2613,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/manual/cowboy/</guid>
<description>Name cowboy - HTTP server
- Description The module cowboy provides convenience functions for manipulating Ranch listeners.
- Exports cowboy:start_clear(3) - Listen for connections using plain TCP cowboy:start_tls(3) - Listen for connections using TLS cowboy:stop_listener(3) - Stop the given listener cowboy:set_env(3) - Update a listener&amp;#8217;s environment value Types fields() fields() :: [Name | {Name, Constraints} | {Name, Constraints, Default}] Name :: atom() Constraints :: Constraint | [Constraint] Constraint :: cowboy_constraints:constraint() Default :: any() Fields description for match operations.</description>
+Description The module cowboy provides convenience functions for manipulating Ranch listeners.
+Exports cowboy:start_clear(3) - Listen for connections using plain TCP cowboy:start_tls(3) - Listen for connections using TLS cowboy:stop_listener(3) - Stop the given listener cowboy:set_env(3) - Update a listener&amp;apos;s environment value Types fields() fields() :: [Name | {Name, Constraints} | {Name, Constraints, Default}] Name :: atom() Constraints :: Constraint | [Constraint] Constraint :: cowboy_constraints:constraint() Default :: any() Fields description for match operations.</description>
</item>
<item>
@@ -2501,8 +2624,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/manual/cowboy/</guid>
<description>Name cowboy - HTTP server
- Description The module cowboy provides convenience functions for manipulating Ranch listeners.
- Exports cowboy:start_clear(3) - Listen for connections using plain TCP cowboy:start_tls(3) - Listen for connections using TLS cowboy:stop_listener(3) - Stop the given listener cowboy:set_env(3) - Update a listener&amp;#8217;s environment value Types fields() fields() :: [Name | {Name, Constraints} | {Name, Constraints, Default}] Name :: atom() Constraints :: Constraint | [Constraint] Constraint :: cowboy_constraints:constraint() Default :: any() Fields description for match operations.</description>
+Description The module cowboy provides convenience functions for manipulating Ranch listeners.
+Exports cowboy:start_clear(3) - Listen for connections using plain TCP cowboy:start_tls(3) - Listen for connections using TLS cowboy:stop_listener(3) - Stop the given listener cowboy:set_env(3) - Update a listener&amp;apos;s environment value Types fields() fields() :: [Name | {Name, Constraints} | {Name, Constraints, Default}] Name :: atom() Constraints :: Constraint | [Constraint] Constraint :: cowboy_constraints:constraint() Default :: any() Fields description for match operations.</description>
</item>
<item>
@@ -2512,10 +2635,10 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy_app/</guid>
<description>Name cowboy - Small, fast, modern HTTP server for Erlang/OTP
- Description Cowboy is an HTTP server for Erlang/OTP with support for the HTTP/1.1, HTTP/2 and Websocket protocols.
- Cowboy aims to provide a complete HTTP stack. This includes the implementation of the HTTP RFCs but also any directly related standards, like Websocket or Server-Sent Events.
- Modules Functions:
- cowboy(3) - Listener management cowboy_req(3) - Request and response cowboy_router(3) - Router cowboy_constraints(3) - Constraints Protocols:</description>
+Description Cowboy is an HTTP server for Erlang/OTP with support for the HTTP/1.1, HTTP/2 and Websocket protocols.
+Cowboy aims to provide a complete HTTP stack. This includes the implementation of the HTTP RFCs but also any directly related standards, like Websocket or Server-Sent Events.
+Modules Functions:
+cowboy(3) - Listener management cowboy_req(3) - Request and response cowboy_router(3) - Router cowboy_constraints(3) - Constraints Protocols:</description>
</item>
<item>
@@ -2525,10 +2648,10 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/manual/cowboy_app/</guid>
<description>Name cowboy - Small, fast, modern HTTP server for Erlang/OTP
- Description Cowboy is an HTTP server for Erlang/OTP with support for the HTTP/1.1, HTTP/2 and Websocket protocols.
- Cowboy aims to provide a complete HTTP stack. This includes the implementation of the HTTP RFCs but also any directly related standards, like Websocket or Server-Sent Events.
- Modules Functions:
- cowboy(3) - Listener management cowboy_req(3) - Request and response cowboy_router(3) - Router cowboy_constraints(3) - Constraints Protocols:</description>
+Description Cowboy is an HTTP server for Erlang/OTP with support for the HTTP/1.1, HTTP/2 and Websocket protocols.
+Cowboy aims to provide a complete HTTP stack. This includes the implementation of the HTTP RFCs but also any directly related standards, like Websocket or Server-Sent Events.
+Modules Functions:
+cowboy(3) - Listener management cowboy_req(3) - Request and response cowboy_router(3) - Router cowboy_constraints(3) - Constraints Protocols:</description>
</item>
<item>
@@ -2538,10 +2661,10 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/manual/cowboy_app/</guid>
<description>Name cowboy - Small, fast, modern HTTP server for Erlang/OTP
- Description Cowboy is an HTTP server for Erlang/OTP with support for the HTTP/1.1, HTTP/2 and Websocket protocols.
- Cowboy aims to provide a complete HTTP stack. This includes the implementation of the HTTP RFCs but also any directly related standards, like Websocket or Server-Sent Events.
- Modules Functions:
- cowboy(3) - Listener management cowboy_req(3) - Request and response cowboy_router(3) - Router cowboy_constraints(3) - Constraints Protocols:</description>
+Description Cowboy is an HTTP server for Erlang/OTP with support for the HTTP/1.1, HTTP/2 and Websocket protocols.
+Cowboy aims to provide a complete HTTP stack. This includes the implementation of the HTTP RFCs but also any directly related standards, like Websocket or Server-Sent Events.
+Modules Functions:
+cowboy(3) - Listener management cowboy_req(3) - Request and response cowboy_router(3) - Router cowboy_constraints(3) - Constraints Protocols:</description>
</item>
<item>
@@ -2551,10 +2674,10 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/manual/cowboy_app/</guid>
<description>Name cowboy - Small, fast, modern HTTP server for Erlang/OTP
- Description Cowboy is an HTTP server for Erlang/OTP with support for the HTTP/1.1, HTTP/2 and Websocket protocols.
- Cowboy aims to provide a complete HTTP stack. This includes the implementation of the HTTP RFCs but also any directly related standards, like Websocket or Server-Sent Events.
- Modules Functions:
- cowboy(3) - Listener management cowboy_req(3) - Request and response cowboy_router(3) - Router cowboy_constraints(3) - Constraints Protocols:</description>
+Description Cowboy is an HTTP server for Erlang/OTP with support for the HTTP/1.1, HTTP/2 and Websocket protocols.
+Cowboy aims to provide a complete HTTP stack. This includes the implementation of the HTTP RFCs but also any directly related standards, like Websocket or Server-Sent Events.
+Modules Functions:
+cowboy(3) - Listener management cowboy_req(3) - Request and response cowboy_router(3) - Router cowboy_constraints(3) - Constraints Protocols:</description>
</item>
<item>
@@ -2564,10 +2687,10 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/manual/cowboy_app/</guid>
<description>Name cowboy - Small, fast, modern HTTP server for Erlang/OTP
- Description Cowboy is an HTTP server for Erlang/OTP with support for the HTTP/1.1, HTTP/2 and Websocket protocols.
- Cowboy aims to provide a complete HTTP stack. This includes the implementation of the HTTP RFCs but also any directly related standards, like Websocket or Server-Sent Events.
- Modules Functions:
- cowboy(3) - Listener management cowboy_req(3) - Request and response cowboy_router(3) - Router cowboy_constraints(3) - Constraints Protocols:</description>
+Description Cowboy is an HTTP server for Erlang/OTP with support for the HTTP/1.1, HTTP/2 and Websocket protocols.
+Cowboy aims to provide a complete HTTP stack. This includes the implementation of the HTTP RFCs but also any directly related standards, like Websocket or Server-Sent Events.
+Modules Functions:
+cowboy(3) - Listener management cowboy_req(3) - Request and response cowboy_router(3) - Router cowboy_constraints(3) - Constraints Protocols:</description>
</item>
<item>
@@ -2576,11 +2699,11 @@
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy.set_env/</guid>
- <description>Name cowboy:set_env - Update a listener&amp;#8217;s environment value
- Description set_env(Name :: ranch:ref(), Key :: atom(), Value :: any()) -&amp;gt; ok Set or update an environment value for a previously started listener.
- This is most useful for updating the routes dynamically, without having to restart the listener.
- The new value will only be available to new connections. Pre-existing connections will still use the old value.
- Arguments Name The name of the listener to update.</description>
+ <description>Name cowboy:set_env - Update a listener&amp;apos;s environment value
+Description set_env(Name :: ranch:ref(), Key :: atom(), Value :: any()) -&amp;gt; ok Set or update an environment value for a previously started listener.
+This is most useful for updating the routes dynamically, without having to restart the listener.
+The new value will only be available to new connections. Pre-existing connections will still use the old value.
+Arguments Name The name of the listener to update.</description>
</item>
<item>
@@ -2589,11 +2712,11 @@
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://ninenines.eu/docs/en/cowboy/2.1/manual/cowboy.set_env/</guid>
- <description>Name cowboy:set_env - Update a listener&amp;#8217;s environment value
- Description set_env(Name :: ranch:ref(), Key :: atom(), Value :: any()) -&amp;gt; ok Set or update an environment value for a previously started listener.
- This is most useful for updating the routes dynamically, without having to restart the listener.
- The new value will only be available to new connections. Pre-existing connections will still use the old value.
- Arguments Name The name of the listener to update.</description>
+ <description>Name cowboy:set_env - Update a listener&amp;apos;s environment value
+Description set_env(Name :: ranch:ref(), Key :: atom(), Value :: any()) -&amp;gt; ok Set or update an environment value for a previously started listener.
+This is most useful for updating the routes dynamically, without having to restart the listener.
+The new value will only be available to new connections. Pre-existing connections will still use the old value.
+Arguments Name The name of the listener to update.</description>
</item>
<item>
@@ -2602,11 +2725,11 @@
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://ninenines.eu/docs/en/cowboy/2.2/manual/cowboy.set_env/</guid>
- <description>Name cowboy:set_env - Update a listener&amp;#8217;s environment value
- Description set_env(Name :: ranch:ref(), Key :: atom(), Value :: any()) -&amp;gt; ok Set or update an environment value for a previously started listener.
- This is most useful for updating the routes dynamically, without having to restart the listener.
- The new value will only be available to new connections. Pre-existing connections will still use the old value.
- Arguments Name The name of the listener to update.</description>
+ <description>Name cowboy:set_env - Update a listener&amp;apos;s environment value
+Description set_env(Name :: ranch:ref(), Key :: atom(), Value :: any()) -&amp;gt; ok Set or update an environment value for a previously started listener.
+This is most useful for updating the routes dynamically, without having to restart the listener.
+The new value will only be available to new connections. Pre-existing connections will still use the old value.
+Arguments Name The name of the listener to update.</description>
</item>
<item>
@@ -2615,11 +2738,11 @@
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://ninenines.eu/docs/en/cowboy/2.3/manual/cowboy.set_env/</guid>
- <description>Name cowboy:set_env - Update a listener&amp;#8217;s environment value
- Description set_env(Name :: ranch:ref(), Key :: atom(), Value :: any()) -&amp;gt; ok Set or update an environment value for a previously started listener.
- This is most useful for updating the routes dynamically, without having to restart the listener.
- The new value will only be available to new connections. Pre-existing connections will still use the old value.
- Arguments Name The name of the listener to update.</description>
+ <description>Name cowboy:set_env - Update a listener&amp;apos;s environment value
+Description set_env(Name :: ranch:ref(), Key :: atom(), Value :: any()) -&amp;gt; ok Set or update an environment value for a previously started listener.
+This is most useful for updating the routes dynamically, without having to restart the listener.
+The new value will only be available to new connections. Pre-existing connections will still use the old value.
+Arguments Name The name of the listener to update.</description>
</item>
<item>
@@ -2628,11 +2751,11 @@
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://ninenines.eu/docs/en/cowboy/2.4/manual/cowboy.set_env/</guid>
- <description>Name cowboy:set_env - Update a listener&amp;#8217;s environment value
- Description set_env(Name :: ranch:ref(), Key :: atom(), Value :: any()) -&amp;gt; ok Set or update an environment value for a previously started listener.
- This is most useful for updating the routes dynamically, without having to restart the listener.
- The new value will only be available to new connections. Pre-existing connections will still use the old value.
- Arguments Name The name of the listener to update.</description>
+ <description>Name cowboy:set_env - Update a listener&amp;apos;s environment value
+Description set_env(Name :: ranch:ref(), Key :: atom(), Value :: any()) -&amp;gt; ok Set or update an environment value for a previously started listener.
+This is most useful for updating the routes dynamically, without having to restart the listener.
+The new value will only be available to new connections. Pre-existing connections will still use the old value.
+Arguments Name The name of the listener to update.</description>
</item>
<item>
@@ -2642,8 +2765,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy.start_clear/</guid>
<description>Name cowboy:start_clear - Listen for connections using plain TCP
- Description start_clear(Name :: ranch:ref(), TransportOpts :: ranch_tcp:opts(), ProtocolOpts :: opts()) -&amp;gt; {ok, ListenerPid :: pid()} | {error, any()} Start listening for connections over a clear TCP channel.
- Both HTTP/1.1 and HTTP/2 are supported on this listener. HTTP/2 has two methods of establishing a connection over a clear TCP channel. Both the upgrade and the prior knowledge methods are supported.</description>
+Description start_clear(Name :: ranch:ref(), TransportOpts :: ranch_tcp:opts(), ProtocolOpts :: opts()) -&amp;gt; {ok, ListenerPid :: pid()} | {error, any()} Start listening for connections over a clear TCP channel.
+Both HTTP/1.1 and HTTP/2 are supported on this listener. HTTP/2 has two methods of establishing a connection over a clear TCP channel. Both the upgrade and the prior knowledge methods are supported.
+Arguments Name The listener name is used to refer to this listener in future calls, for example when stopping it or when updating the routes defined.</description>
</item>
<item>
@@ -2653,8 +2777,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/manual/cowboy.start_clear/</guid>
<description>Name cowboy:start_clear - Listen for connections using plain TCP
- Description start_clear(Name :: ranch:ref(), TransportOpts :: ranch_tcp:opts(), ProtocolOpts :: opts()) -&amp;gt; {ok, ListenerPid :: pid()} | {error, any()} Start listening for connections over a clear TCP channel.
- Both HTTP/1.1 and HTTP/2 are supported on this listener. HTTP/2 has two methods of establishing a connection over a clear TCP channel. Both the upgrade and the prior knowledge methods are supported.</description>
+Description start_clear(Name :: ranch:ref(), TransportOpts :: ranch_tcp:opts(), ProtocolOpts :: opts()) -&amp;gt; {ok, ListenerPid :: pid()} | {error, any()} Start listening for connections over a clear TCP channel.
+Both HTTP/1.1 and HTTP/2 are supported on this listener. HTTP/2 has two methods of establishing a connection over a clear TCP channel. Both the upgrade and the prior knowledge methods are supported.
+Arguments Name The listener name is used to refer to this listener in future calls, for example when stopping it or when updating the routes defined.</description>
</item>
<item>
@@ -2664,8 +2789,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/manual/cowboy.start_clear/</guid>
<description>Name cowboy:start_clear - Listen for connections using plain TCP
- Description start_clear(Name :: ranch:ref(), TransportOpts :: ranch_tcp:opts(), ProtocolOpts :: opts()) -&amp;gt; {ok, ListenerPid :: pid()} | {error, any()} Start listening for connections over a clear TCP channel.
- Both HTTP/1.1 and HTTP/2 are supported on this listener. HTTP/2 has two methods of establishing a connection over a clear TCP channel. Both the upgrade and the prior knowledge methods are supported.</description>
+Description start_clear(Name :: ranch:ref(), TransportOpts :: ranch_tcp:opts(), ProtocolOpts :: opts()) -&amp;gt; {ok, ListenerPid :: pid()} | {error, any()} Start listening for connections over a clear TCP channel.
+Both HTTP/1.1 and HTTP/2 are supported on this listener. HTTP/2 has two methods of establishing a connection over a clear TCP channel. Both the upgrade and the prior knowledge methods are supported.
+Arguments Name The listener name is used to refer to this listener in future calls, for example when stopping it or when updating the routes defined.</description>
</item>
<item>
@@ -2675,8 +2801,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/manual/cowboy.start_clear/</guid>
<description>Name cowboy:start_clear - Listen for connections using plain TCP
- Description start_clear(Name :: ranch:ref(), TransportOpts :: ranch_tcp:opts(), ProtocolOpts :: opts()) -&amp;gt; {ok, ListenerPid :: pid()} | {error, any()} Start listening for connections over a clear TCP channel.
- Both HTTP/1.1 and HTTP/2 are supported on this listener. HTTP/2 has two methods of establishing a connection over a clear TCP channel. Both the upgrade and the prior knowledge methods are supported.</description>
+Description start_clear(Name :: ranch:ref(), TransportOpts :: ranch_tcp:opts(), ProtocolOpts :: opts()) -&amp;gt; {ok, ListenerPid :: pid()} | {error, any()} Start listening for connections over a clear TCP channel.
+Both HTTP/1.1 and HTTP/2 are supported on this listener. HTTP/2 has two methods of establishing a connection over a clear TCP channel. Both the upgrade and the prior knowledge methods are supported.
+Arguments Name The listener name is used to refer to this listener in future calls, for example when stopping it or when updating the routes defined.</description>
</item>
<item>
@@ -2686,8 +2813,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/manual/cowboy.start_clear/</guid>
<description>Name cowboy:start_clear - Listen for connections using plain TCP
- Description start_clear(Name :: ranch:ref(), TransportOpts :: ranch_tcp:opts(), ProtocolOpts :: opts()) -&amp;gt; {ok, ListenerPid :: pid()} | {error, any()} Start listening for connections over a clear TCP channel.
- Both HTTP/1.1 and HTTP/2 are supported on this listener. HTTP/2 has two methods of establishing a connection over a clear TCP channel. Both the upgrade and the prior knowledge methods are supported.</description>
+Description start_clear(Name :: ranch:ref(), TransportOpts :: ranch_tcp:opts(), ProtocolOpts :: opts()) -&amp;gt; {ok, ListenerPid :: pid()} | {error, any()} Start listening for connections over a clear TCP channel.
+Both HTTP/1.1 and HTTP/2 are supported on this listener. HTTP/2 has two methods of establishing a connection over a clear TCP channel. Both the upgrade and the prior knowledge methods are supported.
+Arguments Name The listener name is used to refer to this listener in future calls, for example when stopping it or when updating the routes defined.</description>
</item>
<item>
@@ -2697,9 +2825,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy.start_tls/</guid>
<description>Name cowboy:start_tls - Listen for connections using TLS
- Description start_tls(Name :: ranch:ref(), TransportOpts :: ranch_ssl:opts(), ProtocolOpts :: opts()) -&amp;gt; {ok, ListenerPid :: pid()} | {error, any()} Start listening for connections over a secure TLS channel.
- Both HTTP/1.1 and HTTP/2 are supported on this listener. The ALPN TLS extension must be used to initiate an HTTP/2 connection.
- Arguments Name The listener name is used to refer to this listener in future calls, for example when stopping it or when updating the routes defined.</description>
+Description start_tls(Name :: ranch:ref(), TransportOpts :: ranch_ssl:opts(), ProtocolOpts :: opts()) -&amp;gt; {ok, ListenerPid :: pid()} | {error, any()} Start listening for connections over a secure TLS channel.
+Both HTTP/1.1 and HTTP/2 are supported on this listener. The ALPN TLS extension must be used to initiate an HTTP/2 connection.
+Arguments Name The listener name is used to refer to this listener in future calls, for example when stopping it or when updating the routes defined.</description>
</item>
<item>
@@ -2709,9 +2837,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/manual/cowboy.start_tls/</guid>
<description>Name cowboy:start_tls - Listen for connections using TLS
- Description start_tls(Name :: ranch:ref(), TransportOpts :: ranch_ssl:opts(), ProtocolOpts :: opts()) -&amp;gt; {ok, ListenerPid :: pid()} | {error, any()} Start listening for connections over a secure TLS channel.
- Both HTTP/1.1 and HTTP/2 are supported on this listener. The ALPN TLS extension must be used to initiate an HTTP/2 connection.
- Arguments Name The listener name is used to refer to this listener in future calls, for example when stopping it or when updating the routes defined.</description>
+Description start_tls(Name :: ranch:ref(), TransportOpts :: ranch_ssl:opts(), ProtocolOpts :: opts()) -&amp;gt; {ok, ListenerPid :: pid()} | {error, any()} Start listening for connections over a secure TLS channel.
+Both HTTP/1.1 and HTTP/2 are supported on this listener. The ALPN TLS extension must be used to initiate an HTTP/2 connection.
+Arguments Name The listener name is used to refer to this listener in future calls, for example when stopping it or when updating the routes defined.</description>
</item>
<item>
@@ -2721,9 +2849,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/manual/cowboy.start_tls/</guid>
<description>Name cowboy:start_tls - Listen for connections using TLS
- Description start_tls(Name :: ranch:ref(), TransportOpts :: ranch_ssl:opts(), ProtocolOpts :: opts()) -&amp;gt; {ok, ListenerPid :: pid()} | {error, any()} Start listening for connections over a secure TLS channel.
- Both HTTP/1.1 and HTTP/2 are supported on this listener. The ALPN TLS extension must be used to initiate an HTTP/2 connection.
- Arguments Name The listener name is used to refer to this listener in future calls, for example when stopping it or when updating the routes defined.</description>
+Description start_tls(Name :: ranch:ref(), TransportOpts :: ranch_ssl:opts(), ProtocolOpts :: opts()) -&amp;gt; {ok, ListenerPid :: pid()} | {error, any()} Start listening for connections over a secure TLS channel.
+Both HTTP/1.1 and HTTP/2 are supported on this listener. The ALPN TLS extension must be used to initiate an HTTP/2 connection.
+Arguments Name The listener name is used to refer to this listener in future calls, for example when stopping it or when updating the routes defined.</description>
</item>
<item>
@@ -2733,9 +2861,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/manual/cowboy.start_tls/</guid>
<description>Name cowboy:start_tls - Listen for connections using TLS
- Description start_tls(Name :: ranch:ref(), TransportOpts :: ranch_ssl:opts(), ProtocolOpts :: opts()) -&amp;gt; {ok, ListenerPid :: pid()} | {error, any()} Start listening for connections over a secure TLS channel.
- Both HTTP/1.1 and HTTP/2 are supported on this listener. The ALPN TLS extension must be used to initiate an HTTP/2 connection.
- Arguments Name The listener name is used to refer to this listener in future calls, for example when stopping it or when updating the routes defined.</description>
+Description start_tls(Name :: ranch:ref(), TransportOpts :: ranch_ssl:opts(), ProtocolOpts :: opts()) -&amp;gt; {ok, ListenerPid :: pid()} | {error, any()} Start listening for connections over a secure TLS channel.
+Both HTTP/1.1 and HTTP/2 are supported on this listener. The ALPN TLS extension must be used to initiate an HTTP/2 connection.
+Arguments Name The listener name is used to refer to this listener in future calls, for example when stopping it or when updating the routes defined.</description>
</item>
<item>
@@ -2745,9 +2873,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/manual/cowboy.start_tls/</guid>
<description>Name cowboy:start_tls - Listen for connections using TLS
- Description start_tls(Name :: ranch:ref(), TransportOpts :: ranch_ssl:opts(), ProtocolOpts :: opts()) -&amp;gt; {ok, ListenerPid :: pid()} | {error, any()} Start listening for connections over a secure TLS channel.
- Both HTTP/1.1 and HTTP/2 are supported on this listener. The ALPN TLS extension must be used to initiate an HTTP/2 connection.
- Arguments Name The listener name is used to refer to this listener in future calls, for example when stopping it or when updating the routes defined.</description>
+Description start_tls(Name :: ranch:ref(), TransportOpts :: ranch_ssl:opts(), ProtocolOpts :: opts()) -&amp;gt; {ok, ListenerPid :: pid()} | {error, any()} Start listening for connections over a secure TLS channel.
+Both HTTP/1.1 and HTTP/2 are supported on this listener. The ALPN TLS extension must be used to initiate an HTTP/2 connection.
+Arguments Name The listener name is used to refer to this listener in future calls, for example when stopping it or when updating the routes defined.</description>
</item>
<item>
@@ -2757,10 +2885,12 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy.stop_listener/</guid>
<description>Name cowboy:stop_listener - Stop the given listener
- Description stop_listener(Name :: ranch:ref()) -&amp;gt; ok | {error, not_found}. Stop a previously started listener.
- Alias of ranch:stop_listener(3).
- Arguments Name The name of the listener to be stopped. The name of the listener is the first argument given to the cowboy:start_clear(3), cowboy:start_tls(3) or ranch:start_listener(3) function.
- Return value The atom ok is returned on success.</description>
+Description stop_listener(Name :: ranch:ref()) -&amp;gt; ok | {error, not_found}. Stop a previously started listener.
+Alias of ranch:stop_listener(3).
+Arguments Name The name of the listener to be stopped.
+The name of the listener is the first argument given to the cowboy:start_clear(3), cowboy:start_tls(3) or ranch:start_listener(3) function.
+ Return value The atom ok is returned on success.
+The {error, not_found} tuple is returned when the listener does not exist.</description>
</item>
<item>
@@ -2770,10 +2900,12 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/manual/cowboy.stop_listener/</guid>
<description>Name cowboy:stop_listener - Stop the given listener
- Description stop_listener(Name :: ranch:ref()) -&amp;gt; ok | {error, not_found}. Stop a previously started listener.
- Alias of ranch:stop_listener(3).
- Arguments Name The name of the listener to be stopped. The name of the listener is the first argument given to the cowboy:start_clear(3), cowboy:start_tls(3) or ranch:start_listener(3) function.
- Return value The atom ok is returned on success.</description>
+Description stop_listener(Name :: ranch:ref()) -&amp;gt; ok | {error, not_found}. Stop a previously started listener.
+Alias of ranch:stop_listener(3).
+Arguments Name The name of the listener to be stopped.
+The name of the listener is the first argument given to the cowboy:start_clear(3), cowboy:start_tls(3) or ranch:start_listener(3) function.
+ Return value The atom ok is returned on success.
+The {error, not_found} tuple is returned when the listener does not exist.</description>
</item>
<item>
@@ -2783,10 +2915,12 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/manual/cowboy.stop_listener/</guid>
<description>Name cowboy:stop_listener - Stop the given listener
- Description stop_listener(Name :: ranch:ref()) -&amp;gt; ok | {error, not_found}. Stop a previously started listener.
- Alias of ranch:stop_listener(3).
- Arguments Name The name of the listener to be stopped. The name of the listener is the first argument given to the cowboy:start_clear(3), cowboy:start_tls(3) or ranch:start_listener(3) function.
- Return value The atom ok is returned on success.</description>
+Description stop_listener(Name :: ranch:ref()) -&amp;gt; ok | {error, not_found}. Stop a previously started listener.
+Alias of ranch:stop_listener(3).
+Arguments Name The name of the listener to be stopped.
+The name of the listener is the first argument given to the cowboy:start_clear(3), cowboy:start_tls(3) or ranch:start_listener(3) function.
+ Return value The atom ok is returned on success.
+The {error, not_found} tuple is returned when the listener does not exist.</description>
</item>
<item>
@@ -2796,10 +2930,12 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/manual/cowboy.stop_listener/</guid>
<description>Name cowboy:stop_listener - Stop the given listener
- Description stop_listener(Name :: ranch:ref()) -&amp;gt; ok | {error, not_found}. Stop a previously started listener.
- Alias of ranch:stop_listener(3).
- Arguments Name The name of the listener to be stopped. The name of the listener is the first argument given to the cowboy:start_clear(3), cowboy:start_tls(3) or ranch:start_listener(3) function.
- Return value The atom ok is returned on success.</description>
+Description stop_listener(Name :: ranch:ref()) -&amp;gt; ok | {error, not_found}. Stop a previously started listener.
+Alias of ranch:stop_listener(3).
+Arguments Name The name of the listener to be stopped.
+The name of the listener is the first argument given to the cowboy:start_clear(3), cowboy:start_tls(3) or ranch:start_listener(3) function.
+ Return value The atom ok is returned on success.
+The {error, not_found} tuple is returned when the listener does not exist.</description>
</item>
<item>
@@ -2809,10 +2945,12 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/manual/cowboy.stop_listener/</guid>
<description>Name cowboy:stop_listener - Stop the given listener
- Description stop_listener(Name :: ranch:ref()) -&amp;gt; ok | {error, not_found}. Stop a previously started listener.
- Alias of ranch:stop_listener(3).
- Arguments Name The name of the listener to be stopped. The name of the listener is the first argument given to the cowboy:start_clear(3), cowboy:start_tls(3) or ranch:start_listener(3) function.
- Return value The atom ok is returned on success.</description>
+Description stop_listener(Name :: ranch:ref()) -&amp;gt; ok | {error, not_found}. Stop a previously started listener.
+Alias of ranch:stop_listener(3).
+Arguments Name The name of the listener to be stopped.
+The name of the listener is the first argument given to the cowboy:start_clear(3), cowboy:start_tls(3) or ranch:start_listener(3) function.
+ Return value The atom ok is returned on success.
+The {error, not_found} tuple is returned when the listener does not exist.</description>
</item>
<item>
@@ -2822,10 +2960,10 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy_constraints/</guid>
<description>Name cowboy_constraints - Constraints
- Description The module cowboy_constraints defines the built-in constraints in Cowboy and provides an interface for manipulating these constraints.
- Constraints are functions that define what type of input is allowed. They are used throughout Cowboy, from the router to query strings to cookies.
- Exports Built-in constraints:
- cowboy_constraints:int(3) - Integer constraint cowboy_constraints:nonempty(3) - Non-empty constraint Types constraint() constraint() :: int | nonempty | fun() A constraint function.</description>
+Description The module cowboy_constraints defines the built-in constraints in Cowboy and provides an interface for manipulating these constraints.
+Constraints are functions that define what type of input is allowed. They are used throughout Cowboy, from the router to query strings to cookies.
+Exports Built-in constraints:
+cowboy_constraints:int(3) - Integer constraint cowboy_constraints:nonempty(3) - Non-empty constraint Types constraint() constraint() :: int | nonempty | fun() A constraint function.</description>
</item>
<item>
@@ -2835,10 +2973,10 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/manual/cowboy_constraints/</guid>
<description>Name cowboy_constraints - Constraints
- Description The module cowboy_constraints defines the built-in constraints in Cowboy and provides an interface for manipulating these constraints.
- Constraints are functions that define what type of input is allowed. They are used throughout Cowboy, from the router to query strings to cookies.
- Exports Built-in constraints:
- cowboy_constraints:int(3) - Integer constraint cowboy_constraints:nonempty(3) - Non-empty constraint Types constraint() constraint() :: int | nonempty | fun() A constraint function.</description>
+Description The module cowboy_constraints defines the built-in constraints in Cowboy and provides an interface for manipulating these constraints.
+Constraints are functions that define what type of input is allowed. They are used throughout Cowboy, from the router to query strings to cookies.
+Exports Built-in constraints:
+cowboy_constraints:int(3) - Integer constraint cowboy_constraints:nonempty(3) - Non-empty constraint Types constraint() constraint() :: int | nonempty | fun() A constraint function.</description>
</item>
<item>
@@ -2848,10 +2986,10 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/manual/cowboy_constraints/</guid>
<description>Name cowboy_constraints - Constraints
- Description The module cowboy_constraints defines the built-in constraints in Cowboy and provides an interface for manipulating these constraints.
- Constraints are functions that define what type of input is allowed. They are used throughout Cowboy, from the router to query strings to cookies.
- Exports Built-in constraints:
- cowboy_constraints:int(3) - Integer constraint cowboy_constraints:nonempty(3) - Non-empty constraint Types constraint() constraint() :: int | nonempty | fun() A constraint function.</description>
+Description The module cowboy_constraints defines the built-in constraints in Cowboy and provides an interface for manipulating these constraints.
+Constraints are functions that define what type of input is allowed. They are used throughout Cowboy, from the router to query strings to cookies.
+Exports Built-in constraints:
+cowboy_constraints:int(3) - Integer constraint cowboy_constraints:nonempty(3) - Non-empty constraint Types constraint() constraint() :: int | nonempty | fun() A constraint function.</description>
</item>
<item>
@@ -2861,10 +2999,10 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/manual/cowboy_constraints/</guid>
<description>Name cowboy_constraints - Constraints
- Description The module cowboy_constraints defines the built-in constraints in Cowboy and provides an interface for manipulating these constraints.
- Constraints are functions that define what type of input is allowed. They are used throughout Cowboy, from the router to query strings to cookies.
- Exports Built-in constraints:
- cowboy_constraints:int(3) - Integer constraint cowboy_constraints:nonempty(3) - Non-empty constraint Types constraint() constraint() :: int | nonempty | fun() A constraint function.</description>
+Description The module cowboy_constraints defines the built-in constraints in Cowboy and provides an interface for manipulating these constraints.
+Constraints are functions that define what type of input is allowed. They are used throughout Cowboy, from the router to query strings to cookies.
+Exports Built-in constraints:
+cowboy_constraints:int(3) - Integer constraint cowboy_constraints:nonempty(3) - Non-empty constraint Types constraint() constraint() :: int | nonempty | fun() A constraint function.</description>
</item>
<item>
@@ -2874,10 +3012,10 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/manual/cowboy_constraints/</guid>
<description>Name cowboy_constraints - Constraints
- Description The module cowboy_constraints defines the built-in constraints in Cowboy and provides an interface for manipulating these constraints.
- Constraints are functions that define what type of input is allowed. They are used throughout Cowboy, from the router to query strings to cookies.
- Exports Built-in constraints:
- cowboy_constraints:int(3) - Integer constraint cowboy_constraints:nonempty(3) - Non-empty constraint Types constraint() constraint() :: int | nonempty | fun() A constraint function.</description>
+Description The module cowboy_constraints defines the built-in constraints in Cowboy and provides an interface for manipulating these constraints.
+Constraints are functions that define what type of input is allowed. They are used throughout Cowboy, from the router to query strings to cookies.
+Exports Built-in constraints:
+cowboy_constraints:int(3) - Integer constraint cowboy_constraints:nonempty(3) - Non-empty constraint Types constraint() constraint() :: int | nonempty | fun() A constraint function.</description>
</item>
<item>
@@ -2887,10 +3025,10 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy_constraints.int/</guid>
<description>Name cowboy_constraints:int - Integer constraint
- Description Constraint functions implement a number of different operations.
- int(forward, Bin) -&amp;gt; {ok, Int} | {error, not_an_integer} Bin :: binary() Int :: integer() Validate and convert the text representation of an integer.
- int(reverse, Int) -&amp;gt; {ok, Bin} | {error, not_an_integer} Convert an integer back to its text representation.
- int(format_error, Error) -&amp;gt; HumanReadable Error :: {not_an_integer, Bin | Int} HumanReadable :: iolist() Generate a human-readable error message.</description>
+Description Constraint functions implement a number of different operations.
+int(forward, Bin) -&amp;gt; {ok, Int} | {error, not_an_integer} Bin :: binary() Int :: integer() Validate and convert the text representation of an integer.
+int(reverse, Int) -&amp;gt; {ok, Bin} | {error, not_an_integer} Convert an integer back to its text representation.
+int(format_error, Error) -&amp;gt; HumanReadable Error :: {not_an_integer, Bin | Int} HumanReadable :: iolist() Generate a human-readable error message.</description>
</item>
<item>
@@ -2900,10 +3038,10 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/manual/cowboy_constraints.int/</guid>
<description>Name cowboy_constraints:int - Integer constraint
- Description Constraint functions implement a number of different operations.
- int(forward, Bin) -&amp;gt; {ok, Int} | {error, not_an_integer} Bin :: binary() Int :: integer() Validate and convert the text representation of an integer.
- int(reverse, Int) -&amp;gt; {ok, Bin} | {error, not_an_integer} Convert an integer back to its text representation.
- int(format_error, Error) -&amp;gt; HumanReadable Error :: {not_an_integer, Bin | Int} HumanReadable :: iolist() Generate a human-readable error message.</description>
+Description Constraint functions implement a number of different operations.
+int(forward, Bin) -&amp;gt; {ok, Int} | {error, not_an_integer} Bin :: binary() Int :: integer() Validate and convert the text representation of an integer.
+int(reverse, Int) -&amp;gt; {ok, Bin} | {error, not_an_integer} Convert an integer back to its text representation.
+int(format_error, Error) -&amp;gt; HumanReadable Error :: {not_an_integer, Bin | Int} HumanReadable :: iolist() Generate a human-readable error message.</description>
</item>
<item>
@@ -2913,10 +3051,10 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/manual/cowboy_constraints.int/</guid>
<description>Name cowboy_constraints:int - Integer constraint
- Description Constraint functions implement a number of different operations.
- int(forward, Bin) -&amp;gt; {ok, Int} | {error, not_an_integer} Bin :: binary() Int :: integer() Validate and convert the text representation of an integer.
- int(reverse, Int) -&amp;gt; {ok, Bin} | {error, not_an_integer} Convert an integer back to its text representation.
- int(format_error, Error) -&amp;gt; HumanReadable Error :: {not_an_integer, Bin | Int} HumanReadable :: iolist() Generate a human-readable error message.</description>
+Description Constraint functions implement a number of different operations.
+int(forward, Bin) -&amp;gt; {ok, Int} | {error, not_an_integer} Bin :: binary() Int :: integer() Validate and convert the text representation of an integer.
+int(reverse, Int) -&amp;gt; {ok, Bin} | {error, not_an_integer} Convert an integer back to its text representation.
+int(format_error, Error) -&amp;gt; HumanReadable Error :: {not_an_integer, Bin | Int} HumanReadable :: iolist() Generate a human-readable error message.</description>
</item>
<item>
@@ -2926,10 +3064,10 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/manual/cowboy_constraints.int/</guid>
<description>Name cowboy_constraints:int - Integer constraint
- Description Constraint functions implement a number of different operations.
- int(forward, Bin) -&amp;gt; {ok, Int} | {error, not_an_integer} Bin :: binary() Int :: integer() Validate and convert the text representation of an integer.
- int(reverse, Int) -&amp;gt; {ok, Bin} | {error, not_an_integer} Convert an integer back to its text representation.
- int(format_error, Error) -&amp;gt; HumanReadable Error :: {not_an_integer, Bin | Int} HumanReadable :: iolist() Generate a human-readable error message.</description>
+Description Constraint functions implement a number of different operations.
+int(forward, Bin) -&amp;gt; {ok, Int} | {error, not_an_integer} Bin :: binary() Int :: integer() Validate and convert the text representation of an integer.
+int(reverse, Int) -&amp;gt; {ok, Bin} | {error, not_an_integer} Convert an integer back to its text representation.
+int(format_error, Error) -&amp;gt; HumanReadable Error :: {not_an_integer, Bin | Int} HumanReadable :: iolist() Generate a human-readable error message.</description>
</item>
<item>
@@ -2939,10 +3077,10 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/manual/cowboy_constraints.int/</guid>
<description>Name cowboy_constraints:int - Integer constraint
- Description Constraint functions implement a number of different operations.
- int(forward, Bin) -&amp;gt; {ok, Int} | {error, not_an_integer} Bin :: binary() Int :: integer() Validate and convert the text representation of an integer.
- int(reverse, Int) -&amp;gt; {ok, Bin} | {error, not_an_integer} Convert an integer back to its text representation.
- int(format_error, Error) -&amp;gt; HumanReadable Error :: {not_an_integer, Bin | Int} HumanReadable :: iolist() Generate a human-readable error message.</description>
+Description Constraint functions implement a number of different operations.
+int(forward, Bin) -&amp;gt; {ok, Int} | {error, not_an_integer} Bin :: binary() Int :: integer() Validate and convert the text representation of an integer.
+int(reverse, Int) -&amp;gt; {ok, Bin} | {error, not_an_integer} Convert an integer back to its text representation.
+int(format_error, Error) -&amp;gt; HumanReadable Error :: {not_an_integer, Bin | Int} HumanReadable :: iolist() Generate a human-readable error message.</description>
</item>
<item>
@@ -2952,11 +3090,11 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy_constraints.nonempty/</guid>
<description>Name cowboy_constraints:nonempty - Non-empty constraint
- Description Constraint functions implement a number of different operations.
- nonempty(forward | reverse, &amp;lt;&amp;lt;&amp;gt;&amp;gt;) -&amp;gt; {error, empty} Reject empty values.
- nonempty(forward | reverse, Bin) -&amp;gt; {ok, Bin} Bin :: binary() Accept any other binary values.
- nonempty(format_error, Error) -&amp;gt; HumanReadable Error :: {empty, Bin} HumanReadable :: iolist() Generate a human-readable error message.
- Arguments Arguments vary depending on the operation.</description>
+Description Constraint functions implement a number of different operations.
+nonempty(forward | reverse, &amp;lt;&amp;lt;&amp;gt;&amp;gt;) -&amp;gt; {error, empty} Reject empty values.
+nonempty(forward | reverse, Bin) -&amp;gt; {ok, Bin} Bin :: binary() Accept any other binary values.
+nonempty(format_error, Error) -&amp;gt; HumanReadable Error :: {empty, Bin} HumanReadable :: iolist() Generate a human-readable error message.
+Arguments Arguments vary depending on the operation. Constraint functions always take the operation type as first argument, and the value as second argument.</description>
</item>
<item>
@@ -2966,11 +3104,11 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/manual/cowboy_constraints.nonempty/</guid>
<description>Name cowboy_constraints:nonempty - Non-empty constraint
- Description Constraint functions implement a number of different operations.
- nonempty(forward | reverse, &amp;lt;&amp;lt;&amp;gt;&amp;gt;) -&amp;gt; {error, empty} Reject empty values.
- nonempty(forward | reverse, Bin) -&amp;gt; {ok, Bin} Bin :: binary() Accept any other binary values.
- nonempty(format_error, Error) -&amp;gt; HumanReadable Error :: {empty, Bin} HumanReadable :: iolist() Generate a human-readable error message.
- Arguments Arguments vary depending on the operation.</description>
+Description Constraint functions implement a number of different operations.
+nonempty(forward | reverse, &amp;lt;&amp;lt;&amp;gt;&amp;gt;) -&amp;gt; {error, empty} Reject empty values.
+nonempty(forward | reverse, Bin) -&amp;gt; {ok, Bin} Bin :: binary() Accept any other binary values.
+nonempty(format_error, Error) -&amp;gt; HumanReadable Error :: {empty, Bin} HumanReadable :: iolist() Generate a human-readable error message.
+Arguments Arguments vary depending on the operation. Constraint functions always take the operation type as first argument, and the value as second argument.</description>
</item>
<item>
@@ -2980,11 +3118,11 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/manual/cowboy_constraints.nonempty/</guid>
<description>Name cowboy_constraints:nonempty - Non-empty constraint
- Description Constraint functions implement a number of different operations.
- nonempty(forward | reverse, &amp;lt;&amp;lt;&amp;gt;&amp;gt;) -&amp;gt; {error, empty} Reject empty values.
- nonempty(forward | reverse, Bin) -&amp;gt; {ok, Bin} Bin :: binary() Accept any other binary values.
- nonempty(format_error, Error) -&amp;gt; HumanReadable Error :: {empty, Bin} HumanReadable :: iolist() Generate a human-readable error message.
- Arguments Arguments vary depending on the operation.</description>
+Description Constraint functions implement a number of different operations.
+nonempty(forward | reverse, &amp;lt;&amp;lt;&amp;gt;&amp;gt;) -&amp;gt; {error, empty} Reject empty values.
+nonempty(forward | reverse, Bin) -&amp;gt; {ok, Bin} Bin :: binary() Accept any other binary values.
+nonempty(format_error, Error) -&amp;gt; HumanReadable Error :: {empty, Bin} HumanReadable :: iolist() Generate a human-readable error message.
+Arguments Arguments vary depending on the operation. Constraint functions always take the operation type as first argument, and the value as second argument.</description>
</item>
<item>
@@ -2994,11 +3132,11 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/manual/cowboy_constraints.nonempty/</guid>
<description>Name cowboy_constraints:nonempty - Non-empty constraint
- Description Constraint functions implement a number of different operations.
- nonempty(forward | reverse, &amp;lt;&amp;lt;&amp;gt;&amp;gt;) -&amp;gt; {error, empty} Reject empty values.
- nonempty(forward | reverse, Bin) -&amp;gt; {ok, Bin} Bin :: binary() Accept any other binary values.
- nonempty(format_error, Error) -&amp;gt; HumanReadable Error :: {empty, Bin} HumanReadable :: iolist() Generate a human-readable error message.
- Arguments Arguments vary depending on the operation.</description>
+Description Constraint functions implement a number of different operations.
+nonempty(forward | reverse, &amp;lt;&amp;lt;&amp;gt;&amp;gt;) -&amp;gt; {error, empty} Reject empty values.
+nonempty(forward | reverse, Bin) -&amp;gt; {ok, Bin} Bin :: binary() Accept any other binary values.
+nonempty(format_error, Error) -&amp;gt; HumanReadable Error :: {empty, Bin} HumanReadable :: iolist() Generate a human-readable error message.
+Arguments Arguments vary depending on the operation. Constraint functions always take the operation type as first argument, and the value as second argument.</description>
</item>
<item>
@@ -3008,11 +3146,11 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/manual/cowboy_constraints.nonempty/</guid>
<description>Name cowboy_constraints:nonempty - Non-empty constraint
- Description Constraint functions implement a number of different operations.
- nonempty(forward | reverse, &amp;lt;&amp;lt;&amp;gt;&amp;gt;) -&amp;gt; {error, empty} Reject empty values.
- nonempty(forward | reverse, Bin) -&amp;gt; {ok, Bin} Bin :: binary() Accept any other binary values.
- nonempty(format_error, Error) -&amp;gt; HumanReadable Error :: {empty, Bin} HumanReadable :: iolist() Generate a human-readable error message.
- Arguments Arguments vary depending on the operation.</description>
+Description Constraint functions implement a number of different operations.
+nonempty(forward | reverse, &amp;lt;&amp;lt;&amp;gt;&amp;gt;) -&amp;gt; {error, empty} Reject empty values.
+nonempty(forward | reverse, Bin) -&amp;gt; {ok, Bin} Bin :: binary() Accept any other binary values.
+nonempty(format_error, Error) -&amp;gt; HumanReadable Error :: {empty, Bin} HumanReadable :: iolist() Generate a human-readable error message.
+Arguments Arguments vary depending on the operation. Constraint functions always take the operation type as first argument, and the value as second argument.</description>
</item>
<item>
@@ -3022,9 +3160,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy_handler/</guid>
<description>Name cowboy_handler - Plain HTTP handlers
- Description The cowboy_handler middleware executes the handler selected by the router or any other preceding middleware.
- This middleware takes the handler module and initial state from the handler and handler_opts environment values, respectively. On completion, it adds a result value to the middleware environment, containing the return value of the terminate/3 callback (if defined) and ok otherwise.
- This module also defines a callback interface for handling HTTP requests.</description>
+Description The cowboy_handler middleware executes the handler selected by the router or any other preceding middleware.
+This middleware takes the handler module and initial state from the handler and handler_opts environment values, respectively. On completion, it adds a result value to the middleware environment, containing the return value of the terminate/3 callback (if defined) and ok otherwise.
+This module also defines a callback interface for handling HTTP requests.</description>
</item>
<item>
@@ -3034,9 +3172,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/manual/cowboy_handler/</guid>
<description>Name cowboy_handler - Plain HTTP handlers
- Description The cowboy_handler middleware executes the handler selected by the router or any other preceding middleware.
- This middleware takes the handler module and initial state from the handler and handler_opts environment values, respectively. On completion, it adds a result value to the middleware environment, containing the return value of the terminate/3 callback (if defined) and ok otherwise.
- This module also defines a callback interface for handling HTTP requests.</description>
+Description The cowboy_handler middleware executes the handler selected by the router or any other preceding middleware.
+This middleware takes the handler module and initial state from the handler and handler_opts environment values, respectively. On completion, it adds a result value to the middleware environment, containing the return value of the terminate/3 callback (if defined) and ok otherwise.
+This module also defines a callback interface for handling HTTP requests.</description>
</item>
<item>
@@ -3046,9 +3184,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/manual/cowboy_handler/</guid>
<description>Name cowboy_handler - Plain HTTP handlers
- Description The cowboy_handler middleware executes the handler selected by the router or any other preceding middleware.
- This middleware takes the handler module and initial state from the handler and handler_opts environment values, respectively. On completion, it adds a result value to the middleware environment, containing the return value of the terminate/3 callback (if defined) and ok otherwise.
- This module also defines a callback interface for handling HTTP requests.</description>
+Description The cowboy_handler middleware executes the handler selected by the router or any other preceding middleware.
+This middleware takes the handler module and initial state from the handler and handler_opts environment values, respectively. On completion, it adds a result value to the middleware environment, containing the return value of the terminate/3 callback (if defined) and ok otherwise.
+This module also defines a callback interface for handling HTTP requests.</description>
</item>
<item>
@@ -3058,9 +3196,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/manual/cowboy_handler/</guid>
<description>Name cowboy_handler - Plain HTTP handlers
- Description The cowboy_handler middleware executes the handler selected by the router or any other preceding middleware.
- This middleware takes the handler module and initial state from the handler and handler_opts environment values, respectively. On completion, it adds a result value to the middleware environment, containing the return value of the terminate/3 callback (if defined) and ok otherwise.
- This module also defines a callback interface for handling HTTP requests.</description>
+Description The cowboy_handler middleware executes the handler selected by the router or any other preceding middleware.
+This middleware takes the handler module and initial state from the handler and handler_opts environment values, respectively. On completion, it adds a result value to the middleware environment, containing the return value of the terminate/3 callback (if defined) and ok otherwise.
+This module also defines a callback interface for handling HTTP requests.</description>
</item>
<item>
@@ -3070,9 +3208,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/manual/cowboy_handler/</guid>
<description>Name cowboy_handler - Plain HTTP handlers
- Description The cowboy_handler middleware executes the handler selected by the router or any other preceding middleware.
- This middleware takes the handler module and initial state from the handler and handler_opts environment values, respectively. On completion, it adds a result value to the middleware environment, containing the return value of the terminate/3 callback (if defined) and ok otherwise.
- This module also defines a callback interface for handling HTTP requests.</description>
+Description The cowboy_handler middleware executes the handler selected by the router or any other preceding middleware.
+This middleware takes the handler module and initial state from the handler and handler_opts environment values, respectively. On completion, it adds a result value to the middleware environment, containing the return value of the terminate/3 callback (if defined) and ok otherwise.
+This module also defines a callback interface for handling HTTP requests.</description>
</item>
<item>
@@ -3082,9 +3220,11 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy_handler.terminate/</guid>
<description>Name cowboy_handler:terminate - Terminate the handler
- Description terminate(Reason, PartialReq, State, Handler) -&amp;gt; ok Reason :: any() PartialReq :: map() State :: any() Handler :: module() Call the optional terminate callback if it is defined.
- Make sure to use this function at the end of the execution of modules that implement custom handler behaviors.
- Arguments Reason Reason for termination. PartialReq The Req object.</description>
+Description terminate(Reason, PartialReq, State, Handler) -&amp;gt; ok Reason :: any() PartialReq :: map() State :: any() Handler :: module() Call the optional terminate callback if it is defined.
+Make sure to use this function at the end of the execution of modules that implement custom handler behaviors.
+Arguments Reason Reason for termination.
+ PartialReq The Req object.
+It is possible to remove fields from the Req object to save memory when the handler has no concept of requests/responses.</description>
</item>
<item>
@@ -3094,9 +3234,11 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/manual/cowboy_handler.terminate/</guid>
<description>Name cowboy_handler:terminate - Terminate the handler
- Description terminate(Reason, PartialReq, State, Handler) -&amp;gt; ok Reason :: any() PartialReq :: map() State :: any() Handler :: module() Call the optional terminate callback if it is defined.
- Make sure to use this function at the end of the execution of modules that implement custom handler behaviors.
- Arguments Reason Reason for termination. PartialReq The Req object.</description>
+Description terminate(Reason, PartialReq, State, Handler) -&amp;gt; ok Reason :: any() PartialReq :: map() State :: any() Handler :: module() Call the optional terminate callback if it is defined.
+Make sure to use this function at the end of the execution of modules that implement custom handler behaviors.
+Arguments Reason Reason for termination.
+ PartialReq The Req object.
+It is possible to remove fields from the Req object to save memory when the handler has no concept of requests/responses.</description>
</item>
<item>
@@ -3106,9 +3248,11 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/manual/cowboy_handler.terminate/</guid>
<description>Name cowboy_handler:terminate - Terminate the handler
- Description terminate(Reason, PartialReq, State, Handler) -&amp;gt; ok Reason :: any() PartialReq :: map() State :: any() Handler :: module() Call the optional terminate callback if it is defined.
- Make sure to use this function at the end of the execution of modules that implement custom handler behaviors.
- Arguments Reason Reason for termination. PartialReq The Req object.</description>
+Description terminate(Reason, PartialReq, State, Handler) -&amp;gt; ok Reason :: any() PartialReq :: map() State :: any() Handler :: module() Call the optional terminate callback if it is defined.
+Make sure to use this function at the end of the execution of modules that implement custom handler behaviors.
+Arguments Reason Reason for termination.
+ PartialReq The Req object.
+It is possible to remove fields from the Req object to save memory when the handler has no concept of requests/responses.</description>
</item>
<item>
@@ -3118,9 +3262,11 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/manual/cowboy_handler.terminate/</guid>
<description>Name cowboy_handler:terminate - Terminate the handler
- Description terminate(Reason, PartialReq, State, Handler) -&amp;gt; ok Reason :: any() PartialReq :: map() State :: any() Handler :: module() Call the optional terminate callback if it is defined.
- Make sure to use this function at the end of the execution of modules that implement custom handler behaviors.
- Arguments Reason Reason for termination. PartialReq The Req object.</description>
+Description terminate(Reason, PartialReq, State, Handler) -&amp;gt; ok Reason :: any() PartialReq :: map() State :: any() Handler :: module() Call the optional terminate callback if it is defined.
+Make sure to use this function at the end of the execution of modules that implement custom handler behaviors.
+Arguments Reason Reason for termination.
+ PartialReq The Req object.
+It is possible to remove fields from the Req object to save memory when the handler has no concept of requests/responses.</description>
</item>
<item>
@@ -3130,9 +3276,11 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/manual/cowboy_handler.terminate/</guid>
<description>Name cowboy_handler:terminate - Terminate the handler
- Description terminate(Reason, PartialReq, State, Handler) -&amp;gt; ok Reason :: any() PartialReq :: map() State :: any() Handler :: module() Call the optional terminate callback if it is defined.
- Make sure to use this function at the end of the execution of modules that implement custom handler behaviors.
- Arguments Reason Reason for termination. PartialReq The Req object.</description>
+Description terminate(Reason, PartialReq, State, Handler) -&amp;gt; ok Reason :: any() PartialReq :: map() State :: any() Handler :: module() Call the optional terminate callback if it is defined.
+Make sure to use this function at the end of the execution of modules that implement custom handler behaviors.
+Arguments Reason Reason for termination.
+ PartialReq The Req object.
+It is possible to remove fields from the Req object to save memory when the handler has no concept of requests/responses.</description>
</item>
<item>
@@ -3142,8 +3290,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy_http/</guid>
<description>Name cowboy_http - HTTP/1.1
- Description The module cowboy_http implements HTTP/1.1 and HTTP/1.0 as a Ranch protocol.
- Options opts() :: #{ connection_type =&amp;gt; worker | supervisor, env =&amp;gt; cowboy_middleware:env(), idle_timeout =&amp;gt; timeout(), inactivity_timeout =&amp;gt; timeout(), max_empty_lines =&amp;gt; non_neg_integer(), max_header_name_length =&amp;gt; non_neg_integer(), max_header_value_length =&amp;gt; non_neg_integer(), max_headers =&amp;gt; non_neg_integer(), max_keepalive =&amp;gt; non_neg_integer(), max_method_length =&amp;gt; non_neg_integer(), max_request_line_length =&amp;gt; non_neg_integer(), middlewares =&amp;gt; [module()], request_timeout =&amp;gt; timeout(), shutdown_timeout =&amp;gt; timeout(), stream_handlers =&amp;gt; [module()] } Configuration for the HTTP/1.</description>
+Description The module cowboy_http implements HTTP/1.1 and HTTP/1.0 as a Ranch protocol.
+Options opts() :: #{ connection_type =&amp;gt; worker | supervisor, env =&amp;gt; cowboy_middleware:env(), idle_timeout =&amp;gt; timeout(), inactivity_timeout =&amp;gt; timeout(), max_empty_lines =&amp;gt; non_neg_integer(), max_header_name_length =&amp;gt; non_neg_integer(), max_header_value_length =&amp;gt; non_neg_integer(), max_headers =&amp;gt; non_neg_integer(), max_keepalive =&amp;gt; non_neg_integer(), max_method_length =&amp;gt; non_neg_integer(), max_request_line_length =&amp;gt; non_neg_integer(), middlewares =&amp;gt; [module()], request_timeout =&amp;gt; timeout(), shutdown_timeout =&amp;gt; timeout(), stream_handlers =&amp;gt; [module()] } Configuration for the HTTP/1.</description>
</item>
<item>
@@ -3153,8 +3301,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/manual/cowboy_http/</guid>
<description>Name cowboy_http - HTTP/1.1
- Description The module cowboy_http implements HTTP/1.1 and HTTP/1.0 as a Ranch protocol.
- Options opts() :: #{ connection_type =&amp;gt; worker | supervisor, env =&amp;gt; cowboy_middleware:env(), idle_timeout =&amp;gt; timeout(), inactivity_timeout =&amp;gt; timeout(), max_empty_lines =&amp;gt; non_neg_integer(), max_header_name_length =&amp;gt; non_neg_integer(), max_header_value_length =&amp;gt; non_neg_integer(), max_headers =&amp;gt; non_neg_integer(), max_keepalive =&amp;gt; non_neg_integer(), max_method_length =&amp;gt; non_neg_integer(), max_request_line_length =&amp;gt; non_neg_integer(), middlewares =&amp;gt; [module()], request_timeout =&amp;gt; timeout(), shutdown_timeout =&amp;gt; timeout(), stream_handlers =&amp;gt; [module()] } Configuration for the HTTP/1.</description>
+Description The module cowboy_http implements HTTP/1.1 and HTTP/1.0 as a Ranch protocol.
+Options opts() :: #{ connection_type =&amp;gt; worker | supervisor, env =&amp;gt; cowboy_middleware:env(), idle_timeout =&amp;gt; timeout(), inactivity_timeout =&amp;gt; timeout(), max_empty_lines =&amp;gt; non_neg_integer(), max_header_name_length =&amp;gt; non_neg_integer(), max_header_value_length =&amp;gt; non_neg_integer(), max_headers =&amp;gt; non_neg_integer(), max_keepalive =&amp;gt; non_neg_integer(), max_method_length =&amp;gt; non_neg_integer(), max_request_line_length =&amp;gt; non_neg_integer(), middlewares =&amp;gt; [module()], request_timeout =&amp;gt; timeout(), shutdown_timeout =&amp;gt; timeout(), stream_handlers =&amp;gt; [module()] } Configuration for the HTTP/1.</description>
</item>
<item>
@@ -3164,8 +3312,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/manual/cowboy_http/</guid>
<description>Name cowboy_http - HTTP/1.1
- Description The module cowboy_http implements HTTP/1.1 and HTTP/1.0 as a Ranch protocol.
- Options opts() :: #{ connection_type =&amp;gt; worker | supervisor, env =&amp;gt; cowboy_middleware:env(), idle_timeout =&amp;gt; timeout(), inactivity_timeout =&amp;gt; timeout(), max_empty_lines =&amp;gt; non_neg_integer(), max_header_name_length =&amp;gt; non_neg_integer(), max_header_value_length =&amp;gt; non_neg_integer(), max_headers =&amp;gt; non_neg_integer(), max_keepalive =&amp;gt; non_neg_integer(), max_method_length =&amp;gt; non_neg_integer(), max_request_line_length =&amp;gt; non_neg_integer(), max_skip_body_length =&amp;gt; non_neg_integer(), middlewares =&amp;gt; [module()], request_timeout =&amp;gt; timeout(), shutdown_timeout =&amp;gt; timeout(), stream_handlers =&amp;gt; [module()] } Configuration for the HTTP/1.</description>
+Description The module cowboy_http implements HTTP/1.1 and HTTP/1.0 as a Ranch protocol.
+Options opts() :: #{ connection_type =&amp;gt; worker | supervisor, env =&amp;gt; cowboy_middleware:env(), idle_timeout =&amp;gt; timeout(), inactivity_timeout =&amp;gt; timeout(), max_empty_lines =&amp;gt; non_neg_integer(), max_header_name_length =&amp;gt; non_neg_integer(), max_header_value_length =&amp;gt; non_neg_integer(), max_headers =&amp;gt; non_neg_integer(), max_keepalive =&amp;gt; non_neg_integer(), max_method_length =&amp;gt; non_neg_integer(), max_request_line_length =&amp;gt; non_neg_integer(), max_skip_body_length =&amp;gt; non_neg_integer(), middlewares =&amp;gt; [module()], request_timeout =&amp;gt; timeout(), shutdown_timeout =&amp;gt; timeout(), stream_handlers =&amp;gt; [module()] } Configuration for the HTTP/1.</description>
</item>
<item>
@@ -3175,8 +3323,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/manual/cowboy_http/</guid>
<description>Name cowboy_http - HTTP/1.1
- Description The module cowboy_http implements HTTP/1.1 and HTTP/1.0 as a Ranch protocol.
- Options opts() :: #{ connection_type =&amp;gt; worker | supervisor, env =&amp;gt; cowboy_middleware:env(), idle_timeout =&amp;gt; timeout(), inactivity_timeout =&amp;gt; timeout(), max_empty_lines =&amp;gt; non_neg_integer(), max_header_name_length =&amp;gt; non_neg_integer(), max_header_value_length =&amp;gt; non_neg_integer(), max_headers =&amp;gt; non_neg_integer(), max_keepalive =&amp;gt; non_neg_integer(), max_method_length =&amp;gt; non_neg_integer(), max_request_line_length =&amp;gt; non_neg_integer(), max_skip_body_length =&amp;gt; non_neg_integer(), middlewares =&amp;gt; [module()], request_timeout =&amp;gt; timeout(), shutdown_timeout =&amp;gt; timeout(), stream_handlers =&amp;gt; [module()] } Configuration for the HTTP/1.</description>
+Description The module cowboy_http implements HTTP/1.1 and HTTP/1.0 as a Ranch protocol.
+Options opts() :: #{ connection_type =&amp;gt; worker | supervisor, env =&amp;gt; cowboy_middleware:env(), idle_timeout =&amp;gt; timeout(), inactivity_timeout =&amp;gt; timeout(), max_empty_lines =&amp;gt; non_neg_integer(), max_header_name_length =&amp;gt; non_neg_integer(), max_header_value_length =&amp;gt; non_neg_integer(), max_headers =&amp;gt; non_neg_integer(), max_keepalive =&amp;gt; non_neg_integer(), max_method_length =&amp;gt; non_neg_integer(), max_request_line_length =&amp;gt; non_neg_integer(), max_skip_body_length =&amp;gt; non_neg_integer(), middlewares =&amp;gt; [module()], request_timeout =&amp;gt; timeout(), shutdown_timeout =&amp;gt; timeout(), stream_handlers =&amp;gt; [module()] } Configuration for the HTTP/1.</description>
</item>
<item>
@@ -3186,8 +3334,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/manual/cowboy_http/</guid>
<description>Name cowboy_http - HTTP/1.1
- Description The module cowboy_http implements HTTP/1.1 and HTTP/1.0 as a Ranch protocol.
- Options opts() :: #{ connection_type =&amp;gt; worker | supervisor, env =&amp;gt; cowboy_middleware:env(), idle_timeout =&amp;gt; timeout(), inactivity_timeout =&amp;gt; timeout(), max_empty_lines =&amp;gt; non_neg_integer(), max_header_name_length =&amp;gt; non_neg_integer(), max_header_value_length =&amp;gt; non_neg_integer(), max_headers =&amp;gt; non_neg_integer(), max_keepalive =&amp;gt; non_neg_integer(), max_method_length =&amp;gt; non_neg_integer(), max_request_line_length =&amp;gt; non_neg_integer(), max_skip_body_length =&amp;gt; non_neg_integer(), middlewares =&amp;gt; [module()], request_timeout =&amp;gt; timeout(), shutdown_timeout =&amp;gt; timeout(), stream_handlers =&amp;gt; [module()] } Configuration for the HTTP/1.</description>
+Description The module cowboy_http implements HTTP/1.1 and HTTP/1.0 as a Ranch protocol.
+Options opts() :: #{ connection_type =&amp;gt; worker | supervisor, env =&amp;gt; cowboy_middleware:env(), idle_timeout =&amp;gt; timeout(), inactivity_timeout =&amp;gt; timeout(), max_empty_lines =&amp;gt; non_neg_integer(), max_header_name_length =&amp;gt; non_neg_integer(), max_header_value_length =&amp;gt; non_neg_integer(), max_headers =&amp;gt; non_neg_integer(), max_keepalive =&amp;gt; non_neg_integer(), max_method_length =&amp;gt; non_neg_integer(), max_request_line_length =&amp;gt; non_neg_integer(), max_skip_body_length =&amp;gt; non_neg_integer(), middlewares =&amp;gt; [module()], request_timeout =&amp;gt; timeout(), shutdown_timeout =&amp;gt; timeout(), stream_handlers =&amp;gt; [module()] } Configuration for the HTTP/1.</description>
</item>
<item>
@@ -3197,10 +3345,10 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy_http2/</guid>
<description>Name cowboy_http2 - HTTP/2
- Description The module cowboy_http2 implements HTTP/2 as a Ranch protocol.
- Options opts() :: #{ connection_type =&amp;gt; worker | supervisor, env =&amp;gt; cowboy_middleware:env(), inactivity_timeout =&amp;gt; timeout(), middlewares =&amp;gt; [module()], preface_timeout =&amp;gt; timeout(), shutdown_timeout =&amp;gt; timeout(), stream_handlers =&amp;gt; [module()] } Configuration for the HTTP/2 protocol.
- This configuration is passed to Cowboy when starting listeners using cowboy:start_clear/3 or cowboy:start_tls/3 functions.
- It can be updated without restarting listeners using the Ranch functions ranch:get_protocol_options/1 and ranch:set_protocol_options/2.</description>
+Description The module cowboy_http2 implements HTTP/2 as a Ranch protocol.
+Options opts() :: #{ connection_type =&amp;gt; worker | supervisor, env =&amp;gt; cowboy_middleware:env(), inactivity_timeout =&amp;gt; timeout(), middlewares =&amp;gt; [module()], preface_timeout =&amp;gt; timeout(), shutdown_timeout =&amp;gt; timeout(), stream_handlers =&amp;gt; [module()] } Configuration for the HTTP/2 protocol.
+This configuration is passed to Cowboy when starting listeners using cowboy:start_clear/3 or cowboy:start_tls/3 functions.
+It can be updated without restarting listeners using the Ranch functions ranch:get_protocol_options/1 and ranch:set_protocol_options/2.</description>
</item>
<item>
@@ -3210,10 +3358,10 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/manual/cowboy_http2/</guid>
<description>Name cowboy_http2 - HTTP/2
- Description The module cowboy_http2 implements HTTP/2 as a Ranch protocol.
- Options opts() :: #{ connection_type =&amp;gt; worker | supervisor, env =&amp;gt; cowboy_middleware:env(), inactivity_timeout =&amp;gt; timeout(), middlewares =&amp;gt; [module()], preface_timeout =&amp;gt; timeout(), shutdown_timeout =&amp;gt; timeout(), stream_handlers =&amp;gt; [module()] } Configuration for the HTTP/2 protocol.
- This configuration is passed to Cowboy when starting listeners using cowboy:start_clear/3 or cowboy:start_tls/3 functions.
- It can be updated without restarting listeners using the Ranch functions ranch:get_protocol_options/1 and ranch:set_protocol_options/2.</description>
+Description The module cowboy_http2 implements HTTP/2 as a Ranch protocol.
+Options opts() :: #{ connection_type =&amp;gt; worker | supervisor, env =&amp;gt; cowboy_middleware:env(), inactivity_timeout =&amp;gt; timeout(), middlewares =&amp;gt; [module()], preface_timeout =&amp;gt; timeout(), shutdown_timeout =&amp;gt; timeout(), stream_handlers =&amp;gt; [module()] } Configuration for the HTTP/2 protocol.
+This configuration is passed to Cowboy when starting listeners using cowboy:start_clear/3 or cowboy:start_tls/3 functions.
+It can be updated without restarting listeners using the Ranch functions ranch:get_protocol_options/1 and ranch:set_protocol_options/2.</description>
</item>
<item>
@@ -3223,10 +3371,10 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/manual/cowboy_http2/</guid>
<description>Name cowboy_http2 - HTTP/2
- Description The module cowboy_http2 implements HTTP/2 as a Ranch protocol.
- Options opts() :: #{ connection_type =&amp;gt; worker | supervisor, env =&amp;gt; cowboy_middleware:env(), inactivity_timeout =&amp;gt; timeout(), middlewares =&amp;gt; [module()], preface_timeout =&amp;gt; timeout(), shutdown_timeout =&amp;gt; timeout(), stream_handlers =&amp;gt; [module()] } Configuration for the HTTP/2 protocol.
- This configuration is passed to Cowboy when starting listeners using cowboy:start_clear/3 or cowboy:start_tls/3 functions.
- It can be updated without restarting listeners using the Ranch functions ranch:get_protocol_options/1 and ranch:set_protocol_options/2.</description>
+Description The module cowboy_http2 implements HTTP/2 as a Ranch protocol.
+Options opts() :: #{ connection_type =&amp;gt; worker | supervisor, env =&amp;gt; cowboy_middleware:env(), inactivity_timeout =&amp;gt; timeout(), middlewares =&amp;gt; [module()], preface_timeout =&amp;gt; timeout(), shutdown_timeout =&amp;gt; timeout(), stream_handlers =&amp;gt; [module()] } Configuration for the HTTP/2 protocol.
+This configuration is passed to Cowboy when starting listeners using cowboy:start_clear/3 or cowboy:start_tls/3 functions.
+It can be updated without restarting listeners using the Ranch functions ranch:get_protocol_options/1 and ranch:set_protocol_options/2.</description>
</item>
<item>
@@ -3236,10 +3384,10 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/manual/cowboy_http2/</guid>
<description>Name cowboy_http2 - HTTP/2
- Description The module cowboy_http2 implements HTTP/2 as a Ranch protocol.
- Options opts() :: #{ connection_type =&amp;gt; worker | supervisor, env =&amp;gt; cowboy_middleware:env(), inactivity_timeout =&amp;gt; timeout(), middlewares =&amp;gt; [module()], preface_timeout =&amp;gt; timeout(), shutdown_timeout =&amp;gt; timeout(), stream_handlers =&amp;gt; [module()] } Configuration for the HTTP/2 protocol.
- This configuration is passed to Cowboy when starting listeners using cowboy:start_clear/3 or cowboy:start_tls/3 functions.
- It can be updated without restarting listeners using the Ranch functions ranch:get_protocol_options/1 and ranch:set_protocol_options/2.</description>
+Description The module cowboy_http2 implements HTTP/2 as a Ranch protocol.
+Options opts() :: #{ connection_type =&amp;gt; worker | supervisor, env =&amp;gt; cowboy_middleware:env(), inactivity_timeout =&amp;gt; timeout(), middlewares =&amp;gt; [module()], preface_timeout =&amp;gt; timeout(), shutdown_timeout =&amp;gt; timeout(), stream_handlers =&amp;gt; [module()] } Configuration for the HTTP/2 protocol.
+This configuration is passed to Cowboy when starting listeners using cowboy:start_clear/3 or cowboy:start_tls/3 functions.
+It can be updated without restarting listeners using the Ranch functions ranch:get_protocol_options/1 and ranch:set_protocol_options/2.</description>
</item>
<item>
@@ -3249,8 +3397,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/manual/cowboy_http2/</guid>
<description>Name cowboy_http2 - HTTP/2
- Description The module cowboy_http2 implements HTTP/2 as a Ranch protocol.
- Options opts() :: #{ connection_type =&amp;gt; worker | supervisor, enable_connect_protocol =&amp;gt; boolean(), env =&amp;gt; cowboy_middleware:env(), inactivity_timeout =&amp;gt; timeout(), initial_connection_window_size =&amp;gt; 65535..16#7fffffff, initial_stream_window_size =&amp;gt; 0..16#7fffffff, max_concurrent_streams =&amp;gt; non_neg_integer() | infinity, max_decode_table_size =&amp;gt; non_neg_integer(), max_encode_table_size =&amp;gt; non_neg_integer(), max_frame_size_received =&amp;gt; 16384..16777215, max_frame_size_sent =&amp;gt; 16384..16777215 | infinity, middlewares =&amp;gt; [module()], preface_timeout =&amp;gt; timeout(), settings_timeout =&amp;gt; timeout(), shutdown_timeout =&amp;gt; timeout(), stream_handlers =&amp;gt; [module()] } Configuration for the HTTP/2 protocol.</description>
+Description The module cowboy_http2 implements HTTP/2 as a Ranch protocol.
+Options opts() :: #{ connection_type =&amp;gt; worker | supervisor, enable_connect_protocol =&amp;gt; boolean(), env =&amp;gt; cowboy_middleware:env(), inactivity_timeout =&amp;gt; timeout(), initial_connection_window_size =&amp;gt; 65535..16#7fffffff, initial_stream_window_size =&amp;gt; 0..16#7fffffff, max_concurrent_streams =&amp;gt; non_neg_integer() | infinity, max_decode_table_size =&amp;gt; non_neg_integer(), max_encode_table_size =&amp;gt; non_neg_integer(), max_frame_size_received =&amp;gt; 16384..16777215, max_frame_size_sent =&amp;gt; 16384..16777215 | infinity, middlewares =&amp;gt; [module()], preface_timeout =&amp;gt; timeout(), settings_timeout =&amp;gt; timeout(), shutdown_timeout =&amp;gt; timeout(), stream_handlers =&amp;gt; [module()] } Configuration for the HTTP/2 protocol.</description>
</item>
<item>
@@ -3260,10 +3408,10 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy_loop/</guid>
<description>Name cowboy_loop - Loop handlers
- Description The module cowboy_loop defines a callback interface for long running HTTP connections.
- You should switch to this behavior for long polling, server-sent events and similar long-running requests.
- There are generally two usage patterns:
- Loop until receiving a specific message, then send a response and stop execution (for example long polling); Or initiate a response in init/2 and stream the body in info/3 as necessary (for example server-sent events).</description>
+Description The module cowboy_loop defines a callback interface for long running HTTP connections.
+You should switch to this behavior for long polling, server-sent events and similar long-running requests.
+There are generally two usage patterns:
+Loop until receiving a specific message, then send a response and stop execution (for example long polling); Or initiate a response in init/2 and stream the body in info/3 as necessary (for example server-sent events).</description>
</item>
<item>
@@ -3273,10 +3421,10 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/manual/cowboy_loop/</guid>
<description>Name cowboy_loop - Loop handlers
- Description The module cowboy_loop defines a callback interface for long running HTTP connections.
- You should switch to this behavior for long polling, server-sent events and similar long-running requests.
- There are generally two usage patterns:
- Loop until receiving a specific message, then send a response and stop execution (for example long polling); Or initiate a response in init/2 and stream the body in info/3 as necessary (for example server-sent events).</description>
+Description The module cowboy_loop defines a callback interface for long running HTTP connections.
+You should switch to this behavior for long polling, server-sent events and similar long-running requests.
+There are generally two usage patterns:
+Loop until receiving a specific message, then send a response and stop execution (for example long polling); Or initiate a response in init/2 and stream the body in info/3 as necessary (for example server-sent events).</description>
</item>
<item>
@@ -3286,10 +3434,10 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/manual/cowboy_loop/</guid>
<description>Name cowboy_loop - Loop handlers
- Description The module cowboy_loop defines a callback interface for long running HTTP connections.
- You should switch to this behavior for long polling, server-sent events and similar long-running requests.
- There are generally two usage patterns:
- Loop until receiving a specific message, then send a response and stop execution (for example long polling); Or initiate a response in init/2 and stream the body in info/3 as necessary (for example server-sent events).</description>
+Description The module cowboy_loop defines a callback interface for long running HTTP connections.
+You should switch to this behavior for long polling, server-sent events and similar long-running requests.
+There are generally two usage patterns:
+Loop until receiving a specific message, then send a response and stop execution (for example long polling); Or initiate a response in init/2 and stream the body in info/3 as necessary (for example server-sent events).</description>
</item>
<item>
@@ -3299,10 +3447,10 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/manual/cowboy_loop/</guid>
<description>Name cowboy_loop - Loop handlers
- Description The module cowboy_loop defines a callback interface for long running HTTP connections.
- You should switch to this behavior for long polling, server-sent events and similar long-running requests.
- There are generally two usage patterns:
- Loop until receiving a specific message, then send a response and stop execution (for example long polling); Or initiate a response in init/2 and stream the body in info/3 as necessary (for example server-sent events).</description>
+Description The module cowboy_loop defines a callback interface for long running HTTP connections.
+You should switch to this behavior for long polling, server-sent events and similar long-running requests.
+There are generally two usage patterns:
+Loop until receiving a specific message, then send a response and stop execution (for example long polling); Or initiate a response in init/2 and stream the body in info/3 as necessary (for example server-sent events).</description>
</item>
<item>
@@ -3312,10 +3460,10 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/manual/cowboy_loop/</guid>
<description>Name cowboy_loop - Loop handlers
- Description The module cowboy_loop defines a callback interface for long running HTTP connections.
- You should switch to this behavior for long polling, server-sent events and similar long-running requests.
- There are generally two usage patterns:
- Loop until receiving a specific message, then send a response and stop execution (for example long polling); Or initiate a response in init/2 and stream the body in info/3 as necessary (for example server-sent events).</description>
+Description The module cowboy_loop defines a callback interface for long running HTTP connections.
+You should switch to this behavior for long polling, server-sent events and similar long-running requests.
+There are generally two usage patterns:
+Loop until receiving a specific message, then send a response and stop execution (for example long polling); Or initiate a response in init/2 and stream the body in info/3 as necessary (for example server-sent events).</description>
</item>
<item>
@@ -3325,10 +3473,10 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy_middleware/</guid>
<description>Name cowboy_middleware - Middlewares
- Description The module cowboy_middleware defines a callback interface for Cowboy middlewares.
- Middlewares process the request sequentially in the order they are configured.
- Callbacks Middlewares implement the following interface:
- execute(Req, Env) -&amp;gt; {ok, Req, Env} | {suspend, module(), atom(), [any()]} | {stop, Req} Req :: cowboy_req:req() Env :: cowboy_middleware:env() The execute/2 is the only callback that needs to be implemented.</description>
+Description The module cowboy_middleware defines a callback interface for Cowboy middlewares.
+Middlewares process the request sequentially in the order they are configured.
+Callbacks Middlewares implement the following interface:
+execute(Req, Env) -&amp;gt; {ok, Req, Env} | {suspend, module(), atom(), [any()]} | {stop, Req} Req :: cowboy_req:req() Env :: cowboy_middleware:env() The execute/2 is the only callback that needs to be implemented. It must execute the middleware and return with instructions for Cowboy.</description>
</item>
<item>
@@ -3338,10 +3486,10 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/manual/cowboy_middleware/</guid>
<description>Name cowboy_middleware - Middlewares
- Description The module cowboy_middleware defines a callback interface for Cowboy middlewares.
- Middlewares process the request sequentially in the order they are configured.
- Callbacks Middlewares implement the following interface:
- execute(Req, Env) -&amp;gt; {ok, Req, Env} | {suspend, module(), atom(), [any()]} | {stop, Req} Req :: cowboy_req:req() Env :: cowboy_middleware:env() The execute/2 is the only callback that needs to be implemented.</description>
+Description The module cowboy_middleware defines a callback interface for Cowboy middlewares.
+Middlewares process the request sequentially in the order they are configured.
+Callbacks Middlewares implement the following interface:
+execute(Req, Env) -&amp;gt; {ok, Req, Env} | {suspend, module(), atom(), [any()]} | {stop, Req} Req :: cowboy_req:req() Env :: cowboy_middleware:env() The execute/2 is the only callback that needs to be implemented. It must execute the middleware and return with instructions for Cowboy.</description>
</item>
<item>
@@ -3351,10 +3499,10 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/manual/cowboy_middleware/</guid>
<description>Name cowboy_middleware - Middlewares
- Description The module cowboy_middleware defines a callback interface for Cowboy middlewares.
- Middlewares process the request sequentially in the order they are configured.
- Callbacks Middlewares implement the following interface:
- execute(Req, Env) -&amp;gt; {ok, Req, Env} | {suspend, module(), atom(), [any()]} | {stop, Req} Req :: cowboy_req:req() Env :: cowboy_middleware:env() The execute/2 is the only callback that needs to be implemented.</description>
+Description The module cowboy_middleware defines a callback interface for Cowboy middlewares.
+Middlewares process the request sequentially in the order they are configured.
+Callbacks Middlewares implement the following interface:
+execute(Req, Env) -&amp;gt; {ok, Req, Env} | {suspend, module(), atom(), [any()]} | {stop, Req} Req :: cowboy_req:req() Env :: cowboy_middleware:env() The execute/2 is the only callback that needs to be implemented. It must execute the middleware and return with instructions for Cowboy.</description>
</item>
<item>
@@ -3364,10 +3512,10 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/manual/cowboy_middleware/</guid>
<description>Name cowboy_middleware - Middlewares
- Description The module cowboy_middleware defines a callback interface for Cowboy middlewares.
- Middlewares process the request sequentially in the order they are configured.
- Callbacks Middlewares implement the following interface:
- execute(Req, Env) -&amp;gt; {ok, Req, Env} | {suspend, module(), atom(), [any()]} | {stop, Req} Req :: cowboy_req:req() Env :: cowboy_middleware:env() The execute/2 is the only callback that needs to be implemented.</description>
+Description The module cowboy_middleware defines a callback interface for Cowboy middlewares.
+Middlewares process the request sequentially in the order they are configured.
+Callbacks Middlewares implement the following interface:
+execute(Req, Env) -&amp;gt; {ok, Req, Env} | {suspend, module(), atom(), [any()]} | {stop, Req} Req :: cowboy_req:req() Env :: cowboy_middleware:env() The execute/2 is the only callback that needs to be implemented. It must execute the middleware and return with instructions for Cowboy.</description>
</item>
<item>
@@ -3377,10 +3525,10 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/manual/cowboy_middleware/</guid>
<description>Name cowboy_middleware - Middlewares
- Description The module cowboy_middleware defines a callback interface for Cowboy middlewares.
- Middlewares process the request sequentially in the order they are configured.
- Callbacks Middlewares implement the following interface:
- execute(Req, Env) -&amp;gt; {ok, Req, Env} | {suspend, module(), atom(), [any()]} | {stop, Req} Req :: cowboy_req:req() Env :: cowboy_middleware:env() The execute/2 is the only callback that needs to be implemented.</description>
+Description The module cowboy_middleware defines a callback interface for Cowboy middlewares.
+Middlewares process the request sequentially in the order they are configured.
+Callbacks Middlewares implement the following interface:
+execute(Req, Env) -&amp;gt; {ok, Req, Env} | {suspend, module(), atom(), [any()]} | {stop, Req} Req :: cowboy_req:req() Env :: cowboy_middleware:env() The execute/2 is the only callback that needs to be implemented. It must execute the middleware and return with instructions for Cowboy.</description>
</item>
<item>
@@ -3390,12 +3538,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy_req/</guid>
<description>Name cowboy_req - HTTP request and response
- Description The module cowboy_req provides functions to access, manipulate and respond to requests.
- There are four types of functions in this module. They can be differentiated by their name and their return type:
- Type Name pattern Return type access
- no verb, parse_*, match_*
- Value
- question</description>
+Description The module cowboy_req provides functions to access, manipulate and respond to requests.
+There are four types of functions in this module. They can be differentiated by their name and their return type:
+Type Name pattern Return type access no verb, parse_*, match_* Value question has_* boolean() modification set_* Req action any other verb ok | {Result, Value, Req} Any Req returned must be used in place of the one passed as argument.</description>
</item>
<item>
@@ -3405,12 +3550,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/manual/cowboy_req/</guid>
<description>Name cowboy_req - HTTP request and response
- Description The module cowboy_req provides functions to access, manipulate and respond to requests.
- There are four types of functions in this module. They can be differentiated by their name and their return type:
- Type Name pattern Return type access
- no verb, parse_*, match_*
- Value
- question</description>
+Description The module cowboy_req provides functions to access, manipulate and respond to requests.
+There are four types of functions in this module. They can be differentiated by their name and their return type:
+Type Name pattern Return type access no verb, parse_*, match_* Value question has_* boolean() modification set_* Req action any other verb ok | {Result, Value, Req} Any Req returned must be used in place of the one passed as argument.</description>
</item>
<item>
@@ -3420,12 +3562,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/manual/cowboy_req/</guid>
<description>Name cowboy_req - HTTP request and response
- Description The module cowboy_req provides functions to access, manipulate and respond to requests.
- There are four types of functions in this module. They can be differentiated by their name and their return type:
- Type Name pattern Return type access
- no verb, parse_*, match_*
- Value
- question</description>
+Description The module cowboy_req provides functions to access, manipulate and respond to requests.
+There are four types of functions in this module. They can be differentiated by their name and their return type:
+Type Name pattern Return type access no verb, parse_*, match_* Value question has_* boolean() modification set_* Req action any other verb ok | {Result, Value, Req} Any Req returned must be used in place of the one passed as argument.</description>
</item>
<item>
@@ -3435,12 +3574,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/manual/cowboy_req/</guid>
<description>Name cowboy_req - HTTP request and response
- Description The module cowboy_req provides functions to access, manipulate and respond to requests.
- There are four types of functions in this module. They can be differentiated by their name and their return type:
- Type Name pattern Return type access
- no verb, parse_*, match_*
- Value
- question</description>
+Description The module cowboy_req provides functions to access, manipulate and respond to requests.
+There are four types of functions in this module. They can be differentiated by their name and their return type:
+Type Name pattern Return type access no verb, parse_*, match_* Value question has_* boolean() modification set_* Req action any other verb ok | {Result, Value, Req} Any Req returned must be used in place of the one passed as argument.</description>
</item>
<item>
@@ -3450,12 +3586,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/manual/cowboy_req/</guid>
<description>Name cowboy_req - HTTP request and response
- Description The module cowboy_req provides functions to access, manipulate and respond to requests.
- There are four types of functions in this module. They can be differentiated by their name and their return type:
- Type Name pattern Return type access
- no verb, parse_*, match_*
- Value
- question</description>
+Description The module cowboy_req provides functions to access, manipulate and respond to requests.
+There are four types of functions in this module. They can be differentiated by their name and their return type:
+Type Name pattern Return type access no verb, parse_*, match_* Value question has_* boolean() modification set_* Req action any other verb ok | {Result, Value, Req} Any Req returned must be used in place of the one passed as argument.</description>
</item>
<item>
@@ -3465,8 +3598,11 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy_req.binding/</guid>
<description>Name cowboy_req:binding - Access a value bound from the route
- Description binding(Name, Req) -&amp;gt; binding(Name, Req, undefined) binding(Name, Req, Default) -&amp;gt; any() | Default Name :: atom() Req :: cowboy_req:req() Default :: any() Return the value for the given binding.
- Arguments Name Desired binding name as an atom. Req The Req object. Default Default value returned when the binding is missing.</description>
+Description binding(Name, Req) -&amp;gt; binding(Name, Req, undefined) binding(Name, Req, Default) -&amp;gt; any() | Default Name :: atom() Req :: cowboy_req:req() Default :: any() Return the value for the given binding.
+Arguments Name Desired binding name as an atom.
+ Req The Req object.
+ Default Default value returned when the binding is missing.
+ Return value By default the value is a case sensitive binary string, however constraints may change the type of this value (for example automatically converting numbers to integer).</description>
</item>
<item>
@@ -3476,8 +3612,11 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/manual/cowboy_req.binding/</guid>
<description>Name cowboy_req:binding - Access a value bound from the route
- Description binding(Name, Req) -&amp;gt; binding(Name, Req, undefined) binding(Name, Req, Default) -&amp;gt; any() | Default Name :: atom() Req :: cowboy_req:req() Default :: any() Return the value for the given binding.
- Arguments Name Desired binding name as an atom. Req The Req object. Default Default value returned when the binding is missing.</description>
+Description binding(Name, Req) -&amp;gt; binding(Name, Req, undefined) binding(Name, Req, Default) -&amp;gt; any() | Default Name :: atom() Req :: cowboy_req:req() Default :: any() Return the value for the given binding.
+Arguments Name Desired binding name as an atom.
+ Req The Req object.
+ Default Default value returned when the binding is missing.
+ Return value By default the value is a case sensitive binary string, however constraints may change the type of this value (for example automatically converting numbers to integer).</description>
</item>
<item>
@@ -3487,8 +3626,11 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/manual/cowboy_req.binding/</guid>
<description>Name cowboy_req:binding - Access a value bound from the route
- Description binding(Name, Req) -&amp;gt; binding(Name, Req, undefined) binding(Name, Req, Default) -&amp;gt; any() | Default Name :: atom() Req :: cowboy_req:req() Default :: any() Return the value for the given binding.
- Arguments Name Desired binding name as an atom. Req The Req object. Default Default value returned when the binding is missing.</description>
+Description binding(Name, Req) -&amp;gt; binding(Name, Req, undefined) binding(Name, Req, Default) -&amp;gt; any() | Default Name :: atom() Req :: cowboy_req:req() Default :: any() Return the value for the given binding.
+Arguments Name Desired binding name as an atom.
+ Req The Req object.
+ Default Default value returned when the binding is missing.
+ Return value By default the value is a case sensitive binary string, however constraints may change the type of this value (for example automatically converting numbers to integer).</description>
</item>
<item>
@@ -3498,8 +3640,11 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/manual/cowboy_req.binding/</guid>
<description>Name cowboy_req:binding - Access a value bound from the route
- Description binding(Name, Req) -&amp;gt; binding(Name, Req, undefined) binding(Name, Req, Default) -&amp;gt; any() | Default Name :: atom() Req :: cowboy_req:req() Default :: any() Return the value for the given binding.
- Arguments Name Desired binding name as an atom. Req The Req object. Default Default value returned when the binding is missing.</description>
+Description binding(Name, Req) -&amp;gt; binding(Name, Req, undefined) binding(Name, Req, Default) -&amp;gt; any() | Default Name :: atom() Req :: cowboy_req:req() Default :: any() Return the value for the given binding.
+Arguments Name Desired binding name as an atom.
+ Req The Req object.
+ Default Default value returned when the binding is missing.
+ Return value By default the value is a case sensitive binary string, however constraints may change the type of this value (for example automatically converting numbers to integer).</description>
</item>
<item>
@@ -3509,8 +3654,11 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/manual/cowboy_req.binding/</guid>
<description>Name cowboy_req:binding - Access a value bound from the route
- Description binding(Name, Req) -&amp;gt; binding(Name, Req, undefined) binding(Name, Req, Default) -&amp;gt; any() | Default Name :: atom() Req :: cowboy_req:req() Default :: any() Return the value for the given binding.
- Arguments Name Desired binding name as an atom. Req The Req object. Default Default value returned when the binding is missing.</description>
+Description binding(Name, Req) -&amp;gt; binding(Name, Req, undefined) binding(Name, Req, Default) -&amp;gt; any() | Default Name :: atom() Req :: cowboy_req:req() Default :: any() Return the value for the given binding.
+Arguments Name Desired binding name as an atom.
+ Req The Req object.
+ Default Default value returned when the binding is missing.
+ Return value By default the value is a case sensitive binary string, however constraints may change the type of this value (for example automatically converting numbers to integer).</description>
</item>
<item>
@@ -3520,9 +3668,10 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy_req.bindings/</guid>
<description>Name cowboy_req:bindings - Access all values bound from the route
- Description bindings(Req :: cowboy_req:req()) -&amp;gt; cowboy_router:bindings() Return a map containing all bindings.
- Arguments Req The Req object. Return value By default values are case sensitive binary strings, however constraints may change the type of this value (for example automatically converting numbers to integer).
- Changelog 2.</description>
+Description bindings(Req :: cowboy_req:req()) -&amp;gt; cowboy_router:bindings() Return a map containing all bindings.
+Arguments Req The Req object.
+ Return value By default values are case sensitive binary strings, however constraints may change the type of this value (for example automatically converting numbers to integer).
+Changelog 2.0: Only the values are returned, they are no longer wrapped in a tuple.</description>
</item>
<item>
@@ -3532,9 +3681,10 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/manual/cowboy_req.bindings/</guid>
<description>Name cowboy_req:bindings - Access all values bound from the route
- Description bindings(Req :: cowboy_req:req()) -&amp;gt; cowboy_router:bindings() Return a map containing all bindings.
- Arguments Req The Req object. Return value By default values are case sensitive binary strings, however constraints may change the type of this value (for example automatically converting numbers to integer).
- Changelog 2.</description>
+Description bindings(Req :: cowboy_req:req()) -&amp;gt; cowboy_router:bindings() Return a map containing all bindings.
+Arguments Req The Req object.
+ Return value By default values are case sensitive binary strings, however constraints may change the type of this value (for example automatically converting numbers to integer).
+Changelog 2.0: Only the values are returned, they are no longer wrapped in a tuple.</description>
</item>
<item>
@@ -3544,9 +3694,10 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/manual/cowboy_req.bindings/</guid>
<description>Name cowboy_req:bindings - Access all values bound from the route
- Description bindings(Req :: cowboy_req:req()) -&amp;gt; cowboy_router:bindings() Return a map containing all bindings.
- Arguments Req The Req object. Return value By default values are case sensitive binary strings, however constraints may change the type of this value (for example automatically converting numbers to integer).
- Changelog 2.</description>
+Description bindings(Req :: cowboy_req:req()) -&amp;gt; cowboy_router:bindings() Return a map containing all bindings.
+Arguments Req The Req object.
+ Return value By default values are case sensitive binary strings, however constraints may change the type of this value (for example automatically converting numbers to integer).
+Changelog 2.0: Only the values are returned, they are no longer wrapped in a tuple.</description>
</item>
<item>
@@ -3556,9 +3707,10 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/manual/cowboy_req.bindings/</guid>
<description>Name cowboy_req:bindings - Access all values bound from the route
- Description bindings(Req :: cowboy_req:req()) -&amp;gt; cowboy_router:bindings() Return a map containing all bindings.
- Arguments Req The Req object. Return value By default values are case sensitive binary strings, however constraints may change the type of this value (for example automatically converting numbers to integer).
- Changelog 2.</description>
+Description bindings(Req :: cowboy_req:req()) -&amp;gt; cowboy_router:bindings() Return a map containing all bindings.
+Arguments Req The Req object.
+ Return value By default values are case sensitive binary strings, however constraints may change the type of this value (for example automatically converting numbers to integer).
+Changelog 2.0: Only the values are returned, they are no longer wrapped in a tuple.</description>
</item>
<item>
@@ -3568,9 +3720,10 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/manual/cowboy_req.bindings/</guid>
<description>Name cowboy_req:bindings - Access all values bound from the route
- Description bindings(Req :: cowboy_req:req()) -&amp;gt; cowboy_router:bindings() Return a map containing all bindings.
- Arguments Req The Req object. Return value By default values are case sensitive binary strings, however constraints may change the type of this value (for example automatically converting numbers to integer).
- Changelog 2.</description>
+Description bindings(Req :: cowboy_req:req()) -&amp;gt; cowboy_router:bindings() Return a map containing all bindings.
+Arguments Req The Req object.
+ Return value By default values are case sensitive binary strings, however constraints may change the type of this value (for example automatically converting numbers to integer).
+Changelog 2.0: Only the values are returned, they are no longer wrapped in a tuple.</description>
</item>
<item>
@@ -3580,9 +3733,10 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy_req.body_length/</guid>
<description>Name cowboy_req:body_length - Body length
- Description body_length(Req :: cowboy_req:req()) -&amp;gt; undefined | non_neg_integer() Return the length of the request body.
- The length is not always known before reading the body. In those cases Cowboy will return undefined. The body length is available after the body has been fully read.
- Arguments Req The Req object. Return value The length of the request body, or undefined if it is not known.</description>
+Description body_length(Req :: cowboy_req:req()) -&amp;gt; undefined | non_neg_integer() Return the length of the request body.
+The length is not always known before reading the body. In those cases Cowboy will return undefined. The body length is available after the body has been fully read.
+Arguments Req The Req object.
+ Return value The length of the request body, or undefined if it is not known.</description>
</item>
<item>
@@ -3592,9 +3746,10 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/manual/cowboy_req.body_length/</guid>
<description>Name cowboy_req:body_length - Body length
- Description body_length(Req :: cowboy_req:req()) -&amp;gt; undefined | non_neg_integer() Return the length of the request body.
- The length is not always known before reading the body. In those cases Cowboy will return undefined. The body length is available after the body has been fully read.
- Arguments Req The Req object. Return value The length of the request body, or undefined if it is not known.</description>
+Description body_length(Req :: cowboy_req:req()) -&amp;gt; undefined | non_neg_integer() Return the length of the request body.
+The length is not always known before reading the body. In those cases Cowboy will return undefined. The body length is available after the body has been fully read.
+Arguments Req The Req object.
+ Return value The length of the request body, or undefined if it is not known.</description>
</item>
<item>
@@ -3604,9 +3759,10 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/manual/cowboy_req.body_length/</guid>
<description>Name cowboy_req:body_length - Body length
- Description body_length(Req :: cowboy_req:req()) -&amp;gt; undefined | non_neg_integer() Return the length of the request body.
- The length is not always known before reading the body. In those cases Cowboy will return undefined. The body length is available after the body has been fully read.
- Arguments Req The Req object. Return value The length of the request body, or undefined if it is not known.</description>
+Description body_length(Req :: cowboy_req:req()) -&amp;gt; undefined | non_neg_integer() Return the length of the request body.
+The length is not always known before reading the body. In those cases Cowboy will return undefined. The body length is available after the body has been fully read.
+Arguments Req The Req object.
+ Return value The length of the request body, or undefined if it is not known.</description>
</item>
<item>
@@ -3616,9 +3772,10 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/manual/cowboy_req.body_length/</guid>
<description>Name cowboy_req:body_length - Body length
- Description body_length(Req :: cowboy_req:req()) -&amp;gt; undefined | non_neg_integer() Return the length of the request body.
- The length is not always known before reading the body. In those cases Cowboy will return undefined. The body length is available after the body has been fully read.
- Arguments Req The Req object. Return value The length of the request body, or undefined if it is not known.</description>
+Description body_length(Req :: cowboy_req:req()) -&amp;gt; undefined | non_neg_integer() Return the length of the request body.
+The length is not always known before reading the body. In those cases Cowboy will return undefined. The body length is available after the body has been fully read.
+Arguments Req The Req object.
+ Return value The length of the request body, or undefined if it is not known.</description>
</item>
<item>
@@ -3628,9 +3785,10 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/manual/cowboy_req.body_length/</guid>
<description>Name cowboy_req:body_length - Body length
- Description body_length(Req :: cowboy_req:req()) -&amp;gt; undefined | non_neg_integer() Return the length of the request body.
- The length is not always known before reading the body. In those cases Cowboy will return undefined. The body length is available after the body has been fully read.
- Arguments Req The Req object. Return value The length of the request body, or undefined if it is not known.</description>
+Description body_length(Req :: cowboy_req:req()) -&amp;gt; undefined | non_neg_integer() Return the length of the request body.
+The length is not always known before reading the body. In those cases Cowboy will return undefined. The body length is available after the body has been fully read.
+Arguments Req The Req object.
+ Return value The length of the request body, or undefined if it is not known.</description>
</item>
<item>
@@ -3640,9 +3798,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/manual/cowboy_req.cert/</guid>
<description>Name cowboy_req:cert - Client TLS certificate
- Description cert(Req :: cowboy_req:req()) -&amp;gt; binary() | undefined Return the peer&amp;#8217;s TLS certificate.
- Using the default configuration this function will always return undefined. You need to explicitly configure Cowboy to request the client certificate. To do this you need to set the verify transport option to verify_peer:
- {ok, _} = cowboy:start_tls(example, [ {port, 8443}, {cert, &#34;path/to/cert.pem&#34;}, {verify, verify_peer} ], #{ env =&amp;gt; #{dispatch =&amp;gt; Dispatch} }).</description>
+Description cert(Req :: cowboy_req:req()) -&amp;gt; binary() | undefined Return the peer&amp;apos;s TLS certificate.
+Using the default configuration this function will always return undefined. You need to explicitly configure Cowboy to request the client certificate. To do this you need to set the verify transport option to verify_peer:
+{ok, _} = cowboy:start_tls(example, [ {port, 8443}, {cert, &#34;path/to/cert.pem&#34;}, {verify, verify_peer} ], #{ env =&amp;gt; #{dispatch =&amp;gt; Dispatch} }).</description>
</item>
<item>
@@ -3652,9 +3810,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/manual/cowboy_req.cert/</guid>
<description>Name cowboy_req:cert - Client TLS certificate
- Description cert(Req :: cowboy_req:req()) -&amp;gt; binary() | undefined Return the peer&amp;#8217;s TLS certificate.
- Using the default configuration this function will always return undefined. You need to explicitly configure Cowboy to request the client certificate. To do this you need to set the verify transport option to verify_peer:
- {ok, _} = cowboy:start_tls(example, [ {port, 8443}, {cert, &#34;path/to/cert.pem&#34;}, {verify, verify_peer} ], #{ env =&amp;gt; #{dispatch =&amp;gt; Dispatch} }).</description>
+Description cert(Req :: cowboy_req:req()) -&amp;gt; binary() | undefined Return the peer&amp;apos;s TLS certificate.
+Using the default configuration this function will always return undefined. You need to explicitly configure Cowboy to request the client certificate. To do this you need to set the verify transport option to verify_peer:
+{ok, _} = cowboy:start_tls(example, [ {port, 8443}, {cert, &#34;path/to/cert.pem&#34;}, {verify, verify_peer} ], #{ env =&amp;gt; #{dispatch =&amp;gt; Dispatch} }).</description>
</item>
<item>
@@ -3664,9 +3822,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/manual/cowboy_req.cert/</guid>
<description>Name cowboy_req:cert - Client TLS certificate
- Description cert(Req :: cowboy_req:req()) -&amp;gt; binary() | undefined Return the peer&amp;#8217;s TLS certificate.
- Using the default configuration this function will always return undefined. You need to explicitly configure Cowboy to request the client certificate. To do this you need to set the verify transport option to verify_peer:
- {ok, _} = cowboy:start_tls(example, [ {port, 8443}, {cert, &#34;path/to/cert.pem&#34;}, {verify, verify_peer} ], #{ env =&amp;gt; #{dispatch =&amp;gt; Dispatch} }).</description>
+Description cert(Req :: cowboy_req:req()) -&amp;gt; binary() | undefined Return the peer&amp;apos;s TLS certificate.
+Using the default configuration this function will always return undefined. You need to explicitly configure Cowboy to request the client certificate. To do this you need to set the verify transport option to verify_peer:
+{ok, _} = cowboy:start_tls(example, [ {port, 8443}, {cert, &#34;path/to/cert.pem&#34;}, {verify, verify_peer} ], #{ env =&amp;gt; #{dispatch =&amp;gt; Dispatch} }).</description>
</item>
<item>
@@ -3676,9 +3834,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/manual/cowboy_req.cert/</guid>
<description>Name cowboy_req:cert - Client TLS certificate
- Description cert(Req :: cowboy_req:req()) -&amp;gt; binary() | undefined Return the peer&amp;#8217;s TLS certificate.
- Using the default configuration this function will always return undefined. You need to explicitly configure Cowboy to request the client certificate. To do this you need to set the verify transport option to verify_peer:
- {ok, _} = cowboy:start_tls(example, [ {port, 8443}, {cert, &#34;path/to/cert.pem&#34;}, {verify, verify_peer} ], #{ env =&amp;gt; #{dispatch =&amp;gt; Dispatch} }).</description>
+Description cert(Req :: cowboy_req:req()) -&amp;gt; binary() | undefined Return the peer&amp;apos;s TLS certificate.
+Using the default configuration this function will always return undefined. You need to explicitly configure Cowboy to request the client certificate. To do this you need to set the verify transport option to verify_peer:
+{ok, _} = cowboy:start_tls(example, [ {port, 8443}, {cert, &#34;path/to/cert.pem&#34;}, {verify, verify_peer} ], #{ env =&amp;gt; #{dispatch =&amp;gt; Dispatch} }).</description>
</item>
<item>
@@ -3688,9 +3846,11 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy_req.delete_resp_header/</guid>
<description>Name cowboy_req:delete_resp_header - Delete a response header
- Description delete_resp_header(Name, Req :: cowboy_req:req()) -&amp;gt; Req Name :: binary() %% lowercase; case insensitive Delete the given response header.
- 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.
- Arguments Name Header name as a lowercase binary string.</description>
+Description delete_resp_header(Name, Req :: cowboy_req:req()) -&amp;gt; Req Name :: binary() %% lowercase; case insensitive Delete the given response header.
+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.
+Arguments Name Header name as a lowercase binary string.
+ Req The Req object.
+ Return value A new Req object is returned.</description>
</item>
<item>
@@ -3700,9 +3860,11 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/manual/cowboy_req.delete_resp_header/</guid>
<description>Name cowboy_req:delete_resp_header - Delete a response header
- Description delete_resp_header(Name, Req :: cowboy_req:req()) -&amp;gt; Req Name :: binary() %% lowercase; case insensitive Delete the given response header.
- 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.
- Arguments Name Header name as a lowercase binary string.</description>
+Description delete_resp_header(Name, Req :: cowboy_req:req()) -&amp;gt; Req Name :: binary() %% lowercase; case insensitive Delete the given response header.
+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.
+Arguments Name Header name as a lowercase binary string.
+ Req The Req object.
+ Return value A new Req object is returned.</description>
</item>
<item>
@@ -3712,9 +3874,11 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/manual/cowboy_req.delete_resp_header/</guid>
<description>Name cowboy_req:delete_resp_header - Delete a response header
- Description delete_resp_header(Name, Req :: cowboy_req:req()) -&amp;gt; Req Name :: binary() %% lowercase; case insensitive Delete the given response header.
- 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.
- Arguments Name Header name as a lowercase binary string.</description>
+Description delete_resp_header(Name, Req :: cowboy_req:req()) -&amp;gt; Req Name :: binary() %% lowercase; case insensitive Delete the given response header.
+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.
+Arguments Name Header name as a lowercase binary string.
+ Req The Req object.
+ Return value A new Req object is returned.</description>
</item>
<item>
@@ -3724,9 +3888,11 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/manual/cowboy_req.delete_resp_header/</guid>
<description>Name cowboy_req:delete_resp_header - Delete a response header
- Description delete_resp_header(Name, Req :: cowboy_req:req()) -&amp;gt; Req Name :: binary() %% lowercase; case insensitive Delete the given response header.
- 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.
- Arguments Name Header name as a lowercase binary string.</description>
+Description delete_resp_header(Name, Req :: cowboy_req:req()) -&amp;gt; Req Name :: binary() %% lowercase; case insensitive Delete the given response header.
+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.
+Arguments Name Header name as a lowercase binary string.
+ Req The Req object.
+ Return value A new Req object is returned.</description>
</item>
<item>
@@ -3736,9 +3902,11 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/manual/cowboy_req.delete_resp_header/</guid>
<description>Name cowboy_req:delete_resp_header - Delete a response header
- Description delete_resp_header(Name, Req :: cowboy_req:req()) -&amp;gt; Req Name :: binary() %% lowercase; case insensitive Delete the given response header.
- 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.
- Arguments Name Header name as a lowercase binary string.</description>
+Description delete_resp_header(Name, Req :: cowboy_req:req()) -&amp;gt; Req Name :: binary() %% lowercase; case insensitive Delete the given response header.
+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.
+Arguments Name Header name as a lowercase binary string.
+ Req The Req object.
+ Return value A new Req object is returned.</description>
</item>
<item>
@@ -3748,9 +3916,10 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy_req.has_body/</guid>
<description>Name cowboy_req:has_body - Is there a request body?
- Description has_body(Req :: cowboy_req:req()) -&amp;gt; boolean() Return whether the request has a body.
- Arguments Req The Req object. Return value A boolean indicating whether the request has a body.
- Changelog 1.0: Function introduced. Examples Ensure the request has a body true = cowboy_req:has_body(Req).</description>
+Description has_body(Req :: cowboy_req:req()) -&amp;gt; boolean() Return whether the request has a body.
+Arguments Req The Req object.
+ Return value A boolean indicating whether the request has a body.
+Changelog 1.0: Function introduced. Examples Ensure the request has a body true = cowboy_req:has_body(Req). See also cowboy_req(3), cowboy_req:body_length(3), cowboy_req:read_body(3), cowboy_req:read_urlencoded_body(3), cowboy_req:read_part(3), cowboy_req:read_part_body(3)</description>
</item>
<item>
@@ -3760,9 +3929,10 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/manual/cowboy_req.has_body/</guid>
<description>Name cowboy_req:has_body - Is there a request body?
- Description has_body(Req :: cowboy_req:req()) -&amp;gt; boolean() Return whether the request has a body.
- Arguments Req The Req object. Return value A boolean indicating whether the request has a body.
- Changelog 1.0: Function introduced. Examples Ensure the request has a body true = cowboy_req:has_body(Req).</description>
+Description has_body(Req :: cowboy_req:req()) -&amp;gt; boolean() Return whether the request has a body.
+Arguments Req The Req object.
+ Return value A boolean indicating whether the request has a body.
+Changelog 1.0: Function introduced. Examples Ensure the request has a body true = cowboy_req:has_body(Req). See also cowboy_req(3), cowboy_req:body_length(3), cowboy_req:read_body(3), cowboy_req:read_urlencoded_body(3), cowboy_req:read_part(3), cowboy_req:read_part_body(3)</description>
</item>
<item>
@@ -3772,9 +3942,10 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/manual/cowboy_req.has_body/</guid>
<description>Name cowboy_req:has_body - Is there a request body?
- Description has_body(Req :: cowboy_req:req()) -&amp;gt; boolean() Return whether the request has a body.
- Arguments Req The Req object. Return value A boolean indicating whether the request has a body.
- Changelog 1.0: Function introduced. Examples Ensure the request has a body true = cowboy_req:has_body(Req).</description>
+Description has_body(Req :: cowboy_req:req()) -&amp;gt; boolean() Return whether the request has a body.
+Arguments Req The Req object.
+ Return value A boolean indicating whether the request has a body.
+Changelog 1.0: Function introduced. Examples Ensure the request has a body true = cowboy_req:has_body(Req). See also cowboy_req(3), cowboy_req:body_length(3), cowboy_req:read_body(3), cowboy_req:read_urlencoded_body(3), cowboy_req:read_part(3), cowboy_req:read_part_body(3)</description>
</item>
<item>
@@ -3784,9 +3955,10 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/manual/cowboy_req.has_body/</guid>
<description>Name cowboy_req:has_body - Is there a request body?
- Description has_body(Req :: cowboy_req:req()) -&amp;gt; boolean() Return whether the request has a body.
- Arguments Req The Req object. Return value A boolean indicating whether the request has a body.
- Changelog 1.0: Function introduced. Examples Ensure the request has a body true = cowboy_req:has_body(Req).</description>
+Description has_body(Req :: cowboy_req:req()) -&amp;gt; boolean() Return whether the request has a body.
+Arguments Req The Req object.
+ Return value A boolean indicating whether the request has a body.
+Changelog 1.0: Function introduced. Examples Ensure the request has a body true = cowboy_req:has_body(Req). See also cowboy_req(3), cowboy_req:body_length(3), cowboy_req:read_body(3), cowboy_req:read_urlencoded_body(3), cowboy_req:read_part(3), cowboy_req:read_part_body(3)</description>
</item>
<item>
@@ -3796,9 +3968,10 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/manual/cowboy_req.has_body/</guid>
<description>Name cowboy_req:has_body - Is there a request body?
- Description has_body(Req :: cowboy_req:req()) -&amp;gt; boolean() Return whether the request has a body.
- Arguments Req The Req object. Return value A boolean indicating whether the request has a body.
- Changelog 1.0: Function introduced. Examples Ensure the request has a body true = cowboy_req:has_body(Req).</description>
+Description has_body(Req :: cowboy_req:req()) -&amp;gt; boolean() Return whether the request has a body.
+Arguments Req The Req object.
+ Return value A boolean indicating whether the request has a body.
+Changelog 1.0: Function introduced. Examples Ensure the request has a body true = cowboy_req:has_body(Req). See also cowboy_req(3), cowboy_req:body_length(3), cowboy_req:read_body(3), cowboy_req:read_urlencoded_body(3), cowboy_req:read_part(3), cowboy_req:read_part_body(3)</description>
</item>
<item>
@@ -3808,10 +3981,11 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy_req.has_resp_body/</guid>
<description>Name cowboy_req:has_resp_body - Is there a response body?
- Description has_resp_body(Req :: cowboy_req:req()) -&amp;gt; boolean() Return whether a response body has been set.
- Arguments Req The Req object. Return value A boolean indicating whether a response body has been set.
- This function will return false when an empty response body has been set.
- Changelog 1.</description>
+Description has_resp_body(Req :: cowboy_req:req()) -&amp;gt; boolean() Return whether a response body has been set.
+Arguments Req The Req object.
+ Return value A boolean indicating whether a response body has been set.
+This function will return false when an empty response body has been set.
+Changelog 1.0: Function introduced. Examples Check whether a body has been set false = cowboy_req:has_resp_body(Req0), Req1 = cowboy_req:set_resp_body(&amp;lt;&amp;lt;&#34;</description>
</item>
<item>
@@ -3821,10 +3995,11 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/manual/cowboy_req.has_resp_body/</guid>
<description>Name cowboy_req:has_resp_body - Is there a response body?
- Description has_resp_body(Req :: cowboy_req:req()) -&amp;gt; boolean() Return whether a response body has been set.
- Arguments Req The Req object. Return value A boolean indicating whether a response body has been set.
- This function will return false when an empty response body has been set.
- Changelog 1.</description>
+Description has_resp_body(Req :: cowboy_req:req()) -&amp;gt; boolean() Return whether a response body has been set.
+Arguments Req The Req object.
+ Return value A boolean indicating whether a response body has been set.
+This function will return false when an empty response body has been set.
+Changelog 1.0: Function introduced. Examples Check whether a body has been set false = cowboy_req:has_resp_body(Req0), Req1 = cowboy_req:set_resp_body(&amp;lt;&amp;lt;&#34;</description>
</item>
<item>
@@ -3834,10 +4009,11 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/manual/cowboy_req.has_resp_body/</guid>
<description>Name cowboy_req:has_resp_body - Is there a response body?
- Description has_resp_body(Req :: cowboy_req:req()) -&amp;gt; boolean() Return whether a response body has been set.
- Arguments Req The Req object. Return value A boolean indicating whether a response body has been set.
- This function will return false when an empty response body has been set.
- Changelog 1.</description>
+Description has_resp_body(Req :: cowboy_req:req()) -&amp;gt; boolean() Return whether a response body has been set.
+Arguments Req The Req object.
+ Return value A boolean indicating whether a response body has been set.
+This function will return false when an empty response body has been set.
+Changelog 1.0: Function introduced. Examples Check whether a body has been set false = cowboy_req:has_resp_body(Req0), Req1 = cowboy_req:set_resp_body(&amp;lt;&amp;lt;&#34;</description>
</item>
<item>
@@ -3847,10 +4023,11 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/manual/cowboy_req.has_resp_body/</guid>
<description>Name cowboy_req:has_resp_body - Is there a response body?
- Description has_resp_body(Req :: cowboy_req:req()) -&amp;gt; boolean() Return whether a response body has been set.
- Arguments Req The Req object. Return value A boolean indicating whether a response body has been set.
- This function will return false when an empty response body has been set.
- Changelog 1.</description>
+Description has_resp_body(Req :: cowboy_req:req()) -&amp;gt; boolean() Return whether a response body has been set.
+Arguments Req The Req object.
+ Return value A boolean indicating whether a response body has been set.
+This function will return false when an empty response body has been set.
+Changelog 1.0: Function introduced. Examples Check whether a body has been set false = cowboy_req:has_resp_body(Req0), Req1 = cowboy_req:set_resp_body(&amp;lt;&amp;lt;&#34;</description>
</item>
<item>
@@ -3860,10 +4037,11 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/manual/cowboy_req.has_resp_body/</guid>
<description>Name cowboy_req:has_resp_body - Is there a response body?
- Description has_resp_body(Req :: cowboy_req:req()) -&amp;gt; boolean() Return whether a response body has been set.
- Arguments Req The Req object. Return value A boolean indicating whether a response body has been set.
- This function will return false when an empty response body has been set.
- Changelog 1.</description>
+Description has_resp_body(Req :: cowboy_req:req()) -&amp;gt; boolean() Return whether a response body has been set.
+Arguments Req The Req object.
+ Return value A boolean indicating whether a response body has been set.
+This function will return false when an empty response body has been set.
+Changelog 1.0: Function introduced. Examples Check whether a body has been set false = cowboy_req:has_resp_body(Req0), Req1 = cowboy_req:set_resp_body(&amp;lt;&amp;lt;&#34;</description>
</item>
<item>
@@ -3873,9 +4051,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy_req.has_resp_header/</guid>
<description>Name cowboy_req:has_resp_header - Is the given response header set?
- Description has_resp_header(Name, Req :: cowboy_req:req()) -&amp;gt; boolean() Name :: binary() %% lowercase; case insensitive Return whether the given response header has been set.
- 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.
- Arguments Name Header name as a lowercase binary string.</description>
+Description has_resp_header(Name, Req :: cowboy_req:req()) -&amp;gt; boolean() Name :: binary() %% lowercase; case insensitive Return whether the given response header has been set.
+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.
+Arguments Name Header name as a lowercase binary string.</description>
</item>
<item>
@@ -3885,9 +4063,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/manual/cowboy_req.has_resp_header/</guid>
<description>Name cowboy_req:has_resp_header - Is the given response header set?
- Description has_resp_header(Name, Req :: cowboy_req:req()) -&amp;gt; boolean() Name :: binary() %% lowercase; case insensitive Return whether the given response header has been set.
- 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.
- Arguments Name Header name as a lowercase binary string.</description>
+Description has_resp_header(Name, Req :: cowboy_req:req()) -&amp;gt; boolean() Name :: binary() %% lowercase; case insensitive Return whether the given response header has been set.
+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.
+Arguments Name Header name as a lowercase binary string.</description>
</item>
<item>
@@ -3897,9 +4075,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/manual/cowboy_req.has_resp_header/</guid>
<description>Name cowboy_req:has_resp_header - Is the given response header set?
- Description has_resp_header(Name, Req :: cowboy_req:req()) -&amp;gt; boolean() Name :: binary() %% lowercase; case insensitive Return whether the given response header has been set.
- 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.
- Arguments Name Header name as a lowercase binary string.</description>
+Description has_resp_header(Name, Req :: cowboy_req:req()) -&amp;gt; boolean() Name :: binary() %% lowercase; case insensitive Return whether the given response header has been set.
+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.
+Arguments Name Header name as a lowercase binary string.</description>
</item>
<item>
@@ -3909,9 +4087,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/manual/cowboy_req.has_resp_header/</guid>
<description>Name cowboy_req:has_resp_header - Is the given response header set?
- Description has_resp_header(Name, Req :: cowboy_req:req()) -&amp;gt; boolean() Name :: binary() %% lowercase; case insensitive Return whether the given response header has been set.
- 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.
- Arguments Name Header name as a lowercase binary string.</description>
+Description has_resp_header(Name, Req :: cowboy_req:req()) -&amp;gt; boolean() Name :: binary() %% lowercase; case insensitive Return whether the given response header has been set.
+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.
+Arguments Name Header name as a lowercase binary string.</description>
</item>
<item>
@@ -3921,9 +4099,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/manual/cowboy_req.has_resp_header/</guid>
<description>Name cowboy_req:has_resp_header - Is the given response header set?
- Description has_resp_header(Name, Req :: cowboy_req:req()) -&amp;gt; boolean() Name :: binary() %% lowercase; case insensitive Return whether the given response header has been set.
- 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.
- Arguments Name Header name as a lowercase binary string.</description>
+Description has_resp_header(Name, Req :: cowboy_req:req()) -&amp;gt; boolean() Name :: binary() %% lowercase; case insensitive Return whether the given response header has been set.
+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.
+Arguments Name Header name as a lowercase binary string.</description>
</item>
<item>
@@ -3933,8 +4111,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy_req.header/</guid>
<description>Name cowboy_req:header - HTTP header
- Description header(Name, Req) -&amp;gt; header(Name, Req, undefined) header(Name, Req, Default) -&amp;gt; binary() | Default Name :: binary() %% lowercase; case insensitive Req :: cowboy_req:req() Default :: any() Return the value for the given HTTP header.
- 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.</description>
+Description header(Name, Req) -&amp;gt; header(Name, Req, undefined) header(Name, Req, Default) -&amp;gt; binary() | Default Name :: binary() %% lowercase; case insensitive Req :: cowboy_req:req() Default :: any() Return the value for the given HTTP header.
+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.
+Headers can also be obtained using pattern matching:</description>
</item>
<item>
@@ -3944,8 +4123,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/manual/cowboy_req.header/</guid>
<description>Name cowboy_req:header - HTTP header
- Description header(Name, Req) -&amp;gt; header(Name, Req, undefined) header(Name, Req, Default) -&amp;gt; binary() | Default Name :: binary() %% lowercase; case insensitive Req :: cowboy_req:req() Default :: any() Return the value for the given HTTP header.
- 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.</description>
+Description header(Name, Req) -&amp;gt; header(Name, Req, undefined) header(Name, Req, Default) -&amp;gt; binary() | Default Name :: binary() %% lowercase; case insensitive Req :: cowboy_req:req() Default :: any() Return the value for the given HTTP header.
+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.
+Headers can also be obtained using pattern matching:</description>
</item>
<item>
@@ -3955,8 +4135,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/manual/cowboy_req.header/</guid>
<description>Name cowboy_req:header - HTTP header
- Description header(Name, Req) -&amp;gt; header(Name, Req, undefined) header(Name, Req, Default) -&amp;gt; binary() | Default Name :: binary() %% lowercase; case insensitive Req :: cowboy_req:req() Default :: any() Return the value for the given HTTP header.
- 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.</description>
+Description header(Name, Req) -&amp;gt; header(Name, Req, undefined) header(Name, Req, Default) -&amp;gt; binary() | Default Name :: binary() %% lowercase; case insensitive Req :: cowboy_req:req() Default :: any() Return the value for the given HTTP header.
+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.
+Headers can also be obtained using pattern matching:</description>
</item>
<item>
@@ -3966,8 +4147,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/manual/cowboy_req.header/</guid>
<description>Name cowboy_req:header - HTTP header
- Description header(Name, Req) -&amp;gt; header(Name, Req, undefined) header(Name, Req, Default) -&amp;gt; binary() | Default Name :: binary() %% lowercase; case insensitive Req :: cowboy_req:req() Default :: any() Return the value for the given HTTP header.
- 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.</description>
+Description header(Name, Req) -&amp;gt; header(Name, Req, undefined) header(Name, Req, Default) -&amp;gt; binary() | Default Name :: binary() %% lowercase; case insensitive Req :: cowboy_req:req() Default :: any() Return the value for the given HTTP header.
+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.
+Headers can also be obtained using pattern matching:</description>
</item>
<item>
@@ -3977,8 +4159,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/manual/cowboy_req.header/</guid>
<description>Name cowboy_req:header - HTTP header
- Description header(Name, Req) -&amp;gt; header(Name, Req, undefined) header(Name, Req, Default) -&amp;gt; binary() | Default Name :: binary() %% lowercase; case insensitive Req :: cowboy_req:req() Default :: any() Return the value for the given HTTP header.
- 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.</description>
+Description header(Name, Req) -&amp;gt; header(Name, Req, undefined) header(Name, Req, Default) -&amp;gt; binary() | Default Name :: binary() %% lowercase; case insensitive Req :: cowboy_req:req() Default :: any() Return the value for the given HTTP header.
+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.
+Headers can also be obtained using pattern matching:</description>
</item>
<item>
@@ -3988,10 +4171,11 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy_req.headers/</guid>
<description>Name cowboy_req:headers - HTTP headers
- Description headers(Req :: cowboy_req:req()) -&amp;gt; cowboy:http_headers() Return all request headers.
- Request headers can also be obtained using pattern matching:
- #{headers := Headers} = Req. Arguments Req The Req object. Return value Headers are returned as a map with keys being lowercase binary strings, and values as binary strings.
- Changelog 2.</description>
+Description headers(Req :: cowboy_req:req()) -&amp;gt; cowboy:http_headers() Return all request headers.
+Request headers can also be obtained using pattern matching:
+#{headers := Headers} = Req. Arguments Req The Req object.
+ Return value Headers are returned as a map with keys being lowercase binary strings, and values as binary strings.
+Changelog 2.0: Only the headers are returned, they are no longer wrapped in a tuple.</description>
</item>
<item>
@@ -4001,10 +4185,11 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/manual/cowboy_req.headers/</guid>
<description>Name cowboy_req:headers - HTTP headers
- Description headers(Req :: cowboy_req:req()) -&amp;gt; cowboy:http_headers() Return all request headers.
- Request headers can also be obtained using pattern matching:
- #{headers := Headers} = Req. Arguments Req The Req object. Return value Headers are returned as a map with keys being lowercase binary strings, and values as binary strings.
- Changelog 2.</description>
+Description headers(Req :: cowboy_req:req()) -&amp;gt; cowboy:http_headers() Return all request headers.
+Request headers can also be obtained using pattern matching:
+#{headers := Headers} = Req. Arguments Req The Req object.
+ Return value Headers are returned as a map with keys being lowercase binary strings, and values as binary strings.
+Changelog 2.0: Only the headers are returned, they are no longer wrapped in a tuple.</description>
</item>
<item>
@@ -4014,10 +4199,11 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/manual/cowboy_req.headers/</guid>
<description>Name cowboy_req:headers - HTTP headers
- Description headers(Req :: cowboy_req:req()) -&amp;gt; cowboy:http_headers() Return all request headers.
- Request headers can also be obtained using pattern matching:
- #{headers := Headers} = Req. Arguments Req The Req object. Return value Headers are returned as a map with keys being lowercase binary strings, and values as binary strings.
- Changelog 2.</description>
+Description headers(Req :: cowboy_req:req()) -&amp;gt; cowboy:http_headers() Return all request headers.
+Request headers can also be obtained using pattern matching:
+#{headers := Headers} = Req. Arguments Req The Req object.
+ Return value Headers are returned as a map with keys being lowercase binary strings, and values as binary strings.
+Changelog 2.0: Only the headers are returned, they are no longer wrapped in a tuple.</description>
</item>
<item>
@@ -4027,10 +4213,11 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/manual/cowboy_req.headers/</guid>
<description>Name cowboy_req:headers - HTTP headers
- Description headers(Req :: cowboy_req:req()) -&amp;gt; cowboy:http_headers() Return all request headers.
- Request headers can also be obtained using pattern matching:
- #{headers := Headers} = Req. Arguments Req The Req object. Return value Headers are returned as a map with keys being lowercase binary strings, and values as binary strings.
- Changelog 2.</description>
+Description headers(Req :: cowboy_req:req()) -&amp;gt; cowboy:http_headers() Return all request headers.
+Request headers can also be obtained using pattern matching:
+#{headers := Headers} = Req. Arguments Req The Req object.
+ Return value Headers are returned as a map with keys being lowercase binary strings, and values as binary strings.
+Changelog 2.0: Only the headers are returned, they are no longer wrapped in a tuple.</description>
</item>
<item>
@@ -4040,10 +4227,11 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/manual/cowboy_req.headers/</guid>
<description>Name cowboy_req:headers - HTTP headers
- Description headers(Req :: cowboy_req:req()) -&amp;gt; cowboy:http_headers() Return all request headers.
- Request headers can also be obtained using pattern matching:
- #{headers := Headers} = Req. Arguments Req The Req object. Return value Headers are returned as a map with keys being lowercase binary strings, and values as binary strings.
- Changelog 2.</description>
+Description headers(Req :: cowboy_req:req()) -&amp;gt; cowboy:http_headers() Return all request headers.
+Request headers can also be obtained using pattern matching:
+#{headers := Headers} = Req. Arguments Req The Req object.
+ Return value Headers are returned as a map with keys being lowercase binary strings, and values as binary strings.
+Changelog 2.0: Only the headers are returned, they are no longer wrapped in a tuple.</description>
</item>
<item>
@@ -4053,9 +4241,11 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy_req.host/</guid>
<description>Name cowboy_req:host - URI host name
- Description host(Req :: cowboy_req:req()) -&amp;gt; Host :: binary() Return the host name of the effective request URI.
- The host name can also be obtained using pattern matching:
- #{host := Host} = Req. Arguments Req The Req object. Return value The host name is returned as a lowercase binary string. It is case insensitive.</description>
+Description host(Req :: cowboy_req:req()) -&amp;gt; Host :: binary() Return the host name of the effective request URI.
+The host name can also be obtained using pattern matching:
+#{host := Host} = Req. Arguments Req The Req object.
+ Return value The host name is returned as a lowercase binary string. It is case insensitive.
+Changelog 2.0: Only the host name is returned, it is no longer wrapped in a tuple.</description>
</item>
<item>
@@ -4065,9 +4255,11 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/manual/cowboy_req.host/</guid>
<description>Name cowboy_req:host - URI host name
- Description host(Req :: cowboy_req:req()) -&amp;gt; Host :: binary() Return the host name of the effective request URI.
- The host name can also be obtained using pattern matching:
- #{host := Host} = Req. Arguments Req The Req object. Return value The host name is returned as a lowercase binary string. It is case insensitive.</description>
+Description host(Req :: cowboy_req:req()) -&amp;gt; Host :: binary() Return the host name of the effective request URI.
+The host name can also be obtained using pattern matching:
+#{host := Host} = Req. Arguments Req The Req object.
+ Return value The host name is returned as a lowercase binary string. It is case insensitive.
+Changelog 2.0: Only the host name is returned, it is no longer wrapped in a tuple.</description>
</item>
<item>
@@ -4077,9 +4269,11 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/manual/cowboy_req.host/</guid>
<description>Name cowboy_req:host - URI host name
- Description host(Req :: cowboy_req:req()) -&amp;gt; Host :: binary() Return the host name of the effective request URI.
- The host name can also be obtained using pattern matching:
- #{host := Host} = Req. Arguments Req The Req object. Return value The host name is returned as a lowercase binary string. It is case insensitive.</description>
+Description host(Req :: cowboy_req:req()) -&amp;gt; Host :: binary() Return the host name of the effective request URI.
+The host name can also be obtained using pattern matching:
+#{host := Host} = Req. Arguments Req The Req object.
+ Return value The host name is returned as a lowercase binary string. It is case insensitive.
+Changelog 2.0: Only the host name is returned, it is no longer wrapped in a tuple.</description>
</item>
<item>
@@ -4089,9 +4283,11 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/manual/cowboy_req.host/</guid>
<description>Name cowboy_req:host - URI host name
- Description host(Req :: cowboy_req:req()) -&amp;gt; Host :: binary() Return the host name of the effective request URI.
- The host name can also be obtained using pattern matching:
- #{host := Host} = Req. Arguments Req The Req object. Return value The host name is returned as a lowercase binary string. It is case insensitive.</description>
+Description host(Req :: cowboy_req:req()) -&amp;gt; Host :: binary() Return the host name of the effective request URI.
+The host name can also be obtained using pattern matching:
+#{host := Host} = Req. Arguments Req The Req object.
+ Return value The host name is returned as a lowercase binary string. It is case insensitive.
+Changelog 2.0: Only the host name is returned, it is no longer wrapped in a tuple.</description>
</item>
<item>
@@ -4101,9 +4297,11 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/manual/cowboy_req.host/</guid>
<description>Name cowboy_req:host - URI host name
- Description host(Req :: cowboy_req:req()) -&amp;gt; Host :: binary() Return the host name of the effective request URI.
- The host name can also be obtained using pattern matching:
- #{host := Host} = Req. Arguments Req The Req object. Return value The host name is returned as a lowercase binary string. It is case insensitive.</description>
+Description host(Req :: cowboy_req:req()) -&amp;gt; Host :: binary() Return the host name of the effective request URI.
+The host name can also be obtained using pattern matching:
+#{host := Host} = Req. Arguments Req The Req object.
+ Return value The host name is returned as a lowercase binary string. It is case insensitive.
+Changelog 2.0: Only the host name is returned, it is no longer wrapped in a tuple.</description>
</item>
<item>
@@ -4112,10 +4310,12 @@
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy_req.host_info/</guid>
- <description>Name cowboy_req:host_info - Access the route&amp;#8217;s heading host segments
- Description host_info(Req :: cowboy_req:req()) -&amp;gt; cowboy_router:tokens() Return the tokens for the heading host segments.
- This is the part of the host name that was matched using the ... notation.
- Arguments Req The Req object. Return value The tokens are returned as a list of case insensitive binary strings.</description>
+ <description>Name cowboy_req:host_info - Access the route&amp;apos;s heading host segments
+Description host_info(Req :: cowboy_req:req()) -&amp;gt; cowboy_router:tokens() Return the tokens for the heading host segments.
+This is the part of the host name that was matched using the ... notation.
+Arguments Req The Req object.
+ Return value The tokens are returned as a list of case insensitive binary strings.
+Changelog 2.0: Only the tokens are returned, they are no longer wrapped in a tuple.</description>
</item>
<item>
@@ -4124,10 +4324,12 @@
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://ninenines.eu/docs/en/cowboy/2.1/manual/cowboy_req.host_info/</guid>
- <description>Name cowboy_req:host_info - Access the route&amp;#8217;s heading host segments
- Description host_info(Req :: cowboy_req:req()) -&amp;gt; cowboy_router:tokens() Return the tokens for the heading host segments.
- This is the part of the host name that was matched using the ... notation.
- Arguments Req The Req object. Return value The tokens are returned as a list of case insensitive binary strings.</description>
+ <description>Name cowboy_req:host_info - Access the route&amp;apos;s heading host segments
+Description host_info(Req :: cowboy_req:req()) -&amp;gt; cowboy_router:tokens() Return the tokens for the heading host segments.
+This is the part of the host name that was matched using the ... notation.
+Arguments Req The Req object.
+ Return value The tokens are returned as a list of case insensitive binary strings.
+Changelog 2.0: Only the tokens are returned, they are no longer wrapped in a tuple.</description>
</item>
<item>
@@ -4136,10 +4338,12 @@
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://ninenines.eu/docs/en/cowboy/2.2/manual/cowboy_req.host_info/</guid>
- <description>Name cowboy_req:host_info - Access the route&amp;#8217;s heading host segments
- Description host_info(Req :: cowboy_req:req()) -&amp;gt; cowboy_router:tokens() Return the tokens for the heading host segments.
- This is the part of the host name that was matched using the ... notation.
- Arguments Req The Req object. Return value The tokens are returned as a list of case insensitive binary strings.</description>
+ <description>Name cowboy_req:host_info - Access the route&amp;apos;s heading host segments
+Description host_info(Req :: cowboy_req:req()) -&amp;gt; cowboy_router:tokens() Return the tokens for the heading host segments.
+This is the part of the host name that was matched using the ... notation.
+Arguments Req The Req object.
+ Return value The tokens are returned as a list of case insensitive binary strings.
+Changelog 2.0: Only the tokens are returned, they are no longer wrapped in a tuple.</description>
</item>
<item>
@@ -4148,10 +4352,12 @@
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://ninenines.eu/docs/en/cowboy/2.3/manual/cowboy_req.host_info/</guid>
- <description>Name cowboy_req:host_info - Access the route&amp;#8217;s heading host segments
- Description host_info(Req :: cowboy_req:req()) -&amp;gt; cowboy_router:tokens() Return the tokens for the heading host segments.
- This is the part of the host name that was matched using the ... notation.
- Arguments Req The Req object. Return value The tokens are returned as a list of case insensitive binary strings.</description>
+ <description>Name cowboy_req:host_info - Access the route&amp;apos;s heading host segments
+Description host_info(Req :: cowboy_req:req()) -&amp;gt; cowboy_router:tokens() Return the tokens for the heading host segments.
+This is the part of the host name that was matched using the ... notation.
+Arguments Req The Req object.
+ Return value The tokens are returned as a list of case insensitive binary strings.
+Changelog 2.0: Only the tokens are returned, they are no longer wrapped in a tuple.</description>
</item>
<item>
@@ -4160,10 +4366,12 @@
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://ninenines.eu/docs/en/cowboy/2.4/manual/cowboy_req.host_info/</guid>
- <description>Name cowboy_req:host_info - Access the route&amp;#8217;s heading host segments
- Description host_info(Req :: cowboy_req:req()) -&amp;gt; cowboy_router:tokens() Return the tokens for the heading host segments.
- This is the part of the host name that was matched using the ... notation.
- Arguments Req The Req object. Return value The tokens are returned as a list of case insensitive binary strings.</description>
+ <description>Name cowboy_req:host_info - Access the route&amp;apos;s heading host segments
+Description host_info(Req :: cowboy_req:req()) -&amp;gt; cowboy_router:tokens() Return the tokens for the heading host segments.
+This is the part of the host name that was matched using the ... notation.
+Arguments Req The Req object.
+ Return value The tokens are returned as a list of case insensitive binary strings.
+Changelog 2.0: Only the tokens are returned, they are no longer wrapped in a tuple.</description>
</item>
<item>
@@ -4173,8 +4381,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/manual/cowboy_req.inform/</guid>
<description>Name cowboy_req:inform - Send an informational response
- Description inform(Status, Req :: cowboy_req:req()) -&amp;gt; inform(StatusCode, #{}, Req) inform(Status, Headers, Req :: cowboy_req:req()) -&amp;gt; ok Status :: cowboy:http_status() Headers :: cowboy:http_headers() Send an informational response.
- Informational responses use a status code between 100 and 199. They cannot include a body. This function will not use any of the previously set headers. All headers to be sent must be given directly.</description>
+Description inform(Status, Req :: cowboy_req:req()) -&amp;gt; inform(StatusCode, #{}, Req) inform(Status, Headers, Req :: cowboy_req:req()) -&amp;gt; ok Status :: cowboy:http_status() Headers :: cowboy:http_headers() Send an informational response.
+Informational responses use a status code between 100 and 199. They cannot include a body. This function will not use any of the previously set headers. All headers to be sent must be given directly.
+Any number of informational responses can be sent as long as they are sent before the proper response.</description>
</item>
<item>
@@ -4184,8 +4393,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/manual/cowboy_req.inform/</guid>
<description>Name cowboy_req:inform - Send an informational response
- Description inform(Status, Req :: cowboy_req:req()) -&amp;gt; inform(StatusCode, #{}, Req) inform(Status, Headers, Req :: cowboy_req:req()) -&amp;gt; ok Status :: cowboy:http_status() Headers :: cowboy:http_headers() Send an informational response.
- Informational responses use a status code between 100 and 199. They cannot include a body. This function will not use any of the previously set headers. All headers to be sent must be given directly.</description>
+Description inform(Status, Req :: cowboy_req:req()) -&amp;gt; inform(StatusCode, #{}, Req) inform(Status, Headers, Req :: cowboy_req:req()) -&amp;gt; ok Status :: cowboy:http_status() Headers :: cowboy:http_headers() Send an informational response.
+Informational responses use a status code between 100 and 199. They cannot include a body. This function will not use any of the previously set headers. All headers to be sent must be given directly.
+Any number of informational responses can be sent as long as they are sent before the proper response.</description>
</item>
<item>
@@ -4195,8 +4405,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/manual/cowboy_req.inform/</guid>
<description>Name cowboy_req:inform - Send an informational response
- Description inform(Status, Req :: cowboy_req:req()) -&amp;gt; inform(StatusCode, #{}, Req) inform(Status, Headers, Req :: cowboy_req:req()) -&amp;gt; ok Status :: cowboy:http_status() Headers :: cowboy:http_headers() Send an informational response.
- Informational responses use a status code between 100 and 199. They cannot include a body. This function will not use any of the previously set headers. All headers to be sent must be given directly.</description>
+Description inform(Status, Req :: cowboy_req:req()) -&amp;gt; inform(StatusCode, #{}, Req) inform(Status, Headers, Req :: cowboy_req:req()) -&amp;gt; ok Status :: cowboy:http_status() Headers :: cowboy:http_headers() Send an informational response.
+Informational responses use a status code between 100 and 199. They cannot include a body. This function will not use any of the previously set headers. All headers to be sent must be given directly.
+Any number of informational responses can be sent as long as they are sent before the proper response.</description>
</item>
<item>
@@ -4206,8 +4417,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/manual/cowboy_req.inform/</guid>
<description>Name cowboy_req:inform - Send an informational response
- Description inform(Status, Req :: cowboy_req:req()) -&amp;gt; inform(StatusCode, #{}, Req) inform(Status, Headers, Req :: cowboy_req:req()) -&amp;gt; ok Status :: cowboy:http_status() Headers :: cowboy:http_headers() Send an informational response.
- Informational responses use a status code between 100 and 199. They cannot include a body. This function will not use any of the previously set headers. All headers to be sent must be given directly.</description>
+Description inform(Status, Req :: cowboy_req:req()) -&amp;gt; inform(StatusCode, #{}, Req) inform(Status, Headers, Req :: cowboy_req:req()) -&amp;gt; ok Status :: cowboy:http_status() Headers :: cowboy:http_headers() Send an informational response.
+Informational responses use a status code between 100 and 199. They cannot include a body. This function will not use any of the previously set headers. All headers to be sent must be given directly.
+Any number of informational responses can be sent as long as they are sent before the proper response.</description>
</item>
<item>
@@ -4217,8 +4429,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy_req.match_cookies/</guid>
<description>Name cowboy_req:match_cookies - Match cookies against constraints
- Description match_cookies(Fields :: cowboy:fields(), Req :: cowboy_req:req()) -&amp;gt; #{atom() =&amp;gt; any()} Parse the cookies and match specific values against constraints.
- 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.</description>
+Description match_cookies(Fields :: cowboy:fields(), Req :: cowboy_req:req()) -&amp;gt; #{atom() =&amp;gt; any()} Parse the cookies and match specific values against constraints.
+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.</description>
</item>
<item>
@@ -4228,8 +4440,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/manual/cowboy_req.match_cookies/</guid>
<description>Name cowboy_req:match_cookies - Match cookies against constraints
- Description match_cookies(Fields :: cowboy:fields(), Req :: cowboy_req:req()) -&amp;gt; #{atom() =&amp;gt; any()} Parse the cookies and match specific values against constraints.
- 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.</description>
+Description match_cookies(Fields :: cowboy:fields(), Req :: cowboy_req:req()) -&amp;gt; #{atom() =&amp;gt; any()} Parse the cookies and match specific values against constraints.
+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.</description>
</item>
<item>
@@ -4239,8 +4451,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/manual/cowboy_req.match_cookies/</guid>
<description>Name cowboy_req:match_cookies - Match cookies against constraints
- Description match_cookies(Fields :: cowboy:fields(), Req :: cowboy_req:req()) -&amp;gt; #{atom() =&amp;gt; any()} Parse the cookies and match specific values against constraints.
- 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.</description>
+Description match_cookies(Fields :: cowboy:fields(), Req :: cowboy_req:req()) -&amp;gt; #{atom() =&amp;gt; any()} Parse the cookies and match specific values against constraints.
+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.</description>
</item>
<item>
@@ -4250,8 +4462,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/manual/cowboy_req.match_cookies/</guid>
<description>Name cowboy_req:match_cookies - Match cookies against constraints
- Description match_cookies(Fields :: cowboy:fields(), Req :: cowboy_req:req()) -&amp;gt; #{atom() =&amp;gt; any()} Parse the cookies and match specific values against constraints.
- 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.</description>
+Description match_cookies(Fields :: cowboy:fields(), Req :: cowboy_req:req()) -&amp;gt; #{atom() =&amp;gt; any()} Parse the cookies and match specific values against constraints.
+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.</description>
</item>
<item>
@@ -4261,8 +4473,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/manual/cowboy_req.match_cookies/</guid>
<description>Name cowboy_req:match_cookies - Match cookies against constraints
- Description match_cookies(Fields :: cowboy:fields(), Req :: cowboy_req:req()) -&amp;gt; #{atom() =&amp;gt; any()} Parse the cookies and match specific values against constraints.
- 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.</description>
+Description match_cookies(Fields :: cowboy:fields(), Req :: cowboy_req:req()) -&amp;gt; #{atom() =&amp;gt; any()} Parse the cookies and match specific values against constraints.
+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.</description>
</item>
<item>
@@ -4272,8 +4484,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy_req.match_qs/</guid>
<description>Name cowboy_req:match_qs - Match the query string against constraints
- Description match_qs(Fields :: cowboy:fields(), Req :: cowboy_req:req()) -&amp;gt; #{atom() =&amp;gt; any()} Parse the query string and match specific values against constraints.
- 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.</description>
+Description match_qs(Fields :: cowboy:fields(), Req :: cowboy_req:req()) -&amp;gt; #{atom() =&amp;gt; any()} Parse the query string and match specific values against constraints.
+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.</description>
</item>
<item>
@@ -4283,8 +4495,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/manual/cowboy_req.match_qs/</guid>
<description>Name cowboy_req:match_qs - Match the query string against constraints
- Description match_qs(Fields :: cowboy:fields(), Req :: cowboy_req:req()) -&amp;gt; #{atom() =&amp;gt; any()} Parse the query string and match specific values against constraints.
- 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.</description>
+Description match_qs(Fields :: cowboy:fields(), Req :: cowboy_req:req()) -&amp;gt; #{atom() =&amp;gt; any()} Parse the query string and match specific values against constraints.
+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.</description>
</item>
<item>
@@ -4294,8 +4506,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/manual/cowboy_req.match_qs/</guid>
<description>Name cowboy_req:match_qs - Match the query string against constraints
- Description match_qs(Fields :: cowboy:fields(), Req :: cowboy_req:req()) -&amp;gt; #{atom() =&amp;gt; any()} Parse the query string and match specific values against constraints.
- 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.</description>
+Description match_qs(Fields :: cowboy:fields(), Req :: cowboy_req:req()) -&amp;gt; #{atom() =&amp;gt; any()} Parse the query string and match specific values against constraints.
+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.</description>
</item>
<item>
@@ -4305,8 +4517,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/manual/cowboy_req.match_qs/</guid>
<description>Name cowboy_req:match_qs - Match the query string against constraints
- Description match_qs(Fields :: cowboy:fields(), Req :: cowboy_req:req()) -&amp;gt; #{atom() =&amp;gt; any()} Parse the query string and match specific values against constraints.
- 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.</description>
+Description match_qs(Fields :: cowboy:fields(), Req :: cowboy_req:req()) -&amp;gt; #{atom() =&amp;gt; any()} Parse the query string and match specific values against constraints.
+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.</description>
</item>
<item>
@@ -4316,8 +4528,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/manual/cowboy_req.match_qs/</guid>
<description>Name cowboy_req:match_qs - Match the query string against constraints
- Description match_qs(Fields :: cowboy:fields(), Req :: cowboy_req:req()) -&amp;gt; #{atom() =&amp;gt; any()} Parse the query string and match specific values against constraints.
- 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.</description>
+Description match_qs(Fields :: cowboy:fields(), Req :: cowboy_req:req()) -&amp;gt; #{atom() =&amp;gt; any()} Parse the query string and match specific values against constraints.
+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.</description>
</item>
<item>
@@ -4327,9 +4539,11 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy_req.method/</guid>
<description>Name cowboy_req:method - HTTP method
- Description method(Req :: cowboy_req:req()) -&amp;gt; Method :: binary() Return the request&amp;#8217;s HTTP method.
- The method can also be obtained using pattern matching:
- #{method := Method} = Req. Arguments Req The Req object. Return value The request&amp;#8217;s HTTP method is returned as a binary string. While methods are case sensitive, standard methods are always uppercase.</description>
+Description method(Req :: cowboy_req:req()) -&amp;gt; Method :: binary() Return the request&amp;apos;s HTTP method.
+The method can also be obtained using pattern matching:
+#{method := Method} = Req. Arguments Req The Req object.
+ Return value The request&amp;apos;s HTTP method is returned as a binary string. While methods are case sensitive, standard methods are always uppercase.
+Changelog 2.0: Only the method is returned, it is no longer wrapped in a tuple.</description>
</item>
<item>
@@ -4339,9 +4553,11 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/manual/cowboy_req.method/</guid>
<description>Name cowboy_req:method - HTTP method
- Description method(Req :: cowboy_req:req()) -&amp;gt; Method :: binary() Return the request&amp;#8217;s HTTP method.
- The method can also be obtained using pattern matching:
- #{method := Method} = Req. Arguments Req The Req object. Return value The request&amp;#8217;s HTTP method is returned as a binary string. While methods are case sensitive, standard methods are always uppercase.</description>
+Description method(Req :: cowboy_req:req()) -&amp;gt; Method :: binary() Return the request&amp;apos;s HTTP method.
+The method can also be obtained using pattern matching:
+#{method := Method} = Req. Arguments Req The Req object.
+ Return value The request&amp;apos;s HTTP method is returned as a binary string. While methods are case sensitive, standard methods are always uppercase.
+Changelog 2.0: Only the method is returned, it is no longer wrapped in a tuple.</description>
</item>
<item>
@@ -4351,9 +4567,11 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/manual/cowboy_req.method/</guid>
<description>Name cowboy_req:method - HTTP method
- Description method(Req :: cowboy_req:req()) -&amp;gt; Method :: binary() Return the request&amp;#8217;s HTTP method.
- The method can also be obtained using pattern matching:
- #{method := Method} = Req. Arguments Req The Req object. Return value The request&amp;#8217;s HTTP method is returned as a binary string. While methods are case sensitive, standard methods are always uppercase.</description>
+Description method(Req :: cowboy_req:req()) -&amp;gt; Method :: binary() Return the request&amp;apos;s HTTP method.
+The method can also be obtained using pattern matching:
+#{method := Method} = Req. Arguments Req The Req object.
+ Return value The request&amp;apos;s HTTP method is returned as a binary string. While methods are case sensitive, standard methods are always uppercase.
+Changelog 2.0: Only the method is returned, it is no longer wrapped in a tuple.</description>
</item>
<item>
@@ -4363,9 +4581,11 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/manual/cowboy_req.method/</guid>
<description>Name cowboy_req:method - HTTP method
- Description method(Req :: cowboy_req:req()) -&amp;gt; Method :: binary() Return the request&amp;#8217;s HTTP method.
- The method can also be obtained using pattern matching:
- #{method := Method} = Req. Arguments Req The Req object. Return value The request&amp;#8217;s HTTP method is returned as a binary string. While methods are case sensitive, standard methods are always uppercase.</description>
+Description method(Req :: cowboy_req:req()) -&amp;gt; Method :: binary() Return the request&amp;apos;s HTTP method.
+The method can also be obtained using pattern matching:
+#{method := Method} = Req. Arguments Req The Req object.
+ Return value The request&amp;apos;s HTTP method is returned as a binary string. While methods are case sensitive, standard methods are always uppercase.
+Changelog 2.0: Only the method is returned, it is no longer wrapped in a tuple.</description>
</item>
<item>
@@ -4375,9 +4595,11 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/manual/cowboy_req.method/</guid>
<description>Name cowboy_req:method - HTTP method
- Description method(Req :: cowboy_req:req()) -&amp;gt; Method :: binary() Return the request&amp;#8217;s HTTP method.
- The method can also be obtained using pattern matching:
- #{method := Method} = Req. Arguments Req The Req object. Return value The request&amp;#8217;s HTTP method is returned as a binary string. While methods are case sensitive, standard methods are always uppercase.</description>
+Description method(Req :: cowboy_req:req()) -&amp;gt; Method :: binary() Return the request&amp;apos;s HTTP method.
+The method can also be obtained using pattern matching:
+#{method := Method} = Req. Arguments Req The Req object.
+ Return value The request&amp;apos;s HTTP method is returned as a binary string. While methods are case sensitive, standard methods are always uppercase.
+Changelog 2.0: Only the method is returned, it is no longer wrapped in a tuple.</description>
</item>
<item>
@@ -4387,11 +4609,12 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy_req.parse_cookies/</guid>
<description>Name cowboy_req:parse_cookies - Parse cookie headers
- Description parse_cookies(Req) -&amp;gt; [{Name, Value}] Name :: binary() %% case sensitive Value :: binary() %% case sensitive Parse cookie headers.
- Alias for cowboy_req:parse_header([cookie], Req).
- When the cookie header is missing, [] is returned.
- While an empty cookie header is not valid, some clients do send it. Cowboy will in this case also return [].
- Arguments Req The Req object.</description>
+Description parse_cookies(Req) -&amp;gt; [{Name, Value}] Name :: binary() %% case sensitive Value :: binary() %% case sensitive Parse cookie headers.
+Alias for cowboy_req:parse_header(&amp;lt;&amp;lt;&amp;quot;cookie&amp;quot;&amp;gt;&amp;gt;, Req).
+When the cookie header is missing, [] is returned.
+While an empty cookie header is not valid, some clients do send it. Cowboy will in this case also return [].
+Arguments Req The Req object.
+ Return value The cookies are returned as a list of key/values.</description>
</item>
<item>
@@ -4401,11 +4624,12 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/manual/cowboy_req.parse_cookies/</guid>
<description>Name cowboy_req:parse_cookies - Parse cookie headers
- Description parse_cookies(Req) -&amp;gt; [{Name, Value}] Name :: binary() %% case sensitive Value :: binary() %% case sensitive Parse cookie headers.
- Alias for cowboy_req:parse_header([cookie], Req).
- When the cookie header is missing, [] is returned.
- While an empty cookie header is not valid, some clients do send it. Cowboy will in this case also return [].
- Arguments Req The Req object.</description>
+Description parse_cookies(Req) -&amp;gt; [{Name, Value}] Name :: binary() %% case sensitive Value :: binary() %% case sensitive Parse cookie headers.
+Alias for cowboy_req:parse_header(&amp;lt;&amp;lt;&amp;quot;cookie&amp;quot;&amp;gt;&amp;gt;, Req).
+When the cookie header is missing, [] is returned.
+While an empty cookie header is not valid, some clients do send it. Cowboy will in this case also return [].
+Arguments Req The Req object.
+ Return value The cookies are returned as a list of key/values.</description>
</item>
<item>
@@ -4415,11 +4639,12 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/manual/cowboy_req.parse_cookies/</guid>
<description>Name cowboy_req:parse_cookies - Parse cookie headers
- Description parse_cookies(Req) -&amp;gt; [{Name, Value}] Name :: binary() %% case sensitive Value :: binary() %% case sensitive Parse cookie headers.
- Alias for cowboy_req:parse_header([cookie], Req).
- When the cookie header is missing, [] is returned.
- While an empty cookie header is not valid, some clients do send it. Cowboy will in this case also return [].
- Arguments Req The Req object.</description>
+Description parse_cookies(Req) -&amp;gt; [{Name, Value}] Name :: binary() %% case sensitive Value :: binary() %% case sensitive Parse cookie headers.
+Alias for cowboy_req:parse_header(&amp;lt;&amp;lt;&amp;quot;cookie&amp;quot;&amp;gt;&amp;gt;, Req).
+When the cookie header is missing, [] is returned.
+While an empty cookie header is not valid, some clients do send it. Cowboy will in this case also return [].
+Arguments Req The Req object.
+ Return value The cookies are returned as a list of key/values.</description>
</item>
<item>
@@ -4429,11 +4654,12 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/manual/cowboy_req.parse_cookies/</guid>
<description>Name cowboy_req:parse_cookies - Parse cookie headers
- Description parse_cookies(Req) -&amp;gt; [{Name, Value}] Name :: binary() %% case sensitive Value :: binary() %% case sensitive Parse cookie headers.
- Alias for cowboy_req:parse_header([cookie], Req).
- When the cookie header is missing, [] is returned.
- While an empty cookie header is not valid, some clients do send it. Cowboy will in this case also return [].
- Arguments Req The Req object.</description>
+Description parse_cookies(Req) -&amp;gt; [{Name, Value}] Name :: binary() %% case sensitive Value :: binary() %% case sensitive Parse cookie headers.
+Alias for cowboy_req:parse_header(&amp;lt;&amp;lt;&amp;quot;cookie&amp;quot;&amp;gt;&amp;gt;, Req).
+When the cookie header is missing, [] is returned.
+While an empty cookie header is not valid, some clients do send it. Cowboy will in this case also return [].
+Arguments Req The Req object.
+ Return value The cookies are returned as a list of key/values.</description>
</item>
<item>
@@ -4443,11 +4669,12 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/manual/cowboy_req.parse_cookies/</guid>
<description>Name cowboy_req:parse_cookies - Parse cookie headers
- Description parse_cookies(Req) -&amp;gt; [{Name, Value}] Name :: binary() %% case sensitive Value :: binary() %% case sensitive Parse cookie headers.
- Alias for cowboy_req:parse_header([cookie], Req).
- When the cookie header is missing, [] is returned.
- While an empty cookie header is not valid, some clients do send it. Cowboy will in this case also return [].
- Arguments Req The Req object.</description>
+Description parse_cookies(Req) -&amp;gt; [{Name, Value}] Name :: binary() %% case sensitive Value :: binary() %% case sensitive Parse cookie headers.
+Alias for cowboy_req:parse_header(&amp;lt;&amp;lt;&amp;quot;cookie&amp;quot;&amp;gt;&amp;gt;, Req).
+When the cookie header is missing, [] is returned.
+While an empty cookie header is not valid, some clients do send it. Cowboy will in this case also return [].
+Arguments Req The Req object.
+ Return value The cookies are returned as a list of key/values.</description>
</item>
<item>
@@ -4457,8 +4684,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy_req.parse_header/</guid>
<description>Name cowboy_req:parse_header - Parse the given HTTP header
- Description parse_header(Name, Req) -&amp;gt; ParsedValue | Default parse_header(Name, Req, Default) -&amp;gt; ParsedValue | Default Name :: binary() Req :: cowboy_req:req() ParsedValue :: any() Default :: any() Parse the given HTTP header.
- 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.</description>
+Description parse_header(Name, Req) -&amp;gt; ParsedValue | Default parse_header(Name, Req, Default) -&amp;gt; ParsedValue | Default Name :: binary() Req :: cowboy_req:req() ParsedValue :: any() Default :: any() Parse the given HTTP header.
+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.
+The type of the parsed value varies depending on the header.</description>
</item>
<item>
@@ -4468,8 +4696,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/manual/cowboy_req.parse_header/</guid>
<description>Name cowboy_req:parse_header - Parse the given HTTP header
- Description parse_header(Name, Req) -&amp;gt; ParsedValue | Default parse_header(Name, Req, Default) -&amp;gt; ParsedValue | Default Name :: binary() Req :: cowboy_req:req() ParsedValue :: any() Default :: any() Parse the given HTTP header.
- 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.</description>
+Description parse_header(Name, Req) -&amp;gt; ParsedValue | Default parse_header(Name, Req, Default) -&amp;gt; ParsedValue | Default Name :: binary() Req :: cowboy_req:req() ParsedValue :: any() Default :: any() Parse the given HTTP header.
+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.
+The type of the parsed value varies depending on the header.</description>
</item>
<item>
@@ -4479,8 +4708,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/manual/cowboy_req.parse_header/</guid>
<description>Name cowboy_req:parse_header - Parse the given HTTP header
- Description parse_header(Name, Req) -&amp;gt; ParsedValue | Default parse_header(Name, Req, Default) -&amp;gt; ParsedValue | Default Name :: binary() Req :: cowboy_req:req() ParsedValue :: any() Default :: any() Parse the given HTTP header.
- 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.</description>
+Description parse_header(Name, Req) -&amp;gt; ParsedValue | Default parse_header(Name, Req, Default) -&amp;gt; ParsedValue | Default Name :: binary() Req :: cowboy_req:req() ParsedValue :: any() Default :: any() Parse the given HTTP header.
+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.
+The type of the parsed value varies depending on the header.</description>
</item>
<item>
@@ -4490,8 +4720,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/manual/cowboy_req.parse_header/</guid>
<description>Name cowboy_req:parse_header - Parse the given HTTP header
- Description parse_header(Name, Req) -&amp;gt; ParsedValue | Default parse_header(Name, Req, Default) -&amp;gt; ParsedValue | Default Name :: binary() Req :: cowboy_req:req() ParsedValue :: any() Default :: any() Parse the given HTTP header.
- 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.</description>
+Description parse_header(Name, Req) -&amp;gt; ParsedValue | Default parse_header(Name, Req, Default) -&amp;gt; ParsedValue | Default Name :: binary() Req :: cowboy_req:req() ParsedValue :: any() Default :: any() Parse the given HTTP header.
+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.
+The type of the parsed value varies depending on the header.</description>
</item>
<item>
@@ -4501,8 +4732,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/manual/cowboy_req.parse_header/</guid>
<description>Name cowboy_req:parse_header - Parse the given HTTP header
- Description parse_header(Name, Req) -&amp;gt; ParsedValue | Default parse_header(Name, Req, Default) -&amp;gt; ParsedValue | Default Name :: binary() Req :: cowboy_req:req() ParsedValue :: any() Default :: any() Parse the given HTTP header.
- 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.</description>
+Description parse_header(Name, Req) -&amp;gt; ParsedValue | Default parse_header(Name, Req, Default) -&amp;gt; ParsedValue | Default Name :: binary() Req :: cowboy_req:req() ParsedValue :: any() Default :: any() Parse the given HTTP header.
+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.
+The type of the parsed value varies depending on the header.</description>
</item>
<item>
@@ -4512,8 +4744,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy_req.parse_qs/</guid>
<description>Name cowboy_req:parse_qs - Parse the query string
- Description parse_qs(Req :: cowboy_req:req()) -&amp;gt; [{Key :: binary(), Value :: binary() | true}] Parse the query string as a list of key/value pairs.
- Arguments Req The Req object. Return value The parsed query string is returned as a list of key/value pairs. The key is a binary string. The value is either a binary string, or the atom true.</description>
+Description parse_qs(Req :: cowboy_req:req()) -&amp;gt; [{Key :: binary(), Value :: binary() | true}] Parse the query string as a list of key/value pairs.
+Arguments Req The Req object.
+ Return value The parsed query string is returned as a list of key/value pairs. The key is a binary string. The value is either a binary string, or the atom true. Both key and value are case sensitive.</description>
</item>
<item>
@@ -4523,8 +4756,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/manual/cowboy_req.parse_qs/</guid>
<description>Name cowboy_req:parse_qs - Parse the query string
- Description parse_qs(Req :: cowboy_req:req()) -&amp;gt; [{Key :: binary(), Value :: binary() | true}] Parse the query string as a list of key/value pairs.
- Arguments Req The Req object. Return value The parsed query string is returned as a list of key/value pairs. The key is a binary string. The value is either a binary string, or the atom true.</description>
+Description parse_qs(Req :: cowboy_req:req()) -&amp;gt; [{Key :: binary(), Value :: binary() | true}] Parse the query string as a list of key/value pairs.
+Arguments Req The Req object.
+ Return value The parsed query string is returned as a list of key/value pairs. The key is a binary string. The value is either a binary string, or the atom true. Both key and value are case sensitive.</description>
</item>
<item>
@@ -4534,8 +4768,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/manual/cowboy_req.parse_qs/</guid>
<description>Name cowboy_req:parse_qs - Parse the query string
- Description parse_qs(Req :: cowboy_req:req()) -&amp;gt; [{Key :: binary(), Value :: binary() | true}] Parse the query string as a list of key/value pairs.
- Arguments Req The Req object. Return value The parsed query string is returned as a list of key/value pairs. The key is a binary string. The value is either a binary string, or the atom true.</description>
+Description parse_qs(Req :: cowboy_req:req()) -&amp;gt; [{Key :: binary(), Value :: binary() | true}] Parse the query string as a list of key/value pairs.
+Arguments Req The Req object.
+ Return value The parsed query string is returned as a list of key/value pairs. The key is a binary string. The value is either a binary string, or the atom true. Both key and value are case sensitive.</description>
</item>
<item>
@@ -4545,8 +4780,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/manual/cowboy_req.parse_qs/</guid>
<description>Name cowboy_req:parse_qs - Parse the query string
- Description parse_qs(Req :: cowboy_req:req()) -&amp;gt; [{Key :: binary(), Value :: binary() | true}] Parse the query string as a list of key/value pairs.
- Arguments Req The Req object. Return value The parsed query string is returned as a list of key/value pairs. The key is a binary string. The value is either a binary string, or the atom true.</description>
+Description parse_qs(Req :: cowboy_req:req()) -&amp;gt; [{Key :: binary(), Value :: binary() | true}] Parse the query string as a list of key/value pairs.
+Arguments Req The Req object.
+ Return value The parsed query string is returned as a list of key/value pairs. The key is a binary string. The value is either a binary string, or the atom true. Both key and value are case sensitive.</description>
</item>
<item>
@@ -4556,8 +4792,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/manual/cowboy_req.parse_qs/</guid>
<description>Name cowboy_req:parse_qs - Parse the query string
- Description parse_qs(Req :: cowboy_req:req()) -&amp;gt; [{Key :: binary(), Value :: binary() | true}] Parse the query string as a list of key/value pairs.
- Arguments Req The Req object. Return value The parsed query string is returned as a list of key/value pairs. The key is a binary string. The value is either a binary string, or the atom true.</description>
+Description parse_qs(Req :: cowboy_req:req()) -&amp;gt; [{Key :: binary(), Value :: binary() | true}] Parse the query string as a list of key/value pairs.
+Arguments Req The Req object.
+ Return value The parsed query string is returned as a list of key/value pairs. The key is a binary string. The value is either a binary string, or the atom true. Both key and value are case sensitive.</description>
</item>
<item>
@@ -4567,10 +4804,11 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy_req.path/</guid>
<description>Name cowboy_req:path - URI path
- Description path(Req :: cowboy_req:req()) -&amp;gt; Path :: binary() Return the path of the effective request URI.
- The path can also be obtained using pattern matching:
- #{path := Path} = Req. Arguments Req The Req object. Return value The path is returned as a binary string. It is case sensitive.
- Changelog 2.</description>
+Description path(Req :: cowboy_req:req()) -&amp;gt; Path :: binary() Return the path of the effective request URI.
+The path can also be obtained using pattern matching:
+#{path := Path} = Req. Arguments Req The Req object.
+ Return value The path is returned as a binary string. It is case sensitive.
+Changelog 2.0: Only the path is returned, it is no longer wrapped in a tuple.</description>
</item>
<item>
@@ -4580,10 +4818,11 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/manual/cowboy_req.path/</guid>
<description>Name cowboy_req:path - URI path
- Description path(Req :: cowboy_req:req()) -&amp;gt; Path :: binary() Return the path of the effective request URI.
- The path can also be obtained using pattern matching:
- #{path := Path} = Req. Arguments Req The Req object. Return value The path is returned as a binary string. It is case sensitive.
- Changelog 2.</description>
+Description path(Req :: cowboy_req:req()) -&amp;gt; Path :: binary() Return the path of the effective request URI.
+The path can also be obtained using pattern matching:
+#{path := Path} = Req. Arguments Req The Req object.
+ Return value The path is returned as a binary string. It is case sensitive.
+Changelog 2.0: Only the path is returned, it is no longer wrapped in a tuple.</description>
</item>
<item>
@@ -4593,10 +4832,11 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/manual/cowboy_req.path/</guid>
<description>Name cowboy_req:path - URI path
- Description path(Req :: cowboy_req:req()) -&amp;gt; Path :: binary() Return the path of the effective request URI.
- The path can also be obtained using pattern matching:
- #{path := Path} = Req. Arguments Req The Req object. Return value The path is returned as a binary string. It is case sensitive.
- Changelog 2.</description>
+Description path(Req :: cowboy_req:req()) -&amp;gt; Path :: binary() Return the path of the effective request URI.
+The path can also be obtained using pattern matching:
+#{path := Path} = Req. Arguments Req The Req object.
+ Return value The path is returned as a binary string. It is case sensitive.
+Changelog 2.0: Only the path is returned, it is no longer wrapped in a tuple.</description>
</item>
<item>
@@ -4606,10 +4846,11 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/manual/cowboy_req.path/</guid>
<description>Name cowboy_req:path - URI path
- Description path(Req :: cowboy_req:req()) -&amp;gt; Path :: binary() Return the path of the effective request URI.
- The path can also be obtained using pattern matching:
- #{path := Path} = Req. Arguments Req The Req object. Return value The path is returned as a binary string. It is case sensitive.
- Changelog 2.</description>
+Description path(Req :: cowboy_req:req()) -&amp;gt; Path :: binary() Return the path of the effective request URI.
+The path can also be obtained using pattern matching:
+#{path := Path} = Req. Arguments Req The Req object.
+ Return value The path is returned as a binary string. It is case sensitive.
+Changelog 2.0: Only the path is returned, it is no longer wrapped in a tuple.</description>
</item>
<item>
@@ -4619,10 +4860,11 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/manual/cowboy_req.path/</guid>
<description>Name cowboy_req:path - URI path
- Description path(Req :: cowboy_req:req()) -&amp;gt; Path :: binary() Return the path of the effective request URI.
- The path can also be obtained using pattern matching:
- #{path := Path} = Req. Arguments Req The Req object. Return value The path is returned as a binary string. It is case sensitive.
- Changelog 2.</description>
+Description path(Req :: cowboy_req:req()) -&amp;gt; Path :: binary() Return the path of the effective request URI.
+The path can also be obtained using pattern matching:
+#{path := Path} = Req. Arguments Req The Req object.
+ Return value The path is returned as a binary string. It is case sensitive.
+Changelog 2.0: Only the path is returned, it is no longer wrapped in a tuple.</description>
</item>
<item>
@@ -4631,10 +4873,12 @@
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy_req.path_info/</guid>
- <description>Name cowboy_req:path_info - Access the route&amp;#8217;s trailing path segments
- Description path_info(Req :: cowboy_req:req()) -&amp;gt; cowboy_router:tokens() Return the tokens for the trailing path segments.
- This is the part of the host name that was matched using the ... notation.
- Arguments Req The Req object. Return value The tokens are returned as a list of case sensitive binary strings.</description>
+ <description>Name cowboy_req:path_info - Access the route&amp;apos;s trailing path segments
+Description path_info(Req :: cowboy_req:req()) -&amp;gt; cowboy_router:tokens() Return the tokens for the trailing path segments.
+This is the part of the host name that was matched using the ... notation.
+Arguments Req The Req object.
+ Return value The tokens are returned as a list of case sensitive binary strings.
+Changelog 2.0: Only the tokens are returned, they are no longer wrapped in a tuple.</description>
</item>
<item>
@@ -4643,10 +4887,12 @@
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://ninenines.eu/docs/en/cowboy/2.1/manual/cowboy_req.path_info/</guid>
- <description>Name cowboy_req:path_info - Access the route&amp;#8217;s trailing path segments
- Description path_info(Req :: cowboy_req:req()) -&amp;gt; cowboy_router:tokens() Return the tokens for the trailing path segments.
- This is the part of the host name that was matched using the ... notation.
- Arguments Req The Req object. Return value The tokens are returned as a list of case sensitive binary strings.</description>
+ <description>Name cowboy_req:path_info - Access the route&amp;apos;s trailing path segments
+Description path_info(Req :: cowboy_req:req()) -&amp;gt; cowboy_router:tokens() Return the tokens for the trailing path segments.
+This is the part of the host name that was matched using the ... notation.
+Arguments Req The Req object.
+ Return value The tokens are returned as a list of case sensitive binary strings.
+Changelog 2.0: Only the tokens are returned, they are no longer wrapped in a tuple.</description>
</item>
<item>
@@ -4655,10 +4901,12 @@
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://ninenines.eu/docs/en/cowboy/2.2/manual/cowboy_req.path_info/</guid>
- <description>Name cowboy_req:path_info - Access the route&amp;#8217;s trailing path segments
- Description path_info(Req :: cowboy_req:req()) -&amp;gt; cowboy_router:tokens() Return the tokens for the trailing path segments.
- This is the part of the host name that was matched using the ... notation.
- Arguments Req The Req object. Return value The tokens are returned as a list of case sensitive binary strings.</description>
+ <description>Name cowboy_req:path_info - Access the route&amp;apos;s trailing path segments
+Description path_info(Req :: cowboy_req:req()) -&amp;gt; cowboy_router:tokens() Return the tokens for the trailing path segments.
+This is the part of the host name that was matched using the ... notation.
+Arguments Req The Req object.
+ Return value The tokens are returned as a list of case sensitive binary strings.
+Changelog 2.0: Only the tokens are returned, they are no longer wrapped in a tuple.</description>
</item>
<item>
@@ -4667,10 +4915,12 @@
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://ninenines.eu/docs/en/cowboy/2.3/manual/cowboy_req.path_info/</guid>
- <description>Name cowboy_req:path_info - Access the route&amp;#8217;s trailing path segments
- Description path_info(Req :: cowboy_req:req()) -&amp;gt; cowboy_router:tokens() Return the tokens for the trailing path segments.
- This is the part of the host name that was matched using the ... notation.
- Arguments Req The Req object. Return value The tokens are returned as a list of case sensitive binary strings.</description>
+ <description>Name cowboy_req:path_info - Access the route&amp;apos;s trailing path segments
+Description path_info(Req :: cowboy_req:req()) -&amp;gt; cowboy_router:tokens() Return the tokens for the trailing path segments.
+This is the part of the host name that was matched using the ... notation.
+Arguments Req The Req object.
+ Return value The tokens are returned as a list of case sensitive binary strings.
+Changelog 2.0: Only the tokens are returned, they are no longer wrapped in a tuple.</description>
</item>
<item>
@@ -4679,10 +4929,12 @@
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://ninenines.eu/docs/en/cowboy/2.4/manual/cowboy_req.path_info/</guid>
- <description>Name cowboy_req:path_info - Access the route&amp;#8217;s trailing path segments
- Description path_info(Req :: cowboy_req:req()) -&amp;gt; cowboy_router:tokens() Return the tokens for the trailing path segments.
- This is the part of the host name that was matched using the ... notation.
- Arguments Req The Req object. Return value The tokens are returned as a list of case sensitive binary strings.</description>
+ <description>Name cowboy_req:path_info - Access the route&amp;apos;s trailing path segments
+Description path_info(Req :: cowboy_req:req()) -&amp;gt; cowboy_router:tokens() Return the tokens for the trailing path segments.
+This is the part of the host name that was matched using the ... notation.
+Arguments Req The Req object.
+ Return value The tokens are returned as a list of case sensitive binary strings.
+Changelog 2.0: Only the tokens are returned, they are no longer wrapped in a tuple.</description>
</item>
<item>
@@ -4692,10 +4944,11 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy_req.peer/</guid>
<description>Name cowboy_req:peer - Peer address and port
- Description peer(Req :: cowboy_req:req()) -&amp;gt; Peer Peer :: {inet:ip_address(), inet:port_number()} Return the peer&amp;#8217;s IP address and port number.
- The peer can also be obtained using pattern matching:
- #{peer := {IP, Port}} = Req. Arguments Req The Req object. Return value The peer&amp;#8217;s IP address and port number.
- The peer is not necessarily the client&amp;#8217;s IP address and port.</description>
+Description peer(Req :: cowboy_req:req()) -&amp;gt; Peer Peer :: {inet:ip_address(), inet:port_number()} Return the peer&amp;apos;s IP address and port number.
+The peer can also be obtained using pattern matching:
+#{peer := {IP, Port}} = Req. Arguments Req The Req object.
+ Return value The peer&amp;apos;s IP address and port number.
+The peer is not necessarily the client&amp;apos;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.</description>
</item>
<item>
@@ -4705,9 +4958,11 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/manual/cowboy_req.peer/</guid>
<description>Name cowboy_req:peer - Peer address and port
- Description peer(Req :: cowboy_req:req()) -&amp;gt; Info Info :: {inet:ip_address(), inet:port_number()} Return the peer&amp;#8217;s IP address and port number.
- The peer information can also be obtained using pattern matching:
- #{peer := {IP, Port}} = Req. Arguments Req The Req object. Return value The peer&amp;#8217;s IP address and port number.</description>
+Description peer(Req :: cowboy_req:req()) -&amp;gt; Info Info :: {inet:ip_address(), inet:port_number()} Return the peer&amp;apos;s IP address and port number.
+The peer information can also be obtained using pattern matching:
+#{peer := {IP, Port}} = Req. Arguments Req The Req object.
+ Return value The peer&amp;apos;s IP address and port number.
+The peer is not necessarily the client&amp;apos;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.</description>
</item>
<item>
@@ -4717,9 +4972,11 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/manual/cowboy_req.peer/</guid>
<description>Name cowboy_req:peer - Peer address and port
- Description peer(Req :: cowboy_req:req()) -&amp;gt; Info Info :: {inet:ip_address(), inet:port_number()} Return the peer&amp;#8217;s IP address and port number.
- The peer information can also be obtained using pattern matching:
- #{peer := {IP, Port}} = Req. Arguments Req The Req object. Return value The peer&amp;#8217;s IP address and port number.</description>
+Description peer(Req :: cowboy_req:req()) -&amp;gt; Info Info :: {inet:ip_address(), inet:port_number()} Return the peer&amp;apos;s IP address and port number.
+The peer information can also be obtained using pattern matching:
+#{peer := {IP, Port}} = Req. Arguments Req The Req object.
+ Return value The peer&amp;apos;s IP address and port number.
+The peer is not necessarily the client&amp;apos;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.</description>
</item>
<item>
@@ -4729,9 +4986,11 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/manual/cowboy_req.peer/</guid>
<description>Name cowboy_req:peer - Peer address and port
- Description peer(Req :: cowboy_req:req()) -&amp;gt; Info Info :: {inet:ip_address(), inet:port_number()} Return the peer&amp;#8217;s IP address and port number.
- The peer information can also be obtained using pattern matching:
- #{peer := {IP, Port}} = Req. Arguments Req The Req object. Return value The peer&amp;#8217;s IP address and port number.</description>
+Description peer(Req :: cowboy_req:req()) -&amp;gt; Info Info :: {inet:ip_address(), inet:port_number()} Return the peer&amp;apos;s IP address and port number.
+The peer information can also be obtained using pattern matching:
+#{peer := {IP, Port}} = Req. Arguments Req The Req object.
+ Return value The peer&amp;apos;s IP address and port number.
+The peer is not necessarily the client&amp;apos;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.</description>
</item>
<item>
@@ -4741,9 +5000,11 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/manual/cowboy_req.peer/</guid>
<description>Name cowboy_req:peer - Peer address and port
- Description peer(Req :: cowboy_req:req()) -&amp;gt; Info Info :: {inet:ip_address(), inet:port_number()} Return the peer&amp;#8217;s IP address and port number.
- The peer information can also be obtained using pattern matching:
- #{peer := {IP, Port}} = Req. Arguments Req The Req object. Return value The peer&amp;#8217;s IP address and port number.</description>
+Description peer(Req :: cowboy_req:req()) -&amp;gt; Info Info :: {inet:ip_address(), inet:port_number()} Return the peer&amp;apos;s IP address and port number.
+The peer information can also be obtained using pattern matching:
+#{peer := {IP, Port}} = Req. Arguments Req The Req object.
+ Return value The peer&amp;apos;s IP address and port number.
+The peer is not necessarily the client&amp;apos;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.</description>
</item>
<item>
@@ -4753,10 +5014,10 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy_req.port/</guid>
<description>Name cowboy_req:port - URI port number
- Description port(Req :: cowboy_req:req()) -&amp;gt; Port :: inet:port_number() Return the port number of the effective request URI.
- 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.
- The port number can also be obtained using pattern matching:
- #{port := Port} = Req.</description>
+Description port(Req :: cowboy_req:req()) -&amp;gt; Port :: inet:port_number() Return the port number of the effective request URI.
+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.
+The port number can also be obtained using pattern matching:
+#{port := Port} = Req. Arguments Req The Req object.</description>
</item>
<item>
@@ -4766,10 +5027,10 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/manual/cowboy_req.port/</guid>
<description>Name cowboy_req:port - URI port number
- Description port(Req :: cowboy_req:req()) -&amp;gt; Port :: inet:port_number() Return the port number of the effective request URI.
- 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.
- The port number can also be obtained using pattern matching:
- #{port := Port} = Req.</description>
+Description port(Req :: cowboy_req:req()) -&amp;gt; Port :: inet:port_number() Return the port number of the effective request URI.
+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.
+The port number can also be obtained using pattern matching:
+#{port := Port} = Req. Arguments Req The Req object.</description>
</item>
<item>
@@ -4779,10 +5040,10 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/manual/cowboy_req.port/</guid>
<description>Name cowboy_req:port - URI port number
- Description port(Req :: cowboy_req:req()) -&amp;gt; Port :: inet:port_number() Return the port number of the effective request URI.
- 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.
- The port number can also be obtained using pattern matching:
- #{port := Port} = Req.</description>
+Description port(Req :: cowboy_req:req()) -&amp;gt; Port :: inet:port_number() Return the port number of the effective request URI.
+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.
+The port number can also be obtained using pattern matching:
+#{port := Port} = Req. Arguments Req The Req object.</description>
</item>
<item>
@@ -4792,10 +5053,10 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/manual/cowboy_req.port/</guid>
<description>Name cowboy_req:port - URI port number
- Description port(Req :: cowboy_req:req()) -&amp;gt; Port :: inet:port_number() Return the port number of the effective request URI.
- 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.
- The port number can also be obtained using pattern matching:
- #{port := Port} = Req.</description>
+Description port(Req :: cowboy_req:req()) -&amp;gt; Port :: inet:port_number() Return the port number of the effective request URI.
+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.
+The port number can also be obtained using pattern matching:
+#{port := Port} = Req. Arguments Req The Req object.</description>
</item>
<item>
@@ -4805,10 +5066,10 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/manual/cowboy_req.port/</guid>
<description>Name cowboy_req:port - URI port number
- Description port(Req :: cowboy_req:req()) -&amp;gt; Port :: inet:port_number() Return the port number of the effective request URI.
- 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.
- The port number can also be obtained using pattern matching:
- #{port := Port} = Req.</description>
+Description port(Req :: cowboy_req:req()) -&amp;gt; Port :: inet:port_number() Return the port number of the effective request URI.
+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.
+The port number can also be obtained using pattern matching:
+#{port := Port} = Req. Arguments Req The Req object.</description>
</item>
<item>
@@ -4818,8 +5079,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy_req.push/</guid>
<description>Name cowboy_req:push - Push a resource to the client
- Description push(Path, Headers, Req :: cowboy_req:req()) -&amp;gt; push(Path, Headers, Req, #{}) push(Path, Headers, Req :: cowboy_req:req(), Opts) -&amp;gt; ok Path :: iodata() %% case sensitive Headers :: cowboy:http_headers() Opts :: cowboy_req:push_opts() Push a resource to the client.
- Cowboy handles push requests the same way as if they came from the client, including the creation of a request handling process, routing and middlewares and so on.</description>
+Description push(Path, Headers, Req :: cowboy_req:req()) -&amp;gt; push(Path, Headers, Req, #{}) push(Path, Headers, Req :: cowboy_req:req(), Opts) -&amp;gt; ok Path :: iodata() %% case sensitive Headers :: cowboy:http_headers() Opts :: cowboy_req:push_opts() Push a resource to the client.
+Cowboy handles push requests the same way as if they came from the client, including the creation of a request handling process, routing and middlewares and so on.</description>
</item>
<item>
@@ -4829,8 +5090,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/manual/cowboy_req.push/</guid>
<description>Name cowboy_req:push - Push a resource to the client
- Description push(Path, Headers, Req :: cowboy_req:req()) -&amp;gt; push(Path, Headers, Req, #{}) push(Path, Headers, Req :: cowboy_req:req(), Opts) -&amp;gt; ok Path :: iodata() %% case sensitive Headers :: cowboy:http_headers() Opts :: cowboy_req:push_opts() Push a resource to the client.
- Cowboy handles push requests the same way as if they came from the client, including the creation of a request handling process, routing and middlewares and so on.</description>
+Description push(Path, Headers, Req :: cowboy_req:req()) -&amp;gt; push(Path, Headers, Req, #{}) push(Path, Headers, Req :: cowboy_req:req(), Opts) -&amp;gt; ok Path :: iodata() %% case sensitive Headers :: cowboy:http_headers() Opts :: cowboy_req:push_opts() Push a resource to the client.
+Cowboy handles push requests the same way as if they came from the client, including the creation of a request handling process, routing and middlewares and so on.</description>
</item>
<item>
@@ -4840,8 +5101,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/manual/cowboy_req.push/</guid>
<description>Name cowboy_req:push - Push a resource to the client
- Description push(Path, Headers, Req :: cowboy_req:req()) -&amp;gt; push(Path, Headers, Req, #{}) push(Path, Headers, Req :: cowboy_req:req(), Opts) -&amp;gt; ok Path :: iodata() %% case sensitive Headers :: cowboy:http_headers() Opts :: cowboy_req:push_opts() Push a resource to the client.
- Cowboy handles push requests the same way as if they came from the client, including the creation of a request handling process, routing and middlewares and so on.</description>
+Description push(Path, Headers, Req :: cowboy_req:req()) -&amp;gt; push(Path, Headers, Req, #{}) push(Path, Headers, Req :: cowboy_req:req(), Opts) -&amp;gt; ok Path :: iodata() %% case sensitive Headers :: cowboy:http_headers() Opts :: cowboy_req:push_opts() Push a resource to the client.
+Cowboy handles push requests the same way as if they came from the client, including the creation of a request handling process, routing and middlewares and so on.</description>
</item>
<item>
@@ -4851,8 +5112,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/manual/cowboy_req.push/</guid>
<description>Name cowboy_req:push - Push a resource to the client
- Description push(Path, Headers, Req :: cowboy_req:req()) -&amp;gt; push(Path, Headers, Req, #{}) push(Path, Headers, Req :: cowboy_req:req(), Opts) -&amp;gt; ok Path :: iodata() %% case sensitive Headers :: cowboy:http_headers() Opts :: cowboy_req:push_opts() Push a resource to the client.
- Cowboy handles push requests the same way as if they came from the client, including the creation of a request handling process, routing and middlewares and so on.</description>
+Description push(Path, Headers, Req :: cowboy_req:req()) -&amp;gt; push(Path, Headers, Req, #{}) push(Path, Headers, Req :: cowboy_req:req(), Opts) -&amp;gt; ok Path :: iodata() %% case sensitive Headers :: cowboy:http_headers() Opts :: cowboy_req:push_opts() Push a resource to the client.
+Cowboy handles push requests the same way as if they came from the client, including the creation of a request handling process, routing and middlewares and so on.</description>
</item>
<item>
@@ -4862,8 +5123,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/manual/cowboy_req.push/</guid>
<description>Name cowboy_req:push - Push a resource to the client
- Description push(Path, Headers, Req :: cowboy_req:req()) -&amp;gt; push(Path, Headers, Req, #{}) push(Path, Headers, Req :: cowboy_req:req(), Opts) -&amp;gt; ok Path :: iodata() %% case sensitive Headers :: cowboy:http_headers() Opts :: cowboy_req:push_opts() Push a resource to the client.
- Cowboy handles push requests the same way as if they came from the client, including the creation of a request handling process, routing and middlewares and so on.</description>
+Description push(Path, Headers, Req :: cowboy_req:req()) -&amp;gt; push(Path, Headers, Req, #{}) push(Path, Headers, Req :: cowboy_req:req(), Opts) -&amp;gt; ok Path :: iodata() %% case sensitive Headers :: cowboy:http_headers() Opts :: cowboy_req:push_opts() Push a resource to the client.
+Cowboy handles push requests the same way as if they came from the client, including the creation of a request handling process, routing and middlewares and so on.</description>
</item>
<item>
@@ -4873,9 +5134,11 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy_req.qs/</guid>
<description>Name cowboy_req:qs - URI query string
- Description qs(Req :: cowboy_req:req()) -&amp;gt; Qs :: binary() Return the query string of the effective request URI.
- The query string can also be obtained using pattern matching:
- #{qs := Qs} = Req. Arguments Req The Req object. Return value The query string is returned as a binary string. It is case sensitive.</description>
+Description qs(Req :: cowboy_req:req()) -&amp;gt; Qs :: binary() Return the query string of the effective request URI.
+The query string can also be obtained using pattern matching:
+#{qs := Qs} = Req. Arguments Req The Req object.
+ Return value The query string is returned as a binary string. It is case sensitive.
+Changelog 2.0: Only the query string is returned, it is no longer wrapped in a tuple.</description>
</item>
<item>
@@ -4885,9 +5148,11 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/manual/cowboy_req.qs/</guid>
<description>Name cowboy_req:qs - URI query string
- Description qs(Req :: cowboy_req:req()) -&amp;gt; Qs :: binary() Return the query string of the effective request URI.
- The query string can also be obtained using pattern matching:
- #{qs := Qs} = Req. Arguments Req The Req object. Return value The query string is returned as a binary string. It is case sensitive.</description>
+Description qs(Req :: cowboy_req:req()) -&amp;gt; Qs :: binary() Return the query string of the effective request URI.
+The query string can also be obtained using pattern matching:
+#{qs := Qs} = Req. Arguments Req The Req object.
+ Return value The query string is returned as a binary string. It is case sensitive.
+Changelog 2.0: Only the query string is returned, it is no longer wrapped in a tuple.</description>
</item>
<item>
@@ -4897,9 +5162,11 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/manual/cowboy_req.qs/</guid>
<description>Name cowboy_req:qs - URI query string
- Description qs(Req :: cowboy_req:req()) -&amp;gt; Qs :: binary() Return the query string of the effective request URI.
- The query string can also be obtained using pattern matching:
- #{qs := Qs} = Req. Arguments Req The Req object. Return value The query string is returned as a binary string. It is case sensitive.</description>
+Description qs(Req :: cowboy_req:req()) -&amp;gt; Qs :: binary() Return the query string of the effective request URI.
+The query string can also be obtained using pattern matching:
+#{qs := Qs} = Req. Arguments Req The Req object.
+ Return value The query string is returned as a binary string. It is case sensitive.
+Changelog 2.0: Only the query string is returned, it is no longer wrapped in a tuple.</description>
</item>
<item>
@@ -4909,9 +5176,11 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/manual/cowboy_req.qs/</guid>
<description>Name cowboy_req:qs - URI query string
- Description qs(Req :: cowboy_req:req()) -&amp;gt; Qs :: binary() Return the query string of the effective request URI.
- The query string can also be obtained using pattern matching:
- #{qs := Qs} = Req. Arguments Req The Req object. Return value The query string is returned as a binary string. It is case sensitive.</description>
+Description qs(Req :: cowboy_req:req()) -&amp;gt; Qs :: binary() Return the query string of the effective request URI.
+The query string can also be obtained using pattern matching:
+#{qs := Qs} = Req. Arguments Req The Req object.
+ Return value The query string is returned as a binary string. It is case sensitive.
+Changelog 2.0: Only the query string is returned, it is no longer wrapped in a tuple.</description>
</item>
<item>
@@ -4921,9 +5190,11 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/manual/cowboy_req.qs/</guid>
<description>Name cowboy_req:qs - URI query string
- Description qs(Req :: cowboy_req:req()) -&amp;gt; Qs :: binary() Return the query string of the effective request URI.
- The query string can also be obtained using pattern matching:
- #{qs := Qs} = Req. Arguments Req The Req object. Return value The query string is returned as a binary string. It is case sensitive.</description>
+Description qs(Req :: cowboy_req:req()) -&amp;gt; Qs :: binary() Return the query string of the effective request URI.
+The query string can also be obtained using pattern matching:
+#{qs := Qs} = Req. Arguments Req The Req object.
+ Return value The query string is returned as a binary string. It is case sensitive.
+Changelog 2.0: Only the query string is returned, it is no longer wrapped in a tuple.</description>
</item>
<item>
@@ -4933,8 +5204,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy_req.read_body/</guid>
<description>Name cowboy_req:read_body - Read the request body
- Description read_body(Req :: cowboy_req:req()) -&amp;gt; read_body(Req, #{}) read_body(Req :: cowboy_req:req(), Opts) -&amp;gt; {ok, Data :: binary(), Req} | {more, Data :: binary(), Req} Opts :: cowboy_req:read_body_opts() Read the request body.
- This function reads a chunk of the request body. A more tuple is returned when more data remains to be read. Call the function repeatedly until an ok tuple is returned to read the entire body.</description>
+Description read_body(Req :: cowboy_req:req()) -&amp;gt; read_body(Req, #{}) read_body(Req :: cowboy_req:req(), Opts) -&amp;gt; {ok, Data :: binary(), Req} | {more, Data :: binary(), Req} Opts :: cowboy_req:read_body_opts() Read the request body.
+This function reads a chunk of the request body. A more tuple is returned when more data remains to be read. Call the function repeatedly until an ok tuple is returned to read the entire body.</description>
</item>
<item>
@@ -4944,8 +5215,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/manual/cowboy_req.read_body/</guid>
<description>Name cowboy_req:read_body - Read the request body
- Description read_body(Req :: cowboy_req:req()) -&amp;gt; read_body(Req, #{}) read_body(Req :: cowboy_req:req(), Opts) -&amp;gt; {ok, Data :: binary(), Req} | {more, Data :: binary(), Req} Opts :: cowboy_req:read_body_opts() Read the request body.
- This function reads a chunk of the request body. A more tuple is returned when more data remains to be read. Call the function repeatedly until an ok tuple is returned to read the entire body.</description>
+Description read_body(Req :: cowboy_req:req()) -&amp;gt; read_body(Req, #{}) read_body(Req :: cowboy_req:req(), Opts) -&amp;gt; {ok, Data :: binary(), Req} | {more, Data :: binary(), Req} Opts :: cowboy_req:read_body_opts() Read the request body.
+This function reads a chunk of the request body. A more tuple is returned when more data remains to be read. Call the function repeatedly until an ok tuple is returned to read the entire body.</description>
</item>
<item>
@@ -4955,8 +5226,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/manual/cowboy_req.read_body/</guid>
<description>Name cowboy_req:read_body - Read the request body
- Description read_body(Req :: cowboy_req:req()) -&amp;gt; read_body(Req, #{}) read_body(Req :: cowboy_req:req(), Opts) -&amp;gt; {ok, Data :: binary(), Req} | {more, Data :: binary(), Req} Opts :: cowboy_req:read_body_opts() Read the request body.
- This function reads a chunk of the request body. A more tuple is returned when more data remains to be read. Call the function repeatedly until an ok tuple is returned to read the entire body.</description>
+Description read_body(Req :: cowboy_req:req()) -&amp;gt; read_body(Req, #{}) read_body(Req :: cowboy_req:req(), Opts) -&amp;gt; {ok, Data :: binary(), Req} | {more, Data :: binary(), Req} Opts :: cowboy_req:read_body_opts() Read the request body.
+This function reads a chunk of the request body. A more tuple is returned when more data remains to be read. Call the function repeatedly until an ok tuple is returned to read the entire body.</description>
</item>
<item>
@@ -4966,8 +5237,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/manual/cowboy_req.read_body/</guid>
<description>Name cowboy_req:read_body - Read the request body
- Description read_body(Req :: cowboy_req:req()) -&amp;gt; read_body(Req, #{}) read_body(Req :: cowboy_req:req(), Opts) -&amp;gt; {ok, Data :: binary(), Req} | {more, Data :: binary(), Req} Opts :: cowboy_req:read_body_opts() Read the request body.
- This function reads a chunk of the request body. A more tuple is returned when more data remains to be read. Call the function repeatedly until an ok tuple is returned to read the entire body.</description>
+Description read_body(Req :: cowboy_req:req()) -&amp;gt; read_body(Req, #{}) read_body(Req :: cowboy_req:req(), Opts) -&amp;gt; {ok, Data :: binary(), Req} | {more, Data :: binary(), Req} Opts :: cowboy_req:read_body_opts() Read the request body.
+This function reads a chunk of the request body. A more tuple is returned when more data remains to be read. Call the function repeatedly until an ok tuple is returned to read the entire body.</description>
</item>
<item>
@@ -4977,8 +5248,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/manual/cowboy_req.read_body/</guid>
<description>Name cowboy_req:read_body - Read the request body
- Description read_body(Req :: cowboy_req:req()) -&amp;gt; read_body(Req, #{}) read_body(Req :: cowboy_req:req(), Opts) -&amp;gt; {ok, Data :: binary(), Req} | {more, Data :: binary(), Req} Opts :: cowboy_req:read_body_opts() Read the request body.
- This function reads a chunk of the request body. A more tuple is returned when more data remains to be read. Call the function repeatedly until an ok tuple is returned to read the entire body.</description>
+Description read_body(Req :: cowboy_req:req()) -&amp;gt; read_body(Req, #{}) read_body(Req :: cowboy_req:req(), Opts) -&amp;gt; {ok, Data :: binary(), Req} | {more, Data :: binary(), Req} Opts :: cowboy_req:read_body_opts() Read the request body.
+This function reads a chunk of the request body. A more tuple is returned when more data remains to be read. Call the function repeatedly until an ok tuple is returned to read the entire body.</description>
</item>
<item>
@@ -4988,8 +5259,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy_req.read_part/</guid>
<description>Name cowboy_req:read_part - Read the next multipart headers
- Description read_part(Req :: cowboy_req:req()) -&amp;gt; read_part(Req, #{}) read_part(Req :: cowboy_req:req(), Opts) -&amp;gt; {ok, Headers, Req} | {done, Req} Opts :: cowboy_req:read_body_opts() Headers :: #{binary() =&amp;gt; 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 their own headers and body. This function parses and returns headers.</description>
+Description read_part(Req :: cowboy_req:req()) -&amp;gt; read_part(Req, #{}) read_part(Req :: cowboy_req:req(), Opts) -&amp;gt; {ok, Headers, Req} | {done, Req} Opts :: cowboy_req:read_body_opts() Headers :: #{binary() =&amp;gt; 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 their own headers and body. This function parses and returns headers.</description>
</item>
<item>
@@ -4999,8 +5270,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/manual/cowboy_req.read_part/</guid>
<description>Name cowboy_req:read_part - Read the next multipart headers
- Description read_part(Req :: cowboy_req:req()) -&amp;gt; read_part(Req, #{}) read_part(Req :: cowboy_req:req(), Opts) -&amp;gt; {ok, Headers, Req} | {done, Req} Opts :: cowboy_req:read_body_opts() Headers :: #{binary() =&amp;gt; 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 their own headers and body. This function parses and returns headers.</description>
+Description read_part(Req :: cowboy_req:req()) -&amp;gt; read_part(Req, #{}) read_part(Req :: cowboy_req:req(), Opts) -&amp;gt; {ok, Headers, Req} | {done, Req} Opts :: cowboy_req:read_body_opts() Headers :: #{binary() =&amp;gt; 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 their own headers and body. This function parses and returns headers.</description>
</item>
<item>
@@ -5010,8 +5281,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/manual/cowboy_req.read_part/</guid>
<description>Name cowboy_req:read_part - Read the next multipart headers
- Description read_part(Req :: cowboy_req:req()) -&amp;gt; read_part(Req, #{}) read_part(Req :: cowboy_req:req(), Opts) -&amp;gt; {ok, Headers, Req} | {done, Req} Opts :: cowboy_req:read_body_opts() Headers :: #{binary() =&amp;gt; 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 their own headers and body. This function parses and returns headers.</description>
+Description read_part(Req :: cowboy_req:req()) -&amp;gt; read_part(Req, #{}) read_part(Req :: cowboy_req:req(), Opts) -&amp;gt; {ok, Headers, Req} | {done, Req} Opts :: cowboy_req:read_body_opts() Headers :: #{binary() =&amp;gt; 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 their own headers and body. This function parses and returns headers.</description>
</item>
<item>
@@ -5021,8 +5292,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/manual/cowboy_req.read_part/</guid>
<description>Name cowboy_req:read_part - Read the next multipart headers
- Description read_part(Req :: cowboy_req:req()) -&amp;gt; read_part(Req, #{}) read_part(Req :: cowboy_req:req(), Opts) -&amp;gt; {ok, Headers, Req} | {done, Req} Opts :: cowboy_req:read_body_opts() Headers :: #{binary() =&amp;gt; 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 their own headers and body. This function parses and returns headers.</description>
+Description read_part(Req :: cowboy_req:req()) -&amp;gt; read_part(Req, #{}) read_part(Req :: cowboy_req:req(), Opts) -&amp;gt; {ok, Headers, Req} | {done, Req} Opts :: cowboy_req:read_body_opts() Headers :: #{binary() =&amp;gt; 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 their own headers and body. This function parses and returns headers.</description>
</item>
<item>
@@ -5032,8 +5303,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/manual/cowboy_req.read_part/</guid>
<description>Name cowboy_req:read_part - Read the next multipart headers
- Description read_part(Req :: cowboy_req:req()) -&amp;gt; read_part(Req, #{}) read_part(Req :: cowboy_req:req(), Opts) -&amp;gt; {ok, Headers, Req} | {done, Req} Opts :: cowboy_req:read_body_opts() Headers :: #{binary() =&amp;gt; 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 their own headers and body. This function parses and returns headers.</description>
+Description read_part(Req :: cowboy_req:req()) -&amp;gt; read_part(Req, #{}) read_part(Req :: cowboy_req:req(), Opts) -&amp;gt; {ok, Headers, Req} | {done, Req} Opts :: cowboy_req:read_body_opts() Headers :: #{binary() =&amp;gt; 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 their own headers and body. This function parses and returns headers.</description>
</item>
<item>
@@ -5042,9 +5313,9 @@
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy_req.read_part_body/</guid>
- <description>Name cowboy_req:read_part_body - Read the current part&amp;#8217;s body
- Description read_part_body(Req :: cowboy_req:req()) -&amp;gt; read_part_body(Req, #{}) read_part_body(Req :: cowboy_req:req(), Opts) -&amp;gt; {ok, Data :: binary(), Req} | {more, Data :: binary(), Req} Opts :: cowboy_req:read_body_opts() Read the body of the current part of the multipart message.
- This function reads the request body and parses it as multipart. Each parts of a multipart representation have their own headers and body.</description>
+ <description>Name cowboy_req:read_part_body - Read the current part&amp;apos;s body
+Description read_part_body(Req :: cowboy_req:req()) -&amp;gt; read_part_body(Req, #{}) read_part_body(Req :: cowboy_req:req(), Opts) -&amp;gt; {ok, Data :: binary(), Req} | {more, Data :: binary(), Req} Opts :: cowboy_req:read_body_opts() Read the body of the current part of the multipart message.
+This function reads the request body and parses it as multipart. Each parts of a multipart representation have their own headers and body. This function returns the body of the current part.</description>
</item>
<item>
@@ -5053,9 +5324,9 @@
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://ninenines.eu/docs/en/cowboy/2.1/manual/cowboy_req.read_part_body/</guid>
- <description>Name cowboy_req:read_part_body - Read the current part&amp;#8217;s body
- Description read_part_body(Req :: cowboy_req:req()) -&amp;gt; read_part_body(Req, #{}) read_part_body(Req :: cowboy_req:req(), Opts) -&amp;gt; {ok, Data :: binary(), Req} | {more, Data :: binary(), Req} Opts :: cowboy_req:read_body_opts() Read the body of the current part of the multipart message.
- This function reads the request body and parses it as multipart. Each parts of a multipart representation have their own headers and body.</description>
+ <description>Name cowboy_req:read_part_body - Read the current part&amp;apos;s body
+Description read_part_body(Req :: cowboy_req:req()) -&amp;gt; read_part_body(Req, #{}) read_part_body(Req :: cowboy_req:req(), Opts) -&amp;gt; {ok, Data :: binary(), Req} | {more, Data :: binary(), Req} Opts :: cowboy_req:read_body_opts() Read the body of the current part of the multipart message.
+This function reads the request body and parses it as multipart. Each parts of a multipart representation have their own headers and body. This function returns the body of the current part.</description>
</item>
<item>
@@ -5064,9 +5335,9 @@
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://ninenines.eu/docs/en/cowboy/2.2/manual/cowboy_req.read_part_body/</guid>
- <description>Name cowboy_req:read_part_body - Read the current part&amp;#8217;s body
- Description read_part_body(Req :: cowboy_req:req()) -&amp;gt; read_part_body(Req, #{}) read_part_body(Req :: cowboy_req:req(), Opts) -&amp;gt; {ok, Data :: binary(), Req} | {more, Data :: binary(), Req} Opts :: cowboy_req:read_body_opts() Read the body of the current part of the multipart message.
- This function reads the request body and parses it as multipart. Each parts of a multipart representation have their own headers and body.</description>
+ <description>Name cowboy_req:read_part_body - Read the current part&amp;apos;s body
+Description read_part_body(Req :: cowboy_req:req()) -&amp;gt; read_part_body(Req, #{}) read_part_body(Req :: cowboy_req:req(), Opts) -&amp;gt; {ok, Data :: binary(), Req} | {more, Data :: binary(), Req} Opts :: cowboy_req:read_body_opts() Read the body of the current part of the multipart message.
+This function reads the request body and parses it as multipart. Each parts of a multipart representation have their own headers and body. This function returns the body of the current part.</description>
</item>
<item>
@@ -5075,9 +5346,9 @@
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://ninenines.eu/docs/en/cowboy/2.3/manual/cowboy_req.read_part_body/</guid>
- <description>Name cowboy_req:read_part_body - Read the current part&amp;#8217;s body
- Description read_part_body(Req :: cowboy_req:req()) -&amp;gt; read_part_body(Req, #{}) read_part_body(Req :: cowboy_req:req(), Opts) -&amp;gt; {ok, Data :: binary(), Req} | {more, Data :: binary(), Req} Opts :: cowboy_req:read_body_opts() Read the body of the current part of the multipart message.
- This function reads the request body and parses it as multipart. Each parts of a multipart representation have their own headers and body.</description>
+ <description>Name cowboy_req:read_part_body - Read the current part&amp;apos;s body
+Description read_part_body(Req :: cowboy_req:req()) -&amp;gt; read_part_body(Req, #{}) read_part_body(Req :: cowboy_req:req(), Opts) -&amp;gt; {ok, Data :: binary(), Req} | {more, Data :: binary(), Req} Opts :: cowboy_req:read_body_opts() Read the body of the current part of the multipart message.
+This function reads the request body and parses it as multipart. Each parts of a multipart representation have their own headers and body. This function returns the body of the current part.</description>
</item>
<item>
@@ -5086,9 +5357,9 @@
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://ninenines.eu/docs/en/cowboy/2.4/manual/cowboy_req.read_part_body/</guid>
- <description>Name cowboy_req:read_part_body - Read the current part&amp;#8217;s body
- Description read_part_body(Req :: cowboy_req:req()) -&amp;gt; read_part_body(Req, #{}) read_part_body(Req :: cowboy_req:req(), Opts) -&amp;gt; {ok, Data :: binary(), Req} | {more, Data :: binary(), Req} Opts :: cowboy_req:read_body_opts() Read the body of the current part of the multipart message.
- This function reads the request body and parses it as multipart. Each parts of a multipart representation have their own headers and body.</description>
+ <description>Name cowboy_req:read_part_body - Read the current part&amp;apos;s body
+Description read_part_body(Req :: cowboy_req:req()) -&amp;gt; read_part_body(Req, #{}) read_part_body(Req :: cowboy_req:req(), Opts) -&amp;gt; {ok, Data :: binary(), Req} | {more, Data :: binary(), Req} Opts :: cowboy_req:read_body_opts() Read the body of the current part of the multipart message.
+This function reads the request body and parses it as multipart. Each parts of a multipart representation have their own headers and body. This function returns the body of the current part.</description>
</item>
<item>
@@ -5098,9 +5369,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy_req.read_urlencoded_body/</guid>
<description>Name cowboy_req:read_urlencoded_body - Read and parse a urlencoded request body
- Description read_urlencoded_body(Req :: cowboy_req:req()) -&amp;gt; read_urlencoded_body(Req, #{}) read_urlencoded_body(Req :: cowboy_req:req(), Opts) -&amp;gt; {ok, Body, Req} Opts :: cowboy_req:read_body_opts() Body :: [{Key :: binary(), Value :: binary() | true}] Read and parse a urlencoded request body.
- This function reads the request body and parses it as application/x-www-form-urlencoded. It returns a list of key/values.
- The urlencoded media type is used by Web browsers when submitting HTML forms using the POST method.</description>
+Description read_urlencoded_body(Req :: cowboy_req:req()) -&amp;gt; read_urlencoded_body(Req, #{}) read_urlencoded_body(Req :: cowboy_req:req(), Opts) -&amp;gt; {ok, Body, Req} Opts :: cowboy_req:read_body_opts() Body :: [{Key :: binary(), Value :: binary() | true}] Read and parse a urlencoded request body.
+This function reads the request body and parses it as application/x-www-form-urlencoded. It returns a list of key/values.
+The urlencoded media type is used by Web browsers when submitting HTML forms using the POST method.</description>
</item>
<item>
@@ -5110,9 +5381,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/manual/cowboy_req.read_urlencoded_body/</guid>
<description>Name cowboy_req:read_urlencoded_body - Read and parse a urlencoded request body
- Description read_urlencoded_body(Req :: cowboy_req:req()) -&amp;gt; read_urlencoded_body(Req, #{}) read_urlencoded_body(Req :: cowboy_req:req(), Opts) -&amp;gt; {ok, Body, Req} Opts :: cowboy_req:read_body_opts() Body :: [{Key :: binary(), Value :: binary() | true}] Read and parse a urlencoded request body.
- This function reads the request body and parses it as application/x-www-form-urlencoded. It returns a list of key/values.
- The urlencoded media type is used by Web browsers when submitting HTML forms using the POST method.</description>
+Description read_urlencoded_body(Req :: cowboy_req:req()) -&amp;gt; read_urlencoded_body(Req, #{}) read_urlencoded_body(Req :: cowboy_req:req(), Opts) -&amp;gt; {ok, Body, Req} Opts :: cowboy_req:read_body_opts() Body :: [{Key :: binary(), Value :: binary() | true}] Read and parse a urlencoded request body.
+This function reads the request body and parses it as application/x-www-form-urlencoded. It returns a list of key/values.
+The urlencoded media type is used by Web browsers when submitting HTML forms using the POST method.</description>
</item>
<item>
@@ -5122,9 +5393,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/manual/cowboy_req.read_urlencoded_body/</guid>
<description>Name cowboy_req:read_urlencoded_body - Read and parse a urlencoded request body
- Description read_urlencoded_body(Req :: cowboy_req:req()) -&amp;gt; read_urlencoded_body(Req, #{}) read_urlencoded_body(Req :: cowboy_req:req(), Opts) -&amp;gt; {ok, Body, Req} Opts :: cowboy_req:read_body_opts() Body :: [{Key :: binary(), Value :: binary() | true}] Read and parse a urlencoded request body.
- This function reads the request body and parses it as application/x-www-form-urlencoded. It returns a list of key/values.
- The urlencoded media type is used by Web browsers when submitting HTML forms using the POST method.</description>
+Description read_urlencoded_body(Req :: cowboy_req:req()) -&amp;gt; read_urlencoded_body(Req, #{}) read_urlencoded_body(Req :: cowboy_req:req(), Opts) -&amp;gt; {ok, Body, Req} Opts :: cowboy_req:read_body_opts() Body :: [{Key :: binary(), Value :: binary() | true}] Read and parse a urlencoded request body.
+This function reads the request body and parses it as application/x-www-form-urlencoded. It returns a list of key/values.
+The urlencoded media type is used by Web browsers when submitting HTML forms using the POST method.</description>
</item>
<item>
@@ -5134,9 +5405,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/manual/cowboy_req.read_urlencoded_body/</guid>
<description>Name cowboy_req:read_urlencoded_body - Read and parse a urlencoded request body
- Description read_urlencoded_body(Req :: cowboy_req:req()) -&amp;gt; read_urlencoded_body(Req, #{}) read_urlencoded_body(Req :: cowboy_req:req(), Opts) -&amp;gt; {ok, Body, Req} Opts :: cowboy_req:read_body_opts() Body :: [{Key :: binary(), Value :: binary() | true}] Read and parse a urlencoded request body.
- This function reads the request body and parses it as application/x-www-form-urlencoded. It returns a list of key/values.
- The urlencoded media type is used by Web browsers when submitting HTML forms using the POST method.</description>
+Description read_urlencoded_body(Req :: cowboy_req:req()) -&amp;gt; read_urlencoded_body(Req, #{}) read_urlencoded_body(Req :: cowboy_req:req(), Opts) -&amp;gt; {ok, Body, Req} Opts :: cowboy_req:read_body_opts() Body :: [{Key :: binary(), Value :: binary() | true}] Read and parse a urlencoded request body.
+This function reads the request body and parses it as application/x-www-form-urlencoded. It returns a list of key/values.
+The urlencoded media type is used by Web browsers when submitting HTML forms using the POST method.</description>
</item>
<item>
@@ -5146,9 +5417,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/manual/cowboy_req.read_urlencoded_body/</guid>
<description>Name cowboy_req:read_urlencoded_body - Read and parse a urlencoded request body
- Description read_urlencoded_body(Req :: cowboy_req:req()) -&amp;gt; read_urlencoded_body(Req, #{}) read_urlencoded_body(Req :: cowboy_req:req(), Opts) -&amp;gt; {ok, Body, Req} Opts :: cowboy_req:read_body_opts() Body :: [{Key :: binary(), Value :: binary() | true}] Read and parse a urlencoded request body.
- This function reads the request body and parses it as application/x-www-form-urlencoded. It returns a list of key/values.
- The urlencoded media type is used by Web browsers when submitting HTML forms using the POST method.</description>
+Description read_urlencoded_body(Req :: cowboy_req:req()) -&amp;gt; read_urlencoded_body(Req, #{}) read_urlencoded_body(Req :: cowboy_req:req(), Opts) -&amp;gt; {ok, Body, Req} Opts :: cowboy_req:read_body_opts() Body :: [{Key :: binary(), Value :: binary() | true}] Read and parse a urlencoded request body.
+This function reads the request body and parses it as application/x-www-form-urlencoded. It returns a list of key/values.
+The urlencoded media type is used by Web browsers when submitting HTML forms using the POST method.</description>
</item>
<item>
@@ -5158,8 +5429,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy_req.reply/</guid>
<description>Name cowboy_req:reply - Send the response
- Description reply(Status, Req :: cowboy_req:req()) -&amp;gt; reply(StatusCode, #{}, Req) reply(Status, Headers, Req :: cowboy_req:req()) -&amp;gt; Req reply(Status, Headers, Body, Req :: cowboy_req:req()) -&amp;gt; Req Status :: cowboy:http_status() Headers :: cowboy:http_headers() Body :: cowboy_req:resp_body() Send the response.
- The header names must be given as lowercase binary strings. While header names are case insensitive, Cowboy requires them to be given as lowercase to function properly.</description>
+Description reply(Status, Req :: cowboy_req:req()) -&amp;gt; reply(StatusCode, #{}, Req) reply(Status, Headers, Req :: cowboy_req:req()) -&amp;gt; Req reply(Status, Headers, Body, Req :: cowboy_req:req()) -&amp;gt; Req Status :: cowboy:http_status() Headers :: cowboy:http_headers() Body :: cowboy_req:resp_body() Send the response.
+The header names must be given as lowercase binary strings. While header names are case insensitive, Cowboy requires them to be given as lowercase to function properly.</description>
</item>
<item>
@@ -5169,8 +5440,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/manual/cowboy_req.reply/</guid>
<description>Name cowboy_req:reply - Send the response
- Description reply(Status, Req :: cowboy_req:req()) -&amp;gt; reply(StatusCode, #{}, Req) reply(Status, Headers, Req :: cowboy_req:req()) -&amp;gt; Req reply(Status, Headers, Body, Req :: cowboy_req:req()) -&amp;gt; Req Status :: cowboy:http_status() Headers :: cowboy:http_headers() Body :: cowboy_req:resp_body() Send the response.
- The header names must be given as lowercase binary strings. While header names are case insensitive, Cowboy requires them to be given as lowercase to function properly.</description>
+Description reply(Status, Req :: cowboy_req:req()) -&amp;gt; reply(StatusCode, #{}, Req) reply(Status, Headers, Req :: cowboy_req:req()) -&amp;gt; Req reply(Status, Headers, Body, Req :: cowboy_req:req()) -&amp;gt; Req Status :: cowboy:http_status() Headers :: cowboy:http_headers() Body :: cowboy_req:resp_body() Send the response.
+The header names must be given as lowercase binary strings. While header names are case insensitive, Cowboy requires them to be given as lowercase to function properly.</description>
</item>
<item>
@@ -5180,8 +5451,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/manual/cowboy_req.reply/</guid>
<description>Name cowboy_req:reply - Send the response
- Description reply(Status, Req :: cowboy_req:req()) -&amp;gt; reply(StatusCode, #{}, Req) reply(Status, Headers, Req :: cowboy_req:req()) -&amp;gt; Req reply(Status, Headers, Body, Req :: cowboy_req:req()) -&amp;gt; Req Status :: cowboy:http_status() Headers :: cowboy:http_headers() Body :: cowboy_req:resp_body() Send the response.
- The header names must be given as lowercase binary strings. While header names are case insensitive, Cowboy requires them to be given as lowercase to function properly.</description>
+Description reply(Status, Req :: cowboy_req:req()) -&amp;gt; reply(StatusCode, #{}, Req) reply(Status, Headers, Req :: cowboy_req:req()) -&amp;gt; Req reply(Status, Headers, Body, Req :: cowboy_req:req()) -&amp;gt; Req Status :: cowboy:http_status() Headers :: cowboy:http_headers() Body :: cowboy_req:resp_body() Send the response.
+The header names must be given as lowercase binary strings. While header names are case insensitive, Cowboy requires them to be given as lowercase to function properly.</description>
</item>
<item>
@@ -5191,8 +5462,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/manual/cowboy_req.reply/</guid>
<description>Name cowboy_req:reply - Send the response
- Description reply(Status, Req :: cowboy_req:req()) -&amp;gt; reply(StatusCode, #{}, Req) reply(Status, Headers, Req :: cowboy_req:req()) -&amp;gt; Req reply(Status, Headers, Body, Req :: cowboy_req:req()) -&amp;gt; Req Status :: cowboy:http_status() Headers :: cowboy:http_headers() Body :: cowboy_req:resp_body() Send the response.
- The header names must be given as lowercase binary strings. While header names are case insensitive, Cowboy requires them to be given as lowercase to function properly.</description>
+Description reply(Status, Req :: cowboy_req:req()) -&amp;gt; reply(StatusCode, #{}, Req) reply(Status, Headers, Req :: cowboy_req:req()) -&amp;gt; Req reply(Status, Headers, Body, Req :: cowboy_req:req()) -&amp;gt; Req Status :: cowboy:http_status() Headers :: cowboy:http_headers() Body :: cowboy_req:resp_body() Send the response.
+The header names must be given as lowercase binary strings. While header names are case insensitive, Cowboy requires them to be given as lowercase to function properly.</description>
</item>
<item>
@@ -5202,8 +5473,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/manual/cowboy_req.reply/</guid>
<description>Name cowboy_req:reply - Send the response
- Description reply(Status, Req :: cowboy_req:req()) -&amp;gt; reply(StatusCode, #{}, Req) reply(Status, Headers, Req :: cowboy_req:req()) -&amp;gt; Req reply(Status, Headers, Body, Req :: cowboy_req:req()) -&amp;gt; Req Status :: cowboy:http_status() Headers :: cowboy:http_headers() Body :: cowboy_req:resp_body() Send the response.
- The header names must be given as lowercase binary strings. While header names are case insensitive, Cowboy requires them to be given as lowercase to function properly.</description>
+Description reply(Status, Req :: cowboy_req:req()) -&amp;gt; reply(StatusCode, #{}, Req) reply(Status, Headers, Req :: cowboy_req:req()) -&amp;gt; Req reply(Status, Headers, Body, Req :: cowboy_req:req()) -&amp;gt; Req Status :: cowboy:http_status() Headers :: cowboy:http_headers() Body :: cowboy_req:resp_body() Send the response.
+The header names must be given as lowercase binary strings. While header names are case insensitive, Cowboy requires them to be given as lowercase to function properly.</description>
</item>
<item>
@@ -5213,9 +5484,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy_req.resp_header/</guid>
<description>Name cowboy_req:resp_header - Response header
- Description resp_header(Name, Req) -&amp;gt; resp_header(Name, Req, undefined) resp_header(Name, Req, Default) -&amp;gt; binary() | Default Name :: binary() %% lowercase; case insensitive Req :: cowboy_req:req() Default :: any() Return the value for the given response header.
- The response header must have been set previously using cowboy_req:set_resp_header(3) or cowboy_req:set_resp_headers(3).
- 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.</description>
+Description resp_header(Name, Req) -&amp;gt; resp_header(Name, Req, undefined) resp_header(Name, Req, Default) -&amp;gt; binary() | Default Name :: binary() %% lowercase; case insensitive Req :: cowboy_req:req() Default :: any() Return the value for the given response header.
+The response header must have been set previously using cowboy_req:set_resp_header(3) or cowboy_req:set_resp_headers(3).
+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.</description>
</item>
<item>
@@ -5225,9 +5496,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/manual/cowboy_req.resp_header/</guid>
<description>Name cowboy_req:resp_header - Response header
- Description resp_header(Name, Req) -&amp;gt; resp_header(Name, Req, undefined) resp_header(Name, Req, Default) -&amp;gt; binary() | Default Name :: binary() %% lowercase; case insensitive Req :: cowboy_req:req() Default :: any() Return the value for the given response header.
- The response header must have been set previously using cowboy_req:set_resp_header(3) or cowboy_req:set_resp_headers(3).
- 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.</description>
+Description resp_header(Name, Req) -&amp;gt; resp_header(Name, Req, undefined) resp_header(Name, Req, Default) -&amp;gt; binary() | Default Name :: binary() %% lowercase; case insensitive Req :: cowboy_req:req() Default :: any() Return the value for the given response header.
+The response header must have been set previously using cowboy_req:set_resp_header(3) or cowboy_req:set_resp_headers(3).
+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.</description>
</item>
<item>
@@ -5237,9 +5508,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/manual/cowboy_req.resp_header/</guid>
<description>Name cowboy_req:resp_header - Response header
- Description resp_header(Name, Req) -&amp;gt; resp_header(Name, Req, undefined) resp_header(Name, Req, Default) -&amp;gt; binary() | Default Name :: binary() %% lowercase; case insensitive Req :: cowboy_req:req() Default :: any() Return the value for the given response header.
- The response header must have been set previously using cowboy_req:set_resp_header(3) or cowboy_req:set_resp_headers(3).
- 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.</description>
+Description resp_header(Name, Req) -&amp;gt; resp_header(Name, Req, undefined) resp_header(Name, Req, Default) -&amp;gt; binary() | Default Name :: binary() %% lowercase; case insensitive Req :: cowboy_req:req() Default :: any() Return the value for the given response header.
+The response header must have been set previously using cowboy_req:set_resp_header(3) or cowboy_req:set_resp_headers(3).
+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.</description>
</item>
<item>
@@ -5249,9 +5520,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/manual/cowboy_req.resp_header/</guid>
<description>Name cowboy_req:resp_header - Response header
- Description resp_header(Name, Req) -&amp;gt; resp_header(Name, Req, undefined) resp_header(Name, Req, Default) -&amp;gt; binary() | Default Name :: binary() %% lowercase; case insensitive Req :: cowboy_req:req() Default :: any() Return the value for the given response header.
- The response header must have been set previously using cowboy_req:set_resp_header(3) or cowboy_req:set_resp_headers(3).
- 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.</description>
+Description resp_header(Name, Req) -&amp;gt; resp_header(Name, Req, undefined) resp_header(Name, Req, Default) -&amp;gt; binary() | Default Name :: binary() %% lowercase; case insensitive Req :: cowboy_req:req() Default :: any() Return the value for the given response header.
+The response header must have been set previously using cowboy_req:set_resp_header(3) or cowboy_req:set_resp_headers(3).
+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.</description>
</item>
<item>
@@ -5261,9 +5532,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/manual/cowboy_req.resp_header/</guid>
<description>Name cowboy_req:resp_header - Response header
- Description resp_header(Name, Req) -&amp;gt; resp_header(Name, Req, undefined) resp_header(Name, Req, Default) -&amp;gt; binary() | Default Name :: binary() %% lowercase; case insensitive Req :: cowboy_req:req() Default :: any() Return the value for the given response header.
- The response header must have been set previously using cowboy_req:set_resp_header(3) or cowboy_req:set_resp_headers(3).
- 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.</description>
+Description resp_header(Name, Req) -&amp;gt; resp_header(Name, Req, undefined) resp_header(Name, Req, Default) -&amp;gt; binary() | Default Name :: binary() %% lowercase; case insensitive Req :: cowboy_req:req() Default :: any() Return the value for the given response header.
+The response header must have been set previously using cowboy_req:set_resp_header(3) or cowboy_req:set_resp_headers(3).
+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.</description>
</item>
<item>
@@ -5273,9 +5544,10 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy_req.resp_headers/</guid>
<description>Name cowboy_req:resp_headers - Response headers
- Description resp_headers(Req :: cowboy_req:req()) -&amp;gt; cowboy:http_headers() Return all response headers.
- Arguments Req The Req object. Return value Headers are returned as a map with keys being lowercase binary strings, and values as binary strings.
- Changelog 2.0: Function introduced. Examples Get all response headers Headers = cowboy_req:resp_headers(Req).</description>
+Description resp_headers(Req :: cowboy_req:req()) -&amp;gt; cowboy:http_headers() Return all response headers.
+Arguments Req The Req object.
+ Return value Headers are returned as a map with keys being lowercase binary strings, and values as binary strings.
+Changelog 2.0: Function introduced. Examples Get all response headers Headers = cowboy_req:resp_headers(Req). See also cowboy_req(3), cowboy_req:resp_header(3), cowboy_req:set_resp_header(3), cowboy_req:set_resp_headers(3)</description>
</item>
<item>
@@ -5285,9 +5557,10 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/manual/cowboy_req.resp_headers/</guid>
<description>Name cowboy_req:resp_headers - Response headers
- Description resp_headers(Req :: cowboy_req:req()) -&amp;gt; cowboy:http_headers() Return all response headers.
- Arguments Req The Req object. Return value Headers are returned as a map with keys being lowercase binary strings, and values as binary strings.
- Changelog 2.0: Function introduced. Examples Get all response headers Headers = cowboy_req:resp_headers(Req).</description>
+Description resp_headers(Req :: cowboy_req:req()) -&amp;gt; cowboy:http_headers() Return all response headers.
+Arguments Req The Req object.
+ Return value Headers are returned as a map with keys being lowercase binary strings, and values as binary strings.
+Changelog 2.0: Function introduced. Examples Get all response headers Headers = cowboy_req:resp_headers(Req). See also cowboy_req(3), cowboy_req:resp_header(3), cowboy_req:set_resp_header(3), cowboy_req:set_resp_headers(3)</description>
</item>
<item>
@@ -5297,9 +5570,10 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/manual/cowboy_req.resp_headers/</guid>
<description>Name cowboy_req:resp_headers - Response headers
- Description resp_headers(Req :: cowboy_req:req()) -&amp;gt; cowboy:http_headers() Return all response headers.
- Arguments Req The Req object. Return value Headers are returned as a map with keys being lowercase binary strings, and values as binary strings.
- Changelog 2.0: Function introduced. Examples Get all response headers Headers = cowboy_req:resp_headers(Req).</description>
+Description resp_headers(Req :: cowboy_req:req()) -&amp;gt; cowboy:http_headers() Return all response headers.
+Arguments Req The Req object.
+ Return value Headers are returned as a map with keys being lowercase binary strings, and values as binary strings.
+Changelog 2.0: Function introduced. Examples Get all response headers Headers = cowboy_req:resp_headers(Req). See also cowboy_req(3), cowboy_req:resp_header(3), cowboy_req:set_resp_header(3), cowboy_req:set_resp_headers(3)</description>
</item>
<item>
@@ -5309,9 +5583,10 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/manual/cowboy_req.resp_headers/</guid>
<description>Name cowboy_req:resp_headers - Response headers
- Description resp_headers(Req :: cowboy_req:req()) -&amp;gt; cowboy:http_headers() Return all response headers.
- Arguments Req The Req object. Return value Headers are returned as a map with keys being lowercase binary strings, and values as binary strings.
- Changelog 2.0: Function introduced. Examples Get all response headers Headers = cowboy_req:resp_headers(Req).</description>
+Description resp_headers(Req :: cowboy_req:req()) -&amp;gt; cowboy:http_headers() Return all response headers.
+Arguments Req The Req object.
+ Return value Headers are returned as a map with keys being lowercase binary strings, and values as binary strings.
+Changelog 2.0: Function introduced. Examples Get all response headers Headers = cowboy_req:resp_headers(Req). See also cowboy_req(3), cowboy_req:resp_header(3), cowboy_req:set_resp_header(3), cowboy_req:set_resp_headers(3)</description>
</item>
<item>
@@ -5321,9 +5596,10 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/manual/cowboy_req.resp_headers/</guid>
<description>Name cowboy_req:resp_headers - Response headers
- Description resp_headers(Req :: cowboy_req:req()) -&amp;gt; cowboy:http_headers() Return all response headers.
- Arguments Req The Req object. Return value Headers are returned as a map with keys being lowercase binary strings, and values as binary strings.
- Changelog 2.0: Function introduced. Examples Get all response headers Headers = cowboy_req:resp_headers(Req).</description>
+Description resp_headers(Req :: cowboy_req:req()) -&amp;gt; cowboy:http_headers() Return all response headers.
+Arguments Req The Req object.
+ Return value Headers are returned as a map with keys being lowercase binary strings, and values as binary strings.
+Changelog 2.0: Function introduced. Examples Get all response headers Headers = cowboy_req:resp_headers(Req). See also cowboy_req(3), cowboy_req:resp_header(3), cowboy_req:set_resp_header(3), cowboy_req:set_resp_headers(3)</description>
</item>
<item>
@@ -5333,10 +5609,12 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy_req.scheme/</guid>
<description>Name cowboy_req:scheme - URI scheme
- Description scheme(Req :: cowboy_req:req()) -&amp;gt; Scheme :: binary() Return the scheme of the effective request URI.
- The scheme can also be obtained using pattern matching:
- #{scheme := Scheme} = Req. Arguments Req The Req object. Return value The scheme is returned as a binary. It is case insensitive.
- Cowboy will only set the scheme to &amp;lt;&amp;lt;&#34;</description>
+Description scheme(Req :: cowboy_req:req()) -&amp;gt; Scheme :: binary() Return the scheme of the effective request URI.
+The scheme can also be obtained using pattern matching:
+#{scheme := Scheme} = Req. Arguments Req The Req object.
+ Return value The scheme is returned as a binary. It is case insensitive.
+Cowboy will only set the scheme to &amp;lt;&amp;lt;&amp;quot;http&amp;quot;&amp;gt;&amp;gt; or &amp;lt;&amp;lt;&amp;quot;https&amp;quot;&amp;gt;&amp;gt;.
+Changelog 2.0: Function introduced.</description>
</item>
<item>
@@ -5346,10 +5624,12 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/manual/cowboy_req.scheme/</guid>
<description>Name cowboy_req:scheme - URI scheme
- Description scheme(Req :: cowboy_req:req()) -&amp;gt; Scheme :: binary() Return the scheme of the effective request URI.
- The scheme can also be obtained using pattern matching:
- #{scheme := Scheme} = Req. Arguments Req The Req object. Return value The scheme is returned as a binary. It is case insensitive.
- Cowboy will only set the scheme to &amp;lt;&amp;lt;&#34;</description>
+Description scheme(Req :: cowboy_req:req()) -&amp;gt; Scheme :: binary() Return the scheme of the effective request URI.
+The scheme can also be obtained using pattern matching:
+#{scheme := Scheme} = Req. Arguments Req The Req object.
+ Return value The scheme is returned as a binary. It is case insensitive.
+Cowboy will only set the scheme to &amp;lt;&amp;lt;&amp;quot;http&amp;quot;&amp;gt;&amp;gt; or &amp;lt;&amp;lt;&amp;quot;https&amp;quot;&amp;gt;&amp;gt;.
+Changelog 2.0: Function introduced.</description>
</item>
<item>
@@ -5359,10 +5639,12 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/manual/cowboy_req.scheme/</guid>
<description>Name cowboy_req:scheme - URI scheme
- Description scheme(Req :: cowboy_req:req()) -&amp;gt; Scheme :: binary() Return the scheme of the effective request URI.
- The scheme can also be obtained using pattern matching:
- #{scheme := Scheme} = Req. Arguments Req The Req object. Return value The scheme is returned as a binary. It is case insensitive.
- Cowboy will only set the scheme to &amp;lt;&amp;lt;&#34;</description>
+Description scheme(Req :: cowboy_req:req()) -&amp;gt; Scheme :: binary() Return the scheme of the effective request URI.
+The scheme can also be obtained using pattern matching:
+#{scheme := Scheme} = Req. Arguments Req The Req object.
+ Return value The scheme is returned as a binary. It is case insensitive.
+Cowboy will only set the scheme to &amp;lt;&amp;lt;&amp;quot;http&amp;quot;&amp;gt;&amp;gt; or &amp;lt;&amp;lt;&amp;quot;https&amp;quot;&amp;gt;&amp;gt;.
+Changelog 2.0: Function introduced.</description>
</item>
<item>
@@ -5372,10 +5654,12 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/manual/cowboy_req.scheme/</guid>
<description>Name cowboy_req:scheme - URI scheme
- Description scheme(Req :: cowboy_req:req()) -&amp;gt; Scheme :: binary() Return the scheme of the effective request URI.
- The scheme can also be obtained using pattern matching:
- #{scheme := Scheme} = Req. Arguments Req The Req object. Return value The scheme is returned as a binary. It is case insensitive.
- Cowboy will only set the scheme to &amp;lt;&amp;lt;&#34;</description>
+Description scheme(Req :: cowboy_req:req()) -&amp;gt; Scheme :: binary() Return the scheme of the effective request URI.
+The scheme can also be obtained using pattern matching:
+#{scheme := Scheme} = Req. Arguments Req The Req object.
+ Return value The scheme is returned as a binary. It is case insensitive.
+Cowboy will only set the scheme to &amp;lt;&amp;lt;&amp;quot;http&amp;quot;&amp;gt;&amp;gt; or &amp;lt;&amp;lt;&amp;quot;https&amp;quot;&amp;gt;&amp;gt;.
+Changelog 2.0: Function introduced.</description>
</item>
<item>
@@ -5385,10 +5669,12 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/manual/cowboy_req.scheme/</guid>
<description>Name cowboy_req:scheme - URI scheme
- Description scheme(Req :: cowboy_req:req()) -&amp;gt; Scheme :: binary() Return the scheme of the effective request URI.
- The scheme can also be obtained using pattern matching:
- #{scheme := Scheme} = Req. Arguments Req The Req object. Return value The scheme is returned as a binary. It is case insensitive.
- Cowboy will only set the scheme to &amp;lt;&amp;lt;&#34;</description>
+Description scheme(Req :: cowboy_req:req()) -&amp;gt; Scheme :: binary() Return the scheme of the effective request URI.
+The scheme can also be obtained using pattern matching:
+#{scheme := Scheme} = Req. Arguments Req The Req object.
+ Return value The scheme is returned as a binary. It is case insensitive.
+Cowboy will only set the scheme to &amp;lt;&amp;lt;&amp;quot;http&amp;quot;&amp;gt;&amp;gt; or &amp;lt;&amp;lt;&amp;quot;https&amp;quot;&amp;gt;&amp;gt;.
+Changelog 2.0: Function introduced.</description>
</item>
<item>
@@ -5398,9 +5684,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy_req.set_resp_body/</guid>
<description>Name cowboy_req:set_resp_body - Set the response body
- Description set_resp_body(Body, Req :: cowboy_req:req()) -&amp;gt; Req Body :: cowboy_req:resp_body() Set the response body.
- The response body will be sent when a reply is initiated. Note that the functions stream_reply/2,3 and reply/4 will override the body set by this function.
- This function can also be used to remove a response body that was set previously. To do so, simply call this function with an empty body.</description>
+Description set_resp_body(Body, Req :: cowboy_req:req()) -&amp;gt; Req Body :: cowboy_req:resp_body() Set the response body.
+The response body will be sent when a reply is initiated. Note that the functions stream_reply/2,3 and reply/4 will override the body set by this function.
+This function can also be used to remove a response body that was set previously. To do so, simply call this function with an empty body.</description>
</item>
<item>
@@ -5410,9 +5696,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/manual/cowboy_req.set_resp_body/</guid>
<description>Name cowboy_req:set_resp_body - Set the response body
- Description set_resp_body(Body, Req :: cowboy_req:req()) -&amp;gt; Req Body :: cowboy_req:resp_body() Set the response body.
- The response body will be sent when a reply is initiated. Note that the functions stream_reply/2,3 and reply/4 will override the body set by this function.
- This function can also be used to remove a response body that was set previously. To do so, simply call this function with an empty body.</description>
+Description set_resp_body(Body, Req :: cowboy_req:req()) -&amp;gt; Req Body :: cowboy_req:resp_body() Set the response body.
+The response body will be sent when a reply is initiated. Note that the functions stream_reply/2,3 and reply/4 will override the body set by this function.
+This function can also be used to remove a response body that was set previously. To do so, simply call this function with an empty body.</description>
</item>
<item>
@@ -5422,9 +5708,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/manual/cowboy_req.set_resp_body/</guid>
<description>Name cowboy_req:set_resp_body - Set the response body
- Description set_resp_body(Body, Req :: cowboy_req:req()) -&amp;gt; Req Body :: cowboy_req:resp_body() Set the response body.
- The response body will be sent when a reply is initiated. Note that the functions stream_reply/2,3 and reply/4 will override the body set by this function.
- This function can also be used to remove a response body that was set previously. To do so, simply call this function with an empty body.</description>
+Description set_resp_body(Body, Req :: cowboy_req:req()) -&amp;gt; Req Body :: cowboy_req:resp_body() Set the response body.
+The response body will be sent when a reply is initiated. Note that the functions stream_reply/2,3 and reply/4 will override the body set by this function.
+This function can also be used to remove a response body that was set previously. To do so, simply call this function with an empty body.</description>
</item>
<item>
@@ -5434,9 +5720,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/manual/cowboy_req.set_resp_body/</guid>
<description>Name cowboy_req:set_resp_body - Set the response body
- Description set_resp_body(Body, Req :: cowboy_req:req()) -&amp;gt; Req Body :: cowboy_req:resp_body() Set the response body.
- The response body will be sent when a reply is initiated. Note that the functions stream_reply/2,3 and reply/4 will override the body set by this function.
- This function can also be used to remove a response body that was set previously. To do so, simply call this function with an empty body.</description>
+Description set_resp_body(Body, Req :: cowboy_req:req()) -&amp;gt; Req Body :: cowboy_req:resp_body() Set the response body.
+The response body will be sent when a reply is initiated. Note that the functions stream_reply/2,3 and reply/4 will override the body set by this function.
+This function can also be used to remove a response body that was set previously. To do so, simply call this function with an empty body.</description>
</item>
<item>
@@ -5446,9 +5732,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/manual/cowboy_req.set_resp_body/</guid>
<description>Name cowboy_req:set_resp_body - Set the response body
- Description set_resp_body(Body, Req :: cowboy_req:req()) -&amp;gt; Req Body :: cowboy_req:resp_body() Set the response body.
- The response body will be sent when a reply is initiated. Note that the functions stream_reply/2,3 and reply/4 will override the body set by this function.
- This function can also be used to remove a response body that was set previously. To do so, simply call this function with an empty body.</description>
+Description set_resp_body(Body, Req :: cowboy_req:req()) -&amp;gt; Req Body :: cowboy_req:resp_body() Set the response body.
+The response body will be sent when a reply is initiated. Note that the functions stream_reply/2,3 and reply/4 will override the body set by this function.
+This function can also be used to remove a response body that was set previously. To do so, simply call this function with an empty body.</description>
</item>
<item>
@@ -5458,9 +5744,11 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy_req.set_resp_cookie/</guid>
<description>Name cowboy_req:set_resp_cookie - Set a cookie
- Description set_resp_cookie(Name, Value, Req :: cowboy_req:req()) -&amp;gt; set_resp_cookie(Name, Value, [], Req) set_resp_cookie(Name, Value, Req :: cowboy_req:req(), Opts) -&amp;gt; Req Name :: binary() %% case sensitive Value :: iodata() %% case sensitive Opts :: cow_cookie:cookie_opts() Set a cookie to be sent with the response.
- Note that cookie names are case sensitive.
- Arguments Name Cookie name.</description>
+Description set_resp_cookie(Name, Value, Req :: cowboy_req:req()) -&amp;gt; set_resp_cookie(Name, Value, [], Req) set_resp_cookie(Name, Value, Req :: cowboy_req:req(), Opts) -&amp;gt; Req Name :: binary() %% case sensitive Value :: iodata() %% case sensitive Opts :: cow_cookie:cookie_opts() Set a cookie to be sent with the response.
+Note that cookie names are case sensitive.
+Arguments Name Cookie name.
+ Value Cookie value.
+ Req The Req object.</description>
</item>
<item>
@@ -5470,9 +5758,11 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/manual/cowboy_req.set_resp_cookie/</guid>
<description>Name cowboy_req:set_resp_cookie - Set a cookie
- Description set_resp_cookie(Name, Value, Req :: cowboy_req:req()) -&amp;gt; set_resp_cookie(Name, Value, [], Req) set_resp_cookie(Name, Value, Req :: cowboy_req:req(), Opts) -&amp;gt; Req Name :: binary() %% case sensitive Value :: iodata() %% case sensitive Opts :: cow_cookie:cookie_opts() Set a cookie to be sent with the response.
- Note that cookie names are case sensitive.
- Arguments Name Cookie name.</description>
+Description set_resp_cookie(Name, Value, Req :: cowboy_req:req()) -&amp;gt; set_resp_cookie(Name, Value, [], Req) set_resp_cookie(Name, Value, Req :: cowboy_req:req(), Opts) -&amp;gt; Req Name :: binary() %% case sensitive Value :: iodata() %% case sensitive Opts :: cow_cookie:cookie_opts() Set a cookie to be sent with the response.
+Note that cookie names are case sensitive.
+Arguments Name Cookie name.
+ Value Cookie value.
+ Req The Req object.</description>
</item>
<item>
@@ -5482,9 +5772,11 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/manual/cowboy_req.set_resp_cookie/</guid>
<description>Name cowboy_req:set_resp_cookie - Set a cookie
- Description set_resp_cookie(Name, Value, Req :: cowboy_req:req()) -&amp;gt; set_resp_cookie(Name, Value, [], Req) set_resp_cookie(Name, Value, Req :: cowboy_req:req(), Opts) -&amp;gt; Req Name :: binary() %% case sensitive Value :: iodata() %% case sensitive Opts :: cow_cookie:cookie_opts() Set a cookie to be sent with the response.
- Note that cookie names are case sensitive.
- Arguments Name Cookie name.</description>
+Description set_resp_cookie(Name, Value, Req :: cowboy_req:req()) -&amp;gt; set_resp_cookie(Name, Value, [], Req) set_resp_cookie(Name, Value, Req :: cowboy_req:req(), Opts) -&amp;gt; Req Name :: binary() %% case sensitive Value :: iodata() %% case sensitive Opts :: cow_cookie:cookie_opts() Set a cookie to be sent with the response.
+Note that cookie names are case sensitive.
+Arguments Name Cookie name.
+ Value Cookie value.
+ Req The Req object.</description>
</item>
<item>
@@ -5494,9 +5786,11 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/manual/cowboy_req.set_resp_cookie/</guid>
<description>Name cowboy_req:set_resp_cookie - Set a cookie
- Description set_resp_cookie(Name, Value, Req :: cowboy_req:req()) -&amp;gt; set_resp_cookie(Name, Value, [], Req) set_resp_cookie(Name, Value, Req :: cowboy_req:req(), Opts) -&amp;gt; Req Name :: binary() %% case sensitive Value :: iodata() %% case sensitive Opts :: cow_cookie:cookie_opts() Set a cookie to be sent with the response.
- Note that cookie names are case sensitive.
- Arguments Name Cookie name.</description>
+Description set_resp_cookie(Name, Value, Req :: cowboy_req:req()) -&amp;gt; set_resp_cookie(Name, Value, [], Req) set_resp_cookie(Name, Value, Req :: cowboy_req:req(), Opts) -&amp;gt; Req Name :: binary() %% case sensitive Value :: iodata() %% case sensitive Opts :: cow_cookie:cookie_opts() Set a cookie to be sent with the response.
+Note that cookie names are case sensitive.
+Arguments Name Cookie name.
+ Value Cookie value.
+ Req The Req object.</description>
</item>
<item>
@@ -5506,9 +5800,11 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/manual/cowboy_req.set_resp_cookie/</guid>
<description>Name cowboy_req:set_resp_cookie - Set a cookie
- Description set_resp_cookie(Name, Value, Req :: cowboy_req:req()) -&amp;gt; set_resp_cookie(Name, Value, [], Req) set_resp_cookie(Name, Value, Req :: cowboy_req:req(), Opts) -&amp;gt; Req Name :: binary() %% case sensitive Value :: iodata() %% case sensitive Opts :: cow_cookie:cookie_opts() Set a cookie to be sent with the response.
- Note that cookie names are case sensitive.
- Arguments Name Cookie name.</description>
+Description set_resp_cookie(Name, Value, Req :: cowboy_req:req()) -&amp;gt; set_resp_cookie(Name, Value, [], Req) set_resp_cookie(Name, Value, Req :: cowboy_req:req(), Opts) -&amp;gt; Req Name :: binary() %% case sensitive Value :: iodata() %% case sensitive Opts :: cow_cookie:cookie_opts() Set a cookie to be sent with the response.
+Note that cookie names are case sensitive.
+Arguments Name Cookie name.
+ Value Cookie value.
+ Req The Req object.</description>
</item>
<item>
@@ -5518,8 +5814,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy_req.set_resp_header/</guid>
<description>Name cowboy_req:set_resp_header - Set a response header
- Description set_resp_header(Name, Value, Req :: cowboy_req:req()) -&amp;gt; Req Name :: binary() %% lowercase; case insensitive Value :: iodata() %% case depends on header Set a header to be sent with the response.
- 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.</description>
+Description set_resp_header(Name, Value, Req :: cowboy_req:req()) -&amp;gt; Req Name :: binary() %% lowercase; case insensitive Value :: iodata() %% case depends on header Set a header to be sent with the response.
+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.
+Cowboy does not allow duplicate header names.</description>
</item>
<item>
@@ -5529,8 +5826,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/manual/cowboy_req.set_resp_header/</guid>
<description>Name cowboy_req:set_resp_header - Set a response header
- Description set_resp_header(Name, Value, Req :: cowboy_req:req()) -&amp;gt; Req Name :: binary() %% lowercase; case insensitive Value :: iodata() %% case depends on header Set a header to be sent with the response.
- 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.</description>
+Description set_resp_header(Name, Value, Req :: cowboy_req:req()) -&amp;gt; Req Name :: binary() %% lowercase; case insensitive Value :: iodata() %% case depends on header Set a header to be sent with the response.
+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.
+Cowboy does not allow duplicate header names.</description>
</item>
<item>
@@ -5540,8 +5838,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/manual/cowboy_req.set_resp_header/</guid>
<description>Name cowboy_req:set_resp_header - Set a response header
- Description set_resp_header(Name, Value, Req :: cowboy_req:req()) -&amp;gt; Req Name :: binary() %% lowercase; case insensitive Value :: iodata() %% case depends on header Set a header to be sent with the response.
- 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.</description>
+Description set_resp_header(Name, Value, Req :: cowboy_req:req()) -&amp;gt; Req Name :: binary() %% lowercase; case insensitive Value :: iodata() %% case depends on header Set a header to be sent with the response.
+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.
+Cowboy does not allow duplicate header names.</description>
</item>
<item>
@@ -5551,8 +5850,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/manual/cowboy_req.set_resp_header/</guid>
<description>Name cowboy_req:set_resp_header - Set a response header
- Description set_resp_header(Name, Value, Req :: cowboy_req:req()) -&amp;gt; Req Name :: binary() %% lowercase; case insensitive Value :: iodata() %% case depends on header Set a header to be sent with the response.
- 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.</description>
+Description set_resp_header(Name, Value, Req :: cowboy_req:req()) -&amp;gt; Req Name :: binary() %% lowercase; case insensitive Value :: iodata() %% case depends on header Set a header to be sent with the response.
+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.
+Cowboy does not allow duplicate header names.</description>
</item>
<item>
@@ -5562,8 +5862,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/manual/cowboy_req.set_resp_header/</guid>
<description>Name cowboy_req:set_resp_header - Set a response header
- Description set_resp_header(Name, Value, Req :: cowboy_req:req()) -&amp;gt; Req Name :: binary() %% lowercase; case insensitive Value :: iodata() %% case depends on header Set a header to be sent with the response.
- 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.</description>
+Description set_resp_header(Name, Value, Req :: cowboy_req:req()) -&amp;gt; Req Name :: binary() %% lowercase; case insensitive Value :: iodata() %% case depends on header Set a header to be sent with the response.
+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.
+Cowboy does not allow duplicate header names.</description>
</item>
<item>
@@ -5573,9 +5874,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy_req.set_resp_headers/</guid>
<description>Name cowboy_req:set_resp_headers - Set several response headers
- Description set_resp_headers(Headers, Req :: cowboy_req:req()) -&amp;gt; Req Headers :: cowboy:http_headers() Set several headers to be sent with the response.
- 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.
- Cowboy does not allow duplicate header names. Headers set by this function may be overwritten by those set from the reply functions.</description>
+Description set_resp_headers(Headers, Req :: cowboy_req:req()) -&amp;gt; Req Headers :: cowboy:http_headers() Set several headers to be sent with the response.
+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.
+Cowboy does not allow duplicate header names. Headers set by this function may be overwritten by those set from the reply functions.</description>
</item>
<item>
@@ -5585,9 +5886,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/manual/cowboy_req.set_resp_headers/</guid>
<description>Name cowboy_req:set_resp_headers - Set several response headers
- Description set_resp_headers(Headers, Req :: cowboy_req:req()) -&amp;gt; Req Headers :: cowboy:http_headers() Set several headers to be sent with the response.
- 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.
- Cowboy does not allow duplicate header names. Headers set by this function may be overwritten by those set from the reply functions.</description>
+Description set_resp_headers(Headers, Req :: cowboy_req:req()) -&amp;gt; Req Headers :: cowboy:http_headers() Set several headers to be sent with the response.
+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.
+Cowboy does not allow duplicate header names. Headers set by this function may be overwritten by those set from the reply functions.</description>
</item>
<item>
@@ -5597,9 +5898,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/manual/cowboy_req.set_resp_headers/</guid>
<description>Name cowboy_req:set_resp_headers - Set several response headers
- Description set_resp_headers(Headers, Req :: cowboy_req:req()) -&amp;gt; Req Headers :: cowboy:http_headers() Set several headers to be sent with the response.
- 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.
- Cowboy does not allow duplicate header names. Headers set by this function may be overwritten by those set from the reply functions.</description>
+Description set_resp_headers(Headers, Req :: cowboy_req:req()) -&amp;gt; Req Headers :: cowboy:http_headers() Set several headers to be sent with the response.
+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.
+Cowboy does not allow duplicate header names. Headers set by this function may be overwritten by those set from the reply functions.</description>
</item>
<item>
@@ -5609,9 +5910,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/manual/cowboy_req.set_resp_headers/</guid>
<description>Name cowboy_req:set_resp_headers - Set several response headers
- Description set_resp_headers(Headers, Req :: cowboy_req:req()) -&amp;gt; Req Headers :: cowboy:http_headers() Set several headers to be sent with the response.
- 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.
- Cowboy does not allow duplicate header names. Headers set by this function may be overwritten by those set from the reply functions.</description>
+Description set_resp_headers(Headers, Req :: cowboy_req:req()) -&amp;gt; Req Headers :: cowboy:http_headers() Set several headers to be sent with the response.
+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.
+Cowboy does not allow duplicate header names. Headers set by this function may be overwritten by those set from the reply functions.</description>
</item>
<item>
@@ -5621,9 +5922,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/manual/cowboy_req.set_resp_headers/</guid>
<description>Name cowboy_req:set_resp_headers - Set several response headers
- Description set_resp_headers(Headers, Req :: cowboy_req:req()) -&amp;gt; Req Headers :: cowboy:http_headers() Set several headers to be sent with the response.
- 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.
- Cowboy does not allow duplicate header names. Headers set by this function may be overwritten by those set from the reply functions.</description>
+Description set_resp_headers(Headers, Req :: cowboy_req:req()) -&amp;gt; Req Headers :: cowboy:http_headers() Set several headers to be sent with the response.
+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.
+Cowboy does not allow duplicate header names. Headers set by this function may be overwritten by those set from the reply functions.</description>
</item>
<item>
@@ -5633,9 +5934,11 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/manual/cowboy_req.sock/</guid>
<description>Name cowboy_req:sock - Socket address and port
- Description sock(Req :: cowboy_req:req()) -&amp;gt; Info Info :: {inet:ip_address(), inet:port_number()} Return the socket&amp;#8217;s IP address and port number.
- The socket information can also be obtained using pattern matching:
- #{sock := {IP, Port}} = Req. Arguments Req The Req object. Return value The socket&amp;#8217;s local IP address and port number.</description>
+Description sock(Req :: cowboy_req:req()) -&amp;gt; Info Info :: {inet:ip_address(), inet:port_number()} Return the socket&amp;apos;s IP address and port number.
+The socket information can also be obtained using pattern matching:
+#{sock := {IP, Port}} = Req. Arguments Req The Req object.
+ Return value The socket&amp;apos;s local IP address and port number.
+Changelog 2.1: Function introduced. Examples Get the socket&amp;apos;s IP address and port number.</description>
</item>
<item>
@@ -5645,9 +5948,11 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/manual/cowboy_req.sock/</guid>
<description>Name cowboy_req:sock - Socket address and port
- Description sock(Req :: cowboy_req:req()) -&amp;gt; Info Info :: {inet:ip_address(), inet:port_number()} Return the socket&amp;#8217;s IP address and port number.
- The socket information can also be obtained using pattern matching:
- #{sock := {IP, Port}} = Req. Arguments Req The Req object. Return value The socket&amp;#8217;s local IP address and port number.</description>
+Description sock(Req :: cowboy_req:req()) -&amp;gt; Info Info :: {inet:ip_address(), inet:port_number()} Return the socket&amp;apos;s IP address and port number.
+The socket information can also be obtained using pattern matching:
+#{sock := {IP, Port}} = Req. Arguments Req The Req object.
+ Return value The socket&amp;apos;s local IP address and port number.
+Changelog 2.1: Function introduced. Examples Get the socket&amp;apos;s IP address and port number.</description>
</item>
<item>
@@ -5657,9 +5962,11 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/manual/cowboy_req.sock/</guid>
<description>Name cowboy_req:sock - Socket address and port
- Description sock(Req :: cowboy_req:req()) -&amp;gt; Info Info :: {inet:ip_address(), inet:port_number()} Return the socket&amp;#8217;s IP address and port number.
- The socket information can also be obtained using pattern matching:
- #{sock := {IP, Port}} = Req. Arguments Req The Req object. Return value The socket&amp;#8217;s local IP address and port number.</description>
+Description sock(Req :: cowboy_req:req()) -&amp;gt; Info Info :: {inet:ip_address(), inet:port_number()} Return the socket&amp;apos;s IP address and port number.
+The socket information can also be obtained using pattern matching:
+#{sock := {IP, Port}} = Req. Arguments Req The Req object.
+ Return value The socket&amp;apos;s local IP address and port number.
+Changelog 2.1: Function introduced. Examples Get the socket&amp;apos;s IP address and port number.</description>
</item>
<item>
@@ -5669,9 +5976,11 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/manual/cowboy_req.sock/</guid>
<description>Name cowboy_req:sock - Socket address and port
- Description sock(Req :: cowboy_req:req()) -&amp;gt; Info Info :: {inet:ip_address(), inet:port_number()} Return the socket&amp;#8217;s IP address and port number.
- The socket information can also be obtained using pattern matching:
- #{sock := {IP, Port}} = Req. Arguments Req The Req object. Return value The socket&amp;#8217;s local IP address and port number.</description>
+Description sock(Req :: cowboy_req:req()) -&amp;gt; Info Info :: {inet:ip_address(), inet:port_number()} Return the socket&amp;apos;s IP address and port number.
+The socket information can also be obtained using pattern matching:
+#{sock := {IP, Port}} = Req. Arguments Req The Req object.
+ Return value The socket&amp;apos;s local IP address and port number.
+Changelog 2.1: Function introduced. Examples Get the socket&amp;apos;s IP address and port number.</description>
</item>
<item>
@@ -5681,9 +5990,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy_req.stream_body/</guid>
<description>Name cowboy_req:stream_body - Stream the response body
- Description stream_body(Data, IsFin, Req :: cowboy_req:req()) -&amp;gt; ok Data :: iodata() IsFin :: fin | nofin Stream the response body.
- This function may be called as many times as needed after initiating a response using the cowboy_req:stream_reply(3) function.
- The second argument indicates if this call is the final call. Use the nofin value until you know no more data will be sent.</description>
+Description stream_body(Data, IsFin, Req :: cowboy_req:req()) -&amp;gt; ok Data :: iodata() IsFin :: fin | nofin Stream the response body.
+This function may be called as many times as needed after initiating a response using the cowboy_req:stream_reply(3) function.
+The second argument indicates if this call is the final call. Use the nofin value until you know no more data will be sent. The final call should use fin (possibly with an empty data value).</description>
</item>
<item>
@@ -5693,9 +6002,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/manual/cowboy_req.stream_body/</guid>
<description>Name cowboy_req:stream_body - Stream the response body
- Description stream_body(Data, IsFin, Req :: cowboy_req:req()) -&amp;gt; ok Data :: iodata() IsFin :: fin | nofin Stream the response body.
- This function may be called as many times as needed after initiating a response using the cowboy_req:stream_reply(3) function.
- The second argument indicates if this call is the final call. Use the nofin value until you know no more data will be sent.</description>
+Description stream_body(Data, IsFin, Req :: cowboy_req:req()) -&amp;gt; ok Data :: iodata() IsFin :: fin | nofin Stream the response body.
+This function may be called as many times as needed after initiating a response using the cowboy_req:stream_reply(3) function.
+The second argument indicates if this call is the final call. Use the nofin value until you know no more data will be sent. The final call should use fin (possibly with an empty data value).</description>
</item>
<item>
@@ -5705,9 +6014,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/manual/cowboy_req.stream_body/</guid>
<description>Name cowboy_req:stream_body - Stream the response body
- Description stream_body(Data, IsFin, Req :: cowboy_req:req()) -&amp;gt; ok Data :: iodata() IsFin :: fin | nofin Stream the response body.
- This function may be called as many times as needed after initiating a response using the cowboy_req:stream_reply(3) function.
- The second argument indicates if this call is the final call. Use the nofin value until you know no more data will be sent.</description>
+Description stream_body(Data, IsFin, Req :: cowboy_req:req()) -&amp;gt; ok Data :: iodata() IsFin :: fin | nofin Stream the response body.
+This function may be called as many times as needed after initiating a response using the cowboy_req:stream_reply(3) function.
+The second argument indicates if this call is the final call. Use the nofin value until you know no more data will be sent. The final call should use fin (possibly with an empty data value) or be a call to the cowboy_req:stream_trailers(3) function.</description>
</item>
<item>
@@ -5717,9 +6026,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/manual/cowboy_req.stream_body/</guid>
<description>Name cowboy_req:stream_body - Stream the response body
- Description stream_body(Data, IsFin, Req :: cowboy_req:req()) -&amp;gt; ok Data :: iodata() IsFin :: fin | nofin Stream the response body.
- This function may be called as many times as needed after initiating a response using the cowboy_req:stream_reply(3) function.
- The second argument indicates if this call is the final call. Use the nofin value until you know no more data will be sent.</description>
+Description stream_body(Data, IsFin, Req :: cowboy_req:req()) -&amp;gt; ok Data :: iodata() IsFin :: fin | nofin Stream the response body.
+This function may be called as many times as needed after initiating a response using the cowboy_req:stream_reply(3) function.
+The second argument indicates if this call is the final call. Use the nofin value until you know no more data will be sent. The final call should use fin (possibly with an empty data value) or be a call to the cowboy_req:stream_trailers(3) function.</description>
</item>
<item>
@@ -5729,9 +6038,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/manual/cowboy_req.stream_body/</guid>
<description>Name cowboy_req:stream_body - Stream the response body
- Description stream_body(Data, IsFin, Req :: cowboy_req:req()) -&amp;gt; ok Data :: iodata() IsFin :: fin | nofin Stream the response body.
- This function may be called as many times as needed after initiating a response using the cowboy_req:stream_reply(3) function.
- The second argument indicates if this call is the final call. Use the nofin value until you know no more data will be sent.</description>
+Description stream_body(Data, IsFin, Req :: cowboy_req:req()) -&amp;gt; ok Data :: iodata() IsFin :: fin | nofin Stream the response body.
+This function may be called as many times as needed after initiating a response using the cowboy_req:stream_reply(3) function.
+The second argument indicates if this call is the final call. Use the nofin value until you know no more data will be sent. The final call should use fin (possibly with an empty data value) or be a call to the cowboy_req:stream_trailers(3) function.</description>
</item>
<item>
@@ -5741,9 +6050,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy_req.stream_reply/</guid>
<description>Name cowboy_req:stream_reply - Send the response headers
- Description stream_reply(Status, Req :: cowboy_req:req()) -&amp;gt; stream_reply(StatusCode, #{}, Req) stream_reply(Status, Headers, Req :: cowboy_req:req()) -&amp;gt; Req Status :: cowboy:http_status() Headers :: cowboy:http_headers() Send the response headers.
- The header names must be given as lowercase binary strings. While header names are case insensitive, Cowboy requires them to be given as lowercase to function properly.
- Cowboy does not allow duplicate header names.</description>
+Description stream_reply(Status, Req :: cowboy_req:req()) -&amp;gt; stream_reply(StatusCode, #{}, Req) stream_reply(Status, Headers, Req :: cowboy_req:req()) -&amp;gt; Req Status :: cowboy:http_status() Headers :: cowboy:http_headers() Send the response headers.
+The header names must be given as lowercase binary strings. While header names are case insensitive, Cowboy requires them to be given as lowercase to function properly.
+Cowboy does not allow duplicate header names. Headers set by this function may overwrite those set by set_resp_header/3.</description>
</item>
<item>
@@ -5753,9 +6062,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/manual/cowboy_req.stream_reply/</guid>
<description>Name cowboy_req:stream_reply - Send the response headers
- Description stream_reply(Status, Req :: cowboy_req:req()) -&amp;gt; stream_reply(StatusCode, #{}, Req) stream_reply(Status, Headers, Req :: cowboy_req:req()) -&amp;gt; Req Status :: cowboy:http_status() Headers :: cowboy:http_headers() Send the response headers.
- The header names must be given as lowercase binary strings. While header names are case insensitive, Cowboy requires them to be given as lowercase to function properly.
- Cowboy does not allow duplicate header names.</description>
+Description stream_reply(Status, Req :: cowboy_req:req()) -&amp;gt; stream_reply(StatusCode, #{}, Req) stream_reply(Status, Headers, Req :: cowboy_req:req()) -&amp;gt; Req Status :: cowboy:http_status() Headers :: cowboy:http_headers() Send the response headers.
+The header names must be given as lowercase binary strings. While header names are case insensitive, Cowboy requires them to be given as lowercase to function properly.
+Cowboy does not allow duplicate header names. Headers set by this function may overwrite those set by set_resp_header/3.</description>
</item>
<item>
@@ -5765,9 +6074,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/manual/cowboy_req.stream_reply/</guid>
<description>Name cowboy_req:stream_reply - Send the response headers
- Description stream_reply(Status, Req :: cowboy_req:req()) -&amp;gt; stream_reply(StatusCode, #{}, Req) stream_reply(Status, Headers, Req :: cowboy_req:req()) -&amp;gt; Req Status :: cowboy:http_status() Headers :: cowboy:http_headers() Send the response headers.
- The header names must be given as lowercase binary strings. While header names are case insensitive, Cowboy requires them to be given as lowercase to function properly.
- Cowboy does not allow duplicate header names.</description>
+Description stream_reply(Status, Req :: cowboy_req:req()) -&amp;gt; stream_reply(StatusCode, #{}, Req) stream_reply(Status, Headers, Req :: cowboy_req:req()) -&amp;gt; Req Status :: cowboy:http_status() Headers :: cowboy:http_headers() Send the response headers.
+The header names must be given as lowercase binary strings. While header names are case insensitive, Cowboy requires them to be given as lowercase to function properly.
+Cowboy does not allow duplicate header names. Headers set by this function may overwrite those set by set_resp_header/3.</description>
</item>
<item>
@@ -5777,9 +6086,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/manual/cowboy_req.stream_reply/</guid>
<description>Name cowboy_req:stream_reply - Send the response headers
- Description stream_reply(Status, Req :: cowboy_req:req()) -&amp;gt; stream_reply(StatusCode, #{}, Req) stream_reply(Status, Headers, Req :: cowboy_req:req()) -&amp;gt; Req Status :: cowboy:http_status() Headers :: cowboy:http_headers() Send the response headers.
- The header names must be given as lowercase binary strings. While header names are case insensitive, Cowboy requires them to be given as lowercase to function properly.
- Cowboy does not allow duplicate header names.</description>
+Description stream_reply(Status, Req :: cowboy_req:req()) -&amp;gt; stream_reply(StatusCode, #{}, Req) stream_reply(Status, Headers, Req :: cowboy_req:req()) -&amp;gt; Req Status :: cowboy:http_status() Headers :: cowboy:http_headers() Send the response headers.
+The header names must be given as lowercase binary strings. While header names are case insensitive, Cowboy requires them to be given as lowercase to function properly.
+Cowboy does not allow duplicate header names. Headers set by this function may overwrite those set by set_resp_header/3.</description>
</item>
<item>
@@ -5789,9 +6098,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/manual/cowboy_req.stream_reply/</guid>
<description>Name cowboy_req:stream_reply - Send the response headers
- Description stream_reply(Status, Req :: cowboy_req:req()) -&amp;gt; stream_reply(StatusCode, #{}, Req) stream_reply(Status, Headers, Req :: cowboy_req:req()) -&amp;gt; Req Status :: cowboy:http_status() Headers :: cowboy:http_headers() Send the response headers.
- The header names must be given as lowercase binary strings. While header names are case insensitive, Cowboy requires them to be given as lowercase to function properly.
- Cowboy does not allow duplicate header names.</description>
+Description stream_reply(Status, Req :: cowboy_req:req()) -&amp;gt; stream_reply(StatusCode, #{}, Req) stream_reply(Status, Headers, Req :: cowboy_req:req()) -&amp;gt; Req Status :: cowboy:http_status() Headers :: cowboy:http_headers() Send the response headers.
+The header names must be given as lowercase binary strings. While header names are case insensitive, Cowboy requires them to be given as lowercase to function properly.
+Cowboy does not allow duplicate header names. Headers set by this function may overwrite those set by set_resp_header/3.</description>
</item>
<item>
@@ -5801,9 +6110,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/manual/cowboy_req.stream_trailers/</guid>
<description>Name cowboy_req:stream_trailers - Send the response trailers
- Description stream_trailers(Trailers, Req :: cowboy_req:req()) -&amp;gt; ok Trailers :: cowboy:http_headers() Send the response trailers and terminate the stream.
- This function can only be called once, after initiating a response using cowboy_req:stream_reply(3) and sending zero or more body chunks using cowboy_req:stream_body(3) with the nofin argument set. The function stream_trailers/2 implies fin and automatically terminate the response.
- You must list all field names sent in trailers in the trailer header, otherwise they might be dropped by intermediaries or clients.</description>
+Description stream_trailers(Trailers, Req :: cowboy_req:req()) -&amp;gt; ok Trailers :: cowboy:http_headers() Send the response trailers and terminate the stream.
+This function can only be called once, after initiating a response using cowboy_req:stream_reply(3) and sending zero or more body chunks using cowboy_req:stream_body(3) with the nofin argument set. The function stream_trailers/2 implies fin and automatically terminate the response.
+You must list all field names sent in trailers in the trailer header, otherwise they might be dropped by intermediaries or clients.</description>
</item>
<item>
@@ -5813,9 +6122,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/manual/cowboy_req.stream_trailers/</guid>
<description>Name cowboy_req:stream_trailers - Send the response trailers
- Description stream_trailers(Trailers, Req :: cowboy_req:req()) -&amp;gt; ok Trailers :: cowboy:http_headers() Send the response trailers and terminate the stream.
- This function can only be called once, after initiating a response using cowboy_req:stream_reply(3) and sending zero or more body chunks using cowboy_req:stream_body(3) with the nofin argument set. The function stream_trailers/2 implies fin and automatically terminate the response.
- You must list all field names sent in trailers in the trailer header, otherwise they might be dropped by intermediaries or clients.</description>
+Description stream_trailers(Trailers, Req :: cowboy_req:req()) -&amp;gt; ok Trailers :: cowboy:http_headers() Send the response trailers and terminate the stream.
+This function can only be called once, after initiating a response using cowboy_req:stream_reply(3) and sending zero or more body chunks using cowboy_req:stream_body(3) with the nofin argument set. The function stream_trailers/2 implies fin and automatically terminate the response.
+You must list all field names sent in trailers in the trailer header, otherwise they might be dropped by intermediaries or clients.</description>
</item>
<item>
@@ -5825,9 +6134,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/manual/cowboy_req.stream_trailers/</guid>
<description>Name cowboy_req:stream_trailers - Send the response trailers
- Description stream_trailers(Trailers, Req :: cowboy_req:req()) -&amp;gt; ok Trailers :: cowboy:http_headers() Send the response trailers and terminate the stream.
- This function can only be called once, after initiating a response using cowboy_req:stream_reply(3) and sending zero or more body chunks using cowboy_req:stream_body(3) with the nofin argument set. The function stream_trailers/2 implies fin and automatically terminate the response.
- You must list all field names sent in trailers in the trailer header, otherwise they might be dropped by intermediaries or clients.</description>
+Description stream_trailers(Trailers, Req :: cowboy_req:req()) -&amp;gt; ok Trailers :: cowboy:http_headers() Send the response trailers and terminate the stream.
+This function can only be called once, after initiating a response using cowboy_req:stream_reply(3) and sending zero or more body chunks using cowboy_req:stream_body(3) with the nofin argument set. The function stream_trailers/2 implies fin and automatically terminate the response.
+You must list all field names sent in trailers in the trailer header, otherwise they might be dropped by intermediaries or clients.</description>
</item>
<item>
@@ -5837,8 +6146,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy_req.uri/</guid>
<description>Name cowboy_req:uri - Reconstructed URI
- Description uri(Req :: cowboy_req:req()) -&amp;gt; uri(Req, #{}) uri(Req :: cowboy_req:req(), Opts) -&amp;gt; URI :: iodata() Opts :: #{ scheme =&amp;gt; iodata() | undefined, host =&amp;gt; iodata() | undefined, port =&amp;gt; inet:port_number() | undefined, path =&amp;gt; iodata() | undefined, qs =&amp;gt; iodata() | undefined, fragment =&amp;gt; iodata() | undefined } Reconstruct the effective request URI, optionally modifying components.
- By default Cowboy will build a URI using the components found in the request.</description>
+Description uri(Req :: cowboy_req:req()) -&amp;gt; uri(Req, #{}) uri(Req :: cowboy_req:req(), Opts) -&amp;gt; URI :: iodata() Opts :: #{ scheme =&amp;gt; iodata() | undefined, host =&amp;gt; iodata() | undefined, port =&amp;gt; inet:port_number() | undefined, path =&amp;gt; iodata() | undefined, qs =&amp;gt; iodata() | undefined, fragment =&amp;gt; iodata() | undefined } Reconstruct the effective request URI, optionally modifying components.
+By default Cowboy will build a URI using the components found in the request.</description>
</item>
<item>
@@ -5848,8 +6157,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/manual/cowboy_req.uri/</guid>
<description>Name cowboy_req:uri - Reconstructed URI
- Description uri(Req :: cowboy_req:req()) -&amp;gt; uri(Req, #{}) uri(Req :: cowboy_req:req(), Opts) -&amp;gt; URI :: iodata() Opts :: #{ scheme =&amp;gt; iodata() | undefined, host =&amp;gt; iodata() | undefined, port =&amp;gt; inet:port_number() | undefined, path =&amp;gt; iodata() | undefined, qs =&amp;gt; iodata() | undefined, fragment =&amp;gt; iodata() | undefined } Reconstruct the effective request URI, optionally modifying components.
- By default Cowboy will build a URI using the components found in the request.</description>
+Description uri(Req :: cowboy_req:req()) -&amp;gt; uri(Req, #{}) uri(Req :: cowboy_req:req(), Opts) -&amp;gt; URI :: iodata() Opts :: #{ scheme =&amp;gt; iodata() | undefined, host =&amp;gt; iodata() | undefined, port =&amp;gt; inet:port_number() | undefined, path =&amp;gt; iodata() | undefined, qs =&amp;gt; iodata() | undefined, fragment =&amp;gt; iodata() | undefined } Reconstruct the effective request URI, optionally modifying components.
+By default Cowboy will build a URI using the components found in the request.</description>
</item>
<item>
@@ -5859,8 +6168,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/manual/cowboy_req.uri/</guid>
<description>Name cowboy_req:uri - Reconstructed URI
- Description uri(Req :: cowboy_req:req()) -&amp;gt; uri(Req, #{}) uri(Req :: cowboy_req:req(), Opts) -&amp;gt; URI :: iodata() Opts :: #{ scheme =&amp;gt; iodata() | undefined, host =&amp;gt; iodata() | undefined, port =&amp;gt; inet:port_number() | undefined, path =&amp;gt; iodata() | undefined, qs =&amp;gt; iodata() | undefined, fragment =&amp;gt; iodata() | undefined } Reconstruct the effective request URI, optionally modifying components.
- By default Cowboy will build a URI using the components found in the request.</description>
+Description uri(Req :: cowboy_req:req()) -&amp;gt; uri(Req, #{}) uri(Req :: cowboy_req:req(), Opts) -&amp;gt; URI :: iodata() Opts :: #{ scheme =&amp;gt; iodata() | undefined, host =&amp;gt; iodata() | undefined, port =&amp;gt; inet:port_number() | undefined, path =&amp;gt; iodata() | undefined, qs =&amp;gt; iodata() | undefined, fragment =&amp;gt; iodata() | undefined } Reconstruct the effective request URI, optionally modifying components.
+By default Cowboy will build a URI using the components found in the request.</description>
</item>
<item>
@@ -5870,8 +6179,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/manual/cowboy_req.uri/</guid>
<description>Name cowboy_req:uri - Reconstructed URI
- Description uri(Req :: cowboy_req:req()) -&amp;gt; uri(Req, #{}) uri(Req :: cowboy_req:req(), Opts) -&amp;gt; URI :: iodata() Opts :: #{ scheme =&amp;gt; iodata() | undefined, host =&amp;gt; iodata() | undefined, port =&amp;gt; inet:port_number() | undefined, path =&amp;gt; iodata() | undefined, qs =&amp;gt; iodata() | undefined, fragment =&amp;gt; iodata() | undefined } Reconstruct the effective request URI, optionally modifying components.
- By default Cowboy will build a URI using the components found in the request.</description>
+Description uri(Req :: cowboy_req:req()) -&amp;gt; uri(Req, #{}) uri(Req :: cowboy_req:req(), Opts) -&amp;gt; URI :: iodata() Opts :: #{ scheme =&amp;gt; iodata() | undefined, host =&amp;gt; iodata() | undefined, port =&amp;gt; inet:port_number() | undefined, path =&amp;gt; iodata() | undefined, qs =&amp;gt; iodata() | undefined, fragment =&amp;gt; iodata() | undefined } Reconstruct the effective request URI, optionally modifying components.
+By default Cowboy will build a URI using the components found in the request.</description>
</item>
<item>
@@ -5881,8 +6190,8 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/manual/cowboy_req.uri/</guid>
<description>Name cowboy_req:uri - Reconstructed URI
- Description uri(Req :: cowboy_req:req()) -&amp;gt; uri(Req, #{}) uri(Req :: cowboy_req:req(), Opts) -&amp;gt; URI :: iodata() Opts :: #{ scheme =&amp;gt; iodata() | undefined, host =&amp;gt; iodata() | undefined, port =&amp;gt; inet:port_number() | undefined, path =&amp;gt; iodata() | undefined, qs =&amp;gt; iodata() | undefined, fragment =&amp;gt; iodata() | undefined } Reconstruct the effective request URI, optionally modifying components.
- By default Cowboy will build a URI using the components found in the request.</description>
+Description uri(Req :: cowboy_req:req()) -&amp;gt; uri(Req, #{}) uri(Req :: cowboy_req:req(), Opts) -&amp;gt; URI :: iodata() Opts :: #{ scheme =&amp;gt; iodata() | undefined, host =&amp;gt; iodata() | undefined, port =&amp;gt; inet:port_number() | undefined, path =&amp;gt; iodata() | undefined, qs =&amp;gt; iodata() | undefined, fragment =&amp;gt; iodata() | undefined } Reconstruct the effective request URI, optionally modifying components.
+By default Cowboy will build a URI using the components found in the request.</description>
</item>
<item>
@@ -5892,9 +6201,11 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy_req.version/</guid>
<description>Name cowboy_req:version - HTTP version
- Description version(Req :: cowboy_req:req()) -&amp;gt; Version :: cowboy:http_version() Return the HTTP version used for the request.
- The version can also be obtained using pattern matching:
- #{version := Version} = Req. Arguments Req The Req object. Return value The HTTP version used for the request is returned as an atom. It is provided for informative purposes only.</description>
+Description version(Req :: cowboy_req:req()) -&amp;gt; Version :: cowboy:http_version() Return the HTTP version used for the request.
+The version can also be obtained using pattern matching:
+#{version := Version} = Req. Arguments Req The Req object.
+ Return value The HTTP version used for the request is returned as an atom. It is provided for informative purposes only.
+Changelog 2.0: Only the version is returned, it is no longer wrapped in a tuple.</description>
</item>
<item>
@@ -5904,9 +6215,11 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/manual/cowboy_req.version/</guid>
<description>Name cowboy_req:version - HTTP version
- Description version(Req :: cowboy_req:req()) -&amp;gt; Version :: cowboy:http_version() Return the HTTP version used for the request.
- The version can also be obtained using pattern matching:
- #{version := Version} = Req. Arguments Req The Req object. Return value The HTTP version used for the request is returned as an atom. It is provided for informative purposes only.</description>
+Description version(Req :: cowboy_req:req()) -&amp;gt; Version :: cowboy:http_version() Return the HTTP version used for the request.
+The version can also be obtained using pattern matching:
+#{version := Version} = Req. Arguments Req The Req object.
+ Return value The HTTP version used for the request is returned as an atom. It is provided for informative purposes only.
+Changelog 2.0: Only the version is returned, it is no longer wrapped in a tuple.</description>
</item>
<item>
@@ -5916,9 +6229,11 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/manual/cowboy_req.version/</guid>
<description>Name cowboy_req:version - HTTP version
- Description version(Req :: cowboy_req:req()) -&amp;gt; Version :: cowboy:http_version() Return the HTTP version used for the request.
- The version can also be obtained using pattern matching:
- #{version := Version} = Req. Arguments Req The Req object. Return value The HTTP version used for the request is returned as an atom. It is provided for informative purposes only.</description>
+Description version(Req :: cowboy_req:req()) -&amp;gt; Version :: cowboy:http_version() Return the HTTP version used for the request.
+The version can also be obtained using pattern matching:
+#{version := Version} = Req. Arguments Req The Req object.
+ Return value The HTTP version used for the request is returned as an atom. It is provided for informative purposes only.
+Changelog 2.0: Only the version is returned, it is no longer wrapped in a tuple.</description>
</item>
<item>
@@ -5928,9 +6243,11 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/manual/cowboy_req.version/</guid>
<description>Name cowboy_req:version - HTTP version
- Description version(Req :: cowboy_req:req()) -&amp;gt; Version :: cowboy:http_version() Return the HTTP version used for the request.
- The version can also be obtained using pattern matching:
- #{version := Version} = Req. Arguments Req The Req object. Return value The HTTP version used for the request is returned as an atom. It is provided for informative purposes only.</description>
+Description version(Req :: cowboy_req:req()) -&amp;gt; Version :: cowboy:http_version() Return the HTTP version used for the request.
+The version can also be obtained using pattern matching:
+#{version := Version} = Req. Arguments Req The Req object.
+ Return value The HTTP version used for the request is returned as an atom. It is provided for informative purposes only.
+Changelog 2.0: Only the version is returned, it is no longer wrapped in a tuple.</description>
</item>
<item>
@@ -5940,9 +6257,11 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/manual/cowboy_req.version/</guid>
<description>Name cowboy_req:version - HTTP version
- Description version(Req :: cowboy_req:req()) -&amp;gt; Version :: cowboy:http_version() Return the HTTP version used for the request.
- The version can also be obtained using pattern matching:
- #{version := Version} = Req. Arguments Req The Req object. Return value The HTTP version used for the request is returned as an atom. It is provided for informative purposes only.</description>
+Description version(Req :: cowboy_req:req()) -&amp;gt; Version :: cowboy:http_version() Return the HTTP version used for the request.
+The version can also be obtained using pattern matching:
+#{version := Version} = Req. Arguments Req The Req object.
+ Return value The HTTP version used for the request is returned as an atom. It is provided for informative purposes only.
+Changelog 2.0: Only the version is returned, it is no longer wrapped in a tuple.</description>
</item>
<item>
@@ -5952,10 +6271,10 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy_rest/</guid>
<description>Name cowboy_rest - REST handlers
- Description The module cowboy_rest implements the HTTP state machine.
- Implementing REST handlers is not enough to provide a REST interface; this interface must also follow the REST constraints including HATEOAS (hypermedia as the engine of application state).
- Callbacks REST handlers implement the following interface:
- init(Req, State) -&amp;gt; {cowboy_rest, Req, State} Callback(Req, State) -&amp;gt; {Result, Req, State} | {stop, Req, State} terminate(Reason, Req, State) -&amp;gt; ok %% optional Req :: cowboy_req:req() State :: any() Reason :: normal | {crash, error | exit | throw, any()} Callback - see below Result - see below Default - see below The init/2 callback is common to all handlers.</description>
+Description The module cowboy_rest implements the HTTP state machine.
+Implementing REST handlers is not enough to provide a REST interface; this interface must also follow the REST constraints including HATEOAS (hypermedia as the engine of application state).
+Callbacks REST handlers implement the following interface:
+init(Req, State) -&amp;gt; {cowboy_rest, Req, State} Callback(Req, State) -&amp;gt; {Result, Req, State} | {stop, Req, State} terminate(Reason, Req, State) -&amp;gt; ok %% optional Req :: cowboy_req:req() State :: any() Reason :: normal | {crash, error | exit | throw, any()} Callback - see below Result - see below Default - see below The init/2 callback is common to all handlers.</description>
</item>
<item>
@@ -5965,10 +6284,10 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/manual/cowboy_rest/</guid>
<description>Name cowboy_rest - REST handlers
- Description The module cowboy_rest implements the HTTP state machine.
- Implementing REST handlers is not enough to provide a REST interface; this interface must also follow the REST constraints including HATEOAS (hypermedia as the engine of application state).
- Callbacks REST handlers implement the following interface:
- init(Req, State) -&amp;gt; {cowboy_rest, Req, State} Callback(Req, State) -&amp;gt; {Result, Req, State} | {stop, Req, State} | {{switch_handler, Module}, Req, State} | {{switch_handler, Module, Opts}, Req, State} terminate(Reason, Req, State) -&amp;gt; ok %% optional Req :: cowboy_req:req() State :: any() Module :: module() Opts :: any() Reason :: normal | {crash, error | exit | throw, any()} Callback - see below Result - see below Default - see below The init/2 callback is common to all handlers.</description>
+Description The module cowboy_rest implements the HTTP state machine.
+Implementing REST handlers is not enough to provide a REST interface; this interface must also follow the REST constraints including HATEOAS (hypermedia as the engine of application state).
+Callbacks REST handlers implement the following interface:
+init(Req, State) -&amp;gt; {cowboy_rest, Req, State} Callback(Req, State) -&amp;gt; {Result, Req, State} | {stop, Req, State} | {{switch_handler, Module}, Req, State} | {{switch_handler, Module, Opts}, Req, State} terminate(Reason, Req, State) -&amp;gt; ok %% optional Req :: cowboy_req:req() State :: any() Module :: module() Opts :: any() Reason :: normal | {crash, error | exit | throw, any()} Callback - see below Result - see below Default - see below The init/2 callback is common to all handlers.</description>
</item>
<item>
@@ -5978,10 +6297,10 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/manual/cowboy_rest/</guid>
<description>Name cowboy_rest - REST handlers
- Description The module cowboy_rest implements the HTTP state machine.
- Implementing REST handlers is not enough to provide a REST interface; this interface must also follow the REST constraints including HATEOAS (hypermedia as the engine of application state).
- Callbacks REST handlers implement the following interface:
- init(Req, State) -&amp;gt; {cowboy_rest, Req, State} Callback(Req, State) -&amp;gt; {Result, Req, State} | {stop, Req, State} | {{switch_handler, Module}, Req, State} | {{switch_handler, Module, Opts}, Req, State} terminate(Reason, Req, State) -&amp;gt; ok %% optional Req :: cowboy_req:req() State :: any() Module :: module() Opts :: any() Reason :: normal | {crash, error | exit | throw, any()} Callback - see below Result - see below Default - see below The init/2 callback is common to all handlers.</description>
+Description The module cowboy_rest implements the HTTP state machine.
+Implementing REST handlers is not enough to provide a REST interface; this interface must also follow the REST constraints including HATEOAS (hypermedia as the engine of application state).
+Callbacks REST handlers implement the following interface:
+init(Req, State) -&amp;gt; {cowboy_rest, Req, State} Callback(Req, State) -&amp;gt; {Result, Req, State} | {stop, Req, State} | {{switch_handler, Module}, Req, State} | {{switch_handler, Module, Opts}, Req, State} terminate(Reason, Req, State) -&amp;gt; ok %% optional Req :: cowboy_req:req() State :: any() Module :: module() Opts :: any() Reason :: normal | {crash, error | exit | throw, any()} Callback - see below Result - see below Default - see below The init/2 callback is common to all handlers.</description>
</item>
<item>
@@ -5991,10 +6310,10 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/manual/cowboy_rest/</guid>
<description>Name cowboy_rest - REST handlers
- Description The module cowboy_rest implements the HTTP state machine.
- Implementing REST handlers is not enough to provide a REST interface; this interface must also follow the REST constraints including HATEOAS (hypermedia as the engine of application state).
- Callbacks REST handlers implement the following interface:
- init(Req, State) -&amp;gt; {cowboy_rest, Req, State} Callback(Req, State) -&amp;gt; {Result, Req, State} | {stop, Req, State} | {{switch_handler, Module}, Req, State} | {{switch_handler, Module, Opts}, Req, State} terminate(Reason, Req, State) -&amp;gt; ok %% optional Req :: cowboy_req:req() State :: any() Module :: module() Opts :: any() Reason :: normal | {crash, error | exit | throw, any()} Callback - see below Result - see below Default - see below The init/2 callback is common to all handlers.</description>
+Description The module cowboy_rest implements the HTTP state machine.
+Implementing REST handlers is not enough to provide a REST interface; this interface must also follow the REST constraints including HATEOAS (hypermedia as the engine of application state).
+Callbacks REST handlers implement the following interface:
+init(Req, State) -&amp;gt; {cowboy_rest, Req, State} Callback(Req, State) -&amp;gt; {Result, Req, State} | {stop, Req, State} | {{switch_handler, Module}, Req, State} | {{switch_handler, Module, Opts}, Req, State} terminate(Reason, Req, State) -&amp;gt; ok %% optional Req :: cowboy_req:req() State :: any() Module :: module() Opts :: any() Reason :: normal | {crash, error | exit | throw, any()} Callback - see below Result - see below Default - see below The init/2 callback is common to all handlers.</description>
</item>
<item>
@@ -6004,10 +6323,10 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/manual/cowboy_rest/</guid>
<description>Name cowboy_rest - REST handlers
- Description The module cowboy_rest implements the HTTP state machine.
- Implementing REST handlers is not enough to provide a REST interface; this interface must also follow the REST constraints including HATEOAS (hypermedia as the engine of application state).
- Callbacks REST handlers implement the following interface:
- init(Req, State) -&amp;gt; {cowboy_rest, Req, State} Callback(Req, State) -&amp;gt; {Result, Req, State} | {stop, Req, State} | {{switch_handler, Module}, Req, State} | {{switch_handler, Module, Opts}, Req, State} terminate(Reason, Req, State) -&amp;gt; ok %% optional Req :: cowboy_req:req() State :: any() Module :: module() Opts :: any() Reason :: normal | {crash, error | exit | throw, any()} Callback - see below Result - see below Default - see below The init/2 callback is common to all handlers.</description>
+Description The module cowboy_rest implements the HTTP state machine.
+Implementing REST handlers is not enough to provide a REST interface; this interface must also follow the REST constraints including HATEOAS (hypermedia as the engine of application state).
+Callbacks REST handlers implement the following interface:
+init(Req, State) -&amp;gt; {cowboy_rest, Req, State} Callback(Req, State) -&amp;gt; {Result, Req, State} | {stop, Req, State} | {{switch_handler, Module}, Req, State} | {{switch_handler, Module, Opts}, Req, State} terminate(Reason, Req, State) -&amp;gt; ok %% optional Req :: cowboy_req:req() State :: any() Module :: module() Opts :: any() Reason :: normal | {crash, error | exit | throw, any()} Callback - see below Result - see below Default - see below The init/2 callback is common to all handlers.</description>
</item>
<item>
@@ -6017,9 +6336,10 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy_router/</guid>
<description>Name cowboy_router - Router middleware
- Description The cowboy_router middleware maps the requested host and path to the handler to be used for processing the request.
- The router takes the dispatch rules as input from the middleware environment. Dispatch rules are generated by calling the cowboy_router:compile(3) function.
- When a route matches, the router sets the handler and handler_opts middleware environment values containing the handler module and initial state, respectively.</description>
+Description The cowboy_router middleware maps the requested host and path to the handler to be used for processing the request.
+The router takes the dispatch rules as input from the middleware environment. Dispatch rules are generated by calling the cowboy_router:compile(3) function.
+When a route matches, the router sets the handler and handler_opts middleware environment values containing the handler module and initial state, respectively.
+The router will stop execution when no route matches.</description>
</item>
<item>
@@ -6029,9 +6349,10 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/manual/cowboy_router/</guid>
<description>Name cowboy_router - Router middleware
- Description The cowboy_router middleware maps the requested host and path to the handler to be used for processing the request.
- The router takes the dispatch rules as input from the middleware environment. Dispatch rules are generated by calling the cowboy_router:compile(3) function.
- When a route matches, the router sets the handler and handler_opts middleware environment values containing the handler module and initial state, respectively.</description>
+Description The cowboy_router middleware maps the requested host and path to the handler to be used for processing the request.
+The router takes the dispatch rules as input from the middleware environment. Dispatch rules are generated by calling the cowboy_router:compile(3) function.
+When a route matches, the router sets the handler and handler_opts middleware environment values containing the handler module and initial state, respectively.
+The router will stop execution when no route matches.</description>
</item>
<item>
@@ -6041,9 +6362,10 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/manual/cowboy_router/</guid>
<description>Name cowboy_router - Router middleware
- Description The cowboy_router middleware maps the requested host and path to the handler to be used for processing the request.
- The router takes the dispatch rules as input from the middleware environment. Dispatch rules are generated by calling the cowboy_router:compile(3) function.
- When a route matches, the router sets the handler and handler_opts middleware environment values containing the handler module and initial state, respectively.</description>
+Description The cowboy_router middleware maps the requested host and path to the handler to be used for processing the request.
+The router takes the dispatch rules as input from the middleware environment. Dispatch rules are generated by calling the cowboy_router:compile(3) function.
+When a route matches, the router sets the handler and handler_opts middleware environment values containing the handler module and initial state, respectively.
+The router will stop execution when no route matches.</description>
</item>
<item>
@@ -6053,9 +6375,10 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/manual/cowboy_router/</guid>
<description>Name cowboy_router - Router middleware
- Description The cowboy_router middleware maps the requested host and path to the handler to be used for processing the request.
- The router takes the dispatch rules as input from the middleware environment. Dispatch rules are generated by calling the cowboy_router:compile(3) function.
- When a route matches, the router sets the handler and handler_opts middleware environment values containing the handler module and initial state, respectively.</description>
+Description The cowboy_router middleware maps the requested host and path to the handler to be used for processing the request.
+The router takes the dispatch rules as input from the middleware environment. Dispatch rules are generated by calling the cowboy_router:compile(3) function.
+When a route matches, the router sets the handler and handler_opts middleware environment values containing the handler module and initial state, respectively.
+The router will stop execution when no route matches.</description>
</item>
<item>
@@ -6065,9 +6388,10 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/manual/cowboy_router/</guid>
<description>Name cowboy_router - Router middleware
- Description The cowboy_router middleware maps the requested host and path to the handler to be used for processing the request.
- The router takes the dispatch rules as input from the middleware environment. Dispatch rules are generated by calling the cowboy_router:compile(3) function.
- When a route matches, the router sets the handler and handler_opts middleware environment values containing the handler module and initial state, respectively.</description>
+Description The cowboy_router middleware maps the requested host and path to the handler to be used for processing the request.
+The router takes the dispatch rules as input from the middleware environment. Dispatch rules are generated by calling the cowboy_router:compile(3) function.
+When a route matches, the router sets the handler and handler_opts middleware environment values containing the handler module and initial state, respectively.
+The router will stop execution when no route matches.</description>
</item>
<item>
@@ -6077,9 +6401,11 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy_router.compile/</guid>
<description>Name cowboy_router:compile - Compile routes to the resources
- Description compile(cowboy_router:routes()) -&amp;gt; cowboy_router:dispatch_rules() Compile routes to the resources.
- Takes a human readable list of routes and transforms it into a form more efficient to process.
- Arguments Routes Human readable list of routes. Return value An opaque dispatch rules value is returned. This value must be given to Cowboy as a middleware environment value.</description>
+Description compile(cowboy_router:routes()) -&amp;gt; cowboy_router:dispatch_rules() Compile routes to the resources.
+Takes a human readable list of routes and transforms it into a form more efficient to process.
+Arguments Routes Human readable list of routes.
+ Return value An opaque dispatch rules value is returned. This value must be given to Cowboy as a middleware environment value.
+Changelog 1.0: Function introduced. Examples Compile routes and start a listener Dispatch = cowboy_router:compile([ {&#39;_&#39;, [ {&#34;</description>
</item>
<item>
@@ -6089,9 +6415,11 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/manual/cowboy_router.compile/</guid>
<description>Name cowboy_router:compile - Compile routes to the resources
- Description compile(cowboy_router:routes()) -&amp;gt; cowboy_router:dispatch_rules() Compile routes to the resources.
- Takes a human readable list of routes and transforms it into a form more efficient to process.
- Arguments Routes Human readable list of routes. Return value An opaque dispatch rules value is returned. This value must be given to Cowboy as a middleware environment value.</description>
+Description compile(cowboy_router:routes()) -&amp;gt; cowboy_router:dispatch_rules() Compile routes to the resources.
+Takes a human readable list of routes and transforms it into a form more efficient to process.
+Arguments Routes Human readable list of routes.
+ Return value An opaque dispatch rules value is returned. This value must be given to Cowboy as a middleware environment value.
+Changelog 1.0: Function introduced. Examples Compile routes and start a listener Dispatch = cowboy_router:compile([ {&#39;_&#39;, [ {&#34;</description>
</item>
<item>
@@ -6101,9 +6429,11 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/manual/cowboy_router.compile/</guid>
<description>Name cowboy_router:compile - Compile routes to the resources
- Description compile(cowboy_router:routes()) -&amp;gt; cowboy_router:dispatch_rules() Compile routes to the resources.
- Takes a human readable list of routes and transforms it into a form more efficient to process.
- Arguments Routes Human readable list of routes. Return value An opaque dispatch rules value is returned. This value must be given to Cowboy as a middleware environment value.</description>
+Description compile(cowboy_router:routes()) -&amp;gt; cowboy_router:dispatch_rules() Compile routes to the resources.
+Takes a human readable list of routes and transforms it into a form more efficient to process.
+Arguments Routes Human readable list of routes.
+ Return value An opaque dispatch rules value is returned. This value must be given to Cowboy as a middleware environment value.
+Changelog 1.0: Function introduced. Examples Compile routes and start a listener Dispatch = cowboy_router:compile([ {&#39;_&#39;, [ {&#34;</description>
</item>
<item>
@@ -6113,9 +6443,11 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/manual/cowboy_router.compile/</guid>
<description>Name cowboy_router:compile - Compile routes to the resources
- Description compile(cowboy_router:routes()) -&amp;gt; cowboy_router:dispatch_rules() Compile routes to the resources.
- Takes a human readable list of routes and transforms it into a form more efficient to process.
- Arguments Routes Human readable list of routes. Return value An opaque dispatch rules value is returned. This value must be given to Cowboy as a middleware environment value.</description>
+Description compile(cowboy_router:routes()) -&amp;gt; cowboy_router:dispatch_rules() Compile routes to the resources.
+Takes a human readable list of routes and transforms it into a form more efficient to process.
+Arguments Routes Human readable list of routes.
+ Return value An opaque dispatch rules value is returned. This value must be given to Cowboy as a middleware environment value.
+Changelog 1.0: Function introduced. Examples Compile routes and start a listener Dispatch = cowboy_router:compile([ {&#39;_&#39;, [ {&#34;</description>
</item>
<item>
@@ -6125,9 +6457,11 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/manual/cowboy_router.compile/</guid>
<description>Name cowboy_router:compile - Compile routes to the resources
- Description compile(cowboy_router:routes()) -&amp;gt; cowboy_router:dispatch_rules() Compile routes to the resources.
- Takes a human readable list of routes and transforms it into a form more efficient to process.
- Arguments Routes Human readable list of routes. Return value An opaque dispatch rules value is returned. This value must be given to Cowboy as a middleware environment value.</description>
+Description compile(cowboy_router:routes()) -&amp;gt; cowboy_router:dispatch_rules() Compile routes to the resources.
+Takes a human readable list of routes and transforms it into a form more efficient to process.
+Arguments Routes Human readable list of routes.
+ Return value An opaque dispatch rules value is returned. This value must be given to Cowboy as a middleware environment value.
+Changelog 1.0: Function introduced. Examples Compile routes and start a listener Dispatch = cowboy_router:compile([ {&#39;_&#39;, [ {&#34;</description>
</item>
<item>
@@ -6137,9 +6471,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy_static/</guid>
<description>Name cowboy_static - Static file handler
- Description The module cowboy_static implements file serving capabilities using the REST semantics provided by cowboy_rest.
- The static file handler is a pre-written handler coming with Cowboy. To serve files, use it in your routes.
- Options opts() :: {priv_file, App, Path} | {priv_file, App, Path, Extra} | {file, Path} | {file, Path, Extra} | {priv_dir, App, Path} | {priv_dir, App, Path, Extra} | {dir, Path} | {dir, Path, Extra} App :: atom() Path :: binary() | string() Extra :: [Etag | Mimetypes] Etag :: {etag, module(), function()} | {etag, false} Mimetypes :: {mimetypes, module(), function()} | {mimetypes, binary() | ParsedMime} ParsedMime :: {Type :: binary(), SubType :: binary(), Params} Params :: [{Key :: binary(), Value :: binary()}] Static handler configuration.</description>
+Description The module cowboy_static implements file serving capabilities using the REST semantics provided by cowboy_rest.
+The static file handler is a pre-written handler coming with Cowboy. To serve files, use it in your routes.
+Options opts() :: {priv_file, App, Path} | {priv_file, App, Path, Extra} | {file, Path} | {file, Path, Extra} | {priv_dir, App, Path} | {priv_dir, App, Path, Extra} | {dir, Path} | {dir, Path, Extra} App :: atom() Path :: binary() | string() Extra :: [Etag | Mimetypes] Etag :: {etag, module(), function()} | {etag, false} Mimetypes :: {mimetypes, module(), function()} | {mimetypes, binary() | ParsedMime} ParsedMime :: {Type :: binary(), SubType :: binary(), Params} Params :: [{Key :: binary(), Value :: binary()}] Static handler configuration.</description>
</item>
<item>
@@ -6149,9 +6483,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/manual/cowboy_static/</guid>
<description>Name cowboy_static - Static file handler
- Description The module cowboy_static implements file serving capabilities using the REST semantics provided by cowboy_rest.
- The static file handler is a pre-written handler coming with Cowboy. To serve files, use it in your routes.
- Options opts() :: {priv_file, App, Path} | {priv_file, App, Path, Extra} | {file, Path} | {file, Path, Extra} | {priv_dir, App, Path} | {priv_dir, App, Path, Extra} | {dir, Path} | {dir, Path, Extra} App :: atom() Path :: binary() | string() Extra :: [Etag | Mimetypes] Etag :: {etag, module(), function()} | {etag, false} Mimetypes :: {mimetypes, module(), function()} | {mimetypes, binary() | ParsedMime} ParsedMime :: {Type :: binary(), SubType :: binary(), Params} Params :: [{Key :: binary(), Value :: binary()}] Static handler configuration.</description>
+Description The module cowboy_static implements file serving capabilities using the REST semantics provided by cowboy_rest.
+The static file handler is a pre-written handler coming with Cowboy. To serve files, use it in your routes.
+Options opts() :: {priv_file, App, Path} | {priv_file, App, Path, Extra} | {file, Path} | {file, Path, Extra} | {priv_dir, App, Path} | {priv_dir, App, Path, Extra} | {dir, Path} | {dir, Path, Extra} App :: atom() Path :: binary() | string() Extra :: [Etag | Mimetypes] Etag :: {etag, module(), function()} | {etag, false} Mimetypes :: {mimetypes, module(), function()} | {mimetypes, binary() | ParsedMime} ParsedMime :: {Type :: binary(), SubType :: binary(), Params} Params :: [{Key :: binary(), Value :: binary()}] Static handler configuration.</description>
</item>
<item>
@@ -6161,9 +6495,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/manual/cowboy_static/</guid>
<description>Name cowboy_static - Static file handler
- Description The module cowboy_static implements file serving capabilities using the REST semantics provided by cowboy_rest.
- The static file handler is a pre-written handler coming with Cowboy. To serve files, use it in your routes.
- Options opts() :: {priv_file, App, Path} | {priv_file, App, Path, Extra} | {file, Path} | {file, Path, Extra} | {priv_dir, App, Path} | {priv_dir, App, Path, Extra} | {dir, Path} | {dir, Path, Extra} App :: atom() Path :: binary() | string() Extra :: [Etag | Mimetypes] Etag :: {etag, module(), function()} | {etag, false} Mimetypes :: {mimetypes, module(), function()} | {mimetypes, binary() | ParsedMime} ParsedMime :: {Type :: binary(), SubType :: binary(), Params} Params :: [{Key :: binary(), Value :: binary()}] Static handler configuration.</description>
+Description The module cowboy_static implements file serving capabilities using the REST semantics provided by cowboy_rest.
+The static file handler is a pre-written handler coming with Cowboy. To serve files, use it in your routes.
+Options opts() :: {priv_file, App, Path} | {priv_file, App, Path, Extra} | {file, Path} | {file, Path, Extra} | {priv_dir, App, Path} | {priv_dir, App, Path, Extra} | {dir, Path} | {dir, Path, Extra} App :: atom() Path :: binary() | string() Extra :: [Etag | Mimetypes] Etag :: {etag, module(), function()} | {etag, false} Mimetypes :: {mimetypes, module(), function()} | {mimetypes, binary() | ParsedMime} ParsedMime :: {Type :: binary(), SubType :: binary(), Params} Params :: [{Key :: binary(), Value :: binary()}] Static handler configuration.</description>
</item>
<item>
@@ -6173,9 +6507,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/manual/cowboy_static/</guid>
<description>Name cowboy_static - Static file handler
- Description The module cowboy_static implements file serving capabilities using the REST semantics provided by cowboy_rest.
- The static file handler is a pre-written handler coming with Cowboy. To serve files, use it in your routes.
- Options opts() :: {priv_file, App, Path} | {priv_file, App, Path, Extra} | {file, Path} | {file, Path, Extra} | {priv_dir, App, Path} | {priv_dir, App, Path, Extra} | {dir, Path} | {dir, Path, Extra} App :: atom() Path :: binary() | string() Extra :: [Etag | Mimetypes] Etag :: {etag, module(), function()} | {etag, false} Mimetypes :: {mimetypes, module(), function()} | {mimetypes, binary() | ParsedMime} ParsedMime :: {Type :: binary(), SubType :: binary(), Params} Params :: [{Key :: binary(), Value :: binary()}] Static handler configuration.</description>
+Description The module cowboy_static implements file serving capabilities using the REST semantics provided by cowboy_rest.
+The static file handler is a pre-written handler coming with Cowboy. To serve files, use it in your routes.
+Options opts() :: {priv_file, App, Path} | {priv_file, App, Path, Extra} | {file, Path} | {file, Path, Extra} | {priv_dir, App, Path} | {priv_dir, App, Path, Extra} | {dir, Path} | {dir, Path, Extra} App :: atom() Path :: binary() | string() Extra :: [Etag | Mimetypes] Etag :: {etag, module(), function()} | {etag, false} Mimetypes :: {mimetypes, module(), function()} | {mimetypes, binary() | ParsedMime} ParsedMime :: {Type :: binary(), SubType :: binary(), Params} Params :: [{Key :: binary(), Value :: binary()}] Static handler configuration.</description>
</item>
<item>
@@ -6185,9 +6519,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/manual/cowboy_static/</guid>
<description>Name cowboy_static - Static file handler
- Description The module cowboy_static implements file serving capabilities using the REST semantics provided by cowboy_rest.
- The static file handler is a pre-written handler coming with Cowboy. To serve files, use it in your routes.
- Options opts() :: {priv_file, App, Path} | {priv_file, App, Path, Extra} | {file, Path} | {file, Path, Extra} | {priv_dir, App, Path} | {priv_dir, App, Path, Extra} | {dir, Path} | {dir, Path, Extra} App :: atom() Path :: binary() | string() Extra :: [Etag | Mimetypes] Etag :: {etag, module(), function()} | {etag, false} Mimetypes :: {mimetypes, module(), function()} | {mimetypes, binary() | ParsedMime} ParsedMime :: {Type :: binary(), SubType :: binary(), Params} Params :: [{Key :: binary(), Value :: binary()}] Static handler configuration.</description>
+Description The module cowboy_static implements file serving capabilities using the REST semantics provided by cowboy_rest.
+The static file handler is a pre-written handler coming with Cowboy. To serve files, use it in your routes.
+Options opts() :: {priv_file, App, Path} | {priv_file, App, Path, Extra} | {file, Path} | {file, Path, Extra} | {priv_dir, App, Path} | {priv_dir, App, Path, Extra} | {dir, Path} | {dir, Path, Extra} App :: atom() Path :: binary() | string() Extra :: [Etag | Mimetypes] Etag :: {etag, module(), function()} | {etag, false} Mimetypes :: {mimetypes, module(), function()} | {mimetypes, binary() | ParsedMime} ParsedMime :: {Type :: binary(), SubType :: binary(), Params} Params :: [{Key :: binary(), Value :: binary()}] Static handler configuration.</description>
</item>
<item>
@@ -6197,9 +6531,10 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy_stream/</guid>
<description>Name cowboy_handler - Stream handlers
- Description The module cowboy_stream defines a callback interface and a protocol for handling HTTP streams.
- An HTTP request and its associated response is called a stream. A connection may have many streams. In HTTP/1.1 they are executed sequentially, while in HTTP/2 they are executed concurrently.
- Cowboy calls the stream handler for nearly all events related to a stream. Exceptions vary depending on the protocol.</description>
+Description The module cowboy_stream defines a callback interface and a protocol for handling HTTP streams.
+An HTTP request and its associated response is called a stream. A connection may have many streams. In HTTP/1.1 they are executed sequentially, while in HTTP/2 they are executed concurrently.
+Cowboy calls the stream handler for nearly all events related to a stream. Exceptions vary depending on the protocol.
+Extra care must be taken when implementing stream handlers to ensure compatibility.</description>
</item>
<item>
@@ -6209,9 +6544,10 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/manual/cowboy_stream/</guid>
<description>Name cowboy_handler - Stream handlers
- Description The module cowboy_stream defines a callback interface and a protocol for handling HTTP streams.
- An HTTP request and its associated response is called a stream. A connection may have many streams. In HTTP/1.1 they are executed sequentially, while in HTTP/2 they are executed concurrently.
- Cowboy calls the stream handler for nearly all events related to a stream. Exceptions vary depending on the protocol.</description>
+Description The module cowboy_stream defines a callback interface and a protocol for handling HTTP streams.
+An HTTP request and its associated response is called a stream. A connection may have many streams. In HTTP/1.1 they are executed sequentially, while in HTTP/2 they are executed concurrently.
+Cowboy calls the stream handler for nearly all events related to a stream. Exceptions vary depending on the protocol.
+Extra care must be taken when implementing stream handlers to ensure compatibility.</description>
</item>
<item>
@@ -6221,9 +6557,10 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/manual/cowboy_stream/</guid>
<description>Name cowboy_handler - Stream handlers
- Description The module cowboy_stream defines a callback interface and a protocol for handling HTTP streams.
- An HTTP request and its associated response is called a stream. A connection may have many streams. In HTTP/1.1 they are executed sequentially, while in HTTP/2 they are executed concurrently.
- Cowboy calls the stream handler for nearly all events related to a stream. Exceptions vary depending on the protocol.</description>
+Description The module cowboy_stream defines a callback interface and a protocol for handling HTTP streams.
+An HTTP request and its associated response is called a stream. A connection may have many streams. In HTTP/1.1 they are executed sequentially, while in HTTP/2 they are executed concurrently.
+Cowboy calls the stream handler for nearly all events related to a stream. Exceptions vary depending on the protocol.
+Extra care must be taken when implementing stream handlers to ensure compatibility.</description>
</item>
<item>
@@ -6233,9 +6570,10 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/manual/cowboy_stream/</guid>
<description>Name cowboy_handler - Stream handlers
- Description The module cowboy_stream defines a callback interface and a protocol for handling HTTP streams.
- An HTTP request and its associated response is called a stream. A connection may have many streams. In HTTP/1.1 they are executed sequentially, while in HTTP/2 they are executed concurrently.
- Cowboy calls the stream handler for nearly all events related to a stream. Exceptions vary depending on the protocol.</description>
+Description The module cowboy_stream defines a callback interface and a protocol for handling HTTP streams.
+An HTTP request and its associated response is called a stream. A connection may have many streams. In HTTP/1.1 they are executed sequentially, while in HTTP/2 they are executed concurrently.
+Cowboy calls the stream handler for nearly all events related to a stream. Exceptions vary depending on the protocol.
+Extra care must be taken when implementing stream handlers to ensure compatibility.</description>
</item>
<item>
@@ -6245,9 +6583,10 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/manual/cowboy_stream/</guid>
<description>Name cowboy_handler - Stream handlers
- Description The module cowboy_stream defines a callback interface and a protocol for handling HTTP streams.
- An HTTP request and its associated response is called a stream. A connection may have many streams. In HTTP/1.1 they are executed sequentially, while in HTTP/2 they are executed concurrently.
- Cowboy calls the stream handler for nearly all events related to a stream. Exceptions vary depending on the protocol.</description>
+Description The module cowboy_stream defines a callback interface and a protocol for handling HTTP streams.
+An HTTP request and its associated response is called a stream. A connection may have many streams. In HTTP/1.1 they are executed sequentially, while in HTTP/2 they are executed concurrently.
+Cowboy calls the stream handler for nearly all events related to a stream. Exceptions vary depending on the protocol.
+Extra care must be taken when implementing stream handlers to ensure compatibility.</description>
</item>
<item>
@@ -6257,9 +6596,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy_websocket/</guid>
<description>Name cowboy_websocket - Websocket
- Description The module cowboy_websocket implements Websocket as a Ranch protocol. It also defines a callback interface for handling Websocket connections.
- Callbacks Websocket handlers must implement the following callback interface:
- init(Req, State) -&amp;gt; {cowboy_websocket, Req, State} | {cowboy_websocket, Req, State, Opts} websocket_init(State) -&amp;gt; CallResult %% optional websocket_handle(InFrame, State) -&amp;gt; CallResult websocket_info(Info, State) -&amp;gt; CallResult terminate(Reason, PartialReq, State) -&amp;gt; ok %% optional Req :: cowboy_req:req() PartialReq :: map() State :: any() Opts :: cowboy_websocket:opts() InFrame :: {text | binary | ping | pong, binary()} OutFrame :: cow_ws:frame() %% see types below Info :: any() CallResult :: {ok, State} | {ok, State, hibernate} | {reply, OutFrame | [OutFrame], State} | {reply, OutFrame | [OutFrame], State, hibernate} | {stop, State} Reason :: normal | stop | timeout | remote | {remote, cow_ws:close_code(), binary()} | {error, badencoding | badframe | closed | atom()} | {crash, error | exit | throw, any()} The init/2 callback is common to all handlers.</description>
+Description The module cowboy_websocket implements Websocket as a Ranch protocol. It also defines a callback interface for handling Websocket connections.
+Callbacks Websocket handlers must implement the following callback interface:
+init(Req, State) -&amp;gt; {cowboy_websocket, Req, State} | {cowboy_websocket, Req, State, Opts} websocket_init(State) -&amp;gt; CallResult %% optional websocket_handle(InFrame, State) -&amp;gt; CallResult websocket_info(Info, State) -&amp;gt; CallResult terminate(Reason, PartialReq, State) -&amp;gt; ok %% optional Req :: cowboy_req:req() PartialReq :: map() State :: any() Opts :: cowboy_websocket:opts() InFrame :: {text | binary | ping | pong, binary()} OutFrame :: cow_ws:frame() %% see types below Info :: any() CallResult :: {ok, State} | {ok, State, hibernate} | {reply, OutFrame | [OutFrame], State} | {reply, OutFrame | [OutFrame], State, hibernate} | {stop, State} Reason :: normal | stop | timeout | remote | {remote, cow_ws:close_code(), binary()} | {error, badencoding | badframe | closed | atom()} | {crash, error | exit | throw, any()} The init/2 callback is common to all handlers.</description>
</item>
<item>
@@ -6269,9 +6608,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.1/manual/cowboy_websocket/</guid>
<description>Name cowboy_websocket - Websocket
- Description The module cowboy_websocket implements Websocket as a Ranch protocol. It also defines a callback interface for handling Websocket connections.
- Callbacks Websocket handlers must implement the following callback interface:
- init(Req, State) -&amp;gt; {cowboy_websocket, Req, State} | {cowboy_websocket, Req, State, Opts} websocket_init(State) -&amp;gt; CallResult %% optional websocket_handle(InFrame, State) -&amp;gt; CallResult websocket_info(Info, State) -&amp;gt; CallResult terminate(Reason, PartialReq, State) -&amp;gt; ok %% optional Req :: cowboy_req:req() PartialReq :: map() State :: any() Opts :: cowboy_websocket:opts() InFrame :: {text | binary | ping | pong, binary()} OutFrame :: cow_ws:frame() %% see types below Info :: any() CallResult :: {ok, State} | {ok, State, hibernate} | {reply, OutFrame | [OutFrame], State} | {reply, OutFrame | [OutFrame], State, hibernate} | {stop, State} Reason :: normal | stop | timeout | remote | {remote, cow_ws:close_code(), binary()} | {error, badencoding | badframe | closed | atom()} | {crash, error | exit | throw, any()} The init/2 callback is common to all handlers.</description>
+Description The module cowboy_websocket implements Websocket as a Ranch protocol. It also defines a callback interface for handling Websocket connections.
+Callbacks Websocket handlers must implement the following callback interface:
+init(Req, State) -&amp;gt; {cowboy_websocket, Req, State} | {cowboy_websocket, Req, State, Opts} websocket_init(State) -&amp;gt; CallResult %% optional websocket_handle(InFrame, State) -&amp;gt; CallResult websocket_info(Info, State) -&amp;gt; CallResult terminate(Reason, PartialReq, State) -&amp;gt; ok %% optional Req :: cowboy_req:req() PartialReq :: map() State :: any() Opts :: cowboy_websocket:opts() InFrame :: {text | binary | ping | pong, binary()} OutFrame :: cow_ws:frame() %% see types below Info :: any() CallResult :: {ok, State} | {ok, State, hibernate} | {reply, OutFrame | [OutFrame], State} | {reply, OutFrame | [OutFrame], State, hibernate} | {stop, State} Reason :: normal | stop | timeout | remote | {remote, cow_ws:close_code(), binary()} | {error, badencoding | badframe | closed | atom()} | {crash, error | exit | throw, any()} The init/2 callback is common to all handlers.</description>
</item>
<item>
@@ -6281,9 +6620,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.2/manual/cowboy_websocket/</guid>
<description>Name cowboy_websocket - Websocket
- Description The module cowboy_websocket implements Websocket as a Ranch protocol. It also defines a callback interface for handling Websocket connections.
- Callbacks Websocket handlers must implement the following callback interface:
- init(Req, State) -&amp;gt; {cowboy_websocket, Req, State} | {cowboy_websocket, Req, State, Opts} websocket_init(State) -&amp;gt; CallResult %% optional websocket_handle(InFrame, State) -&amp;gt; CallResult websocket_info(Info, State) -&amp;gt; CallResult terminate(Reason, PartialReq, State) -&amp;gt; ok %% optional Req :: cowboy_req:req() PartialReq :: map() State :: any() Opts :: cowboy_websocket:opts() InFrame :: {text | binary | ping | pong, binary()} OutFrame :: cow_ws:frame() %% see types below Info :: any() CallResult :: {ok, State} | {ok, State, hibernate} | {reply, OutFrame | [OutFrame], State} | {reply, OutFrame | [OutFrame], State, hibernate} | {stop, State} Reason :: normal | stop | timeout | remote | {remote, cow_ws:close_code(), binary()} | {error, badencoding | badframe | closed | atom()} | {crash, error | exit | throw, any()} The init/2 callback is common to all handlers.</description>
+Description The module cowboy_websocket implements Websocket as a Ranch protocol. It also defines a callback interface for handling Websocket connections.
+Callbacks Websocket handlers must implement the following callback interface:
+init(Req, State) -&amp;gt; {cowboy_websocket, Req, State} | {cowboy_websocket, Req, State, Opts} websocket_init(State) -&amp;gt; CallResult %% optional websocket_handle(InFrame, State) -&amp;gt; CallResult websocket_info(Info, State) -&amp;gt; CallResult terminate(Reason, PartialReq, State) -&amp;gt; ok %% optional Req :: cowboy_req:req() PartialReq :: map() State :: any() Opts :: cowboy_websocket:opts() InFrame :: {text | binary | ping | pong, binary()} OutFrame :: cow_ws:frame() %% see types below Info :: any() CallResult :: {ok, State} | {ok, State, hibernate} | {reply, OutFrame | [OutFrame], State} | {reply, OutFrame | [OutFrame], State, hibernate} | {stop, State} Reason :: normal | stop | timeout | remote | {remote, cow_ws:close_code(), binary()} | {error, badencoding | badframe | closed | atom()} | {crash, error | exit | throw, any()} The init/2 callback is common to all handlers.</description>
</item>
<item>
@@ -6293,9 +6632,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.3/manual/cowboy_websocket/</guid>
<description>Name cowboy_websocket - Websocket
- Description The module cowboy_websocket implements Websocket as a Ranch protocol. It also defines a callback interface for handling Websocket connections.
- Callbacks Websocket handlers must implement the following callback interface:
- init(Req, State) -&amp;gt; {cowboy_websocket, Req, State} | {cowboy_websocket, Req, State, Opts} websocket_init(State) -&amp;gt; CallResult %% optional websocket_handle(InFrame, State) -&amp;gt; CallResult websocket_info(Info, State) -&amp;gt; CallResult terminate(Reason, PartialReq, State) -&amp;gt; ok %% optional Req :: cowboy_req:req() PartialReq :: map() State :: any() Opts :: cowboy_websocket:opts() InFrame :: {text | binary | ping | pong, binary()} OutFrame :: cow_ws:frame() %% see types below Info :: any() CallResult :: {ok, State} | {ok, State, hibernate} | {reply, OutFrame | [OutFrame], State} | {reply, OutFrame | [OutFrame], State, hibernate} | {stop, State} Reason :: normal | stop | timeout | remote | {remote, cow_ws:close_code(), binary()} | {error, badencoding | badframe | closed | atom()} | {crash, error | exit | throw, any()} The init/2 callback is common to all handlers.</description>
+Description The module cowboy_websocket implements Websocket as a Ranch protocol. It also defines a callback interface for handling Websocket connections.
+Callbacks Websocket handlers must implement the following callback interface:
+init(Req, State) -&amp;gt; {cowboy_websocket, Req, State} | {cowboy_websocket, Req, State, Opts} websocket_init(State) -&amp;gt; CallResult %% optional websocket_handle(InFrame, State) -&amp;gt; CallResult websocket_info(Info, State) -&amp;gt; CallResult terminate(Reason, PartialReq, State) -&amp;gt; ok %% optional Req :: cowboy_req:req() PartialReq :: map() State :: any() Opts :: cowboy_websocket:opts() InFrame :: {text | binary | ping | pong, binary()} OutFrame :: cow_ws:frame() %% see types below Info :: any() CallResult :: {ok, State} | {ok, State, hibernate} | {reply, OutFrame | [OutFrame], State} | {reply, OutFrame | [OutFrame], State, hibernate} | {stop, State} Reason :: normal | stop | timeout | remote | {remote, cow_ws:close_code(), binary()} | {error, badencoding | badframe | closed | atom()} | {crash, error | exit | throw, any()} The init/2 callback is common to all handlers.</description>
</item>
<item>
@@ -6305,9 +6644,9 @@
<guid>https://ninenines.eu/docs/en/cowboy/2.4/manual/cowboy_websocket/</guid>
<description>Name cowboy_websocket - Websocket
- Description The module cowboy_websocket implements Websocket as a Ranch protocol. It also defines a callback interface for handling Websocket connections.
- Callbacks Websocket handlers must implement the following callback interface:
- init(Req, State) -&amp;gt; {cowboy_websocket, Req, State} | {cowboy_websocket, Req, State, Opts} websocket_init(State) -&amp;gt; CallResult %% optional websocket_handle(InFrame, State) -&amp;gt; CallResult websocket_info(Info, State) -&amp;gt; CallResult terminate(Reason, PartialReq, State) -&amp;gt; ok %% optional Req :: cowboy_req:req() PartialReq :: map() State :: any() Opts :: cowboy_websocket:opts() InFrame :: {text | binary | ping | pong, binary()} OutFrame :: cow_ws:frame() %% see types below Info :: any() CallResult :: {ok, State} | {ok, State, hibernate} | {reply, OutFrame | [OutFrame], State} | {reply, OutFrame | [OutFrame], State, hibernate} | {stop, State} Reason :: normal | stop | timeout | remote | {remote, cow_ws:close_code(), binary()} | {error, badencoding | badframe | closed | atom()} | {crash, error | exit | throw, any()} The init/2 callback is common to all handlers.</description>
+Description The module cowboy_websocket implements Websocket as a Ranch protocol. It also defines a callback interface for handling Websocket connections.
+Callbacks Websocket handlers must implement the following callback interface:
+init(Req, State) -&amp;gt; {cowboy_websocket, Req, State} | {cowboy_websocket, Req, State, Opts} websocket_init(State) -&amp;gt; CallResult %% optional websocket_handle(InFrame, State) -&amp;gt; CallResult websocket_info(Info, State) -&amp;gt; CallResult terminate(Reason, PartialReq, State) -&amp;gt; ok %% optional Req :: cowboy_req:req() PartialReq :: map() State :: any() Opts :: cowboy_websocket:opts() InFrame :: {text | binary | ping | pong, binary()} OutFrame :: cow_ws:frame() %% see types below Info :: any() CallResult :: {ok, State} | {ok, State, hibernate} | {reply, OutFrame | [OutFrame], State} | {reply, OutFrame | [OutFrame], State, hibernate} | {stop, State} Reason :: normal | stop | timeout | remote | {remote, cow_ws:close_code(), binary()} | {error, badencoding | badframe | closed | atom()} | {crash, error | exit | throw, any()} The init/2 callback is common to all handlers.</description>
</item>
<item>
@@ -6317,9 +6656,9 @@
<guid>https://ninenines.eu/docs/en/gun/1.0/manual/gun/</guid>
<description>Name gun - Asynchronous HTTP client
- Description The gun module provides an asynchronous interface for connecting and communicating with Web servers over HTTP, HTTP/2 or Websocket.
- Exports Connection:
- gun:open(3) - Open a connection to the given host and port gun:open_unix(3) - Open a connection to the given Unix domain socket gun:close(3) - Brutally close the connection gun:info(3) - Obtain information about the connection Requests:</description>
+Description The gun module provides an asynchronous interface for connecting and communicating with Web servers over HTTP, HTTP/2 or Websocket.
+Exports Connection:
+gun:open(3) - Open a connection to the given host and port gun:open_unix(3) - Open a connection to the given Unix domain socket gun:close(3) - Brutally close the connection gun:info(3) - Obtain information about the connection Requests:</description>
</item>
<item>
@@ -6329,9 +6668,9 @@
<guid>https://ninenines.eu/docs/en/gun/1.0/manual/gun_app/</guid>
<description>Name gun - HTTP/1.1, HTTP/2 and Websocket client for Erlang/OTP
- Description Gun is an HTTP client for Erlang/OTP with support for the HTTP/1.1, HTTP/2 and Websocket protocols.
- Gun aims to provide an easy to use, asynchronous and always-connected client. It maintains a permanent connection to the server and reconnects automatically when necessary.
- Modules gun(3) - Asynchronous HTTP client Dependencies cowlib(7) - Support library for manipulating Web protocols ssl - Secure communication over sockets All these applications must be started before the gun application.</description>
+Description Gun is an HTTP client for Erlang/OTP with support for the HTTP/1.1, HTTP/2 and Websocket protocols.
+Gun aims to provide an easy to use, asynchronous and always-connected client. It maintains a permanent connection to the server and reconnects automatically when necessary.
+Modules gun(3) - Asynchronous HTTP client Dependencies cowlib(7) - Support library for manipulating Web protocols ssl - Secure communication over sockets All these applications must be started before the gun application.</description>
</item>
<item>
@@ -6341,8 +6680,8 @@
<guid>https://ninenines.eu/docs/en/gun/1.0/manual/gun.await/</guid>
<description>Name gun:await - Wait for a response
- Description await(ConnPid, StreamRef) -&amp;gt; await(ConnPid, StreamRef, 5000, MonitorRef) await(ConnPid, StreamRef, MonitorRef) -&amp;gt; await(ConnPid, StreamRef, 5000, MonitorRef) await(ConnPid, StreamRef, Timeout) -&amp;gt; await(ConnPid, StreamRef, Timeout, MonitorRef) await(ConnPid, StreamRef, Timeout, MonitorRef) -&amp;gt; Result ConnPid :: pid() StreamRef :: reference() MonitorRef :: reference() Timeout :: timeout() Result :: tuple() - see below Wait for a response.
- This function waits for a message from the given stream and returns it as a tuple.</description>
+Description await(ConnPid, StreamRef) -&amp;gt; await(ConnPid, StreamRef, 5000, MonitorRef) await(ConnPid, StreamRef, MonitorRef) -&amp;gt; await(ConnPid, StreamRef, 5000, MonitorRef) await(ConnPid, StreamRef, Timeout) -&amp;gt; await(ConnPid, StreamRef, Timeout, MonitorRef) await(ConnPid, StreamRef, Timeout, MonitorRef) -&amp;gt; Result ConnPid :: pid() StreamRef :: reference() MonitorRef :: reference() Timeout :: timeout() Result :: tuple() - see below Wait for a response.
+This function waits for a message from the given stream and returns it as a tuple.</description>
</item>
<item>
@@ -6352,7 +6691,7 @@
<guid>https://ninenines.eu/docs/en/gun/1.0/manual/gun.await_body/</guid>
<description>Name gun:await_body - Wait for the complete response body
- Description await_body(ConnPid, StreamRef) -&amp;gt; await_body(ConnPid, StreamRef, 5000, MonitorRef) await_body(ConnPid, StreamRef, MonitorRef) -&amp;gt; await_body(ConnPid, StreamRef, 5000, MonitorRef) await_body(ConnPid, StreamRef, Timeout) -&amp;gt; await_body(ConnPid, StreamRef, Timeout, MonitorRef) await_body(ConnPid, StreamRef, Timeout, MonitorRef) -&amp;gt; {ok, Body} | {ok, Body, Trailers} | {error, Reason} ConnPid :: pid() StreamRef :: reference() MonitorRef :: reference() Timeout :: timeout() Body :: binary() Trailers :: [{binary(), binary()}] Reason :: timeout | any() Wait for the complete response body.</description>
+Description await_body(ConnPid, StreamRef) -&amp;gt; await_body(ConnPid, StreamRef, 5000, MonitorRef) await_body(ConnPid, StreamRef, MonitorRef) -&amp;gt; await_body(ConnPid, StreamRef, 5000, MonitorRef) await_body(ConnPid, StreamRef, Timeout) -&amp;gt; await_body(ConnPid, StreamRef, Timeout, MonitorRef) await_body(ConnPid, StreamRef, Timeout, MonitorRef) -&amp;gt; {ok, Body} | {ok, Body, Trailers} | {error, Reason} ConnPid :: pid() StreamRef :: reference() MonitorRef :: reference() Timeout :: timeout() Body :: binary() Trailers :: [{binary(), binary()}] Reason :: timeout | any() Wait for the complete response body.</description>
</item>
<item>
@@ -6362,8 +6701,8 @@
<guid>https://ninenines.eu/docs/en/gun/1.0/manual/gun.await_up/</guid>
<description>Name gun:await_up - Wait for the connection to be up
- Description await_up(ConnPid) -&amp;gt; await_up(ConnPid, 5000, MonitorRef) await_up(ConnPid, MonitorRef) -&amp;gt; await_up(ConnPid, 5000, MonitorRef) await_up(ConnPid, Timeout) -&amp;gt; await_up(ConnPid, Timeout, MonitorRef) await_up(ConnPid, Timeout, MonitorRef) -&amp;gt; {ok, Protocol} | {error, Reason} ConnPid :: pid() MonitorRef :: reference() Timeout :: timeout() Protocol :: http | http2 Reason :: timeout | any() Wait for the connection to be up.
- Arguments ConnPid The pid of the Gun connection process.</description>
+Description await_up(ConnPid) -&amp;gt; await_up(ConnPid, 5000, MonitorRef) await_up(ConnPid, MonitorRef) -&amp;gt; await_up(ConnPid, 5000, MonitorRef) await_up(ConnPid, Timeout) -&amp;gt; await_up(ConnPid, Timeout, MonitorRef) await_up(ConnPid, Timeout, MonitorRef) -&amp;gt; {ok, Protocol} | {error, Reason} ConnPid :: pid() MonitorRef :: reference() Timeout :: timeout() Protocol :: http | http2 Reason :: timeout | any() Wait for the connection to be up.
+Arguments ConnPid The pid of the Gun connection process.</description>
</item>
<item>
@@ -6373,9 +6712,9 @@
<guid>https://ninenines.eu/docs/en/gun/1.0/manual/gun.cancel/</guid>
<description>Name gun:cancel - Cancel the given stream
- Description cancel(ConnPid, StreamRef) -&amp;gt; ok ConnPid :: pid() StreamRef :: reference() Cancel the given stream.
- The behavior of this function depends on the protocol selected.
- HTTP/1.1 does not support this feature. Gun will simply silence the stream and stop relaying messages. Gun may also decide to close the connection if the response body is too large, to avoid wasting time and bandwidth.</description>
+Description cancel(ConnPid, StreamRef) -&amp;gt; ok ConnPid :: pid() StreamRef :: reference() Cancel the given stream.
+The behavior of this function depends on the protocol selected.
+HTTP/1.1 does not support this feature. Gun will simply silence the stream and stop relaying messages. Gun may also decide to close the connection if the response body is too large, to avoid wasting time and bandwidth.</description>
</item>
<item>
@@ -6385,9 +6724,10 @@
<guid>https://ninenines.eu/docs/en/gun/1.0/manual/gun.close/</guid>
<description>Name gun:close - Brutally close the connection
- Description close(ConnPid) -&amp;gt; ok ConnPid :: pid() Brutally close the connection.
- Arguments ConnPid The pid of the Gun connection process. Return value The atom ok is returned.
- Changelog 1.0: Function introduced. Examples Close the connection ok = gun:close(ConnPid). See also gun(3), gun:open(3), gun:open_unix(3)</description>
+Description close(ConnPid) -&amp;gt; ok ConnPid :: pid() Brutally close the connection.
+Arguments ConnPid The pid of the Gun connection process.
+ Return value The atom ok is returned.
+Changelog 1.0: Function introduced. Examples Close the connection ok = gun:close(ConnPid). See also gun(3), gun:open(3), gun:open_unix(3)</description>
</item>
<item>
@@ -6397,9 +6737,9 @@
<guid>https://ninenines.eu/docs/en/gun/1.0/manual/gun.data/</guid>
<description>Name gun:data - Stream the body of a request
- Description data(ConnPid, StreamRef, IsFin, Data) -&amp;gt; ok ConnPid :: pid() StreamRef :: reference() IsFin :: fin | nofin Data :: iodata() Stream the body of a request.
- This function can only be used if the original request had headers indicating that a body would be streamed.
- All calls to this function must use the nofin flag except for the last which must use fin to indicate the end of the request body.</description>
+Description data(ConnPid, StreamRef, IsFin, Data) -&amp;gt; ok ConnPid :: pid() StreamRef :: reference() IsFin :: fin | nofin Data :: iodata() Stream the body of a request.
+This function can only be used if the original request had headers indicating that a body would be streamed.
+All calls to this function must use the nofin flag except for the last which must use fin to indicate the end of the request body.</description>
</item>
<item>
@@ -6409,8 +6749,11 @@
<guid>https://ninenines.eu/docs/en/gun/1.0/manual/gun.delete/</guid>
<description>Name gun:delete - Delete a resource
- Description delete(ConnPid, Path) -&amp;gt; delete(ConnPid, Path, [], #{}). delete(ConnPid, Path, Headers) -&amp;gt; delete(ConnPid, Path, Headers, #{}) delete(ConnPid, Path, Headers, ReqOpts) -&amp;gt; StreamRef ConnPid :: pid() Path :: iodata() Headers :: [{binary(), iodata()}] ReqOpts :: gun:req_opts() StreamRef :: reference() Delete a resource.
- Arguments ConnPid The pid of the Gun connection process. Path Path to the resource.</description>
+Description delete(ConnPid, Path) -&amp;gt; delete(ConnPid, Path, [], #{}). delete(ConnPid, Path, Headers) -&amp;gt; delete(ConnPid, Path, Headers, #{}) delete(ConnPid, Path, Headers, ReqOpts) -&amp;gt; StreamRef ConnPid :: pid() Path :: iodata() Headers :: [{binary(), iodata()}] ReqOpts :: gun:req_opts() StreamRef :: reference() Delete a resource.
+Arguments ConnPid The pid of the Gun connection process.
+ Path Path to the resource.
+ Headers Additional request headers.
+ ReqOpts Request options.</description>
</item>
<item>
@@ -6420,9 +6763,11 @@
<guid>https://ninenines.eu/docs/en/gun/1.0/manual/gun.flush/</guid>
<description>Name gun:flush - Flush all messages related to a connection or a stream
- Description flush(ConnPid) -&amp;gt; ok flush(StreamRef) -&amp;gt; ok ConnPid :: pid() StreamRef :: reference() Flush all messages related to a connection or a stream.
- Arguments Either of these arguments may be provided:
- ConnPid The pid of the Gun connection process. StreamRef Identifier of the stream for the original request.</description>
+Description flush(ConnPid) -&amp;gt; ok flush(StreamRef) -&amp;gt; ok ConnPid :: pid() StreamRef :: reference() Flush all messages related to a connection or a stream.
+Arguments Either of these arguments may be provided:
+ConnPid The pid of the Gun connection process.
+ StreamRef Identifier of the stream for the original request.
+ Return value The atom ok is returned.</description>
</item>
<item>
@@ -6432,8 +6777,10 @@
<guid>https://ninenines.eu/docs/en/gun/1.0/manual/gun.get/</guid>
<description>Name gun:get - Get a resource representation
- Description get(ConnPid, Path) -&amp;gt; get(ConnPid, Path, [], #{}). get(ConnPid, Path, Headers) -&amp;gt; get(ConnPid, Path, Headers, #{}) get(ConnPid, Path, Headers, ReqOpts) -&amp;gt; StreamRef ConnPid :: pid() Path :: iodata() Headers :: [{binary(), iodata()}] ReqOpts :: gun:req_opts() StreamRef :: reference() Get a resource representation.
- Arguments ConnPid The pid of the Gun connection process. Path Path to the resource.</description>
+Description get(ConnPid, Path) -&amp;gt; get(ConnPid, Path, [], #{}). get(ConnPid, Path, Headers) -&amp;gt; get(ConnPid, Path, Headers, #{}) get(ConnPid, Path, Headers, ReqOpts) -&amp;gt; StreamRef ConnPid :: pid() Path :: iodata() Headers :: [{binary(), iodata()}] ReqOpts :: gun:req_opts() StreamRef :: reference() Get a resource representation.
+Arguments ConnPid The pid of the Gun connection process.
+ Path Path to the resource.
+ Headers Additional request headers.</description>
</item>
<item>
@@ -6443,8 +6790,8 @@
<guid>https://ninenines.eu/docs/en/gun/1.0/manual/gun.head/</guid>
<description>Name gun:head - Get headers of a resource representation
- Description head(ConnPid, Path) -&amp;gt; head(ConnPid, Path, [], #{}). head(ConnPid, Path, Headers) -&amp;gt; head(ConnPid, Path, Headers, #{}) head(ConnPid, Path, Headers, ReqOpts) -&amp;gt; StreamRef ConnPid :: pid() Path :: iodata() Headers :: [{binary(), iodata()}] ReqOpts :: gun:req_opts() StreamRef :: reference() Get headers of a resource representation.
- This function performs the same operation as gun:get(3), except the server will not send the resource representation, only the response&amp;#8217;s status code and headers.</description>
+Description head(ConnPid, Path) -&amp;gt; head(ConnPid, Path, [], #{}). head(ConnPid, Path, Headers) -&amp;gt; head(ConnPid, Path, Headers, #{}) head(ConnPid, Path, Headers, ReqOpts) -&amp;gt; StreamRef ConnPid :: pid() Path :: iodata() Headers :: [{binary(), iodata()}] ReqOpts :: gun:req_opts() StreamRef :: reference() Get headers of a resource representation.
+This function performs the same operation as gun:get(3), except the server will not send the resource representation, only the response&amp;apos;s status code and headers.</description>
</item>
<item>
@@ -6454,9 +6801,10 @@
<guid>https://ninenines.eu/docs/en/gun/1.0/manual/gun.info/</guid>
<description>Name gun:info - Obtain information about the connection
- Description info(ConnPid) -&amp;gt; Info ConnPid :: pid() Info :: #{ sock_ip =&amp;gt; inet:ip_address(), sock_port =&amp;gt; inet:port_number() } Obtain information about the connection.
- Arguments ConnPid The pid of the Gun connection process. Return value A map is returned containing various informations about the connection.
- Changelog 1.</description>
+Description info(ConnPid) -&amp;gt; Info ConnPid :: pid() Info :: #{ sock_ip =&amp;gt; inet:ip_address(), sock_port =&amp;gt; inet:port_number() } Obtain information about the connection.
+Arguments ConnPid The pid of the Gun connection process.
+ Return value A map is returned containing various informations about the connection.
+Changelog 1.0: Function introduced. Examples Obtain information about the connection Info = gun:info(ConnPid). See also gun(3), gun:open(3), gun:open_unix(3)</description>
</item>
<item>
@@ -6466,8 +6814,10 @@
<guid>https://ninenines.eu/docs/en/gun/1.0/manual/gun.open/</guid>
<description>Name gun:open - Open a connection to the given host and port
- Description open(Host, Port) -&amp;gt; open(Host, Port, #{}) open(Host, Port, Opts) -&amp;gt; {ok, pid()} | {error, any()} Host :: inet:hostname() | inet:ip_address() Port :: inet:port_number() Opts :: gun:opts() Open a connection to the given host and port.
- Arguments Host Host or IP address to connect to. Port Port to connect to.</description>
+Description open(Host, Port) -&amp;gt; open(Host, Port, #{}) open(Host, Port, Opts) -&amp;gt; {ok, pid()} | {error, any()} Host :: inet:hostname() | inet:ip_address() Port :: inet:port_number() Opts :: gun:opts() Open a connection to the given host and port.
+Arguments Host Host or IP address to connect to.
+ Port Port to connect to.
+ Opts Options for this connection.</description>
</item>
<item>
@@ -6477,8 +6827,10 @@
<guid>https://ninenines.eu/docs/en/gun/1.0/manual/gun.open_unix/</guid>
<description>Name gun:open_unix - Open a connection to the given Unix domain socket
- Description open_unix(SocketPath, Opts) -&amp;gt; {ok, pid()} | {error, any()} SocketPath :: string() Opts :: gun:opts() Open a connection to the given Unix domain socket.
- Arguments SocketPath Path to the Unix domain socket to connect to. Opts Options for this connection. Return value The pid of the newly created Gun process is returned.</description>
+Description open_unix(SocketPath, Opts) -&amp;gt; {ok, pid()} | {error, any()} SocketPath :: string() Opts :: gun:opts() Open a connection to the given Unix domain socket.
+Arguments SocketPath Path to the Unix domain socket to connect to.
+ Opts Options for this connection.
+ Return value The pid of the newly created Gun process is returned. Note that this does not indicate that the connection has been successfully opened; the gun_up(3) message will be sent for that.</description>
</item>
<item>
@@ -6488,8 +6840,8 @@
<guid>https://ninenines.eu/docs/en/gun/1.0/manual/gun.options/</guid>
<description>Name gun:options - Query the capabilities of the server or a resource
- Description options(ConnPid, Path) -&amp;gt; options(ConnPid, Path, [], #{}). options(ConnPid, Path, Headers) -&amp;gt; options(ConnPid, Path, Headers, #{}) options(ConnPid, Path, Headers, ReqOpts) -&amp;gt; StreamRef ConnPid :: pid() Path :: iodata() Headers :: [{binary(), iodata()}] ReqOpts :: gun:req_opts() StreamRef :: reference() Query the capabilities of the server or a resource.
- The special path &#34;*&#34; can be used to obtain information about the server as a whole.</description>
+Description options(ConnPid, Path) -&amp;gt; options(ConnPid, Path, [], #{}). options(ConnPid, Path, Headers) -&amp;gt; options(ConnPid, Path, Headers, #{}) options(ConnPid, Path, Headers, ReqOpts) -&amp;gt; StreamRef ConnPid :: pid() Path :: iodata() Headers :: [{binary(), iodata()}] ReqOpts :: gun:req_opts() StreamRef :: reference() Query the capabilities of the server or a resource.
+The special path &amp;quot;*&amp;quot; can be used to obtain information about the server as a whole.</description>
</item>
<item>
@@ -6499,8 +6851,8 @@
<guid>https://ninenines.eu/docs/en/gun/1.0/manual/gun.patch/</guid>
<description>Name gun:patch - Apply a set of changes to a resource
- Description patch(ConnPid, Path, Headers) -&amp;gt; StreamRef patch(ConnPid, Path, Headers, Body) -&amp;gt; patch(ConnPid, Path, Headers, Body, #{}) patch(ConnPid, Path, Headers, Body, ReqOpts) -&amp;gt; StreamRef ConnPid :: pid() Path :: iodata() Headers :: [{binary(), iodata()}] Body :: iodata() ReqOpts :: gun:req_opts() StreamRef :: reference() Apply a set of changes to a resource.
- The behavior of this function varies depending on whether a body is provided.</description>
+Description patch(ConnPid, Path, Headers) -&amp;gt; StreamRef patch(ConnPid, Path, Headers, Body) -&amp;gt; patch(ConnPid, Path, Headers, Body, #{}) patch(ConnPid, Path, Headers, Body, ReqOpts) -&amp;gt; StreamRef ConnPid :: pid() Path :: iodata() Headers :: [{binary(), iodata()}] Body :: iodata() ReqOpts :: gun:req_opts() StreamRef :: reference() Apply a set of changes to a resource.
+The behavior of this function varies depending on whether a body is provided.</description>
</item>
<item>
@@ -6509,9 +6861,9 @@
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://ninenines.eu/docs/en/gun/1.0/manual/gun.post/</guid>
- <description>Name gun:post - Process the enclosed representation according to a resource&amp;#8217;s own semantics
- Description post(ConnPid, Path, Headers) -&amp;gt; StreamRef post(ConnPid, Path, Headers, Body) -&amp;gt; post(ConnPid, Path, Headers, Body, #{}) post(ConnPid, Path, Headers, Body, ReqOpts) -&amp;gt; StreamRef ConnPid :: pid() Path :: iodata() Headers :: [{binary(), iodata()}] Body :: iodata() ReqOpts :: gun:req_opts() StreamRef :: reference() Process the enclosed representation according to a resource&amp;#8217;s own semantics.
- The behavior of this function varies depending on whether a body is provided.</description>
+ <description>Name gun:post - Process the enclosed representation according to a resource&amp;apos;s own semantics
+Description post(ConnPid, Path, Headers) -&amp;gt; StreamRef post(ConnPid, Path, Headers, Body) -&amp;gt; post(ConnPid, Path, Headers, Body, #{}) post(ConnPid, Path, Headers, Body, ReqOpts) -&amp;gt; StreamRef ConnPid :: pid() Path :: iodata() Headers :: [{binary(), iodata()}] Body :: iodata() ReqOpts :: gun:req_opts() StreamRef :: reference() Process the enclosed representation according to a resource&amp;apos;s own semantics.
+The behavior of this function varies depending on whether a body is provided.</description>
</item>
<item>
@@ -6521,8 +6873,9 @@
<guid>https://ninenines.eu/docs/en/gun/1.0/manual/gun.put/</guid>
<description>Name gun:put - Create or replace a resource
- Description put(ConnPid, Path, Headers) -&amp;gt; StreamRef put(ConnPid, Path, Headers, Body) -&amp;gt; put(ConnPid, Path, Headers, Body, #{}) put(ConnPid, Path, Headers, Body, ReqOpts) -&amp;gt; StreamRef ConnPid :: pid() Path :: iodata() Headers :: [{binary(), iodata()}] Body :: iodata() ReqOpts :: gun:req_opts() StreamRef :: reference() Create or replace a resource.
- The behavior of this function varies depending on whether a body is provided.</description>
+Description put(ConnPid, Path, Headers) -&amp;gt; StreamRef put(ConnPid, Path, Headers, Body) -&amp;gt; put(ConnPid, Path, Headers, Body, #{}) put(ConnPid, Path, Headers, Body, ReqOpts) -&amp;gt; StreamRef ConnPid :: pid() Path :: iodata() Headers :: [{binary(), iodata()}] Body :: iodata() ReqOpts :: gun:req_opts() StreamRef :: reference() Create or replace a resource.
+The behavior of this function varies depending on whether a body is provided.
+The function put/3 expects either a content-length or content-type header to indicate that a body will be sent afterwards.</description>
</item>
<item>
@@ -6532,8 +6885,8 @@
<guid>https://ninenines.eu/docs/en/gun/1.0/manual/gun.request/</guid>
<description>Name gun:request - Perform the given request
- Description request(ConnPid, Method, Path, Headers) -&amp;gt; StreamRef request(ConnPid, Method, Path, Headers, Body) -&amp;gt; request(ConnPid, Method, Path, Headers, Body, #{}) request(ConnPid, Method, Path, Headers, Body, ReqOpts) -&amp;gt; StreamRef ConnPid :: pid() Method :: binary() Path :: iodata() Headers :: [{binary(), iodata()}] Body :: iodata() ReqOpts :: gun:req_opts() StreamRef :: reference() Perform the given request.
- This is a general purpose function that should only be used when other method-specific functions do not apply.</description>
+Description request(ConnPid, Method, Path, Headers) -&amp;gt; StreamRef request(ConnPid, Method, Path, Headers, Body) -&amp;gt; request(ConnPid, Method, Path, Headers, Body, #{}) request(ConnPid, Method, Path, Headers, Body, ReqOpts) -&amp;gt; StreamRef ConnPid :: pid() Method :: binary() Path :: iodata() Headers :: [{binary(), iodata()}] Body :: iodata() ReqOpts :: gun:req_opts() StreamRef :: reference() Perform the given request.
+This is a general purpose function that should only be used when other method-specific functions do not apply.</description>
</item>
<item>
@@ -6543,9 +6896,10 @@
<guid>https://ninenines.eu/docs/en/gun/1.0/manual/gun.ws_send/</guid>
<description>Name gun:ws_send - Send Websocket frames
- Description ws_send(ConnPid, Frames) -&amp;gt; ok ConnPid :: pid() Frames :: Frame | [Frame] Frame :: close | ping | pong | {text | binary | close | ping | pong, iodata()} | {close, non_neg_integer(), iodata()} Send Websocket frames.
- The connection must first be upgraded to Websocket using the function gun:ws_upgrade(3).
- Arguments ConnPid The pid of the Gun connection process.</description>
+Description ws_send(ConnPid, Frames) -&amp;gt; ok ConnPid :: pid() Frames :: Frame | [Frame] Frame :: close | ping | pong | {text | binary | close | ping | pong, iodata()} | {close, non_neg_integer(), iodata()} Send Websocket frames.
+The connection must first be upgraded to Websocket using the function gun:ws_upgrade(3).
+Arguments ConnPid The pid of the Gun connection process.
+ Frames A Websocket frame.</description>
</item>
<item>
@@ -6555,9 +6909,9 @@
<guid>https://ninenines.eu/docs/en/gun/1.0/manual/gun.ws_upgrade/</guid>
<description>Name gun:ws_upgrade - Upgrade to Websocket
- Description ws_upgrade(ConnPid, Path) -&amp;gt; ws_upgrade(ConnPid, Path, []) ws_upgrade(ConnPid, Path, Headers) -&amp;gt; StreamRef ws_upgrade(ConnPid, Path, Headers, WsOpts) -&amp;gt; StreamRef ConnPid :: pid() Path :: iodata() Headers :: [{binary(), iodata()}] WsOpts :: gun:ws_opts StreamRef :: reference() Upgrade to Websocket.
- The behavior of this function depends on the protocol selected.
- HTTP/1.1 cannot handle Websocket and HTTP requests concurrently. The upgrade, if successful, will result in the complete takeover of the connection.</description>
+Description ws_upgrade(ConnPid, Path) -&amp;gt; ws_upgrade(ConnPid, Path, []) ws_upgrade(ConnPid, Path, Headers) -&amp;gt; StreamRef ws_upgrade(ConnPid, Path, Headers, WsOpts) -&amp;gt; StreamRef ConnPid :: pid() Path :: iodata() Headers :: [{binary(), iodata()}] WsOpts :: gun:ws_opts StreamRef :: reference() Upgrade to Websocket.
+The behavior of this function depends on the protocol selected.
+HTTP/1.1 cannot handle Websocket and HTTP requests concurrently. The upgrade, if successful, will result in the complete takeover of the connection.</description>
</item>
<item>
@@ -6567,10 +6921,10 @@
<guid>https://ninenines.eu/docs/en/gun/1.0/manual/gun_data/</guid>
<description>Name gun_data - Response body
- Description {gun_data, ConnPid, StreamRef, IsFin, Data} ConnPid :: pid() StreamRef :: reference() IsFin :: fin | nofin Data :: binary() Response body.
- This message informs the relevant process that the server sent a all or part of the body for the response to the original request.
- A data message is always preceded by a response message.
- The response body may be terminated either by a data message with the flag fin set or by a gun_trailers(3) message.</description>
+Description {gun_data, ConnPid, StreamRef, IsFin, Data} ConnPid :: pid() StreamRef :: reference() IsFin :: fin | nofin Data :: binary() Response body.
+This message informs the relevant process that the server sent a all or part of the body for the response to the original request.
+A data message is always preceded by a response message.
+The response body may be terminated either by a data message with the flag fin set or by a gun_trailers(3) message.</description>
</item>
<item>
@@ -6580,9 +6934,9 @@
<guid>https://ninenines.eu/docs/en/gun/1.0/manual/gun_down/</guid>
<description>Name gun_down - The connection is down
- Description {gun_down, ConnPid, Protocol, Reason, KilledStreams, UnprocessedStreams} ConnPid :: pid() Protocol :: http | http2 | ws Reason :: any() KilledStreams :: [reference()] UnprocessedStreams :: [reference()] The connection is down.
- This message informs the owner process that the connection was lost. Depending on the retry and retry_timeout options Gun may automatically attempt to reconnect.
- When the connection goes back up, Gun will not attempt to retry requests.</description>
+Description {gun_down, ConnPid, Protocol, Reason, KilledStreams, UnprocessedStreams} ConnPid :: pid() Protocol :: http | http2 | ws Reason :: any() KilledStreams :: [reference()] UnprocessedStreams :: [reference()] The connection is down.
+This message informs the owner process that the connection was lost. Depending on the retry and retry_timeout options Gun may automatically attempt to reconnect.
+When the connection goes back up, Gun will not attempt to retry requests.</description>
</item>
<item>
@@ -6592,8 +6946,8 @@
<guid>https://ninenines.eu/docs/en/gun/1.0/manual/gun_error/</guid>
<description>Name gun_error - Stream or connection-wide error
- Description {gun_error, ConnPid, StreamRef, Reason} {gun_error, ConnPid, Reason} ConnPid :: pid() StreamRef :: reference() Reason :: any() Stream or connection-wide error.
- These messages inform the relevant process that an error occurred. A reference is given when the error pertains to a specific stream. Connection-wide errors do not imply that the connection is no longer usable, they are used for all errors that are not specific to a stream.</description>
+Description {gun_error, ConnPid, StreamRef, Reason} {gun_error, ConnPid, Reason} ConnPid :: pid() StreamRef :: reference() Reason :: any() Stream or connection-wide error.
+These messages inform the relevant process that an error occurred. A reference is given when the error pertains to a specific stream. Connection-wide errors do not imply that the connection is no longer usable, they are used for all errors that are not specific to a stream.</description>
</item>
<item>
@@ -6603,9 +6957,9 @@
<guid>https://ninenines.eu/docs/en/gun/1.0/manual/gun_inform/</guid>
<description>Name gun_inform - Informational response
- Description {gun_inform, ConnPid, StreamRef, Status, Headers} ConnPid :: pid() StreamRef :: reference() Status :: 100..199 Headers :: [{binary(), binary()}] Informational response.
- This message informs the relevant process that the server sent an informational response to the original request.
- Informational responses are only intermediate responses and provide no guarantees as to what the final response will be. An informational response always precedes the response to the original request.</description>
+Description {gun_inform, ConnPid, StreamRef, Status, Headers} ConnPid :: pid() StreamRef :: reference() Status :: 100..199 Headers :: [{binary(), binary()}] Informational response.
+This message informs the relevant process that the server sent an informational response to the original request.
+Informational responses are only intermediate responses and provide no guarantees as to what the final response will be. An informational response always precedes the response to the original request.</description>
</item>
<item>
@@ -6615,9 +6969,9 @@
<guid>https://ninenines.eu/docs/en/gun/1.0/manual/gun_push/</guid>
<description>Name gun_push - Server-initiated push
- Description {gun_push, ConnPid, StreamRef, NewStreamRef, Method, URI, Headers} ConnPid :: pid() StreamRef :: reference() NewStreamRef :: reference() Method :: binary() URI :: binary() Headers :: [{binary(), binary()}] Server-initiated push.
- This message informs the relevant process that the server is pushing a resource related to the effective target URI of the original request.
- A server-initiated push message always precedes the response to the original request.</description>
+Description {gun_push, ConnPid, StreamRef, NewStreamRef, Method, URI, Headers} ConnPid :: pid() StreamRef :: reference() NewStreamRef :: reference() Method :: binary() URI :: binary() Headers :: [{binary(), binary()}] Server-initiated push.
+This message informs the relevant process that the server is pushing a resource related to the effective target URI of the original request.
+A server-initiated push message always precedes the response to the original request.</description>
</item>
<item>
@@ -6627,9 +6981,11 @@
<guid>https://ninenines.eu/docs/en/gun/1.0/manual/gun_response/</guid>
<description>Name gun_response - Response
- Description {gun_response, ConnPid, StreamRef, IsFin, Status, Headers} ConnPid :: pid() StreamRef :: reference() IsFin :: fin | nofin Status :: non_neg_integer() Headers :: [{binary(), binary()}] Response.
- This message informs the relevant process that the server sent a response to the original request.
- Elements ConnPid The pid of the Gun connection process. StreamRef Identifier of the stream for the original request.</description>
+Description {gun_response, ConnPid, StreamRef, IsFin, Status, Headers} ConnPid :: pid() StreamRef :: reference() IsFin :: fin | nofin Status :: non_neg_integer() Headers :: [{binary(), binary()}] Response.
+This message informs the relevant process that the server sent a response to the original request.
+Elements ConnPid The pid of the Gun connection process.
+ StreamRef Identifier of the stream for the original request.
+ IsFin Whether this message terminates the response.</description>
</item>
<item>
@@ -6639,10 +6995,12 @@
<guid>https://ninenines.eu/docs/en/gun/1.0/manual/gun_trailers/</guid>
<description>Name gun_trailers - Response trailers
- Description {gun_trailers, ConnPid, StreamRef, Headers} ConnPid :: pid() StreamRef :: reference() Headers :: [{binary(), binary()}] Response trailers.
- This message informs the relevant process that the server sent response trailers for the response to the original request.
- A trailers message terminates the response.
- Elements ConnPid The pid of the Gun connection process. StreamRef Identifier of the stream for the original request.</description>
+Description {gun_trailers, ConnPid, StreamRef, Headers} ConnPid :: pid() StreamRef :: reference() Headers :: [{binary(), binary()}] Response trailers.
+This message informs the relevant process that the server sent response trailers for the response to the original request.
+A trailers message terminates the response.
+Elements ConnPid The pid of the Gun connection process.
+ StreamRef Identifier of the stream for the original request.
+ Headers Trailing headers sent after the response body.</description>
</item>
<item>
@@ -6652,9 +7010,9 @@
<guid>https://ninenines.eu/docs/en/gun/1.0/manual/gun_up/</guid>
<description>Name gun_up - The connection is up
- Description {gun_up, ConnPid, Protocol} ConnPid :: pid() Protocol :: http | http2 The connection is up.
- This message informs the owner process that the connection or reconnection completed.
- Gun will now start processing the messages it received while waiting for the connection to be up. If this is a reconnection, then this may not be desirable for all requests.</description>
+Description {gun_up, ConnPid, Protocol} ConnPid :: pid() Protocol :: http | http2 The connection is up.
+This message informs the owner process that the connection or reconnection completed.
+Gun will now start processing the messages it received while waiting for the connection to be up. If this is a reconnection, then this may not be desirable for all requests. Those requests should be cancelled when the connection goes down, and any subsequent messages ignored.</description>
</item>
<item>
@@ -6664,9 +7022,9 @@
<guid>https://ninenines.eu/docs/en/gun/1.0/manual/gun_upgrade/</guid>
<description>Name gun_upgrade - Successful protocol upgrade
- Description {gun_upgrade, ConnPid, StreamRef, Protocols, Headers} ConnPid :: pid() StreamRef :: reference() Protocols :: [&amp;lt;&amp;lt;&#34;websocket&#34;&amp;gt;&amp;gt;] Headers :: [{binary(), binary()}] Successful protocol upgrade.
- This message informs the relevant process that the server accepted to upgrade to one or more protocols given in the original request.
- The exact semantics of this message depend on the original protocol. HTTP/1.1 upgrades apply to the entire connection.</description>
+Description {gun_upgrade, ConnPid, StreamRef, Protocols, Headers} ConnPid :: pid() StreamRef :: reference() Protocols :: [&amp;lt;&amp;lt;&#34;websocket&#34;&amp;gt;&amp;gt;] Headers :: [{binary(), binary()}] Successful protocol upgrade.
+This message informs the relevant process that the server accepted to upgrade to one or more protocols given in the original request.
+The exact semantics of this message depend on the original protocol. HTTP/1.1 upgrades apply to the entire connection. HTTP/2 uses a different mechanism which allows switching specific streams to a different protocol.</description>
</item>
<item>
@@ -6676,10 +7034,10 @@
<guid>https://ninenines.eu/docs/en/gun/1.0/manual/gun_ws/</guid>
<description>Name gun_ws - Websocket frame
- Description {gun_ws, ConnPid, StreamRef, Frame} ConnPid :: pid() StreamRef :: reference() Frame :: close | {text | binary | close, binary()} | {close, non_neg_integer(), binary()} Websocket frame.
- This message informs the relevant process that the server sent the enclosed frame.
- This message can only be sent on streams that were upgraded to the Websocket protocol.
- Elements ConnPid The pid of the Gun connection process.</description>
+Description {gun_ws, ConnPid, StreamRef, Frame} ConnPid :: pid() StreamRef :: reference() Frame :: close | {text | binary | close, binary()} | {close, non_neg_integer(), binary()} Websocket frame.
+This message informs the relevant process that the server sent the enclosed frame.
+This message can only be sent on streams that were upgraded to the Websocket protocol.
+Elements ConnPid The pid of the Gun connection process.</description>
</item>
<item>
@@ -6689,9 +7047,10 @@
<guid>https://ninenines.eu/docs/en/ranch/1.2/manual/ranch/</guid>
<description>Name ranch - socket acceptor pool
- Description The ranch module provides functions for starting and manipulating Ranch listeners.
- Types max_conns() = non_neg_integer() | infinity Maximum number of connections allowed on this listener.
- This is a soft limit. The actual number of connections might be slightly above the limit due to concurrency when accepting new connections. Some connections may also be removed from this count explicitly by the user code.</description>
+Description The ranch module provides functions for starting and manipulating Ranch listeners.
+Types max_conns() = non_neg_integer() | infinity Maximum number of connections allowed on this listener.
+This is a soft limit. The actual number of connections might be slightly above the limit due to concurrency when accepting new connections. Some connections may also be removed from this count explicitly by the user code.
+opt() opt() = {ack_timeout, timeout()} | {connection_type, worker | supervisor} | {max_connections, max_conns()} | {shutdown, timeout() | brutal_kill} | {socket, any()} Ranch-specific transport options.</description>
</item>
<item>
@@ -6701,9 +7060,10 @@
<guid>https://ninenines.eu/docs/en/ranch/1.3/manual/ranch/</guid>
<description>Name ranch - socket acceptor pool
- Description The ranch module provides functions for starting and manipulating Ranch listeners.
- Types max_conns() = non_neg_integer() | infinity Maximum number of connections allowed on this listener.
- This is a soft limit. The actual number of connections might be slightly above the limit due to concurrency when accepting new connections. Some connections may also be removed from this count explicitly by the user code.</description>
+Description The ranch module provides functions for starting and manipulating Ranch listeners.
+Types max_conns() = non_neg_integer() | infinity Maximum number of connections allowed on this listener.
+This is a soft limit. The actual number of connections might be slightly above the limit due to concurrency when accepting new connections. Some connections may also be removed from this count explicitly by the user code.
+opt() opt() = {ack_timeout, timeout()} | {connection_type, worker | supervisor} | {max_connections, max_conns()} | {shutdown, timeout() | brutal_kill} | {socket, any()} Ranch-specific transport options.</description>
</item>
<item>
@@ -6713,9 +7073,23 @@
<guid>https://ninenines.eu/docs/en/ranch/1.4/manual/ranch/</guid>
<description>Name ranch - socket acceptor pool
- Description The ranch module provides functions for starting and manipulating Ranch listeners.
- Types max_conns() = non_neg_integer() | infinity Maximum number of connections allowed on this listener.
- This is a soft limit. The actual number of connections might be slightly above the limit due to concurrency when accepting new connections. Some connections may also be removed from this count explicitly by the user code.</description>
+Description The ranch module provides functions for starting and manipulating Ranch listeners.
+Types max_conns() = non_neg_integer() | infinity Maximum number of connections allowed on this listener.
+This is a soft limit. The actual number of connections might be slightly above the limit due to concurrency when accepting new connections. Some connections may also be removed from this count explicitly by the user code.
+opt() opt() = {ack_timeout, timeout()} | {connection_type, worker | supervisor} | {max_connections, max_conns()} | {num_acceptors, pos_integer()} | {shutdown, timeout() | brutal_kill} | {socket, any()} Ranch-specific transport options.</description>
+ </item>
+
+ <item>
+ <title>ranch(3)</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.5/manual/ranch/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.5/manual/ranch/</guid>
+ <description>Name ranch - socket acceptor pool
+Description The ranch module provides functions for starting and manipulating Ranch listeners.
+Types max_conns() = non_neg_integer() | infinity Maximum number of connections allowed on this listener.
+This is a soft limit. The actual number of connections might be slightly above the limit due to concurrency when accepting new connections. Some connections may also be removed from this count explicitly by the user code.
+opt() opt() = {ack_timeout, timeout()} | {connection_type, worker | supervisor} | {max_connections, max_conns()} | {num_acceptors, pos_integer()} | {shutdown, timeout() | brutal_kill} | {socket, any()} Ranch-specific transport options.</description>
</item>
<item>
@@ -6725,10 +7099,11 @@
<guid>https://ninenines.eu/docs/en/ranch/1.2/manual/ranch_app/</guid>
<description>Name ranch - Socket acceptor pool for TCP protocols.
- Dependencies The ranch application has no particular dependency required to start.
- It has optional dependencies that are only required when listening for SSL connections. The dependencies are crypto, asn1, public_key and ssl. They are started automatically if they weren&amp;#8217;t before.
- Environment The ranch application defines one application environment configuration parameter.
- profile (false) When enabled, Ranch will start eprof profiling automatically.</description>
+Dependencies The ranch application has no particular dependency required to start.
+It has optional dependencies that are only required when listening for SSL connections. The dependencies are crypto, asn1, public_key and ssl. They are started automatically if they weren&amp;apos;t before.
+Environment The ranch application defines one application environment configuration parameter.
+profile (false) When enabled, Ranch will start eprof profiling automatically.
+ You can use the ranch_app:profile_output/0 function to stop profiling and output the results to the files procs.</description>
</item>
<item>
@@ -6738,9 +7113,10 @@
<guid>https://ninenines.eu/docs/en/ranch/1.3/manual/ranch_app/</guid>
<description>Name ranch - Socket acceptor pool for TCP protocols.
- Dependencies The ranch application depends on the ssl application to start. It is used for handling secure connections, when the transport is ranch_ssl. It can be disabled if SSL is not used.
- Environment The ranch application defines one application environment configuration parameter.
- profile (false) When enabled, Ranch will start eprof profiling automatically.</description>
+Dependencies The ranch application depends on the ssl application to start. It is used for handling secure connections, when the transport is ranch_ssl. It can be disabled if SSL is not used.
+Environment The ranch application defines one application environment configuration parameter.
+profile (false) When enabled, Ranch will start eprof profiling automatically.
+ You can use the ranch_app:profile_output/0 function to stop profiling and output the results to the files procs.</description>
</item>
<item>
@@ -6750,9 +7126,23 @@
<guid>https://ninenines.eu/docs/en/ranch/1.4/manual/ranch_app/</guid>
<description>Name ranch - Socket acceptor pool for TCP protocols.
- Dependencies The ranch application depends on the ssl application to start. It is used for handling secure connections, when the transport is ranch_ssl. It can be disabled if SSL is not used.
- Environment The ranch application defines one application environment configuration parameter.
- profile (false) When enabled, Ranch will start eprof profiling automatically.</description>
+Dependencies The ranch application depends on the ssl application to start. It is used for handling secure connections, when the transport is ranch_ssl. It can be disabled if SSL is not used.
+Environment The ranch application defines one application environment configuration parameter.
+profile (false) When enabled, Ranch will start eprof profiling automatically.
+ You can use the ranch_app:profile_output/0 function to stop profiling and output the results to the files procs.</description>
+ </item>
+
+ <item>
+ <title>ranch(7)</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.5/manual/ranch_app/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.5/manual/ranch_app/</guid>
+ <description>Name ranch - Socket acceptor pool for TCP protocols.
+Dependencies The ranch application depends on the ssl application to start. It is used for handling secure connections, when the transport is ranch_ssl. It can be disabled if SSL is not used.
+Environment The ranch application defines one application environment configuration parameter.
+profile (false) When enabled, Ranch will start eprof profiling automatically.
+ You can use the ranch_app:profile_output/0 function to stop profiling and output the results to the files procs.</description>
</item>
<item>
@@ -6762,9 +7152,13 @@
<guid>https://ninenines.eu/docs/en/ranch/1.2/manual/ranch_protocol/</guid>
<description>Name ranch_protocol - behaviour for protocol modules
- Description The ranch_protocol behaviour defines the interface used by Ranch protocols.
- Types None.
- Callbacks start_link(Ref, Socket, Transport, ProtoOpts) &amp;#8594; {ok, pid()} | {ok, pid(), pid()} Ref = ranch:ref() Listener name. Socket = any() Socket for this connection. Transport = module() Transport module for this socket.</description>
+Description The ranch_protocol behaviour defines the interface used by Ranch protocols.
+Types None.
+Callbacks start_link(Ref, Socket, Transport, ProtoOpts) -&amp;gt; {ok, pid()} | {ok, pid(), pid()} Ref = ranch:ref() Listener name.
+ Socket = any() Socket for this connection.
+ Transport = module() Transport module for this socket.
+ ProtoOpts = any() Protocol options.
+ Start a new connection process for the given socket.</description>
</item>
<item>
@@ -6774,9 +7168,13 @@
<guid>https://ninenines.eu/docs/en/ranch/1.3/manual/ranch_protocol/</guid>
<description>Name ranch_protocol - behaviour for protocol modules
- Description The ranch_protocol behaviour defines the interface used by Ranch protocols.
- Types None.
- Callbacks start_link(Ref, Socket, Transport, ProtoOpts) &amp;#8594; {ok, pid()} | {ok, pid(), pid()} Ref = ranch:ref() Listener name. Socket = any() Socket for this connection. Transport = module() Transport module for this socket.</description>
+Description The ranch_protocol behaviour defines the interface used by Ranch protocols.
+Types None.
+Callbacks start_link(Ref, Socket, Transport, ProtoOpts) -&amp;gt; {ok, pid()} | {ok, pid(), pid()} Ref = ranch:ref() Listener name.
+ Socket = any() Socket for this connection.
+ Transport = module() Transport module for this socket.
+ ProtoOpts = any() Protocol options.
+ Start a new connection process for the given socket.</description>
</item>
<item>
@@ -6786,9 +7184,29 @@
<guid>https://ninenines.eu/docs/en/ranch/1.4/manual/ranch_protocol/</guid>
<description>Name ranch_protocol - behaviour for protocol modules
- Description The ranch_protocol behaviour defines the interface used by Ranch protocols.
- Types None.
- Callbacks start_link(Ref, Socket, Transport, ProtoOpts) &amp;#8594; {ok, pid()} | {ok, pid(), pid()} Ref = ranch:ref() Listener name. Socket = any() Socket for this connection. Transport = module() Transport module for this socket.</description>
+Description The ranch_protocol behaviour defines the interface used by Ranch protocols.
+Types None.
+Callbacks start_link(Ref, Socket, Transport, ProtoOpts) -&amp;gt; {ok, pid()} | {ok, pid(), pid()} Ref = ranch:ref() Listener name.
+ Socket = any() Socket for this connection.
+ Transport = module() Transport module for this socket.
+ ProtoOpts = any() Protocol options.
+ Start a new connection process for the given socket.</description>
+ </item>
+
+ <item>
+ <title>ranch_protocol(3)</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.5/manual/ranch_protocol/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.5/manual/ranch_protocol/</guid>
+ <description>Name ranch_protocol - behaviour for protocol modules
+Description The ranch_protocol behaviour defines the interface used by Ranch protocols.
+Types None.
+Callbacks start_link(Ref, Socket, Transport, ProtoOpts) -&amp;gt; {ok, pid()} | {ok, pid(), pid()} Ref = ranch:ref() Listener name.
+ Socket = any() Socket for this connection.
+ Transport = module() Transport module for this socket.
+ ProtoOpts = any() Protocol options.
+ Start a new connection process for the given socket.</description>
</item>
<item>
@@ -6798,8 +7216,8 @@
<guid>https://ninenines.eu/docs/en/ranch/1.2/manual/ranch_ssl/</guid>
<description>Name ranch_ssl - SSL transport module
- Description The ranch_ssl module implements an SSL Ranch transport.
- Types ssl_opt() ssl_opt() = {alpn_preferred_protocols, [binary()]} | {cacertfile, string()} | {cacerts, [public_key:der_encoded()]} | {cert, public_key:der_encoded()} | {certfile, string()} | {ciphers, [ssl:erl_cipher_suite()] | string()} | {client_renegotiation, boolean()} | {crl_cache, {module(), {internal | any(), list()}}} | {crl_check, boolean() | peer | best_effort} | {depth, 0..255} | {dh, public_key:der_encoded()} | {dhfile, string()} | {fail_if_no_peer_cert, boolean()} | {hibernate_after, integer() | undefined} | {honor_cipher_order, boolean()} | {key, {&#39;RSAPrivateKey&#39; | &#39;DSAPrivateKey&#39; | &#39;PrivateKeyInfo&#39;, public_key:der_encoded()}} | {keyfile, string()} | {log_alert, boolean()} | {next_protocols_advertised, [binary()]} | {partial_chain, fun(([public_key:der_encoded()]) -&amp;gt; {trusted_ca, public_key:der_encoded()} | unknown_ca)} | {password, string()} | {psk_identity, string()} | {reuse_session, fun()} | {reuse_sessions, boolean()} | {secure_renegotiate, boolean()} | {sni_fun, fun()} | {sni_hosts, [{string(), ssl_opt()}]} | {user_lookup_fun, {fun(), any()}} | {verify, ssl:verify_type()} | {verify_fun, {fun(), any()}} | {versions, [atom()]}.</description>
+Description The ranch_ssl module implements an SSL Ranch transport.
+Types ssl_opt() ssl_opt() = {alpn_preferred_protocols, [binary()]} | {cacertfile, string()} | {cacerts, [public_key:der_encoded()]} | {cert, public_key:der_encoded()} | {certfile, string()} | {ciphers, [ssl:erl_cipher_suite()] | string()} | {client_renegotiation, boolean()} | {crl_cache, {module(), {internal | any(), list()}}} | {crl_check, boolean() | peer | best_effort} | {depth, 0..255} | {dh, public_key:der_encoded()} | {dhfile, string()} | {fail_if_no_peer_cert, boolean()} | {hibernate_after, integer() | undefined} | {honor_cipher_order, boolean()} | {key, {&#39;RSAPrivateKey&#39; | &#39;DSAPrivateKey&#39; | &#39;PrivateKeyInfo&#39;, public_key:der_encoded()}} | {keyfile, string()} | {log_alert, boolean()} | {next_protocols_advertised, [binary()]} | {partial_chain, fun(([public_key:der_encoded()]) -&amp;gt; {trusted_ca, public_key:der_encoded()} | unknown_ca)} | {password, string()} | {psk_identity, string()} | {reuse_session, fun()} | {reuse_sessions, boolean()} | {secure_renegotiate, boolean()} | {sni_fun, fun()} | {sni_hosts, [{string(), ssl_opt()}]} | {user_lookup_fun, {fun(), any()}} | {verify, ssl:verify_type()} | {verify_fun, {fun(), any()}} | {versions, [atom()]}.</description>
</item>
<item>
@@ -6809,8 +7227,8 @@
<guid>https://ninenines.eu/docs/en/ranch/1.3/manual/ranch_ssl/</guid>
<description>Name ranch_ssl - SSL transport module
- Description The ranch_ssl module implements an SSL Ranch transport.
- Types ssl_opt() ssl_opt() = {alpn_preferred_protocols, [binary()]} | {beast_mitigation, one_n_minus_one | zero_n | disabled} | {cacertfile, string()} | {cacerts, [public_key:der_encoded()]} | {cert, public_key:der_encoded()} | {certfile, string()} | {ciphers, [ssl:erl_cipher_suite()] | string()} | {client_renegotiation, boolean()} | {crl_cache, {module(), {internal | any(), list()}}} | {crl_check, boolean() | peer | best_effort} | {depth, 0.</description>
+Description The ranch_ssl module implements an SSL Ranch transport.
+Types ssl_opt() ssl_opt() = {alpn_preferred_protocols, [binary()]} | {beast_mitigation, one_n_minus_one | zero_n | disabled} | {cacertfile, string()} | {cacerts, [public_key:der_encoded()]} | {cert, public_key:der_encoded()} | {certfile, string()} | {ciphers, [ssl:erl_cipher_suite()] | string()} | {client_renegotiation, boolean()} | {crl_cache, {module(), {internal | any(), list()}}} | {crl_check, boolean() | peer | best_effort} | {depth, 0..255} | {dh, public_key:der_encoded()} | {dhfile, string()} | {fail_if_no_peer_cert, boolean()} | {hibernate_after, integer() | undefined} | {honor_cipher_order, boolean()} | {key, {&#39;RSAPrivateKey&#39; | &#39;DSAPrivateKey&#39; | &#39;PrivateKeyInfo&#39;, public_key:der_encoded()}} | {keyfile, string()} | {log_alert, boolean()} | {next_protocols_advertised, [binary()]} | {padding_check, boolean()} | {partial_chain, fun(([public_key:der_encoded()]) -&amp;gt; {trusted_ca, public_key:der_encoded()} | unknown_ca)} | {password, string()} | {psk_identity, string()} | {reuse_session, fun()} | {reuse_sessions, boolean()} | {secure_renegotiate, boolean()} | {signature_algs, [{atom(), atom()}]} | {sni_fun, fun()} | {sni_hosts, [{string(), ssl_opt()}]} | {user_lookup_fun, {fun(), any()}} | {v2_hello_compatible, boolean()} | {verify, ssl:verify_type()} | {verify_fun, {fun(), any()}} | {versions, [atom()]}.</description>
</item>
<item>
@@ -6820,8 +7238,19 @@
<guid>https://ninenines.eu/docs/en/ranch/1.4/manual/ranch_ssl/</guid>
<description>Name ranch_ssl - SSL transport module
- Description The ranch_ssl module implements an SSL Ranch transport.
- Types ssl_opt() ssl_opt() = {alpn_preferred_protocols, [binary()]} | {beast_mitigation, one_n_minus_one | zero_n | disabled} | {cacertfile, string()} | {cacerts, [public_key:der_encoded()]} | {cert, public_key:der_encoded()} | {certfile, string()} | {ciphers, [ssl:erl_cipher_suite()] | string()} | {client_renegotiation, boolean()} | {crl_cache, {module(), {internal | any(), list()}}} | {crl_check, boolean() | peer | best_effort} | {depth, 0.</description>
+Description The ranch_ssl module implements an SSL Ranch transport.
+Types ssl_opt() ssl_opt() = {alpn_preferred_protocols, [binary()]} | {beast_mitigation, one_n_minus_one | zero_n | disabled} | {cacertfile, string()} | {cacerts, [public_key:der_encoded()]} | {cert, public_key:der_encoded()} | {certfile, string()} | {ciphers, [ssl:erl_cipher_suite()] | string()} | {client_renegotiation, boolean()} | {crl_cache, {module(), {internal | any(), list()}}} | {crl_check, boolean() | peer | best_effort} | {depth, 0..255} | {dh, public_key:der_encoded()} | {dhfile, string()} | {fail_if_no_peer_cert, boolean()} | {hibernate_after, integer() | undefined} | {honor_cipher_order, boolean()} | {key, {&#39;RSAPrivateKey&#39; | &#39;DSAPrivateKey&#39; | &#39;PrivateKeyInfo&#39;, public_key:der_encoded()}} | {keyfile, string()} | {log_alert, boolean()} | {next_protocols_advertised, [binary()]} | {padding_check, boolean()} | {partial_chain, fun(([public_key:der_encoded()]) -&amp;gt; {trusted_ca, public_key:der_encoded()} | unknown_ca)} | {password, string()} | {psk_identity, string()} | {reuse_session, fun()} | {reuse_sessions, boolean()} | {secure_renegotiate, boolean()} | {signature_algs, [{atom(), atom()}]} | {sni_fun, fun()} | {sni_hosts, [{string(), ssl_opt()}]} | {user_lookup_fun, {fun(), any()}} | {v2_hello_compatible, boolean()} | {verify, ssl:verify_type()} | {verify_fun, {fun(), any()}} | {versions, [atom()]}.</description>
+ </item>
+
+ <item>
+ <title>ranch_ssl(3)</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.5/manual/ranch_ssl/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.5/manual/ranch_ssl/</guid>
+ <description>Name ranch_ssl - SSL transport module
+Description The ranch_ssl module implements an SSL Ranch transport.
+Types ssl_opt() ssl_opt() = {alpn_preferred_protocols, [binary()]} | {beast_mitigation, one_n_minus_one | zero_n | disabled} | {cacertfile, string()} | {cacerts, [public_key:der_encoded()]} | {cert, public_key:der_encoded()} | {certfile, string()} | {ciphers, [ssl:erl_cipher_suite()] | string()} | {client_renegotiation, boolean()} | {crl_cache, {module(), {internal | any(), list()}}} | {crl_check, boolean() | peer | best_effort} | {depth, 0..255} | {dh, public_key:der_encoded()} | {dhfile, string()} | {fail_if_no_peer_cert, boolean()} | {hibernate_after, integer() | undefined} | {honor_cipher_order, boolean()} | {key, {&#39;RSAPrivateKey&#39; | &#39;DSAPrivateKey&#39; | &#39;PrivateKeyInfo&#39;, public_key:der_encoded()}} | {keyfile, string()} | {log_alert, boolean()} | {next_protocols_advertised, [binary()]} | {padding_check, boolean()} | {partial_chain, fun(([public_key:der_encoded()]) -&amp;gt; {trusted_ca, public_key:der_encoded()} | unknown_ca)} | {password, string()} | {psk_identity, string()} | {reuse_session, fun()} | {reuse_sessions, boolean()} | {secure_renegotiate, boolean()} | {signature_algs, [{atom(), atom()}]} | {sni_fun, fun()} | {sni_hosts, [{string(), ssl_opt()}]} | {user_lookup_fun, {fun(), any()}} | {v2_hello_compatible, boolean()} | {verify, ssl:verify_type()} | {verify_fun, {fun(), any()}} | {versions, [atom()]}.</description>
</item>
<item>
@@ -6831,9 +7260,9 @@
<guid>https://ninenines.eu/docs/en/ranch/1.2/manual/ranch_tcp/</guid>
<description>Name ranch_tcp - TCP transport module
- Description The ranch_tcp module implements a TCP Ranch transport.
- Note that due to bugs in OTP up to at least R16B02, it is recommended to disable async threads when using the sendfile function of this transport, as it can make the threads stuck indefinitely.
- Types opt() opt() = {backlog, non_neg_integer()} | {buffer, non_neg_integer()} | {delay_send, boolean()} | {dontroute, boolean()} | {exit_on_close, boolean()} | {fd, non_neg_integer()} | {high_msgq_watermark, non_neg_integer()} | {high_watermark, non_neg_integer()} | inet | inet6 | {ip, inet:ip_address()} | {keepalive, boolean()} | {linger, {boolean(), non_neg_integer()}} | {low_msgq_watermark, non_neg_integer()} | {low_watermark, non_neg_integer()} | {nodelay, boolean()} | {port, inet:port_number()} | {priority, integer()} | {raw, non_neg_integer(), non_neg_integer(), binary()} | {recbuf, non_neg_integer()} | {send_timeout, timeout()} | {send_timeout_close, boolean()} | {sndbuf, non_neg_integer()} | {tos, integer()} Listen options.</description>
+Description The ranch_tcp module implements a TCP Ranch transport.
+Note that due to bugs in OTP up to at least R16B02, it is recommended to disable async threads when using the sendfile function of this transport, as it can make the threads stuck indefinitely.
+Types opt() opt() = {backlog, non_neg_integer()} | {buffer, non_neg_integer()} | {delay_send, boolean()} | {dontroute, boolean()} | {exit_on_close, boolean()} | {fd, non_neg_integer()} | {high_msgq_watermark, non_neg_integer()} | {high_watermark, non_neg_integer()} | inet | inet6 | {ip, inet:ip_address()} | {keepalive, boolean()} | {linger, {boolean(), non_neg_integer()}} | {low_msgq_watermark, non_neg_integer()} | {low_watermark, non_neg_integer()} | {nodelay, boolean()} | {port, inet:port_number()} | {priority, integer()} | {raw, non_neg_integer(), non_neg_integer(), binary()} | {recbuf, non_neg_integer()} | {send_timeout, timeout()} | {send_timeout_close, boolean()} | {sndbuf, non_neg_integer()} | {tos, integer()} Listen options.</description>
</item>
<item>
@@ -6843,9 +7272,9 @@
<guid>https://ninenines.eu/docs/en/ranch/1.3/manual/ranch_tcp/</guid>
<description>Name ranch_tcp - TCP transport module
- Description The ranch_tcp module implements a TCP Ranch transport.
- Note that due to bugs in OTP up to at least R16B02, it is recommended to disable async threads when using the sendfile function of this transport, as it can make the threads stuck indefinitely.
- Types opt() opt() = {backlog, non_neg_integer()} | {buffer, non_neg_integer()} | {delay_send, boolean()} | {dontroute, boolean()} | {exit_on_close, boolean()} | {fd, non_neg_integer()} | {high_msgq_watermark, non_neg_integer()} | {high_watermark, non_neg_integer()} | inet | inet6 | {ip, inet:ip_address()} | {ipv6_v6only, boolean()} | {keepalive, boolean()} | {linger, {boolean(), non_neg_integer()}} | {low_msgq_watermark, non_neg_integer()} | {low_watermark, non_neg_integer()} | {nodelay, boolean()} | {port, inet:port_number()} | {priority, integer()} | {raw, non_neg_integer(), non_neg_integer(), binary()} | {recbuf, non_neg_integer()} | {send_timeout, timeout()} | {send_timeout_close, boolean()} | {sndbuf, non_neg_integer()} | {tos, integer()} Listen options.</description>
+Description The ranch_tcp module implements a TCP Ranch transport.
+Note that due to bugs in OTP up to at least R16B02, it is recommended to disable async threads when using the sendfile function of this transport, as it can make the threads stuck indefinitely.
+Types opt() opt() = {backlog, non_neg_integer()} | {buffer, non_neg_integer()} | {delay_send, boolean()} | {dontroute, boolean()} | {exit_on_close, boolean()} | {fd, non_neg_integer()} | {high_msgq_watermark, non_neg_integer()} | {high_watermark, non_neg_integer()} | inet | inet6 | {ip, inet:ip_address()} | {ipv6_v6only, boolean()} | {keepalive, boolean()} | {linger, {boolean(), non_neg_integer()}} | {low_msgq_watermark, non_neg_integer()} | {low_watermark, non_neg_integer()} | {nodelay, boolean()} | {port, inet:port_number()} | {priority, integer()} | {raw, non_neg_integer(), non_neg_integer(), binary()} | {recbuf, non_neg_integer()} | {send_timeout, timeout()} | {send_timeout_close, boolean()} | {sndbuf, non_neg_integer()} | {tos, integer()} Listen options.</description>
</item>
<item>
@@ -6855,9 +7284,21 @@
<guid>https://ninenines.eu/docs/en/ranch/1.4/manual/ranch_tcp/</guid>
<description>Name ranch_tcp - TCP transport module
- Description The ranch_tcp module implements a TCP Ranch transport.
- Note that due to bugs in OTP up to at least R16B02, it is recommended to disable async threads when using the sendfile function of this transport, as it can make the threads stuck indefinitely.
- Types opt() opt() = {backlog, non_neg_integer()} | {buffer, non_neg_integer()} | {delay_send, boolean()} | {dontroute, boolean()} | {exit_on_close, boolean()} | {fd, non_neg_integer()} | {high_msgq_watermark, non_neg_integer()} | {high_watermark, non_neg_integer()} | inet | inet6 | {ip, inet:ip_address()} | {ipv6_v6only, boolean()} | {keepalive, boolean()} | {linger, {boolean(), non_neg_integer()}} | {low_msgq_watermark, non_neg_integer()} | {low_watermark, non_neg_integer()} | {nodelay, boolean()} | {port, inet:port_number()} | {priority, integer()} | {raw, non_neg_integer(), non_neg_integer(), binary()} | {recbuf, non_neg_integer()} | {send_timeout, timeout()} | {send_timeout_close, boolean()} | {sndbuf, non_neg_integer()} | {tos, integer()} Listen options.</description>
+Description The ranch_tcp module implements a TCP Ranch transport.
+Note that due to bugs in OTP up to at least R16B02, it is recommended to disable async threads when using the sendfile function of this transport, as it can make the threads stuck indefinitely.
+Types opt() opt() = {backlog, non_neg_integer()} | {buffer, non_neg_integer()} | {delay_send, boolean()} | {dontroute, boolean()} | {exit_on_close, boolean()} | {fd, non_neg_integer()} | {high_msgq_watermark, non_neg_integer()} | {high_watermark, non_neg_integer()} | inet | inet6 | {ip, inet:ip_address()} | {ipv6_v6only, boolean()} | {keepalive, boolean()} | {linger, {boolean(), non_neg_integer()}} | {low_msgq_watermark, non_neg_integer()} | {low_watermark, non_neg_integer()} | {nodelay, boolean()} | {port, inet:port_number()} | {priority, integer()} | {raw, non_neg_integer(), non_neg_integer(), binary()} | {recbuf, non_neg_integer()} | {send_timeout, timeout()} | {send_timeout_close, boolean()} | {sndbuf, non_neg_integer()} | {tos, integer()} Listen options.</description>
+ </item>
+
+ <item>
+ <title>ranch_tcp(3)</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.5/manual/ranch_tcp/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.5/manual/ranch_tcp/</guid>
+ <description>Name ranch_tcp - TCP transport module
+Description The ranch_tcp module implements a TCP Ranch transport.
+Note that due to bugs in OTP up to at least R16B02, it is recommended to disable async threads when using the sendfile function of this transport, as it can make the threads stuck indefinitely.
+Types opt() opt() = {backlog, non_neg_integer()} | {buffer, non_neg_integer()} | {delay_send, boolean()} | {dontroute, boolean()} | {exit_on_close, boolean()} | {fd, non_neg_integer()} | {high_msgq_watermark, non_neg_integer()} | {high_watermark, non_neg_integer()} | inet | inet6 | {ip, inet:ip_address()} | {ipv6_v6only, boolean()} | {keepalive, boolean()} | {linger, {boolean(), non_neg_integer()}} | {low_msgq_watermark, non_neg_integer()} | {low_watermark, non_neg_integer()} | {nodelay, boolean()} | {port, inet:port_number()} | {priority, integer()} | {raw, non_neg_integer(), non_neg_integer(), binary()} | {recbuf, non_neg_integer()} | {send_timeout, timeout()} | {send_timeout_close, boolean()} | {sndbuf, non_neg_integer()} | {tos, integer()} Listen options.</description>
</item>
<item>
@@ -6867,10 +7308,12 @@
<guid>https://ninenines.eu/docs/en/ranch/1.2/manual/ranch_transport/</guid>
<description>Name ranch_transport - behaviour for transport modules
- Description The ranch_transport behaviour defines the interface used by Ranch transports.
- Types sendfile_opts() = [{chunk_size, non_neg_integer()}] Options used by the sendfile function and callbacks.
- Allows configuring the chunk size, in bytes. Defaults to 8191 bytes.
- Callbacks accept(LSocket, Timeout) &amp;#8594; {ok, CSocket} | {error, closed | timeout | atom()} LSocket = CSocket = any() Listening socket.</description>
+Description The ranch_transport behaviour defines the interface used by Ranch transports.
+Types sendfile_opts() = [{chunk_size, non_neg_integer()}] Options used by the sendfile function and callbacks.
+Allows configuring the chunk size, in bytes. Defaults to 8191 bytes.
+Callbacks accept(LSocket, Timeout) -&amp;gt; {ok, CSocket} | {error, closed | timeout | atom()} LSocket = CSocket = any() Listening socket.
+ Timeout = timeout() Accept timeout.
+ Accept a connection on the given listening socket.</description>
</item>
<item>
@@ -6880,10 +7323,12 @@
<guid>https://ninenines.eu/docs/en/ranch/1.3/manual/ranch_transport/</guid>
<description>Name ranch_transport - behaviour for transport modules
- Description The ranch_transport behaviour defines the interface used by Ranch transports.
- Types sendfile_opts() = [{chunk_size, non_neg_integer()}] Options used by the sendfile function and callbacks.
- Allows configuring the chunk size, in bytes. Defaults to 8191 bytes.
- Callbacks accept(LSocket, Timeout) &amp;#8594; {ok, CSocket} | {error, closed | timeout | atom()} LSocket = CSocket = any() Listening socket.</description>
+Description The ranch_transport behaviour defines the interface used by Ranch transports.
+Types sendfile_opts() = [{chunk_size, non_neg_integer()}] Options used by the sendfile function and callbacks.
+Allows configuring the chunk size, in bytes. Defaults to 8191 bytes.
+Callbacks accept(LSocket, Timeout) -&amp;gt; {ok, CSocket} | {error, closed | timeout | atom()} LSocket = CSocket = any() Listening socket.
+ Timeout = timeout() Accept timeout.
+ Accept a connection on the given listening socket.</description>
</item>
<item>
@@ -6893,10 +7338,27 @@
<guid>https://ninenines.eu/docs/en/ranch/1.4/manual/ranch_transport/</guid>
<description>Name ranch_transport - behaviour for transport modules
- Description The ranch_transport behaviour defines the interface used by Ranch transports.
- Types sendfile_opts() = [{chunk_size, non_neg_integer()}] Options used by the sendfile function and callbacks.
- Allows configuring the chunk size, in bytes. Defaults to 8191 bytes.
- Callbacks accept(LSocket, Timeout) &amp;#8594; {ok, CSocket} | {error, closed | timeout | atom()} LSocket = CSocket = any() Listening socket.</description>
+Description The ranch_transport behaviour defines the interface used by Ranch transports.
+Types sendfile_opts() = [{chunk_size, non_neg_integer()}] Options used by the sendfile function and callbacks.
+Allows configuring the chunk size, in bytes. Defaults to 8191 bytes.
+Callbacks accept(LSocket, Timeout) -&amp;gt; {ok, CSocket} | {error, closed | timeout | atom()} LSocket = CSocket = any() Listening socket.
+ Timeout = timeout() Accept timeout.
+ Accept a connection on the given listening socket.</description>
+ </item>
+
+ <item>
+ <title>ranch_transport(3)</title>
+ <link>https://ninenines.eu/docs/en/ranch/1.5/manual/ranch_transport/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://ninenines.eu/docs/en/ranch/1.5/manual/ranch_transport/</guid>
+ <description>Name ranch_transport - behaviour for transport modules
+Description The ranch_transport behaviour defines the interface used by Ranch transports.
+Types sendfile_opts() = [{chunk_size, non_neg_integer()}] Options used by the sendfile function and callbacks.
+Allows configuring the chunk size, in bytes. Defaults to 8191 bytes.
+Callbacks accept(LSocket, Timeout) -&amp;gt; {ok, CSocket} | {error, closed | timeout | atom()} LSocket = CSocket = any() Listening socket.
+ Timeout = timeout() Accept timeout.
+ Accept a connection on the given listening socket.</description>
</item>
</channel>